/* ===== Clyvra — center spine + side cards ===== */
:root {
  --teal:        #0090B0;
  --teal-deep:   #007A96;
  --teal-soft:   #4DB8CC;
  --gold:        #F8D018;
  --gold-deep:   #D4B00E;
  --ink:         #2D2942;
  --ink-deep:    #1A1730;
  --deep:        #0C2F38;
  --paper:       #F4F9FA;
  --paper-2:     #E6F2F4;
  --white:       #FFFFFF;
  --line:        #C9E0E6;
  --line-strong: #A8CDD6;
  --text:        #2D2942;
  --muted:       #4A6270;
  --on-dark:     #F4FBFC;
  --on-dark-soft:#D5E8EC;
  --radius:      18px;
  --maxw:        1120px;
  --ease:        cubic-bezier(.22,.61,.36,1);
  --display:     "Zilla Slab", "Georgia", serif;
  --body:        "Karla", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

html, body { overflow-x: hidden; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand-name, .t-node, .card-tag, .kicker, .eyebrow, .quote-attr {
  font-family: var(--display);
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin: 0;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
p { margin: 0; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--teal); color: #fff; padding: 10px 16px; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 26px; border-radius: 999px; font-weight: 600; font-size: 15px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
}
.btn-primary {
  background: var(--teal); color: #fff;
  box-shadow: 0 12px 28px -14px rgba(0,144,176,.7);
}
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }

/* ===== Header ===== */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background .3s var(--ease), border-color .3s var(--ease), backdrop-filter .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(244,249,250,.9);
  backdrop-filter: saturate(150%) blur(14px);
  border-bottom-color: var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 74px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand img {
  width: 42px; height: 42px; border-radius: 11px; object-fit: cover;
  background: #fff; border: 1px solid var(--line);
}
.brand-name { font-size: 22px; font-weight: 700; color: var(--ink); letter-spacing: -0.03em; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav a { font-size: 15px; font-weight: 600; color: var(--muted); transition: color .2s var(--ease); }
.nav .nav-cta {
  color: #fff; background: var(--teal); padding: 9px 18px; border-radius: 999px;
}
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .3s var(--ease), opacity .3s var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Hero ===== */
.hero { position: relative; overflow: hidden; padding: 126px 0 56px; }
.hero-wash {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 48% 55% at 82% 18%, rgba(0,144,176,.14), transparent 62%),
    radial-gradient(ellipse 40% 48% at 12% 88%, rgba(248,208,24,.12), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, var(--paper) 100%);
}
.hero-inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.05fr .85fr; gap: 28px; align-items: center;
}
.eyebrow {
  font-size: 12px; letter-spacing: .2em; text-transform: uppercase; font-weight: 600;
  color: var(--teal); margin: 0 0 18px;
}
.hero h1 {
  font-size: clamp(2.4rem, 5.4vw, 4.4rem);
  font-weight: 700; color: var(--ink); max-width: 14ch;
}
.hero h1 em {
  font-style: italic; font-weight: 600; color: var(--teal);
}
.hero-sub {
  margin: 22px 0 0; max-width: 50ch; color: var(--muted); font-size: 1.06rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.hero-mark { display: grid; place-items: center; }
.mark-svg { width: min(320px, 100%); height: auto; overflow: visible; }
.spine-draw {
  stroke-dasharray: 400; stroke-dashoffset: 400;
  animation: drawLine 1.6s var(--ease) .15s forwards;
}
.curve-teal {
  stroke-dasharray: 280; stroke-dashoffset: 280;
  animation: drawLine 1.8s var(--ease) .35s forwards;
}
.curve-gold {
  stroke-dasharray: 280; stroke-dashoffset: 280;
  animation: drawLine 1.8s var(--ease) .55s forwards;
}
.node {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: popNode .5s var(--ease) forwards;
}
.n1 { animation-delay: .9s; }
.n2 { animation-delay: 1.15s; }
.n3 { animation-delay: 1.4s; }
.bead {
  transform-box: view-box;
  transform-origin: 140px 40px;
  animation: travel 3.6s ease-in-out 1.6s infinite;
}
@keyframes drawLine { to { stroke-dashoffset: 0; } }
@keyframes popNode {
  from { opacity: 0; transform: scale(.4); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes travel {
  0%   { transform: translateY(0); opacity: 0; }
  8%   { opacity: 1; }
  92%  { opacity: 1; }
  100% { transform: translateY(350px); opacity: 0; }
}
.mark-caption {
  margin-top: 8px; font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  font-weight: 700; color: var(--muted); font-family: var(--display);
}

@media (prefers-reduced-motion: reduce) {
  .spine-draw, .curve-teal, .curve-gold { stroke-dashoffset: 0; animation: none; }
  .node { opacity: 1; animation: none; }
  .bead { animation: none; opacity: 0; }
}

/* ===== Sections ===== */
.section { padding: 88px 0; }
.section-alt { background: var(--white); }
.section-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.kicker {
  font-size: 12px; letter-spacing: .2em; text-transform: uppercase; font-weight: 600;
  color: var(--teal); margin-bottom: 12px;
}
.kicker-light { color: var(--gold); }
.section-head h2, .faq-intro h2, .contact-copy h2 {
  font-size: clamp(1.85rem, 3.6vw, 2.85rem); font-weight: 700; color: var(--ink);
}
.lead { margin-top: 16px; color: var(--muted); font-size: 1.05rem; }

/* ===== Timeline spine ===== */
.timeline {
  position: relative;
  padding: 12px 0 8px;
}
.spine-line {
  position: absolute;
  left: 50%; top: 0; bottom: 0;
  width: 3px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, var(--teal) 0%, var(--gold) 50%, var(--teal) 100%);
  border-radius: 99px;
  z-index: 0;
}
.spine-pulse {
  position: absolute; left: 50%; top: 0;
  width: 10px; height: 10px; margin-left: -5px;
  border-radius: 50%; background: var(--gold);
  box-shadow: 0 0 0 0 rgba(248,208,24,.55);
  animation: pulseDown 4.5s ease-in-out infinite;
}
@keyframes pulseDown {
  0%   { top: 4%; box-shadow: 0 0 0 0 rgba(248,208,24,.5); }
  50%  { box-shadow: 0 0 0 10px rgba(248,208,24,0); }
  100% { top: 92%; box-shadow: 0 0 0 0 rgba(248,208,24,0); }
}
@media (prefers-reduced-motion: reduce) {
  .spine-pulse { animation: none; opacity: 0; }
}

.station {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 1fr 88px 1fr;
  align-items: center;
  gap: 18px;
  margin: 0 0 28px;
}
.station:last-child { margin-bottom: 0; }

.node-wrap { display: grid; place-items: center; }
.t-node {
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--white);
  border: 3px solid var(--teal);
  color: var(--teal);
  font-weight: 700; font-size: 14px; letter-spacing: .04em;
  box-shadow: 0 8px 22px -12px rgba(12,47,56,.45);
}
.t-node.gold { border-color: var(--gold-deep); color: var(--ink); background: var(--gold); }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px 24px;
  box-shadow: 0 16px 36px -28px rgba(12,47,56,.35);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease);
}
.card-tag {
  display: inline-block; font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  font-weight: 700; color: var(--teal); margin-bottom: 10px;
}
.card h3 { font-size: 1.45rem; font-weight: 700; margin-bottom: 10px; color: var(--ink); }
.card p { color: var(--muted); font-size: 1rem; }

.rail-note {
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
  font-weight: 700; color: var(--teal-deep); opacity: .7;
}
.station.left .rail-note { text-align: left; padding-left: 8px; }
.station.right .rail-note { text-align: right; padding-right: 8px; }

.timeline.compact .station { margin-bottom: 22px; }
.timeline.compact .card { padding: 22px 22px 20px; }

/* ===== Quote band (dark, near-white type) ===== */
.quote-band {
  background: var(--deep);
  color: var(--on-dark);
  padding: 96px 0;
}
.quote-inner { max-width: 860px; margin: 0 auto; text-align: center; }
.quote-band blockquote {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.6rem, 4vw, 2.7rem);
  font-weight: 600;
  font-style: italic;
  letter-spacing: -0.03em;
  line-height: 1.22;
  color: var(--on-dark);
}
.quote-attr {
  margin-top: 26px; font-size: 13px; letter-spacing: .2em; text-transform: uppercase;
  font-weight: 700; color: var(--gold);
}

/* ===== FAQ ===== */
.faq-wrap { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: start; }
.faq-intro h2 { margin-bottom: 14px; }
.faq-intro p:last-child { color: var(--muted); }
.faq { border-top: 1px solid var(--line-strong); }
.faq-item { border-bottom: 1px solid var(--line-strong); }
.faq-q {
  width: 100%; background: none; border: 0; cursor: pointer; text-align: left;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px 4px; font-family: var(--display); font-size: 1.15rem; font-weight: 700;
  color: var(--ink); transition: color .2s var(--ease);
}
.faq-ico { position: relative; flex: 0 0 16px; width: 16px; height: 16px; }
.faq-ico::before, .faq-ico::after {
  content: ""; position: absolute; background: var(--teal); border-radius: 1px;
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.faq-ico::before { top: 7px; left: 0; width: 16px; height: 2px; }
.faq-ico::after { top: 0; left: 7px; width: 2px; height: 16px; }
.faq-item.open .faq-ico::after { transform: scaleY(0); opacity: 0; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.faq-item.open .faq-a { max-height: 280px; }
.faq-a p { color: var(--muted); margin: 0 0 22px; padding-right: 28px; }

/* ===== Contact ===== */
.contact-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.contact-copy h2 { margin-bottom: 16px; }
.contact-copy p { color: var(--muted); margin-bottom: 22px; }
.contact-email {
  display: inline-block; font-family: var(--display); font-size: 1.35rem; font-weight: 700;
  color: var(--teal); border-bottom: 1px solid var(--line-strong); padding-bottom: 4px;
  transition: border-color .2s, color .2s, transform .25s var(--ease);
}
.contact-addr { margin-top: 16px; font-size: 14px; color: var(--muted); letter-spacing: .04em; }
.contact-form {
  background: var(--white); border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 28px; display: grid; gap: 16px;
}
.field { display: grid; gap: 8px; }
.field label {
  font-size: 12px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--muted);
  font-family: var(--display);
}
.field input, .field textarea {
  background: var(--paper); border: 1px solid var(--line); border-radius: 10px; color: var(--text);
  padding: 13px 14px; font: inherit; font-size: 15px; width: 100%; resize: vertical;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0,144,176,.16);
}

/* ===== Footer (dark, near-white) ===== */
.site-footer {
  background: var(--deep); color: var(--on-dark); padding: 56px 0 36px;
  border-top: 1px solid rgba(248,208,24,.18);
}
.site-footer .brand img { border-color: rgba(255,255,255,.14); }
.site-footer .brand-name { color: var(--on-dark); }
.footer-inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px; }
.footer-tag { color: var(--on-dark-soft); font-family: var(--display); font-size: 1.05rem; }
.footer-nav { display: flex; gap: 22px; flex-wrap: wrap; justify-content: center; }
.footer-nav a {
  color: var(--on-dark-soft); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600;
}
.footer-bottom {
  display: flex; flex-direction: column; gap: 6px; color: var(--on-dark-soft);
  font-size: 13px; margin-top: 8px; padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,.12); width: 100%; max-width: 520px;
}

/* ===== Reveal (hover AFTER this) ===== */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { transform: translateY(-2px); background: var(--teal-deep); box-shadow: 0 18px 36px -12px rgba(0,144,176,.65); }
  .btn-ghost:hover { transform: translateY(-2px); border-color: var(--teal); color: var(--teal); }
  .nav a:hover { color: var(--ink); }
  .nav .nav-cta:hover { color: #fff; background: var(--teal-deep); }
  .card:hover {
    transform: translateY(-6px);
    border-color: var(--teal);
    box-shadow: 0 22px 40px -22px rgba(0,144,176,.45);
    background: #fff;
  }
  .faq-q:hover { color: var(--teal); }
  .contact-email:hover { border-bottom-color: var(--teal); color: var(--teal-deep); }
  .footer-nav a:hover { color: var(--on-dark); }
  .faq-item:hover { background: rgba(0,144,176,.04); }
}

/* Touch: contrast on press without sticky hover */
@media (hover: none) {
  .card:active {
    background: var(--paper-2);
    border-color: var(--teal);
  }
  .btn-primary:active { background: var(--teal-deep); }
  .nav a:active, .faq-q:active { color: var(--teal); }
}

/* ===== Responsive ===== */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; gap: 20px; }
  .hero-mark { order: -1; }
  .mark-svg { width: min(240px, 70vw); }
  .hero h1 { max-width: none; }
  .faq-wrap, .contact-inner { grid-template-columns: 1fr; gap: 32px; }
  .rail-note { display: none; }
  .station { grid-template-columns: 1fr 72px 1fr; gap: 12px; }
}

@media (max-width: 760px) {
  .nav {
    display: none; position: absolute; inset: 74px 0 auto; background: rgba(244,249,250,.98);
    flex-direction: column; align-items: stretch; padding: 12px 24px 22px; gap: 4px;
    border-bottom: 1px solid var(--line); box-shadow: 0 16px 32px -24px rgba(12,47,56,.4);
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 4px; border-bottom: 1px solid var(--line); color: var(--text); }
  .nav .nav-cta { text-align: center; margin-top: 10px; border: 0; }
  .nav-toggle { display: flex; }
  .header-inner { height: 68px; }
  .nav { inset: 68px 0 auto; }
  .hero { padding: 96px 0 36px; }
  .section { padding: 68px 0; }
  .quote-band { padding: 72px 0; }

  .station {
    grid-template-columns: 48px 1fr;
    gap: 14px 14px;
    margin-bottom: 18px;
  }
  .station.left .card { grid-column: 2; grid-row: 1; }
  .station.left .node-wrap { grid-column: 1; grid-row: 1; }
  .station.right .card { grid-column: 2; grid-row: 1; }
  .station.right .node-wrap { grid-column: 1; grid-row: 1; }
  .spine-line { left: 24px; transform: none; }
  .spine-pulse { left: 24px; margin-left: -5px; }
  .t-node { width: 40px; height: 40px; font-size: 12px; border-width: 2px; }
}

@media (max-width: 430px) {
  .container { padding: 0 16px; }
  .hero { padding: 92px 0 32px; }
  .hero h1 { font-size: 2.15rem; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; }
  .section { padding: 60px 0; }
  .section-head { margin-bottom: 36px; }
  .quote-band { padding: 64px 0; }
  .card { padding: 20px 16px 18px; }
  .card h3 { font-size: 1.25rem; }
  .contact-form { padding: 20px 16px; }
  .station { margin-bottom: 16px; gap: 12px; }
  .spine-line { left: 24px; }
  .mark-svg { width: min(200px, 64vw); }
  .footer-nav { gap: 14px 18px; }
}

@media (max-width: 390px) {
  .container { padding: 0 16px; }
  .hero h1 { font-size: 2rem; }
  .hero-sub { font-size: .98rem; }
  .t-node { width: 36px; height: 36px; }
  .spine-line { left: 24px; }
}
