@import url("/_pub/fonts/fonts.css");

/* ASI Foundation site. Layout: a slim paper header, one navy cover band, then a
   12-column reading grid where each chapter sits as a rail label + statement. */
:root {
  --paper: #ffffff;
  --soft: #f2f5fa;
  --ink: #14254a;
  --muted: #53627e;
  --faint: #8a97ae;
  --line: #d8e0ec;
  --navy: #0b2a5b;
  --red: #b3192e;
  --blue: #2c78c9;
  --blue-soft: #dcebfa;
  --band: #061530;
  --band-muted: #b9c6de;
  --red-on-navy: #e8344a;
  --dot: rgba(11, 42, 91, .055);
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --band-bg: radial-gradient(1500px 1000px at 26% 24%, #123a76 0%, #0b2a5b 34%, #061530 78%);
  --gutter: max(20px, env(safe-area-inset-left, 0px));
  --gutter-r: max(20px, env(safe-area-inset-right, 0px));
  --max: 1120px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0a1428; --soft: #0f1c35; --ink: #e6ecf8; --muted: #a6b4cd; --faint: #7486a6;
    --line: #243659; --navy: #c9dbff; --red: #ff6b7a; --blue: #79b6f2; --blue-soft: #15304f;
    --dot: rgba(255, 255, 255, .045);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body {
  margin: 0;
  background-color: var(--paper);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
img, video, svg { max-width: 100%; }
.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }

/* Type */
.eyebrow { font: 700 12px/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--red); }
.mono { font-family: var(--mono); font-size: 12.5px; letter-spacing: .01em; font-variant-numeric: tabular-nums; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.018em; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(34px, 5.4vw, 60px); line-height: 1.06; }
h2 { font-size: clamp(26px, 3.4vw, 38px); line-height: 1.14; }
h3 { font-size: 20px; line-height: 1.3; }
p { margin: 0; }
.lede { font: 400 clamp(19px, 2.3vw, 23px)/1.45 var(--serif); color: var(--muted); max-width: 40em; text-wrap: pretty; }
.prose { display: grid; gap: 14px; max-width: 38em; color: var(--muted); }
.prose strong { color: var(--ink); font-weight: 600; }

/* Header */
.site-head { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: saturate(1.2) blur(10px); -webkit-backdrop-filter: saturate(1.2) blur(10px); border-bottom: 1px solid var(--line); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--paper); }
.site-head .wrap { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; flex: 0 0 auto; }
.brand .tile { width: 30px; height: 30px; border-radius: 6px; background: #fff; display: grid; place-items: center; box-shadow: 0 0 0 1px var(--line); }
.brand .tile img { width: 24px; height: auto; display: block; }
.brand span { font: 600 16px/1 var(--serif); letter-spacing: -.01em; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { font: 500 14px/1 var(--sans); color: var(--muted); text-decoration: none; padding: 9px 11px; border-radius: 6px; white-space: nowrap; }
.nav a:hover { color: var(--ink); background: var(--soft); }
.nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--red); border-radius: 0; }
.nav .out { color: var(--faint); margin-left: 8px; }
@media (max-width: 720px) {
  .site-head .wrap { height: auto; flex-wrap: wrap; gap: 0; padding-block: 10px 0; }
  .brand { height: 40px; }
  .nav { width: 100%; margin: 0 0 0 -11px; padding-bottom: 4px; }
}

/* Navy band */
.band { background: var(--band-bg); color: #fff; border-bottom: 4px solid #b3192e; position: relative; overflow: hidden; }
.band::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='720' height='340' fill='none' stroke='%23ffffff' stroke-opacity='.06' stroke-width='2'%3E%3Cpath d='M0 58h240l30 30h190'/%3E%3Ccircle cx='466' cy='88' r='6'/%3E%3Cpath d='M90 138h170l40-40h130'/%3E%3Ccircle cx='436' cy='98' r='6'/%3E%3Cpath d='M0 218h310l30 30h210'/%3E%3Ccircle cx='556' cy='248' r='6'/%3E%3Cpath d='M150 290h230l30-30h100'/%3E%3Ccircle cx='516' cy='260' r='5'/%3E%3Cpath d='M280 22h130l30 30h150'/%3E%3Ccircle cx='596' cy='52' r='6'/%3E%3Cpath d='M420 176h120l26 26h130'/%3E%3Ccircle cx='702' cy='202' r='5'/%3E%3C/svg%3E") right -60px top 40% / auto 115% no-repeat;
}
.band > .wrap { position: relative; }
.band .eyebrow { color: var(--red-on-navy); }
.band .lede { color: var(--band-muted); }
.band .mono { color: var(--band-muted); }

.hero .wrap { display: grid; gap: 28px; padding-block: clamp(56px, 9vw, 104px) clamp(48px, 7vw, 80px); }
.hero h1 { max-width: 15em; }
.hero .lede { max-width: 36em; }

/* Film player */
.player { position: relative; width: 100%; aspect-ratio: 16 / 9; max-width: 100%; background: #000; border-radius: 10px; overflow: hidden; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 30px 80px rgba(0, 0, 0, .35); }
.player video { width: 100%; height: 100%; display: block; object-fit: contain; background: #000; }
.film-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; }

/* Key figures */
.figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.figures > div { padding: 30px 24px 28px 0; display: grid; gap: 8px; align-content: start; }
.figures > div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.figures .v { font: 600 clamp(30px, 3.6vw, 42px)/1 var(--serif); letter-spacing: -.02em; color: var(--navy); font-variant-numeric: tabular-nums; }
.figures .k { font-size: 14px; line-height: 1.45; color: var(--ink); }
.figures .s { color: var(--faint); }
@media (max-width: 860px) {
  .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .figures > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .figures > div:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 460px) {
  .figures { grid-template-columns: 1fr; }
  .figures > div, .figures > div + div { padding-left: 0; border-left: 0; }
  .figures > div + div { border-top: 1px solid var(--line); }
}

/* Chapters */
.chapters { background-image: radial-gradient(circle, var(--dot) 1.2px, transparent 1.7px); background-size: 26px 26px; }
.chapter { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px 48px; padding-block: clamp(56px, 7vw, 88px); border-bottom: 1px solid var(--line); }
.chapter:last-child { border-bottom: 0; }
.rail { display: grid; gap: 10px; align-content: start; position: sticky; top: 92px; }
.rail .n { font: 500 13px/1 var(--mono); color: var(--red); letter-spacing: .04em; }
.rail .t { font: 700 12px/1.35 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }
.rail .ts { font: 400 12px/1 var(--mono); color: var(--faint); text-decoration: none; }
.rail .ts:hover { color: var(--blue); }
.body { display: grid; gap: 22px; min-width: 0; }
.body h2 { max-width: 20em; }
.source { font: 400 12px/1.5 var(--mono); color: var(--faint); max-width: 60em; }
.source b { font-weight: 500; color: var(--muted); }
@media (max-width: 820px) {
  .chapter { grid-template-columns: 1fr; gap: 18px; }
  .rail { position: static; grid-auto-flow: column; justify-content: start; gap: 14px; align-items: baseline; }
}

/* Chapter devices */
.ticks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 0 32px; max-width: 46em; }
.ticks li { padding: 13px 0 13px 26px; border-top: 1px solid var(--line); position: relative; font-size: 15px; line-height: 1.45; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 20px; width: 10px; height: 2px; background: var(--red); }
.strike { display: grid; gap: 4px; font: 600 clamp(28px, 4vw, 44px)/1.1 var(--serif); letter-spacing: -.02em; }
.strike s { color: var(--faint); text-decoration-thickness: 3px; text-decoration-color: var(--red); }
.strike span { color: var(--blue); }
.pillars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 2px solid var(--ink); }
.pillars > div { padding: 18px 20px 4px 0; display: grid; gap: 8px; align-content: start; }
.pillars > div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.pillars h3 { font-size: 18px; }
.pillars p { font-size: 14.5px; color: var(--muted); line-height: 1.5; }
@media (max-width: 860px) {
  .pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pillars > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .pillars > div:nth-child(n+3) { margin-top: 18px; border-top: 1px solid var(--line); }
}
@media (max-width: 460px) {
  .pillars { grid-template-columns: 1fr; }
  .pillars > div, .pillars > div + div { padding-left: 0; border-left: 0; }
  .pillars > div + div { margin-top: 12px; border-top: 1px solid var(--line); }
}
.bars { display: grid; gap: 14px; max-width: 40em; }
.bar { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 14px; align-items: center; font-size: 14px; }
.bar .track { height: 28px; background: var(--soft); border-radius: 3px; overflow: hidden; }
.bar .fill { height: 100%; display: flex; align-items: center; justify-content: flex-end; padding-right: 10px; font: 500 12.5px/1 var(--mono); color: #fff; }
.bar.cn .fill { background: var(--faint); }
.bar.us .fill { background: var(--navy); }
@media (prefers-color-scheme: dark) { .bar.us .fill { color: #0a1428; } }
@media (max-width: 520px) { .bar { grid-template-columns: 1fr; gap: 6px; } }
.cost { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; max-width: 46em; border-top: 1px solid var(--line); }
.cost > div { padding: 16px 16px 0 0; display: grid; gap: 4px; }
.cost .v { font: 600 26px/1.1 var(--serif); color: var(--navy); font-variant-numeric: tabular-nums; }
.cost .k { font-size: 13.5px; color: var(--muted); line-height: 1.4; }
@media (max-width: 520px) { .cost { grid-template-columns: 1fr; } .cost > div { padding-bottom: 12px; border-bottom: 1px solid var(--line); } }
.triangle { max-width: 520px; width: 100%; }
.triangle text { font-family: var(--sans); }
.plan { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 2px solid var(--ink); max-width: 100%; }
.plan > div { padding: 16px 18px 0 0; display: grid; gap: 6px; align-content: start; }
.plan > div + div { padding-left: 18px; border-left: 1px solid var(--line); }
.plan .when { font: 500 12px/1.2 var(--mono); color: var(--red); letter-spacing: .03em; text-transform: uppercase; }
.plan p { font-size: 14.5px; color: var(--muted); line-height: 1.5; }
@media (max-width: 860px) {
  .plan { grid-template-columns: 1fr 1fr; }
  .plan > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .plan > div:nth-child(n+3) { margin-top: 16px; border-top: 1px solid var(--line); }
}
@media (max-width: 460px) { .plan { grid-template-columns: 1fr; } .plan > div, .plan > div + div { padding-left: 0; border-left: 0; } .plan > div + div { margin-top: 12px; border-top: 1px solid var(--line); } }

/* Closing band */
.close .wrap { display: grid; gap: 22px; padding-block: clamp(64px, 9vw, 112px); }
.close .stack { font: 600 clamp(30px, 4.6vw, 52px)/1.08 var(--serif); letter-spacing: -.02em; display: grid; }
.close .stack span:last-child { color: var(--red-on-navy); }
.close .tag { font: italic 400 clamp(19px, 2.3vw, 24px)/1.4 var(--serif); color: var(--band-muted); }

/* Materials */
.materials .wrap { padding-block: clamp(56px, 7vw, 88px); display: grid; gap: 28px; }
.docs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.doc { display: grid; gap: 10px; align-content: start; padding: 22px 22px 20px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; text-decoration: none; transition: border-color .15s, transform .15s; min-width: 0; }
.doc:hover { border-color: var(--navy); transform: translateY(-2px); }
.doc .kind { font: 500 12px/1 var(--mono); color: var(--red); letter-spacing: .04em; text-transform: uppercase; }
.doc h3 { font-size: 21px; }
.doc p { font-size: 14.5px; color: var(--muted); line-height: 1.5; }
.doc .ver { font: 400 12px/1.4 var(--mono); color: var(--faint); margin-top: 4px; }
.doc .go { font: 600 14px/1 var(--sans); color: var(--blue); margin-top: 6px; }
@media (max-width: 860px) { .docs { grid-template-columns: 1fr; } }

/* Document viewer pages */
.viewer-head .wrap { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 28px; padding-block: 36px 24px; }
.viewer-head h1 { font-size: clamp(28px, 4vw, 40px); }
.viewer-head .meta { display: grid; gap: 4px; justify-items: end; text-align: right; }
@media (max-width: 640px) { .viewer-head .meta { justify-items: start; text-align: left; } }
.viewer { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--soft); }
.viewer iframe { display: block; width: 100%; border: 0; min-height: 80vh; background: #fff; }
.notice { font: 400 12px/1.5 var(--mono); color: var(--faint); }

/* Film page */
.films .wrap { display: grid; gap: clamp(56px, 8vw, 96px); padding-block: 40px clamp(56px, 8vw, 96px); }
.film { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px 36px; align-items: start; }
.film .player { grid-column: 1; }
.film .side { display: grid; gap: 16px; align-content: start; }
.chaps { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.chaps button { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: 52px 1fr; gap: 10px; width: 100%; padding: 9px 4px; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.35; color: var(--ink); }
.chaps button:hover { background: var(--soft); }
.chaps button:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.chaps button.on { color: var(--blue); }
.chaps .t { font: 400 12.5px/1.35 var(--mono); color: var(--faint); padding-top: 1px; }
.chaps button.on .t { color: var(--blue); }
@media (max-width: 900px) { .film { grid-template-columns: 1fr; } }

/* Contact and legal */
.page .wrap { padding-block: clamp(48px, 7vw, 88px); display: grid; gap: 28px; }
.contacts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 2px solid var(--ink); max-width: 60em; }
.contacts > div { padding: 18px 20px 0 0; display: grid; gap: 6px; align-content: start; }
.contacts > div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.contacts .k { font: 700 12px/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.contacts a { font: 600 16px/1.4 var(--sans); color: var(--navy); text-decoration: none; overflow-wrap: normal; }
.contacts a:hover { text-decoration: underline; }
.contacts p { font-size: 14px; color: var(--muted); }
@media (max-width: 760px) { .contacts { grid-template-columns: 1fr; } .contacts > div + div { padding-left: 0; border-left: 0; margin-top: 14px; border-top: 1px solid var(--line); } }
.legal { max-width: 46em; display: grid; gap: 14px; color: var(--muted); }
.legal h2 { font-size: 22px; color: var(--ink); margin-top: 18px; }
.legal ul { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.legal a { color: var(--blue); }
.legal strong { color: var(--ink); font-weight: 600; }

/* Footer */
.site-foot { border-top: 1px solid var(--line); background: var(--soft); }
.site-foot .wrap { display: grid; gap: 22px; padding-block: 36px max(40px, env(safe-area-inset-bottom, 0px)); }
.foot-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 14px; }
.foot-links a { color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--ink); text-decoration: underline; }
.disclaimer { font-size: 12.5px; line-height: 1.6; color: var(--faint); max-width: 72em; }
.copy { font: 400 12px/1.4 var(--mono); color: var(--faint); }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* Back link */
.back { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; font: 500 14px/1 var(--sans); color: var(--muted); text-decoration: none; padding: 8px 12px 8px 10px; border: 1px solid var(--line); border-radius: 999px; transition: color .15s, border-color .15s; }
.back:hover { color: var(--ink); border-color: var(--navy); }
.back span { font-size: 15px; transition: transform .15s; }
.back:hover span { transform: translateX(-2px); }

/* Notice shown once after sign-in */
.notice-modal { width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); overflow: auto; padding: 32px 32px 26px; border: 1px solid var(--line); border-top: 4px solid #b3192e; border-radius: 12px; background: var(--paper); color: var(--ink); box-shadow: 0 30px 80px rgba(6, 21, 48, .35); }
.notice-modal::backdrop { background: rgba(6, 21, 48, .62); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.notice-modal h2 { font-size: 26px; margin: 8px 0 16px; }
.notice-modal ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 0; }
.notice-modal li { padding: 11px 0 11px 22px; border-top: 1px solid var(--line); position: relative; font-size: 15px; line-height: 1.5; color: var(--muted); }
.notice-modal li::before { content: ""; position: absolute; left: 2px; top: 20px; width: 8px; height: 2px; background: var(--red); }
.notice-modal .actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 22px; }
.notice-modal .actions a { font-size: 14px; color: var(--muted); }
.notice-modal button { font: 600 15px/1 var(--sans); color: #fff; background: #0b2a5b; border: 0; border-radius: 8px; padding: 13px 22px; cursor: pointer; }
.notice-modal button:hover { background: #123a76; }
@media (prefers-color-scheme: dark) { .notice-modal button { background: #fff; color: #061530; } .notice-modal button:hover { background: #dfe7f5; } }
@media (max-width: 480px) { .notice-modal { padding: 26px 20px 20px; } }

@media print { body { display: none !important; } }
