/* ControlDeck marketing site — styles
   ----------------------------------------------------------
   Design direction: Apple-style minimal product page, dark theme,
   in-app color palette reused for brand continuity.
*/

:root {
    /* Color tokens */
    --bg: #0B0B0D;
    --surface: #1A1A1F;
    --surface-2: #232328;
    --text: #F2F2F4;
    --text-dim: #9A9AA0;
    --text-muted: #8A8A92;
    --border: rgba(255, 255, 255, 0.08);
    --accent: #4A90D9;       /* in-app blue */
    --accent-hover: #6BA5E3;
    --success: #5BD068;      /* in-app green */
    --warning: #F5C73A;      /* in-app gold */
    --danger: #E8556D;       /* in-app red */
    --mode: #B07CD8;         /* in-app purple */

    /* Type scale */
    --font-display: "Inter", system-ui, -apple-system, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
    --font-body: "Inter", system-ui, -apple-system, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
    --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    --space-32: 8rem;

    /* Layout */
    --content-max: 1200px;
    --content-narrow: 760px;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 24px;
    --radius-xl: 40px;
}

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

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img,
picture,
video,
svg {
    max-width: 100%;
    display: block;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.15s ease;
}

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

/* Layout primitives */
.container {
    width: 100%;
    max-width: var(--content-max);
    margin-inline: auto;
    padding-inline: clamp(1rem, 4vw, 2rem);
}

.container--narrow {
    max-width: var(--content-narrow);
}

section {
    padding-block: clamp(4rem, 10vw, 8rem);
}

/* Sticky nav */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(11, 11, 13, 0.72);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid var(--border);
}

.nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-6);
    height: 56px;
    width: 100%;
    max-width: var(--content-max);
    margin-inline: auto;
    padding-inline: clamp(1rem, 4vw, 2rem);
}

.nav__wordmark {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.01em;
    color: var(--text);
}

.nav__icon {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    display: block;
}

.nav__links {
    display: flex;
    align-items: center;
    gap: var(--space-6);
}

.nav__link {
    color: var(--text-dim);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.15s ease;
}

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

.nav__cta {
    height: 32px;
}

.nav__cta img {
    height: 100%;
    width: auto;
    display: block;
}

.nav__cta--soon {
    opacity: 0.7;
    cursor: default;
}

@media (max-width: 720px) {
    .nav__links .nav__link:not(.nav__cta) {
        display: none;
    }

    .nav__links {
        gap: var(--space-3);
    }

    .nav__cta {
        height: 28px;
    }
}

@media (max-width: 440px) {
    /* Two badges + wordmark won't both fit; collapse wordmark to icon only */
    .nav__wordmark span {
        display: none;
    }

    .nav__cta {
        height: 26px;
    }
}

/* Hero */
.hero {
    padding-top: clamp(2rem, 5vw, 4rem);
    padding-bottom: clamp(2rem, 5vw, 4rem);
    text-align: center;
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(74, 144, 217, 0.10), transparent 70%),
        var(--bg);
}

.hero__eyebrow {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: var(--space-4);
}

.hero__headline {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    line-height: 1.05;
    letter-spacing: -0.025em;
    margin: 0 auto var(--space-3);
    max-width: 20ch;
    text-wrap: balance;
    color: var(--text);
}

.hero__sub {
    font-size: clamp(1.05rem, 2vw, 1.2rem);
    color: var(--text-dim);
    max-width: 56ch;
    margin: 0 auto var(--space-16);
    line-height: 1.5;
    text-wrap: balance;
}

.hero__sub strong {
    color: var(--accent);
    font-weight: 500;
}

.hero__devices {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: clamp(1.5rem, 4vw, 3rem);
    margin-block: var(--space-8);
}

.hero__cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    margin-top: var(--space-8);
}

.hero__badges {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    flex-wrap: wrap;
    justify-content: center;
}

.badge {
    display: inline-block;
    height: 48px;
}

.badge img {
    height: 100%;
    width: auto;
}

.badge--soon {
    position: relative;
    opacity: 0.85;
}

.badge--soon::after {
    content: "Coming Soon";
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--warning);
    color: #1a1a1a;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 999px;
    white-space: nowrap;
}

.hero__caption {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: var(--space-2);
}

/* Device frames (CSS-built, minimal Apple-style outlines) */
.device-frame {
    position: relative;
    background: #0a0a0c;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.08) inset,
        0 30px 80px -20px rgba(0, 0, 0, 0.7),
        0 10px 30px -10px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.device-frame--phone {
    width: clamp(200px, 22vw, 290px);
    border-radius: clamp(28px, 4vw, 44px);
    padding: 8px;
}

.device-frame--tablet {
    width: clamp(260px, 32vw, 440px);
    border-radius: clamp(18px, 2vw, 28px);
    padding: 10px;
}

.device-frame img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: clamp(10px, 1.5vw, 18px);
}

.device-frame--phone img {
    border-radius: clamp(22px, 3.5vw, 38px);
}

@media (max-width: 720px) {
    .hero__devices {
        flex-direction: column-reverse;
        align-items: center;
    }

    .device-frame--tablet {
        transform: translateY(0) rotateY(0);
        width: min(85vw, 460px);
    }

    .device-frame--phone {
        margin-top: -20px;
        width: min(60vw, 280px);
    }
}

/* Feature spotlights */
.feature {
    background: var(--bg);
}

.feature__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 6vw, 5rem);
    align-items: center;
}

.feature--reverse .feature__grid {
    direction: rtl;
}

.feature--reverse .feature__grid > * {
    direction: ltr;
}

.feature__eyebrow {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: var(--space-3);
}

.feature__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0 0 var(--space-4);
    color: var(--text);
}

.feature__body {
    font-size: 1.05rem;
    color: var(--text-dim);
    max-width: 38ch;
}

.feature__image {
    display: flex;
    justify-content: center;
}

.feature__image .device-frame--phone {
    width: clamp(240px, 35vw, 320px);
}

.feature__image .device-frame--tablet {
    width: clamp(320px, 46vw, 560px);
}

@media (max-width: 760px) {
    .feature__grid,
    .feature--reverse .feature__grid {
        grid-template-columns: 1fr;
        direction: ltr;
    }

    .feature__copy {
        text-align: center;
    }

    .feature__body {
        margin-inline: auto;
    }

    .feature__image .device-frame--tablet {
        width: min(88vw, 460px);
    }
}

/* Cross-platform strip */
.platforms {
    background: var(--surface);
    border-block: 1px solid var(--border);
}

.platforms__inner {
    text-align: center;
}

.platforms__title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    color: var(--text);
    margin-bottom: var(--space-6);
}

.platforms__row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(1.5rem, 5vw, 4rem);
    flex-wrap: wrap;
    margin-bottom: var(--space-6);
}

.platform {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    color: var(--text-dim);
    font-size: 13px;
}

.platform__icon {
    width: 32px;
    height: 32px;
    color: var(--text-dim);
}

.platform--soon {
    color: var(--text-muted);
}

.platform--soon .platform__icon {
    color: var(--text-muted);
}

.platforms__sub {
    color: var(--text-muted);
    font-size: 14px;
}

/* Specs */
.specs__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-6);
}

.spec-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-6);
}

.spec-card__label {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: var(--space-3);
}

.spec-card__value {
    color: var(--text);
    font-size: 1rem;
    line-height: 1.5;
}

.spec-card__value code,
.spec-card__value .mono {
    font-family: var(--font-mono);
    color: var(--text);
    font-size: 0.95em;
}

.specs__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    text-align: center;
    margin: 0 0 var(--space-12);
    letter-spacing: -0.02em;
}

/* Privacy & pricing */
.privacy {
    background: var(--bg);
}

.privacy__inner {
    text-align: center;
}

.privacy__pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
    max-width: 760px;
    margin-inline: auto;
    margin-top: var(--space-8);
    text-align: left;
}

.privacy__item h3 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0 0 var(--space-2);
    color: var(--text);
}

.privacy__item p {
    color: var(--text-dim);
    margin: 0;
    font-size: 0.95rem;
}

.privacy__link {
    margin-top: var(--space-8);
    font-size: 14px;
    color: var(--text-muted);
}

@media (max-width: 600px) {
    .privacy__pair {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }
}

/* Footer */
.footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding-block: var(--space-16);
}

.footer__inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--space-8);
    align-items: start;
}

.footer__brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 18px;
    color: var(--text);
    margin-bottom: var(--space-3);
}

.footer__icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: block;
}

.footer__tagline {
    color: var(--text-dim);
    font-size: 14px;
    margin: 0 0 var(--space-6);
    max-width: 32ch;
}

.footer__badges {
    display: flex;
    gap: var(--space-3);
    align-items: center;
}

.footer__badges .badge {
    height: 40px;
}

.footer__links {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    text-align: right;
}

.footer__link {
    color: var(--text-dim);
    font-size: 14px;
}

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

.footer__legal {
    grid-column: 1 / -1;
    margin-top: var(--space-12);
    padding-top: var(--space-6);
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-4);
}

@media (max-width: 720px) {
    .footer__inner {
        grid-template-columns: 1fr;
    }

    .footer__links {
        text-align: left;
    }
}

/* Stats strip */
.stats {
    padding-block: clamp(2rem, 4vw, 3.5rem);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background:
        radial-gradient(ellipse 60% 100% at 50% 50%, rgba(74, 144, 217, 0.06), transparent 70%),
        var(--bg);
}

.stats__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(1rem, 3vw, 3rem);
    text-align: center;
}

.stat__number {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.25rem, 5vw, 3.75rem);
    line-height: 1;
    letter-spacing: -0.04em;
    color: var(--text);
    margin: 0 0 var(--space-2);
}

.stat__label {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin: 0;
}

@media (max-width: 900px) {
    .stats__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-8);
    }
}

@media (max-width: 420px) {
    .stats__grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }
}

/* Reveal-on-scroll animation */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    * {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
    }
}

/* 404 */
.notfound {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-8);
    text-align: center;
}

.notfound__code {
    font-family: var(--font-mono);
    font-size: clamp(3rem, 10vw, 6rem);
    color: var(--accent);
    margin: 0;
    letter-spacing: -0.04em;
}

.notfound__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin: var(--space-4) 0 var(--space-2);
}

.notfound__body {
    color: var(--text-dim);
    max-width: 40ch;
    margin: 0 auto var(--space-8);
}

/* Legal / content pages (privacy, support) */
.legal {
    max-width: var(--content-narrow);
    margin-inline: auto;
    padding-block: clamp(3rem, 6vw, 5rem) clamp(4rem, 8vw, 6rem);
    padding-inline: clamp(1rem, 4vw, 2rem);
}

.legal__header {
    margin-bottom: var(--space-12);
}

.legal__eyebrow {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 var(--space-3);
}

.legal h1 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    text-wrap: balance;
    color: var(--text);
    margin: 0 0 var(--space-3);
}

.legal__subtitle {
    color: var(--text-muted);
    font-size: 14px;
    margin: 0;
}

.legal h2 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    letter-spacing: -0.01em;
    color: var(--text);
    margin: var(--space-12) 0 var(--space-4);
    padding-top: var(--space-8);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.legal h2:first-of-type {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

.legal p,
.legal ul,
.legal ol {
    color: var(--text-dim);
    line-height: 1.65;
    margin: var(--space-4) 0;
}

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

.legal ul,
.legal ol {
    padding-left: 1.5rem;
}

.legal li {
    margin: var(--space-2) 0;
}

.legal a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-color: rgba(74, 144, 217, 0.4);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.15s ease, color 0.15s ease;
}

.legal a:hover {
    color: var(--accent-hover);
    text-decoration-color: var(--accent-hover);
}

/* Explainer — "What is a Flex Radio control deck?" */
.explainer {
    background: var(--bg);
}

.explainer h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    text-align: center;
    margin: 0 0 var(--space-8);
    letter-spacing: -0.02em;
    color: var(--text);
}

.explainer p {
    color: var(--text-dim);
    font-size: 1.0625rem;
    line-height: 1.7;
    margin: 0 0 var(--space-4);
    text-align: left;
}

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

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

/* Stream Deck comparison */
.streamdeck-compare {
    background: var(--surface);
    border-block: 1px solid var(--border);
}

.streamdeck-compare h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    text-align: center;
    margin: 0 0 var(--space-6);
    letter-spacing: -0.02em;
    color: var(--text);
}

.streamdeck-compare h2 .nowrap {
    white-space: nowrap;
}

.streamdeck-compare > .container > p {
    color: var(--text-dim);
    font-size: 1.0625rem;
    line-height: 1.7;
    margin: 0 0 var(--space-12);
    text-align: center;
    max-width: 640px;
    margin-inline: auto;
}

.compare-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg);
}

.compare {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.compare thead th {
    text-align: left;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-dim);
    padding: var(--space-4) var(--space-6);
    border-bottom: 1px solid var(--border);
    background: var(--surface-2);
}

.compare thead th:first-child {
    width: 8rem;
}

.compare tbody th {
    text-align: left;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
    padding: var(--space-4) var(--space-6);
    vertical-align: top;
    border-bottom: 1px solid var(--border);
    background: var(--surface-2);
    white-space: nowrap;
}

.compare td {
    padding: var(--space-4) var(--space-6);
    color: var(--text-dim);
    line-height: 1.55;
    vertical-align: top;
    border-bottom: 1px solid var(--border);
}

.compare td:last-child {
    color: var(--text);
    font-weight: 500;
}

.compare tbody tr:last-child th,
.compare tbody tr:last-child td {
    border-bottom: none;
}

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

    .compare thead th,
    .compare tbody th,
    .compare td {
        padding: var(--space-3) var(--space-4);
    }

    .compare tbody th {
        white-space: normal;
    }
}
