/*
 * Blackdrift marketing site.
 * Tokens, type, shapes and motif from the app's design system,
 * projects/blackdrift/branding/DESIGN.md ("Clean Slate"), via the derived
 * tokens in projects/blackdrift/site-docs/SEO-BRIEF.md §0.10:
 * Powder by day, Polar night by night, drift blue for links and focus,
 * thaw red only next to Erase. Albert Sans variable (OFL), weight carries
 * hierarchy: Light 300 display, SemiBold 600 titles, Regular 400 body,
 * Bold 700 labels. Pills for actions, 14px cards, one easing, nothing bounces.
 */

@font-face {
    font-family: "Albert Sans";
    src: url("/blackdrift/fonts/albertsans-var.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
    color-scheme: light dark;
    --ground: #F5F8FB;   /* Powder */
    --surface: #FFFFFF;
    --line: #CFE0F0;     /* Glacier */
    --ink: #0E1B3D;      /* Polar navy */
    --muted: #4A5878;
    --drift: #2F6FD6;
    --drift-ink: #1F57B3; /* drift darkened for small link text on Powder (AA) */
    --thaw: #B81E3C;      /* thaw darkened for small text on white (AA) */
    --band: #0E1B3D;
    --band-ink: #E8EEF6;
    --band-drift: #7AA8F5;
    --ease: cubic-bezier(.16, 1, .3, 1);
    --radius: 14px;
    --wrap: 72rem;
}

@media (prefers-color-scheme: dark) {
    :root {
        --ground: #0B1530;   /* Polar night */
        --surface: #14213F;
        --line: #253758;
        --ink: #E8EEF6;      /* Frost */
        --muted: #9AAAC6;
        --drift: #7AA8F5;
        --drift-ink: #7AA8F5;
        --thaw: #FF5C77;
        --band: #14213F;
        --band-ink: #E8EEF6;
        --band-drift: #7AA8F5;
    }
}

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

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

body {
    margin: 0;
    background: var(--ground);
    color: var(--ink);
    font-family: "Albert Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 1.0625rem;
    line-height: 1.55;
    font-weight: 400;
    overflow-wrap: break-word;
}

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

a {
    color: var(--drift-ink);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
}

a:hover {
    text-decoration-thickness: 2px;
}

:focus-visible {
    outline: 3px solid var(--drift);
    outline-offset: 3px;
    border-radius: 4px;
}

::selection {
    background: var(--ink);
    color: var(--ground);
}

h1,
h2,
h3 {
    line-height: 1.2;
    margin: 0 0 0.6em;
    color: var(--ink);
}

h1 {
    font-weight: 300;
    font-size: clamp(2.25rem, 1.6rem + 3vw, 3.5rem);
    line-height: 1.1;
    letter-spacing: -0.03em;
}

h2 {
    font-weight: 600;
    font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem);
    letter-spacing: -0.01em;
}

h3 {
    font-weight: 600;
    font-size: 1.2rem;
}

p,
ul,
ol {
    margin: 0 0 1em;
}

code {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.88em;
    overflow-wrap: anywhere;
}

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 1.25rem;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -4rem;
    z-index: 10;
    background: var(--surface);
    color: var(--ink);
    padding: 0.75rem 1.25rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    font-weight: 700;
}

.skip-link:focus {
    top: 1rem;
}

/* Header */

.topbar {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.topbar .wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1.5rem;
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 48px;
    color: var(--ink);
    text-decoration: none;
}

.brand img {
    border-radius: 10px;
    border: 1px solid var(--line);
}

.wordmark {
    font-weight: 300;
    font-size: 1.6rem;
    letter-spacing: 0.04em;
    line-height: 1;
}

.site-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0 0.25rem;
    margin: 0;
    padding: 0;
}

.site-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    padding: 0 0.85rem;
    border-radius: 999px;
    color: var(--ink);
    font-weight: 600;
    text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
    background: var(--ground);
    text-decoration: underline;
    text-decoration-color: var(--drift);
}

/* Hero */

.hero {
    padding: 3rem 0 2rem;
}

.hero-grid {
    display: grid;
    gap: 2.5rem;
    align-items: center;
}

.hero-grid > * {
    min-width: 0;
}

.answer {
    font-size: 1.15rem;
    line-height: 1.6;
    max-width: 40rem;
}

.cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.5rem;
    margin-top: 1.75rem;
}

.cta-note {
    color: var(--muted);
    margin: 0;
    max-width: 22rem;
}

.play-badge {
    display: inline-block;
    border-radius: 10px;
    line-height: 0;
}

.play-badge img {
    width: 188px;
    height: auto;
}

.hero-shot {
    justify-self: center;
    width: 100%;
    max-width: 22rem;
}

.phone {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

@media (min-width: 56rem) {
    .hero {
        padding: 4.5rem 0 3rem;
    }

    .hero-grid {
        grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
        gap: 4rem;
    }
}

/* Drift-dots divider: the mark's seven shrinking dots drifting right */

.drift {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.drift span {
    display: block;
    border-radius: 50%;
    background: var(--ink);
}

.drift span:nth-child(1) { width: 11px; height: 11px; }
.drift span:nth-child(2) { width: 10px; height: 10px; }
.drift span:nth-child(3) { width: 9px; height: 9px; }
.drift span:nth-child(4) { width: 8px; height: 8px; background: var(--drift); opacity: .7; }
.drift span:nth-child(5) { width: 7px; height: 7px; background: var(--drift); opacity: .55; }
.drift span:nth-child(6) { width: 6px; height: 6px; background: var(--drift); opacity: .4; }
.drift span:nth-child(7) { width: 5px; height: 5px; background: var(--drift); opacity: .28; }

.divider {
    padding: 1rem 0;
}

/* Sections */

.section {
    padding: 2.5rem 0;
}

.section-head {
    max-width: 44rem;
    margin-bottom: 1.75rem;
}

.cards {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1rem;
}

.cards > li {
    min-width: 0;
}

.card {
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.4rem 1.4rem 0.6rem;
    height: 100%;
}

.card h3 {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.card .icon {
    flex: none;
    width: 28px;
    height: 28px;
    color: var(--drift);
}

.card.erase .icon {
    color: var(--thaw);
}

@media (min-width: 48rem) {
    .cards.three {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .cards.two {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.split {
    display: grid;
    gap: 2rem;
    align-items: start;
}

.split > * {
    min-width: 0;
}

@media (min-width: 56rem) {
    .split {
        grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
        gap: 3.5rem;
    }
}

.ticks {
    list-style: none;
    padding: 0;
}

.ticks li {
    position: relative;
    padding-left: 1.6rem;
    margin-bottom: 0.6rem;
}

.ticks li::before {
    content: "";
    position: absolute;
    left: 0.2rem;
    top: 0.55em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--drift);
}

.nots li::before {
    background: transparent;
    border: 2px solid var(--muted);
    width: 10px;
    height: 10px;
    top: 0.5em;
    left: 0.1rem;
}

.shot-aside {
    max-width: 18rem;
    justify-self: center;
}

/* Gallery */

.gallery {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.gallery li {
    min-width: 0;
}

.gallery figure,
.shot {
    margin: 0;
}

.gallery figcaption {
    margin-top: 0.6rem;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.45;
}

@media (min-width: 48rem) {
    .gallery {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Privacy block */

.note {
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.25rem 1.4rem 0.3rem;
}

/* Question links */

.qlinks {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.6rem;
}

.qlinks a {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0.6rem 1.1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--ink);
    font-weight: 600;
    text-decoration: none;
}

.qlinks a:hover span {
    text-decoration: underline;
    text-decoration-color: var(--drift);
}

/* Closing band */

.band {
    background: var(--band);
    color: var(--band-ink);
    border-radius: var(--radius);
    padding: 2.25rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem 2rem;
}

.band h2 {
    color: var(--band-ink);
    font-weight: 300;
    margin: 0;
    font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.25rem);
    letter-spacing: -0.02em;
}

.band :focus-visible {
    outline-color: var(--band-drift);
}

.band .drift span {
    background: var(--band-ink);
}

.band .drift span:nth-child(n+4) {
    background: var(--band-drift);
}

/* Inner pages */

.page-head {
    padding: 2rem 0 1rem;
}

.crumbs ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    margin: 0 0 1.5rem;
    padding: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.crumbs li + li::before {
    content: "›";
    padding: 0 0.5rem;
}

.crumbs a {
    color: var(--muted);
    display: inline-block;
    padding: 0.6rem 0;
}

.lede {
    font-size: 1.15rem;
    color: var(--muted);
    max-width: 42rem;
}

.toc {
    margin-top: 1.5rem;
}

@media (min-width: 48rem) {
    .toc {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.ledger section {
    padding: 2rem 0;
    border-top: 1px solid var(--line);
    scroll-margin-top: 1rem;
}

.ledger section:first-child {
    border-top: 0;
}

.ledger h2 {
    max-width: 44rem;
}

.ledger .answer,
.ledger p,
.ledger ul {
    max-width: 44rem;
}

/* Network table, stacks into cards at 600px and below */

.table-wrap {
    max-width: 100%;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-size: 0.98rem;
}

caption {
    display: block;
    text-align: left;
    font-weight: 600;
    padding: 0 0 0.6rem;
}

th,
td {
    text-align: left;
    vertical-align: top;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--line);
}

th {
    font-weight: 700;
    font-size: 0.9rem;
}

tr:last-child td {
    border-bottom: 0;
}

@media (max-width: 37.5rem) {
    table,
    thead,
    tbody,
    tr,
    th,
    td {
        display: block;
    }

    thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
    }

    tr {
        border-bottom: 1px solid var(--line);
        padding: 0.4rem 0;
    }

    tr:last-child {
        border-bottom: 0;
    }

    td {
        border: 0;
        padding: 0.35rem 1rem;
    }

    td::before {
        content: attr(data-label);
        display: block;
        font-weight: 700;
        font-size: 0.85rem;
        color: var(--muted);
    }
}

/* Footer */

.footer {
    margin-top: 3rem;
    background: var(--surface);
    border-top: 1px solid var(--line);
    padding: 2.25rem 0 2.5rem;
    color: var(--ink);
}

.footer-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.footer-top p {
    margin: 0;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0 1.25rem;
    margin: 1.25rem 0;
    padding: 0;
}

.footer-links a {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    color: var(--ink);
    overflow-wrap: anywhere;
}

.fine {
    color: var(--muted);
    font-size: 0.9rem;
}

.fine p {
    margin: 0 0 0.4rem;
}

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

@media (prefers-reduced-motion: no-preference) {
    a,
    .qlinks a {
        transition: background-color .2s var(--ease), text-decoration-color .2s var(--ease);
    }
}
