:root {
    color-scheme: light dark;
    --text: #1d1d1f;
    --muted: #6e6e73;
    --bg: #ffffff;
    --surface: #f5f5f7;
    --rule: #e3e3e8;
    --accent: #3478f6;
    --glow: rgb(52 120 246 / 0.16);
    --bar: rgb(255 255 255 / 0.72);
    --bezel: #111113;
    --shadow: rgb(15 30 60 / 0.16);
    --glass: rgb(255 255 255 / 0.8);
    --green: #34c759;
    --blue: #3478f6;
    --orange: #ff9500;
    --purple: #8e4ee8;
    --teal: #30b0c7;
    --indigo: #5856d6;
    --red: #ff3b30;
}

@media (prefers-color-scheme: dark) {
    :root {
        --text: #f5f5f7;
        --muted: #98989f;
        --bg: #0b0b0d;
        --surface: #1a1a1d;
        --rule: #2a2a2e;
        --accent: #4a8cff;
        --glow: rgb(74 140 255 / 0.18);
        --bar: rgb(11 11 13 / 0.72);
        --bezel: #2a2a2e;
        --shadow: rgb(0 0 0 / 0.5);
        --glass: rgb(44 44 48 / 0.8);
    }
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 4rem;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 17px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica,
        Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-wrap: break-word;
    overflow-x: clip;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

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

h1,
h2 {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Helvetica,
        Arial, sans-serif;
    letter-spacing: -0.03em;
    line-height: 1.05;
    font-weight: 700;
}

/* Top bar */

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--bar);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--rule);
}

.topbar-inner {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0.7rem 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--text);
    font-weight: 600;
}

.brand:hover {
    text-decoration: none;
}

.brand img {
    border-radius: 7px;
}

.topbar-links {
    display: flex;
    gap: 1.5rem;
    margin: 0;
    font-size: 0.9rem;
}

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

.topbar-links a:hover {
    color: var(--text);
    text-decoration: none;
}

/* Hero */

.hero {
    position: relative;
    text-align: center;
    padding: 5rem 16px 0;
    max-width: 72rem;
    margin: 0 auto;
}

.hero::before {
    content: "";
    position: absolute;
    inset: -4rem 0 auto;
    height: 46rem;
    background: radial-gradient(50% 50% at 50% 40%, var(--glow), transparent 70%);
    z-index: -1;
    pointer-events: none;
}

.hero-icon {
    display: block;
    margin: 0 auto 1.5rem;
    width: 96px;
    height: 96px;
    filter: drop-shadow(0 10px 24px var(--shadow));
}

.hero h1 {
    font-size: clamp(2.6rem, 8vw, 5rem);
    margin: 0;
}

.lede {
    max-width: 30rem;
    margin: 1.25rem auto 0;
    font-size: clamp(1.1rem, 2.4vw, 1.3rem);
    color: var(--muted);
}

.cta {
    margin: 2rem 0 0;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.4rem;
    border-radius: 999px;
    background: var(--text);
    color: var(--bg);
    font-weight: 600;
    font-size: 0.95rem;
}

.badge svg {
    width: 1.15rem;
    height: 1.15rem;
    fill: currentColor;
    margin-top: -2px;
}

.hero-shot {
    position: relative;
    margin: 4.5rem auto 0;
    max-width: 64rem;
    padding-right: 6%;
}

/* Device frames. The Mac shots carry the window's own rounded corners, so a
   drop shadow follows them. iPhone and iPad screens sit in a bezel whose
   sizes are fractions of the device's width (cqw). */

.mac {
    display: block;
    width: 100%;
    filter: drop-shadow(0 24px 48px var(--shadow)) drop-shadow(0 2px 6px var(--shadow));
}

.phone,
.ipad {
    container-type: inline-size;
}

.phone .bezel,
.ipad .bezel {
    display: block;
    background: var(--bezel);
    box-shadow: 0 24px 48px var(--shadow), 0 2px 6px var(--shadow);
}

.phone .bezel {
    padding: 3.1cqw;
    border-radius: 15.9cqw;
}

.phone img {
    display: block;
    width: 100%;
    border-radius: 12.8cqw;
}

.ipad .bezel {
    padding: 2.4cqw;
    border-radius: 5.2cqw;
}

.ipad img {
    display: block;
    width: 100%;
    border-radius: 2.8cqw;
}

.hero-phone {
    position: absolute;
    right: 0;
    bottom: -8%;
    width: 22%;
}

/* Features */

main {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 16px;
}

.feature {
    padding: 9rem 0 0;
}

.copy h2 {
    font-size: clamp(2rem, 5vw, 3.25rem);
    margin: 0;
}

.copy p {
    margin: 1rem 0 0;
    font-size: 1.15rem;
    color: var(--muted);
    max-width: 26rem;
}

.copy .eyebrow {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--c);
}

.eyebrow::before {
    content: "";
    width: 1.5rem;
    height: 0.4rem;
    border-radius: 999px;
    background: var(--c);
}

.split {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    align-items: center;
    gap: 4rem;
}

.split.reverse .copy {
    order: 2;
}

.wide {
    text-align: center;
}

.wide .copy p {
    max-width: 32rem;
    margin-left: auto;
    margin-right: auto;
}

.wide .eyebrow {
    justify-content: center;
}

.wide .visual {
    margin: 3.5rem auto 0;
    max-width: 60rem;
}

.stack {
    position: relative;
    padding-left: 14%;
}

.stack .ipad {
    width: 100%;
}

.stack-phone {
    position: absolute;
    left: 0;
    bottom: -6%;
    width: 34%;
}

.stack.trailing {
    padding-left: 0;
    padding-right: 14%;
}

.stack.trailing .stack-phone {
    left: auto;
    right: 0;
}

.pair {
    display: flex;
    justify-content: center;
    gap: 6%;
}

.pair .phone {
    width: 42%;
    max-width: 18rem;
}

.pair .phone:last-child {
    margin-top: 12%;
}

/* Reminders: a notification over the Edit sheet */

.notify {
    position: relative;
    padding-bottom: 3rem;
}

.notify .sheet img {
    display: block;
    width: 62%;
    max-width: 22rem;
    margin-left: auto;
    filter: drop-shadow(0 24px 48px var(--shadow)) drop-shadow(0 2px 6px var(--shadow));
}

.notification {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 68%;
    max-width: 23rem;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 0 0.75rem;
    padding: 0.85rem 1rem 1rem;
    border-radius: 24px;
    background: var(--glass);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    backdrop-filter: saturate(180%) blur(24px);
    box-shadow: 0 18px 40px var(--shadow), 0 1px 3px var(--shadow);
    font-size: 0.92rem;
    line-height: 1.35;
}

.notification img {
    border-radius: 9px;
}

.notification p {
    margin: 0;
}

.notification .notification-app {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.15rem;
    color: var(--muted);
    font-size: 0.8rem;
}

.notification-title {
    font-weight: 600;
}

.notification-action {
    grid-column: 1 / -1;
    margin-top: 0.8rem;
    padding: 0.55rem;
    border-radius: 14px;
    background: var(--surface);
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Friends: the Mac with a phone in front, like the hero */

.duo {
    position: relative;
    padding-right: 6%;
}

.duo-phone {
    position: absolute;
    right: 0;
    bottom: -8%;
    width: 22%;
}

/* Import */

.imports {
    text-align: center;
}

.imports .eyebrow {
    justify-content: center;
}

.imports ul {
    list-style: none;
    margin: 3rem auto 0;
    padding: 0;
    max-width: 64rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    text-align: left;
}

.imports li {
    padding: 1.6rem 1.5rem 1.75rem;
    border-radius: 22px;
    background: var(--surface);
}

.imports svg {
    display: block;
    width: 2rem;
    height: 2rem;
    fill: none;
    stroke: var(--teal);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.imports h3 {
    margin: 1rem 0 0.4rem;
    font-size: 1.2rem;
    letter-spacing: -0.01em;
}

.imports li p {
    margin: 0;
    color: var(--muted);
    font-size: 1rem;
}

/* And more */

.more {
    padding: 9rem 0 0;
    text-align: center;
}

.more h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin: 0 0 2.5rem;
}

.more ul {
    list-style: none;
    margin: 0 auto;
    padding: 0;
    max-width: 52rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.more li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.1rem;
    border-radius: 16px;
    background: var(--surface);
    font-weight: 500;
    font-size: 0.97rem;
    text-align: left;
}

.more svg {
    flex: none;
    width: 1.4rem;
    height: 1.4rem;
    fill: none;
    stroke: var(--accent);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Closing */

.closing {
    text-align: center;
    padding: 9rem 0 7rem;
}

.closing img {
    display: block;
    margin: 0 auto 1rem;
    filter: drop-shadow(0 8px 20px var(--shadow));
}

.closing h2 {
    font-size: 2.25rem;
    margin: 0;
}

.closing p {
    margin: 0.4rem 0 0;
    color: var(--muted);
}

.closing .cta {
    margin-top: 1.75rem;
}

/* Scroll reveal */

.js .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.js .reveal.shown {
    opacity: 1;
    transform: none;
}

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

    .js .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* Narrow screens */

@media (max-width: 760px) {
    .hero {
        padding-top: 3.5rem;
    }

    .hero-shot {
        margin-top: 3rem;
        padding-right: 10%;
    }

    .hero-phone,
    .duo-phone {
        width: 28%;
    }

    .duo {
        padding-right: 10%;
    }

    .feature {
        padding-top: 6rem;
    }

    .split {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .split .copy p {
        margin-left: auto;
        margin-right: auto;
    }

    .split .eyebrow {
        justify-content: center;
    }

    .split.reverse .copy {
        order: 0;
    }

    .wide .visual {
        margin-top: 2.5rem;
    }

    .notify {
        padding-bottom: 4.5rem;
    }

    .notify .sheet img {
        width: 66%;
    }

    .notification {
        width: 82%;
        font-size: 0.85rem;
        text-align: left;
    }

    .imports ul {
        grid-template-columns: 1fr;
        margin-top: 2.5rem;
    }

    .more {
        padding-top: 6rem;
    }

    .more ul {
        grid-template-columns: 1fr 1fr;
    }

    .closing {
        padding: 6rem 0 5rem;
    }
}

/* Footer */

footer {
    max-width: 72rem;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem 1.5rem;
    border-top: 1px solid var(--rule);
    padding: 1.25rem 16px 2.5rem;
    font-size: 0.85rem;
    color: var(--muted);
}

footer p {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.25rem;
}

footer a {
    color: var(--muted);
}

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

/* Feedback page */

main.narrow {
    max-width: 36rem;
    padding-top: 1.5rem;
    padding-bottom: 4rem;
}

nav.back {
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

main.narrow h1 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.lede-left {
    color: var(--muted);
    margin: 0 0 2rem;
}

form label {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    margin: 1.25rem 0 0.4rem;
}

form input[type="text"],
form textarea {
    display: block;
    width: 100%;
    font: inherit;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: 10px;
    padding: 0.6rem 0.75rem;
}

form input[type="text"]:focus,
form textarea:focus {
    outline: 2px solid var(--accent);
    outline-offset: -1px;
}

form textarea {
    resize: vertical;
}

.segmented {
    display: inline-flex;
    border: 0;
    padding: 3px;
    margin: 0;
    background: var(--surface);
    border-radius: 10px;
}

.segmented legend {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.segmented label {
    margin: 0;
    padding: 0.4rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
}

.segmented input {
    position: absolute;
    opacity: 0;
}

.segmented label:has(input:checked) {
    background: var(--bg);
    box-shadow: 0 1px 3px rgb(0 0 0 / 0.15);
}

.segmented label:has(input:focus-visible) {
    outline: 2px solid var(--accent);
}

.trap {
    position: absolute;
    left: -10000px;
}

#status {
    min-height: 1.5rem;
    margin: 1.25rem 0 0.75rem;
    font-size: 0.95rem;
    color: var(--muted);
}

#status.error {
    color: #d93025;
}

#status.ok {
    color: var(--green);
}

form button {
    font: inherit;
    font-weight: 600;
    color: #ffffff;
    background: var(--accent);
    border: 0;
    border-radius: 999px;
    padding: 0.6rem 1.75rem;
    cursor: pointer;
}

form button:disabled {
    opacity: 0.5;
    cursor: default;
}
