/* ============================================================
   Secondary pages (Who it's for, Platform, Sensors, legal, thanks)
   in the Evergreen look. Loaded AFTER site.css. These pages keep their
   existing content and class names; this file restyles those classes.
   ============================================================ */

/* Older token names used by inline styles on the legal pages. */
:root { --gray: var(--muted); --ink-soft: var(--graphite); --green: var(--go); --green-bright: var(--leaf); --green-tint: var(--fern); --sage: var(--line); --sage-deep: #CBD4C9; --card: #fff; }

.page-hero { padding: 84px 0 34px; background: var(--paper); background-image: linear-gradient(rgba(15, 21, 17, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(15, 21, 17, .035) 1px, transparent 1px); background-size: 24px 24px; border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); margin-top: 12px; max-width: 900px; }
.page-hero .lede { margin-top: 16px; }
.section-alt { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.muted { color: var(--muted); }

.grid-2, .grid-3 { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 920px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 680px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--muted); font-size: .98rem; }
.card .icon, .icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--fern); color: var(--pine); margin-bottom: 14px; }
.card .icon svg { display: block; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split .lede { margin: 16px 0 22px; }
@media (max-width: 920px) { .split { grid-template-columns: 1fr; gap: 32px; } }
.check-list { list-style: none; display: grid; gap: 12px; margin: 18px 0 26px; }
.check-list li { padding-left: 30px; position: relative; color: var(--graphite); }
.check-list li::before { content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: var(--fern) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231E8A3C' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l5 5L19 7'/%3E%3C/svg%3E") center / 12px no-repeat; }

.pain-stat { font-family: var(--font-display); font-weight: 800; font-size: 2.3rem; color: var(--pine); letter-spacing: -.02em; line-height: 1; margin-bottom: 10px; }
.source-note { margin-top: 20px; font-size: .84rem; color: var(--muted); }
.pf-pain { font-family: var(--font-body); font-size: .92rem; font-weight: 600; font-style: italic; color: #8E2019; background: #FBE7E5; display: inline-block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 6px 13px; border-radius: 999px; margin-bottom: 12px; }
@media (max-width: 520px) { .pf-pain { white-space: normal; } }

.pf-hero { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: center; padding: 56px 0; }
.pf-hero.pf-flip .pf-copy { order: 2; }
.pf-hero.pf-flip .pf-shot { order: 1; }
.pf-copy h3 { font-size: clamp(1.35rem, 2.4vw, 1.8rem); margin-bottom: 10px; }
.pf-copy p:not(.pf-pain) { color: var(--muted); }
.pf-shot { margin: 0; }
.pf-shot img, .platform-shot img { width: 100%; display: block; border-radius: 16px; border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.platform-shot { margin: 0; }
@media (max-width: 920px) { .pf-hero { grid-template-columns: 1fr; gap: 28px; } .pf-hero.pf-flip .pf-copy, .pf-hero.pf-flip .pf-shot { order: 0; } }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px 22px; }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--ink); color: #fff; font-family: var(--font-display); font-weight: 700; margin-bottom: 14px; }
.step h3 { font-size: 1.05rem; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: .95rem; }
@media (max-width: 920px) { .steps { grid-template-columns: 1fr; } }

.sensor-tag { font-family: var(--font-mono); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--go); margin-bottom: 4px; }
.spec-table { width: 100%; border-collapse: collapse; margin-top: 18px; font-size: .95rem; }
.spec-table th { text-align: left; font-family: var(--font-display); font-weight: 700; color: var(--ink); padding: 10px 16px 10px 0; width: 38%; vertical-align: top; }
.spec-table td { color: var(--muted); padding: 10px 0; vertical-align: top; }
.spec-table tr + tr { border-top: 1px solid var(--line); }

.sides-grid { align-items: stretch; }
.side-card h3 { font-size: 1.25rem; margin-bottom: 4px; }
.side-card .side-lede { color: var(--muted); margin-bottom: 14px; }
.side-card h4 { font-size: .98rem; margin: 16px 0 6px; color: var(--ink); }
.side-card p { color: var(--graphite); font-size: .97rem; line-height: 1.65; margin-bottom: 10px; }

.workflow-band { background: var(--ink); border-radius: 26px; padding: 56px 48px; position: relative; overflow: hidden; }
.workflow-band .section-head h2 { color: #fff; }
.workflow-band .section-head .lede { color: #AAB8AE; }
.workflow-band .eyebrow { color: var(--leaf); }
.workflow-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 30px; }
.workflow-item { background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .12); border-radius: 16px; padding: 22px; }
.workflow-item h3 { color: #fff; font-size: 1.05rem; margin-bottom: 8px; }
.workflow-item p { color: #B7C4BA; font-size: .95rem; }
.workflow-item strong { color: #fff; }
.workflow-note { margin-top: 24px; color: #9FB1A4; font-size: .95rem; max-width: 640px; }
@media (max-width: 920px) { .workflow-grid { grid-template-columns: 1fr; } .workflow-band { padding: 34px 20px; } }

.cta-band { background: var(--ink); border-radius: 26px; padding: 52px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; position: relative; overflow: hidden; isolation: isolate; }
.cta-band::after { content: ""; position: absolute; z-index: -1; width: 460px; height: 460px; right: -120px; top: -160px; background: radial-gradient(circle, rgba(63, 163, 92, .35), transparent 65%); }
.cta-band h2 { color: #fff; max-width: 32rem; }
.cta-band p { color: #BFCBC2; margin-top: 10px; }
@media (max-width: 640px) { .cta-band { padding: 32px 20px; } }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-outline:hover { border-color: var(--pine); }

/* legal pages (inline .legal styles use the aliases above) */
.legal h2 { color: var(--ink); }
.legal a { color: var(--pine); }

/* thanks page */
.thanks-wrap { max-width: 560px; margin: 0 auto; text-align: center; }
.thanks-wrap .lede { margin: 0 auto; }
.tick { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--fern); color: var(--go); }
.tick svg { display: block; }
.tick-lg { width: 48px; height: 48px; margin: 0 auto 22px; }

/* ---------- platform page (platform.html) ----------
   What it runs (screenshot tiles), integrations (your stack or ours), how
   the AI works (steps beside a real call thread), and control (a real
   settings screen per kind of control). */
.pf-top .hero-ctas { margin-top: 26px; }
.cap-grid, .ctl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.cap, .ctl { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px 14px 20px; transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.cap:hover, .ctl:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(15, 21, 17, .05), 0 18px 40px rgba(15, 21, 17, .1); }
.thumb { aspect-ratio: 16 / 10; overflow: hidden; border-radius: 10px; border: 1px solid var(--line); background: var(--fern); margin-bottom: 16px; }
/* each tile zooms into the part of the screen that matters (--z, --fx, --fy set per tile) */
.thumb img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 0 0; transform: scale(var(--z, 1.6)); transform-origin: var(--fx, 60%) var(--fy, 0%); transition: transform .6s var(--ease); }
.cap:hover .thumb img, .ctl:hover .thumb img { transform: scale(calc(var(--z, 1.6) * 1.04)); }
.cap h3, .ctl h3 { font-size: 1.1rem; padding: 0 6px; }
.cap p, .ctl p { color: var(--muted); font-size: .96rem; margin-top: 6px; padding: 0 6px; }
.ctl-text { display: flex; flex-direction: column; justify-content: center; gap: 4px; background: var(--ink); border-color: var(--ink); padding: 28px; }
.ctl-text h3 { color: #fff; font-size: 1.35rem; padding: 0; }
.ctl-text p { color: #BFCBC2; padding: 0; margin-bottom: 16px; }
.ctl-text .btn { align-self: flex-start; background: #fff; }
.int-split { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 30px; }
.int-col { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 26px; }
.int-col h3 { font-size: 1.2rem; margin-bottom: 12px; }
.int-list { list-style: none; display: grid; }
.int-list li { display: grid; gap: 2px; padding: 12px 0; border-top: 1px solid var(--line); }
.int-list li:first-child { border-top: 0; }
.int-list b { color: var(--ink); }
.int-list span { color: var(--muted); font-size: .95rem; }
.int-shots { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 22px; }
.ai-shot img { aspect-ratio: auto; }
.int-shots .thumb { margin: 0; border: 0; border-radius: 0; aspect-ratio: 16 / 10; }
.int-shots .thumb img { aspect-ratio: auto; }
.shot figcaption { padding: 12px 16px; font-size: .92rem; color: var(--muted); border-top: 1px solid var(--line); }
.int-note { margin-top: 22px; color: var(--graphite); font-weight: 600; }
.ai-flow { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: start; }
.ai-steps { list-style: none; counter-reset: ai; display: grid; gap: 14px; }
.ai-steps li { counter-increment: ai; position: relative; padding: 18px 20px 18px 64px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.ai-steps li::before { content: counter(ai); position: absolute; left: 20px; top: 18px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--pine); color: #fff; font-weight: 700; font-size: .9rem; }
.ai-steps h3 { font-size: 1.08rem; }
.ai-steps p { color: var(--muted); font-size: .96rem; margin-top: 4px; }
.ai-shot { position: sticky; top: 96px; }
@media (max-width: 960px) {
  .cap-grid, .ctl-grid { grid-template-columns: 1fr 1fr; }
  .ai-flow { grid-template-columns: 1fr; }
  .ai-shot { position: static; }
}
@media (max-width: 620px) {
  .cap-grid, .ctl-grid, .int-split, .int-shots { grid-template-columns: 1fr; }
}

/* ---------- /sms-opt-in (server/routes/sms-opt-in.js) ----------
   The opt-in box and disclosures use the same classes and sizes as the app
   (apps/app/src/evergreen.css .sms-consent / .sms-disclosure). */
.optin-optional { font-size: 1.05rem; color: var(--ink); background: var(--fern); border-radius: 10px; padding: 12px 16px; }
.optin-demo { max-width: 460px; margin: 16px 0 8px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px 20px 16px; box-shadow: 0 1px 3px rgba(15, 21, 17, .06); }
.optin-demo-tag { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.optin-field { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 14px; }
.optin-field .hint { font-weight: 400; color: var(--muted); }
.optin-field input { font: inherit; font-weight: 400; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.optin .sms-consent { display: grid; gap: 6px; margin: 4px 0 10px; }
.optin .sms-consent-row { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.45; color: #0F1511; }
.optin .sms-consent-row input[type="checkbox"] { width: 18px; height: 18px; margin: 2px 0 0; flex: 0 0 auto; accent-color: var(--pine); }
.optin .sms-disclosure { margin: 0; font-size: 13px; line-height: 1.5; color: #2A302C; }
.optin .sms-consent .sms-disclosure { padding-left: 28px; }
.optin .sms-disclosure a { color: #0C3A1E; text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
.optin .sms-disclosure.sms-code { margin-top: 10px; }
.optin-save { width: 100%; margin-top: 12px; }
.optin-note { font-size: 12.5px; color: var(--muted); margin: 10px 0 0; text-align: center; }
.optin-sms { max-width: 420px; margin: 14px 0 6px; background: #E9EEEA; color: var(--ink); border-radius: 18px 18px 18px 6px; padding: 12px 16px; font-size: 15px; line-height: 1.45; }
