/* Support, Privacy and Terms pages. Shares tokens and components with style.css. */

:root {
    --bg: #050505;
    --surface: #141416;
    --surface-2: #1c1c1e;
    --line: rgba(255, 255, 255, 0.08);
    --text: #f5f5f7;
    --muted: #8e8e93;
    --body: #c7c7cc;
    --green: #30d158;

    --display: "Archivo", "Arial Black", system-ui, sans-serif;
    --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

    --gutter: clamp(16px, 5vw, 72px);
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

    color-scheme: dark;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 96px;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 100;
    pointer-events: none;
    opacity: 0.06;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a {
    color: inherit;
}

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

/* ─── Bar ─── */

.bar {
    position: fixed;
    top: 12px;
    left: 50%;
    z-index: 50;
    transform: translateX(-50%);
    width: min(calc(100% - 24px), 980px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 8px 8px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(20, 20, 22, 0.72);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
}

.bar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.bar-brand img {
    width: 34px;
    height: 34px;
    border-radius: 9px;
}

.bar-links {
    display: flex;
    gap: 4px;
}

.bar-links a {
    padding: 7px 14px;
    border-radius: 999px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s, background 0.2s;
}

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

.bar-links a[aria-current="page"] {
    background: #2c2c2e;
    color: var(--text);
}

.bar-cta {
    padding: 9px 16px;
    border-radius: 999px;
    background: var(--green);
    color: #000;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.2s var(--ease-out), background 0.2s;
}

.bar-cta:hover {
    background: #4ae06f;
    transform: translateY(-1px);
}

/* ─── Page head ─── */

.legal {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 var(--gutter) 120px;
}

.legal-head {
    position: relative;
    isolation: isolate;
    padding: 168px 0 72px;
}

.ghost {
    position: absolute;
    z-index: -1;
    right: 0;
    top: 40px;
    font: 900 clamp(260px, 34vw, 480px)/1 var(--display);
    font-stretch: 125%;
    letter-spacing: -0.04em;
    color: transparent;
    -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.07);
    user-select: none;
    pointer-events: none;
}

.day-tag {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: var(--muted);
    font: 500 13px/1 var(--mono);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.day-tag span {
    padding: 5px 7px;
    border-radius: 6px;
    background: var(--surface-2);
    color: var(--green);
}

h1 {
    font: 900 clamp(48px, 8vw, 112px)/0.92 var(--display);
    font-stretch: 125%;
    letter-spacing: -0.035em;
    text-transform: uppercase;
}

h1 em {
    font-style: normal;
    color: var(--green);
}

.lede {
    max-width: 30em;
    margin-top: 28px;
    color: var(--body);
    font-size: 19px;
}

/* ─── Contents + prose ─── */

.legal-body {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: clamp(32px, 6vw, 96px);
    align-items: start;
    border-top: 1px solid var(--line);
    padding-top: 56px;
}

.toc {
    position: sticky;
    top: 104px;
    max-height: calc(100vh - 128px);
    overflow-y: auto;
}

.toc summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    color: var(--muted);
    font: 500 12px/1 var(--mono);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    list-style: none;
    pointer-events: none;
}

.toc summary::-webkit-details-marker {
    display: none;
}

.toc ol {
    list-style: none;
    display: grid;
    gap: 2px;
}

.toc a {
    display: flex;
    gap: 12px;
    padding: 7px 10px;
    border-radius: 10px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.35;
    text-decoration: none;
    transition: color 0.2s, background 0.2s;
}

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

.toc a span {
    flex: none;
    width: 20px;
    font: 500 12px/1.6 var(--mono);
    color: #636366;
}

.toc a.is-active {
    background: var(--surface-2);
    color: var(--text);
}

.toc a.is-active span {
    color: var(--green);
}

.prose {
    max-width: 720px;
}

.prose section {
    padding-bottom: 40px;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--line);
}

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

.prose h2 {
    display: flex;
    gap: 14px;
    align-items: baseline;
    margin-bottom: 18px;
    font: 800 clamp(24px, 2.6vw, 30px)/1.1 var(--display);
    font-stretch: 112%;
    letter-spacing: -0.02em;
}

.prose h2 .num {
    color: var(--green);
    font: 500 14px/1 var(--mono);
    letter-spacing: 0;
}

.prose h3 {
    margin: 28px 0 10px;
    font-size: 17px;
    font-weight: 600;
}

.prose p,
.prose li {
    color: var(--body);
}

.prose p + p {
    margin-top: 12px;
}

.prose ul {
    list-style: none;
    margin: 12px 0 16px;
    display: grid;
    gap: 8px;
}

.prose li {
    position: relative;
    padding-left: 22px;
}

.prose li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 0.62em;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
}

.prose strong {
    color: var(--text);
    font-weight: 600;
}

.prose a,
.faq a {
    color: var(--green);
    text-underline-offset: 3px;
}

.prose .contact-email a {
    display: inline-block;
    margin: 6px 0;
    padding: 10px 18px;
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--text);
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}

.prose .contact-email a:hover {
    background: #2c2c2e;
}

/* ─── Support ─── */

.mail {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin-top: 36px;
    padding: 14px 26px 14px 18px;
    border-radius: 18px;
    background: var(--green);
    color: #000;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.1;
    text-decoration: none;
    box-shadow: 0 20px 60px rgba(48, 209, 88, 0.25);
    transition: transform 0.2s var(--ease-out), box-shadow 0.2s;
}

.mail:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 70px rgba(48, 209, 88, 0.4);
}

.mail svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mail small {
    display: block;
    font-size: 12px;
    font-weight: 500;
}

.faq {
    max-width: 760px;
    border-top: 1px solid var(--line);
    padding-top: 56px;
}

.faq h2 {
    margin-bottom: 20px;
    color: var(--muted);
    font: 500 13px/1 var(--mono);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.faq details {
    border-bottom: 1px solid var(--line);
}

.faq summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 22px 0;
    font: 800 clamp(19px, 2.2vw, 24px)/1.2 var(--display);
    font-stretch: 110%;
    letter-spacing: -0.01em;
    cursor: pointer;
    list-style: none;
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq summary::after {
    content: "+";
    flex: none;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--green);
    font: 500 20px/1 var(--font);
    transition: transform 0.3s var(--ease-out), background 0.2s;
}

.faq details[open] summary::after {
    transform: rotate(45deg);
}

.faq summary:hover::after {
    background: #2c2c2e;
}

.faq details p {
    max-width: 36em;
    padding-bottom: 24px;
    color: var(--body);
}

.faq strong {
    color: var(--text);
    font-weight: 600;
}

/* ─── Footer ─── */

.foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding: 28px var(--gutter);
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 14px;
}

.foot nav {
    display: flex;
    gap: 24px;
}

.foot a {
    text-decoration: none;
    transition: color 0.2s;
}

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

/* ─── Responsive ─── */

@media (max-width: 900px) {
    .legal-body {
        grid-template-columns: 1fr;
    }

    .toc {
        position: static;
        max-height: none;
        padding: 0 18px;
        border-radius: 20px;
        background: var(--surface);
    }

    .toc summary {
        margin: 0;
        padding: 18px 0;
        cursor: pointer;
        pointer-events: auto;
    }

    .toc summary::after {
        content: "+";
        color: var(--green);
        font: 500 18px/1 var(--font);
        transition: transform 0.3s var(--ease-out);
    }

    .toc details[open] summary::after {
        transform: rotate(45deg);
    }

    .toc ol {
        padding-bottom: 14px;
    }
}

@media (max-width: 640px) {
    body {
        font-size: 16px;
    }

    .bar {
        gap: 8px;
        padding: 6px;
    }

    .bar-brand span,
    .bar-cta {
        display: none;
    }

    .bar-links a {
        padding: 7px 12px;
    }

    .legal-head {
        padding: 128px 0 56px;
    }

    .mail {
        font-size: 17px;
    }
}

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

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