/* Self-hosted brand fonts (Montserrat headlines, Inter body) */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/inter-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/inter-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/montserrat-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/montserrat-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 800; font-display: swap; src: url('/fonts/montserrat-latin-800-normal.woff2') format('woff2'); }

/* The Stormatory — home page */
:root {
  --storm-blue: #001F40; --deep: #00142B; --panel: #0A2E57;
  --sky: #00A4F7; --sky-ink: #006FAB; --silver: #F5F5F5; --orange: #FF8006;
  --ink-soft: #3D5470; --line: #D6DEE8;
  --head: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  --body: 'Inter', -apple-system, 'Segoe UI', Arial, sans-serif;
  --gutter: clamp(16px, 5vw, 64px);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
html { scroll-behavior: smooth; }
body { background: var(--deep); color: var(--silver); font-family: var(--body); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }

h2 { font-family: var(--head); font-weight: 800; font-size: clamp(28px, 3.6vw, 42px); line-height: 1.1; letter-spacing: -0.01em; margin: 0 0 28px; }
h3 { font-family: var(--head); font-weight: 800; }

.btn { display: inline-block; padding: 14px 24px; border-radius: 999px; font-family: var(--head); font-weight: 700; font-size: 15px; text-decoration: none; transition: filter .15s ease, transform .15s ease; }
.btn-primary { background: var(--orange); color: var(--storm-blue); }
.btn-ghost { border: 2px solid var(--sky); padding: 12px 22px; }
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }

/* header */
.site-header { position: absolute; inset: 0 0 auto 0; z-index: 5; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 18px; padding-bottom: 18px; }
.logo-link img { display: block; height: 40px; width: auto; }
nav { display: flex; align-items: center; gap: 24px; font-weight: 500; font-size: 15px; }
nav a { text-decoration: none; opacity: .85; }
nav a:hover { opacity: 1; }
.nav-cta { opacity: 1; padding: 9px 16px; border-radius: 999px; border: 2px solid var(--orange); font-weight: 600; }

/* hero */
.set { position: relative; overflow: hidden; background: url('/img/lab-bg.webp') center 30% / cover no-repeat; }
.set::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,20,43,.94) 0%, rgba(0,20,43,.78) 40%, rgba(0,20,43,.25) 72%), linear-gradient(0deg, var(--deep) 0%, rgba(0,20,43,0) 28%); }
.set-grid { position: relative; z-index: 2; display: grid; grid-template-columns: 1.05fr .95fr; align-items: end; min-height: min(92vh, 860px); padding-top: 96px; }
.copy { padding-bottom: 88px; }
.kicker { font-family: var(--head); font-weight: 700; font-size: 18px; color: var(--sky); margin: 0 0 10px; }
h1 { font-family: var(--head); font-weight: 800; font-size: clamp(44px, 6.6vw, 88px); line-height: .98; letter-spacing: -0.02em; margin: 0 0 22px; max-width: 10ch; }
.lede { font-size: 19px; max-width: 30em; margin: 0 0 30px; opacity: .92; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.schedule { margin: 26px 0 0; font-size: 14px; color: rgba(245,245,245,.65); }

.stage { position: relative; align-self: end; justify-self: center; width: min(100%, 560px); aspect-ratio: 1 / 1.12; }
.rings { position: absolute; left: 0; right: 0; top: 4%; width: 100%; aspect-ratio: 1; }
.rings circle, .rings line { fill: none; stroke: rgba(0,164,247,.30); stroke-width: 1.3; }
.rings circle:first-child { stroke: rgba(0,164,247,.55); stroke-width: 1.8; }
.rings .echo { fill: var(--sky); stroke: none; opacity: .7; }
.rings .e1 { fill: var(--orange); opacity: .95; }
.sweep {
  position: absolute; left: 0; right: 0; top: 4%; width: 100%; aspect-ratio: 1; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(0,164,247,0) 0deg, rgba(0,164,247,0) 300deg, rgba(0,164,247,.28) 358deg, rgba(0,164,247,.6) 360deg);
  -webkit-mask: radial-gradient(circle, #000 70%, transparent 71%); mask: radial-gradient(circle, #000 70%, transparent 71%);
  animation: sweep 2.6s cubic-bezier(.45,.05,.25,1) .3s 1 both;
}
@keyframes sweep { 0% { transform: rotate(-90deg); opacity: 1; } 85% { opacity: 1; } 100% { transform: rotate(270deg); opacity: 0; } }
.storm { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); height: 96%; width: auto; filter: drop-shadow(0 20px 30px rgba(0,0,0,.45)); }

/* sections */
.section { padding: 88px 0; }
.light { background: var(--silver); color: var(--storm-blue); }
.flush-top { padding-top: 8px; }

/* now showing */
.feature { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; }
.screen { position: relative; display: block; border-radius: 18px; overflow: hidden; border: 6px solid #0E2747; box-shadow: 0 0 0 1px rgba(0,164,247,.35), 0 30px 60px rgba(0,0,0,.45); }
.screen img { display: block; width: 100%; height: auto; }
.play { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: 76px; height: 76px; border-radius: 50%; background: var(--orange); display: grid; place-items: center; }
.play::before { content: ""; border-left: 22px solid var(--storm-blue); border-top: 14px solid transparent; border-bottom: 14px solid transparent; margin-left: 6px; }
.credit { font-size: 12px; color: rgba(245,245,245,.55); margin: 0 0 14px; }
.when { color: var(--sky); font-weight: 600; font-size: 15px; margin: 0 0 8px; }
.feature h3 { font-size: clamp(26px, 3vw, 36px); line-height: 1.15; margin: 0 0 14px; }
.feature-desc { margin: 0 0 22px; color: rgba(245,245,245,.8); }
.next { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.next li { padding: 18px 20px; border-radius: 14px; background: var(--panel); }
.next span { display: block; font-size: 14px; color: var(--sky); font-weight: 600; }
.next strong { font-family: var(--head); font-size: 18px; }

/* alert decoder */
.decoder-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 48px; align-items: start; }
.decoder-intro p { color: var(--ink-soft); margin: 0 0 24px; max-width: 30em; }
.key p { margin: 0 0 10px; color: var(--storm-blue); font-size: 16px; padding-left: 21px; text-indent: -21px; }
.key .dot { margin-right: 10px; }
.dot { display: inline-block; flex-shrink: 0; width: 11px; height: 11px; border-radius: 50%; }
.dot-warning, .kind-warning .dot { background: var(--orange); }
.dot-watch, .kind-watch .dot { background: var(--sky); }
.dot-advisory, .kind-advisory .dot { background: #8FA6BE; }
.kind-other .dot { background: #C9D3DE; }
.decoder-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 8px 24px 20px; }
.decoder { list-style: none; margin: 0; padding: 0; }
.alert-row { display: grid; grid-template-columns: auto 1fr auto; column-gap: 12px; align-items: baseline; padding: 16px 0; border-bottom: 1px solid var(--line); }
.alert-row .dot { transform: translateY(-1px); }
.alert-name { font-family: var(--head); font-weight: 700; font-size: 17px; }
.alert-count { font-size: 14px; font-weight: 600; color: var(--sky-ink); white-space: nowrap; }
.alert-desc { grid-column: 2 / -1; font-size: 15px; color: var(--ink-soft); margin-top: 2px; }
.quiet { padding: 22px 0; color: var(--ink-soft); }
.alerts-meta { margin: 14px 0 6px; font-size: 13px; color: var(--ink-soft); }
.disclaimer { margin: 0; font-size: 13px; color: var(--ink-soft); }

/* playlists */
.band-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.band-head h2 { margin-bottom: 28px; }
.text-link { font-weight: 600; color: var(--sky-ink); text-underline-offset: 4px; }
.playlists { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: 48px; border-top: 1px solid var(--line); }
.playlists a { display: flex; flex-direction: column; padding: 18px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.playlists strong { font-family: var(--head); font-weight: 700; font-size: 18px; }
.playlists span { color: var(--ink-soft); font-size: 15px; }
.playlists a:hover strong { color: var(--sky-ink); }

/* desk */
.desk-quote { margin: -8px 0 32px; font-family: var(--head); font-weight: 600; font-size: clamp(22px, 2.8vw, 32px); line-height: 1.3; max-width: 26em; color: rgba(245,245,245,.92); }
.desk { display: grid; grid-template-columns: 1.15fr .85fr; gap: 20px; }
.desk article { border-radius: 20px; padding: 32px; }
.desk h3 { font-size: 24px; margin: 0 0 6px; }
.brew { background: var(--panel); border-top: 4px solid var(--orange); }
.brew-when { margin: 0 0 16px; color: var(--sky); font-weight: 600; font-size: 15px; }
.brew-lede { margin: 0 0 12px; color: rgba(245,245,245,.92); }
.brew ul { margin: 0 0 22px; padding-left: 20px; color: rgba(245,245,245,.85); }
.brew li { margin-bottom: 6px; }
.sheet { border: 1px solid rgba(0,164,247,.35); }
.sheet img { width: 56px; height: auto; display: block; margin-bottom: 14px; }
.sheet p { margin: 0 0 24px; color: rgba(245,245,245,.8); }

/* footer */
.site-footer { padding: 32px 0 48px; font-size: 15px; border-top: 1px solid rgba(0,164,247,.18); }
.links { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-bottom: 14px; }
.links a { text-decoration: none; opacity: .85; }
.links a:hover { opacity: 1; text-decoration: underline; }
.fine { margin: 0; font-size: 13px; color: rgba(245,245,245,.55); }

/* responsive */
@media (max-width: 960px) {
  .decoder-grid, .desk { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 900px) {
  .set::after { background: linear-gradient(0deg, var(--deep) 8%, rgba(0,20,43,.82) 50%, rgba(0,20,43,.45) 100%); }
  .set-grid { grid-template-columns: 1fr; min-height: 0; padding-top: 84px; }
  .stage { order: -1; width: min(100%, 360px); }
  .copy { padding-bottom: 56px; }
  .feature { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .logo-link img { height: 32px; }
  .next, .playlists { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .flush-top { padding-top: 0; }
  .decoder-card { padding: 4px 18px 16px; }
  .desk article { padding: 26px 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .sweep { animation: none; opacity: 0; }
  .btn { transition: none; }
  html { scroll-behavior: auto; }
}
.text-link--dark { color: var(--sky); }
.next-teaser { margin-top: 36px; display: flex; align-items: center; justify-content: space-between; gap: 16px 28px; flex-wrap: wrap; padding: 22px 26px; border-radius: 16px; background: var(--panel); border-left: 4px solid var(--orange); }
.next-teaser p { margin: 0; color: rgba(245,245,245,.88); max-width: 40em; }
.next-teaser strong { color: var(--silver); font-family: var(--head); }
.screen img[src="/img/lab-bg.webp"] { aspect-ratio: 16 / 9; object-fit: cover; }

/* Header: logo left, menu links centered, Cheat sheet button right (Ryan, Oct 29) */
.bar { display: grid; grid-template-columns: 1fr auto 1fr; }
.bar > .logo-link { justify-self: start; }
.bar > nav { justify-self: center; }
.bar > .nav-cta { justify-self: end; text-decoration: none; font-size: 15px; font-weight: 600; white-space: nowrap; }

/* Latest Shorts strip */
.shorts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.short { display: block; text-decoration: none; }
.short img { display: block; width: 100%; aspect-ratio: 9 / 16; height: auto; object-fit: cover; border-radius: 14px; background: var(--panel); box-shadow: 0 0 0 1px rgba(0,164,247,.25); transition: transform .2s ease; }
.short:hover img { transform: translateY(-4px); }
.short-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 10px; font-size: 14px; font-weight: 600; line-height: 1.35; color: rgba(245,245,245,.9); }
@media (max-width: 960px) { .shorts { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) {
  .shorts { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: var(--gutter); gap: 12px; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter) 8px; scrollbar-width: none; }
  .shorts li { flex: 0 0 42%; scroll-snap-align: start; }
}
@media (prefers-reduced-motion: reduce) { .short img { transition: none; } }
@media (max-width: 900px) { .set { background-image: url('/img/lab-bg-960.webp'); } }

/* Skip link for keyboard and screen reader users: hidden until focused */
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 16px; border-radius: 999px; background: var(--orange); color: var(--storm-blue); font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }
.shorts-credit { margin: -18px 0 16px; }

/* Scroll-in reveals (paired with reveal.js). Only active once reveal.js adds .reveal-on. */
.reveal-on [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1);
}
.reveal-on [data-reveal].is-in { opacity: 1; transform: none; }
.reveal-on [data-reveal="left"]  { transform: translateX(-32px); }
.reveal-on [data-reveal="right"] { transform: translateX(32px); }
.reveal-on [data-reveal="left"].is-in, .reveal-on [data-reveal="right"].is-in { transform: none; }

/* Kit "Website signup" form (embedded via JavaScript) restyled to match the site.
   Kit sets inline styles, so these overrides use !important. */
.kit-embed { margin: 4px 0 0; }
.kit-embed .formkit-form { max-width: none !important; width: 100% !important; margin: 0 !important; padding: 0 !important; border: 0 !important; background: transparent !important; box-shadow: none !important; }
.kit-embed .formkit-form > div, .kit-embed [data-style] { padding: 0 !important; background: transparent !important; }
/* The page already has its own heading and description. */
.kit-embed .formkit-header, .kit-embed .formkit-subheader,
.kit-embed [data-element="header"], .kit-embed [data-element="subheader"] { display: none !important; }
.kit-embed .formkit-fields { display: flex !important; flex-wrap: wrap !important; gap: 10px !important; margin: 0 !important; }
.kit-embed .formkit-field { flex: 1 1 220px !important; margin: 0 !important; }
.kit-embed .formkit-input {
  width: 100% !important; height: 50px !important; padding: 0 20px !important;
  border-radius: 999px !important; border: 2px solid rgba(0, 164, 247, .55) !important;
  background: #fff !important; color: #001F40 !important;
  font-family: 'Inter', -apple-system, 'Segoe UI', Arial, sans-serif !important; font-size: 16px !important;
}
.kit-embed .formkit-input:focus { outline: 3px solid #00A4F7 !important; outline-offset: 2px !important; }
.kit-embed .formkit-submit {
  flex: 0 0 auto !important; height: 50px !important; margin: 0 !important; padding: 0 24px !important;
  border-radius: 999px !important; border: 0 !important;
  background: #FF8006 !important; color: #001F40 !important;
  font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif !important; font-weight: 700 !important; font-size: 15px !important;
}
.kit-embed .formkit-submit > span { padding: 0 !important; }
.kit-embed .formkit-submit:hover { filter: brightness(1.08); }
.kit-embed .formkit-alert-success, .kit-embed .formkit-alert-error { margin: 12px 0 0 !important; border-radius: 12px !important; font-family: 'Inter', Arial, sans-serif !important; }
.kit-fallback { margin: 12px 0 0; font-size: 13px; opacity: .75; }
.kit-fallback a { color: inherit; }

/* Kit's template wraps the form in two padded columns; the first (heading) one has a light background. */
.kit-embed .formkit-column { padding: 0 !important; background: transparent !important; border: 0 !important; }
.kit-embed .formkit-column:has(.formkit-header), .kit-embed .formkit-background { display: none !important; }
/* Small print, readable on the navy bands. */
.kit-embed .formkit-guarantee, .kit-embed .formkit-guarantee * { color: rgba(245, 245, 245, .72) !important; font-size: 13px !important; margin: 12px 0 0 !important; text-align: left !important; }
.kit-embed .formkit-powered-by-convertkit-container { margin: 10px 0 0 !important; display: flex !important; justify-content: flex-start !important; }
/* "Built with Kit" badge is a dark SVG; invert it so it reads on navy. */
.kit-embed .formkit-powered-by-convertkit { filter: invert(1) !important; opacity: .55 !important; margin: 0 !important; }

/* "See what's inside" link to /newsletter under the signup forms */
.nl-more { margin: 12px 0 0 !important; font-size: 15px; font-weight: 600; }
.nl-more a { color: var(--sky, #00A4F7); text-decoration: none; }
.nl-more a:hover { text-decoration: underline; }

/* Phone and tablet menu (Ryan, Nov 1, 2026): below 960px the links fold into a Menu button
   that opens a full width list with large tap targets. Shared by every page (bundled into
   sub.css and home.bundle.css). Script: public/nav.js. */
.menu-btn { display: none; }
@media (max-width: 960px) {
  .site-header { z-index: 20; }
  .bar { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; }
  .bar > .nav-cta { justify-self: end; }
  .menu-btn {
    display: inline-flex; align-items: center; gap: 8px; justify-self: end;
    min-height: 44px; padding: 0 14px; border-radius: 999px;
    border: 2px solid rgba(245, 245, 245, .35); background: transparent; color: var(--silver);
    font: 600 15px/1 var(--body); cursor: pointer;
  }
  .menu-btn:hover { border-color: var(--silver); }
  .menu-icon { position: relative; width: 18px; height: 2px; background: currentColor; border-radius: 2px; transition: background .15s ease; }
  .menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .2s ease; }
  .menu-icon::before { top: -6px; }
  .menu-icon::after { top: 6px; }
  .site-header.open .menu-icon { background: transparent; }
  .site-header.open .menu-icon::before { transform: translateY(6px) rotate(45deg); }
  .site-header.open .menu-icon::after { transform: translateY(-6px) rotate(-45deg); }

  .site-header .bar > nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0; width: 100%; justify-self: stretch;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 6px var(--gutter) 22px; background: var(--storm-blue);
    border-top: 1px solid rgba(0, 164, 247, .25); box-shadow: 0 18px 30px rgba(0, 10, 25, .45);
  }
  .site-header.open .bar > nav { display: flex; }
  .site-header .bar > nav > a {
    display: block; padding: 15px 2px; font-size: 18px; font-weight: 600; opacity: 1;
    border-bottom: 1px solid rgba(245, 245, 245, .1);
  }
  .site-header .bar > nav > a:last-child { border-bottom: 0; }
  .site-header .bar > nav > a[aria-current="page"] { color: var(--sky); text-decoration: none; }
}
@media (max-width: 640px) {
  /* Phones: icon-only menu button so logo, Cheat sheet and Menu fit on one row */
  .bar { gap: 8px; }
  .bar > .nav-cta { padding: 9px 12px; font-size: 14px; }
  .menu-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .menu-btn { width: 44px; height: 44px; justify-content: center; padding: 0; }
  .site-header .logo-link img { height: 28px; }
}
@media (max-width: 360px) {
  .site-header .logo-link img { height: 24px; }
  .bar > .nav-cta { padding: 8px 10px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { .menu-icon, .menu-icon::before, .menu-icon::after { transition: none; } }

/* Phones: smaller Dr. Storm so the headline and buttons show on the first screen (Ryan, Nov 1, 2026) */
@media (max-width: 640px) {
  .set .stage { width: min(62%, 240px); }
  .set-grid { padding-top: 76px; }
  .topic-hero .pose { width: 96px; }
}

/* Menu opening animation (Ryan, Nov 1, 2026): same easing as the scroll-in reveals.
   The panel drops in, then each link fades and rises in turn. */
@keyframes nav-panel-in { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@keyframes nav-link-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (max-width: 960px) {
  .site-header.open .bar > nav { animation: nav-panel-in .35s cubic-bezier(.2, .7, .2, 1) both; }
  .site-header.open .bar > nav > a { animation: nav-link-in .55s cubic-bezier(.2, .7, .2, 1) both; }
  .site-header.open .bar > nav > a:nth-child(1) { animation-delay: .05s; }
  .site-header.open .bar > nav > a:nth-child(2) { animation-delay: .10s; }
  .site-header.open .bar > nav > a:nth-child(3) { animation-delay: .15s; }
  .site-header.open .bar > nav > a:nth-child(4) { animation-delay: .20s; }
  .site-header.open .bar > nav > a:nth-child(5) { animation-delay: .25s; }
  .site-header.open .bar > nav > a:nth-child(6) { animation-delay: .30s; }
}
@media (prefers-reduced-motion: reduce) {
  .site-header.open .bar > nav, .site-header.open .bar > nav > a { animation: none; }
}
