/* usebrewmate.app. Night ground like the app's brew modal; real app screens; one living canvas. */
:root {
    --night: #000;
    --ink: #eae7e0;          /* Brewmate ivory as text on night */
    --dim: #a7aaa6;          /* 8.6:1 on black */
    --faint: #7d817f;        /* 5.2:1, meta only */
    --glow: #8fc9da;         /* the brew-timer cue colour */
    --teal: #17414f;
    --panel: #0c0e0f;
    --rule: rgba(234, 231, 224, .14);
    --danger: #f08a7e;
    color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--night); }
body { color: var(--ink); font: 400 18px/1.6 "Instrument Sans", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--ink); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--glow); outline-offset: 3px; }
.wrap { max-width: 1160px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
h1, h2, h3 { font-weight: 500; letter-spacing: -.03em; }
.muted { color: var(--faint); }

/* nav */
.nav { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.mark { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 600; min-height: 44px; }
.nav nav a { display: inline-flex; align-items: center; min-height: 44px; margin-left: 26px; color: var(--dim); text-decoration: none; font-size: 15px; }
.nav nav a:hover { color: var(--ink); }

/* app icon */
.app-icon { display: inline-block; width: 64px; height: 64px; border-radius: 15px; box-shadow: 0 0 0 1px rgba(234,231,224,.12); }
.app-icon svg { display: block; width: 100%; height: 100%; }
.app-icon.sm { width: 32px; height: 32px; border-radius: 8px; }
.app-icon.lg { width: 88px; height: 88px; border-radius: 21px; }

/* hero */
.hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; padding-top: 40px; padding-bottom: 40px; min-height: calc(100vh - 76px); }
.app-id { display: flex; align-items: center; gap: 16px; }
.app-id strong { display: block; font-size: 20px; font-weight: 600; }
.app-id small { display: block; color: var(--dim); font-size: 15px; }
.hero h1 { font-size: clamp(44px, 5.6vw, 72px); line-height: 1.02; margin: 34px 0 22px; max-width: 13ch; }
.hero-copy > p { color: var(--dim); font-size: 20px; max-width: 40ch; margin: 0 0 34px; }
.ctas { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px; border-radius: 14px;
       border: 1.5px solid var(--ink); color: var(--ink); background: transparent; text-decoration: none; font-weight: 500; font-size: 17px; }
.btn.solid { background: var(--ink); color: #000; }
.btn.solid:hover { background: #fff; }
.badge { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 18px; border-radius: 14px; border: 1px solid var(--rule); color: var(--ink); font-weight: 600; font-size: 17px; line-height: 1.1; }
.badge svg { width: 24px; height: 24px; }
.badge small { display: block; font-weight: 400; font-size: 11px; color: var(--dim); }
.facts { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; padding: 0; margin: 30px 0 0; color: var(--dim); font-size: 15px; }
.facts li::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--glow); margin-right: 9px; vertical-align: middle; }

.hero-art { position: relative; height: 680px; }
.hero-art canvas { position: absolute; inset: -40px -24px; width: calc(100% + 48px); height: calc(100% + 80px); }
.phone { border-radius: 40px; padding: 9px; background: #121416; border: 1px solid rgba(234,231,224,.16); box-shadow: 0 40px 80px rgba(0,0,0,.65); }
.phone img { display: block; width: 100%; border-radius: 32px; }
.hero-art .phone { position: absolute; }
.hero-art .front { width: 300px; left: 46%; top: 30px; transform: translateX(-30%); z-index: 2; }
.hero-art .back { width: 260px; left: 2%; top: 110px; transform: rotate(-8deg); filter: brightness(.62); z-index: 1; }

/* section headings */
.sec { font-size: clamp(34px, 4.2vw, 52px); line-height: 1.05; margin: 0 0 14px; max-width: 18ch; }
.sec-sub { color: var(--dim); margin: 0 0 48px; max-width: 52ch; }

/* how a brew goes (a real sequence, so it's numbered) */
.how { padding-top: 120px; padding-bottom: 40px; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.steps > li { counter-increment: step; }
.steps .phone { border-radius: 30px; padding: 7px; }
.steps .phone img { border-radius: 24px; }
.steps h3 { font-size: 24px; margin: 26px 0 8px; }
.steps h3::before { content: counter(step); display: inline-grid; place-items: center; width: 30px; height: 30px; margin-right: 12px; border-radius: 50%; border: 1px solid var(--rule); font-size: 14px; color: var(--glow); vertical-align: 3px; }
.steps p { color: var(--dim); font-size: 16px; margin: 0; }

/* plan card (drawn, used for "check the plan" and the reel example) */
.plan { background: var(--panel); border: 1px solid var(--rule); border-radius: 22px; padding: 22px; height: 430px; display: flex; flex-direction: column; font-variant-numeric: tabular-nums; }
.plan-head { font-weight: 600; margin-bottom: 18px; }
.plan dl { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 0 0 22px; }
.plan dt { color: var(--faint); font-size: 13px; }
.plan dd { margin: 0; font-size: 26px; letter-spacing: -.02em; }
.plan ul { list-style: none; padding: 0; margin: 0; }
.plan li { display: flex; justify-content: space-between; padding: 11px 0; border-top: 1px solid var(--rule); font-size: 15px; }
.plan li span:last-child { color: var(--dim); }
.plan-foot { margin-top: auto; text-align: center; padding: 13px; border-radius: 12px; background: var(--glow); color: #0b2a33; font-weight: 600; }

/* feature rows */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; padding-top: 140px; }
.feature.flip .copy { order: 2; }
.feature .copy > p { color: var(--dim); max-width: 46ch; }
.ticks { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; }
.ticks li { padding-left: 30px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 9px; width: 14px; height: 8px; border-left: 2px solid var(--glow); border-bottom: 2px solid var(--glow); transform: rotate(-45deg); }
.pair { display: flex; justify-content: center; gap: 0; }
.pair .phone { width: 280px; }
.pair .tilt-l { transform: rotate(-5deg) translateX(24px); }
.pair .tilt-r { transform: rotate(5deg) translate(-24px, 50px); }
.pair.one .phone { width: 300px; }

/* reel → recipe */
.reel { display: grid; gap: 18px; justify-items: center; }
.reel .plan { width: 340px; height: auto; }
.reel-src { display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 999px; border: 1px solid var(--rule); color: var(--dim); font-size: 15px; }
.reel-dot { width: 18px; height: 18px; border-radius: 6px; background: linear-gradient(135deg, #f5c16c, #e0457b 55%, #7a4fd6); }
.reel-arrow { width: 1px; height: 46px; background: linear-gradient(var(--rule), var(--glow)); }

/* brewers */
.brewers { list-style: none; padding: 0; margin: 30px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.brewers li { display: grid; justify-items: center; gap: 8px; padding: 16px 6px 12px; border-radius: 16px; border: 1px solid var(--rule); color: var(--ink); }
.brewers svg { width: 30px; height: 30px; }
.brewers span { font-size: 13px; color: var(--dim); text-align: center; line-height: 1.25; }

/* private */
.private { padding-top: 150px; }
.private .cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 34px; }
.private .cols > div { border-top: 1px solid var(--rule); padding-top: 20px; }
.private h3 { font-size: 22px; margin: 0 0 8px; }
.private p { color: var(--dim); margin: 0; font-size: 16px; }

.closing { text-align: center; padding-top: 150px; padding-bottom: 110px; }
.closing h2 { font-size: clamp(34px, 4vw, 48px); margin: 26px 0 12px; }
.closing p { color: var(--dim); margin: 0 auto 30px; max-width: 46ch; }

footer { border-top: 1px solid var(--rule); padding: 26px 0 40px; color: var(--faint); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 4px 24px; align-items: center; }
footer a { color: var(--dim); text-decoration: none; display: inline-flex; min-height: 44px; align-items: center; }
footer span { margin-left: auto; }

/* reading pages (privacy, delete) */
.page { max-width: 720px; padding-top: 40px; padding-bottom: 80px; }
.page h1 { font-weight: 400; font-size: 52px; letter-spacing: -.04em; line-height: 1.05; margin: 0 0 14px; }
.page h2 { font-weight: 500; font-size: 22px; margin: 44px 0 8px; }
.page p, .page li { color: #d2d0ca; }
.page .meta { color: var(--dim); }
.page ul { padding-left: 22px; }
.page strong { color: var(--ink); font-weight: 600; }
label { display: block; font-weight: 500; margin: 22px 0 8px; }
input { width: 100%; min-height: 52px; padding: 12px 16px; font: inherit; color: var(--ink); background: #0d0f10; border: 1px solid rgba(234,231,224,.22); border-radius: 12px; }
button { font: inherit; cursor: pointer; }
button.btn { margin-top: 20px; }
button.btn.danger { border-color: var(--danger); color: var(--danger); }
button.link { background: none; border: 0; color: var(--dim); text-decoration: underline; min-height: 44px; margin-left: 12px; }
button[disabled] { opacity: .5; cursor: progress; }
.notice { margin-top: 22px; padding: 16px 18px; border-radius: 12px; border: 1px solid var(--rule); background: #0d0f10; }
.notice.error { border-color: var(--danger); color: var(--danger); }
[hidden] { display: none !important; }

@media (max-width: 900px) {
    .nav nav a:not(:last-child) { display: none; }
    .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 24px; }
    .hero-art { height: 560px; }
    .hero-art .front { width: 250px; left: 50%; transform: translateX(-20%); }
    .hero-art .back { width: 210px; left: 0; }
    .steps { grid-template-columns: 1fr 1fr; gap: 36px 18px; }
    .feature { grid-template-columns: 1fr; gap: 40px; padding-top: 100px; }
    .feature.flip .copy { order: 0; }
    .pair .phone { width: 46%; max-width: 240px; }
    .pair.one .phone { width: 70%; max-width: 280px; }
    .private .cols { grid-template-columns: 1fr; }
    .brewers { grid-template-columns: repeat(3, 1fr); }
    footer span { margin-left: 0; width: 100%; }
}
@media (max-width: 520px) {
    .steps { grid-template-columns: 1fr; }
    .steps .phone { max-width: 300px; margin: 0 auto; }
    .reel .plan { width: 100%; }
}

/* ripples fade out at their edges: no hard canvas rectangle */
.hero-art canvas { -webkit-mask-image: radial-gradient(closest-side, #000 55%, transparent 100%); mask-image: radial-gradient(closest-side, #000 55%, transparent 100%); }
@media (max-width: 900px) { .hero-art { overflow: hidden; } .hero-art canvas { inset: 0; width: 100%; height: 100%; } }

/* phone screens reserve their shape before the image loads (no layout jump) */
.phone img { aspect-ratio: 9 / 20; object-fit: cover; object-position: top; background: #1a1d20; }

/* beta signup form */
.beta-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; max-width: 520px; }
.closing .beta-form { margin: 0 auto; justify-content: center; }
.beta-form input[type=email] { flex: 1 1 260px; min-height: 52px; margin: 0; }
.beta-form .btn { flex: 0 0 auto; margin: 0; }
.beta-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-msg { flex: 1 1 100%; margin: 4px 0 0; font-size: 15px; color: var(--glow); }
.form-msg.error { color: var(--danger); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hero .ctas { flex-direction: column; align-items: flex-start; }

/* phones are opaque and always above the ripple canvas */
.hero-art canvas { z-index: 0; }
.hero-art .phone { background: #121416; }
