/* prayd — shared styles.

   Implements the "Landing v2 (light)" direction from the design handoff. The legal and support
   pages were drawn dark; the handoff says that if v2 ships they get re-skinned to the light
   palette, so that is what they are here — same structure and spacing as drawn, light tokens,
   and the landing's editorial type voice instead of the dark pages' heavy Archivo headings. */

/* Fonts ------------------------------------------------------------------- */

/* Self-hosted rather than linked from Google Fonts. A site whose entire argument is "nothing
   leaves your phone" should not phone a third party on every page load. One variable file per
   subset covers every weight the design uses. */

@font-face {
    font-family: "Hanken Grotesk";
    font-style: normal;
    font-weight: 300 600;
    font-display: swap;
    src: url("fonts/hanken-grotesk-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
        U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
        U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Hanken Grotesk";
    font-style: normal;
    font-weight: 300 600;
    font-display: swap;
    src: url("fonts/hanken-grotesk-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
        U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0,
        U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Tokens ------------------------------------------------------------------ */

:root {
    --bg: #ffffff;
    --ink: #1b1d22;
    --body: #5f656e;
    --muted: #8a8f97;
    --muted-2: #a4a9b0;
    --rule: #e6e8ea;
    --rule-strong: #d7dade;
    --blob: #24262c;
    --accent: #2fd6a5;
    --accent-ink: #12a67c;
    --phone-light: #f4f6f5;
    --phone-dark: #171a1e;

    /* Added for the re-skinned legal/support pages, which had no light equivalent drawn. */
    --surface: #f8f9fa;
    --accent-ink-hover: #0d8965;
    /* Darker than --accent-ink: the eyebrow is 13px semibold, and #12a67c only reaches 3.1:1
       on white, which fails AA at that size. */
    --label: #0e7d5e;
    --warn-border: #c98a2e;
    --warn-bg: #fdf6ea;
    --warn-text: #6b4210;
    --warn-strong: #4a2c08;

    --shell: 1280px;
    --pad: 56px;

    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

    font-family: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica,
        Arial, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: inherit;
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: var(--accent);
    color: #0d1512;
}

a {
    color: var(--accent-ink);
}

a:hover {
    color: var(--accent-ink-hover);
}

:focus-visible {
    outline: 2px solid var(--accent-ink);
    outline-offset: 3px;
    border-radius: 2px;
}

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

/* Layout ------------------------------------------------------------------ */

.shell {
    max-width: var(--shell);
    margin: 0 auto;
    padding-left: var(--pad);
    padding-right: var(--pad);
}

/* Legal and support pages run to a narrower measure than the landing. */
.doc {
    --shell: 1120px;
    --pad: 32px;
}

/* Skip link --------------------------------------------------------------- */

.skip {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 40;
    padding: 12px 18px;
    background: var(--ink);
    color: #ffffff;
    text-decoration: none;
    border-radius: 0 0 10px 0;
}

.skip:focus {
    left: 0;
    color: #ffffff;
}

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

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

.mark {
    width: 34px;
    height: 34px;
    flex: none;
    border-radius: 999px;
    border: 1.5px solid var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 500;
    line-height: 1;
    color: var(--ink);
}

/* Landing header: static, not sticky. */
.site-header {
    display: flex;
    align-items: center;
    gap: 44px;
    padding-top: 34px;
    padding-bottom: 34px;
}

/* Pushes the CTA to the far right without a spacer element. */
.site-header nav {
    display: flex;
    gap: 36px;
    margin-right: auto;
    font-size: 14px;
    letter-spacing: 0.01em;
}

.site-header nav a,
.site-header .home {
    color: var(--ink);
    text-decoration: none;
}

.site-header nav a:hover {
    color: var(--accent-ink);
}

.cta-underline {
    font-size: 14px;
    color: var(--ink);
    text-decoration: none;
    border-bottom: 1.5px solid var(--accent);
    padding-bottom: 3px;
    white-space: nowrap;
}

.cta-underline:hover {
    color: var(--ink);
    border-bottom-color: var(--accent-ink);
}

/* Sub-page header: sticky, blurred, with the wordmark so there is a way back. */
.doc-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--rule);
}

.doc-header > .shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-top: 16px;
    padding-bottom: 16px;
}

.doc-header .home {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--ink);
}

.doc-header .mark {
    width: 28px;
    height: 28px;
    font-size: 13px;
}

.wordmark {
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.doc-header nav {
    display: flex;
    align-items: center;
    gap: 28px;
    font-size: 15px;
}

.doc-header nav a {
    color: var(--muted);
    text-decoration: none;
}

.doc-header nav a:hover {
    color: var(--accent-ink);
}

.doc-header nav a[aria-current="page"] {
    color: var(--ink);
}

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

.hero {
    padding-top: 60px;
    text-align: center;
}

.hero h1 {
    margin: 0;
    font-size: clamp(44px, 8.6vw, 96px);
    line-height: 1.06;
    letter-spacing: -0.03em;
    font-weight: 300;
}

/* Each line is wiped up out of its own clipping block. */
.hero h1 .line {
    display: block;
    overflow: hidden;
}

.hero h1 .line:first-child {
    padding-bottom: 4px;
}

.hero h1 .line + .line {
    padding-bottom: 6px;
}

.hero h1 .line > span {
    display: block;
}

.scroll-cue {
    display: flex;
    width: 46px;
    height: 46px;
    margin: 52px auto 0;
    border-radius: 999px;
    border: 1px solid var(--rule-strong);
    align-items: center;
    justify-content: center;
    color: var(--ink);
    text-decoration: none;
    font-size: 15px;
    transition: border-color 200ms ease;
}

.scroll-cue:hover {
    border-color: var(--accent);
    color: var(--ink);
}

.scroll-cue span {
    animation: bob 2.4s ease-in-out infinite;
}

@keyframes bob {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(7px);
    }
}

/* Phone composition ------------------------------------------------------- */

/* A square box: everything inside is positioned in percentages, so the whole composition
   scales with the viewport without a breakpoint. */
.composition {
    position: relative;
    margin: 56px auto 0;
    width: min(760px, 100%);
    aspect-ratio: 1 / 1;
}

.composition .blob {
    position: absolute;
    left: 50%;
    top: 0;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 999px;
    background: var(--blob);
    transform: translateX(-50%);
}

.composition .phone {
    position: absolute;
    width: 30%;
}

.composition .phone .screen {
    border-radius: 26px;
    overflow: hidden;
    aspect-ratio: 9 / 19;
}

.composition .phone img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.composition .phone-a {
    left: 12%;
    top: 22%;
    transform: rotate(-7deg);
}

.composition .phone-a .screen {
    background: var(--phone-light);
    box-shadow: 0 26px 50px rgba(0, 0, 0, 0.28);
}

.composition .phone-b {
    right: 14%;
    top: 14%;
    transform: rotate(5deg);
}

.composition .phone-b .screen {
    background: var(--phone-dark);
    box-shadow: 0 26px 50px rgba(0, 0, 0, 0.32);
}

.composition .dot {
    position: absolute;
    left: 6%;
    top: 52%;
    width: clamp(44px, 9.7vw, 74px);
    aspect-ratio: 1 / 1;
    border-radius: 999px;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0d1512;
    font-size: clamp(15px, 2.9vw, 22px);
    font-weight: 300;
    line-height: 1;
}

/* Stat band --------------------------------------------------------------- */

.stats {
    margin-top: 96px;
}

.stats .band {
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    padding: 40px 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.stats .n {
    margin: 0 0 12px;
    font-size: clamp(34px, 5vw, 46px);
    font-weight: 300;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.stats .cap {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--muted);
}

/* Editorial rows ---------------------------------------------------------- */

.row {
    border-bottom: 1px solid var(--rule);
    padding: 56px 0;
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 80px;
}

.row.lead {
    padding: 72px 0;
}

.row h2 {
    margin: 0;
    font-size: clamp(30px, 3.4vw, 40px);
    line-height: 1.14;
    letter-spacing: -0.025em;
    font-weight: 300;
}

.row.trust h2 {
    font-size: clamp(27px, 2.9vw, 34px);
    line-height: 1.16;
}

.row h3 {
    margin: 0;
    font-size: clamp(22px, 2.2vw, 26px);
    line-height: 1.2;
    letter-spacing: -0.02em;
    font-weight: 400;
}

.row p {
    margin: 0;
    font-size: 17px;
    line-height: 1.8;
    color: var(--body);
    max-width: 52ch;
}

/* Closing + email capture -------------------------------------------------- */

.closing {
    padding-top: 104px;
    text-align: center;
}

.closing h2 {
    margin: 0;
    font-size: clamp(36px, 5vw, 56px);
    line-height: 1.08;
    letter-spacing: -0.03em;
    font-weight: 300;
}

.closing .sub {
    margin: 22px auto 0;
    font-size: 18px;
    line-height: 1.7;
    color: var(--body);
    max-width: 46ch;
}

/* Shown only when JavaScript is on — nothing is wired to receive a plain form post yet, and
   the mailto in the paragraph above is the honest fallback. */
.notify {
    display: none;
}

.js .notify {
    margin: 36px auto 0;
    display: flex;
    max-width: 460px;
    border-bottom: 1px solid var(--ink);
    align-items: center;
}

.notify input {
    flex: 1;
    min-width: 0;
    padding: 14px 4px;
    border: none;
    background: transparent;
    font-size: 17px;
    font-family: inherit;
    color: var(--ink);
    outline: none;
}

.notify input::placeholder {
    color: var(--muted);
}

.notify input:focus-visible {
    outline: none;
}

.notify:focus-within {
    border-bottom-color: var(--accent-ink);
}

.notify button {
    padding: 14px 6px;
    border: none;
    background: transparent;
    font-size: 15px;
    font-family: inherit;
    color: var(--accent-ink);
    cursor: pointer;
    font-weight: 500;
}

.notify button:hover {
    color: var(--accent-ink-hover);
}

/* min-height reserves the line so submitting does not shift the page. */
.notify-note {
    margin: 14px 0 0;
    font-size: 14px;
    color: var(--muted);
    min-height: 20px;
}

/* Document pages ---------------------------------------------------------- */

.title-block {
    padding-top: 72px;
    padding-bottom: 40px;
}

.eyebrow {
    margin: 0 0 14px;
    font-size: 13px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--label);
    font-weight: 600;
}

.title-block h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 54px);
    line-height: 1.04;
    letter-spacing: -0.03em;
    font-weight: 300;
}

.updated {
    margin: 16px 0 0;
    font-size: 15px;
    color: var(--muted);
}

.doc-body {
    padding-bottom: 96px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 232px;
    gap: 64px;
    align-items: start;
}

.prose {
    max-width: 70ch;
}

.prose section {
    margin-bottom: 44px;
}

.prose section:last-of-type {
    margin-bottom: 0;
}

.prose h2 {
    margin: 0 0 14px;
    font-size: 22px;
    font-weight: 500;
    letter-spacing: -0.02em;
    scroll-margin-top: 96px;
}

.prose p {
    margin: 0 0 16px;
    font-size: 17px;
    line-height: 1.7;
    color: var(--body);
}

.prose p:last-child {
    margin-bottom: 0;
}

.prose strong {
    color: var(--ink);
    font-weight: 500;
}

/* Bulleted list: a dot in its own grid column so wrapped lines stay aligned. */
.bullets {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.bullets li {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.bullets li::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--accent);
    /* Sits the dot on the first line of text rather than the top of the box. */
    margin-top: 10px;
}

.bullets p {
    margin: 0;
}

/* Support cards ----------------------------------------------------------- */

.cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 76ch;
}

.cards section {
    padding: 30px;
    border-radius: 20px;
    border: 1px solid var(--rule);
    background: var(--surface);
    margin-bottom: 0;
}

.support-head {
    padding-top: 72px;
    padding-bottom: 44px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 56px;
    align-items: end;
}

.support-head .intro {
    margin: 20px 0 0;
    font-size: 19px;
    line-height: 1.6;
    color: var(--body);
    max-width: 52ch;
}

.mail-card {
    padding: 26px;
    border-radius: 20px;
    border: 1px solid rgba(47, 214, 165, 0.4);
    background: linear-gradient(150deg, rgba(47, 214, 165, 0.12), rgba(47, 214, 165, 0.03));
}

.mail-card p {
    margin: 0 0 14px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--body);
}

.button {
    display: inline-block;
    padding: 13px 20px;
    border-radius: 12px;
    background: var(--accent);
    color: #06120e;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: background-color 160ms ease;
}

.button:hover {
    background: #63e7c0;
    color: #06120e;
}

.still-stuck {
    margin: 14px 0 0;
    font-size: 16px;
    color: var(--muted);
}

/* On-this-page sidebar ---------------------------------------------------- */

.toc {
    position: sticky;
    top: 104px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 22px;
    border-radius: 18px;
    border: 1px solid var(--rule);
    background: var(--surface);
}

.toc p {
    margin: 0 0 4px;
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--label);
    font-weight: 600;
}

.toc a {
    font-size: 14px;
    color: var(--muted);
    text-decoration: none;
}

.toc a:hover {
    color: var(--accent-ink);
}

/* Before-publishing notice ------------------------------------------------ */

/* Deliberately loud: this must not ship by accident. */
.todo {
    padding: 20px 22px;
    border-radius: 16px;
    border: 1px dashed var(--warn-border);
    background: var(--warn-bg);
    margin-bottom: 44px;
}

.todo p {
    margin: 0;
    font-size: 15px;
    line-height: 1.65;
    color: var(--warn-text);
}

.todo strong {
    color: var(--warn-strong);
    font-weight: 600;
}

/* Footer ------------------------------------------------------------------ */

.site-footer {
    margin-top: 112px;
    border-top: 1px solid var(--rule);
}

.site-footer > .shell {
    padding-top: 28px;
    padding-bottom: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.site-footer .links {
    display: flex;
    gap: 32px;
    font-size: 14px;
}

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

.site-footer a:hover {
    color: var(--accent-ink);
}

.site-footer .copy {
    font-size: 14px;
    color: var(--muted-2);
}

/* Document pages sit closer to their footer than the landing does. */
.doc .site-footer {
    margin-top: 0;
}

.doc .site-footer > .shell {
    padding-top: 36px;
}

.doc .site-footer .links {
    gap: 26px;
    font-size: 15px;
}

.doc .site-footer .copy {
    font-size: 15px;
}

/* Reveal animations ------------------------------------------------------- */

/* The "from" states are scoped to .js, which an inline script in <head> sets before first
   paint. With JavaScript off or broken the page renders at rest instead of blank. */

.js .reveal {
    opacity: 0;
    transform: translateY(30px);
}

.js .reveal-line {
    transform: translateY(110%);
}

.js .reveal-blob {
    opacity: 0;
    /* Keeps the centring transform — animating this to a bare scale() would shunt the circle
       half its width to the right. */
    transform: translateX(-50%) scale(0.6);
}

.js .reveal-rise {
    opacity: 0;
    transform: translateY(48px);
}

.js .reveal-pop {
    opacity: 0;
    transform: scale(0.3);
}

.js .reveal-fade {
    opacity: 0;
}

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

.js .reveal-blob.is-in {
    transform: translateX(-50%) scale(1);
}

/* Responsive -------------------------------------------------------------- */

@media (max-width: 1000px) {
    :root {
        --pad: 32px;
    }

    .row,
    .row.lead {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .doc-body,
    .support-head {
        grid-template-columns: 1fr;
        gap: 32px;
        align-items: start;
    }

    /* Above the prose, where a contents list is actually useful, and not stuck to the
       viewport once it is inline. */
    .toc {
        position: static;
        order: -1;
    }

    .site-header {
        gap: 28px;
    }

    .site-header nav {
        gap: 26px;
    }
}

@media (max-width: 620px) {
    :root {
        --pad: 22px;
    }

    .hero {
        padding-top: 32px;
    }

    .scroll-cue {
        margin-top: 36px;
    }

    .stats {
        margin-top: 64px;
    }

    .stats .band {
        grid-template-columns: 1fr;
        gap: 26px;
        padding: 32px 0;
    }

    .row,
    .row.lead {
        padding: 40px 0;
    }

    .closing {
        padding-top: 72px;
    }

    .title-block {
        padding-top: 48px;
    }

    .support-head {
        padding-top: 48px;
    }

    .cards section {
        padding: 24px 22px;
    }

    .site-footer {
        margin-top: 72px;
    }

    .site-footer > .shell {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .doc-header nav {
        gap: 20px;
        font-size: 14px;
    }

    /* Logo and CTA on one row, nav dropped onto its own — at this width the four items
       otherwise wrap mid-link. */
    .site-header {
        flex-wrap: wrap;
        gap: 16px 24px;
        padding-top: 24px;
        padding-bottom: 24px;
    }

    .site-header nav {
        order: 3;
        flex-basis: 100%;
        margin-right: 0;
        gap: 24px;
    }

    .site-header .cta-underline {
        margin-left: auto;
    }
}

/* Reduced motion ---------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    .js .reveal,
    .js .reveal-line,
    .js .reveal-blob,
    .js .reveal-rise,
    .js .reveal-pop,
    .js .reveal-fade {
        opacity: 1;
        transform: none;
    }

    .js .reveal-blob {
        transform: translateX(-50%);
    }

    .scroll-cue span {
        animation: none;
    }

    * {
        transition-duration: 0.01ms !important;
    }
}
