/* ==========================================================================
   AI Music Maker: SnapSong site
   Dark, vibrant identity carried over from the original SnapSong site:
   ambient glow, glass cards, red-pink-orange gradients. System font stack,
   no frameworks, no build step.
   ========================================================================== */

/* ---------- Tokens ---------- */

:root {
    --bg: #0A0A0A;
    --red: #FF002E;
    --pink: #FF2066;
    --play-accent: #FF174D;
    --orange: #FF6B35;
    --yellow: #FFB347;
    --text: #FFFFFF;
    --text-2: rgba(255, 255, 255, 0.65);
    --text-3: rgba(255, 255, 255, 0.4);
    --glass: rgba(255, 255, 255, 0.06);
    --glass-2: rgba(255, 255, 255, 0.1);
    --stroke: rgba(255, 255, 255, 0.12);
    --stroke-strong: rgba(255, 255, 255, 0.2);
    --accent: var(--orange);
    --grad: linear-gradient(135deg, var(--red), var(--pink), var(--orange));
    --grad-btn: linear-gradient(135deg, var(--red), var(--pink));
    --selection: rgba(255, 32, 102, 0.4);
    --header-bg: rgba(10, 10, 10, 0.8);
    --shadow-card: 0 10px 40px rgba(0, 0, 0, 0.35);
    --shadow-lift: 0 30px 90px rgba(0, 0, 0, 0.45);

    --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --size-hero: clamp(3rem, 6.2vw, 5.5rem);
    --size-h1: clamp(2.25rem, 5vw, 3.25rem);
    --size-h2: clamp(2rem, 4.5vw, 3rem);
    --size-h3: 1.25rem;
    --size-body: 1.0625rem;
    --size-small: 0.875rem;

    --radius-s: 12px;
    --radius-m: 20px;
    --radius-l: 32px;
    --squircle: 22.37%;
    --container: 1100px;
    --pad: 1.5rem;

    color-scheme: dark;
}

/* ---------- Base ---------- */

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

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

body {
    margin: 0;
    font-family: var(--font);
    font-size: var(--size-body);
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img,
svg,
video {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

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

a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.prose a,
.faq-answer a,
.error-page p a {
    text-decoration: underline;
    text-underline-offset: 3px;
}

h1, h2, h3, h4 {
    margin: 0 0 0.5em;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--text);
    text-wrap: balance;
}

h1 { font-size: var(--size-h1); }
h2 { font-size: var(--size-h2); }
h3 { font-size: var(--size-h3); font-weight: 700; letter-spacing: -0.01em; }

p {
    margin: 0 0 1em;
}

.container {
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--pad);
    position: relative;
    z-index: 1;
}

.gradient-text {
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 200;
    padding: 0.75rem 1.25rem;
    background: var(--grad-btn);
    color: #fff;
    border-radius: 0 0 var(--radius-s) 0;
}

.skip-link:focus {
    left: 0;
}

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

::selection {
    background: var(--selection);
}

/* ---------- Ambient background glow ---------- */

.ambient {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.ambient::before {
    content: "";
    position: absolute;
    width: 800px;
    height: 800px;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(255, 0, 46, 0.15) 0%, rgba(255, 32, 102, 0.08) 40%, transparent 70%);
}

.ambient::after {
    content: "";
    position: absolute;
    width: 600px;
    height: 600px;
    bottom: 10%;
    right: -100px;
    background: radial-gradient(circle, rgba(255, 107, 53, 0.1) 0%, transparent 60%);
}

@media (prefers-reduced-motion: no-preference) {
    .ambient::before {
        animation: ambient-pulse 8s ease-in-out infinite;
    }

    .ambient::after {
        animation: ambient-pulse-r 10s ease-in-out infinite;
    }

    @keyframes ambient-pulse {
        0%, 100% { opacity: 0.6; transform: translateX(-50%) scale(1); }
        50% { opacity: 1; transform: translateX(-50%) scale(1.15); }
    }

    @keyframes ambient-pulse-r {
        0%, 100% { opacity: 1; transform: scale(1.15); }
        50% { opacity: 0.6; transform: scale(1); }
    }
}

/* ---------- Header ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--header-bg);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.25s ease;
}

.site-header.is-scrolled {
    border-bottom-color: var(--stroke);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    min-height: 64px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text);
    font-weight: 700;
    font-size: 1.125rem;
    letter-spacing: -0.01em;
}

.brand:hover {
    text-decoration: none;
    opacity: 0.85;
}

.brand img {
    width: 34px;
    height: 34px;
    flex: none;
    border-radius: 8px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: auto;
}

.site-nav a {
    padding: 0.4375rem 0.8125rem;
    border-radius: 999px;
    color: var(--text-2);
    font-size: 0.9375rem;
    font-weight: 500;
    transition: color 0.15s ease, background-color 0.15s ease;
}

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

.site-nav a[aria-current="page"] {
    color: var(--text);
    background: var(--glass-2);
}

.site-nav .btn-download {
    margin-left: 0.5rem;
    padding: 0.5rem 1.125rem;
    border-radius: 999px;
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 600;
    background: var(--grad-btn);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.site-nav .btn-download:hover {
    color: #fff;
    background: var(--grad-btn);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 0, 46, 0.35);
    text-decoration: none;
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 0.125rem;
    margin-left: 0.75rem;
    padding: 0.1875rem;
    border: 1px solid var(--stroke);
    border-radius: 999px;
    font-size: 0.8125rem;
}

.lang-switch a {
    padding: 0.25rem 0.625rem;
    border-radius: 999px;
    color: var(--text-2);
    font-weight: 600;
    letter-spacing: 0.02em;
}

.lang-switch a:hover {
    text-decoration: none;
    color: var(--text);
}

.lang-switch a[aria-current="true"] {
    background: var(--text);
    color: var(--bg);
}

.nav-toggle {
    display: none;
    margin-left: auto;
    width: 44px;
    height: 44px;
    border: 0;
    background: none;
    color: var(--text);
    cursor: pointer;
    border-radius: var(--radius-s);
}

.nav-toggle svg {
    width: 22px;
    height: 22px;
}

.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-menu { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 767px) {
    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .site-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
        margin: 0;
        padding: 0.75rem var(--pad) 1.25rem;
        background: rgba(10, 10, 10, 0.97);
        -webkit-backdrop-filter: blur(20px);
        backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--stroke);
        display: none;
    }

    .site-nav.is-open {
        display: flex;
    }

    .site-nav a {
        padding: 0.75rem 1rem;
        font-size: 1.0625rem;
    }

    .site-nav .btn-download {
        margin-left: 0;
        text-align: center;
        justify-content: center;
        display: inline-flex;
    }

    .lang-switch {
        margin: 0.5rem 0 0;
        align-self: flex-start;
    }

    .lang-switch a {
        padding: 0.625rem 1rem;
    }
}

/* ---------- Hero (two columns, overlapping app screens) ---------- */

.hero {
    position: relative;
    padding: clamp(3.5rem, 9vw, 6.5rem) 0 clamp(3rem, 7vw, 5rem);
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 6.5fr) minmax(0, 5.5fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    padding: 0.3125rem 0.875rem;
    border: 1px solid var(--stroke);
    border-radius: 999px;
    background: var(--glass);
    color: var(--text-2);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.eyebrow::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--grad-btn);
}

.hero h1 {
    max-width: 14ch;
    font-size: var(--size-hero);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 0.35em;
}

.hero .lead {
    font-size: clamp(1.125rem, 2vw, 1.3125rem);
    color: var(--text-2);
    max-width: 50ch;
    margin: 0 0 2rem;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.875rem;
}

.hero .store-name {
    font-size: var(--size-small);
}

.hero-visual {
    position: relative;
    min-height: 420px;
    display: grid;
    align-items: center;
}

.hero-visual::before {
    content: "";
    position: absolute;
    inset: 4% -6%;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(255, 32, 102, 0.14) 0%, transparent 74%);
    pointer-events: none;
}

.hero-visual .screen-front {
    position: relative;
    z-index: 2;
    width: min(280px, 58%);
    justify-self: center;
    margin-left: 22%;
    transform: rotate(3.5deg);
}

.hero-visual .screen-back {
    position: absolute;
    z-index: 1;
    left: 0;
    top: 8%;
    width: min(226px, 48%);
    transform: rotate(-8deg);
}

.float-icon {
    position: absolute;
    z-index: 3;
    border-radius: var(--squircle);
    box-shadow: 0 16px 44px rgba(255, 0, 46, 0.35);
}

.fi-1 { top: 2%; right: 4%; width: 68px; height: 68px; }
.fi-2 { bottom: 6%; left: 6%; width: 52px; height: 52px; }

@media (prefers-reduced-motion: no-preference) {
    .float-icon {
        animation: floaty 6s ease-in-out infinite alternate;
    }

    .fi-2 { animation-duration: 7.5s; animation-delay: -2.5s; }

    @keyframes floaty {
        from { translate: 0 -8px; }
        to { translate: 0 10px; }
    }
}

/* ---------- Song stage (rotating artwork, locks to the playing track) ---------- */

.song-stage {
    display: grid;
    place-items: center;
}

.song-stage .song-slide {
    grid-area: 1 / 1;
    width: 100%;
    height: auto;
    opacity: 0;
    transition: opacity 0.8s ease;
    filter: drop-shadow(0 24px 60px rgba(0, 0, 0, 0.55));
}

.song-stage .song-slide.is-active {
    opacity: 1;
}

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

    .hero-visual {
        min-height: 0;
        margin-top: 2rem;
        justify-items: center;
    }

    .hero-visual .screen-front {
        width: min(240px, 70%);
        margin-left: 0;
    }

    .hero-visual .screen-back,
    .float-icon {
        display: none;
    }
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    min-height: 50px;
    padding: 0.875rem 1.75rem;
    border: 1px solid transparent;
    border-radius: 14px;
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    text-decoration: none;
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--grad-btn);
    color: #fff;
}

.btn-primary:hover {
    box-shadow: 0 12px 40px rgba(255, 0, 46, 0.3);
    color: #fff;
}

.btn-secondary {
    background: var(--glass);
    border-color: var(--stroke);
    color: var(--text);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ---------- Sections ---------- */

.section {
    position: relative;
    padding-block: clamp(3.5rem, 9vw, 6.25rem);
}

.section-alt {
    background: rgba(255, 255, 255, 0.02);
    border-block: 1px solid rgba(255, 255, 255, 0.05);
}

.section-head {
    max-width: 46rem;
    margin: 0 auto clamp(2rem, 5vw, 3.5rem);
    text-align: center;
}

.section-head .kicker {
    display: block;
    margin-bottom: 0.875rem;
    color: var(--accent);
    font-size: var(--size-small);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.section-head p {
    margin: 0.75rem auto 0;
    color: var(--text-2);
    font-size: clamp(1rem, 1.8vw, 1.1875rem);
    max-width: 40rem;
}

.section-cta {
    margin-top: clamp(1.75rem, 4vw, 2.5rem);
    text-align: center;
}

/* ---------- App icon (squircle) ---------- */

.app-icon {
    border-radius: var(--squircle);
    background: var(--glass);
    flex: none;
}

/* ---------- App Store badge ---------- */

.badge-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.store-badge {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

.store-badge img {
    height: 52px;
    width: auto;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.store-badge:hover img {
    transform: translateY(-1px);
    opacity: 0.9;
}

.store-name {
    color: var(--text-3);
    font-size: var(--size-small);
    font-weight: 500;
}

/* Dark-only site: always use the white badge variant */
.badge-light { display: none; }
.badge-dark { display: inline; }

/* ---------- Glass card base ---------- */

.glass-card {
    background: var(--glass);
    border: 1px solid var(--stroke);
    border-radius: var(--radius-m);
}

/* ---------- Showcase (photo in, song out, playable) ---------- */

.showcase-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
    max-width: 1000px;
    margin: 0 auto;
}

.showcase-item {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    transition: transform 0.4s cubic-bezier(0.2, 0, 0, 1);
}

.showcase-item:hover {
    transform: translateY(-8px);
}

.showcase-shot {
    position: relative;
    padding: 0 0 0 1.75rem;
}

.showcase-shot .shot-song {
    display: block;
    width: 100%;
    filter: drop-shadow(0 24px 60px rgba(0, 0, 0, 0.5));
}

.showcase-shot .shot-photo {
    position: absolute;
    left: 0;
    top: 8%;
    width: 38%;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55);
    transform: rotate(-7deg);
    z-index: 2;
}

.showcase-shot .shot-arrow {
    position: absolute;
    left: 24%;
    top: 30%;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--grad-btn);
    color: #fff;
    box-shadow: 0 6px 18px rgba(255, 0, 46, 0.45);
}

.showcase-shot .shot-arrow svg {
    width: 15px;
    height: 15px;
}

@media (max-width: 767px) {
    .showcase-grid {
        grid-template-columns: 1fr;
        max-width: 340px;
        gap: 2.25rem;
    }
}

/* ---------- Audio player (glass, progress bar, full-song toggle) ---------- */

.audio-demo {
    margin-top: 0.25rem;
}

.audio-demo-label {
    margin: 0 0 0.625rem;
    font-size: var(--size-small);
    font-weight: 600;
    color: var(--text-2);
}

.track-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.track {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1.125rem;
    background: var(--glass);
    border: 1px solid var(--stroke);
    border-radius: 16px;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.track-play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex: none;
    border: 0;
    border-radius: 50%;
    background: var(--play-accent);
    color: #fff;
    box-shadow: 0 6px 18px rgba(255, 23, 77, 0.24);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.track-play:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 22px rgba(255, 23, 77, 0.42);
}

.track-play:active {
    transform: scale(0.95);
}

.track-play svg {
    width: 16px;
    height: 16px;
}

.track .icon-pause { display: none; }
.track.is-playing .icon-pause { display: block; }
.track.is-playing .icon-play { display: none; }

.track-meta {
    flex: 1;
    min-width: 0;
}

.track-name {
    display: block;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-sub {
    display: block;
    font-size: 0.75rem;
    color: var(--text-3);
    margin-top: 1px;
}

.version-toggle {
    display: inline-block;
    margin-top: 0.4375rem;
    padding: 0.1875rem 0.625rem;
    border: 1px solid var(--stroke);
    border-radius: 999px;
    background: none;
    color: var(--text-3);
    font-family: var(--font);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    line-height: 1.4;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.version-toggle:hover {
    color: var(--text-2);
    border-color: var(--stroke-strong);
}

.version-toggle.is-active {
    color: var(--accent);
    border-color: var(--accent);
}

.track-progress {
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.1);
    margin-top: 0.5rem;
    overflow: hidden;
    cursor: pointer;
}

.track-progress-bar {
    height: 100%;
    width: 0%;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--red), var(--pink));
    transition: width 0.1s linear;
}

.track-time {
    align-self: flex-start;
    color: var(--text-3);
    font-size: 0.8125rem;
    font-variant-numeric: tabular-nums;
}

.track-eq {
    display: none;
    align-self: flex-start;
    align-items: flex-end;
    gap: 2px;
    height: 14px;
    margin-top: 0.25rem;
}

.track.is-playing .track-eq { display: inline-flex; }
.track.is-playing .track-time { display: none; }

.track-eq i {
    width: 3px;
    height: 8px;
    border-radius: 1px;
    background: var(--pink);
}

@media (prefers-reduced-motion: no-preference) {
    .track.is-playing .track-eq i {
        animation: eq 0.9s ease-in-out infinite alternate;
    }

    .track-eq i:nth-child(2) { animation-delay: -0.3s; }
    .track-eq i:nth-child(3) { animation-delay: -0.6s; }

    @keyframes eq {
        from { height: 4px; }
        to { height: 14px; }
    }
}

/* ---------- App preview videos ---------- */

.preview-video-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.75rem;
    max-width: 780px;
    margin: 0 auto;
}

.preview-video {
    margin: 0;
    padding: 0.875rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--stroke);
    border-radius: var(--radius-l);
    box-shadow: var(--shadow-lift);
}

.preview-video video {
    width: 100%;
    aspect-ratio: 443 / 960;
    display: block;
    object-fit: cover;
    background: #000;
    border-radius: 22px;
}

.preview-video figcaption {
    margin-top: 0.875rem;
    color: var(--text-2);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.45;
    text-align: center;
}

@media (max-width: 767px) {
    .preview-video-grid {
        grid-template-columns: 1fr;
        max-width: 320px;
        gap: 1.5rem;
    }
}

/* ---------- How it works steps ---------- */

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.step-card {
    padding: 2.25rem 1.75rem;
    border-radius: var(--radius-m);
    background: var(--glass);
    border: 1px solid var(--stroke);
    text-align: center;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.step-card:hover {
    transform: translateY(-4px);
    border-color: var(--stroke-strong);
}

.step-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    margin: 0 auto 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255, 0, 46, 0.15), rgba(255, 107, 53, 0.15));
}

.step-icon svg {
    width: 28px;
    height: 28px;
    stroke: rgba(255, 255, 255, 0.85);
    stroke-width: 1.8;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.step-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.625rem;
}

.step-card p {
    margin: 0;
    color: var(--text-2);
    font-size: 1rem;
    line-height: 1.7;
}

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

/* ---------- Screenshots strip ---------- */

.shots-strip {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: min(240px, 62vw);
    gap: 1.125rem;
    overflow-x: auto;
    padding-block: 0.5rem 1.25rem;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
}

.shots-strip .screen-card {
    scroll-snap-align: start;
}

.screen-card {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 24px;
    border: 1px solid var(--stroke);
    background: var(--glass);
    box-shadow: var(--shadow-lift);
}

/* ---------- Features grid ---------- */

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.feature {
    padding: 2rem 1.75rem;
    border-radius: var(--radius-m);
    background: var(--glass);
    border: 1px solid var(--stroke);
    transition: transform 0.3s ease;
}

.feature:hover {
    transform: translateY(-3px);
}

.feature-header {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    margin-bottom: 0.75rem;
}

.feature-badge {
    width: 40px;
    height: 40px;
    flex: none;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255, 0, 46, 0.12), rgba(255, 107, 53, 0.12));
}

.feature-badge svg {
    width: 20px;
    height: 20px;
    stroke: rgba(255, 255, 255, 0.85);
    stroke-width: 1.8;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.feature h3 {
    font-size: 1.125rem;
    margin: 0;
}

.feature p {
    margin: 0;
    color: var(--text-2);
    font-size: 1rem;
    line-height: 1.7;
}

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

/* ---------- Use cases / guides teaser ---------- */

.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.use-case {
    position: relative;
    padding: 2rem 1.5rem;
    border-radius: var(--radius-m);
    text-align: center;
    background: var(--glass);
    border: 1px solid var(--stroke);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.use-case:hover {
    transform: translateY(-4px);
    border-color: var(--stroke-strong);
}

.use-case-icon {
    font-size: 2.25rem;
    line-height: 1;
    margin-bottom: 1rem;
}

.use-case h3 {
    font-size: 1.0625rem;
    margin-bottom: 0.5rem;
}

.use-case h3 a {
    color: var(--text);
}

.use-case h3 a::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
}

.use-case h3 a:hover {
    text-decoration: none;
}

.use-case p {
    margin: 0 0 0.75rem;
    color: var(--text-2);
    font-size: 0.9375rem;
    line-height: 1.65;
}

.use-case .guide-more {
    color: var(--accent);
    font-size: 0.875rem;
    font-weight: 600;
}

@media (max-width: 899px) {
    .use-cases-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 479px) {
    .use-cases-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- Guide cards (guides index and teasers) ---------- */

.guides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.guide-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    padding: 1.75rem;
    border: 1px solid var(--stroke);
    border-radius: var(--radius-m);
    background: var(--glass);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.guide-card:hover {
    transform: translateY(-4px);
    border-color: var(--stroke-strong);
}

.guide-card h3 {
    margin: 0;
    font-size: 1.125rem;
}

.guide-card h3 a {
    color: var(--text);
}

.guide-card h3 a::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
}

.guide-card h3 a:hover {
    text-decoration: none;
}

.guide-card p {
    margin: 0;
    color: var(--text-2);
    font-size: 0.9375rem;
}

.guide-card .guide-more {
    margin-top: auto;
    padding-top: 0.375rem;
    color: var(--accent);
    font-size: 0.9375rem;
    font-weight: 600;
}

/* ---------- Trust (privacy + accessibility) ---------- */

.trust-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.trust-card {
    padding: 2.25rem 2rem;
    border-radius: var(--radius-m);
    background: var(--glass);
    border: 1px solid var(--stroke);
}

.trust-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.trust-card h3 svg {
    width: 22px;
    height: 22px;
    flex: none;
    fill: none;
    stroke: var(--accent);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.trust-card p {
    color: var(--text-2);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.trust-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-2);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--stroke);
}

.trust-badge svg {
    width: 16px;
    height: 16px;
    flex: none;
    fill: none;
    stroke: var(--accent);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.badges-center {
    justify-content: center;
    max-width: 46rem;
    margin-inline: auto;
}

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

/* ---------- Made by ---------- */

.made-by-content {
    max-width: 600px;
    margin: 0 auto;
    padding: 2.25rem 2rem;
    border-radius: var(--radius-m);
    background: var(--glass);
    border: 1px solid var(--stroke);
    text-align: center;
}

.made-by-content p {
    margin: 0;
    font-size: 1.0625rem;
    color: var(--text-2);
    line-height: 1.7;
}

.made-by-content .name {
    color: var(--text);
    font-weight: 700;
}

.made-by-content .highlight {
    color: var(--accent);
}

/* ---------- FAQ ---------- */

.faq-list {
    max-width: 46rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* On the landing the FAQ list sits directly under a centered section head */
.section-head + .faq-list {
    margin-inline: auto;
}

.faq-item {
    border: 1px solid var(--stroke);
    border-radius: var(--radius-m);
    background: var(--glass);
}

.faq-item summary {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.125rem 1.375rem;
    font-weight: 600;
    font-size: 1.0313rem;
    color: var(--text);
    cursor: pointer;
    list-style: none;
    border-radius: var(--radius-m);
}

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

.faq-item summary::after {
    content: "";
    margin-left: auto;
    width: 10px;
    height: 10px;
    flex: none;
    border-right: 2px solid var(--text-3);
    border-bottom: 2px solid var(--text-3);
    transform: rotate(45deg);
    transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
    transform: rotate(-135deg);
}

.faq-item .faq-answer {
    padding: 0 1.375rem 1.25rem;
    color: var(--text-2);
}

.faq-item .faq-answer p {
    margin-bottom: 0.5em;
}

.faq-item .faq-answer p:last-child {
    margin-bottom: 0;
}

.faq-item h3 {
    display: contents;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
}

.faq-group {
    max-width: 46rem;
    margin-bottom: clamp(1.75rem, 4vw, 2.5rem);
}

.faq-group h2 {
    font-size: 1.375rem;
    margin-bottom: 0.875rem;
}

/* ---------- Prose (guides, privacy, terms) ---------- */

.prose {
    max-width: 44rem;
}

.prose h2 {
    margin-top: 2.25em;
    font-size: 1.5rem;
    padding-left: 0.875rem;
    border-left: 3px solid var(--accent);
}

.prose h3 {
    margin-top: 1.75em;
}

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

.prose ul,
.prose ol {
    padding-left: 1.375rem;
}

.prose li {
    margin-bottom: 0.375em;
}

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

.prose img {
    border-radius: var(--radius-m);
}

.prose .screen-card {
    max-width: 300px;
    margin-block: 1.5rem;
}

.page-hero {
    padding-block: clamp(3.5rem, 9vw, 5.5rem) clamp(1.5rem, 4vw, 2.5rem);
}

.page-hero h1 {
    font-size: clamp(2rem, 4.5vw, 3rem);
}

.page-hero .lead {
    max-width: 54ch;
    color: var(--text-2);
    font-size: clamp(1.125rem, 2vw, 1.25rem);
}

.breadcrumbs {
    margin-bottom: 1.5rem;
    font-size: var(--size-small);
    color: var(--text-3);
}

.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.breadcrumbs li + li::before {
    content: "/";
    margin-right: 0.375rem;
    color: var(--text-3);
}

.breadcrumbs a {
    color: var(--text-2);
}

/* ---------- Guide article extras ---------- */

.guide-steps {
    counter-reset: gstep;
    padding-left: 0 !important;
    list-style: none;
}

.guide-steps > li {
    position: relative;
    padding-left: 3rem;
    margin-bottom: 1em;
}

.guide-steps > li::before {
    counter-increment: gstep;
    content: counter(gstep);
    position: absolute;
    left: 0;
    top: 0.05em;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 0, 46, 0.18), rgba(255, 107, 53, 0.18));
    color: var(--text);
    font-weight: 800;
    font-size: 0.9375rem;
}

.related-guides {
    margin-top: clamp(2rem, 5vw, 3rem);
    padding-top: 1.75rem;
    border-top: 1px solid var(--stroke);
}

.related-guides h2 {
    font-size: 1.25rem;
    padding-left: 0;
    border-left: 0;
}

.related-guides ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.related-guides li {
    margin-bottom: 0.5em;
}

/* ---------- Press kit ---------- */

.asset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
}

.asset-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.5rem;
    border: 1px solid var(--stroke);
    border-radius: var(--radius-m);
    background: var(--glass);
}

.asset-card .asset-preview {
    display: grid;
    place-items: center;
    min-height: 120px;
    border-radius: var(--radius-s);
    background: rgba(255, 255, 255, 0.04);
    padding: 1.25rem;
}

.asset-card .asset-preview img {
    max-height: 96px;
    width: auto;
}

.asset-card h3 {
    margin: 0;
    font-size: 1.0625rem;
}

.asset-card p {
    margin: 0;
    color: var(--text-2);
    font-size: 0.875rem;
}

.asset-card .asset-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.875rem;
    margin-top: auto;
    font-size: 0.9375rem;
    font-weight: 600;
}

.press-quote {
    max-width: 44rem;
    margin: 0;
    padding: clamp(1.5rem, 4vw, 2.25rem);
    border-left: 3px solid var(--pink);
    border-radius: 0 var(--radius-m) var(--radius-m) 0;
    background: var(--glass);
}

.press-quote p {
    margin: 0 0 0.75em;
    font-size: 1.1875rem;
    line-height: 1.55;
    color: var(--text);
}

.press-quote footer {
    color: var(--text-2);
    font-size: 0.9375rem;
}

.facts-table {
    width: 100%;
    max-width: 44rem;
    border-collapse: collapse;
    font-size: 0.9843rem;
}

.facts-table th,
.facts-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--stroke);
    text-align: left;
    vertical-align: top;
}

.facts-table th {
    width: 34%;
    color: var(--text-3);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.facts-table td {
    color: var(--text-2);
}

@media (max-width: 479px) {
    .facts-table {
        table-layout: fixed;
    }

    .facts-table th,
    .facts-table td {
        padding-inline: 0.625rem;
        overflow-wrap: anywhere;
    }

    .facts-table th {
        width: 42%;
        white-space: normal;
    }
}

/* ---------- Demo video ---------- */

.demo-video {
    display: block;
    width: min(300px, 78vw);
    border-radius: 24px;
    border: 1px solid var(--stroke);
    background: #000;
    box-shadow: var(--shadow-lift);
}

/* ---------- CTA band ---------- */

.cta-band {
    position: relative;
    overflow: hidden;
    padding: clamp(3rem, 7vw, 5rem) clamp(1.5rem, 5vw, 4rem);
    border-radius: var(--radius-l);
    background:
        radial-gradient(120% 160% at 50% 130%, rgba(255, 0, 46, 0.22) 0%, rgba(255, 32, 102, 0.1) 45%, transparent 75%),
        rgba(255, 255, 255, 0.03);
    border: 1px solid var(--stroke);
    color: var(--text);
    text-align: center;
}

.cta-band h2 {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    color: inherit;
}

.cta-band p {
    max-width: 46ch;
    margin-inline: auto;
    color: var(--text-2);
}

.cta-band .badge-row {
    justify-content: center;
}

/* ---------- Footer ---------- */

.site-footer {
    position: relative;
    z-index: 1;
    margin-top: clamp(3rem, 8vw, 5rem);
    border-top: 1px solid var(--stroke);
    background: rgba(255, 255, 255, 0.02);
    font-size: 0.9375rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
    gap: 2rem;
    padding-block: 3rem 2rem;
}

.footer-brand .brand {
    margin-bottom: 0.75rem;
}

.footer-brand p {
    max-width: 30ch;
    color: var(--text-2);
    font-size: var(--size-small);
}

.footer-brand .truetapp-line {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-2);
    font-size: var(--size-small);
    font-weight: 600;
}

.footer-brand .truetapp-line img {
    width: 22px;
    height: 22px;
}

.footer-brand .truetapp-line a {
    color: var(--yellow);
}

.footer-col h3 {
    margin-bottom: 0.75rem;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-3);
}

.footer-col ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-col li {
    margin-bottom: 0.5rem;
}

.footer-col a {
    color: var(--text-2);
}

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

.footer-legal {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    align-items: center;
    padding-block: 1.25rem;
    border-top: 1px solid var(--stroke);
    color: var(--text-3);
    font-size: 0.8125rem;
}

@media (max-width: 767px) {
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}

/* ---------- 404 ---------- */

.error-page {
    display: grid;
    place-items: center;
    min-height: 55vh;
    text-align: center;
    padding-block: 4rem;
}

.error-page .error-code {
    display: block;
    font-size: clamp(4rem, 14vw, 7rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.error-page p {
    color: var(--text-2);
    max-width: 40ch;
    margin-inline: auto;
}

.error-page .hero-actions {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 1rem;
}

/* ---------- Reveal animation ---------- */

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(14px);
        animation: reveal 0.7s cubic-bezier(0.2, 0.6, 0.2, 1) forwards;
    }

    .reveal:nth-child(2) { animation-delay: 0.08s; }
    .reveal:nth-child(3) { animation-delay: 0.16s; }
    .reveal:nth-child(4) { animation-delay: 0.24s; }
    .reveal:nth-child(5) { animation-delay: 0.32s; }

    @keyframes reveal {
        to {
            opacity: 1;
            transform: none;
        }
    }
}

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

    .btn,
    .guide-card,
    .showcase-item,
    .use-case,
    .store-badge img {
        transition: none;
    }
}

/* ---------- Utilities ---------- */

.text-center { text-align: center; }
.muted { color: var(--text-2); }
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}
