@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500&display=swap');

/* ── Theme tokens ── */
:root, [data-theme="light"] {
    --bg: #ffffff;
    --text: #111111;
    --muted: #666666;
    --border: rgba(0, 0, 0, 0.1);
}
[data-theme="dark"] {
    --bg: #0a0a0a;
    --text: #ededed;
    --muted: #888888;
    --border: rgba(255, 255, 255, 0.08);
}

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

body {
    font-family: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    transition: background 0.2s, color 0.2s;
}

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

a:hover {
    text-decoration: underline;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(8px);
    transition: background 0.2s, border-color 0.2s;
}

.site-header .site-logo {
    display: flex;
    align-items: center;
    color: var(--text);
    transition: color 0.3s ease;
}

.site-header .site-logo:hover {
    text-decoration: none;
}

#theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--muted);
    padding: 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s, background 0.15s;
}
#theme-toggle:hover {
    color: var(--text);
    background: var(--border);
}

/* Show sun in dark mode, moon in light mode */
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: block; }
:root:not([data-theme]) .icon-sun { display: none; }
:root:not([data-theme]) .icon-moon { display: block; }

/* Main content */
.content {
    max-width: 680px;
    margin: 0 auto;
    padding: 64px 24px 80px;
}

/* Hero */
.hero {
    min-height: calc(100vh - 56px);
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px 24px;
}

.hero-logo {
    width: 96px;
    height: 96px;
    color: var(--text);
    margin-bottom: 32px;
}

.hero-title {
    font-size: 56px;
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 40px;
    max-width: 720px;
}

@media (max-width: 560px) {
    .hero-title {
        font-size: 40px;
        margin-bottom: 32px;
    }
    .hero-logo {
        width: 80px;
        height: 80px;
        margin-bottom: 24px;
    }
}

.app-store-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--text);
    color: var(--bg);
    padding: 10px 22px;
    border-radius: 999px;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.app-store-btn:hover {
    text-decoration: none;
    opacity: 0.88;
    transform: translateY(-1px);
}

.app-store-btn__text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.1;
    text-align: left;
}

.app-store-btn__text small {
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.02em;
    opacity: 0.85;
}

.app-store-btn__text strong {
    font-size: 17px;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.hero-hint {
    font-size: 14px;
    color: var(--muted);
    margin-top: 14px;
}

/* ── Phone scroll section ── */
.phone-scroll {
    position: relative;
    min-height: 400vh;
    background: var(--bg);
}

.phone-scroll__pin {
    position: sticky;
    top: 56px;
    height: calc(100dvh - 56px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.phone-scroll__layout {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-template-areas: "left phone right";
    gap: 56px;
    align-items: center;
    width: 100%;
    max-width: 1300px;
    padding: 0 24px;
}

.phone-scroll__copy {
    display: grid;
    grid-template-areas: "stack";
    width: 320px;
    min-height: 200px;
}

.phone-scroll__copy--left {
    grid-area: left;
    text-align: right;
    justify-self: end;
}

.phone-scroll__copy--right {
    grid-area: right;
    text-align: left;
    justify-self: start;
}

.phone-scroll__step {
    grid-area: stack;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.45s ease, transform 0.45s ease;
    pointer-events: none;
}

.phone-scroll__step[aria-current="true"] {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.phone-scroll__eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 12px;
}

.phone-scroll__heading {
    font-size: 28px;
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: 12px;
}

.phone-scroll__body {
    font-size: 15px;
    line-height: 1.55;
    color: var(--muted);
}

.phone-scroll__copy--left .phone-scroll__body { margin-left: auto; }
.phone-scroll__copy--right .phone-scroll__body { margin-right: auto; }

.phone-scroll__device {
    grid-area: phone;
    position: relative;
    width: auto;
    height: min(calc(100dvh - 140px), 975px);
    aspect-ratio: 800 / 1733;
    border-radius: 56px;
    overflow: hidden;
    background: #000;
    box-shadow:
        0 0 0 2px rgba(255, 255, 255, 0.04),
        0 30px 80px rgba(0, 0, 0, 0.45),
        0 10px 24px rgba(0, 0, 0, 0.25);
    will-change: transform;
}

.phone-scroll__canvas {
    display: block;
    width: 100%;
    height: 100%;
    background: #000;
}

.phone-scroll__island {
    position: absolute;
    top: 2.4%;
    left: 50%;
    transform: translateX(-50%);
    width: 26%;
    height: 2.7%;
    background: #000;
    border-radius: 999px;
    pointer-events: none;
}

@media (max-width: 1024px) {
    .phone-scroll__layout { gap: 32px; }
    .phone-scroll__heading { font-size: 24px; }
    .phone-scroll__copy { width: 240px; }
}

@media (max-width: 880px) {
    .phone-scroll {
        min-height: auto;
    }
    .phone-scroll__pin {
        position: static;
        height: auto;
        padding: 64px 0;
        overflow: visible;
    }
    .phone-scroll__layout {
        grid-template-columns: 1fr;
        grid-template-areas:
            "phone"
            "left"
            "right";
        gap: 32px;
        text-align: center;
        max-width: 480px;
    }
    .phone-scroll__copy {
        min-height: 0;
        width: 100%;
        max-width: 360px;
    }
    .phone-scroll__copy--left,
    .phone-scroll__copy--right {
        text-align: center;
        justify-self: center;
    }
    .phone-scroll__step {
        opacity: 1;
        transform: none;
        pointer-events: auto;
    }
    /* Mobile: show only the first step on each side to avoid overlap. */
    .phone-scroll__copy--left .phone-scroll__step + .phone-scroll__step,
    .phone-scroll__copy--right .phone-scroll__step + .phone-scroll__step {
        display: none;
    }
    .phone-scroll__device {
        width: 240px;
        height: auto;
        margin: 0 auto;
    }
    .phone-scroll__copy--left .phone-scroll__body,
    .phone-scroll__copy--right .phone-scroll__body { margin: 0 auto; }
}

@media (prefers-reduced-motion: reduce) {
    .phone-scroll {
        min-height: auto;
    }
    .phone-scroll__pin {
        position: static;
        height: auto;
        padding: 64px 0;
        overflow: visible;
    }
    .phone-scroll__step {
        opacity: 1;
        transform: none;
    }
}

/* Legal pages */
.content h1 {
    font-size: 32px;
    font-weight: 500;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.content .updated {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 48px;
}

.content h2 {
    font-size: 18px;
    font-weight: 500;
    margin-top: 40px;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.content p {
    font-size: 16px;
    line-height: 1.65;
    color: var(--muted);
}

.content ul {
    font-size: 16px;
    line-height: 1.65;
    color: var(--muted);
    padding-left: 20px;
    margin-top: 12px;
}

.content ul li {
    margin-bottom: 8px;
}

.mobile-break {
    display: none;
}

@media (max-width: 480px) {
    .mobile-break {
        display: block;
    }
}

.colourful-text {
    display: inline;
}

.colourful-text span {
    display: inline-block;
    white-space: pre;
    will-change: transform, opacity, filter, color;
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 24px;
    text-align: center;
    font-size: 14px;
    color: var(--muted);
    display: flex;
    justify-content: center;
    gap: 24px;
}

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

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

.site-footer button {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: var(--muted);
    cursor: pointer;
}

.site-footer button:hover {
    color: var(--text);
    text-decoration: underline;
}

/* Cookie banner */
.cookie-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 100;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    padding: 16px 20px;
    max-width: 920px;
    margin: 0 auto;
    animation: cookie-banner-in 0.25s ease-out;
}

[data-theme="dark"] .cookie-banner {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

@keyframes cookie-banner-in {
    from { transform: translateY(12px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.cookie-banner--leaving {
    animation: cookie-banner-out 0.2s ease-in forwards;
}

@keyframes cookie-banner-out {
    from { transform: translateY(0);    opacity: 1; }
    to   { transform: translateY(8px);  opacity: 0; }
}

.cookie-banner__inner {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.cookie-banner__body {
    flex: 1 1 280px;
    min-width: 0;
}

.cookie-banner__title {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 4px;
}

.cookie-banner__text {
    font-size: 13px;
    line-height: 1.5;
    color: var(--muted);
}

.cookie-banner__text a {
    color: var(--text);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cookie-banner__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.cookie-banner__btn {
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 8px 14px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.cookie-banner__btn--primary {
    background: var(--text);
    color: var(--bg);
}

.cookie-banner__btn--primary:hover {
    opacity: 0.88;
}

.cookie-banner__btn--secondary {
    background: transparent;
    color: var(--text);
    border-color: var(--border);
}

.cookie-banner__btn--secondary:hover {
    background: var(--border);
}

.cookie-banner__btn--ghost {
    background: transparent;
    color: var(--muted);
    border-color: transparent;
    padding-left: 8px;
    padding-right: 8px;
}

.cookie-banner__btn--ghost:hover {
    color: var(--text);
}

@media (max-width: 560px) {
    .cookie-banner {
        padding: 14px 16px;
        border-radius: 12px;
    }

    .cookie-banner__inner {
        gap: 12px;
    }

    .cookie-banner__actions {
        width: 100%;
        justify-content: flex-end;
    }

    .cookie-banner__btn {
        flex: 0 1 auto;
    }
}

/* Cookie preferences modal */
.cookie-modal {
    position: fixed;
    inset: 0;
    z-index: 110;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: cookie-modal-fade 0.15s ease-out;
}

@keyframes cookie-modal-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.cookie-modal__panel {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cookie-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 12px;
}

.cookie-modal__title {
    font-size: 18px;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.cookie-modal__close {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: var(--muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
}

.cookie-modal__close:hover {
    color: var(--text);
    background: var(--border);
}

.cookie-modal__intro {
    padding: 0 20px 16px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--muted);
}

.cookie-modal__intro a {
    color: var(--text);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cookie-modal__rows {
    padding: 0 20px;
    overflow-y: auto;
    flex: 1;
}

.cookie-modal__row {
    display: block;
    padding: 14px 0;
    border-top: 1px solid var(--border);
    cursor: pointer;
}

.cookie-modal__row:first-child {
    border-top: none;
}

.cookie-modal__row-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
}

.cookie-modal__row-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.cookie-modal__row-desc {
    font-size: 13px;
    line-height: 1.45;
    color: var(--muted);
    margin: 0;
}

.cookie-modal__checkbox {
    appearance: none;
    width: 36px;
    height: 22px;
    background: var(--border);
    border-radius: 999px;
    position: relative;
    cursor: pointer;
    transition: background 0.15s;
    flex: none;
}

.cookie-modal__checkbox::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.15s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.cookie-modal__checkbox:checked {
    background: var(--text);
}

.cookie-modal__checkbox:checked::after {
    transform: translateX(14px);
    background: var(--bg);
}

.cookie-modal__checkbox:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.cookie-modal__footer {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding: 16px 20px 20px;
    border-top: 1px solid var(--border);
    margin-top: 12px;
}

@media (max-width: 480px) {
    .cookie-modal__footer {
        flex-direction: column-reverse;
    }
    .cookie-modal__footer .cookie-banner__btn {
        width: 100%;
    }
}
