/* ApplyCBET public site — deep green field, warm amber, earth */

.site { position: relative; overflow: clip; }

/* fixed nav */
.site-nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--nav-h);
  display: flex; align-items: center; gap: 18px; padding: 0 clamp(16px, 4vw, 44px);
  color: #F2F7F0;
  transition: background calc(240ms * var(--motion)) ease, color calc(240ms * var(--motion)) ease, box-shadow calc(240ms * var(--motion)) ease;
}
.site-nav.scrolled { background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: blur(14px) saturate(1.2); color: var(--fg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-1); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; font-weight: 760; font-size: 19px; letter-spacing: -.025em; }
.brand .mark { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: linear-gradient(140deg, var(--amber-field), var(--clay)); color: #1A1000; box-shadow: 0 4px 14px rgba(245, 165, 36, .35); }
.brand .mark svg { width: 20px; height: 20px; }
.brand b { font-weight: 760; }
.brand b::first-letter { color: var(--amber-field); }
.site-nav nav { display: flex; gap: 4px; margin-left: auto; }
.site-nav nav a { color: inherit; text-decoration: none; font-size: 14px; font-weight: 600; padding: 8px 12px; border-radius: var(--r-pill); opacity: .82; transition: opacity calc(140ms * var(--motion)) ease, background calc(140ms * var(--motion)) ease; }
.site-nav nav a:hover, .site-nav nav a.active { opacity: 1; background: rgba(255, 255, 255, .12); }
.site-nav.scrolled nav a:hover, .site-nav.scrolled nav a.active { background: color-mix(in srgb, var(--brand) 10%, transparent); }
.nav-cta { margin-left: 6px; }
.nav-toggle { display: none; }
.site-nav .icon-btn { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .18); color: inherit; }
.site-nav.scrolled .icon-btn { background: var(--surface); border-color: var(--line); color: var(--fg); }
@media (max-width: 900px) {
  .site-nav nav { display: none; position: fixed; inset: var(--nav-h) 0 auto 0; flex-direction: column; padding: 12px 16px 18px; background: var(--surface); color: var(--fg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-2); gap: 2px; }
  .site-nav nav.open { display: flex; }
  .site-nav nav a { padding: 11px 12px; font-size: 16px; }
  .nav-toggle { display: inline-grid; margin-left: auto; }
  .nav-cta { margin-left: 0; }
}

/* hero */
.hero {
  position: relative; min-height: 92vh; padding: calc(var(--nav-h) + 56px) clamp(16px, 4vw, 44px) 72px;
  color: #F2F7F0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 3vw, 44px); align-items: center;
  background: radial-gradient(120% 80% at 20% 10%, #14532D 0%, #0B2E1C 55%, #06170F 100%);
  isolation: isolate;
}
.hero::before {
  content: ''; position: absolute; inset: -20%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(38% 34% at 18% 22%, rgba(245, 165, 36, .34), transparent 60%),
    radial-gradient(42% 38% at 82% 18%, rgba(14, 124, 134, .42), transparent 62%),
    radial-gradient(46% 40% at 60% 90%, rgba(36, 86, 230, .28), transparent 60%),
    radial-gradient(30% 30% at 10% 80%, rgba(196, 45, 120, .22), transparent 60%);
  filter: blur(40px); transform: translate3d(var(--px, 0), var(--py, 0), 0);
  transition: transform 600ms cubic-bezier(.22, 1, .36, 1);
}
.grain { position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .08; mix-blend-mode: overlay; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.hero-grid { position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .35;
  background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 72px 72px; mask-image: radial-gradient(60% 60% at 50% 40%, #000 20%, transparent 75%); }

.hero-copy { max-width: 640px; }
.hero .eyebrow { color: var(--amber-field); display: inline-flex; align-items: center; gap: 10px; }
.hero .eyebrow::before { content: ''; width: 26px; height: 2px; background: var(--amber-field); }
.hero h1 {
  font-family: var(--display); font-weight: 500; letter-spacing: -.03em;
  font-size: clamp(40px, 5.1vw, 68px); line-height: 1.04; margin: 16px 0 20px; text-wrap: balance;
}
.hero h1 span { white-space: nowrap; display: inline-block; }
.hero h1 em { font-style: italic; color: var(--amber-field); white-space: nowrap; display: inline-block; }
.hero .lede { font-size: clamp(16px, 1.25vw, 19px); line-height: 1.6; color: #CFE2D4; max-width: 54ch; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; align-items: center; }
.hero .cta .btn { padding: 12px 20px; font-size: 15.5px; }
.btn-amber { background: var(--amber-field); border-color: var(--amber-field); color: #2A1B00; box-shadow: 0 10px 30px rgba(245, 165, 36, .28); }
.btn-outline { background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .3); color: #F2F7F0; }
.btn-outline:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .5); }
.hero .fine { margin-top: 18px; font-size: 13.5px; color: #9DBBA6; }
.hero .fine b { color: var(--amber-field); font-weight: 650; }

.stagger > * { opacity: 0; transform: translateY(18px); animation: rise calc(700ms * var(--motion)) cubic-bezier(.22, 1, .36, 1) forwards; }
.stagger > *:nth-child(1) { animation-delay: 60ms; } .stagger > *:nth-child(2) { animation-delay: 160ms; }
.stagger > *:nth-child(3) { animation-delay: 260ms; } .stagger > *:nth-child(4) { animation-delay: 360ms; }
.stagger > *:nth-child(5) { animation-delay: 460ms; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* hero visual: layered record cards */
.stage { position: relative; height: 560px; perspective: 1400px; }
.stage .card-ui {
  position: absolute; border-radius: 16px; background: rgba(255, 255, 255, .97); color: #14231B;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .45), 0 2px 0 rgba(255, 255, 255, .5) inset;
  border: 1px solid rgba(255, 255, 255, .6); overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 900ms cubic-bezier(.22, 1, .36, 1);
}
.card-main { width: min(380px, 100%); left: 0; top: 96px; z-index: 3; --tilt: rotateY(-6deg) rotateX(2deg); animation: float 9s ease-in-out infinite; }
.card-iv { width: 252px; right: 0; top: 0; z-index: 2; --tilt: rotateY(8deg) rotateX(-2deg); animation: float 11s ease-in-out infinite reverse; }
.card-trainee { width: 258px; right: 12px; bottom: 0; z-index: 4; --tilt: rotateY(6deg); animation: float 12s ease-in-out infinite; animation-delay: 1.5s; }
.stage .card-ui { transform: var(--tilt); }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }
@media (prefers-reduced-motion: reduce) { .card-ui { animation: none; } }
.ui-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px; border-bottom: 1px solid #E9E5D8; }
.ui-head .t { font-weight: 700; font-size: 14px; }
.ui-head .s { font-size: 11.5px; color: #5A6B5E; }
.ui-body { padding: 12px 16px 16px; display: grid; gap: 10px; }
.crit { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 13px; }
.crit .r { font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 999px; }
.r-c { background: #E4F3E8; color: #1F7A45; } .r-n { background: #FDF0D8; color: #B26A00; } .r-na { background: #EDEAE0; color: #5A6B5E; }
.ui-meter { height: 10px; border-radius: 999px; background: #EDEAE0; overflow: hidden; }
.ui-meter i { display: block; height: 100%; background: linear-gradient(90deg, #14532D, #2F9E5F); border-radius: 999px; }
.ui-meter.amber i { background: linear-gradient(90deg, #C2410C, #F5A524); }
.ui-row { display: flex; justify-content: space-between; font-size: 12.5px; color: #5A6B5E; }
.finding { border-left: 3px solid #F5A524; padding: 8px 10px; background: #FDF7EA; font-size: 12.5px; border-radius: 6px; }
.ev { display: flex; gap: 10px; align-items: center; padding: 8px; border: 1px solid #E9E5D8; border-radius: 10px; font-size: 12.5px; }
.ev .th { width: 40px; height: 40px; border-radius: 8px; background: linear-gradient(135deg, #14532D, #0E7C86); flex: none; }
.ev .th.doc { background: linear-gradient(135deg, #2456E6, #0E7C86); }
.ev .th.audio { background: linear-gradient(135deg, #C42D78, #C2410C); }

@media (max-width: 1000px) {
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; padding-top: calc(var(--nav-h) + 36px); }
  .stage { height: 470px; max-width: 520px; margin: 0 auto; width: 100%; }
  .card-main { width: min(370px, 92%); }
  .card-iv { width: 250px; }
  .card-trainee { right: 0; width: 240px; }
}
@media (max-width: 620px) {
  .stage { height: 540px; }
  .card-iv { display: none; }
  .card-main { width: 100%; top: 10px; }
  .card-trainee { width: 86%; bottom: 0; right: 0; }
  .hero h1 { font-size: 40px; }
}

/* sections */
.section { position: relative; padding: clamp(56px, 8vw, 110px) clamp(16px, 4vw, 44px); scroll-margin-top: 80px; }
.section-inner { max-width: 1180px; margin: 0 auto; }
.section.dark { color: #F2F7F0; background: radial-gradient(90% 70% at 50% 0%, #14532D 0%, #0B2E1C 70%, #082014 100%); }
.section.cream { background: var(--bg); }
.section.teal-tint { background: linear-gradient(180deg, var(--bg), color-mix(in srgb, var(--teal) 7%, var(--bg)) 50%, var(--bg)); }
.section.amber-tint { background: linear-gradient(180deg, var(--bg), color-mix(in srgb, var(--amber-field) 9%, var(--bg)) 50%, var(--bg)); }
.section-head { max-width: 720px; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head .eyebrow { color: var(--amber-field); }
.section-head h2 { font-family: var(--display); font-weight: 500; font-size: clamp(30px, 3.6vw, 48px); letter-spacing: -.025em; line-height: 1.08; margin-bottom: 14px; }
.section-head p { font-size: clamp(16px, 1.2vw, 18px); color: var(--muted); line-height: 1.6; }
.section.dark .section-head p { color: #CFE2D4; }
.section.dark .muted { color: #9DBBA6; }

.reveal { opacity: 0; transform: translateY(26px); transition: opacity calc(800ms * var(--motion)) ease, transform calc(800ms * var(--motion)) cubic-bezier(.22, 1, .36, 1); }
.reveal.in { opacity: 1; transform: none; }
.reveal:nth-child(2) { transition-delay: 90ms; } .reveal:nth-child(3) { transition-delay: 180ms; } .reveal:nth-child(4) { transition-delay: 270ms; }

.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: minmax(0, 1fr); } }

.feature { padding: 24px; border-radius: calc(var(--r-lg) * var(--radius-scale)); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); position: relative; overflow: hidden; }
.feature::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--accent, var(--brand-2)); }
.feature h3 { font-size: 20px; margin: 10px 0 8px; font-family: var(--display); font-weight: 600; }
.feature p { color: var(--muted); font-size: 15px; line-height: 1.6; }
.feature .num { font-family: var(--mono); font-size: 12px; color: var(--accent); font-weight: 700; letter-spacing: .1em; }
.feature ul { margin: 12px 0 0; padding-left: 18px; font-size: 14px; color: var(--fg-soft); line-height: 1.65; }

/* roles: sticky column */
.roles { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(20px, 4vw, 56px); align-items: start; }
.roles .tabs { position: sticky; top: 90px; display: grid; gap: 10px; margin-bottom: 0; }
.role-tab { text-align: left; padding: 18px 20px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); cursor: pointer; transition: all calc(200ms * var(--motion)) ease; display: grid; gap: 4px; }
.role-tab:hover { border-color: var(--brand-3); }
.role-tab[aria-selected="true"] { background: var(--brand); color: #fff; border-color: var(--brand); transform: translateX(6px); box-shadow: var(--shadow-2); }
.role-tab b { font-size: 18px; font-weight: 700; }
.role-tab span { font-size: 13.5px; opacity: .8; }
.role-panels { position: relative; min-height: 520px; }
.role-panel { display: none; animation: fade calc(400ms * var(--motion)) ease; }
.role-panel.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.mock { border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-2); overflow: hidden; }
.mock .ui-head { background: var(--surface-2); }
.mock .ui-body { padding: 18px; }
.mock .crit { font-size: 14px; }
.mock.dark-ui { background: #0E2A1E; color: #EAF3EC; border-color: #1E4634; }
.mock.dark-ui .ui-head { border-color: #1E4634; }
.mock.dark-ui .ui-head .s, .mock.dark-ui .ui-row { color: #9DBBA6; }
.mock.dark-ui .ui-meter { background: #123527; }
.mock.dark-ui .ev { border-color: #1E4634; }
.role-caption { margin-top: 16px; color: var(--muted); font-size: 15px; line-height: 1.6; }
@media (max-width: 900px) {
  .roles { grid-template-columns: minmax(0, 1fr); }
  .roles .tabs { position: static; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .role-tab { padding: 12px; } .role-tab b { font-size: 14px; } .role-tab span { display: none; }
  .role-tab[aria-selected="true"] { transform: none; }
  .role-panels { min-height: 0; }
}

/* live audit table */
.audit-demo { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
@media (max-width: 900px) { .audit-demo { grid-template-columns: minmax(0, 1fr); } }
.audit-table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--surface); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-1); border: 1px solid var(--line); }
.audit-table th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); text-align: left; padding: 12px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.audit-table td { padding: 11px 14px; border-bottom: 1px solid var(--line-soft); }
.audit-table tr:last-child td { border-bottom: 0; }
.audit-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.audit-table .code { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.audit-table .exp { transition: color 200ms ease; }
.audit-table tr.bad td { background: var(--warn-bg); }
.audit-panel { position: sticky; top: 90px; padding: 20px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.audit-panel h3 { font-size: 18px; margin-bottom: 6px; }
.audit-panel p { font-size: 14px; color: var(--muted); line-height: 1.55; }
.audit-panel .stepper { margin: 12px 0; }
.audit-panel .stepper button { width: 38px; height: 36px; font-size: 18px; }
.audit-panel output { font-size: 20px; font-weight: 750; }
.audit-panel .result { font-size: 14px; line-height: 1.6; padding-top: 10px; border-top: 1px dashed var(--line); }
.audit-panel .result b { color: var(--warn); }

/* rules */
.rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.rule { padding: 20px; border-radius: var(--r-lg); background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .12); }
.rule b { display: block; font-size: 17px; margin-bottom: 6px; color: #fff; }
.rule p { font-size: 14.5px; color: #CFE2D4; line-height: 1.6; }
.rule .k { font-family: var(--mono); font-size: 11.5px; color: var(--amber-field); letter-spacing: .12em; }

/* services & pilot */
.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.service { padding: 26px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); display: grid; gap: 10px; }
.service h3 { font-family: var(--display); font-size: 24px; font-weight: 600; }
.service p { color: var(--muted); font-size: 15px; line-height: 1.6; }
.service ul { padding-left: 18px; font-size: 14.5px; color: var(--fg-soft); line-height: 1.7; }
.service .tag { justify-self: start; }
.pilot { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 32px; align-items: center; }
@media (max-width: 900px) { .pilot { grid-template-columns: minmax(0, 1fr); } }
.pilot-box { padding: 28px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-2); }
.pilot-box h3 { font-size: 22px; font-family: var(--display); margin-bottom: 8px; }
.pilot-box ol { padding-left: 20px; font-size: 15px; line-height: 1.7; color: var(--fg-soft); }
.pilot-box .cta { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }

/* roadmap */
.roadmap { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.phase { padding: 22px; border-right: 1px solid var(--line); position: relative; }
.phase:last-child { border-right: 0; }
.phase .k { font-family: var(--mono); font-size: 11.5px; letter-spacing: .12em; color: var(--muted); }
.phase h3 { font-size: 17px; margin: 6px 0 8px; }
.phase p { font-size: 14px; color: var(--muted); line-height: 1.55; }
.phase.now { background: color-mix(in srgb, var(--brand) 8%, var(--surface)); }
.phase.now::after { content: 'Now'; position: absolute; top: 12px; right: 12px; font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; background: var(--brand); color: #fff; padding: 3px 8px; border-radius: 999px; }
.phase.gated { opacity: .72; }
@media (max-width: 900px) { .roadmap { grid-template-columns: minmax(0, 1fr); } .phase { border-right: 0; border-bottom: 1px solid var(--line); } .phase:last-child { border-bottom: 0; } }

/* faq */
.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 650; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 14px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 24px; color: var(--muted); transition: transform calc(200ms * var(--motion)) ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin-top: 8px; color: var(--muted); font-size: 15.5px; line-height: 1.65; max-width: 70ch; }

/* footer */
.site-foot { padding: 40px clamp(16px, 4vw, 44px) 28px; background: #06170F; color: #9DBBA6; font-size: 14px; }
.site-foot .inner { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 28px; }
@media (max-width: 800px) { .site-foot .inner { grid-template-columns: minmax(0, 1fr); } }
.site-foot a { color: #CFE2D4; }
.site-foot .fine { margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: 12.5px; line-height: 1.6; }
.site-foot .brand { color: #fff; margin-bottom: 10px; }
.site-foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }

/* toast for front page */
#toasts { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 120; width: min(520px, calc(100% - 28px)); display: grid; gap: 8px; }