/* Home and sign-in: hero on the left, glass card on the right. Colours, background and glass come from theme.css. */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.home { margin: 0; min-height: 100vh; font-family: 'Inter', system-ui, -apple-system, sans-serif; color: var(--text-primary); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--accent); color: var(--on-accent); padding: 8px 14px; border-radius: 8px; z-index: 400; font-weight: 600; text-decoration: none; }
.skip:focus { left: 12px; }

/* backdrop: research figures drawn along the bottom, and a few drifting icons */
.drift { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.drift svg { position: absolute; fill: none; stroke: var(--text-accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; opacity: .16; animation: bob var(--d, 8s) ease-in-out infinite; animation-delay: var(--dl, 0s); }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-18px) rotate(7deg); } }

.shell { position: relative; z-index: 2; min-height: 100vh; max-width: 1600px; margin-left: auto; margin-right: auto; display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(380px, .82fr); }

/* showcase */
.showcase { display: flex; flex-direction: column; justify-content: space-between; gap: 32px; padding: 40px clamp(28px, 5vw, 72px) 30px; min-width: 0; }
.brand { display: flex; align-items: center; gap: 18px; text-decoration: none; color: inherit; min-width: 0; }
.brand-logo { object-fit: contain; flex: none; filter: drop-shadow(0 8px 18px rgba(0,0,0,.35)); }
.brand b { display: block; font-size: clamp(20px, 2.1vw, 28px); font-weight: 900; letter-spacing: -.01em; line-height: 1.12; color: var(--text-heading); overflow-wrap: anywhere; }
.brand small { display: block; margin-top: 4px; font-size: 11px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: var(--text-muted); }
.brand.compact { display: none; }

.hero h1 { margin: 0; font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif; font-size: clamp(36px, 4.6vw, 60px); line-height: 1.1; font-weight: 700; letter-spacing: -.015em; color: var(--text-heading); }
.hero .grad { font-style: italic; background: linear-gradient(90deg, var(--text-accent), var(--text-heading)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { margin: 16px 0 0; max-width: 31rem; font-size: 15.5px; line-height: 1.65; color: var(--text-muted); font-weight: 500; }

.journey { display: flex; align-items: center; list-style: none; margin: 40px 0 0; padding: 0; max-width: 31rem; }
.journey li { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.journey i { width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c) 32%, transparent); color: var(--c); animation: beat 2s ease-in-out infinite; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.journey li:nth-of-type(3) i { animation-delay: .5s; } .journey li:nth-of-type(5) i { animation-delay: 1s; } .journey li:nth-of-type(7) i { animation-delay: 1.5s; }
.journey svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.journey span { font-size: 10px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: var(--text-muted); }
.journey .link { flex: 1; height: 1px; margin: 0 8px 22px; background: var(--border-card); position: relative; overflow: hidden; }
.journey .link::after { content: ""; position: absolute; top: -1px; width: 34px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, transparent, var(--text-accent), transparent); animation: run 2.2s ease-in-out infinite; }
.journey .link:nth-of-type(4)::after { animation-delay: .7s; } .journey .link:nth-of-type(6)::after { animation-delay: 1.4s; }
@keyframes beat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }
@keyframes run { from { left: -30%; } to { left: 110%; } }

.slides { position: relative; margin-top: 30px; max-width: 31rem; height: 158px; }
.slide { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; border-radius: 18px; background: var(--bg-card); border: 1px solid var(--border-card); opacity: 0; transform: translateY(12px); filter: blur(4px); transition: opacity .45s, transform .45s, filter .45s; pointer-events: none; }
:root[data-glass="on"]:not([data-skin="light"]) .slide { backdrop-filter: blur(var(--glass-blur)) saturate(135%); -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(135%); }
.slide.on { opacity: 1; transform: none; filter: none; pointer-events: auto; }
.dots { display: flex; gap: 8px; margin: 16px 0 0 4px; }
.dots button { width: 6px; height: 6px; padding: 0; border: 0; border-radius: 99px; background: var(--border-input); cursor: pointer; transition: width .4s, background .4s; }
.dots button[aria-selected="true"] { width: 24px; background: var(--accent); }
.dots button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.foot { margin: 0; font-size: 10px; font-weight: 800; letter-spacing: .24em; text-transform: uppercase; color: var(--text-muted); }
.foot span { display: inline-block; padding: 6px 12px; border-radius: 8px; background: rgba(0,0,0,.28); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
:root[data-skin="light"] .foot span { background: rgba(255,255,255,.7); }

/* sign-in card */
.signin-wrap { position: relative; display: flex; align-items: center; justify-content: center; padding: 28px 24px 120px; }
.blob { position: absolute; width: 480px; height: 480px; border-radius: 50%; background: radial-gradient(circle, rgba(var(--accent-rgb, 59,130,246), .18) 0%, transparent 70%); animation: swell 8s ease-in-out infinite; pointer-events: none; }
@keyframes swell { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
.card { position: relative; width: 100%; max-width: 440px; padding: 40px; border-radius: 24px; background: var(--bg-card); border: 1px solid var(--border-card); box-shadow: var(--card-shadow); }
:root[data-skin="summer"] .card { background: rgba(62,34,88,calc(var(--glass) + .1)); }
:root[data-glass="on"]:not([data-skin="light"]) .card { backdrop-filter: blur(24px) saturate(135%); -webkit-backdrop-filter: blur(24px) saturate(135%); }
:root[data-glass="off"] .card { background: var(--bg-modal); }
.card h2 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.01em; color: var(--text-heading); }
.card .sub { margin: 6px 0 26px; font-size: 14px; color: var(--text-muted); }
.field { margin-bottom: 16px; }
.field label, .label-row label { display: block; margin-bottom: 7px; font-size: 12px; font-weight: 700; letter-spacing: .03em; color: var(--text-muted); }
.label-row { display: flex; justify-content: space-between; align-items: baseline; }
.label-row label { margin-bottom: 7px; }
.forgot { font-size: 12.5px; font-weight: 600; color: var(--text-accent); text-decoration: none; }
.forgot:hover, .alt a:hover { text-decoration: underline; }
.field input[type=email], .field input[type=password], .field input[type=text] { width: 100%; height: 48px; padding: 0 14px; border: 1px solid var(--border-input); border-radius: 12px; background: var(--bg-input); color: var(--text-primary); font: inherit; font-size: 14.5px; }
.field input::placeholder { color: var(--text-faint); }
.field input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.pw { position: relative; }
.pw input { padding-right: 62px !important; }
.pw button { position: absolute; right: 6px; top: 6px; height: 36px; padding: 0 12px; border: 0; border-radius: 8px; background: none; color: var(--text-muted); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.pw button:hover { color: var(--text-heading); }
.remember { display: flex; align-items: center; gap: 10px; margin: 4px 0 22px; font-size: 13.5px; color: var(--text-muted); cursor: pointer; }
.remember input { width: 17px; height: 17px; accent-color: var(--accent); }
.go { width: 100%; height: 50px; border: 0; border-radius: 12px; background: var(--accent); color: var(--on-accent); font: inherit; font-size: 15.5px; font-weight: 700; cursor: pointer; transition: background .15s, transform .05s; }
.go:hover:not(:disabled) { background: var(--accent-hover); }
.go:active:not(:disabled) { transform: translateY(1px); }
.go:disabled { opacity: .65; cursor: progress; }
.go:focus-visible { outline: 2px solid var(--text-heading); outline-offset: 3px; }
.alt { margin: 22px 0 0; text-align: center; font-size: 14px; color: var(--text-muted); }
.alt a { color: var(--text-accent); font-weight: 700; text-decoration: none; }
.note { margin: 10px 0 0; text-align: center; font-size: 12px; color: var(--text-faint); line-height: 1.5; }

@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .showcase { padding: 28px 24px 8px; gap: 20px; }
  .showcase > .brand, .slides, .dots, .foot { display: none; }
  .hero h1 { font-size: clamp(32px, 9vw, 44px); }
  .journey { margin-top: 26px; }
  .signin-wrap { padding: 12px 16px 140px; }
  .card { padding: 28px 22px; }
  .brand.compact { display: flex; margin-bottom: 18px; }
  .field-bg { height: 30vh; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .slide { filter: none; } }
.remember input { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--border-input); background: var(--bg-input); display: inline-grid; place-content: center; flex: none; cursor: pointer; }
.remember input:checked { background: var(--accent); border-color: var(--accent); }
.remember input:checked::after { content: ""; width: 9px; height: 5px; border-left: 2px solid var(--on-accent); border-bottom: 2px solid var(--on-accent); transform: rotate(-45deg) translate(1px, -1px); }
.remember input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 960px) { .showcase { padding-top: 72px; } }

/* research backdrop */
.field-bg { position: fixed; left: 0; right: 0; bottom: 0; height: 46vh; z-index: 0; pointer-events: none; -webkit-mask-image: linear-gradient(to top, #000 55%, transparent); mask-image: linear-gradient(to top, #000 55%, transparent); }
.field-bg svg { width: 100%; height: 100%; display: block; }
.field-bg .gl { stroke: var(--scene-line); stroke-opacity: .32; stroke-width: 1.4; }
.field-bg .gl.faint { stroke-opacity: .10; }
.field-bg .gl.dash { stroke-dasharray: 5 7; stroke-opacity: .4; }
.field-bg .gl.net { stroke: var(--text-accent); stroke-opacity: .28; }
.field-bg .bar { fill: var(--text-accent); fill-opacity: .12; stroke: var(--text-accent); stroke-opacity: .22; }
.field-bg .curve { fill: none; stroke: var(--text-accent); stroke-opacity: .6; stroke-width: 2.4; stroke-linejoin: round; }
.field-bg .pt { fill: var(--scene-line); fill-opacity: .45; }
.field-bg .pt.hi { fill: var(--scene-lit); fill-opacity: .85; }
.field-bg .trend { stroke: var(--scene-lit); stroke-opacity: .6; stroke-width: 2; stroke-dasharray: 8 6; }
.field-bg .nd { fill: var(--text-accent); fill-opacity: .5; }
.field-bg .nd.lit { fill: var(--scene-lit); fill-opacity: .8; animation: pulse 4s ease-in-out infinite; }
.field-bg .eq { fill: var(--text-muted); fill-opacity: .4; font: italic 600 22px 'Source Serif 4', Georgia, serif; }
@keyframes pulse { 0%, 100% { fill-opacity: .35; } 50% { fill-opacity: .95; } }

/* hero extras */
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 16px; font-size: 11px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: var(--text-accent); }
.eyebrow i { width: 26px; height: 2px; border-radius: 2px; background: var(--text-accent); }
.eyebrow.center { justify-content: center; }
.ask { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin: 22px 0 0; max-width: 31rem; min-height: 28px; }
.ask .q { font-size: 10px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: var(--text-muted); padding: 3px 8px; border-radius: 6px; border: 1px solid var(--border-card); }
.ask .typed { font-family: 'Source Serif 4', Georgia, serif; font-style: italic; font-size: 17px; font-weight: 600; color: var(--text-heading); }
.ask .caret { width: 2px; height: 18px; background: var(--text-accent); align-self: center; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.journey em { font-style: normal; font-size: 11px; font-weight: 600; color: var(--text-faint); margin-top: -4px; }

/* mini cards inside the highlights */
.slide header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.slide header b { font-size: 14px; color: var(--text-heading); }
.slide header small { font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--text-faint); }
.mini { margin: 0; padding: 0; list-style: none; font-size: 13px; color: var(--text-muted); font-weight: 500; }
.mini .t { margin: 0; line-height: 1.5; color: var(--text-primary); }
.mini .t u { text-decoration: none; font-weight: 700; color: var(--text-heading); }
.mini .res { margin: 8px 0 0; font-size: 12.5px; font-weight: 700; color: var(--text-accent); }
.votes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.v { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px 5px 6px; border-radius: 99px; font-size: 12px; font-weight: 600; border: 1px solid var(--border-card); }
.v i { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--border-input); }
.slide.on .v.on { animation: voted .5s both; animation-delay: calc(.3s + var(--n) * .45s); }
.slide.on .v.on i { animation: tick .4s both; animation-delay: calc(.3s + var(--n) * .45s); }
.v.on i::after { content: ""; width: 8px; height: 4px; border-left: 2px solid var(--on-accent); border-bottom: 2px solid var(--on-accent); transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
@keyframes voted { from { color: var(--text-muted); } to { color: var(--text-heading); border-color: var(--accent); } }
@keyframes tick { to { background: var(--accent); border-color: var(--accent); } }
.slide.on .v.on i::after { animation: show .01s forwards; animation-delay: calc(.3s + var(--n) * .45s); }
@keyframes show { to { opacity: 1; } }
.list li { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--border-card); color: var(--text-primary); }
.list li:last-child { border-bottom: 0; }
.list em { margin-left: auto; font-style: normal; font-size: 11.5px; font-weight: 700; }
.list .ok { color: #34d399; } .list .no { color: #f87171; } .list .wait { color: var(--text-faint); }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: currentColor; }
.dot.ok { background: #34d399; } .dot.no { background: #f87171; } .dot.wait { background: var(--text-faint); }
.pbar { height: 8px; border-radius: 99px; background: var(--bg-input); margin-top: 12px; overflow: hidden; }
.pbar span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--text-accent)); }
.slide.on .pbar span { animation: fill 1.2s .3s ease-out forwards; }
@keyframes fill { to { width: 60%; } }

/* below the fold */
.below { position: relative; z-index: 2; padding: 40px clamp(20px, 5vw, 72px) 170px; }
.below .wrap { max-width: 1120px; margin: 0 auto; }
.below h2 { margin: 6px 0 28px; text-align: center; font-family: 'Source Serif 4', Georgia, serif; font-size: clamp(26px, 3.2vw, 38px); font-weight: 700; letter-spacing: -.01em; color: var(--text-heading); }
.below .roles-h { margin-top: 64px; }
.steps, .roles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.steps article, .roles article { position: relative; padding: 22px; border-radius: 18px; background: var(--bg-card); border: 1px solid var(--border-card); }
:root[data-glass="on"]:not([data-skin="light"]) :is(.steps, .roles) article { backdrop-filter: blur(var(--glass-blur)) saturate(135%); -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(135%); }
.steps article { border-top: 3px solid var(--c); }
.steps b { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; margin-bottom: 12px; font-size: 14px; background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--c); }
.below h3 { margin: 0 0 6px; font-size: 16px; color: var(--text-heading); }
.below article p { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--text-muted); font-weight: 500; }
.roles i { width: 40px; height: 40px; margin-bottom: 12px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--text-accent); }
.roles svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cta { margin: 40px 0 0; text-align: center; }
.cta a { display: inline-block; padding: 13px 26px; border-radius: 12px; background: var(--accent); color: var(--on-accent); font-weight: 700; text-decoration: none; }
.cta a:hover { background: var(--accent-hover); }
@media (max-width: 960px) {
  .steps, .roles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ask, .lede { max-width: none; }
}
@media (max-width: 560px) { .steps, .roles { grid-template-columns: minmax(0, 1fr); } .below { padding-bottom: 150px; } }
@media (prefers-reduced-motion: reduce) { .ask .caret { animation: none; } .slide.on .pbar span { width: 60%; } }

.vote .res { opacity: 0; }
.slide.on .vote .res { animation: show .5s 1.8s forwards; }
@media (prefers-reduced-motion: reduce) { .vote .res { opacity: 1; } }

.signin-wrap { overflow-x: clip; }
