/* =========================================================
   David Elian Belei — Official Author Website
   Colours sampled from the current site
   ========================================================= */
:root {
  --bg:          #111524;   /* main navy */
  --bg-deep:     #0d101c;   /* darker panels */
  --bg-alt:      #151a2b;   /* alternate sections */
  --bg-teal:     #16202a;   /* manuscripts section tint */
  --gold:        #c5ab6e;   /* accent / buttons */
  --gold-soft:   rgba(197,171,110,.55);
  --text:        #f2efe8;   /* headings */
  --body:        #b9bcc7;   /* paragraphs */
  --muted:       #7d8293;   /* small labels */
  --line:        rgba(255,255,255,.09);
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans:  "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 72px; /* room for sticky CTA */
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; color: var(--text); margin: 0; letter-spacing: .005em; }
em { font-style: italic; }
.hidden { display: none; }

.container { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 40px; }
.narrow { max-width: 760px; }
.center { text-align: center; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  height: 80px; padding: 0 40px;
  background: rgba(17,21,36,.92);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-family: var(--serif); font-size: 20px; letter-spacing: .18em; text-transform: uppercase; color: var(--text); }
.brand-sub  { font-size: 10px; letter-spacing: .32em; text-transform: uppercase; color: var(--body); margin-top: 4px; }
.menu-toggle {
  width: 40px; height: 40px; background: none; border: 0; cursor: pointer;
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
}
.menu-toggle span { width: 18px; height: 1.5px; background: var(--text); transition: .3s; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
.progress-bar { position: absolute; left: 0; bottom: -1px; height: 1.5px; width: 0; background: var(--gold); }

.site-nav {
  position: fixed; inset: 80px 0 0 0; z-index: 49;
  background: rgba(13,16,28,.98);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity .35s, visibility .35s;
}
.site-nav.open { opacity: 1; visibility: visible; }
.site-nav ul { list-style: none; margin: 0; padding: 0; text-align: center; }
.site-nav li { margin: 18px 0; }
.site-nav a { font-family: var(--serif); font-size: clamp(28px, 5vw, 42px); color: var(--text); transition: color .2s; }
.site-nav a:hover { color: var(--gold); }

/* ---------- Type helpers ---------- */
.eyebrow {
  font-size: 12px; font-weight: 500; letter-spacing: .32em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 28px;
}
.eyebrow-line { display: flex; align-items: center; gap: 16px; }
.eyebrow-line::before { content: ""; width: 48px; height: 1px; background: var(--gold-soft); flex: none; }
.eyebrow-center { display: flex; align-items: center; justify-content: center; gap: 16px; }
.eyebrow-center::before, .eyebrow-center::after { content: ""; width: 48px; height: 1px; background: var(--gold-soft); }
.label { display: block; font-size: 11px; letter-spacing: .28em; text-transform: uppercase; color: var(--muted); }
.kicker { font-size: 12px; letter-spacing: .28em; text-transform: uppercase; color: #a08b5b; margin: 48px 0 10px; }
.title-lg { font-size: clamp(36px, 5vw, 52px); line-height: 1.1; }
.title-xl { font-size: clamp(38px, 5.5vw, 56px); line-height: 1.12; margin-bottom: 20px; }
.title-xl em, .hook-title em { color: var(--gold); }
.section-lead { font-size: 17px; color: var(--body); max-width: 640px; margin: 0 0 40px; }
.center .section-lead, .section-lead.center { margin-left: auto; margin-right: auto; }
.muted-italic { font-style: italic; color: var(--muted); font-size: 15px; margin-top: -20px; }
.gold { color: var(--gold) !important; }

.rule { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
.rule-gold {
  border: 0; height: 1px; margin: 40px 0;
  background: linear-gradient(90deg, transparent, var(--gold-soft) 50%, transparent);
}

/* ---------- Buttons ---------- */
.btn-row { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 36px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 17px 32px; font-family: var(--sans); font-size: 14px; font-weight: 500;
  letter-spacing: .2em; text-transform: uppercase; cursor: pointer;
  border: 1px solid transparent; transition: background .25s, color .25s, border-color .25s;
}
.btn-gold { background: var(--gold); color: #1a1a22; border-color: var(--gold); }
.btn-gold:hover { background: #d6be86; }
.btn-outline { border-color: rgba(255,255,255,.25); color: var(--text); background: transparent; }
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }
.btn-block { width: 100%; }
.link-arrow {
  display: inline-flex; align-items: center; gap: 12px; margin-top: 12px;
  font-size: 12px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--body);
  transition: color .2s;
}
.link-arrow::after { content: ""; width: 16px; height: 1px; background: currentColor; transition: width .25s; }
.link-arrow:hover { color: var(--gold); }
.link-arrow:hover::after { width: 28px; }

/* ---------- Sections ---------- */
.section { padding: 120px 0; position: relative; }
.section-alt { background: var(--bg-deep); }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh; position: relative; overflow: hidden;
  display: flex; align-items: flex-end; padding: 140px 0 160px;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 85% 20%, rgba(70,90,130,.28), transparent 70%),
    radial-gradient(ellipse 60% 40% at 10% 90%, rgba(40,50,80,.35), transparent 70%),
    linear-gradient(180deg, #151b2e 0%, #111524 60%, #0f1321 100%);
}
.hero-inner { position: relative; z-index: 1; }
.hero-title { font-size: clamp(42px, 6.4vw, 70px); line-height: 1.08; max-width: 780px; margin-bottom: 30px; }
.hero-lead { font-size: 18px; max-width: 580px; margin: 0; }
.flagship-note { margin-top: 70px; padding-left: 16px; border-left: 1px solid var(--line); }
.flagship-note .label { font-size: 11px; margin-bottom: 4px; }
.flagship-note em { font-family: var(--serif); font-size: 18px; color: #a08b5b; }
.scroll-cue {
  position: absolute; left: 50%; bottom: 40px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted);
}
.scroll-cue i { width: 1px; height: 36px; background: linear-gradient(var(--muted), transparent); animation: drip 2s infinite; }
@keyframes drip { 0%{transform:scaleY(0);transform-origin:top} 50%{transform:scaleY(1);transform-origin:top} 51%{transform-origin:bottom} 100%{transform:scaleY(0);transform-origin:bottom} }

/* ---------- Covers & media ---------- */
.cover-frame { margin: 0; }
.cover-frame img { width: 100%; box-shadow: 0 30px 80px rgba(0,0,0,.45); }
#experience .cover-frame { margin: 50px 0 40px; }

.synopsis p { margin: 0 0 16px; font-size: 17px; }
.lead-italic { font-family: var(--serif); font-style: italic; font-size: 26px !important; color: var(--text); }

.meta-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px;
  margin: 40px 0 0; padding-top: 30px; border-top: 1px solid var(--line);
}
.meta-grid dt { font-size: 11px; letter-spacing: .28em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.meta-grid dd { margin: 0; color: var(--text); font-size: 15px; line-height: 1.5; }

.video-frame {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  border: 1px solid var(--line); background: #000;
  box-shadow: 0 30px 80px rgba(0,0,0,.5);
}
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Hook ---------- */
.hook { position: relative; min-height: 90vh; display: flex; align-items: center; overflow: hidden; }
.hook-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 35% 50%, rgba(80,95,125,.18) 0 22%, transparent 23%),
    radial-gradient(circle at 35% 50%, transparent 0 30%, rgba(60,72,100,.12) 30.5% 31%, transparent 31.5%),
    radial-gradient(ellipse 50% 60% at 75% 45%, rgba(140,110,70,.10), transparent 70%),
    #0f1220;
}
.hook-inner { position: relative; text-align: center; }
.hook-title { font-size: clamp(40px, 6vw, 64px); line-height: 1.12; margin-bottom: 26px; }
.hook-lead { font-size: 18px; max-width: 540px; margin: 0 auto; }
.dots { display: flex; gap: 9px; justify-content: center; margin-top: 40px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.18); animation: pulse 3s infinite; }
.dots i:nth-child(n) { animation-delay: calc(var(--d, 0) * 1s); }
@keyframes pulse { 0%,100%{background:rgba(255,255,255,.15)} 50%{background:var(--gold)} }

/* ---------- Stories grid ---------- */
.stories { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-teal) 30%, var(--bg-teal) 100%); }
.book-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 70px 48px; }
.book-img { position: relative; aspect-ratio: 2 / 3; overflow: hidden; margin-bottom: 26px; background: #0b0e17; }
.book-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.book-card:hover .book-img img { transform: scale(1.03); }
.badge {
  position: absolute; top: 20px; right: 16px; padding: 4px 12px;
  background: rgba(197,171,110,.85); color: #1a1a22;
  font-size: 10px; letter-spacing: .2em; text-transform: uppercase;
}
.book-card h3 { font-size: 28px; margin-bottom: 10px; }
.genre { font-size: 11px; letter-spacing: .25em; text-transform: uppercase; color: #a08b5b; margin: 0 0 16px; }
.book-card p { font-size: 16px; margin: 0 0 16px; }

/* ---------- World list ---------- */
.world-list { list-style: none; padding: 0; margin: 0; }
.world-list li { border-left: 1px solid var(--line); padding: 18px 0 18px 24px; margin-bottom: 24px; }
.world-list .num { font-size: 11px; letter-spacing: .2em; color: var(--muted); }
.world-list h3 { font-size: 26px; margin: 8px 0; }
.world-list p { margin: 0; font-size: 15px; }

/* ---------- Countdown ---------- */
.countdown { margin: 60px 0 50px; }
.countdown-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.countdown-num { font-family: var(--serif); color: var(--muted); font-size: 18px; }
.countdown-num b { font-weight: 400; font-size: 44px; color: var(--gold); margin-right: 4px; }
.countdown-track { height: 1px; background: var(--line); }
.countdown-fill { height: 2px; margin-top: -1px; width: 10%; background: var(--gold); transition: width 1s ease; }
.countdown-note { font-style: italic; font-size: 13px; color: var(--muted); margin: 12px 0 0; }

.question-box { margin: 0; padding: 44px 40px; border: 1px solid var(--line); }
.question-box .label { color: #8f7d55; margin-bottom: 16px; }
.question-box p { font-family: var(--serif); font-style: italic; font-size: clamp(24px, 3vw, 32px); line-height: 1.35; color: var(--text); margin: 0; }

/* ---------- Subscribe ---------- */
.subscribe {
  background:
    radial-gradient(ellipse 50% 70% at 0% 20%, rgba(90,35,35,.25), transparent 70%),
    radial-gradient(ellipse 50% 70% at 100% 90%, rgba(80,60,35,.18), transparent 70%),
    var(--bg-alt);
}
.form { text-align: left; max-width: 460px; margin: 0 auto; }
.form-wide { max-width: none; margin: 40px 0 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.field { display: block; margin-bottom: 26px; }
.field span { display: block; font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--body); margin-bottom: 8px; }
.field input, .field textarea {
  width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--line);
  padding: 12px 4px; color: var(--text); font: inherit; font-size: 17px; outline: none;
  transition: border-color .2s; resize: vertical;
}
.field textarea { min-height: 130px; }
.field input::placeholder, .field textarea::placeholder { color: #5b6072; }
.field input:focus, .field textarea:focus { border-bottom-color: var(--gold); }
.fine { font-size: 12px; color: var(--muted); text-align: center; margin-top: 18px; }

/* ---------- About ---------- */
.about { background: linear-gradient(180deg, var(--bg) 0%, #161a2c 60%, #1a1d2e 100%); }
.author-photo { margin: 0 0 40px; max-width: 420px; }
.author-photo img { width: 100%; }
.timeline { list-style: none; padding: 0; margin: 60px 0; border-left: 1px solid var(--line); }
.timeline li { position: relative; padding: 0 0 44px 48px; max-width: 620px; }
.timeline li::before {
  content: ""; position: absolute; left: -6px; top: 4px; width: 11px; height: 11px;
  border: 1px solid var(--muted); background: var(--bg);
}
.timeline .label { color: #8f7d55; margin-bottom: 8px; }
.timeline h3 { font-size: 26px; margin-bottom: 10px; }
.timeline p { margin: 0; font-size: 16px; }
.wide-img { margin: 20px 0 0; }
.wide-img img { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; }
.about-close { padding: 40px 0 0 48px; border-top: 1px solid var(--line); margin-top: 30px; }
.quote-italic { font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--body); max-width: 480px; margin: 0 0 28px; }

/* ---------- Themes ---------- */
.theme-grid { list-style: none; padding: 0; margin: 60px 0 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.theme-grid li {
  position: relative; padding: 36px 40px; border: 1px solid var(--line);
  font-family: var(--serif); font-size: 36px; color: var(--text);
  transition: border-color .3s, color .3s;
}
.theme-grid li:hover { border-color: var(--gold-soft); color: var(--gold); }
.theme-grid span { position: absolute; top: 14px; right: 16px; font-family: var(--sans); font-size: 10px; color: var(--muted); }

/* ---------- Projects ---------- */
.project-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.project-card { padding: 44px 40px; border: 1px dashed rgba(255,255,255,.1); display: flex; flex-direction: column; }
.status { display: flex; align-items: center; gap: 10px; font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: #8f7d55; margin-bottom: 20px; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #8f7d55; }
.project-card h3 { font-size: 30px; line-height: 1.2; margin-bottom: 18px; }
.project-card p { font-size: 15px; margin: 0 0 30px; flex: 1; }
.avail { padding-top: 26px; border-top: 1px solid var(--line); font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }

/* ---------- Contact ---------- */
.mail-link { display: inline-flex; align-items: center; gap: 16px; font-size: 18px; color: var(--text); }
.mail-link svg { color: var(--gold); }
.mail-link:hover { color: var(--gold); }
.suitable { list-style: none; padding: 0; margin: 14px 0 0; }
.suitable li { font-size: 16px; color: var(--body); margin: 4px 0; }

/* ---------- Footer ---------- */
.site-footer { position: relative; overflow: hidden; border-top: 1px solid var(--line); padding: 80px 0 30px; background: var(--bg); }
.footer-watermark {
  position: absolute; left: 50%; top: 20px; transform: translateX(-50%);
  font-family: var(--serif); font-size: clamp(120px, 22vw, 260px); letter-spacing: .05em;
  color: rgba(255,255,255,.03); pointer-events: none; white-space: nowrap;
}
.footer-inner { position: relative; display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 30px; }
.footer-name { font-family: var(--serif); font-size: 38px; color: var(--text); margin: 0 0 8px; }
.footer-tag { margin: 0; font-size: 16px; }
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px 32px; max-width: 480px; }
.footer-links a { font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: var(--body); }
.footer-links a:hover { color: var(--gold); }
.footer-bottom { position: relative; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 60px; font-size: 12px; color: var(--muted); }

/* ---------- Sticky CTA ---------- */
.sticky-cta {
  position: fixed; left: 20px; right: 20px; bottom: 20px; z-index: 40;
  display: flex; align-items: center; justify-content: center; height: 52px;
  background: var(--gold); color: #1a1a22;
  font-size: 14px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase;
  box-shadow: 0 10px 30px rgba(0,0,0,.4);
  transform: translateY(120%); transition: transform .4s ease, background .2s;
}
.sticky-cta.show { transform: translateY(0); }
.sticky-cta:hover { background: #d6be86; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s ease, transform .9s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .scroll-cue i, .dots i { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .meta-grid { grid-template-columns: 1fr; gap: 20px; }
  .project-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .container, .site-header { padding-left: 20px; padding-right: 20px; }
  .site-header { height: 70px; }
  .site-nav { inset: 70px 0 0 0; }
  .brand-name { font-size: 16px; }
  .brand-sub { font-size: 9px; }
  .section { padding: 80px 0; }
  .book-grid { grid-template-columns: 1fr; gap: 56px; }
  .theme-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .theme-grid li { padding: 26px 20px; font-size: 26px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .btn { width: 100%; padding: 16px 20px; font-size: 13px; }
  .timeline li { padding-left: 32px; }
  .about-close { padding-left: 0; }
  .question-box { padding: 30px 22px; }
  .footer-links { justify-content: flex-start; }
  .sticky-cta { left: 12px; right: 12px; bottom: 12px; }
}

/* ---------- Book readers-list popup ---------- */
button.link-arrow { background: none; border: 0; padding: 0; cursor: pointer; font-family: var(--sans); }
.join-btn { color: var(--gold); }
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(5,7,14,.82); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.modal-box {
  position: relative; width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto;
  background: var(--bg-alt); border: 1px solid var(--line); padding: 48px 40px 36px;
  box-shadow: 0 40px 100px rgba(0,0,0,.6); animation: pop .35s ease;
}
@keyframes pop { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.modal-close { position: absolute; top: 12px; right: 16px; background: none; border: 0; color: var(--muted); font-size: 32px; line-height: 1; cursor: pointer; }
.modal-close:hover { color: var(--gold); }
.modal-box .eyebrow { margin-bottom: 18px; }
.modal-title { font-family: var(--serif); font-size: 34px; line-height: 1.15; color: var(--text); margin: 0 0 14px; }
.modal-title em { color: var(--gold); }
.modal-text { margin: 0 0 28px; font-size: 16px; }
.modal-box .form { max-width: none; }
@media (max-width: 640px) { .modal-box { padding: 44px 22px 28px; } .modal-title { font-size: 28px; } }
