/* Instapium layout. Colours, fonts, radii and shadows come from the theme
   file linked before this one (themes/studio.css). */

:root { --wrap: 1120px; --gutter: 24px; }

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--ink);
    background: var(--paper);
    font-feature-settings: "kern" 1, "liga" 1;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-ink); text-underline-offset: 0.15em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.wrap { width: min(var(--wrap), 100% - var(--gutter) * 2); margin-inline: auto; }

h1, h2, h3 { font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: var(--display-tracking); line-height: 1.08; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 1.6rem + 3.6vw, 4.25rem); }
h2 { font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.6rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.015em; line-height: 1.3; }
.lead { font-size: clamp(1.1rem, 1rem + .5vw, 1.3rem); color: var(--muted); max-width: 58ch; margin-top: 1.25rem; }
.section-head p { color: var(--muted); max-width: 60ch; margin-top: .75rem; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header-inner { width: min(var(--wrap), 100% - var(--gutter) * 2); margin-inline: auto; display: flex; align-items: center; gap: 1.5rem; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; font-size: 1.125rem; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.site-nav { display: flex; align-items: center; gap: .25rem 1.25rem; flex-wrap: wrap; margin-left: auto; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem; }
.site-nav a:hover { color: var(--accent-ink); }
.nav-cta { background: var(--cta-bg); color: var(--cta-ink) !important; padding: .5rem .9rem; border-radius: 999px; }
.theme-toggle-group { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; gap: 2px; margin: 0; background: var(--surface); }
.theme-option { position: relative; display: flex; align-items: center; justify-content: center; min-width: 38px; min-height: 34px; border-radius: 999px; cursor: pointer; opacity: .65; }
.theme-option input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.theme-option svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme-option:has(input:checked) { background: var(--paper); opacity: 1; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.theme-option:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Hero */
.skip-link { position: absolute; left: 1rem; top: -3rem; z-index: 100; background: var(--ink); color: var(--paper); padding: .5rem .9rem; border-radius: 8px; }
.skip-link:focus { top: .75rem; }
.hero { position: relative; isolation: isolate; overflow: hidden; padding-bottom: clamp(3rem, 2rem + 3vw, 5rem); border-bottom: 1px solid var(--line); }
.hero::before { content: ""; position: absolute; inset: 0 0 auto; height: 900px; pointer-events: none;
    background: radial-gradient(60% 50% at 50% 38%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%), linear-gradient(var(--hero-bg), var(--paper)); z-index: -1; }
.hero-copy { text-align: center; padding: clamp(3.5rem, 2.5rem + 4vw, 6.5rem) 0 clamp(2.5rem, 2rem + 2vw, 3.5rem); display: grid; justify-items: center; }
.hero-copy h1 { max-width: 16ch; }
.hero-copy .lead { margin-inline: auto; }
.eyebrow { display: inline-flex; align-items: center; gap: .55rem; font-size: .875rem; font-weight: 600; color: var(--muted); border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 70%, transparent); border-radius: 999px; padding: .35rem .85rem; margin-bottom: 1.5rem; }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: #2fbf71; box-shadow: 0 0 0 3px color-mix(in srgb, #2fbf71 25%, transparent); }
.hero-actions { display: flex; align-items: center; justify-content: center; gap: 1rem 1.5rem; flex-wrap: wrap; margin-top: 2rem; }
.button { display: inline-flex; align-items: center; gap: .5rem; background: var(--cta-bg); color: var(--cta-ink); text-decoration: none; font-weight: 600; padding: .8rem 1.25rem; border-radius: 999px; }
.button:hover { color: var(--cta-ink); opacity: .92; }
.text-link { font-weight: 600; color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: .2em; }

/* Screenshots: the real app, framed as the Mac window it is. */
.wrap-wide { width: min(1240px, 100% - 32px); margin-inline: auto; }
.shot { margin: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--shot-edge); background: var(--glass); box-shadow: var(--shot-shadow); }
.shot img { width: 100%; height: auto; }
.shot-hero { border-radius: 14px; }
.shot-note { text-align: center; color: var(--muted); font-size: .875rem; margin-top: .9rem; }

.facts { list-style: none; padding: 0; margin-top: clamp(2.5rem, 2rem + 2vw, 3.5rem); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem 2rem; }
.facts li { border-top: 2px solid var(--accent); padding-top: .9rem; }
.facts strong { display: block; font-size: 1.05rem; }
.facts span { color: var(--muted); font-size: .95rem; }

/* Sections */
.section { padding: var(--section) 0; border-bottom: 1px solid var(--line); }
.section-head { max-width: 62ch; margin-bottom: clamp(2rem, 1.5rem + 2vw, 3rem); }
.kicker { color: var(--accent-ink); font-weight: 600; font-size: .875rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: .6rem; }

.steps-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; counter-reset: none; }
.steps-list li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.5rem; }
.steps-list p { color: var(--muted); margin-top: .5rem; }
.step { display: inline-flex; width: 2rem; height: 2rem; align-items: center; justify-content: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; margin-bottom: 1rem; }

.feature { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 2rem clamp(2rem, 1rem + 3vw, 4rem); align-items: center; margin-bottom: clamp(3.5rem, 2.5rem + 3vw, 5.5rem); }
.feature-flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.feature-flip .feature-copy { order: 2; }
.feature h3 { font-size: clamp(1.4rem, 1.2rem + .8vw, 1.9rem); letter-spacing: -0.025em; line-height: 1.15; }
.feature-copy > p { color: var(--muted); margin-top: .9rem; }
.ticks { list-style: none; padding: 0; margin-top: 1.25rem; display: grid; gap: .6rem; }
.ticks li { position: relative; padding-left: 1.6rem; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .45em; width: .95rem; height: .55rem; border-left: 2px solid var(--accent-ink); border-bottom: 2px solid var(--accent-ink); transform: rotate(-45deg) translateY(-2px); }

.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.5rem; }
.card p { color: var(--muted); margin-top: .5rem; }

.plain { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem 3rem; max-width: 62rem; }
.plain > div { border-left: 2px solid var(--line); padding-left: 1.25rem; }
.plain h3 { margin-bottom: .35rem; }
.plain p { color: var(--muted); }

.reqs { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem 2rem; max-width: 56rem; }
.reqs li { padding: .9rem 1.1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.reqs strong { display: block; margin-bottom: .15rem; }
.reqs span { color: var(--muted); }

.faq { max-width: 62ch; }
.faq details { border-top: 1px solid var(--line); padding: 1rem 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent-ink); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); margin-top: .6rem; }

.cta-band { padding: var(--section) 0; background: radial-gradient(50% 80% at 50% 100%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%), var(--surface); }
.cta-inner { display: grid; gap: 1.1rem; justify-items: center; text-align: center; max-width: 60ch; margin-inline: auto; }
.cta-inner img { border-radius: 14px; }
.cta-band p { color: var(--muted); }

/* Beta sign-up */
.waitlist { width: 100%; max-width: 30rem; display: grid; gap: 1.1rem; text-align: left; margin-top: .75rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.25rem, 1rem + 1.5vw, 2rem); }
.field { display: grid; gap: .4rem; border: 0; padding: 0; margin: 0; min-width: 0; }
.field label, .field legend { font-weight: 600; font-size: .95rem; padding: 0; }
.optional { font-weight: 400; color: var(--muted); font-size: .85rem; margin-left: .35rem; }
.waitlist input[type=email], .waitlist textarea { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: .7rem .85rem; width: 100%; }
.waitlist textarea { resize: vertical; min-height: 4.5rem; }
.waitlist input:focus-visible, .waitlist textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.pills { display: flex; flex-wrap: wrap; gap: .5rem; }
.pills label { position: relative; }
.pills input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.pills span { display: inline-block; padding: .5rem .95rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-weight: 500; font-size: .95rem; cursor: pointer; }
.pills input:checked + span { background: var(--cta-bg); color: var(--cta-ink); border-color: var(--cta-bg); }
.pills input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.consent { display: flex; gap: .65rem; align-items: flex-start; font-size: .95rem; cursor: pointer; }
.consent input { width: 1.1rem; height: 1.1rem; margin-top: .2rem; accent-color: var(--accent); flex: none; }
.waitlist .button { justify-self: start; border: 0; font: inherit; font-weight: 600; cursor: pointer; }
.waitlist .button[disabled] { opacity: .6; cursor: progress; }
.waitlist [aria-invalid="true"], .waitlist fieldset[aria-invalid="true"] .pills span { border-color: #d9364a; }
.form-status { font-size: .95rem; min-height: 0; }
.form-status:empty { display: none; }
.form-status.error { color: #c22a3d; }
html[data-theme="dark"] .form-status.error { color: #ff8a98; }
@media (prefers-color-scheme: dark) { html[data-theme="system"] .form-status.error { color: #ff8a98; } }
.notice { font-size: .85rem; line-height: 1.5; }
.turnstile:empty { display: none; }
.waitlist-done { max-width: 30rem; width: 100%; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 2rem; outline: none; }
.waitlist-done h3 { font-size: 1.4rem; }
.waitlist-done p { margin-top: .4rem; }
.invited { font-size: .9rem; margin-top: .5rem; }

.site-footer { padding: 2rem 0 2.5rem; color: var(--muted); font-size: .9rem; border-top: 1px solid var(--line); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: .75rem 2rem; align-items: center; }
.site-footer a { color: inherit; }
.brand-sm { font-size: .95rem; gap: .45rem; }
.brand-sm img { width: 20px; height: 20px; border-radius: 5px; }
.footer-end { margin-left: auto; display: inline-flex; gap: 1.5rem; }

@media (max-width: 900px) {
    .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .steps-list, .grid-3 { grid-template-columns: 1fr; }
    .feature, .feature-flip { grid-template-columns: 1fr; }
    .feature-flip .feature-copy { order: 0; }
    .plain, .reqs { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .site-header-inner { flex-wrap: wrap; gap: .75rem 1rem; padding: .6rem 0; }
    .site-nav { margin-left: 0; order: 3; width: 100%; }
    .shot, .shot-hero { border-radius: 8px; }
    /* Too small to read whole at phone width: keep the mirrored phone and the runs. */
    .shot-hero img { aspect-ratio: 1.15; object-fit: cover; object-position: 62% top; }
    .facts { grid-template-columns: 1fr; }
    .footer-end { margin-left: 0; }
}

/* Consent banner (Google Analytics, Consent Mode v2 — see site.js) */
.cookie-banner { position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 9999; display: flex; justify-content: center; }
.cookie-content { display: flex; align-items: center; gap: 1rem 1.5rem; flex-wrap: wrap; background: var(--ink); color: var(--paper); padding: .9rem 1.25rem; border-radius: var(--radius); max-width: 760px; box-shadow: 0 16px 40px rgba(0,0,0,.25); }
.cookie-content p { font-size: .9375rem; flex: 1 1 320px; }
.cookie-buttons { display: flex; gap: .5rem; }
.cookie-btn { border: 1px solid transparent; border-radius: 999px; padding: .55rem 1.1rem; font: inherit; font-weight: 600; cursor: pointer; min-height: 40px; }
.cookie-btn.accept { background: var(--paper); color: var(--ink); }
.cookie-btn.reject { background: transparent; color: var(--paper); border-color: rgba(255,255,255,.35); }
@media (max-width: 640px) { .cookie-content { padding: .9rem 1rem; } }
