/* F3 Insights growth registry.
   Light theme only: the F3 brand palette is light ("Light & restraint"), so brand and owner rule agree.
   Glass is a web approximation (backdrop-filter, layered borders, tinted shadows), not Apple Liquid Glass. */

@font-face { font-family: "Hanken Grotesk"; src: url("/f3i-growth-register/fonts/HankenGrotesk-normal-400-900.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/f3i-growth-register/fonts/Inter-normal-400-700.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/f3i-growth-register/fonts/IBMPlexMono-normal-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/f3i-growth-register/fonts/IBMPlexMono-normal-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --ink: #0F172A;
  --navy: #1E3A6E;
  --navy-deep: #16305C;
  --mist: #7DD3FC;
  --gold: #8F6B2E;
  --paper: #F6F7F9;
  --text-2: #3A4457;       /* secondary text, darker than brand Muted #5A6473 so it holds 4.5:1 over glass on navy bands */
  --hair: rgba(15, 23, 42, .12);
  --r: 10px;               /* cards, dialog, panels (0.625rem) */
  --r-s: 3px;              /* buttons, inputs, chips (brand CTA radius) */
  --sans: "Hanken Grotesk", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --gutter: clamp(16px, 4vw, 56px);
  --ease-out: cubic-bezier(.16, 1, .3, 1);     /* entrances */
  --ease-std: cubic-bezier(.4, 0, .2, 1);      /* state changes */
  --ease-in: cubic-bezier(.4, 0, 1, 1);        /* exits */
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.6 var(--body); overflow-x: clip; -webkit-font-smoothing: antialiased; }
html:has(dialog[open]) { overflow: hidden; scrollbar-gutter: stable; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--sans); margin: 0; letter-spacing: -.02em; }
p { margin: 0; }
.wrap { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: var(--gutter); }

:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; border-radius: 2px; }
.topbar :focus-visible, .foot :focus-visible { outline-color: var(--mist); }
.skip { position: absolute; left: 16px; top: -64px; z-index: 100; background: var(--navy); color: #fff; padding: 10px 14px; border-radius: var(--r-s); }
.skip:focus { top: 8px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 22px; border-radius: var(--r-s); font: 600 15px/1 var(--sans); letter-spacing: 0; text-decoration: none; border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: transform .15s var(--ease-std), background-color .2s var(--ease-std), box-shadow .2s var(--ease-std); }
.btn:active { transform: scale(.97); }
.btn-gold { background: var(--gold); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 8px 20px -8px rgba(143,107,46,.7); }
.btn-gold:hover { background: #7d5d26; transform: translateY(-1px); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-deep); }
.btn-navy { gap: 8px; }
.btn .ext { transition: transform .2s var(--ease-out); }
.btn:hover .ext { transform: translate(2px, -2px); }
.topbar-link { color: #fff; font: 600 15px/1 var(--sans); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(255,255,255,.5); padding: 10px 4px; border-radius: 2px; }
.topbar-link:hover { text-decoration-color: #fff; }
.btn-ghost { color: #fff; border-color: rgba(255,255,255,.45); min-height: 38px; padding: 0 16px; }
.btn-ghost:hover { background: rgba(255,255,255,.12); border-color: #fff; }

/* ---------- Header / footer (navy bands, mark only) ---------- */
.topbar { position: sticky; top: 0; z-index: 40; background: var(--navy); border-bottom: 1px solid rgba(255,255,255,.08); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.mark { display: inline-flex; border-radius: 4px; }
.foot { background: var(--navy); color: #fff; padding: 36px 0; }
.foot-in { display: flex; align-items: center; gap: 16px; font: 500 16px/1.4 var(--sans); }

/* ---------- Atmosphere ribbons (what the glass blurs) ---------- */
.rb { position: absolute; display: block; pointer-events: none; }
.page-head { padding: clamp(20px, 3vw, 36px) 0 0; }
.page-head h1 { font-weight: 800; font-size: clamp(1.875rem, 3.4vw, 2.75rem); line-height: 1.1; letter-spacing: -.03em; color: var(--ink); text-wrap: balance; }
.lede { margin-top: 12px; font-size: clamp(1rem, 1.3vw, 1.125rem); line-height: 1.55; color: var(--text-2); }

/* ---------- How we work ---------- */
.how { padding: clamp(40px, 5vw, 72px) 0 clamp(40px, 5vw, 72px); }
.how h2, .registry h2, .contact h2 { font-size: clamp(1.625rem, 2.8vw, 2.25rem); font-weight: 800; line-height: 1.1; color: var(--ink); }
.how-rows { margin-top: clamp(24px, 3.5vw, 44px); border-top: 1px solid var(--ink); }
.how-row { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(16px, 4vw, 64px); padding: clamp(24px, 3vw, 40px) 0; border-bottom: 1px solid var(--hair); }
.how-row:last-child { border-bottom: 0; }
.how-row h3 { font-size: clamp(1.4rem, 2.2vw, 1.875rem); font-weight: 700; line-height: 1.15; color: var(--navy); }
.how-row p { font-size: 1.0625rem; color: var(--text-2); }

/* ---------- Registry ---------- */
.registry { position: relative; padding: clamp(16px, 2vw, 24px) 0 clamp(40px, 5vw, 72px); overflow-x: clip; }
.atmos { position: absolute; inset: 0; overflow: hidden; }
.atmos .r1 { left: -10%; top: 30%; width: 120%; height: 220px; transform: rotate(-6deg); background: linear-gradient(90deg, var(--navy-deep), var(--navy) 55%, #2c5190); }
.atmos .r2 { left: -10%; top: 66%; width: 120%; height: 200px; transform: rotate(4deg); background: linear-gradient(90deg, rgba(125,211,252,.95), rgba(125,211,252,.35) 70%, rgba(125,211,252,.8)); }
.registry .wrap { position: relative; }

.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 4px; }
.filters[hidden] { display: none; }
.seg { display: inline-flex; border: 1px solid rgba(15,23,42,.28); border-radius: var(--r-s); background: rgba(255,255,255,.7); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); overflow: hidden; }
.fbtn { min-height: 44px; padding: 0 18px; font: 600 14px/1 var(--sans); color: var(--ink); background: transparent; border: 0; cursor: pointer; transition: background-color .2s var(--ease-std), color .2s var(--ease-std); }
.seg .fbtn + .fbtn { border-left: 1px solid rgba(15,23,42,.18); }
.fbtn:hover { background: rgba(30,58,110,.1); }
.fbtn[aria-pressed="true"] { background: var(--navy); color: #fff; }
.fbtn-toggle { border: 1px solid rgba(15,23,42,.28); border-radius: var(--r-s); background: rgba(255,255,255,.7); }
.fbtn-toggle[aria-pressed="true"] { border-color: var(--navy); }
.count { margin-left: auto; font: 500 14px/1 var(--mono); color: var(--ink); background: rgba(255,255,255,.78); padding: 8px 10px; border-radius: var(--r-s); }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 2.6vw, 36px); margin-top: 20px; align-items: stretch; }
.card { position: relative; display: flex; flex-direction: column; border-radius: var(--r); overflow: hidden; isolation: isolate;
  background: linear-gradient(155deg, rgba(255,255,255,.95), rgba(255,255,255,.9));
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.85);
  box-shadow: inset 0 1px 0 #fff, inset 0 0 0 1px rgba(30,58,110,.07), 0 1px 2px rgba(15,23,42,.08), 0 18px 40px -14px rgba(22,48,92,.38);
  transition: transform .6s var(--ease-out); }
/* hover state: transform is written inline by app.js; will-change only while hovered */
.card.is-hover { will-change: transform; transition: transform .12s linear; }
.card:hover { box-shadow: inset 0 1px 0 #fff, inset 0 0 0 1px rgba(30,58,110,.12), 0 2px 4px rgba(15,23,42,.08), 0 30px 56px -16px rgba(22,48,92,.5); }
/* pointer sheen: a fixed gradient moved with transform only, so no repaint */
.sheen { position: absolute; left: 0; top: 0; width: 480px; height: 480px; z-index: -1; pointer-events: none; opacity: 0; transform: translate3d(-240px, -240px, 0);
  background: radial-gradient(circle, rgba(125,211,252,.45), rgba(125,211,252,0) 65%); transition: opacity .3s var(--ease-std); }
.card.is-hover .sheen { opacity: 1; }
.card-media { padding: 16px 16px 0; }
.card-media img { width: 100%; aspect-ratio: 800 / 350; object-fit: cover; border-radius: 6px; border: 1px solid var(--hair); background: #fff; }
.card-body { padding: 28px 32px 16px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.card-head { display: flex; align-items: center; gap: 14px; }
.app-icon { width: 44px; height: 44px; border-radius: 10px; flex: none; box-shadow: 0 0 0 1px var(--hair); background: #fff; }
.card h3 { font-size: 1.5rem; font-weight: 800; line-height: 1.1; color: var(--ink); }
.card-open { all: unset; cursor: pointer; }
.card-open::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card-open:focus-visible { outline: none; }
.card:has(.card-open:focus-visible) { outline: 2px solid var(--navy); outline-offset: 3px; }
.what { font-size: 1rem; line-height: 1.55; color: var(--ink); font-weight: 500; }
.outcome { font-size: 1rem; line-height: 1.5; color: var(--text-2); }
.facts { margin: 0; display: grid; gap: 14px; }
.facts dt { font: 700 14px/1.3 var(--sans); color: var(--navy); }
.facts dd { margin: 2px 0 0; font-size: .9375rem; line-height: 1.55; color: var(--text-2); }
.decide { padding: 12px 14px; border: 1px solid rgba(30,58,110,.22); background: rgba(30,58,110,.06); border-radius: var(--r-s); }
.decide-h, .decide dt { font: 700 14px/1.3 var(--sans); color: var(--navy); }
.decide p:last-child, .decide dd { margin: 2px 0 0; font-size: .9375rem; line-height: 1.5; color: var(--ink); }
.card-foot { position: relative; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 20px 32px 28px; margin-top: auto; border-top: 1px solid var(--hair); pointer-events: none; }
.agents { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.agents-note { font-size: .875rem; line-height: 1.45; color: var(--text-2); }
.access { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; margin-left: auto; text-align: right; pointer-events: auto; }
.access-note { font-size: .875rem; color: var(--text-2); }
.req-link { font-size: .9375rem; font-weight: 600; color: var(--navy); text-underline-offset: 3px; }
.req-link:hover { color: var(--navy-deep); }
.chip { display: inline-flex; align-items: center; min-height: 28px; padding: 3px 10px; border-radius: var(--r-s); font: 500 13px/1.3 var(--mono); }
.chip-agents { background: rgba(30,58,110,.12); color: var(--navy-deep); font-variant-numeric: tabular-nums; }
.chip-agents.is-zero { background: rgba(15,23,42,.07); color: var(--text-2); }
.card-foot .btn { min-height: 40px; padding: 0 16px; }
.card[hidden] { display: none; }

/* ---------- Contact ---------- */
.contact { position: relative; padding: clamp(48px, 7vw, 96px) 0 clamp(64px, 8vw, 120px); overflow-x: clip; }
.atmos-c .c1 { right: -8%; top: 8%; width: 36%; height: 280px; transform: rotate(-7deg); background: linear-gradient(110deg, var(--navy), #2c5190); }
.atmos-c .c2 { right: -6%; top: 52%; width: 34%; height: 180px; transform: rotate(4deg); background: linear-gradient(90deg, rgba(125,211,252,.9), rgba(125,211,252,.3)); }
.contact-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.contact h2 { outline: none; }
.intro { margin-top: 16px; font-size: 1.0625rem; color: var(--text-2); }
form { margin-top: 28px; display: grid; gap: 20px; }
.field { display: grid; gap: 8px; }
label { font: 700 15px/1.3 var(--sans); color: var(--ink); }
.req { font: 400 14px/1 var(--body); color: var(--text-2); }
select { width: 100%; font: 400 16px/1.5 var(--body); color: var(--ink); background: #fff; border: 1px solid #667189; border-radius: var(--r-s); padding: 12px 14px; min-height: 48px; }
select:focus-visible { outline: 2px solid var(--navy); outline-offset: 1px; border-color: var(--navy); }
input, textarea { width: 100%; font: 400 16px/1.5 var(--body); color: var(--ink); background: #fff; border: 1px solid #667189; border-radius: var(--r-s); padding: 12px 14px; min-height: 48px; transition: border-color .2s var(--ease-std), box-shadow .2s var(--ease-std); }
textarea { resize: vertical; min-height: 140px; }
input:hover, textarea:hover { border-color: var(--navy); }
input:focus-visible, textarea:focus-visible { outline: 2px solid var(--navy); outline-offset: 1px; border-color: var(--navy); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: #B23434; border-width: 2px; }
.err { color: #9B2C2C; font-size: .9375rem; font-weight: 500; }
.err[hidden] { display: none; }
.form-actions { margin-top: 4px; }
.form-status, .copy-status { min-height: 1.5em; font-size: .9375rem; color: var(--ink); overflow-wrap: anywhere; }
.glass { border-radius: var(--r); padding: 20px; display: grid; gap: 14px; justify-items: start;
  background: linear-gradient(155deg, rgba(255,255,255,.9), rgba(255,255,255,.8));
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.8);
  box-shadow: inset 0 1px 0 #fff, inset 0 0 0 1px rgba(30,58,110,.07), 0 1px 2px rgba(15,23,42,.08), 0 18px 40px -14px rgba(22,48,92,.38); }
.copy-panel p:first-child { font-size: 1rem; color: var(--ink); }

/* ---------- Detail dialog ---------- */
dialog { padding: 0; border: 0; background: transparent; color: var(--ink); width: min(1180px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); overflow: visible; }
dialog::backdrop { background: rgba(15,23,42,.55); opacity: 0; transition: opacity .3s var(--ease-out); }
dialog.is-open::backdrop { opacity: 1; }
dialog.is-closing::backdrop { opacity: 0; transition-duration: .2s; transition-timing-function: var(--ease-in); }
.d-shell { display: flex; flex-direction: column; max-height: calc(100dvh - 32px); overflow: auto; border-radius: var(--r); background: #fff;
  border: 1px solid rgba(255,255,255,.9); box-shadow: 0 40px 90px -20px rgba(15,23,42,.6);
  opacity: 0; transform: translateY(16px) scale(.98); transition: opacity .3s var(--ease-out), transform .4s var(--ease-out); }
dialog.is-open .d-shell { opacity: 1; transform: none; }
dialog.is-closing .d-shell { opacity: 0; transform: translateY(8px) scale(.99); transition: opacity .2s var(--ease-in), transform .2s var(--ease-in); }
.d-head { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-bottom: 1px solid var(--hair); position: sticky; top: 0; background: #fff; z-index: 2; }
.d-head h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; line-height: 1.1; flex: 1; min-width: 0; }
.d-close { flex: none; min-height: 44px; padding: 0 18px; font: 600 15px/1 var(--sans); color: var(--ink); background: #fff; border: 1px solid rgba(15,23,42,.35); border-radius: var(--r-s); cursor: pointer; }
.d-close:hover { border-color: var(--navy); background: rgba(30,58,110,.06); }
.d-main { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 36px); padding: 24px 20px 28px; align-items: start; }
.d-media img { width: 100%; height: auto; border-radius: 6px; border: 1px solid var(--hair); box-shadow: 0 16px 36px -14px rgba(22,48,92,.4); background: #fff; }
.d-body { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.d-body .what { font-size: 1.0625rem; }
.d-body .facts dd { font-size: 1rem; }
.d-foot { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; padding-top: 14px; border-top: 1px solid var(--hair); pointer-events: auto; }
.d-foot .access { align-items: flex-start; text-align: left; margin-left: 0; }
.d-foot .agents { pointer-events: auto; }

/* ---------- Entrance motion (opacity + translate only) ---------- */
.js [data-reveal] { opacity: 0; translate: 0 18px; }
.js [data-reveal].in { opacity: 1; translate: 0 0; transition: opacity .55s var(--ease-out) calc(var(--i, 0) * 70ms), translate .6s var(--ease-out) calc(var(--i, 0) * 70ms); }
.js [data-rise] { opacity: 0; translate: 0 14px; animation: rise .7s var(--ease-out) var(--d, 0ms) forwards; }
@keyframes rise { to { opacity: 1; translate: 0 0; } }
@keyframes fadein { from { opacity: 0; } }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
  .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .d-main { grid-template-columns: minmax(0, 1fr); }
  .how-row { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .atmos-c .c1 { width: 90%; top: auto; bottom: 8%; height: 220px; }
  .atmos-c .c2 { display: none; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .count { margin-left: 0; }
  .card-body { padding: 22px 22px 12px; }
  .card-foot { padding: 16px 22px 22px; }
  .access { align-items: flex-start; text-align: left; margin-left: 0; }
  .btn { white-space: normal; text-align: center; }
  .d-head { padding: 12px 14px; gap: 10px; }
  .d-main { padding: 16px 14px 22px; }
  .d-head .app-icon { width: 40px; height: 40px; }
  .atmos .r1, .atmos .r2, }

/* ---------- Fallbacks and preferences ---------- */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .card, .glass { background: #F4F7FC; }
  .seg, .fbtn-toggle, .count { background: #fff; }
  dialog::backdrop { background: rgba(15,23,42,.72); }
}
@media (prefers-reduced-transparency: reduce) {
  .card, .glass, .seg, .fbtn-toggle, .count { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
  dialog::backdrop { background: rgba(15,23,42,.72); }
}
@media (prefers-contrast: more) {
  .card, .glass { background: #fff; border-color: var(--ink); }
  :root { --text-2: #1F2937; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .card.is-hover { transform: none !important; transition: none; }
  .sheen { display: none; }
  .js [data-reveal], .js [data-rise] { translate: none; }
  .js [data-reveal].in { transition: opacity .25s linear; }
  .js [data-rise] { opacity: 0; animation: rise-fade .3s linear forwards; }
  @keyframes rise-fade { to { opacity: 1; } }
  .d-shell, dialog.is-open .d-shell, dialog.is-closing .d-shell { transform: none; transition: opacity .15s linear; }
  dialog::backdrop { transition-duration: .15s; }
  .btn .ext, .btn:hover .ext, .btn, .btn:active { transform: none; }
}

/* ---------- Contact form: honeypot, sending, result ---------- */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.btn[aria-disabled="true"] { opacity: .7; cursor: progress; }
.form-status:not(:empty) { padding: 14px 16px; border-radius: var(--r-s); background: #EAF4EC; color: #1E4D2B; font-weight: 600; }
.form-error { padding: 14px 16px; border-radius: var(--r-s); background: #FBECEC; color: #7A1F1F; font-size: .9375rem; font-weight: 500; overflow-wrap: anywhere; outline: none; }
.form-error[hidden] { display: none; }
.form-error a { color: inherit; text-decoration: underline; }
.copy-status a { color: var(--navy); font-weight: 600; }
