/* ===== Survive This - Book Website ===== */
:root {
  --bg-dark: #0a0a0a;
  --bg-111: #111111;
  --bg-0d: #0d0d0d;
  --bg-1a: #1a1a1a;
  --bg-252: #252525;
  --bg-1e: #1e1e1e;
  --white: #fff;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --blue-500: #3b82f6;
  --brown: #2c1810;
  --brown-hover: #3d2218;
  --nav-bg: rgba(255, 255, 255, 0.95);
  --overlay: linear-gradient(to bottom, rgba(0,0,0,0.7), rgba(0,0,0,0.5), rgba(0,0,0,0.9));
  --black-80: rgba(0, 0, 0, 0.8);
  --white-10: rgba(255, 255, 255, 0.1);
  --white-20: rgba(255, 255, 255, 0.2);
  --white-30: rgba(255, 255, 255, 0.3);
  --white-60: rgba(255, 255, 255, 0.6);
  --white-80: rgba(255, 255, 255, 0.8);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: Georgia, 'Times New Roman', serif;
  --ease-out-expo: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --radius-full: 9999px;
  --radius-lg: 1rem;
  --radius-xl: 1.25rem;
  --radius-2xl: 1.5rem;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  background-color: var(--bg-dark);
  color: #f5f5f5;
  overflow-x: hidden;
}

/* Layout utilities */
.app { min-height: 100vh; }
.flex { display: flex; }
.flex-1 { flex: 1; }
.hidden { display: none; }
.block { display: block; }
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.left-0 { left: 0; }
.right-0 { right: 0; }
.top-0 { top: 0; }
.bottom-0 { bottom: 0; }
.z-10 { z-index: 10; }
.z-50 { z-index: 50; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mb-16 { margin-bottom: 4rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-12 { margin-top: 3rem; }
.mt-16 { margin-top: 4rem; }
.mt-20 { margin-top: 5rem; }
.pt-12 { padding-top: 3rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-12 { gap: 3rem; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.text-center { text-align: center; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.max-w-md { max-width: 28rem; }
.max-w-xl { max-width: 36rem; }
.max-w-sm { max-width: 24rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-5xl { max-width: 64rem; }
.min-w-0 { min-width: 0; }
.flex-shrink-0 { flex-shrink: 0; }
.overflow-hidden { overflow: hidden; }
.overflow-x-hidden { overflow-x: hidden; }
.rounded { border-radius: 0.25rem; }
.rounded-sm { border-radius: 0.125rem; }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: var(--radius-full); }
.rounded-2xl { border-radius: var(--radius-2xl); }
.object-cover { object-fit: cover; }
.object-bottom { object-position: bottom; }
.leading-relaxed { line-height: 1.625; }
.leading-tight { line-height: 1.25; }
.whitespace-nowrap { white-space: nowrap; }
.outline-none { outline: none; }
.transition-colors { transition: color 0.2s, background-color 0.2s, border-color 0.2s; }
.transition-all { transition: all 0.2s ease; }

/* Colors */
.bg-dark { background-color: var(--bg-dark); }
.bg-input { background-color: var(--bg-1e); }
.bg-blue-500 { background-color: var(--blue-500); }
.bg-black { background-color: #000; }
.text-white { color: var(--white); }
.text-gray-300 { color: var(--gray-300); }
.text-gray-400 { color: var(--gray-400); }
.text-gray-500 { color: var(--gray-500); }
.text-gray-600 { color: var(--gray-600); }
.text-gray-700 { color: var(--gray-700); }
.placeholder-gray-500::placeholder { color: var(--gray-500); }
.border-white-10 { border-color: var(--white-10); }
.border-white-20 { border-color: var(--white-20); }
.border-white { border-color: var(--white); }
.border-white-30 { border-color: var(--white-30); }
.bg-white-10 { background-color: var(--white-10); }
.bg-black-80 { background-color: var(--black-80); }

/* Typography */
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.text-5xl { font-size: 3rem; }
.text-6xl { font-size: 3.75rem; }
.font-bold { font-weight: 700; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.tracking-widest { letter-spacing: 0.2em; }
.uppercase { text-transform: uppercase; }
.italic { font-style: italic; }
.font-serif { font-family: var(--font-serif); }

/* Spacing */
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-5 { padding-top: 1.25rem; padding-bottom: 1.25rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.py-28 { padding-top: 7rem; padding-bottom: 7rem; }
.py-32 { padding-top: 8rem; padding-bottom: 8rem; }
.p-8 { padding: 2rem; }
.p-10 { padding: 2.5rem; }
.w-4 { width: 1rem; }
.w-5 { width: 1.25rem; }
.w-8 { width: 2rem; }
.w-10 { width: 2.5rem; }
.w-12 { width: 3rem; }
.h-4 { height: 1rem; }
.h-5 { height: 1.25rem; }
.h-8 { height: 2rem; }
.h-10 { height: 2.5rem; }
.h-12 { height: 3rem; }
.h-px { height: 1px; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-10 > * + * { margin-top: 2.5rem; }

/* ===== NAV ===== */
.nav { color: #111; }
.nav-bg {
  background: var(--nav-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.nav-link {
  color: var(--gray-700);
  text-decoration: none;
  transition: color 0.2s;
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
}
.nav-link:hover { color: #000; }
.nav-link.active { border-bottom-color: #000; color: #000; }
.logo-link {
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s;
}
.logo-link:hover { opacity: 0.85; }
.btn-text {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-700);
  background: none;
  border: none;
  cursor: pointer;
}
.btn-text:hover { color: #000; }
.btn-connect {
  background: var(--brown);
  color: var(--white);
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-connect:hover { background: var(--brown-hover); }

@media (min-width: 768px) {
  .nav-links { display: flex !important; }
  .md\:block { display: block; }
  .md\:px-8 { padding-left: 2rem; padding-right: 2rem; }
}

/* ===== HERO ===== */
.hero { min-height: 100vh; }
.hero-bg-wrap { will-change: transform; }
.hero-bg-img { will-change: transform; }
.hero-overlay {
  background: var(--overlay);
}
.hero-title {
  font-size: clamp(2.5rem, 10vw, 6rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  font-family: var(--font-serif);
}
.text-glow {
  text-shadow: 0 0 40px rgba(255, 255, 255, 0.3);
}
.hero-tagline { text-shadow: 0 2px 10px rgba(0,0,0,0.9); }
.drop-shadow-lg { filter: drop-shadow(0 10px 8px rgba(0,0,0,0.5)); }
.hero-btns { flex-wrap: wrap; justify-content: center; }
.hero-tab {
  color: var(--white-80);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.hero-tab:hover { color: var(--white); }
.hero-tab:hover + .hero-tab,
.hero-tabs .hero-tab:first-child { border-top-color: var(--white); }
.hero-tabs .hero-tab:hover { border-top-color: var(--white); }

/* Buttons */
.btn-primary {
  padding: 0.75rem 2rem;
  background: var(--white);
  color: #000;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.btn-primary:hover { background: #e5e5e5; transform: scale(1.05); }
.btn-primary:active { transform: scale(0.98); }
.btn-outline-white {
  padding: 0.75rem 2rem;
  border: 1px solid var(--white-60);
  color: var(--white);
  background: transparent;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.btn-outline-white:hover { background: var(--white-10); transform: scale(1.05); }
.btn-outline-white:active { transform: scale(0.98); }
.btn-link {
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  font: inherit;
}
.btn-outline {
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--white-30);
  color: var(--white);
  background: transparent;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.btn-outline:hover { background: var(--white-10); transform: scale(1.05); }

a.btn-primary,
a.btn-outline,
a.btn-outline-white,
a.btn-text,
a.btn-connect {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  line-height: 1.25;
}
a.btn-link {
  text-decoration: none;
}
a.hero-tab {
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-nav::after {
  content: '→';
  margin-left: 0.35rem;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.25s ease, transform 0.25s var(--ease-out-expo);
}
.btn-nav:hover::after {
  opacity: 1;
  transform: translateX(0);
}
.btn-order::after {
  content: '→';
  margin-left: 0.35rem;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.25s ease, transform 0.25s var(--ease-out-expo);
}
.btn-order:hover::after {
  opacity: 1;
  transform: translateX(0);
}

/* ===== SECTIONS ===== */
.section { background-color: var(--bg-dark); }
.section-dark { background-color: var(--bg-111); }
.section-darker { background-color: var(--bg-0d); }
.section-testimonials { background-color: var(--bg-1a); }
.section-label { letter-spacing: 0.3em; }
.section-title { line-height: 1.2; }

.section-cta .section-title { color: var(--white); }

/* ===== CARDS & CONTENT ===== */
.card-center { perspective: 1200px; }
.card-icon svg { width: 100%; height: 100%; }

/* Stats */
.stat-number {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 700;
  line-height: 1;
}
.img-hover-3d { transition: transform 0.4s var(--ease-out-expo); }
.img-hover-3d:hover { transform: scale(1.02) rotateY(2deg); }
.img-hover-scale { transition: transform 0.4s; }
.img-hover-scale:hover { transform: scale(1.02); }

/* Book */
.book-shadow {
  filter: drop-shadow(0 20px 60px rgba(0,0,0,0.8)) drop-shadow(0 0 30px rgba(100,150,255,0.2));
}
.book-wrap { perspective: 1000px; }
.book-wrap:hover { transform: rotateY(5deg) rotateX(-2deg); transition: transform 0.5s; }

/* ===== BOOK DETAIL (books page) ===== */
.book-detail-content {
  width: 100%;
  max-width: 62rem;
  margin: 0 auto;
  text-align: center;
  padding: 2.5rem 1.75rem;
  border-radius: var(--radius-2xl);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}
@media (min-width: 768px) {
  .book-detail-content {
    padding: 3rem 3rem 3.5rem;
  }
}
@media (min-width: 1024px) {
  .book-detail-content {
    padding: 3.5rem 4rem 4rem;
  }
}
.book-detail-title {
  color: var(--white);
  line-height: 1.15;
  text-align: center;
}
.book-detail-divider {
  width: 4rem;
  height: 2px;
  margin: 0 auto 2rem;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
}
.book-detail-text {
  color: var(--gray-400);
  font-size: 1.0625rem;
  line-height: 1.85;
  margin-bottom: 1.5rem;
  text-align: center;
}
.book-detail-text:last-of-type {
  margin-bottom: 0;
}
.book-detail-cover {
  margin-top: 3rem;
  padding-top: 3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: center;
}
@media (min-width: 768px) {
  .book-detail-cover {
    margin-top: 3.5rem;
    padding-top: 3.5rem;
  }
}
.book-cover-showcase {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 0.5rem 0 1rem;
}
.book-cover-showcase::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0.5rem;
  transform: translateX(-50%);
  width: 55%;
  max-width: 14rem;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(100, 150, 255, 0.22) 0%, transparent 70%);
  filter: blur(6px);
  pointer-events: none;
}
.book-detail-cover .book-wrap {
  transition: transform 0.5s var(--ease-out-expo);
  position: relative;
  z-index: 1;
}
.book-detail-cover .book-wrap:hover {
  transform: rotateY(-6deg) rotateX(2deg);
}
.book-cover-img {
  display: block;
  width: 100%;
  max-width: 20rem;
  margin: 0 auto;
  border-radius: 0.375rem;
  transition: transform 0.5s var(--ease-out-expo);
  position: relative;
  z-index: 1;
}

/* Testimonials */
.testimonial-card {
  background: var(--bg-252);
  border-radius: var(--radius-2xl);
  padding: 1.5rem;
  cursor: default;
  transition: transform 0.3s, box-shadow 0.3s;
}
.testimonial-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}
.avatar { flex-shrink: 0; }

/* Newsletter form */
.newsletter-form input { width: 100%; border: none; }

/* FAQ - animation handled by .fade-in-* .visible */
.faq-item { }

/* ===== ABOUT THE AUTHOR ===== */
.about-author {
  background-color: var(--bg-111);
  perspective: 1200px;
}
.about-author-grid {
  display: grid;
  gap: 2rem;
}
@media (min-width: 768px) {
  .about-author-grid {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
  }
}
.about-author-image-wrap {
  transform-style: preserve-3d;
}
.about-author .fade-in-left {
  transform: translateX(-80px) rotateY(-15deg);
}
.about-author .fade-in-left.visible {
  transform: translateX(0) rotateY(0);
}
.about-author .fade-in-right {
  transform: translateX(80px) rotateY(15deg);
}
.about-author .fade-in-right.visible {
  transform: translateX(0) rotateY(0);
}
.author-img-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-2xl);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06);
  transition: transform 0.5s var(--ease-out-expo), box-shadow 0.4s;
  transform-style: preserve-3d;
}
.author-img-frame:hover {
  transform: scale(1.02) rotateY(-3deg);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(255, 255, 255, 0.04);
}
.author-img {
  display: block;
  vertical-align: middle;
}
.author-name {
  color: var(--white);
  line-height: 1.2;
}
.about-author-bio {
  max-width: 42rem;
  margin: 0 auto;
  text-align: center;
  padding: 2.5rem 2rem;
  border-radius: var(--radius-2xl);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}
@media (min-width: 768px) {
  .about-author-bio {
    padding: 3rem 3.5rem;
  }
}
.author-divider {
  width: 4rem;
  height: 2px;
  margin: 0 auto 2rem;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
}
.author-bio-text {
  color: var(--gray-400, #9ca3af);
  font-size: 1.0625rem;
  line-height: 1.85;
  margin-bottom: 1.5rem;
}
.author-bio-text:last-child {
  margin-bottom: 0;
}
.about-author-content .btn-primary {
  text-decoration: none;
  display: inline-block;
  text-align: center;
}
.flex-wrap { flex-wrap: wrap; }

/* ===== CONTACT US SECTION ===== */
.contact-section {
  background-color: var(--bg-111);
  perspective: 1200px;
}
.contact-grid {
  display: grid;
  gap: 2rem;
}
@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
  }
}
.contact-section .fade-in-left {
  transform: translateX(-80px) rotateY(-15deg);
}
.contact-section .fade-in-left.visible {
  transform: translateX(0) rotateY(0);
}
.contact-section .fade-in-right {
  transform: translateX(80px) rotateY(15deg);
}
.contact-section .fade-in-right.visible {
  transform: translateX(0) rotateY(0);
}
.contact-info-card {
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.contact-info-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}
.contact-icon svg {
  width: 100%;
  height: 100%;
}
.contact-form .contact-input {
  display: block;
}
.contact-form .contact-input:focus {
  border-color: rgba(255, 255, 255, 0.2);
}
textarea.contact-input {
  min-height: 120px;
  resize: vertical;
}
.contact-form-wrap .btn-primary {
  min-width: 160px;
}

/* Footer */
.footer { background-color: var(--bg-dark); }
.footer-card { background: transparent; }
.footer-link {
  cursor: pointer;
  transition: color 0.2s;
  color: inherit;
  text-decoration: none;
  display: block;
}
.footer-link:hover { color: var(--white); }
.footer-bottom a { color: inherit; text-decoration: none; }

/* Grid */
.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }

/* ===== FADE ANIMATIONS (initial state; JS adds .visible) ===== */
.fade-in-up,
.fade-in-left,
.fade-in-right {
  opacity: 0;
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}
.fade-in-up { transform: translateY(60px) scale(0.95); }
.fade-in-left { transform: translateX(-80px); }
.fade-in-right { transform: translateX(80px); }
.fade-in-up.visible { opacity: 1; transform: translateY(0) scale(1); }
.fade-in-left.visible { opacity: 1; transform: translateX(0); }
.fade-in-right.visible { opacity: 1; transform: translateX(0); }

/* ===== RESPONSIVE ===== */
@media (min-width: 768px) {
  .md\:text-8xl { font-size: 6rem; }
  .md\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .md\:text-5xl { font-size: 3rem; }
  .md\:text-6xl { font-size: 3.75rem; }
  .md\:flex-row { flex-direction: row; }
  .md\:p-10 { padding: 2.5rem; }
}

@media (max-width: 767px) {
  .hero-tabs { flex-wrap: wrap; }
  .hero-tab { flex: 1 1 50%; min-width: 120px; }
  .newsletter-form { width: 100%; }
  .footer-card .grid { grid-template-columns: 1fr; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #555; }
