/*
 * The homepage. It uses the visual system of get.css (the two landing pages
 * for paid Instagram traffic), copied here and not shared: those pages are an
 * A/B test and must not change when the homepage does.
 *
 * Theme: the visitor's system setting decides, and the header's theme button
 * overrides it by setting <html data-theme>. The script in index.html stores
 * the choice.
 */

:root {
    color-scheme: dark;
    --page: #06110D;
    --page-end: #10271D;
    --glow: rgba(20, 138, 91, 0.34);
    --dot: #FFF9ED;
    --dot-opacity: 0.1;
    --text: #FFF9ED;
    --text-soft: rgba(255, 249, 237, 0.74);
    --accent: #F3B94F;
    --label: #A9E3C6;
    --rule: rgba(169, 227, 198, 0.2);
    --field: rgba(255, 249, 237, 0.06);
    --focus: #F3B94F;
    --select-text: #06110D;
    --select-fill: #F3B94F;
    --button-fill: #F3B94F;
    --button-text: #06110D;
    --error: #FFB4A6;
    --icon-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    --phone-shadow: 0 34px 70px rgba(0, 0, 0, 0.55);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light, when the system asks for it and the visitor has not chosen dark. */
@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) {
        color-scheme: light;
        --page: #FFF9ED;
        --page-end: #F4EEDC;
        --glow: rgba(20, 138, 91, 0.16);
        --dot: #10271D;
        --dot-opacity: 0.09;
        --text: #06110D;
        --text-soft: rgba(6, 17, 13, 0.72);
        --accent: #A85F0A;
        --label: #0E6B47;
        --rule: rgba(16, 39, 29, 0.16);
        --field: rgba(16, 39, 29, 0.05);
        --focus: #0E6B47;
        --select-text: #FFF9ED;
        --select-fill: #0E6B47;
        --button-fill: #0E6B47;
        --button-text: #FFF9ED;
        --error: #A3271B;
        --icon-shadow: 0 8px 20px rgba(16, 39, 29, 0.2);
        --phone-shadow: 0 34px 70px rgba(16, 39, 29, 0.28);
    }
}

/* Light, when the visitor chose it. Keep in step with the block above. */
:root[data-theme="light"] {
    color-scheme: light;
    --page: #FFF9ED;
    --page-end: #F4EEDC;
    --glow: rgba(20, 138, 91, 0.16);
    --dot: #10271D;
    --dot-opacity: 0.09;
    --text: #06110D;
    --text-soft: rgba(6, 17, 13, 0.72);
    --accent: #A85F0A;
    --label: #0E6B47;
    --rule: rgba(16, 39, 29, 0.16);
    --field: rgba(16, 39, 29, 0.05);
    --focus: #0E6B47;
    --select-text: #FFF9ED;
    --select-fill: #0E6B47;
    --button-fill: #0E6B47;
    --button-text: #FFF9ED;
    --error: #A3271B;
    --icon-shadow: 0 8px 20px rgba(16, 39, 29, 0.2);
    --phone-shadow: 0 34px 70px rgba(16, 39, 29, 0.28);
}

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

html {
    -webkit-text-size-adjust: 100%;
    background: var(--page);
}

[id] {
    scroll-margin-top: 1.5rem;
}

body {
    min-height: 100vh;
    min-height: 100svh;
    font-family: "Avenir Next", Avenir, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 1.0625rem;
    line-height: 1.55;
    color: var(--text);
    background:
        radial-gradient(circle at 12% -8%, var(--glow) 0, transparent 46rem),
        linear-gradient(165deg, var(--page) 0%, var(--page-end) 100%);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* The dotted backdrop of the reel and the landing pages. */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: var(--dot-opacity);
    background-image: radial-gradient(circle at center, var(--dot) 1px, transparent 1.2px);
    background-size: 30px 30px;
}

::selection {
    color: var(--select-text);
    background: var(--select-fill);
}

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

a {
    color: inherit;
    text-underline-offset: 0.2em;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
    border-radius: 10px;
}

.skip {
    position: absolute;
    left: 1rem;
    top: -4rem;
    z-index: 10;
    padding: 0.6rem 1rem;
    border-radius: 10px;
    background: var(--button-fill);
    color: var(--button-text);
    font-weight: 700;
    text-decoration: none;
}

.skip:focus {
    top: 1rem;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.page {
    position: relative;
    width: 100%;
    max-width: 68rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

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

.top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1.25rem;
    padding-top: max(1.25rem, env(safe-area-inset-top));
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 1.3125rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-decoration: none;
}

.brand img {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    box-shadow: var(--icon-shadow);
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* On a phone the links sit on their own row under the brand: no menu to open. */
.top nav {
    order: 3;
    width: 100%;
}

.top nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0 1.4rem;
    list-style: none;
}

.top nav a {
    display: inline-block;
    padding: 0.72rem 0;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-soft);
    text-decoration: none;
    transition: color 0.2s var(--ease-out);
}

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

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.55rem 1.2rem;
    border: 0;
    border-radius: 999px;
    background: var(--button-fill);
    color: var(--button-text);
    font: inherit;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.25s var(--ease-out), opacity 0.2s;
}

.button:active {
    transform: scale(0.97);
}

.button[disabled] {
    opacity: 0.6;
    cursor: progress;
}

.button.quiet {
    background: transparent;
    color: var(--text);
    box-shadow: inset 0 0 0 1.5px var(--rule);
}

.button.quiet:hover {
    box-shadow: inset 0 0 0 1.5px var(--label);
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--text-soft);
    cursor: pointer;
    box-shadow: inset 0 0 0 1.5px var(--rule);
    transition: color 0.2s, box-shadow 0.2s;
}

.theme-toggle:hover {
    color: var(--text);
    box-shadow: inset 0 0 0 1.5px var(--label);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

/* The button shows the theme it switches to. */
.theme-toggle .sun {
    display: block;
}

.theme-toggle .moon {
    display: none;
}

@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) .theme-toggle .sun {
        display: none;
    }

    :root:not([data-theme="dark"]) .theme-toggle .moon {
        display: block;
    }
}

:root[data-theme="light"] .theme-toggle .sun {
    display: none;
}

:root[data-theme="light"] .theme-toggle .moon {
    display: block;
}

/*
 * On a narrow phone the brand, the theme button and Download do not fit on one
 * row, and the App Store badge is in the first screen anyway.
 */
@media (max-width: 29.99rem) {
    .top-actions .button {
        display: none;
    }
}

/* ---------- Opening ---------- */

.lead {
    display: grid;
    gap: 2.5rem;
    padding-top: 2.25rem;
}

h1 {
    font-size: clamp(2.125rem, 9.4vw, 3.75rem);
    line-height: 1.04;
    font-weight: 800;
    letter-spacing: -0.035em;
    text-wrap: balance;
}

h1 span {
    display: block;
    margin-top: 0.2em;
    color: var(--accent);
}

.sub {
    max-width: 34ch;
    margin-top: 1.1rem;
    font-size: 1.125rem;
    color: var(--text-soft);
}

.store {
    display: inline-block;
    margin-top: 1.6rem;
    border-radius: 12px;
    transition: transform 0.25s var(--ease-out);
}

.store img {
    width: 203px;
    height: 60px;
}

.store:active {
    transform: scale(0.96);
}

.requires {
    margin-top: 0.75rem;
    font-size: 0.9375rem;
    color: var(--text-soft);
}

.facts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1.25rem;
    margin-top: 1.5rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--rule);
    list-style: none;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--label);
}

/*
 * The screenshots stop under the fold of the screen, so the phone has no
 * bottom edge: the frame is open at the bottom and the mask fades it out.
 */
.phone {
    justify-self: center;
    width: min(76vw, 320px);
    padding: 7px 7px 0;
    border-radius: 52px 52px 0 0;
    background: linear-gradient(145deg, #2c3a34, #050807);
    box-shadow: var(--phone-shadow);
    -webkit-mask-image: linear-gradient(#000 80%, transparent 100%);
    mask-image: linear-gradient(#000 80%, transparent 100%);
}

.phone img {
    width: 100%;
    border-radius: 45px 45px 0 0;
}

.lead .phone {
    animation: rise 0.9s var(--ease-out) both;
}

@keyframes rise {
    from {
        transform: translateY(28px);
    }

    to {
        transform: translateY(0);
    }
}

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

section {
    margin-top: clamp(4.5rem, 11vw, 7.5rem);
}

.lead {
    margin-top: 0;
}

h2 {
    font-size: clamp(1.75rem, 5.2vw, 2.5rem);
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.03em;
    text-wrap: balance;
}

h3 {
    font-size: 1.0625rem;
    line-height: 1.3;
    font-weight: 700;
}

.intro {
    max-width: 44ch;
    margin-top: 0.75rem;
    color: var(--text-soft);
}

/* Rows of a term and what it means, divided by rules. */
.rows {
    margin-top: 1.5rem;
    border-top: 1px solid var(--rule);
}

.rows > div {
    display: grid;
    grid-template-columns: minmax(6.5rem, 32%) 1fr;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--rule);
}

.rows dt {
    font-weight: 700;
    color: var(--label);
}

.rows dd {
    color: var(--text-soft);
}

.features {
    display: grid;
    gap: 3rem;
}

.features .phone {
    width: min(70vw, 300px);
}

/* Mission */

.mission {
    display: grid;
    gap: 2rem;
    justify-items: start;
}

.mission p {
    max-width: 56ch;
    margin-top: 1rem;
    color: var(--text-soft);
}

.mission strong {
    color: var(--text);
}

.points {
    margin-top: 1.5rem;
    list-style: none;
    border-top: 1px solid var(--rule);
}

.points li {
    position: relative;
    padding: 0.85rem 0 0.85rem 2rem;
    border-bottom: 1px solid var(--rule);
    color: var(--text-soft);
}

.points li::before {
    content: "";
    position: absolute;
    left: 0.15rem;
    top: 1.25rem;
    width: 0.95rem;
    height: 0.5rem;
    border-left: 2.5px solid var(--accent);
    border-bottom: 2.5px solid var(--accent);
    transform: rotate(-45deg);
}

.mission .mascot {
    width: 168px;
    height: 168px;
}

/* Accuracy */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
    gap: 0 2.75rem;
    margin-top: 1.75rem;
}

.grid > div {
    padding: 1.15rem 0 1.35rem;
    border-top: 1px solid var(--rule);
}

.grid p {
    margin-top: 0.4rem;
    color: var(--text-soft);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.6rem;
    list-style: none;
}

.tags li {
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--label);
    box-shadow: inset 0 0 0 1.5px var(--rule);
}

/* Reviews keep their columns when JavaScript is unavailable. */

.quotes {
    columns: 19rem 3;
    column-gap: 2.75rem;
    margin-top: 1.75rem;
}

.quotes figure {
    break-inside: avoid;
    padding: 1.25rem 0 1.4rem;
    border-top: 1px solid var(--rule);
}

.stars {
    color: var(--accent);
    font-size: 0.9375rem;
    letter-spacing: 0.12em;
}

.quotes blockquote {
    margin-top: 0.5rem;
    font-size: 1.0625rem;
    line-height: 1.5;
}

.quotes figcaption {
    margin-top: 0.75rem;
    font-size: 0.9375rem;
    color: var(--text-soft);
}

.quotes figcaption b {
    color: var(--text);
}

.quotes.is-rotating {
    display: grid;
    max-width: 38rem;
}

/* Keep the controls in place when switching between quotes of different lengths. */
.quotes.is-rotating > figure {
    grid-area: 1 / 1;
}

.quotes.is-rotating > figure:not(.is-current) {
    visibility: hidden;
}

.review-controls:not([hidden]) {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    color: var(--text-soft);
    font-size: 0.9375rem;
}

.stars .half-star {
    color: transparent;
    background: linear-gradient(90deg, var(--accent) 50%, transparent 50%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-stroke: 0.75px var(--accent);
}

/* Roadmap */

.roadmap {
    margin-top: 1.5rem;
    list-style: none;
    border-top: 1px solid var(--rule);
}

.roadmap li {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
    gap: 0.25rem 1.25rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--rule);
}

.roadmap p {
    grid-column: 1;
    max-width: 60ch;
    color: var(--text-soft);
}

.status {
    grid-column: 2;
    grid-row: 1;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 700;
    white-space: nowrap;
    color: var(--label);
    box-shadow: inset 0 0 0 1.5px var(--rule);
}

.status.next {
    color: var(--button-text);
    background: var(--button-fill);
    box-shadow: none;
}

/* Support */

.support blockquote {
    max-width: 46ch;
    margin-top: 1.25rem;
    font-size: clamp(1.1875rem, 3.4vw, 1.5rem);
    line-height: 1.42;
    font-weight: 600;
    letter-spacing: -0.01em;
    text-wrap: pretty;
}

.support blockquote strong {
    color: var(--accent);
}

.support .notes {
    max-width: 60ch;
    margin-top: 1.5rem;
    color: var(--text-soft);
}

.support .notes p + p {
    margin-top: 0.75rem;
}

.support .notes strong {
    color: var(--text);
}

.support .button {
    margin-top: 1.75rem;
}

/* Contact */

.contact {
    display: grid;
    gap: 2rem;
}

.form-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
}

.premium-pill {
    display: none;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 700;
    background: var(--button-fill);
    color: var(--button-text);
}

.feedback-form {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.form-group {
    display: grid;
    gap: 0.35rem;
}

.form-group label {
    font-size: 0.9375rem;
    font-weight: 700;
}

.form-control {
    width: 100%;
    padding: 0.8rem 0.9rem;
    border: 1.5px solid var(--rule);
    border-radius: 12px;
    background: var(--field);
    color: var(--text);
    font: inherit;
    caret-color: var(--accent);
}

.form-control::placeholder {
    color: var(--text-soft);
}

textarea.form-control {
    min-height: 8rem;
    resize: vertical;
}

.form-status {
    font-size: 0.9375rem;
    color: var(--text-soft);
}

.form-status.is-error {
    color: var(--error);
    font-weight: 600;
}

.success-message {
    display: none;
    gap: 0.6rem;
    justify-items: start;
    padding: 1.25rem 0;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
}

.success-message p {
    color: var(--text-soft);
}

/* Close */

.closing {
    display: grid;
    justify-items: center;
    text-align: center;
}

.closing .mascot {
    width: 132px;
    height: 132px;
}

.closing h2 {
    margin-top: 0.75rem;
}

.closing p {
    margin-top: 0.5rem;
    color: var(--text-soft);
}

footer {
    display: grid;
    gap: 1rem;
    margin-top: 4.5rem;
    padding: 1.75rem 0 max(2rem, env(safe-area-inset-bottom));
    border-top: 1px solid var(--rule);
    font-size: 0.9375rem;
    color: var(--text-soft);
}

footer ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0 1.5rem;
    list-style: none;
}

footer a {
    display: inline-block;
    padding: 0.72rem 0;
}

.social {
    display: flex;
    gap: 0.5rem;
}

.social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 999px;
    transition: color 0.2s;
}

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

.social svg {
    width: 20px;
    height: 20px;
}

/* ---------- Wider screens ---------- */

@media (min-width: 54rem) {
    .top {
        padding-top: 2rem;
    }

    .top nav {
        order: 0;
        width: auto;
    }

    .lead {
        grid-template-columns: 1.15fr 0.85fr;
        align-items: center;
        gap: 3rem;
        padding-top: 3.5rem;
    }

    .features {
        grid-template-columns: 1.2fr 0.8fr;
        align-items: start;
        gap: 4rem;
    }

    .features .phone {
        position: sticky;
        top: 2rem;
        justify-self: end;
    }

    .mission {
        grid-template-columns: 1fr auto;
        align-items: center;
        gap: 4rem;
    }

    .mission .mascot {
        width: 220px;
        height: 220px;
    }

    .contact {
        grid-template-columns: 0.9fr 1.1fr;
        gap: 4rem;
    }

    footer {
        grid-template-columns: 1fr auto;
        align-items: center;
    }

    footer .copyright {
        grid-column: 1 / -1;
    }
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lead .phone {
        animation: none;
    }

    .store,
    .button {
        transition: none;
    }
}
