/* Kiri's own palette and shapes, from the app's Theme.swift. Light only, like the app. */
:root {
    color-scheme: light;
    --bg: #f6f3ff;
    --cream: #fff9f0;
    --surface: #ffffff;
    --ink: #231e45;
    --ink-secondary: rgba(35, 30, 69, 0.64);
    --ink-tertiary: rgba(35, 30, 69, 0.4);
    --line: rgba(35, 30, 69, 0.08);
    --accent: #12aebe;
    --accent-text: #0b7f8b;
    --sky: linear-gradient(to top right, #22c3b5 0%, #5b54e8 45%, #9a3fe0 78%, #e0509e 100%);
    --card-shadow: 0 0 0 1px rgba(35, 30, 69, 0.04), 0 8px 30px rgba(122, 97, 255, 0.09);
    --radius: 26px;
    --spring: cubic-bezier(0.34, 1.8, 0.64, 1);
}

.teal { --tint: #12aebe; }
.violet { --tint: #7a61ff; }
.pink { --tint: #ff4f99; }
.orange { --tint: #ff8a3d; }
.gold { --tint: #ffb800; }

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(ellipse 900px 420px at 50% 0, rgba(18, 174, 190, 0.14), transparent 70%),
        linear-gradient(var(--bg), var(--cream) 40%);
    color: var(--ink);
    font-family: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 17px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background-color: rgba(18, 174, 190, 0.22);
}

a {
    color: var(--accent-text);
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
}

a:hover {
    text-decoration: underline;
}

a:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(18, 174, 190, 0.3);
}

h1,
h2,
h3 {
    margin: 0;
    font-weight: 800;
}

/* Type scale: one size per level, on every page. */
h1 {
    font-size: 52px;
    line-height: 1.05;
    letter-spacing: -0.03em;
}

h2 {
    font-size: 32px;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

h3 {
    font-size: 17px;
    line-height: 1.3;
}

.wrap {
    max-width: 1040px;
    margin: 0 auto;
    padding-inline: 20px;
}

/* Header */

.bar {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: rgba(246, 243, 255, 0.75);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    box-shadow: inset 0 -1px 0 var(--line);
}

.bar .wrap {
    display: flex;
    height: 56px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ink);
    font-size: 19px;
    font-weight: 800;
}

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

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

.nav {
    display: flex;
    gap: 4px;
}

.nav a {
    padding: 6px 14px;
    border-radius: 999px;
    color: var(--ink-secondary);
    font-size: 15px;
    transition: background-color 150ms ease, color 150ms ease;
}

.nav a:hover {
    background-color: rgba(35, 30, 69, 0.06);
    color: var(--ink);
    text-decoration: none;
}

.nav a[aria-current="page"] {
    background-color: var(--surface);
    box-shadow: var(--card-shadow);
    color: var(--ink);
}

/* Page rhythm: every page is a header, then sections 72px apart, then the sky card. */

main {
    display: grid;
    gap: 72px;
    padding-block: 64px 72px;
}

.head .lede {
    max-width: 560px;
}

.lede {
    margin: 16px 0 0;
    color: var(--ink-secondary);
    font-size: 19px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 18px;
    padding: 5px 12px 5px 10px;
    border-radius: 999px;
    background-color: var(--surface);
    box-shadow: var(--card-shadow);
    font-size: 14px;
    font-weight: 700;
}

.pill::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--tint, var(--accent));
}

/* Cards: one shape for everything. */

.card {
    padding: 24px;
    border-radius: var(--radius);
    background-color: var(--surface);
    box-shadow: var(--card-shadow);
}

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

.card strong {
    color: var(--ink);
    font-weight: 700;
}

.grid {
    display: grid;
    gap: 16px;
}

/* A white symbol on a tinted rounded square, like the app's Settings icons. */
.chip {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    margin-bottom: 16px;
    border-radius: 10px;
    background: linear-gradient(color-mix(in srgb, var(--tint) 75%, white), var(--tint));
    color: #ffffff;
}

/* The app's chunky capsule. */
.button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 999px;
    background-color: var(--accent);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.3);
    color: var(--ink);
    font-size: 17px;
    font-weight: 800;
    transition: transform 500ms var(--spring);
}

a.button:hover {
    text-decoration: none;
    transform: scale(1.04);
}

a.button:active {
    transform: scale(1.1);
    transition-duration: 200ms;
}


/* Kiri's sky, for Kiri's own moments: the card every page ends on. */
.sky {
    padding: 48px 24px;
    border-radius: var(--radius);
    background: var(--sky);
    box-shadow: 0 12px 32px rgba(122, 97, 255, 0.3);
    color: #ffffff;
    text-align: center;
}

.sky p {
    max-width: 520px;
    margin: 12px auto 24px;
    opacity: 0.9;
}

.sky .button {
    background-color: #ffffff;
    box-shadow: 0 6px 16px rgba(35, 30, 69, 0.2);
}

/* Landing: the hero is the app's fog, with the map showing through round the phone. It slides under the bar. */

.stage {
    position: relative;
    margin-top: -56px;
    padding: 56px 0 64px;
}

/* The fog fills the stage and fades out at its foot. */
.layers {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background-color: #efe9fb;
    -webkit-mask-image: linear-gradient(#000 calc(100% - 220px), transparent);
    mask-image: linear-gradient(#000 calc(100% - 220px), transparent);
}

/* The map data's credit, by the map. */
.credit {
    position: absolute;
    top: 64px;
    right: 12px;
    z-index: 1;
    color: var(--ink-tertiary);
    font-size: 11px;
    font-weight: 500;
}

/* The map, faint under the fog and clearest just behind the phone. */
.layers::before {
    --glow: circle 520px at 50% calc(100% - 500px);
    content: "";
    position: absolute;
    inset: 0;
    background: url("hero/map.webp") center / cover;
    -webkit-mask-image: radial-gradient(var(--glow), rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.07));
    mask-image: radial-gradient(var(--glow), rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.07));
}

.stage-copy {
    position: relative;
    z-index: 1;
    max-width: 780px;
    margin: 0 auto;
    padding-top: 80px;
    text-align: center;
}

.stage h1 {
    font-size: 76px;
    text-wrap: balance;
}

.stage .lede {
    max-width: 540px;
    margin-inline: auto;
    font-size: 21px;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px 20px;
    margin-top: 32px;
}

.shot.hero-shot {
    width: fit-content;
    margin: 56px auto 0;
}

.hero-shot .phone {
    width: 300px;
    max-width: none;
}

.sticker b {
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

/* The app's progress ring: --p is the percentage. */
.ring {
    --p: 0;
    flex: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: conic-gradient(var(--accent) calc(var(--p) * 1%), rgba(35, 30, 69, 0.08) 0);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4.5px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4.5px));
}

.phone {
    display: block;
    width: 100%;
    max-width: 280px;
    height: auto;
    margin-inline: auto;
    border: 6px solid var(--ink);
    border-radius: 44px;
    background-color: var(--surface);
    box-shadow: 0 30px 60px rgba(122, 97, 255, 0.25);
}

.features {
    display: grid;
    gap: 24px;
    margin-top: 56px;
    scroll-margin-top: 80px;
}

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

/* Each feature sits in a warm panel washed with its colour. */
.feature {
    display: grid;
    align-items: center;
    gap: 40px;
    padding: 36px 24px;
    border-radius: 40px;
    background-color: color-mix(in srgb, var(--tint) 11%, #fffaf3);
    box-shadow: inset 0 0 0 1px rgba(35, 30, 69, 0.04);
}

.feature h2 + p {
    margin: 12px 0 0;
    color: var(--ink-secondary);
    font-size: 19px;
}

/* A screenshot on a glow of its feature's colour, with stickers from the app floating beside it. */
.shot {
    position: relative;
    margin: 0;
}

.shot::before {
    content: "";
    position: absolute;
    inset: 6% 0;
    border-radius: 50%;
    background: radial-gradient(closest-side, color-mix(in srgb, var(--tint) 35%, transparent), transparent);
    filter: blur(24px);
}

.shot .phone {
    position: relative;
}

.sticker {
    position: absolute;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px 10px 10px;
    border-radius: 20px;
    background-color: var(--surface);
    box-shadow: 0 0 0 1px rgba(35, 30, 69, 0.05), 0 12px 30px rgba(122, 97, 255, 0.22);
    color: var(--ink-secondary);
    font-size: 13px;
    line-height: 1.25;
    white-space: nowrap;
    animation: float 6s ease-in-out infinite;
}

.sticker b {
    display: block;
    color: var(--ink);
    font-size: 17px;
}

.sticker .chip {
    width: 32px;
    height: 32px;
    margin: 0;
    border-radius: 9px;
}

.sticker .ring {
    width: 32px;
    height: 32px;
}

.sticker.top {
    top: 14%;
    left: 0;
}

.sticker.bottom {
    right: 0;
    bottom: 16%;
    animation-delay: -3s;
}

.chip.gradient {
    background: var(--sky);
}

@keyframes float {
    50% {
        transform: translateY(-10px);
    }
}

/* Privacy policy: headings beside their text on wide screens. */

.policy section {
    display: grid;
    gap: 8px;
}

.policy section + section {
    margin-top: 24px;
    padding-top: 24px;
    box-shadow: inset 0 1px 0 var(--line);
}

.policy h2 {
    font-size: 19px;
    letter-spacing: -0.01em;
}

.policy p {
    margin: 0;
}

.policy p + p,
.policy ul + p {
    margin-top: 8px;
}

.policy ul {
    margin: 0;
    padding-left: 1.2em;
    color: var(--ink-secondary);
    font-size: 15px;
}

.policy li + li {
    margin-top: 6px;
}

/* Footer */

footer {
    padding-block: 24px 40px;
    box-shadow: inset 0 1px 0 var(--line);
    color: var(--ink-secondary);
    font-size: 14px;
}

footer .wrap {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 24px;
}

footer nav {
    display: flex;
    gap: 20px;
}

footer a {
    color: var(--ink-secondary);
}

@media (min-width: 760px) {
    .cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .feature {
        grid-template-columns: 1fr 1fr;
        gap: 48px;
        padding: 56px 64px;
    }

    .feature:nth-child(even) > div {
        order: 1;
    }

    .features {
        gap: 32px;
        margin-top: 80px;
    }

    .policy {
        padding: 32px;
    }

    .policy section {
        grid-template-columns: 220px 1fr;
        gap: 32px;
    }
}

@media (max-width: 480px) {
    main {
        gap: 56px;
        padding-top: 40px;
    }

    .nav {
        gap: 0;
    }

    .nav a {
        padding-inline: 9px;
        font-size: 14px;
    }

    h1 {
        font-size: 38px;
    }

    h2 {
        font-size: 26px;
    }

    .lede,
    .feature h2 + p {
        font-size: 17px;
    }

    .card {
        padding: 20px;
    }

    .feature {
        padding: 28px 20px;
        border-radius: 32px;
    }

    .phone {
        max-width: 240px;
        border-radius: 38px;
    }

    .stage-copy {
        padding-top: 40px;
    }

    .stage h1 {
        font-size: 44px;
    }

    .stage .lede {
        font-size: 17px;
    }

    .shot.hero-shot {
        margin-top: 40px;
    }

    .hero-shot .phone {
        width: 220px;
        border-radius: 34px;
    }

    .layers::before {
        --glow: circle 340px at 50% calc(100% - 360px);
    }

    .sticker {
        padding: 8px 12px 8px 8px;
        border-radius: 16px;
    }

    .sticker b {
        font-size: 15px;
    }
}

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

    .button {
        transition: none;
    }

    a.button:hover,
    a.button:active {
        transform: none;
    }
}
