/* The home page only. It does not load site.css: the landing page has its own
   layout and type scale, and sharing rules with the plain pages would mean
   every change here has to be checked against them. */

@font-face {
    font-family: "Bricolage Grotesque";
    src: url("/assets/fonts/bricolage-grotesque.woff2") format("woff2");
    font-weight: 200 800;
    font-display: swap;
}

:root {
    --ink: #0d1c1c;
    --paper: #f6f5f0;
    --card: #ffffff;
    --text: #111b1b;
    --muted: #516060;
    /* 4.9:1 on --paper, enough for the small print */
    --faint: #5f6d6d;
    --line: #e3e2da;
    --green: #6e9a3a;
    --teal: #2f8a8c;
    --stage: linear-gradient(125deg, #a8c878 0%, #63b1a4 52%, #2f8a8c 100%);
    --display: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --body: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --wide: 1240px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--body);
    color: var(--text);
    background: var(--paper);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
}

h1,
h2,
h3 {
    font-family: var(--display);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.04;
    text-wrap: balance;
}

h2 {
    font-size: clamp(32px, 4vw, 54px);
}

.grad {
    background: linear-gradient(95deg, var(--green), var(--teal));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

kbd {
    display: inline-block;
    font-family: var(--body);
    font-size: 0.82em;
    font-weight: 600;
    line-height: 1;
    padding: 5px 9px 6px;
    border-radius: 7px;
    background: var(--card);
    border: 1px solid #d5d4cb;
    border-bottom-width: 3px;
    color: var(--text);
    vertical-align: 0.08em;
}

/* ---- Nav ---- */
.nav {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(246, 245, 240, 0.82);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.nav.scrolled {
    border-bottom-color: var(--line);
}

.nav-in {
    max-width: var(--wide);
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 28px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 9px;
    font-family: var(--display);
    font-size: 21px;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-decoration: none;
    margin-right: auto;
}

.brand img {
    width: 30px;
    height: 30px;
}

.beta {
    font-family: var(--body);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #1f6769;
    background: rgba(47, 138, 140, 0.12);
    border-radius: 999px;
    padding: 3px 8px;
}

.nav-links {
    display: flex;
    gap: 26px;
    font-size: 15px;
    font-weight: 500;
}

.nav-links a {
    color: var(--muted);
    text-decoration: none;
    transition: color 0.15s;
}

.nav-links a:hover {
    color: var(--text);
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    padding: 15px 24px 15px 18px;
    border-radius: 999px;
    background: var(--ink);
    color: #fff;
    border: 1px solid var(--ink);
    transition: transform 0.15s, box-shadow 0.15s, opacity 0.2s;
}

.btn img {
    width: 24px;
    height: 24px;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(13, 28, 28, 0.14);
}

.btn.small {
    font-size: 14px;
    padding: 9px 16px 9px 11px;
    gap: 8px;
}

.btn.small img {
    width: 18px;
    height: 18px;
}

/* Only the visitor's own browser gets a button: Chrome unless home.js finds
   Firefox and flags the root element. The other store is a text link. */
.btn[data-store="firefox"],
.is-firefox .btn[data-store="chrome"],
.alt[data-store="chrome"],
.is-firefox .alt[data-store="firefox"] {
    display: none;
}

.is-firefox .btn[data-store="firefox"] {
    display: inline-flex;
}

.is-firefox .alt[data-store="chrome"] {
    display: inline;
}

/* Phones and Safari can't install the extension (browser.js flags them), so
   they get no store button. A phone gets a way to send the page to a
   computer; Safari gets told which browsers to open it in. */
.btn[data-send],
.fine.for-phone,
.fine.for-safari,
.is-phone .btn[data-store],
.is-safari .btn[data-store],
.is-phone .hero .fine,
.is-safari .hero .fine,
.is-safari .cta {
    display: none;
}

.is-phone .btn[data-send] {
    display: inline-flex;
    padding-left: 24px;
}

.is-phone .hero .fine.for-phone,
.is-safari .hero .fine.for-safari {
    display: block;
}

.is-safari .hero .fine.for-safari {
    font-size: 17px;
    color: var(--muted);
    margin-top: 22px;
}

button.btn {
    font-family: inherit;
    cursor: pointer;
}

/* Hidden while the hero's own button is on screen (home.js sets past-hero).
   Visibility, not just opacity, so the keyboard can't tab to a button nobody
   can see; it keeps its place, so the nav doesn't shift when it fades in. */
.nav .btn {
    opacity: 0;
    visibility: hidden;
    transition: transform 0.15s, box-shadow 0.15s, opacity 0.2s, visibility 0.2s;
}

.nav.past-hero .btn {
    opacity: 1;
    visibility: visible;
}

.cta {
    display: flex;
    justify-content: center;
    margin-top: 26px;
}

/* ---- Hero ---- */
.hero {
    text-align: center;
    padding: 34px 24px 0;
}

.hero h1 {
    font-size: clamp(38px, 4.8vw, 68px);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.04;
}

.hero .sub {
    font-size: clamp(17px, 1.5vw, 21px);
    color: var(--muted);
    margin: 18px auto 0;
    max-width: 820px;
}

.fine {
    font-size: 14px;
    color: var(--faint);
    margin-top: 12px;
}

.fine a {
    color: var(--muted);
}

/* ---- Stage: the two live demos, a card each ----
   Each card is tinted with its end of the brand gradient, so the pair reads
   as the green-to-teal of the logo without one slab holding both. */
.stage {
    max-width: var(--wide);
    margin: 30px auto 0;
    padding: 0 24px;
}

.stage-in {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

/* A page about one site shows one demo, centred */
.stage-in.single {
    grid-template-columns: minmax(0, 820px);
    justify-content: center;
}

.demo {
    border-radius: 28px;
    padding: 20px 24px 24px;
}

.demo.voice {
    background: linear-gradient(160deg, #e3edd0, #d3e4bf);
}

.demo.read {
    background: linear-gradient(160deg, #d6eae7, #bfdedb);
}

.demo-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--display);
    font-size: 21px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.demo-label svg {
    width: 34px;
    height: 34px;
    padding: 8px;
    border-radius: 10px;
    color: #fff;
}

.demo.voice .demo-label svg {
    background: var(--green);
}

.demo.read .demo-label svg {
    background: var(--teal);
}

.demo-label span {
    font-family: var(--body);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0;
    color: var(--muted);
}

/* A recording would be about this shape, so the mock holds its place. It
   gives up height on a short screen to keep both demos on the first one. */
.win {
    position: relative;
    aspect-ratio: 16 / 10;
    max-height: max(250px, calc(100dvh - 500px));
    width: 100%;
    border-radius: 14px;
    background: var(--card);
    box-shadow: 0 18px 44px rgba(13, 40, 40, 0.16), 0 0 0 1px rgba(13, 40, 40, 0.06);
    overflow: hidden;
    text-align: left;
}

.win-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 34px;
    padding: 0 14px;
    background: #eeeee8;
    border-bottom: 1px solid var(--line);
}

.win-bar .dots {
    display: flex;
    gap: 6px;
}

.win-bar .dots i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #cfcec5;
}

.win-bar .url {
    flex: 1;
    font-size: 12px;
    color: var(--faint);
    background: var(--card);
    border-radius: 999px;
    padding: 2px 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Voice typing demo: an email being dictated */
.mail {
    margin: 18px 22px 0;
    border: 1px solid var(--line);
    border-radius: 12px 12px 0 0;
    border-bottom: 0;
    height: 100%;
    font-size: 15px;
}

.mail-head {
    font-weight: 600;
    color: #1f2f44;
    background: #eef2f8;
    padding: 10px 16px;
    border-radius: 12px 12px 0 0;
}

.mail-body {
    padding: 14px 16px;
    font-size: clamp(16px, 1.45vw, 20px);
    color: var(--text);
}

.mail-body p + p {
    margin-top: 10px;
}

/* Words home.js hasn't "heard" yet. Without the script every word shows. */
.dictated .w.off {
    display: none;
}

.dictated .dots {
    color: #a6b0b0;
}

.wave {
    position: absolute;
    right: 22px;
    bottom: 16px;
    display: flex;
    align-items: center;
    gap: 3px;
    height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    background: var(--card);
    box-shadow: 0 6px 24px rgba(13, 28, 28, 0.18), 0 0 0 1px rgba(13, 28, 28, 0.05);
}

.wave i {
    width: 3px;
    height: 22px;
    border-radius: 2px;
    background: var(--ink);
    transform: scaleY(0.2);
    animation: wave 0.9s ease-in-out infinite;
}

@keyframes wave {
    0%, 100% { transform: scaleY(0.18); }
    50% { transform: scaleY(1); }
}

/* Read aloud demo: an article with the read words going dark */
.article {
    padding: 20px 28px 0;
}

.article h3 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(24px, 2.3vw, 32px);
    font-weight: 400;
    letter-spacing: 0;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 12px;
}

.article p {
    font-size: clamp(16px, 1.45vw, 20px);
    line-height: 1.75;
    color: var(--text);
}

.reading.live .w {
    color: #a9b2b2;
    transition: color 0.25s;
}

.reading.live .w.on {
    color: var(--text);
}

.reading.live .w.now {
    background: rgba(110, 154, 58, 0.22);
    box-shadow: 0 0 0 3px rgba(110, 154, 58, 0.22);
    border-radius: 3px;
}

.player {
    position: absolute;
    right: 22px;
    bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 44px;
    padding: 0 16px 0 12px;
    border-radius: 999px;
    background: var(--card);
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    box-shadow: 0 6px 24px rgba(13, 28, 28, 0.18), 0 0 0 1px rgba(13, 28, 28, 0.05);
}

.player img {
    width: 18px;
    height: 18px;
}

.player small {
    font-size: 12px;
    color: var(--faint);
    border-left: 1px solid var(--line);
    padding-left: 10px;
}

/* ---- Sections ---- */
.band {
    max-width: var(--wide);
    margin: 0 auto;
    padding: 110px 24px 0;
}

.band-head {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 44px;
}

.band-head p {
    font-size: 19px;
    color: var(--muted);
    margin-top: 16px;
}

/* ---- Typing against talking ---- */
.race {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.lane {
    border-radius: 28px;
    background: var(--card);
    border: 1px solid var(--line);
    padding: 30px 34px 34px;
}

.lane.voice {
    background: linear-gradient(160deg, #e3edd0, #d3e4bf);
    border-color: transparent;
}

.lane small {
    font-size: 14px;
    font-weight: 600;
    color: var(--faint);
}

.lane b {
    display: block;
    font-family: var(--display);
    font-size: clamp(44px, 5vw, 68px);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin: 2px 0 18px;
}

.lane b span {
    font-family: var(--body);
    font-size: 17px;
    font-weight: 500;
    letter-spacing: 0;
    color: var(--muted);
}

.lane p {
    font-size: 19px;
    line-height: 1.6;
}

/* Words not written yet stay as a ghost of the message, so the lane keeps
   its shape and shows how far there is to go */
.lane .w {
    transition: opacity 0.2s;
}

.lane .w.off {
    opacity: 0.16;
}

/* ---- AI chats ---- */
.chats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.chat {
    display: flex;
    align-items: center;
    gap: 16px;
    border-radius: 20px;
    background: var(--card);
    border: 1px solid var(--line);
    padding: 22px 24px;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s;
}

.chat:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(13, 28, 28, 0.1);
}

.chat img {
    width: 44px;
    height: 44px;
    border-radius: 11px;
}

.chat strong {
    display: block;
    font-family: var(--display);
    font-size: 21px;
    letter-spacing: -0.02em;
}

.chat span {
    font-size: 15px;
    color: var(--muted);
}

.chat i {
    margin-left: auto;
    font-style: normal;
    font-size: 20px;
    color: var(--faint);
}

/* ---- Pricing ---- */
.plans {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    max-width: 980px;
    margin: 0 auto;
}

.plan {
    border-radius: 24px;
    background: var(--card);
    border: 1px solid var(--line);
    padding: 28px 28px 30px;
}

.plan.pick {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
}

.plan small {
    font-size: 14px;
    font-weight: 600;
    color: var(--faint);
}

.plan.pick small {
    color: #a8c878;
}

.plan b {
    display: block;
    font-family: var(--display);
    font-size: 50px;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin: 6px 0 10px;
}

.plan b span {
    font-family: var(--body);
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0;
    color: var(--faint);
}

.plan.pick b span {
    color: #a9bbbb;
}

.plan p {
    font-size: 16px;
    color: var(--muted);
}

.plan.pick p {
    color: #cddada;
}

.center {
    text-align: center;
}

/* ---- FAQ ---- */
.faq {
    max-width: 760px;
    margin: 0 auto;
}

.faq details {
    border-bottom: 1px solid var(--line);
}

.faq summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    list-style: none;
    font-size: 19px;
    font-weight: 600;
    padding: 20px 0;
}

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

.faq summary::after {
    content: "+";
    font-size: 24px;
    font-weight: 400;
    line-height: 1;
    color: var(--faint);
}

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

.faq details p {
    font-size: 17px;
    color: var(--muted);
    padding: 0 0 22px;
    max-width: 660px;
}

/* Darker than the brand teal, which is too faint for body-size text on the paper */
.faq details a {
    color: #1f6769;
}

/* ---- Footer ---- */
.foot {
    max-width: var(--wide);
    margin: 0 auto;
    padding: 72px 24px 40px;
    display: grid;
    grid-template-columns: 1.6fr repeat(3, 1fr);
    gap: 32px;
    font-size: 15px;
}

.foot .brand {
    margin-bottom: 10px;
}

.foot p {
    color: var(--muted);
    max-width: 280px;
}

.foot h4 {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--faint);
    margin-bottom: 12px;
}

.foot h4.gap {
    margin-top: 22px;
}

.foot a {
    display: block;
    color: var(--muted);
    text-decoration: none;
    margin-bottom: 8px;
}

/* The logo link is a row, not one of the column's stacked links */
.foot a.brand {
    display: flex;
}

.foot a:hover {
    color: var(--text);
}

.legal {
    max-width: var(--wide);
    margin: 0 auto;
    padding: 20px 24px 36px;
    border-top: 1px solid var(--line);
    font-size: 13px;
    color: var(--faint);
}

.legal a {
    color: var(--muted);
    text-decoration: none;
}

/* ---- Short laptop screens ---- */
/* The demo windows shrink to stay on the first screen, so their text has to
   shrink with them or it runs under the pill in the corner */
@media (min-width: 901px) and (max-height: 800px) {
    .mail-body,
    .article p {
        font-size: 15px;
        line-height: 1.5;
    }

    .article {
        padding-top: 12px;
    }

    .article h3 {
        font-size: 21px;
        padding-bottom: 5px;
        margin-bottom: 8px;
    }
}

/* ---- Narrow screens ---- */
@media (max-width: 900px) {
    .nav-links {
        display: none;
    }

    /* Brand and button have to share a 320px phone */
    .nav-in {
        padding: 10px 14px;
        gap: 10px;
    }

    .nav .beta {
        display: none;
    }

    .hero {
        padding-top: 22px;
    }

    .stage {
        padding: 0 12px;
    }

    .stage-in {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    /* The caption drops under the title when a phone is too narrow for both */
    .demo-label {
        flex-wrap: wrap;
    }

    .demo {
        padding: 16px 14px 14px;
        border-radius: 22px;
    }

    /* Grows with its text, and keeps a strip free underneath for the pill.
       Tall enough that the email being dictated never has to grow it. */
    .win {
        aspect-ratio: auto;
        min-height: 340px;
        max-height: none;
        padding-bottom: 68px;
    }

    .band {
        padding-top: 72px;
    }

    .race,
    .chats,
    .plans {
        grid-template-columns: 1fr;
    }

    .foot {
        grid-template-columns: 1fr 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .wave i {
        animation: none;
        transform: scaleY(0.6);
    }
}
