/* Blockr web2app funnel — "Blockr Simple" design language.
   Self-contained: does not load the main site stylesheet. */

@font-face {
    font-family: 'Archivo';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../assets/fonts/archivo/archivo-3.woff2') format('woff2');
}

:root {
    --canvas: #EFECE4;      /* page behind the card */
    --surface: #F7F5F0;     /* screen surface */
    --card: #FFFFFF;
    --ink: #241733;         /* deep aubergine ink */
    --ink-2: #2E1F40;
    --muted: #6A5F7C;
    --faint: #8B8299;
    --line: #E4E0D6;
    --lavender: #D8CDE8;
    --lavender-soft: #ECE7F4;
    --green: #2F7D4F;
    --green-bg: #E4F2E9;
    --rust: #A2543F;
    --radius: 16px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    min-height: 100%;
}

body {
    background: var(--canvas);
    color: var(--ink);
    font-family: 'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    display: flex;
    justify-content: center;
}

.shell {
    width: 100%;
    max-width: 460px;
    min-height: 100dvh;
    background: var(--surface);
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 0 60px rgba(36, 23, 51, 0.08);
}

/* ---------- steps ---------- */

.step {
    display: none;
    flex: 1;
    flex-direction: column;
    padding: 24px 24px 32px;
    animation: rise 0.25s ease-out;
}
.step.active { display: flex; }

@keyframes rise {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
    .step { animation: none; }
}

.step-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 32px;
    font-size: 14px;
    color: var(--muted);
}

.back-btn {
    background: none;
    border: none;
    font: inherit;
    font-size: 22px;
    color: var(--ink);
    cursor: pointer;
    padding: 4px 10px 4px 0;
    line-height: 1;
}

.step-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--faint);
}

.spacer { flex: 1; }

h1 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.15;
    margin: 18px 0 8px;
    text-wrap: balance;
}

.sub {
    color: var(--muted);
    font-size: 15px;
    margin: 0 0 22px;
}

/* ---------- buttons ---------- */

.btn {
    display: block;
    width: 100%;
    border: none;
    border-radius: 999px;
    padding: 16px 20px;
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
}

.btn-primary {
    background: var(--ink);
    color: #fff;
}
.btn-primary:disabled {
    background: var(--line);
    color: var(--faint);
    cursor: default;
}

.btn-ghost {
    background: none;
    color: var(--muted);
    font-weight: 600;
    margin-top: 6px;
}

.btn-outline {
    background: var(--card);
    color: var(--ink);
    border: 1.5px solid var(--line);
    margin-top: 10px;
}

.cta-note {
    text-align: center;
    font-size: 12.5px;
    color: var(--faint);
    margin: 10px 0 0;
}

/* ---------- splash ---------- */

/* Matches the app: solid aubergine, everything center-positioned. */
.step-splash {
    background: #2E1F40;
    color: #fff;
    text-align: center;
    align-items: center;
    padding-top: 13vh;
}
.step-splash .mark {
    width: 68px;
    height: 68px;
    border-radius: 21px;
    margin: 0 auto 14px;
}
.step-splash .brand {
    font-size: 19px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #F2EDF8;
}
.step-splash h1 {
    font-size: 34px;
    line-height: 1.1;
    letter-spacing: -0.035em;
    color: #F7F3FC;
    margin: 44px 0 0;
}
.step-splash .sub {
    color: #B7A9CC;
    font-size: 15px;
    margin-top: 18px;
}
.step-splash .btn-primary {
    width: 100%;
    background: #F2EDF8;
    color: #2E1F40;
}
.step-splash .btn-ghost { color: #B7A9CC; }

/* ---------- inputs ---------- */

.field {
    width: 100%;
    background: var(--card);
    border: 1.5px solid var(--line);
    border-radius: 14px;
    padding: 16px;
    font: inherit;
    font-size: 18px;
    color: var(--ink);
    outline: none;
}
.field:focus { border-color: var(--ink); }
.field::placeholder { color: var(--faint); }

.phone-row {
    display: flex;
    gap: 10px;
}
.phone-row .cc {
    flex: 0 0 96px;
    text-align: center;
}

/* Country picker: visible flag+code pill with the native select on top,
   like the iOS country sheet but with the platform's own picker UI. */
.cc-pill {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    white-space: nowrap;
}
.cc-pill select {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    font-size: 16px;
}

.confirm-number {
    margin-top: 22px;
    padding: 24px 16px;
    background: var(--card);
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    text-align: center;
    font-size: 28px;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: 0.4px;
}

.legal {
    font-size: 12.5px;
    color: var(--faint);
    margin-top: 14px;
    text-align: center;
}
.legal a { color: var(--muted); }

/* code boxes */
.code-row {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 26px 0 18px;
}
.code-box {
    width: 64px;
    height: 76px;
    text-align: center;
    font-size: 30px;
    font-weight: 700;
    background: var(--card);
    border: 1.5px solid var(--line);
    border-radius: 14px;
    font-family: inherit;
    color: var(--ink);
    outline: none;
}
.code-box:focus { border-color: var(--ink); }

.resend {
    text-align: center;
    color: var(--faint);
    font-size: 14px;
}
.resend button {
    background: none;
    border: none;
    font: inherit;
    color: var(--muted);
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}
.resend button:disabled { text-decoration: none; color: var(--faint); cursor: default; }

/* ---------- survey ---------- */

.progress {
    height: 4px;
    border-radius: 2px;
    background: var(--line);
    overflow: hidden;
    margin-top: 10px;
}
.progress i {
    display: block;
    height: 100%;
    background: var(--ink);
    border-radius: 2px;
    transition: width 0.25s ease;
}

.options { margin-top: 18px; }

.option {
    display: block;
    width: 100%;
    background: var(--card);
    border: 1.5px solid var(--line);
    border-radius: 999px;
    padding: 16px 20px;
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    color: var(--ink);
    text-align: center;
    cursor: pointer;
    margin-bottom: 12px;
}
.option[aria-pressed="true"], .option:active {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
}

/* ---------- results ---------- */

.checklist {
    list-style: none;
    margin: 18px 0 0;
    padding: 0;
}
.checklist li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 13px 16px;
    margin-bottom: 10px;
    font-size: 15px;
    font-weight: 600;
}
.checklist .tick {
    flex: 0 0 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--green-bg);
    color: var(--green);
    font-size: 13px;
    font-weight: 800;
    display: grid;
    place-items: center;
    margin-top: 1px;
}

.callout {
    background: var(--lavender-soft);
    border-radius: 14px;
    padding: 16px;
    font-size: 14px;
    color: var(--ink-2);
    margin-top: 16px;
}
.callout b { display: block; margin-bottom: 4px; }

/* compare table */
/* Keep air between the expanded sheet and the CTA below it. */
details[open] { margin-bottom: 18px; }

.compare {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin-top: 16px;
    background: var(--card);
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--line);
}
.compare th, .compare td {
    padding: 12px 10px;
    text-align: center;
    border-bottom: 1px solid var(--line);
}
.compare th {
    font-size: 11px;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--faint);
}
.compare td:first-child, .compare th:first-child { text-align: left; padding-left: 16px; }
.compare tr:last-child td { border-bottom: none; }
.compare .svc { font-weight: 700; }
.compare .price { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }
.compare .yes { color: var(--green); font-weight: 800; }
.compare .no { color: var(--faint); }
.compare tr.hero-row { background: var(--lavender-soft); }

/* ---------- account ---------- */

.sso { margin-top: 8px; }
.or {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--faint);
    font-size: 13px;
    margin: 18px 0;
}
.or::before, .or::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

/* ---------- paywall ---------- */

.paywall-mark {
    width: 26px;
    height: 26px;
    border-radius: 8px;
}
.step-top-pad { width: 34px; }

.paywall-title {
    text-align: center;
    font-size: 26px;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin: 8px 0 0;
}

.plan-toggle {
    display: flex;
    gap: 5px;
    background: #EAE6DD;
    border-radius: 999px;
    padding: 4px;
    margin: 14px 0 0;
}
.plan-toggle button {
    flex: 1;
    border: none;
    border-radius: 999px;
    padding: 11px 8px;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    background: none;
    color: var(--muted);
    cursor: pointer;
}
.plan-toggle button.on {
    background: #fff;
    color: var(--ink-2);
    font-weight: 700;
    box-shadow: 0 1px 2px rgba(30, 28, 22, 0.12);
}

/* Price + features live in one bordered card, per the design. */
.price-card {
    margin-top: 12px;
    background: var(--card);
    border: 1.5px solid var(--ink-2);
    border-radius: 20px;
    padding: 16px 18px 10px;
}

.price-line {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
}
.price-line .amount {
    font-size: 38px;
    font-weight: 800;
    letter-spacing: -0.035em;
    color: var(--ink-2);
}
.price-line .cadence { color: var(--muted); font-weight: 700; font-size: 15px; }

.risk-free {
    display: block;
    text-align: center;
    color: var(--green);
    font-size: 13.5px;
    font-weight: 700;
    margin: 2px 0 6px;
}

.price-card .checklist { margin-top: 4px; }
.price-card .checklist li {
    background: none;
    border: none;
    border-radius: 0;
    padding: 7px 0;
    margin-bottom: 0;
    font-size: 14.5px;
    align-items: center;
}
.price-card .checklist .tick {
    flex: 0 0 19px;
    height: 19px;
    background: var(--green);
    color: #fff;
    font-size: 10px;
    margin-top: 0;
}

.social {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 12px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 10px 15px;
    color: var(--muted);
    font-size: 13px;
}
.social .stars { color: var(--ink-2); font-weight: 800; font-size: 13px; letter-spacing: 1px; }
.social .dot { width: 3px; height: 3px; border-radius: 50%; background: #C0B8CC; }

/* Three-year comparison as a bar chart, per the design. */
.threeyr { margin-top: 16px; }
.threeyr h3 {
    margin: 0 0 10px;
    font-size: 15.5px;
    font-weight: 800;
    color: var(--ink-2);
}
.threeyr .bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 9px;
}
.threeyr .bar-row .label {
    flex: 0 0 86px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-2);
}
.threeyr .bar-row .track {
    flex: 1;
    min-width: 0;
    height: 22px;
    border-radius: 6px;
    background: #EFEBE3;
    overflow: hidden;
    display: block;
}
.threeyr .bar-row .track i {
    display: block;
    height: 100%;
    border-radius: 6px;
    background: #C4BCD2;
}
.threeyr .bar-row .amt {
    flex: 0 0 60px;
    text-align: right;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
}
.threeyr .bar-row.us .label,
.threeyr .bar-row.us .amt { font-weight: 800; color: var(--green); }
.threeyr .bar-row.us .label { color: var(--ink-2); }
.threeyr .bar-row.us .track i { background: var(--green); }

.quote {
    margin: 16px 0 0;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 14px 16px;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--ink-2);
}
.quote .who {
    display: block;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 400;
    margin-top: 6px;
}

/* Pinned CTA bar with a top hairline, per the design. */
.paywall-cta {
    position: sticky;
    bottom: 0;
    margin: 22px -24px -32px;
    padding: 13px 24px calc(24px + env(safe-area-inset-bottom));
    background: #FDFCFA;
    border-top: 1px solid var(--line);
}

/* ---------- handoff ---------- */

.handoff-steps {
    counter-reset: hs;
    list-style: none;
    margin: 20px 0 0;
    padding: 0;
}
.handoff-steps li {
    counter-increment: hs;
    display: flex;
    gap: 14px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 12px;
}
.handoff-steps li::before {
    content: counter(hs);
    flex: 0 0 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--ink);
    color: #fff;
    font-weight: 800;
    display: grid;
    place-items: center;
    font-size: 14px;
}
.handoff-steps li > div > b { display: block; margin-bottom: 3px; }
.handoff-steps p { margin: 0; font-size: 14px; color: var(--muted); }
.handoff-steps .appstore-badge {
    display: inline-block;
    margin-top: 10px;
    background: #000;
    color: #fff;
    border-radius: 10px;
    padding: 9px 18px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.success-mark {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--green-bg);
    color: var(--green);
    display: grid;
    place-items: center;
    font-size: 30px;
    font-weight: 800;
    margin: 26px 0 6px;
}

.error-banner {
    display: none;
    background: #F3E9E7;
    color: var(--rust);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    margin-bottom: 14px;
}
.error-banner.show { display: block; }

.demo-pill {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 10;
    background: var(--rust);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    border-radius: 999px;
    padding: 5px 12px;
    display: none;
}
.demo-pill.show { display: block; }

/* ---------- family invites (handoff) ---------- */

.invite-heading {
    margin: 26px 0 4px;
    font-size: 17px;
    font-weight: 800;
    color: var(--ink-2);
}
.invite-send {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}
.invite-send .field { flex: 1; min-width: 0; }
.invite-send .btn { width: auto; padding: 14px 22px; }
.invite-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px 14px;
    margin-top: 8px;
    font-size: 14px;
}
.invite-row b {
    font-weight: 600;
    color: var(--ink-2);
    overflow-wrap: anywhere;
}
.invite-status {
    display: inline-block;
    margin-left: 8px;
    font-size: 11.5px;
    font-weight: 700;
    border-radius: 999px;
    padding: 2px 8px;
    background: var(--lavender-soft);
    color: var(--muted);
    white-space: nowrap;
}
.invite-status.on { background: var(--green-bg); color: var(--green); }
.invite-actions { white-space: nowrap; }
.invite-actions button {
    border: none;
    background: none;
    font: inherit;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--ink-2);
    cursor: pointer;
    padding: 4px 6px;
}
.invite-actions button.danger { color: var(--rust); }

/* ---------- desktop ----------
   The phone-first design stays intact below 900px; on larger screens
   the flow becomes a floating card with room to breathe instead of a
   full-height phone strip. */
@media (min-width: 900px) {
    body {
        padding: 48px 24px;
        align-items: flex-start;
    }
    .shell {
        max-width: 620px;
        min-height: calc(100dvh - 96px);
        border-radius: 28px;
        overflow: hidden;
        box-shadow: 0 24px 80px rgba(36, 23, 51, 0.14);
    }
    .step {
        padding: 36px 56px 40px;
    }
    h1 { font-size: 32px; }
    .step-splash { padding-top: 96px; }
    .step-splash h1 { font-size: 40px; }
    .paywall-title { font-size: 30px; }

    /* The pinned checkout bar bleeds to the card edges; its negative
       margins must match the wider desktop step padding. */
    .paywall-cta {
        margin: 22px -56px -40px;
        padding: 14px 56px 28px;
    }
}

/* ---------- site header (account pages) ----------
   The funnel stays chromeless; signed-in pages like /family carry a
   lightweight version of the main site's header. */
body.with-nav {
    flex-direction: column;
    align-items: center;
    padding-top: 0;
}
.site-nav {
    align-self: stretch;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    background: #2E1F40;
    padding: 12px 20px;
}
.site-nav-links {
    display: flex;
    gap: 18px;
}
.site-nav-links a {
    color: #B7A9CC;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}
.site-nav-links a:hover { color: #F2EDF8; }
.site-nav-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    color: #F2EDF8;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.01em;
}
.site-nav-brand img {
    width: 30px;
    height: 30px;
    border-radius: 9px;
}
.with-nav .shell { min-height: calc(100dvh - 54px); }
@media (min-width: 900px) {
    body.with-nav { padding: 0 24px 48px; }
    .site-nav {
        margin: 0 -24px 40px;
        padding: 14px 32px;
    }
    .with-nav .shell { min-height: calc(100dvh - 200px); }
}

.site-nav-signout {
    justify-self: end;
    background: none;
    border: none;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    color: #B7A9CC;
    cursor: pointer;
    padding: 4px 0;
}
.site-nav-signout:hover { color: #F2EDF8; }
