/* Queenwise landing page styles — apparentlogic.com/queenwise */

:root {
    /* Brand palette. Purple, violet and magenta are outside the system. */
    --lacquer: #a31124;
    --oxblood: #590b17;
    --ink: #111116;
    --ivory: #f6efe3;
    --steel: #b8c0c8;
    --emerald: #0d594c;
    --cobalt: #174d89;

    --color-accent: var(--lacquer);
    --color-accent-strong: var(--oxblood);
    --color-accent-soft: rgba(163, 17, 36, 0.1);
    --color-text: var(--ink);
    --color-text-light: #4b4b55;
    --color-text-muted: #6f6f7a;
    --color-background: var(--ivory);
    --color-surface: #fcf8f1;
    --color-border: rgba(17, 17, 22, 0.14);
    --color-border-soft: rgba(17, 17, 22, 0.07);
    --color-shadow: rgba(17, 17, 22, 0.1);

    /* Board */
    --board-light: #f6efe3;
    --board-dark: #dfe4e9;
    --board-line: rgba(17, 17, 22, 0.16);
    --board-chamber: #111116;
    --board-queen: var(--lacquer);
    --board-reach: rgba(163, 17, 36, 0.55);

    --measure: 900px;
    --gutter: clamp(20px, 5vw, 40px);
}

@media (prefers-color-scheme: dark) {
    :root {
        --color-accent: #cf263a;
        --color-accent-strong: #e0475a;
        --color-accent-soft: rgba(207, 38, 58, 0.16);
        --color-text: #f1e8db;
        --color-text-light: #c2beb6;
        --color-text-muted: #93939d;
        --color-background: #09090c;
        --color-surface: #15151b;
        --color-border: rgba(211, 216, 222, 0.18);
        --color-border-soft: rgba(211, 216, 222, 0.09);
        --color-shadow: rgba(0, 0, 0, 0.6);

        --board-light: #24242c;
        --board-dark: #33343d;
        --board-line: rgba(241, 232, 219, 0.18);
        --board-chamber: #f1e8db;
        --board-queen: #cf263a;
        --board-reach: rgba(207, 38, 58, 0.7);
    }
}

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

html {
    font-size: 62.5%;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui,
        "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 1.6rem;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

a:focus-visible,
.btn:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 3px;
    border-radius: 4px;
}

.container {
    max-width: var(--measure);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* Header */
header {
    padding: 40px 0 10px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--color-text);
}

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

.brandMark {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    fill: var(--color-accent);
}

.brandName {
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* Hero */
.hero {
    padding: 32px 0 8px;
}

.heroText {
    min-width: 0;
}

@media (min-width: 880px) {
    .hero {
        display: grid;
        grid-template-columns: 1.05fr 0.95fr;
        gap: 48px;
        align-items: center;
        padding: 44px 0 16px;
    }

    .hero .boardFigure {
        margin: 0;
    }

    .hero .boardFigure svg {
        max-width: 100%;
    }
}

.eyebrow {
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 14px;
}

.hero h1 {
    font-size: clamp(3.2rem, 6vw, 4.6rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    font-weight: 700;
    max-width: 16ch;
}

.lead {
    font-size: 1.9rem;
    line-height: 1.6;
    color: var(--color-text-light);
    margin-top: 20px;
    max-width: 56ch;
}

.ctaRow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-top: 30px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: 10px;
    background: var(--color-accent);
    color: #fff;
    font-size: 1.6rem;
    font-weight: 500;
    border: 1px solid transparent;
}

.btn:hover {
    background: var(--color-accent-strong);
    color: #fff;
}

.btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    flex-shrink: 0;
}

/* The App Store button is deliberately inert until the app ships. */
.btn-pending {
    background: transparent;
    color: var(--color-text);
    border: 1px dashed var(--color-border);
    cursor: default;
}

.btn-pending svg {
    fill: var(--color-text-light);
}

.ctaNote {
    font-size: 1.4rem;
    color: var(--color-text-muted);
    margin-top: 14px;
}

/* Board figures */
.boardFigure {
    margin: 40px 0 0;
    text-align: center;
}

.boardFigure svg {
    width: 100%;
    max-width: 380px;
    height: auto;
}

.boardFigure figcaption {
    font-size: 1.4rem;
    color: var(--color-text-muted);
    margin-top: 16px;
    max-width: 46ch;
    margin-left: auto;
    margin-right: auto;
}

.board-square-light {
    fill: var(--board-light);
}

.board-square-dark {
    fill: var(--board-dark);
}

.board-grid {
    stroke: var(--board-line);
    stroke-width: 1;
    fill: none;
}

.board-chamber {
    stroke: var(--board-chamber);
    stroke-width: 3;
    stroke-linecap: round;
    fill: none;
}

.board-edge {
    stroke: var(--board-chamber);
    stroke-width: 3;
    fill: none;
}

.board-reach {
    stroke: var(--board-reach);
    stroke-width: 2.5;
    stroke-linecap: round;
}

.qw-queen {
    fill: var(--board-queen);
}

/* Sections */
section {
    padding: 48px 0;
    border-top: 1px solid var(--color-border-soft);
}

section:first-of-type {
    border-top: none;
}

h2 {
    font-size: clamp(2.2rem, 3.4vw, 2.8rem);
    line-height: 1.2;
    letter-spacing: -0.015em;
    font-weight: 650;
    max-width: 24ch;
}

section > p,
section > .container > p {
    font-size: 1.7rem;
    color: var(--color-text-light);
    margin-top: 16px;
    max-width: 62ch;
}

/* Rules */
.rulesLayout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    align-items: start;
    margin-top: 24px;
}

@media (min-width: 760px) {
    .rulesLayout {
        grid-template-columns: 1.15fr 1fr;
        gap: 44px;
    }

    .rulesLayout .boardFigure {
        margin-top: 0;
    }
}

.rulesLayout p {
    font-size: 1.7rem;
    color: var(--color-text-light);
    margin-top: 22px;
}

.rules {
    counter-reset: rule;
    list-style: none;
}

.rules li {
    position: relative;
    padding-left: 46px;
    margin-bottom: 20px;
    font-size: 1.7rem;
    color: var(--color-text-light);
}

.rules li:last-child {
    margin-bottom: 0;
}

.rules li::before {
    counter-increment: rule;
    content: counter(rule);
    position: absolute;
    left: 0;
    top: 1px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--color-accent-soft);
    color: var(--color-accent);
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

/* Card grid */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 18px;
    margin-top: 28px;
}

.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border-soft);
    border-radius: 12px;
    padding: 22px;
}

.card h3 {
    font-size: 1.7rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.card p {
    font-size: 1.5rem;
    color: var(--color-text-light);
}

/* Week ladder */
.week {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-top: 28px;
    align-items: end;
}

.week div {
    background: var(--color-surface);
    border: 1px solid var(--color-border-soft);
    border-radius: 8px;
    padding: 12px 4px;
    text-align: center;
}

.week .size {
    display: block;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text);
    font-variant-numeric: tabular-nums;
}

.week .band {
    display: block;
    font-size: 1.2rem;
    color: var(--color-text-muted);
    margin-top: 2px;
}

.week div:nth-child(6),
.week div:nth-child(7) {
    border-color: var(--color-accent-soft);
    background: var(--color-accent-soft);
}

@media (max-width: 560px) {
    .week {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Plain fact list */
.facts {
    list-style: none;
    margin-top: 22px;
}

.facts li {
    position: relative;
    padding-left: 26px;
    margin-bottom: 12px;
    font-size: 1.6rem;
    color: var(--color-text-light);
}

.facts li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 11px;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    transform: rotate(45deg);
    background: var(--color-accent);
}

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

/* Closing call to action */
.closing {
    text-align: center;
    background: var(--color-surface);
    border: 1px solid var(--color-border-soft);
    border-radius: 16px;
    padding: 40px var(--gutter);
    margin: 48px 0 0;
}

.closing h2 {
    max-width: none;
}

.closing p {
    margin-left: auto;
    margin-right: auto;
}

.closing .ctaRow {
    justify-content: center;
}

/* Footer */
footer {
    padding: 44px 0;
    text-align: center;
    border-top: 1px solid var(--color-border-soft);
    margin-top: 48px;
}

.footerText {
    font-size: 1.4rem;
    color: var(--color-text-muted);
    margin-bottom: 14px;
}

.footerLinks {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 26px;
}

.footerLinks a {
    font-size: 1.4rem;
    color: var(--color-text-muted);
}

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

.trademark {
    font-size: 1.2rem;
    color: var(--color-text-muted);
    margin-top: 22px;
    max-width: 62ch;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

/* Legal / privacy sub-page */
.legal-page header {
    padding: 32px 0 4px;
}

.legal-content {
    padding: 24px 0 40px;
    max-width: 68ch;
}

.legal-content .lastUpdated {
    font-size: 1.4rem;
    color: var(--color-text-muted);
    margin-bottom: 26px;
}

.legal-content h1 {
    font-size: clamp(2.6rem, 5vw, 3.2rem);
    line-height: 1.2;
    letter-spacing: -0.015em;
    margin-bottom: 24px;
}

.legal-content h2 {
    font-size: 1.9rem;
    margin-top: 32px;
    margin-bottom: 12px;
    max-width: none;
}

.legal-content p {
    font-size: 1.5rem;
    color: var(--color-text-light);
    margin-bottom: 14px;
}

.legal-content ul,
.legal-content ol {
    padding-left: 24px;
    margin-bottom: 16px;
}

.legal-content li {
    font-size: 1.5rem;
    color: var(--color-text-light);
    margin-bottom: 8px;
}

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

.legal-content .copyright {
    margin-top: 36px;
    font-size: 1.3rem;
    color: var(--color-text-muted);
}

@media (max-width: 600px) {
    .lead {
        font-size: 1.7rem;
    }

    .rules li,
    section > p,
    section > .container > p {
        font-size: 1.6rem;
    }

    .ctaRow {
        gap: 12px;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}
