/* yails holding site: reference styles
   Colours, type and motion as agreed in the build spec. */

:root {
  --navy: #14213D;        /* main text, dark backgrounds */
  --navy-deep: #0E1830;   /* footer */
  --navy-card: #1C2B4D;   /* sign-up card on navy */
  --line-navy: #3A4C74;   /* outlines on navy */
  --blue: #4A6FA5;        /* accent on light backgrounds */
  --sky: #8FB3F2;         /* accent on dark backgrounds */
  --chalk: #F6F4EF;       /* light background, text on navy */
  --paper: #FBFBF8;       /* alternate light background */
  --ink-soft: #3E4A63;    /* body text on light */
  --mist: #C9D2E3;        /* body text on navy */
  --mist-dim: #AEB8CC;    /* small text on navy */
  --heading: 'Inter Tight', Arial, sans-serif;
  --text: Inter, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--text); color: var(--navy); background: var(--chalk); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }

/* Body text: Inter, set slightly tight */
p, li, label, input, button, a { letter-spacing: -0.011em; }
p { line-height: 1.5; }

h1, h2, h3 { font-family: var(--heading); font-weight: 700; margin: 0; }
h1 { letter-spacing: -0.03em; line-height: 1.05; font-size: clamp(2.5rem, 5.5vw, 4.5rem); max-width: 16ch; }
h2 { letter-spacing: -0.03em; line-height: 1.05; font-size: clamp(2.25rem, 4.5vw, 3.75rem); }
h3 { letter-spacing: -0.02em; font-size: 1.625rem; }
.h-md { font-size: clamp(1.75rem, 3vw, 2.5rem); }

a { color: var(--navy); }
a:hover { color: var(--blue); }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--sky); color: var(--navy); padding: .75rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }

.wrap { max-width: 1200px; margin: 0 auto; padding-left: 2rem; padding-right: 2rem; }
.stack { display: flex; flex-direction: column; gap: 1.25rem; }
.stack-lg { display: flex; flex-direction: column; gap: 3rem; }

/* Header */
.site-header { background: var(--navy); }
.nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; padding-top: 1rem; padding-bottom: 1rem; }
.nav-logo { display: block; }
.logo-nav { width: 120px; height: auto; }   /* 120px minimum for the glow version */
.nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 2rem; }
.nav-links .nl { color: #E3E8F1; font-size: 1rem; font-weight: 500; }
.nav-links .nl[aria-current="page"]::after { width: 100%; }

/* Links with the glow bar underline */
.nl { position: relative; text-decoration: none; }
.nl::after { content: ""; position: absolute; left: 0; bottom: -6px; height: 3px; width: 0; border-radius: 2px; background: var(--sky); box-shadow: 0 0 10px rgba(143,179,242,.9); transition: width .3s ease; }
.nl:hover::after, .nl:focus-visible::after { width: 100%; }
.link-strong { align-self: flex-start; color: var(--navy); font-weight: 600; font-size: 1.0625rem; }
.link-light { align-self: flex-start; color: var(--chalk); font-weight: 600; font-size: 1.125rem; }
.link-light:hover { color: var(--chalk); }

/* Buttons */
.btn { display: inline-block; text-decoration: none; font: inherit; font-weight: 600; font-size: 1.0625rem; padding: 1rem 1.75rem; border-radius: 999px; border: none; cursor: pointer; transition: box-shadow .25s ease, transform .25s ease; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(143,179,242,.5), 0 8px 28px rgba(143,179,242,.35); }
.btn-primary, .btn-primary:hover { background: var(--sky); color: var(--navy); }
.btn-ghost, .btn-ghost:hover { color: var(--chalk); box-shadow: inset 0 0 0 2px var(--line-navy); }
.btn-ghost:hover { box-shadow: inset 0 0 0 2px var(--sky), 0 8px 28px rgba(143,179,242,.25); }
.btn-sm { font-size: 1rem; padding: .75rem 1.25rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 1rem; }

/* Hero */
.hero { background: var(--navy); color: var(--chalk); overflow: hidden; }
.hero-inner { display: flex; flex-direction: column; gap: 2.5rem; padding-top: 5rem; padding-bottom: 7rem; }
.logo-hero { width: clamp(15rem, 36vw, 30rem); height: auto; }
.lead { margin: 0; font-size: clamp(1.125rem, 1.6vw, 1.375rem); color: var(--mist); max-width: 38rem; }

/* Inner page heading band */
.page-head { background: var(--navy); color: var(--chalk); padding: 4.5rem 0 5rem; }
.page-head h1 { max-width: 20ch; }

/* Sections */
.sec { padding: 6.5rem 0; }
.sec-chalk { background: var(--chalk); }
.sec-paper { background: var(--paper); }
.sec-navy { background: var(--navy); color: var(--chalk); }
.eyebrow { margin: 0 0 1rem; font-size: .875rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--blue); }
.eyebrow-light { color: var(--sky); }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: 3rem 5rem; align-items: start; }
.split-center { align-items: center; }
.split-body { display: flex; flex-direction: column; gap: 1.5rem; padding-top: .5rem; }
.body-lg { margin: 0; font-size: 1.25rem; color: var(--ink-soft); }
.body-md { margin: 0; font-size: 1.125rem; color: var(--ink-soft); max-width: 30rem; }
.sec-navy .body-lg, .muted { color: var(--mist); }
.build-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1.5rem 4rem; }
.cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2rem; }
.prose { max-width: 46rem; }

/* Cards */
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 1.25rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: 1.5rem; }
.card-dark { background: var(--navy); color: var(--chalk); border-radius: 1.25rem; padding: 2.25rem; display: flex; flex-direction: column; gap: 1rem; min-height: 15rem; }
.card-dark .tag { margin: 0; font-size: .8125rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--sky); }
.card-dark p:last-child { margin: auto 0 0; font-size: 1.0625rem; color: var(--mist); }
.card-dark .tb { height: 4px; width: 3rem; background: var(--sky); }
.card-light { background: var(--paper); border-radius: 1.25rem; padding: 2.25rem; display: flex; flex-direction: column; gap: .875rem; box-shadow: 0 1px 0 rgba(20,33,61,.08); }
.sec-paper .card-light { background: #FFFFFF; }
.card-light .num { margin: 0; font-family: var(--heading); font-weight: 700; color: var(--blue); font-size: 1rem; }
.card-light p:last-child { margin: 0; font-size: 1.0625rem; color: var(--ink-soft); }
.tb { display: block; height: 3px; width: 2.5rem; border-radius: 2px; background: var(--blue); transition: width .35s ease, box-shadow .35s ease; }
.lift { transition: transform .3s ease, box-shadow .3s ease; }
.lift:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(20,33,61,.14); }
.lift:hover .tb { width: 100%; box-shadow: 0 0 14px rgba(74,111,165,.7); }
.card-dark.lift:hover .tb { box-shadow: 0 0 14px rgba(143,179,242,.8); }

/* Sign-up */
.signup-card { background: var(--navy-card); color: var(--chalk); border-radius: 1.25rem; padding: 2.25rem; }
.signup { display: flex; flex-direction: column; gap: 1rem; }
.signup-title { margin: 0; font-family: var(--heading); font-weight: 700; font-size: 1.5rem; }
.signup label { font-size: .9375rem; color: var(--mist); }
.signup-row { display: flex; flex-wrap: wrap; gap: .75rem; }
.signup input { flex: 1 1 14rem; min-width: 0; font: inherit; font-size: 1.0625rem; padding: .9rem 1.1rem; border-radius: 999px; border: 2px solid var(--line-navy); background: var(--navy); color: var(--chalk); }
.signup input::placeholder { color: #7F8BA6; }
.signup input[aria-invalid="true"] { border-color: #F2A38F; }
.signup button { padding: .9rem 1.5rem; }
.signup-small { margin: 0; font-size: .875rem; color: var(--mist-dim); }
.signup-small a { color: var(--chalk); }
.signup-done { display: flex; flex-direction: column; gap: .75rem; }
.signup[hidden], .signup-done[hidden] { display: none; }
.signup-done p { margin: 0; font-size: 1.0625rem; color: var(--mist); }
.signup-done .signup-title { color: var(--chalk); font-size: 1.5rem; }
.done-bar { display: block; height: 4px; width: 8rem; border-radius: 2px; background: var(--sky); box-shadow: 0 0 14px rgba(143,179,242,.9); animation: breathe 3s ease-in-out infinite; }

/* Footer */
.site-footer { background: var(--navy-deep); color: var(--mist-dim); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 2rem; padding-top: 3rem; padding-bottom: 3rem; }
.footer-legal { display: flex; flex-direction: column; gap: 1.25rem; max-width: 40rem; }
.footer-legal p { margin: 0; font-size: .875rem; }
.logo-footer { width: 120px; height: auto; margin: -12px 0 -12px -6px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.5rem; font-size: .9375rem; }
.footer-links .nl { color: #E3E8F1; }

/* ---------- Motion ---------- */

/* Hero logo: the light sweeps back and forth along the bar (Knight Rider style).
   At rest it sits under the "ai", matching the static logo. */
@keyframes sweep { from { transform: translateX(-56.49px); } to { transform: translateX(80.71px); } }
.logo-hero.sweep .light { animation: sweep 2.4s cubic-bezier(.45,0,.55,1) infinite alternate; }

/* Menu logo: slow breathing glow. The small logo has no sweep. */
@keyframes breathe { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
.logo-nav .hi { display: none; }
.logo-nav.breathe .light { animation: breathe 3s ease-in-out infinite; }

/* Page load: hero items fade and rise in, all within a second */
@keyframes up { from { opacity: 0; transform: translateY(18px); } }
.up { animation: up .7s ease-out both; }
.u2 { animation-delay: .15s; } .u3 { animation-delay: .3s; } .u4 { animation-delay: .45s; }

/* Scrolling: each section fades up once as it comes into view (script.js adds .in) */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease-out, transform .7s ease-out; }
.js .reveal.in { opacity: 1; transform: none; }

/* Reduced motion: everything off, light rests under the ai */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}
