/* ============================================================
   AttestEd - site styles
   Palette: deep navy + muted gold, paper white, editorial Garamond.
   ============================================================ */

:root {
  --ink: #0E1A2B;
  --ink-card: #17293F;
  --navy: #1F3352;
  --gold: #A8842C;
  --champ: #D8B95C;
  --paper: #FFFFFF;
  --card: #F4F5F8;
  --mist: #E7EBF2;
  --gray: #5A6472;
  --txt: #1B2940;
  --ver: #2F5D4C;
  --sub: #4E7D68;
  --part: #B08A2E;
  --unv: #6B7280;
  --con: #9E3B2C;
  --serif: "Source Sans 3", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.65;
  color: var(--txt);
  background: var(--paper);
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 1.4rem; }

/* ---------- typography ---------- */
h1, h2, h3 { color: var(--navy); font-weight: 600; line-height: 1.18; }
h1 { font-size: 2.9rem; }
h2 { font-size: 1.9rem; margin-bottom: 0.9rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.4rem; }
p  { margin-bottom: 1rem; }
a  { color: var(--navy); }

.eyebrow {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.7rem;
}

.lede { font-size: 1.18rem; color: var(--gray); }

.gold-rule {
  width: 72px; height: 2px; background: var(--gold);
  border: 0; margin: 1.4rem 0;
}

/* ---------- header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--mist);
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1.2rem;
  padding-top: 0.85rem; padding-bottom: 0.85rem;
}

.brand {
  display: flex; align-items: center; gap: 0.55rem;
  text-decoration: none; color: var(--ink);
  font-size: 1.45rem; font-weight: 700; letter-spacing: 0.02em;
}
.brand svg { display: block; }

.site-nav { display: flex; gap: 1.5rem; flex-wrap: wrap; align-items: center; }
.site-nav a {
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray);
  padding: 0.2rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--navy); border-bottom-color: var(--gold); }
.site-nav a[aria-current="page"] { color: var(--navy); border-bottom-color: var(--gold); }

.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--mist); border-radius: 6px;
  font-size: 1.25rem; padding: 0.15rem 0.6rem; cursor: pointer; color: var(--navy);
}

/* ---------- hero ---------- */
.hero {
  background: var(--ink);
  color: var(--paper);
  padding: 5.2rem 0 4.6rem;
}
.hero .eyebrow { color: var(--champ); }
.hero h1 { color: var(--paper); font-size: 3.4rem; max-width: 17ch; }
.hero .lede { color: #C8D3E2; max-width: 62ch; font-size: 1.22rem; margin-top: 1.2rem; }
.hero .gold-rule { margin: 1.8rem 0; }

.page-hero {
  background: var(--ink);
  color: var(--paper);
  padding: 3.6rem 0 3.2rem;
}
.page-hero .eyebrow { color: var(--champ); }
.page-hero h1 { color: var(--paper); font-size: 2.6rem; }
.page-hero .lede { color: #C8D3E2; max-width: 66ch; margin-top: 0.9rem; }

/* ---------- buttons ---------- */
.btn-row { display: flex; gap: 0.9rem; flex-wrap: wrap; margin-top: 1.6rem; }
.btn {
  display: inline-block;
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1rem; font-weight: 600; letter-spacing: 0.04em;
  padding: 0.65rem 1.5rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.btn:hover { opacity: 0.88; }
.btn-gold { background: var(--gold); color: var(--paper); }
.btn-ghost { background: none; border: 1.5px solid var(--champ); color: var(--champ); }
.btn-ghost-dark { background: none; border: 1.5px solid var(--navy); color: var(--navy); }

/* ---------- sections ---------- */
.section { padding: 4.2rem 0; }
.section-alt { background: var(--card); }
.section-head { max-width: 62ch; margin-bottom: 2.2rem; }

/* ---------- cards ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem; }

.card {
  background: var(--card);
  border-radius: 10px;
  padding: 1.6rem 1.5rem;
}
.section-alt .card { background: var(--paper); }
.card h3 { color: var(--navy); }
.card .kicker {
  display: block; font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 0.5rem;
}
.card p:last-child { margin-bottom: 0; }
.card-dark { background: var(--ink-card); }
.card-dark h3, .card-dark p { color: var(--paper); }
.card-dark .kicker { color: var(--champ); }

/* ---------- banner ---------- */
.banner {
  background: var(--ink-card);
  color: var(--paper);
  border-radius: 12px;
  padding: 2rem 2.2rem;
}
.banner .big { font-size: 1.45rem; font-weight: 600; color: var(--paper); margin-bottom: 0.4rem; }
.banner .sub { color: var(--champ); margin-bottom: 0; }

/* ---------- tier chips ---------- */
.tier-row { display: flex; gap: 0.7rem; flex-wrap: wrap; margin: 1.4rem 0; }
.tier {
  flex: 1 1 150px;
  text-align: center;
  color: var(--paper);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.5rem 0.6rem;
  border-radius: 7px;
}
.tier-ver { background: var(--ver); }
.tier-sub { background: var(--sub); }
.tier-part { background: var(--part); }
.tier-unv { background: var(--unv); }
.tier-con { background: var(--con); }

/* ---------- worked example ---------- */
.example {
  background: var(--card);
  border-radius: 12px;
  padding: 1.8rem 1.8rem 1.5rem;
}
.example .label {
  display: block; font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.13em; text-transform: uppercase; color: var(--gray);
  margin-bottom: 0.25rem; margin-top: 1rem;
}
.example .label:first-child { margin-top: 0; }
.example .claim { font-size: 1.15rem; font-weight: 600; color: var(--txt); }
.example .verdict {
  display: inline-block;
  background: var(--part); color: var(--paper);
  font-weight: 700; letter-spacing: 0.08em; font-size: 0.9rem;
  padding: 0.45rem 1.2rem; border-radius: 7px; margin-top: 0.15rem;
}

/* ---------- essay (thesis page) ---------- */
.essay { max-width: 46rem; }
.essay h2 { margin-top: 2.6rem; }
.essay p { font-size: 1.08rem; }
.essay .pull {
  border-left: 3px solid var(--gold);
  padding: 0.4rem 0 0.4rem 1.3rem;
  margin: 1.8rem 0;
  font-size: 1.25rem;
  color: var(--navy);
  font-style: italic;
}

/* ---------- payoff matrix table ---------- */
.matrix { border-collapse: separate; border-spacing: 8px; margin: 1.6rem 0; width: 100%; }
.matrix th {
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--gray); padding: 0.3rem;
}
.matrix td {
  background: var(--card); border-radius: 8px;
  padding: 0.9rem 1rem; vertical-align: top; width: 44%;
}
.matrix td strong { display: block; color: var(--navy); margin-bottom: 0.2rem; }
.matrix td.eq { background: var(--ink-card); }
.matrix td.eq strong, .matrix td.eq span { color: var(--paper); }
.matrix td.eq em { color: var(--champ); font-style: normal; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; display: block; margin-top: 0.5rem; }
.matrix td span { font-size: 0.95rem; color: var(--gray); }

/* ---------- definition table ---------- */
.def-table { width: 100%; border-collapse: collapse; margin: 1.4rem 0; }
.def-table th, .def-table td { text-align: left; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--mist); }
.def-table th { font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gray); }
.def-table td:first-child { font-weight: 600; color: var(--navy); white-space: nowrap; }

/* ---------- founder ---------- */
.founder { display: flex; gap: 1.6rem; align-items: flex-start; }
.founder .mark {
  flex: 0 0 84px; height: 84px; border-radius: 50%;
  background: var(--navy); color: var(--paper);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; font-weight: 700;
}

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }

/* ---------- footer ---------- */
.site-footer {
  background: var(--ink);
  color: #A9B8CB;
  padding: 3rem 0 2.2rem;
  margin-top: 4.5rem;
  font-size: 0.98rem;
}
.footer-grid { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.site-footer .brand { color: var(--paper); font-size: 1.2rem; margin-bottom: 0.5rem; }
.site-footer a { color: #C8D3E2; text-decoration: none; }
.site-footer a:hover { color: var(--champ); }
.footer-links { display: flex; flex-direction: column; gap: 0.35rem; }
.footer-note { margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid #24354C; font-size: 0.9rem; color: #7E90A7; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .grid-3, .grid-2, .contact-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.5rem; }
  .founder { flex-direction: column; }
}

/* Keep the brand and every nav item on one line at mid widths */
@media (max-width: 1150px) and (min-width: 931px) {
  .site-nav { gap: 0.95rem; flex-wrap: nowrap; }
  .site-nav a { font-size: 0.8rem; letter-spacing: 0.05em; white-space: nowrap; }
  .brand { font-size: 1.25rem; }
}

@media (max-width: 930px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--mist);
    flex-direction: column;
    padding: 1rem 1.4rem;
    gap: 0.8rem;
  }
  .site-nav.open { display: flex; }
}

/* ---------- launch announcement ticker ---------- */
.announce {
  background: var(--gold); border-bottom: 1px solid #8F6F22;
  padding: 0.55rem 0; overflow: hidden;
}
.ticker-track {
  display: inline-flex; white-space: nowrap; will-change: transform;
  animation: ticker-scroll 30s linear infinite;
}
.announce:hover .ticker-track { animation-play-state: paused; }
.ticker-item {
  padding-right: 5rem; color: #FFFFFF; font-size: 1rem; letter-spacing: 0.01em;
}
.ticker-item strong { font-weight: 600; }
.ticker-item a { color: #FFF3D6; font-weight: 600; margin-left: 0.45rem; }
.ticker-item a:hover { color: #FFFFFF; }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
}

/* ---------- uniform tier chips in definition tables ---------- */
.def-table .tier {
  display: inline-block; width: 10.5rem; max-width: 100%;
  text-align: center; padding: 0.4rem 0;
}

/* ---------- cycle timeline (homepage + dashboard) ---------- */
.timeline { list-style: none; margin: 0.4rem 0 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 1.3rem 1.7rem; border-left: 2px solid var(--mist); margin-left: 0.5rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 0.3rem; width: 12px; height: 12px;
  border-radius: 50%; background: #C9CFDC; }
.timeline li.done::before { background: var(--ver); }
.timeline li.next::before { background: var(--champ); }
.timeline .t-title { font-weight: 600; font-size: 1.15rem; color: var(--navy); }
.timeline .t-sub { font-size: 0.98rem; color: var(--gray); margin-top: 0.15rem; }

/* ---------- Log In pill in the nav ---------- */
.site-nav a.nav-login {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.09em;
  background: var(--gold); color: #FFFFFF;
  border-radius: 999px; padding: 0.42rem 1.3rem;
  border-bottom: none; margin-left: auto;
}
.site-nav a.nav-login:hover { background: var(--navy); color: #FFFFFF; border-bottom: none; }
.site-nav a.nav-login[aria-current="page"] { border-bottom: none; }
@media (max-width: 930px) {
  .site-nav a.nav-login { align-self: flex-start; margin-left: 0; }
}

/* ---------- More dropdown in the nav ---------- */
.nav-more { position: relative; }
.nav-more-btn {
  font-family: var(--serif); background: none; border: none; cursor: pointer;
  font-size: 0.92rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--gray); padding: 0.2rem 0; border-bottom: 2px solid transparent;
}
.nav-more-btn:hover { color: var(--navy); border-bottom-color: var(--gold); }
.nav-more-btn .caret { font-size: 0.7em; }
.nav-more-btn { display: inline-flex; align-items: center; gap: 0.3rem; line-height: inherit; }
.nav-more-menu {
  display: none; position: absolute; top: calc(100% + 0.55rem); right: 0;
  background: var(--paper); border: 1px solid var(--mist); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(14, 26, 43, 0.12);
  min-width: 15rem; padding: 0.5rem 0; z-index: 60;
}
.nav-more:hover .nav-more-menu, .nav-more.open .nav-more-menu { display: block; }
.nav-more-menu a {
  display: block; padding: 0.5rem 1.1rem; border-bottom: none; white-space: nowrap;
}
.nav-more-menu a:hover { background: var(--card); border-bottom: none; }
@media (max-width: 1150px) and (min-width: 931px) {
  .nav-more-btn { font-size: 0.8rem; letter-spacing: 0.05em; }
}
@media (max-width: 930px) {
  .nav-more-btn { display: none; }
  .nav-more-menu {
    display: block; position: static; border: none; box-shadow: none;
    min-width: 0; padding: 0;
  }
  .nav-more-menu a { padding: 0; margin-top: 0.8rem; }
}

/* ---------- animated cycle timeline ---------- */
.tl-animate { position: relative; }
.tl-animate li { border-left-color: var(--mist); }
.tl-progress {
  position: absolute; left: 0.5rem; top: 0; width: 2px; height: 0;
  margin-left: -1px; background: var(--gold); z-index: 1; pointer-events: none;
}
.tl-marker {
  position: absolute; left: 0.5rem; top: 0; z-index: 2; pointer-events: none;
  width: 40px; height: 40px; margin-left: -20px; margin-top: -20px;
  border-radius: 50%; background: var(--paper);
  box-shadow: 0 4px 14px rgba(14, 26, 43, 0.28);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.18s ease-out;
}
.tl-marker img { width: 34px; height: 34px; display: block; }
.tl-animate li::before { transition: background 0.3s; }
.tl-animate .t-title { color: var(--gray); transition: color 0.35s; }
.tl-animate li.tl-passed::before { background: var(--gold); }
.tl-animate li.tl-passed .t-title { color: var(--navy); }
@media (prefers-reduced-motion: reduce) {
  .tl-progress, .tl-marker { display: none; }
  .tl-animate .t-title { color: var(--navy); }
}

/* ---------- curved cycle road (homepage) ---------- */
.cycle-road { position: relative; width: 100%; aspect-ratio: 1000 / 320; margin-top: 0.5rem; }
.cr-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.cr-base { fill: none; stroke: #C9CFDC; stroke-width: 3; stroke-dasharray: 7 8; stroke-linecap: round; }
.cr-fill { fill: none; stroke: url(#crGrad); stroke-width: 4; stroke-linecap: round; }
.cr-dot { fill: var(--paper); stroke: #C9CFDC; stroke-width: 2.5; transition: fill 0.3s, stroke 0.3s; }
.cr-dot.passed { fill: var(--gold); stroke: var(--gold); }
.cr-stage {
  position: absolute; width: 11.5rem; max-width: 19%;
  transform: translateX(-50%); text-align: center;
}
.cr-stage.cr-top { bottom: calc(100% * (320 - 78) / 320); }
.cr-stage.cr-bottom { top: calc(100% * 262 / 320); }
.cr-stage .t-title { font-weight: 600; font-size: 1.05rem; color: var(--gray); transition: color 0.35s; }
.cr-stage .t-sub { font-size: 0.88rem; color: var(--gray); margin-top: 0.15rem; }
.cr-stage.passed .t-title { color: var(--navy); }
.cr-badge {
  position: absolute; left: 7%; top: 31.25%; z-index: 2; pointer-events: none;
  width: 42px; height: 42px; margin: -21px 0 0 -21px;
  border-radius: 50%; background: var(--paper);
  box-shadow: 0 4px 14px rgba(14, 26, 43, 0.3);
  display: flex; align-items: center; justify-content: center;
}
.cr-badge img { width: 36px; height: 36px; display: block; }
@media (max-width: 720px) {
  .cycle-road { aspect-ratio: auto; }
  .cr-svg, .cr-badge { display: none; }
  .cr-stage, .cr-stage.cr-top, .cr-stage.cr-bottom {
    position: static; width: 100%; max-width: 100%; transform: none;
    text-align: left; margin-bottom: 1.1rem; top: auto; bottom: auto;
  }
  .cr-stage .t-title { color: var(--navy); }
}
@media (prefers-reduced-motion: reduce) {
  .cr-badge { display: none; }
  .cr-fill { display: none; }
  .cr-stage .t-title { color: var(--navy); }
}

/* stage accent colors + pop */
.cr-dot { transform-box: fill-box; transform-origin: center; }
.cr-dot.passed { animation: cr-pop 0.5s ease-out; }
@keyframes cr-pop { 0% { transform: scale(1); } 45% { transform: scale(1.7); } 100% { transform: scale(1); } }
.cr-svg circle:nth-of-type(1).passed { fill: #2F5D4C; stroke: #2F5D4C; }
.cr-svg circle:nth-of-type(2).passed { fill: #4E7D68; stroke: #4E7D68; }
.cr-svg circle:nth-of-type(3).passed { fill: #A8842C; stroke: #A8842C; }
.cr-svg circle:nth-of-type(4).passed { fill: #B08A2E; stroke: #B08A2E; }
.cr-svg circle:nth-of-type(5).passed { fill: #1F3352; stroke: #1F3352; }
.cycle-road div.cr-stage:nth-of-type(1).passed .t-title { color: #2F5D4C; }
.cycle-road div.cr-stage:nth-of-type(2).passed .t-title { color: #4E7D68; }
.cycle-road div.cr-stage:nth-of-type(3).passed .t-title { color: #A8842C; }
.cycle-road div.cr-stage:nth-of-type(4).passed .t-title { color: #B08A2E; }
.cycle-road div.cr-stage:nth-of-type(5).passed .t-title { color: #1F3352; }

/* ---------- scroll reveal (fx pages only; JS adds fx-on) ---------- */
.fx-on .reveal { opacity: 0; transform: translateY(16px);
  transition: opacity 0.65s ease, transform 0.65s ease; }
.fx-on .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .fx-on .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- worked-example stamp sequence ---------- */
.fx-on .stamp-seq .claim, .fx-on .stamp-seq .claim + .label { opacity: 0; transition: opacity 0.6s ease 0.15s; }
.fx-on .stamp-seq .claim ~ p { opacity: 0; transition: opacity 0.6s ease 0.75s; }
.fx-on .stamp-seq .verdict, .fx-on .stamp-seq .verdict ~ .label,
.fx-on .stamp-seq p + .label { opacity: 0; transition: opacity 0.5s ease 1.3s; }
.fx-on .stamp-seq .verdict { transition: none; transform: scale(2.1) rotate(-9deg); }
.fx-on .stamp-seq.play .claim, .fx-on .stamp-seq.play .label,
.fx-on .stamp-seq.play p { opacity: 1; }
.fx-on .stamp-seq.play .verdict {
  animation: stamp-in 0.4s cubic-bezier(0.2, 1.3, 0.4, 1) 1.55s forwards;
}
@keyframes stamp-in {
  0% { opacity: 0; transform: scale(2.1) rotate(-9deg); }
  70% { opacity: 1; transform: scale(0.94) rotate(-1.5deg); }
  100% { opacity: 1; transform: scale(1) rotate(-2deg); }
}
@media (prefers-reduced-motion: reduce) {
  .fx-on .stamp-seq .claim, .fx-on .stamp-seq .label, .fx-on .stamp-seq p,
  .fx-on .stamp-seq .verdict { opacity: 1; transform: none; animation: none; transition: none; }
}

/* ---------- equilibrium simulation (thesis) ---------- */
.eq-sim { margin: 2.2rem 0; }
.eq-sim canvas { width: 100%; height: 190px; display: block;
  background: var(--card); border-radius: 10px; }
.eq-sim figcaption { display: flex; justify-content: space-between; gap: 1rem;
  flex-wrap: wrap; margin-top: 0.6rem; font-size: 0.92rem; color: var(--gray); }
.es-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  margin-right: 0.35rem; vertical-align: baseline; }
.es-legend .es-h { background: var(--ver); }
.es-legend .es-x { background: var(--con); }

/* ---------- 48-hour dial ---------- */
.dial48 { display: flex; align-items: center; gap: 1.4rem; margin: 1.8rem 0 2.2rem; }
.d-face { position: relative; width: 120px; height: 120px; flex: 0 0 120px; }
.d-face svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.d-track { fill: none; stroke: var(--mist); stroke-width: 7; }
.d-arc { fill: none; stroke: var(--gold); stroke-width: 7; stroke-linecap: round;
  stroke-dasharray: 326.7; stroke-dashoffset: 326.7; }
.d-num { position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; line-height: 1; }
.d-num .d-count { font-size: 2.1rem; font-weight: 700; color: var(--navy); }
.d-num small { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gray); margin-top: 0.25rem; }
.dial48 figcaption { font-size: 1.05rem; color: var(--txt); max-width: 24ch; }
@media (prefers-reduced-motion: reduce) { .d-arc { stroke-dashoffset: 0; } }

/* ---------- font experiment: Outfit for display, Geist for body ---------- */
h1, h2, h3, h4, .brand, .big, .t-title, .d-num .d-count, .cs-title {
  font-family: var(--display);
}
