/* =========================================================================
   subhan — psychological thriller author
   Dark cinematic theme · self-contained premium CSS
   ========================================================================= */

:root {
  --bg: #08080d;
  --bg-2: #0d0d15;
  --bg-3: #12121d;
  --panel: rgba(255, 255, 255, 0.03);
  --panel-brd: rgba(255, 255, 255, 0.08);
  --ink: #f4f2f8;
  --ink-soft: #b7b4c6;
  --ink-mute: #7d7a90;
  --gold: #c9a86a;
  --violet: #8f7dff;
  --rose: #ff8fb0;
  --accent: var(--violet);
  --ok: #79e0b8;
  --warn: #ff9a8a;

  --max: 1200px;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
  --shadow-soft: 0 20px 50px -25px rgba(0, 0, 0, 0.65);

  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;

  --step--1: clamp(0.8rem, 0.77rem + 0.15vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.12rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.5vw, 1.5rem);
  --step-2: clamp(1.6rem, 1.35rem + 1.2vw, 2.4rem);
  --step-3: clamp(2.2rem, 1.7rem + 2.4vw, 3.4rem);
  --step-4: clamp(3rem, 2rem + 4.8vw, 5.6rem);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}

a { color: inherit; text-decoration: none; }

h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 600; line-height: 1.05; letter-spacing: -0.01em; }

img { max-width: 100%; display: block; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- shared ---------- */
.eyebrow {
  font-family: var(--sans);
  font-size: var(--step--1);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin: 0 0 1rem;
}

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(4.5rem, 3rem + 6vw, 9rem) clamp(1.25rem, 5vw, 3rem);
}

.section__head { max-width: 660px; margin: 0 auto clamp(2.5rem, 5vw, 4rem); text-align: center; }
.section__title { font-size: var(--step-3); }
.section__sub { color: var(--ink-soft); margin: 1.1rem 0 0; font-size: var(--step-1); font-family: var(--serif); font-style: italic; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 1.7rem;
  border-radius: 999px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: var(--step--1);
  letter-spacing: 0.03em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s, background 0.3s, color 0.3s, border-color 0.3s;
  will-change: transform;
}
.btn--primary {
  background: linear-gradient(120deg, var(--violet), #b39bff);
  color: #0b0a12;
  box-shadow: 0 14px 34px -14px rgba(143, 125, 255, 0.7);
}
.btn--primary:hover { transform: translateY(-3px); box-shadow: 0 22px 46px -14px rgba(143, 125, 255, 0.85); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--panel-brd); }
.btn--ghost:hover { transform: translateY(-3px); border-color: rgba(255,255,255,0.28); background: var(--panel); }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  transition: background 0.4s, backdrop-filter 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(8, 8, 13, 0.78);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--panel-brd);
}
.nav__inner {
  max-width: var(--max); margin: 0 auto;
  padding: 1rem clamp(1.25rem, 5vw, 3rem);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand { display: inline-flex; align-items: center; gap: 0.7rem; }
.brand__mark {
  width: 38px; height: 38px; border-radius: 10px;
  display: grid; place-items: center;
  font-family: var(--serif); font-weight: 700; font-size: 1.35rem;
  color: #0b0a12;
  background: linear-gradient(135deg, var(--gold), #ead9b0);
  box-shadow: 0 8px 22px -10px rgba(201, 168, 106, 0.8);
}
.brand__name {
  font-family: var(--serif); font-size: 1.35rem; font-weight: 600;
  letter-spacing: 0.02em; text-transform: capitalize;
}
.nav__links { display: flex; align-items: center; gap: 2rem; }
.nav__links a {
  font-size: var(--step--1); color: var(--ink-soft); font-weight: 500;
  letter-spacing: 0.04em; position: relative; transition: color 0.25s;
}
.nav__links a:not(.nav__cta)::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 1px; width: 0;
  background: var(--gold); transition: width 0.3s;
}
.nav__links a:not(.nav__cta):hover { color: var(--ink); }
.nav__links a:not(.nav__cta):hover::after { width: 100%; }
.nav__cta {
  padding: 0.55rem 1.15rem; border: 1px solid var(--panel-brd);
  border-radius: 999px; color: var(--ink) !important;
  transition: background 0.3s, border-color 0.3s;
}
.nav__cta:hover { background: var(--panel); border-color: rgba(255,255,255,0.28); }

.nav__toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: 0; cursor: pointer; padding: 8px;
}
.nav__toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.3s, opacity 0.3s; }
.nav__toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.is-active span:nth-child(2) { opacity: 0; }
.nav__toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  min-height: 92vh; display: grid; place-items: center;
  padding: 6rem clamp(1.25rem, 5vw, 3rem) 5rem;
  background:
    radial-gradient(120% 90% at 78% 8%, rgba(143,125,255,0.20), transparent 55%),
    radial-gradient(90% 70% at 12% 92%, rgba(255,143,176,0.14), transparent 55%),
    linear-gradient(180deg, #0a0a12 0%, var(--bg) 60%);
}
.hero__glow {
  position: absolute; inset: -30% 20% auto auto; width: 60vw; height: 60vw; max-width: 720px; max-height: 720px;
  background: radial-gradient(circle, rgba(143,125,255,0.28), transparent 62%);
  filter: blur(30px); pointer-events: none;
  animation: float 14s ease-in-out infinite alternate;
}
@keyframes float { to { transform: translate(-4%, 6%) scale(1.08); } }
.hero__grain {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.5; mix-blend-mode: overlay;
  background-image:
    repeating-linear-gradient(115deg, rgba(255,255,255,0.02) 0 1px, transparent 1px 4px);
}
.hero__inner { position: relative; max-width: 880px; text-align: center; }
.hero__title {
  font-size: var(--step-4); font-weight: 600; line-height: 0.98; margin: 0.4rem 0 1.4rem;
}
.hero__title em {
  font-style: italic; font-weight: 500;
  background: linear-gradient(120deg, var(--gold), #f0e0bd 40%, var(--violet));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__lede {
  color: var(--ink-soft); font-size: var(--step-1); max-width: 620px; margin: 0 auto 2.2rem;
  font-family: var(--serif); font-style: italic;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.hero__stats {
  display: flex; flex-wrap: wrap; gap: clamp(1.5rem, 5vw, 3.5rem); justify-content: center;
  margin-top: 3.5rem; padding-top: 2rem; border-top: 1px solid var(--panel-brd);
}
.hero__stats div { display: flex; flex-direction: column; }
.hero__stats strong { font-family: var(--serif); font-size: var(--step-2); color: var(--ink); line-height: 1; }
.hero__stats span { font-size: var(--step--1); color: var(--ink-mute); letter-spacing: 0.14em; text-transform: uppercase; margin-top: 0.4rem; }
.hero__scroll {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  width: 26px; height: 42px; border: 1px solid var(--panel-brd); border-radius: 14px;
  display: grid; place-items: start center; padding-top: 8px;
}
.hero__scroll span { width: 3px; height: 8px; border-radius: 3px; background: var(--gold); animation: scrolldot 1.8s ease-in-out infinite; }
@keyframes scrolldot { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

/* ---------- books ---------- */
.books__grid {
  display: grid; gap: clamp(1.5rem, 3vw, 2.4rem);
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.book {
  background: var(--panel); border: 1px solid var(--panel-brd);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 0.4s cubic-bezier(0.2,0.8,0.2,1), box-shadow 0.4s, border-color 0.4s;
}
.book:hover { transform: translateY(-8px); box-shadow: var(--shadow); border-color: rgba(255,255,255,0.16); }
.book__cover {
  position: relative; aspect-ratio: 3 / 4; overflow: hidden;
  display: flex; align-items: flex-end;
}
.book__spine { position: absolute; left: 0; top: 0; bottom: 0; width: 12px; background: rgba(0,0,0,0.28); box-shadow: inset -4px 0 8px rgba(0,0,0,0.4); }
.book__sheen {
  position: absolute; inset: 0;
  background: linear-gradient(125deg, rgba(255,255,255,0.16) 0%, transparent 34%, transparent 66%, rgba(255,255,255,0.06) 100%);
  transform: translateX(-100%); transition: transform 0.9s ease;
}
.book:hover .book__sheen { transform: translateX(100%); }
.book__coverText {
  position: relative; z-index: 2; padding: 1.6rem 1.4rem 1.5rem 1.9rem;
  display: flex; flex-direction: column; gap: 0.35rem;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.55));
  width: 100%;
}
.book__coverGenre { font-size: 0.68rem; letter-spacing: 0.22em; text-transform: uppercase; font-weight: 700; }
.book__coverTitle { font-family: var(--serif); font-size: 1.55rem; font-weight: 600; line-height: 1.05; color: #fff; text-shadow: 0 2px 18px rgba(0,0,0,0.5); }
.book__coverAuthor { font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255,255,255,0.72); }
.book__body { padding: 1.5rem 1.5rem 1.7rem; display: flex; flex-direction: column; gap: 0.7rem; flex: 1; }
.book__genre { font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 700; }
.book__title { font-size: var(--step-1); }
.book__blurb { color: var(--ink-soft); font-size: 0.94rem; margin: 0; flex: 1; }
.book__link {
  font-size: var(--step--1); font-weight: 600; color: var(--ink);
  display: inline-flex; align-items: center; gap: 0.4rem; margin-top: 0.3rem;
}
.book__link span { transition: transform 0.3s; color: var(--gold); }
.book__link:hover span { transform: translateX(5px); }

/* ---------- about ---------- */
.about { position: relative; }
.about__grid {
  display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
}
.about__portrait { position: relative; display: grid; place-items: center; }
.about__avatar {
  position: relative; z-index: 2;
  width: min(320px, 78%); aspect-ratio: 1; border-radius: 26px;
  display: grid; place-items: center;
  font-family: var(--serif); font-size: clamp(6rem, 14vw, 10rem); font-weight: 600; color: #0b0a12;
  background:
    radial-gradient(120% 120% at 30% 20%, #eadfc4 0%, var(--gold) 45%, #9d7f45 100%);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,0.14);
}
.about__portraitGlow {
  position: absolute; inset: 6% ; border-radius: 30px;
  background: radial-gradient(circle at 70% 80%, rgba(143,125,255,0.5), transparent 60%);
  filter: blur(40px); z-index: 1;
}
.about__content p { color: var(--ink-soft); margin: 1rem 0; }
.about__list { list-style: none; margin: 1.6rem 0; padding: 0; display: grid; gap: 0.7rem; }
.about__list li { display: flex; align-items: center; gap: 0.7rem; color: var(--ink); }
.about__list span { color: var(--gold); }
.about .btn { margin-top: 0.8rem; }

/* ---------- praise ---------- */
.praise { background: linear-gradient(180deg, transparent, rgba(143,125,255,0.04), transparent); }
.praise__grid {
  display: grid; gap: clamp(1.25rem, 3vw, 2rem);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.quote {
  position: relative; background: var(--panel); border: 1px solid var(--panel-brd);
  border-radius: var(--radius); padding: 2.4rem 1.9rem 1.9rem;
  transition: transform 0.4s, border-color 0.4s;
}
.quote:hover { transform: translateY(-6px); border-color: rgba(255,255,255,0.16); }
.quote__mark { position: absolute; top: 0.2rem; left: 1.2rem; font-family: var(--serif); font-size: 5rem; color: var(--violet); opacity: 0.35; line-height: 1; }
.quote blockquote { margin: 0.4rem 0 1.2rem; font-family: var(--serif); font-style: italic; font-size: 1.28rem; line-height: 1.5; color: var(--ink); }
.quote figcaption { font-size: var(--step--1); color: var(--gold); letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600; }

/* ---------- newsletter ---------- */
.newsletter__card {
  position: relative; overflow: hidden;
  max-width: var(--max); margin: 0 auto;
  border-radius: calc(var(--radius) + 6px); border: 1px solid var(--panel-brd);
  padding: clamp(2.2rem, 4vw, 3.8rem);
  display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(1.8rem, 4vw, 3.5rem); align-items: center;
  background:
    radial-gradient(120% 130% at 88% 10%, rgba(143,125,255,0.18), transparent 55%),
    linear-gradient(150deg, var(--bg-3), var(--bg-2));
  box-shadow: var(--shadow);
}
.newsletter__glow { position: absolute; inset: auto -10% -40% auto; width: 40vw; height: 40vw; max-width: 460px; background: radial-gradient(circle, rgba(255,143,176,0.22), transparent 60%); filter: blur(30px); }
.newsletter__text { position: relative; }
.newsletter__text p:not(.eyebrow) { color: var(--ink-soft); margin: 1rem 0 0; }
.newsletter__form { position: relative; display: flex; flex-wrap: wrap; gap: 0.8rem; }
.newsletter__form input {
  flex: 1 1 220px; min-width: 0;
  padding: 0.95rem 1.2rem; border-radius: 999px;
  background: rgba(0,0,0,0.35); border: 1px solid var(--panel-brd); color: var(--ink);
  font-size: var(--step-0); font-family: var(--sans);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.newsletter__form input:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px rgba(143,125,255,0.22); }
.newsletter__note { flex-basis: 100%; margin: 0.2rem 0 0; font-size: var(--step--1); min-height: 1.2em; }

/* ---------- contact ---------- */
.contact__form {
  max-width: 760px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem;
}
.field { display: flex; flex-direction: column; gap: 0.5rem; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: var(--step--1); color: var(--ink-soft); letter-spacing: 0.06em; font-weight: 500; }
.field input, .field textarea {
  padding: 0.9rem 1.1rem; border-radius: var(--radius-sm);
  background: rgba(0,0,0,0.35); border: 1px solid var(--panel-brd); color: var(--ink);
  font-family: var(--sans); font-size: var(--step-0); resize: vertical;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px rgba(143,125,255,0.2); }
.contact__actions { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.contact__note { margin: 0; font-size: var(--step--1); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--panel-brd); background: var(--bg-2); }
.footer__inner {
  max-width: var(--max); margin: 0 auto;
  padding: 3rem clamp(1.25rem, 5vw, 3rem);
  display: grid; grid-template-columns: auto 1fr auto; gap: 1.6rem; align-items: center;
}
.footer__brand { display: inline-flex; align-items: center; gap: 0.7rem; }
.footer__links { display: flex; flex-wrap: wrap; gap: 1.4rem; justify-content: center; }
.footer__links a { color: var(--ink-soft); font-size: var(--step--1); transition: color 0.25s; }
.footer__links a:hover { color: var(--ink); }
.footer__meta { text-align: right; }
.footer__meta p { margin: 0; color: var(--ink-mute); font-size: var(--step--1); }
.footer__credit { margin-top: 0.35rem !important; }
.footer__credit a { color: var(--gold); font-weight: 600; border-bottom: 1px solid transparent; transition: border-color 0.25s; }
.footer__credit a:hover { border-bottom-color: var(--gold); }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2,0.8,0.2,1); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .about__grid { grid-template-columns: 1fr; }
  .about__portrait { max-width: 320px; margin: 0 auto; }
  .newsletter__card { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .footer__meta { text-align: center; }
}

@media (max-width: 720px) {
  .nav__toggle { display: flex; }
  .nav__links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(10, 10, 16, 0.97); backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--panel-brd);
    padding: 0.5rem 1.25rem 1.25rem;
    clip-path: inset(0 0 100% 0); opacity: 0; pointer-events: none;
    transition: clip-path 0.4s ease, opacity 0.3s ease;
  }
  .nav__links.is-open { clip-path: inset(0 0 0 0); opacity: 1; pointer-events: auto; }
  .nav__links a { padding: 0.85rem 0.4rem; border-bottom: 1px solid var(--panel-brd); }
  .nav__links a:not(.nav__cta)::after { display: none; }
  .nav__cta { text-align: center; margin-top: 0.8rem; padding: 0.8rem; }
  .contact__form { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .hero__cta { flex-direction: column; }
  .hero__cta .btn { width: 100%; }
}
