/* The one-page landing. */

section {
    padding: clamp(72px, 11vw, 140px) 0;
}

.section-head {
    display: grid;
    gap: 16px;
    max-width: 620px;
    margin-bottom: clamp(36px, 5vw, 56px);
}

.split {
    display: grid;
    gap: clamp(40px, 6vw, 80px);
    grid-template-columns: 1fr 1fr;
    align-items: center;
}

.split.is-flipped > :first-child {
    order: 2;
}

@media (max-width: 860px) {
    .split {
        grid-template-columns: 1fr;
    }

    .split.is-flipped > :first-child {
        order: 0;
    }
}

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

.hero {
    padding-top: clamp(32px, 6vw, 72px);
}

.hero .split {
    grid-template-columns: 1.1fr 0.9fr;
}

.hero-copy {
    display: grid;
    gap: 22px;
    justify-items: start;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 18px;
    margin-top: 8px;
}

@media (max-width: 860px) {
    .hero .split {
        grid-template-columns: 1fr;
    }

    .hero-copy {
        justify-items: center;
        text-align: center;
    }

    .hero-actions {
        justify-content: center;
    }
}

/* The card stack from the app icon and the cold open: peach, ocean, glass. Tap to shuffle. */

.stage {
    position: relative;
    width: min(100%, 420px);
    aspect-ratio: 1;
    margin: 0 auto;
    display: grid;
    place-items: center;
}

.rings {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.rings span {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid var(--dash);
    animation: ring 7.5s ease-out infinite;
}

/* Negative delays start each ring part-way through its cycle, so they are evenly spaced from the
   first frame instead of waiting their turn at full size. */
.rings span:nth-child(2) {
    animation-delay: -2.5s;
}

.rings span:nth-child(3) {
    animation-delay: -5s;
}

.orbit {
    position: absolute;
    inset: 4%;
    border-radius: 50%;
    animation: orbit 40s linear infinite;
    pointer-events: none;
}

.orbit .face {
    position: absolute;
    width: 46px;
    height: 46px;
    margin: -23px;
    border-radius: 50%;
    border: 3px solid var(--surface-card);
    box-shadow: var(--shadow-soft);
    animation: counter-orbit 40s linear infinite;
}

.face::after {
    content: "";
    position: absolute;
    inset: 22% 26% auto;
    height: 34%;
    border-radius: 50%;
    background: rgb(255 255 255 / 0.35);
}

.face::before {
    content: "";
    position: absolute;
    left: 14%;
    right: 14%;
    bottom: 0;
    height: 30%;
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    background: rgb(255 255 255 / 0.3);
}

.face {
    position: relative;
    overflow: hidden;
}

.orbit .face:nth-child(1) { left: 50%; top: 0; background: var(--g-berry); }
.orbit .face:nth-child(2) { left: 100%; top: 50%; background: var(--g-mint); }
.orbit .face:nth-child(3) { left: 50%; top: 100%; background: var(--g-grape); }
.orbit .face:nth-child(4) { left: 0; top: 50%; background: var(--g-sunset); }

.stack {
    position: relative;
    width: 74%;
    aspect-ratio: 1;
    border: 0;
    padding: 0;
    background: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.card {
    position: absolute;
    width: 60%;
    aspect-ratio: 150 / 190;
    border-radius: var(--r-card);
    box-shadow: var(--shadow-float);
    transition:
        left 0.55s var(--ease-signature),
        top 0.55s var(--ease-signature),
        transform 0.55s var(--ease-signature),
        opacity 0.6s var(--ease-entrance),
        margin-top 0.6s var(--ease-entrance);
    animation: float var(--float-speed, 6s) ease-in-out infinite alternate;
}

.card.is-peach { background: var(--g-peach); --drift: -21px; --float-speed: 7.3s; }
.card.is-ocean { background: var(--g-ocean); --drift: -12px; --float-speed: 4.8s; }

.card.is-glass {
    background: linear-gradient(180deg, rgb(255 255 255 / 0.4), rgb(255 255 255 / 0.95));
    border: 1px solid var(--glass-border);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    backdrop-filter: blur(18px) saturate(1.4);
    --drift: -15px;
    --float-speed: 6s;
}

@media (prefers-color-scheme: dark) {
    .card.is-glass {
        background: linear-gradient(180deg, rgb(255 255 255 / 0.1), rgb(255 255 255 / 0.28));
    }
}

/* Slots, front to back. Mirrors ColdOpenIllustration.slots. */
.card[data-slot="0"] { left: 21%; top: 24%; transform: rotate(0deg) scale(1); z-index: 3; }
.card[data-slot="1"] { left: 3%; top: 13%; transform: rotate(-7deg) scale(0.93); z-index: 2; }
.card[data-slot="2"] { left: 40%; top: 5%; transform: rotate(7deg) scale(0.93); z-index: 1; }

.card[data-slot="0"].is-squash { transform: scale(0.92); }

.stack:not(.is-dealt) .card {
    opacity: 0;
    margin-top: 44px;
}


/* ---- Steps (StepRow) ---- */

.steps {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 860px) {
    .steps {
        grid-template-columns: 1fr;
    }
}

.step {
    display: grid;
    gap: 14px;
    align-content: start;
    padding: 24px;
    border-radius: var(--r-card);
    background: var(--surface-card);
    box-shadow: var(--shadow-card);
}

.step .num {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--ink);
    color: var(--text-on-ink);
    font: 600 17px/1 var(--font-display);
}

.step p {
    margin: 0;
    color: var(--muted);
    font-size: 15.5px;
}

/* ---- People (PersonTile) ---- */

.people {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

.person {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--r-tile);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    transition: transform 0.45s var(--ease-signature);
}

.person:hover {
    transform: scale(1.04) rotate(-1.5deg);
}

.person .face {
    position: absolute;
    inset: 0;
    border-radius: 0;
}

.person .name {
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 8px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: var(--r-full);
    background: var(--glass-strong);
    color: var(--ink);
    font-size: 12.5px;
    font-weight: 700;
    opacity: 0;
    transform: translateY(8px) scale(0.8);
    transition:
        opacity 0.45s var(--ease-signature),
        transform 0.45s var(--ease-signature);
    transition-delay: calc(var(--i, 0) * 140ms + 300ms);
}

.person .name.is-unknown {
    background: transparent;
    border: 1.5px dashed rgb(255 255 255 / 0.8);
    color: #fff;
}

.is-in .person .name {
    opacity: 1;
    transform: none;
}

.person .count {
    position: absolute;
    top: 8px;
    right: 8px;
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    display: grid;
    place-items: center;
    border-radius: var(--r-full);
    background: var(--ink-fixed);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* ---- Notification (UncoverBanner) ---- */

.phone {
    position: relative;
    width: min(100%, 340px);
    margin: 0 auto;
    aspect-ratio: 9 / 16;
    border-radius: 48px;
    padding: 14px;
    background: var(--g-sky);
    box-shadow: var(--shadow-hero);
    overflow: hidden;
}

.phone::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 70% at 20% 10%, rgb(255 255 255 / 0.45), transparent 60%),
        var(--g-grape);
    opacity: 0.55;
}

.phone .clock {
    position: relative;
    margin-top: 52px;
    text-align: center;
    color: #fff;
    font: 600 72px/1 var(--font-display);
    letter-spacing: -0.03em;
    text-shadow: 0 2px 20px rgb(0 0 0 / 0.1);
}

.phone .date {
    position: relative;
    text-align: center;
    color: rgb(255 255 255 / 0.9);
    font-size: 15px;
    font-weight: 600;
}

.notes {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 22px;
    display: grid;
    gap: 8px;
}

.note {
    display: grid;
    grid-template-columns: 38px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 12px 14px;
    border-radius: 22px;
    background: rgb(255 255 255 / 0.72);
    -webkit-backdrop-filter: blur(20px) saturate(1.6);
    backdrop-filter: blur(20px) saturate(1.6);
    color: #1e2124;
    box-shadow: 0 8px 20px rgb(20 22 26 / 0.12);
    opacity: 0;
    transform: translateY(24px) scale(0.9);
    transition:
        opacity 0.45s var(--ease-signature),
        transform 0.45s var(--ease-signature);
}

.note.is-shown {
    opacity: 1;
    transform: none;
}

.note .app {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: url("/images/icon.svg") center / cover;
}

.note b {
    display: block;
    font-size: 14px;
}

.note span {
    font-size: 13.5px;
    color: #4a5057;
}

.note time {
    align-self: start;
    font-size: 12px;
    color: #7a8087;
}

/* ---- Send (ChatRow) ---- */

.thread {
    display: grid;
    gap: 10px;
    width: min(100%, 380px);
    margin: 0 auto;
    padding: 22px;
    border-radius: var(--r-sheet);
    background: var(--surface-card);
    box-shadow: var(--shadow-hero);
}

.thread .who {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--divider);
    font-weight: 700;
}

.thread .who .face {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--g-berry);
}

.bubble {
    justify-self: end;
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 20px 20px 6px 20px;
    background: var(--ios-blue);
    color: #fff;
    font-size: 15px;
}

.bubble.is-them {
    justify-self: start;
    border-radius: 20px 20px 20px 6px;
    background: var(--soft);
    color: var(--ink);
}

.photos {
    justify-self: end;
    display: grid;
    grid-template-columns: repeat(2, 84px);
    gap: 6px;
}

.photos span {
    aspect-ratio: 1;
    border-radius: 14px;
}

.photos span:nth-child(1) { background: var(--g-sunset); }
.photos span:nth-child(2) { background: var(--g-gold); }
.photos span:nth-child(3) { background: var(--g-ocean); }
.photos span:nth-child(4) { background: var(--g-mint); }

.thread [data-seq] {
    opacity: 0;
    transform: translateY(16px) scale(0.85);
    transition:
        opacity 0.45s var(--ease-signature),
        transform 0.45s var(--ease-signature);
}

.thread [data-seq].is-shown {
    opacity: 1;
    transform: none;
}

.delivered {
    justify-self: end;
    font-size: 12px;
    color: var(--muted-2);
}

/* ---- Privacy ---- */

.privacy-card {
    position: relative;
    overflow: hidden;
    padding: clamp(32px, 6vw, 72px);
    border-radius: 36px;
    background: var(--ink-fixed);
    color: #fff;
    box-shadow: var(--shadow-ink-disc);
}

.privacy-card .t-body-lg {
    color: rgb(255 255 255 / 0.7);
}

.privacy-card .section-head {
    margin-bottom: 36px;
}

.privacy-card .t-overline {
    color: rgb(255 255 255 / 0.55);
}

.checks {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

@media (max-width: 700px) {
    .checks {
        grid-template-columns: 1fr;
    }
}

.checks li {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 14px;
    align-items: start;
    padding: 18px;
    border-radius: var(--r-row);
    background: rgb(255 255 255 / 0.06);
    border: 1px solid rgb(255 255 255 / 0.1);
}

.checks .tick {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fff;
    color: #1e2124;
    transform: scale(0.4);
    opacity: 0;
    transition:
        transform 0.6s var(--ease-signature),
        opacity 0.3s;
    transition-delay: calc(var(--i, 0) * var(--stagger) + 250ms);
}

.checks .is-in .tick,
.no-js .checks .tick {
    transform: none;
    opacity: 1;
}

.checks b {
    display: block;
    margin-bottom: 2px;
}

.checks span {
    color: rgb(255 255 255 / 0.65);
    font-size: 14.5px;
}

.privacy-card .glow {
    position: absolute;
    width: 420px;
    height: 420px;
    right: -120px;
    top: -160px;
    border-radius: 50%;
    background: var(--g-peach);
    filter: blur(90px);
    opacity: 0.35;
    animation: float 6s ease-in-out infinite alternate;
    --drift: 40px;
    pointer-events: none;
}

/* ---- Closing CTA ---- */

.closing {
    text-align: center;
}

.closing .wrap {
    display: grid;
    justify-items: center;
    gap: 22px;
}

.closing .sparks {
    position: relative;
    width: 120px;
    height: 120px;
    display: grid;
    place-items: center;
    margin-bottom: 8px;
}

.closing .disc {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--ink);
    color: var(--text-on-ink);
    box-shadow: var(--shadow-ink-disc);
    cursor: pointer;
    border: 0;
    transition: transform 0.45s var(--ease-signature);
}

.closing .disc:hover {
    transform: scale(1.06) rotate(-6deg);
}

.closing .disc:active {
    transform: scale(0.92);
}

.spark {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 10px;
    height: 10px;
    margin: -5px;
    border-radius: 50%;
    pointer-events: none;
    animation: spark 0.9s var(--ease-entrance) forwards;
}

@keyframes spark {
    from {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    to {
        transform: translate(var(--dx), var(--dy)) scale(0.3);
        opacity: 0;
    }
}
