/* ============================================================
   ARRON JOHNSON — personal site
   Light-editorial brand · split-spine layout
   ============================================================ */

/* ---------- DESIGN TOKENS ---------- */
:root {
  /* Light-editorial palette (brand guide §2.1, light-mode inversion) */
  --bg:          #ffffff;
  --bg-alt:      #f5f0e8;   /* off-white */
  --ink:         #1b1b1b;   /* primary dark */
  --ink-2:       #2e2e2e;   /* charcoal */
  --muted:       #6f6a60;   /* warm gray for secondary text */
  --gold:        #c9a227;   /* gold accent */
  --gold-deep:   #a8892e;   /* muted gold — hover/emphasis */
  --gold-soft:   rgba(201, 162, 39, 0.14);
  --line:        rgba(27, 27, 27, 0.12);
  --spine-bg:    #1b1b1b;
  --spine-ink:   #f5f0e8;

  /* Typography */
  --font-serif:   'Cormorant Garamond', Georgia, serif;
  --font-sans:    'DM Sans', system-ui, -apple-system, sans-serif;
  --font-display: 'Montserrat', var(--font-sans);

  /* Layout */
  --spine-w: 46px;
  --max-read: 540px;

  /* Spacing */
  --sp-sm: 16px;
  --sp-md: 24px;
  --sp-lg: 40px;
  --sp-xl: 64px;
  --sp-2xl: 96px;

  --ease: 260ms cubic-bezier(.4, 0, .2, 1);
}

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font-family: inherit; }
ul, ol, li { list-style: none; }

.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;
}
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ============================================================
   SPINE — fixed central navigation
   ============================================================ */
.spine {
  position: fixed;
  top: 0; bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: var(--spine-w);
  background: var(--spine-bg);
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0 26px;
}
.spine-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;   /* spread labels across the full height */
}
.spine-link {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  text-orientation: mixed;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 11px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--spine-ink);
  opacity: 0.5;
  transition: opacity var(--ease), color var(--ease);
}
.spine-link:hover { opacity: 1; color: var(--gold); }
.spine-link.active { opacity: 1; color: var(--gold); }

/* ============================================================
   CHAPTERS — fixed background + scrolling cover layers
   ============================================================ */
/* Each chapter pins a full-height background visual on the left half.
   Its cover sections scroll up over it: the first (cover-clear) is
   transparent, so the pinned bg shows through on the left while the
   text scrolls on the right; the second (cover-fill) is opaque and
   rises up to completely cover the bg — like Jason's sliding panels. */
.chapter { position: relative; }

.chapter-bg {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 50%;                 /* left half, up to the central spine */
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-right: calc(var(--spine-w) / 2);
  background: var(--ink);
  background-size: cover;
  background-position: center;
}
.chapter-flow {
  position: relative;
  z-index: 1;
  margin-top: -100vh;         /* pull the scrolling layer up over the bg */
}

/* Cover sections (the scrolling layer) */
.cover {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}
.cover-clear { background: transparent; }       /* lets the fixed bg show on the left */
.cover-fill  { background: var(--bg); }         /* opaque — covers the fixed bg */
.cover-fill.section-alt { background: var(--bg-alt); }
.cover-left  { grid-column: 1; }                /* empty cell; the bg shows through */

/* Left visual inside a cover-fill (Coaching / Books) — scrolls with the panel */
.panel-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-right: calc(var(--spine-w) / 2);
  background: var(--ink);
  background-size: cover;
  background-position: center;
}
.visual-word {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(52px, 9vw, 132px);
  line-height: 0.86;
  letter-spacing: -2px;
  text-align: center;
  color: rgba(201, 162, 39, 0.92);
  user-select: none;
  position: relative;
}
.visual-soon {
  display: block;
  font-size: 0.28em;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  font-style: normal;
  color: rgba(245, 240, 232, 0.6);
  margin-top: 0.4em;
  padding-left: 0.5em;
}
/* Per-section visual treatments (placeholders until photos arrive).
   To drop in a photo later: set background-image on the matching class. */
.visual-portrait {
  background-color: #1b1b1b;
  background-image: url('portrait.jpg');
  background-size: cover;
  background-position: center top;
}
.visual-coaching { background: var(--bg-alt); }
.visual-coaching .visual-word { color: var(--ink); -webkit-text-stroke: 0; }
.visual-podcast  { background: radial-gradient(120% 120% at 70% 30%, #2e2e2e 0%, #141414 75%); }
.visual-books    { background: linear-gradient(150deg, #c9a227 0%, #a8892e 100%); }
.visual-books .visual-word { color: #1b1b1b; }

/* Right content column */
.panel-content {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10vh 6vw 10vh calc(var(--spine-w) / 2 + 56px);
}
.content-inner { width: 100%; max-width: var(--max-read); }

/* ============================================================
   TYPOGRAPHY & COMPONENTS
   ============================================================ */
.eyebrow {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: var(--sp-md);
}
.eyebrow-sm { margin-top: var(--sp-xl); font-size: 11px; }

.display {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(32px, 4.4vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.5px;
  color: var(--ink);
  margin-bottom: var(--sp-lg);
}
.display-hero { font-size: clamp(36px, 5.2vw, 66px); }
.display em { font-style: italic; color: var(--gold-deep); }
.dropcap {
  float: left;
  font-family: var(--font-serif);
  font-style: normal;
  font-weight: 600;
  font-size: 1.15em;
  line-height: 0.72;
  color: var(--gold);
  padding: 0.06em 0.12em 0 0;
}

.prose p { color: var(--ink-2); margin-bottom: var(--sp-md); }
.prose p:last-child { margin-bottom: 0; }
.signature {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 24px;
  color: var(--gold-deep);
}

/* Contact */
.contact-list { margin-bottom: var(--sp-lg); }
.contact-list li { margin-bottom: 6px; }
.contact-list a {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--ink);
  border-bottom: 1px solid var(--gold-soft);
  transition: color var(--ease), border-color var(--ease);
}
.contact-list a:hover { color: var(--gold-deep); border-bottom-color: var(--gold); }

.socials { display: flex; gap: 14px; }
.socials a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  transition: color var(--ease), border-color var(--ease), background var(--ease);
}
.socials a:hover { color: var(--gold); border-color: var(--gold); background: var(--gold-soft); }

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: var(--bg);
  padding: 15px 28px;
  border-radius: 2px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.02em;
  transition: background var(--ease), color var(--ease), transform var(--ease);
}
.btn-primary:hover { background: var(--gold); color: var(--ink); }
.btn-arrow { transition: transform var(--ease); }
.btn-primary:hover .btn-arrow { transform: translateX(4px); }
.text-link {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  border-bottom: 2px solid var(--gold);
  padding-bottom: 2px;
  transition: color var(--ease);
}
.text-link:hover { color: var(--gold-deep); }

/* Coaching — 5 Rs */
.rs-list { margin: var(--sp-lg) 0 var(--sp-xl); }
.rs-list li {
  display: flex;
  gap: 20px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  align-items: baseline;
}
.rs-list li:last-child { border-bottom: 1px solid var(--line); }
.rs-num {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 26px;
  color: var(--gold);
  min-width: 42px;
}
.rs-list h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 22px;
  color: var(--ink);
  margin-bottom: 2px;
}
.rs-list p { font-size: 15px; color: var(--muted); line-height: 1.5; }

/* Podcast — show title + platform badges */
.podcast-coming {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
  margin-bottom: var(--sp-md);
}
.platform-badges {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: var(--sp-md) 0 var(--sp-sm);
}
.platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: .55;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 6px 10px;
  cursor: default;
  user-select: none;
}

/* Podcast — notify form */
.notify-form {
  display: flex;
  gap: 12px;
  margin: var(--sp-lg) 0 var(--sp-sm);
  flex-wrap: wrap;
}
.notify-form input {
  flex: 1;
  min-width: 220px;
  font-size: 16px;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1.5px solid var(--ink);
  padding: 12px 2px;
}
.notify-form input::placeholder { color: var(--muted); }
.notify-form input:focus { outline: none; border-bottom-color: var(--gold); }
.form-note { font-size: 13px; color: var(--muted); }
.form-note a { color: var(--gold-deep); border-bottom: 1px solid var(--gold-soft); }
.form-note.is-success { color: var(--gold-deep); font-weight: 600; }
.form-note.is-error { color: #b4452e; }

/* Books */
.book {
  display: flex;
  gap: 28px;
  margin-top: var(--sp-lg);
  padding-top: var(--sp-lg);
  border-top: 1px solid var(--line);
}
.book-cover {
  flex: none;
  width: 120px;
  height: 180px;
  object-fit: cover;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  box-shadow: 0 12px 30px rgba(27,27,27,0.14);
}
.book-cover span {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.1;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  padding: 0 8px;
}
.book-cover-dark { background: linear-gradient(155deg, #2e2e2e, #1b1b1b); }
.book-cover-dark span { color: var(--gold); }
.book-body h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 26px;
  color: var(--ink);
  margin-bottom: 2px;
}
.book-sub {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 17px;
  color: var(--gold-deep);
  margin-bottom: 12px;
}
.book-body p { font-size: 15px; color: var(--ink-2); margin-bottom: 14px; line-height: 1.55; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  position: relative;
  z-index: 55; /* paint over the fixed spine so footer text isn't clipped by it */
  background: var(--ink);
  color: var(--bg-alt);
  padding: var(--sp-xl) 6vw;
}
.footer-inner { max-width: 900px; margin: 0 auto; text-align: center; }
.footer-brand {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 30px;
  color: var(--gold);
  margin-bottom: 10px;
}
.footer-meta { font-size: 14px; color: rgba(245,240,232,0.7); margin-bottom: 18px; }
.footer-meta a { color: var(--gold); transition: color var(--ease); }
.footer-meta a:hover { color: var(--bg-alt); }
.socials-footer { justify-content: center; gap: 24px; }
.socials-footer a {
  width: auto; height: auto; border: none; border-radius: 0;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(245,240,232,0.7);
}
.socials-footer a:hover { background: none; color: var(--gold); }

/* ============================================================
   MOBILE TOP BAR (hidden on desktop)
   ============================================================ */
.topbar, .mobile-menu { display: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .spine { display: none; }
  main { padding-top: 58px; } /* clear the fixed top bar so the portrait isn't cropped */

  .topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 58px;
    padding: 0 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    z-index: 60;
  }
  .topbar-brand {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 13px;
    letter-spacing: 0.18em;
    color: var(--ink);
  }
  .topbar-toggle { display: flex; flex-direction: column; gap: 5px; padding: 8px; }
  .topbar-toggle span { width: 24px; height: 2px; background: var(--ink); transition: var(--ease); }
  .topbar-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .topbar-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .topbar-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .mobile-menu {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 58px; left: 0; right: 0;
    background: var(--ink);
    padding: 12px 0;
    z-index: 59;
  }
  .mobile-menu[hidden] { display: none; }
  .mobile-link {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 13px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--spine-ink);
    padding: 14px 24px;
  }
  .mobile-link:hover { color: var(--gold); }

  /* Chapters collapse to a normal stacked flow: each backdrop becomes a
     banner above its text; cover layers no longer overlap. */
  .chapter-bg {
    position: static;
    height: 42vh;
    min-height: 260px;
    width: 100%;
    padding-right: 0;
  }
  .chapter-flow { margin-top: 0; }
  .cover { grid-template-columns: 1fr; min-height: 0; }
  .cover-left { display: none; }
  .panel-visual {
    height: 42vh;
    min-height: 260px;
    padding-right: 0;
  }
  .visual-word { font-size: clamp(44px, 14vw, 96px); }
  .panel-content {
    min-height: 0;
    padding: var(--sp-xl) 24px;
  }
  #contact .panel-content { padding-top: var(--sp-lg); }
  .content-inner { max-width: 640px; margin: 0 auto; padding: 0; }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  .book { flex-direction: column; gap: 16px; }
  .notify-form { flex-direction: column; align-items: stretch; }
  .notify-form .btn-primary { justify-content: center; }
}

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