/* ============================================================
   The Honest Game — site styles
   Palette: deep navy "launch monitor" + a single gold accent.
   Green appears only where it means "what works".
   ============================================================ */

:root {
  --navy-900: #0A1A2C;   /* page background            */
  --navy-850: #0D2036;   /* raised panels              */
  --navy-800: #10273F;   /* cards                      */
  --navy-700: #1B3A57;   /* hairlines / borders        */
  --ink:      #EDF2F7;   /* primary text               */
  --slate:    #8FA6BB;   /* secondary text             */
  --slate-dim:#6E869B;   /* captions / fine print      */
  --gold:     #E4B24A;   /* accent + calls to action   */
  --gold-deep:#C8963A;   /* hover                       */
  --turf:     #46C08A;   /* "what works" — used sparingly */

  --serif: Georgia, "Times New Roman", "Iowan Old Style", serif;
  --sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono:  ui-monospace, "SF Mono", "JetBrains Mono", "Roboto Mono", Menlo, Consolas, monospace;

  --wrap: 1120px;
  --gutter: clamp(1.25rem, 5vw, 4rem);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--navy-900);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* soft top-lit atmosphere so the navy isn't flat */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 70% at 80% -10%, rgba(228,178,74,0.10), transparent 60%),
    radial-gradient(90% 60% at 0% 0%, rgba(70,192,138,0.06), transparent 55%);
  z-index: 0;
}

a { color: inherit; }

::selection { background: var(--gold); color: var(--navy-900); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

.c-slate { color: var(--slate); }
.c-turf  { color: var(--turf); }

/* ---------- shared eyebrow + section framing ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1rem;
}

.section {
  position: relative;
  z-index: 1;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(4rem, 8vw, 7rem) var(--gutter);
}

.section--panel {
  max-width: none;
  background: var(--navy-850);
  border-top: 1px solid var(--navy-700);
  border-bottom: 1px solid var(--navy-700);
}
.section--panel > * { max-width: var(--wrap); margin-left: auto; margin-right: auto; }

.section__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.7rem, 1.2rem + 2vw, 2.7rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 2.5rem;
  max-width: 20ch;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary { background: var(--gold); color: var(--navy-900); }
.btn--primary:hover { background: var(--gold-deep); }

.btn--ghost { color: var(--ink); border-color: var(--navy-700); }
.btn--ghost:hover { border-color: var(--gold); color: var(--gold); }

.btn--sm { padding: 0.55rem 1.1rem; font-size: 0.85rem; background: var(--gold); color: var(--navy-900); }
.btn--sm:hover { background: var(--gold-deep); }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 1rem var(--gutter);
  background: rgba(10,26,44,0.72);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(27,58,87,0.6);
}
.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.nav__mark {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: inset -2px -2px 0 rgba(10,26,44,0.25), 0 0 0 3px rgba(228,178,74,0.35);
  flex: none;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2vw, 2rem);
}
.nav__links a {
  text-decoration: none;
  font-size: 0.92rem;
  color: var(--slate);
  transition: color 0.18s ease;
}
.nav__links a:hover { color: var(--ink); }
.nav__links a.btn--sm { color: var(--navy-900); }
.nav__links a.btn--sm:hover { color: var(--navy-900); }

/* hide the text links on small screens, keep brand + buy */
@media (max-width: 680px) {
  .nav__links a:not(.btn--sm) { display: none; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  z-index: 1;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 6rem) var(--gutter) clamp(3.5rem, 7vw, 6rem);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hero__copy { min-width: 0; }
.hero__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.9rem, 2rem + 6vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 0.4rem 0 0;
}
.hero__subtitle {
  font-family: var(--serif);
  font-style: italic;
  color: var(--gold);
  font-size: clamp(1.05rem, 0.9rem + 0.8vw, 1.4rem);
  line-height: 1.35;
  margin: 1.1rem 0 0;
  max-width: 32ch;
}
.hero__lede {
  color: var(--slate);
  margin: 1.5rem 0 0;
  max-width: 42ch;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}

/* --- trajectory figure --- */
.hero__figure { margin: 0; min-width: 0; }

/* --- book cover (hero product shot) --- */
.cover {
  max-width: 380px;
  margin: 0 auto;
}
@media (max-width: 520px) {
  .cover { max-width: 260px; }
}
.cover__img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow:
    0 2px 6px rgba(0,0,0,0.35),
    0 20px 45px rgba(0,0,0,0.45),
    0 34px 80px rgba(0,0,0,0.35);
}
@media (prefers-reduced-motion: no-preference) {
  .cover__img { animation: coverFloat 6.5s ease-in-out infinite; will-change: transform; }
  @keyframes coverFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-9px); }
  }
}

/* --- trajectory graphic, now inside the premise section --- */
.flight-figure {
  max-width: 520px;
  margin: clamp(2.5rem, 5vw, 3.5rem) auto 0;
  padding-top: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--navy-700);
}
.flight {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}
.flight__ground { stroke: var(--navy-700); stroke-width: 1.5; }
.flight__ticks line { stroke: var(--navy-700); stroke-width: 1.5; }

.flight__balloon {
  fill: none;
  stroke: var(--slate-dim);
  stroke-width: 2;
  stroke-dasharray: 2 7;
  stroke-linecap: round;
  opacity: 0.85;
}
.flight__balloon-end { fill: var(--slate-dim); }

.flight__honest {
  fill: none;
  stroke: var(--turf);
  stroke-width: 3;
  stroke-linecap: round;
  filter: drop-shadow(0 3px 10px rgba(70,192,138,0.45));
}

.flight__flag line { stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; }
.flight__flag path { fill: var(--gold); }

.flight__ball {
  fill: #ffffff;
  filter: drop-shadow(0 0 8px rgba(255,255,255,0.35));
}

.flight__label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-anchor: middle;
}
.flight__label--balloon { fill: var(--slate-dim); }
.flight__label--honest  { fill: var(--turf); }

.flight__caption {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--slate-dim);
  margin-top: 1.1rem;
  text-align: center;
}

/* draw-in animation */
@media (prefers-reduced-motion: no-preference) {
  .flight__balloon { stroke-dashoffset: 0; }
  .flight__honest {
    stroke-dasharray: 620;
    stroke-dashoffset: 620;
    animation: draw 1.6s cubic-bezier(0.22, 1, 0.36, 1) 0.25s forwards;
  }
  .flight__balloon {
    opacity: 0;
    animation: fadeUp 1s ease 1.4s forwards;
  }
  .flight__flag, .flight__label { opacity: 0; animation: fadeUp 0.8s ease 1.7s forwards; }
  @keyframes draw { to { stroke-dashoffset: 0; } }
  @keyframes fadeUp { from { opacity: 0; } to { opacity: 0.85; } }
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero__figure { order: -1; max-width: 460px; }
}

/* ============================================================
   PREMISE
   ============================================================ */
.premise {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.premise__text p { margin: 0 0 1.2rem; max-width: 50ch; }
.premise__text em { color: var(--ink); font-style: italic; }

.pull {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 1rem + 1.4vw, 1.75rem);
  line-height: 1.3;
  margin: 0 0 1.5rem;
  padding-left: 1.25rem;
  border-left: 3px solid var(--navy-700);
  color: var(--ink);
}
.pull--accent { border-left-color: var(--gold); font-style: italic; }

@media (max-width: 760px) {
  .premise { grid-template-columns: 1fr; }
  .premise__quotes { margin-top: 0.5rem; }
}

/* ============================================================
   INSIDE — parts grid
   ============================================================ */
.parts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}
.part {
  background: var(--navy-800);
  border: 1px solid var(--navy-700);
  border-radius: 14px;
  padding: 1.75rem 1.5rem 2rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.part:hover { transform: translateY(-4px); border-color: var(--gold); }
.part__num {
  font-family: var(--serif);
  font-size: 2.2rem;
  color: var(--gold);
  line-height: 1;
  display: block;
  margin-bottom: 0.9rem;
}
.part__title {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
}
.part__ch {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate-dim);
  margin: 0 0 0.9rem;
}
.part__desc { color: var(--slate); font-size: 0.95rem; margin: 0; }

@media (max-width: 900px) { .parts { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .parts { grid-template-columns: 1fr; } }

/* ============================================================
   AUTHOR
   ============================================================ */
.author {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.author__stat {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin: 0 0 1rem;
}
.author__stat span { font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--slate); }
.author__stat strong {
  font-family: var(--serif);
  font-size: clamp(3.5rem, 2rem + 6vw, 6rem);
  line-height: 0.9;
  color: var(--gold);
}
.author__meta { color: var(--slate); font-size: 0.95rem; margin: 0; }
.author__body p { margin: 0 0 1.2rem; max-width: 56ch; }
.author__quote { margin-top: 1.75rem; }

@media (max-width: 760px) { .author { grid-template-columns: 1fr; } }

/* ============================================================
   FOLLOW — cards
   ============================================================ */
.follow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.card {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  background: var(--navy-800);
  border: 1px solid var(--navy-700);
  border-radius: 14px;
  padding: 1.4rem 1.5rem;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--gold); background: var(--navy-850); }
.card__icon {
  flex: none;
  width: 46px; height: 46px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(228,178,74,0.12);
  color: var(--gold);
}
.card__icon svg { width: 24px; height: 24px; }
.card__body { display: flex; flex-direction: column; gap: 0.15rem; }
.card__kicker { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--slate-dim); }
.card__title { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; }
.card__desc { font-size: 0.9rem; color: var(--slate); }
.card__go { margin-left: auto; font-size: 1.2rem; color: var(--slate); transition: color 0.2s ease, transform 0.2s ease; }
.card:hover .card__go { color: var(--gold); transform: translate(2px, -2px); }

@media (max-width: 640px) { .follow { grid-template-columns: 1fr; } }

/* ============================================================
   CONTACT
   ============================================================ */
.contact { text-align: center; }
.contact .section__title { margin-left: auto; margin-right: auto; }
.contact__lede { color: var(--slate); margin: 0 0 2rem; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--navy-700);
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 2.5rem var(--gutter) 3.5rem;
}
.footer__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer__brand { font-family: var(--serif); font-weight: 600; font-size: 1.1rem; }
.footer__links { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.footer__links a { text-decoration: none; color: var(--slate); font-size: 0.9rem; transition: color 0.18s ease; }
.footer__links a:hover { color: var(--gold); }
.footer__fine {
  margin: 1.5rem 0 0;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--slate-dim);
}

/* ============================================================
   Scroll reveal (progressive enhancement; content visible if JS off)
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .reveal-on .section,
  .reveal-on .hero__copy {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }
  .reveal-on .is-visible { opacity: 1; transform: none; }
}
