/* Convermo — site styles.
   Palette is lifted straight from ConvertoKit/Design/Palette.swift so the site
   and the app read as one product. Nothing is loaded from a third party: no
   fonts, no scripts, no analytics — which is also what the privacy page
   claims, so it has to stay that way. */

:root {
    --canvas: #f5f7fa;
    --surface: #ffffff;
    --surface-active: #f4f8ff;
    --chip: #e9eef5;
    --primary: #10141c;
    --secondary: #5a6472;
    --tertiary: #7a8494;
    --accent: #0935a6;
    --on-accent: #ffffff;
    --accent-soft: #e4edfd;
    --hairline: rgba(17, 19, 24, 0.08);
    --shadow: 0 1px 2px rgba(16, 20, 28, 0.04), 0 12px 32px rgba(16, 20, 28, 0.06);
    --shadow-lift: 0 2px 4px rgba(16, 20, 28, 0.05), 0 24px 56px rgba(16, 20, 28, 0.1);
    --radius: 22px;
    --radius-sm: 14px;
    --font: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont,
        "Segoe UI", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
    :root {
        --canvas: #0a0c10;
        --surface: #151920;
        --surface-active: #141c2e;
        --chip: #212733;
        --primary: #f3f5f8;
        --secondary: #99a3b2;
        --tertiary: #7c8696;
        --accent: #7fb2ff;
        --on-accent: #08152b;
        --accent-soft: #14203a;
        --hairline: rgba(255, 255, 255, 0.09);
        --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.45);
        --shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.45), 0 24px 56px rgba(0, 0, 0, 0.55);
    }
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--canvas);
    color: var(--primary);
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.wrap {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
}

.skip {
    position: absolute;
    left: -9999px;
}
.skip:focus {
    left: 24px;
    top: 12px;
    z-index: 10;
    background: var(--surface);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
}

/* ---------- Header ---------- */

header.site {
    position: sticky;
    top: 0;
    z-index: 5;
    background: color-mix(in srgb, var(--canvas) 88%, transparent);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--hairline);
}

header.site .wrap {
    display: flex;
    align-items: center;
    gap: 20px;
    height: 64px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 18px;
    color: var(--primary);
    text-decoration: none;
    margin-right: auto;
}

.brand img {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid var(--hairline);
}

nav.site a {
    color: var(--secondary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    margin-left: 22px;
}

nav.site a:hover {
    color: var(--primary);
}

@media (max-width: 560px) {
    nav.site a {
        margin-left: 16px;
        font-size: 14px;
    }
    .brand span {
        display: none;
    }
}

/* ---------- Type ---------- */

h1,
h2,
h3 {
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0;
}

h1 {
    font-size: clamp(38px, 6.5vw, 62px);
    font-weight: 800;
}

h2 {
    font-size: clamp(27px, 3.6vw, 38px);
    font-weight: 800;
}

h3 {
    font-size: 20px;
    font-weight: 700;
}

.lede {
    font-size: clamp(18px, 2.2vw, 21px);
    color: var(--secondary);
    max-width: 34ch;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    margin: 0 0 12px;
}

/* ---------- Hero ---------- */

.hero {
    display: grid;
    grid-template-columns: 1fr 0.85fr;
    gap: 48px;
    align-items: center;
    padding: clamp(48px, 8vw, 96px) 0 clamp(32px, 5vw, 64px);
}

.hero-icon {
    width: 88px;
    height: 88px;
    border-radius: 20px;
    border: 1px solid var(--hairline);
    box-shadow: var(--shadow);
    margin-bottom: 28px;
}

.hero p.lede {
    margin: 20px 0 32px;
}

.hero-phone {
    justify-self: center;
}

@media (max-width: 980px) {
    .hero-phone {
        font-size: 14px;
    }
}

@media (max-width: 820px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }
    .hero .lede {
        margin-left: auto;
        margin-right: auto;
    }
    .hero-icon {
        margin-inline: auto;
    }
    .hero-phone {
        font-size: 15px;
    }
}

@media (max-width: 400px) {
    .hero-phone {
        font-size: 13px;
    }
}

/* ---------- Buttons ---------- */

.cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--accent);
    color: var(--on-accent);
    font-weight: 700;
    font-size: 17px;
    padding: 15px 28px;
    border-radius: 999px;
    text-decoration: none;
    box-shadow: var(--shadow);
}

.cta.ghost {
    background: var(--surface);
    color: var(--primary);
    border: 1px solid var(--hairline);
}

.note {
    font-size: 14px;
    color: var(--tertiary);
    margin-top: 14px;
}

/* ---------- Sections ---------- */

section {
    padding: clamp(48px, 7vw, 88px) 0;
}

section > .wrap > h2 {
    max-width: 20ch;
}

section > .wrap > h2 + p {
    color: var(--secondary);
    max-width: 56ch;
    margin: 16px 0 0;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 44px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
}

.card h3 {
    margin-bottom: 8px;
}

.card p {
    margin: 0;
    color: var(--secondary);
    font-size: 16px;
}

.glyph {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--accent-soft);
    color: var(--accent);
    display: grid;
    place-items: center;
    font-size: 21px;
    font-weight: 700;
    margin-bottom: 18px;
}

/* ---------- Device mockups ----------
   The app's interface rebuilt in HTML rather than screenshotted, so it stays
   sharp at any size and can be shown in either theme. Colours are the same
   values as ConvertoKit/Design/Palette.swift, scoped to .phone so the page
   theme never bleeds into a screen that is meant to read as light.

   Everything inside is sized in em: set font-size on .phone and the whole
   device scales with it. */

.phone {
    --s-canvas: #f5f7fa;
    --s-surface: #ffffff;
    --s-active: #f4f8ff;
    --s-chip: #e9eef5;
    --s-primary: #10141c;
    --s-secondary: #5a6472;
    --s-tertiary: #7a8494;
    --s-accent: #0935a6;
    --s-on-accent: #ffffff;
    --s-accent-muted: #d3e2fb;
    --s-negative: #c0392b;
    --s-negative-soft: #fceae8;
    --s-positive: #18754d;
    --s-key-shadow: 0 1px 2px rgba(16, 20, 28, 0.05);

    font-size: 16px;
    width: 20.8em;
    padding: 0.4em;
    background: #0c0e11;
    border-radius: 3em;
    box-shadow: var(--shadow-lift);
    flex: 0 0 auto;
}

.phone.dark {
    --s-canvas: #0a0c10;
    --s-surface: #151920;
    --s-active: #141c2e;
    --s-chip: #212733;
    --s-primary: #f3f5f8;
    --s-secondary: #99a3b2;
    --s-tertiary: #7c8696;
    --s-accent: #7fb2ff;
    --s-on-accent: #08152b;
    --s-accent-muted: #1b2c4c;
    --s-negative: #e8705f;
    --s-negative-soft: #2c1512;
    --s-positive: #45c08b;
    --s-key-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.screen {
    position: relative;
    height: 43em;
    background: var(--s-canvas);
    border-radius: 2.65em;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    color: var(--s-primary);
    font-family: var(--font);
}

.island {
    position: absolute;
    top: 0.7em;
    left: 50%;
    transform: translateX(-50%);
    width: 5.9em;
    height: 1.75em;
    background: #000;
    border-radius: 999px;
    z-index: 2;
}

.statusbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1em 1.7em 0.4em;
    font-size: 0.83em;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.statusbar svg {
    display: block;
}

.screen-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0.55em 0.85em 0;
    min-height: 0;
}

.topbar {
    display: flex;
    align-items: center;
    gap: 0.5em;
    margin-bottom: 0.75em;
}

.freshness {
    display: inline-flex;
    align-items: center;
    gap: 0.45em;
    background: var(--s-surface);
    border-radius: 999px;
    padding: 0.4em 0.75em;
    font-size: 0.78em;
    font-weight: 500;
    color: var(--s-primary);
    box-shadow: var(--s-key-shadow);
}

.freshness::before {
    content: "";
    width: 0.45em;
    height: 0.45em;
    border-radius: 50%;
    background: var(--s-positive);
}

.freshness.stale {
    color: var(--s-secondary);
}

.freshness.stale::before {
    background: #b4690e;
}

.gear {
    margin-left: auto;
    width: 2.1em;
    height: 2.1em;
    border-radius: 50%;
    background: var(--s-surface);
    display: grid;
    place-items: center;
    color: var(--s-secondary);
    box-shadow: var(--s-key-shadow);
    font-size: 1.15em;
    line-height: 1;
}

.pair {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.45em;
}

.ccard {
    display: flex;
    align-items: center;
    gap: 0.7em;
    background: var(--s-surface);
    border: 1px solid transparent;
    border-radius: 1.3em;
    padding: 0.85em 1em;
    box-shadow: var(--s-key-shadow);
}

.ccard.input {
    background: var(--s-active);
    border-color: color-mix(in srgb, var(--s-accent) 30%, transparent);
}

.disc {
    width: 2.2em;
    height: 2.2em;
    border-radius: 50%;
    background: var(--s-chip);
    display: grid;
    place-items: center;
    font-size: 1em;
    line-height: 1;
    flex: 0 0 auto;
}

.disc span {
    font-size: 1.15em;
    line-height: 1;
}

.ccard .code {
    font-size: 1.05em;
    font-weight: 700;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 0.25em;
}

.ccard.input .code {
    color: var(--s-accent);
}

.ccard .code::after {
    content: "⌄";
    font-size: 0.8em;
    line-height: 0.6;
    opacity: 0.75;
    position: relative;
    top: -0.15em;
}

.ccard .name {
    font-size: 0.78em;
    color: var(--s-secondary);
    line-height: 1.3;
}

.ccard .value {
    margin-left: auto;
    text-align: right;
    font-size: 1.85em;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.12em;
}

/* The expression the user typed sits on its own line above the running total,
   which is why it claims the full width of the value rather than sharing the
   row with it. */
.ccard .expr {
    flex: 0 0 100%;
    text-align: right;
    font-size: 0.42em;
    font-weight: 500;
    color: var(--s-secondary);
    letter-spacing: 0;
    margin-bottom: 0.1em;
}

.caret {
    width: 0.06em;
    height: 1.1em;
    background: var(--s-accent);
    border-radius: 999px;
    opacity: 0.9;
}

.swap {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2.5em;
    height: 2.5em;
    border-radius: 50%;
    background: var(--s-accent);
    color: var(--s-on-accent);
    display: grid;
    place-items: center;
    font-size: 1em;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(9, 53, 166, 0.28);
    z-index: 1;
}

.unit-rate {
    text-align: center;
    font-size: 0.76em;
    color: var(--s-tertiary);
    margin: 1.1em 0 0;
}

.keypad {
    margin-top: auto;
    padding-bottom: 0.5em;
}

.keypad-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5em;
}

.pill-key {
    border-radius: 0.95em;
    padding: 0.65em 0;
    width: 4.3em;
    text-align: center;
    font-size: 1.05em;
    font-weight: 600;
    background: var(--s-negative-soft);
    color: var(--s-negative);
}

.pill-key.equals {
    background: var(--s-chip);
    color: var(--s-secondary);
    width: 3.9em;
}

.keys {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5em;
}

.key {
    background: var(--s-surface);
    border-radius: 0.95em;
    height: 3em;
    display: grid;
    place-items: center;
    font-size: 1.3em;
    font-weight: 500;
    color: var(--s-primary);
    box-shadow: var(--s-key-shadow);
}

.key.op {
    background: var(--s-accent-muted);
    color: var(--s-accent);
    font-weight: 600;
}

.home-bar {
    width: 8.5em;
    height: 0.32em;
    border-radius: 999px;
    background: var(--s-primary);
    opacity: 0.22;
    margin: 0.5em auto 0.6em;
}

/* Locked state — what a free user sees in place of the answer. */
.ccard .masked {
    margin-left: auto;
    font-size: 1.85em;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--s-tertiary);
}

/* ---------- Widget mockup ---------- */

.homescreen {
    background: linear-gradient(160deg, #dbe7fb 0%, #b9d0f5 55%, #a8c4f2 100%);
    border-radius: 2.2em;
    padding: 2.2em;
    display: grid;
    place-items: center;
    box-shadow: var(--shadow-lift);
}

.widget {
    font-family: var(--font);
    width: 15.5em;
    font-size: 16px;
    background: #f5f7fa;
    border-radius: 1.6em;
    padding: 1em 1.1em;
    box-shadow: 0 8px 24px rgba(16, 20, 28, 0.18);
    color: #10141c;
}

.widget-head {
    display: flex;
    align-items: center;
    gap: 0.45em;
    font-size: 0.9em;
    font-weight: 700;
    margin-bottom: 0.5em;
}

.widget-head .disc {
    width: 1.5em;
    height: 1.5em;
    background: #e9eef5;
}

.widget-head .disc span {
    font-size: 0.85em;
}

.widget-head .when {
    margin-left: auto;
    font-size: 0.72em;
    font-weight: 500;
    color: #7a8494;
}

.widget-row {
    display: flex;
    align-items: center;
    gap: 0.55em;
    padding: 0.4em 0;
    border-top: 1px solid rgba(17, 19, 24, 0.07);
}

.widget-row .disc {
    width: 1.6em;
    height: 1.6em;
    background: #e9eef5;
}

.widget-row .disc span {
    font-size: 0.9em;
}

.widget-row .wcode {
    font-size: 0.82em;
    color: #5a6472;
    font-weight: 500;
}

.widget-row .wval {
    margin-left: auto;
    font-weight: 700;
    font-size: 0.95em;
    letter-spacing: -0.01em;
}

.widget-row .wchg {
    width: 3.4em;
    text-align: right;
    font-size: 0.72em;
    font-weight: 500;
    color: #18754d;
}

.widget-row .wchg.down {
    color: #c0392b;
}

/* ---------- Showcase layout ---------- */

.showcase {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: center;
    justify-content: center;
    margin-top: 48px;
}

.showcase .phone {
    font-size: 12px;
}

.showcase figure {
    margin: 0;
    max-width: 300px;
    text-align: center;
}

.showcase figcaption {
    color: var(--secondary);
    font-size: 15px;
    margin-top: 20px;
}

.showcase figcaption strong {
    display: block;
    color: var(--primary);
    font-size: 17px;
    margin-bottom: 4px;
}

/* ---------- Pricing ---------- */

.plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 44px;
    max-width: 720px;
}

.plan {
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
}

.plan.featured {
    border-color: var(--accent);
    background: var(--surface-active);
}

.plan .price {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 6px 0 4px;
}

.plan .term {
    color: var(--secondary);
    font-size: 15px;
    margin: 0;
}

.badge {
    display: inline-block;
    background: var(--accent);
    color: var(--on-accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 4px 10px;
    border-radius: 999px;
    text-transform: uppercase;
}

/* ---------- Prose (legal + support) ---------- */

.prose {
    max-width: 720px;
    margin: 0 auto;
    padding: clamp(40px, 6vw, 72px) 24px clamp(56px, 8vw, 96px);
}

.prose h1 {
    font-size: clamp(32px, 5vw, 44px);
}

.prose h2 {
    font-size: 24px;
    margin: 44px 0 12px;
    scroll-margin-top: 80px;
}

.prose h3 {
    font-size: 18px;
    margin: 28px 0 8px;
}

.prose p,
.prose li {
    color: var(--secondary);
    font-size: 17px;
}

.prose strong {
    color: var(--primary);
}

.prose ul,
.prose ol {
    padding-left: 22px;
}

.prose li {
    margin: 8px 0;
}

.updated {
    color: var(--tertiary);
    font-size: 15px;
    margin-top: 12px;
}

.callout {
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius-sm);
    padding: 20px 24px;
    margin: 28px 0;
    box-shadow: var(--shadow);
}

.callout p {
    margin: 0;
}

.callout p + p {
    margin-top: 12px;
}

table.data {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 15px;
}

table.data th,
table.data td {
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid var(--hairline);
    vertical-align: top;
    color: var(--secondary);
}

table.data th {
    color: var(--primary);
    font-weight: 700;
}

.toc {
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-sm);
    padding: 20px 24px;
    margin: 32px 0;
}

.toc ol {
    margin: 0;
    columns: 2;
    column-gap: 32px;
}

.toc li {
    margin: 4px 0;
    font-size: 15px;
    break-inside: avoid;
}

@media (max-width: 560px) {
    .toc ol {
        columns: 1;
    }
}

details.faq {
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-sm);
    padding: 18px 22px;
    margin: 12px 0;
    box-shadow: var(--shadow);
}

/* Flex rather than a floated marker: with `float: right` the + drops to the
   last line whenever a question wraps onto two, which is most of them on a
   phone. */
details.faq summary {
    font-weight: 700;
    color: var(--primary);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

details.faq summary::-webkit-details-marker {
    display: none;
}

details.faq summary::after {
    content: "+";
    color: var(--accent);
    font-weight: 700;
    line-height: 1.4;
}

details.faq[open] summary::after {
    content: "–";
}

details.faq p {
    margin: 12px 0 0;
}

/* ---------- Footer ---------- */

footer.site {
    border-top: 1px solid var(--hairline);
    padding: 44px 0;
    margin-top: 24px;
}

footer.site .wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 28px;
    align-items: center;
}

footer.site a {
    color: var(--secondary);
    text-decoration: none;
    font-size: 15px;
}

footer.site a:hover {
    color: var(--primary);
}

footer.site .copy {
    color: var(--tertiary);
    font-size: 14px;
    margin-right: auto;
}

.attribution {
    color: var(--tertiary);
    font-size: 13px;
    width: 100%;
    margin: 8px 0 0;
}

/* Narrow screens: the copyright's `margin-right: auto` puts it on the same row
   as the first link and pushes the rest into a ragged second line. Give it its
   own full-width line under the links instead. */
@media (max-width: 620px) {
    footer.site .wrap {
        gap: 12px 20px;
    }
    footer.site .copy {
        flex: 0 0 100%;
        margin-right: 0;
        order: 2;
    }
    footer.site .attribution {
        order: 3;
        margin-top: 0;
    }
}
