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

:root {
    --bg:        #080C10;
    --surface:   #111923;
    --surface-2: #1B2732;
    --accent:    #5B9BD5;
    --green:     #4CAF50;
    --text:      #E8F0F8;
    --muted:     #6B8299;
    --border:    rgba(91,155,213,0.13);
}

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ── SKIP LINK (accessibility) ─────────────────────── */
.skip-link {
    position: absolute;
    top: -999px;
    left: 0;
    padding: 8px 16px;
    background: var(--accent);
    color: #fff;
    font-size: 0.875rem;
    border-radius: 0 0 6px 6px;
    z-index: 9999;
    text-decoration: none;
}
.skip-link:focus { top: 0; }

/* ── NOISE OVERLAY ─────────────────────────────────── */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 999;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    opacity: 1;
}

/* ── NAV ───────────────────────────────────────────── */
nav {
    position: fixed;
    inset: 0 0 auto;
    z-index: 100;
    height: calc(62px + env(safe-area-inset-top));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: env(safe-area-inset-top) clamp(20px, 5vw, 40px) 0;
    background: rgba(8,12,16,0.82);
    backdrop-filter: blur(20px) saturate(150%);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    max-width: 1100px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 800;
    font-size: 21px;
    letter-spacing: -0.4px;
    color: var(--text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 10px rgba(91,155,213,0.3);
}

.logo span { color: var(--accent); }

.nav-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 20px;
    border-radius: 50px;
    background: var(--accent);
    color: #fff;
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
    transition: background .2s, transform .15s, box-shadow .2s;
    white-space: nowrap;
}

.nav-pill:hover {
    background: #74AEDD;
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(91,155,213,0.35);
}

.nav-pill svg { flex-shrink: 0; }

/* ── HERO ──────────────────────────────────────────── */
.hero {
    min-height: 100svh;
    padding: calc(62px + env(safe-area-inset-top)) clamp(24px, 5vw, 72px) clamp(48px, 6vw, 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-inner {
    max-width: 1100px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    position: relative;
    z-index: 1;
}

/* ambient glow blobs */
.hero-glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-glow::before {
    content: '';
    position: absolute;
    width: 700px;
    height: 700px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(91,155,213,0.07) 0%, transparent 65%);
    top: 50%;
    right: 5%;
    transform: translate(0, -50%);
}

.hero-glow::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(76,175,80,0.05) 0%, transparent 65%);
    top: 20%;
    left: 0;
    transform: translate(-30%, 0);
}

/* subtle dot grid */
.hero-dots {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: radial-gradient(rgba(91,155,213,0.12) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: radial-gradient(ellipse 70% 80% at 70% 50%, black 20%, transparent 70%);
}

/* ── HERO LEFT ─── */
.hero-left {
    position: relative;
    z-index: 1;
    padding: clamp(40px, 5vw, 60px) 0;
    display: flex;
    flex-direction: column;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hero-tag {
    font-family: 'Space Mono', monospace;
    font-size: 10.5px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 22px;
    opacity: 0;
    animation: fadeUp .55s .15s forwards;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-tag::before {
    content: '';
    display: block;
    width: 28px;
    height: 1px;
    background: var(--accent);
}

.hero-h1 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 800;
    font-size: clamp(36px, 4.5vw, 64px);
    line-height: 1.0;
    letter-spacing: -2px;
    color: var(--text);
    margin-bottom: 28px;
    opacity: 0;
    animation: fadeUp .6s .3s forwards;
}

.hero-h1 .hl {
    background: linear-gradient(135deg, var(--accent) 0%, #8ecfff 60%, var(--green) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    font-size: clamp(15px, 1.7vw, 18px);
    line-height: 1.75;
    color: var(--muted);
    max-width: 420px;
    margin-bottom: 44px;
    font-weight: 300;
    opacity: 0;
    animation: fadeUp .6s .45s forwards;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeUp .6s .6s forwards;
}

.btn-fill {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 14px 26px;
    border-radius: 12px;
    background: var(--accent);
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: background .2s, transform .15s, box-shadow .2s;
}

.btn-fill:hover {
    background: #74AEDD;
    transform: translateY(-2px);
    box-shadow: 0 10px 36px rgba(91,155,213,0.32);
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 26px;
    border-radius: 12px;
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 15px;
    font-weight: 400;
    text-decoration: none;
    transition: border-color .2s, color .2s, transform .15s;
}

.btn-ghost:hover {
    border-color: rgba(91,155,213,0.38);
    color: var(--text);
    transform: translateY(-2px);
}

/* ── HERO RIGHT / KEY GRID ─── */
.hero-right {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(40px, 5vw, 60px) 0;
}

.key-grid-wrap {
    width: 100%;
    max-width: 430px;
    transform: rotate(-4deg) translateY(-10px);
    transform-origin: center center;
}

.key-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 11px;
}

.key-card {
    aspect-ratio: 1;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    will-change: transform;
    --c: #5B9BD5;
    background: linear-gradient(160deg,
    rgba(255,255,255,0.06) 0%,
    transparent 40%
    ), color-mix(in srgb, var(--c) 18%, #111923);
    border: 1px solid color-mix(in srgb, var(--c) 32%, transparent);
    box-shadow:
    0 2px 0 rgba(255,255,255,0.04) inset,
    0 6px 24px color-mix(in srgb, var(--c) 14%, transparent),
    0 1px 3px rgba(0,0,0,0.5);
    transition:
    transform .1s cubic-bezier(.34,1.56,.64,1),
    box-shadow .15s ease;
    opacity: 0;
}

@keyframes keyIn {
    from { opacity: 0; transform: translateY(20px) scale(0.88); }
    to   { opacity: 1; transform: none; }
}

.key-card.pressed,
.key-card:active {
    transform: translateY(3px) scale(.96) !important;
    box-shadow:
    0 1px 0 rgba(255,255,255,0.03) inset,
    0 2px 8px color-mix(in srgb, var(--c) 18%, transparent),
    0 0 28px color-mix(in srgb, var(--c) 38%, transparent) !important;
}

.key-card:hover:not(.pressed) {
    transform: translateY(-3px) scale(1.02);
    box-shadow:
    0 2px 0 rgba(255,255,255,0.06) inset,
    0 10px 32px color-mix(in srgb, var(--c) 24%, transparent),
    0 1px 3px rgba(0,0,0,0.5);
}

.key-letter {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: clamp(22px, 2.8vw, 30px);
    color: #fff;
    line-height: 1;
    text-shadow: 0 1px 6px rgba(0,0,0,.5);
}

.key-name {
    font-family: 'DM Sans', sans-serif;
    font-size: clamp(9px, .9vw, 11px);
    color: rgba(255,255,255,0.52);
    margin-top: 5px;
    font-weight: 400;
}

/* ── KEYBOARD SECTION ──────────────────────────────── */
.kbd-section {
    margin-top: 20px;
    opacity: 0;
    animation: fadeUp .55s 1.9s forwards;
    width: 100%;
    max-width: 430px;
    margin-left: auto;
    margin-right: auto;
}

.kbd-bridge {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 11px;
    padding: 0 6px;
}

.kbd-bridge-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(91,155,213,0.22), transparent);
}

.kbd-bridge-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Space Mono', monospace;
    font-size: 9.5px;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--muted);
    white-space: nowrap;
}

.kbd-svg {
    width: 100%;
    max-width: 262px;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 6px 22px rgba(91,155,213,0.1));
}

/* ── SECTION SHARED ────────────────────────────────── */
.section-tag {
    font-family: 'Space Mono', monospace;
    font-size: 10.5px;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.section-tag::before {
    content: '';
    display: block;
    width: 22px;
    height: 1px;
    background: var(--accent);
}

.section-h {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 700;
    font-size: clamp(24px, 2.8vw, 38px);
    letter-spacing: -1px;
    line-height: 1.05;
    margin-bottom: 52px;
}

/* scroll-reveal base */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .55s ease, transform .55s ease;
}

.reveal.visible {
    opacity: 1;
    transform: none;
}

/* ── FEATURES ──────────────────────────────────────── */
.features {
    padding: clamp(80px, 11vw, 140px) clamp(24px, 5vw, 72px);
    position: relative;
}

.features::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, var(--surface) 8%, var(--surface) 92%, transparent 100%);
    z-index: 0;
}

/* ghost key motif in background */
.features::after {
    content: 'CTUNES';
    position: absolute;
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: clamp(80px, 12vw, 160px);
    letter-spacing: -4px;
    color: rgba(91,155,213,0.028);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    white-space: nowrap;
    z-index: 0;
}

.features-inner {
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.feat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.feat-card {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px 26px 28px;
    position: relative;
    overflow: hidden;
    transition: border-color .25s, transform .25s;
}

.feat-card::after {
    content: attr(data-glyph);
    position: absolute;
    bottom: -14px;
    right: 12px;
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: 88px;
    color: rgba(91,155,213,0.045);
    line-height: 1;
    pointer-events: none;
}

.feat-card:hover {
    border-color: rgba(91,155,213,0.28);
    transform: translateY(-5px);
}

.feat-icon {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    background: rgba(91,155,213,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
    border: 1px solid rgba(91,155,213,0.15);
    color: var(--accent);
    flex-shrink: 0;
}

.feat-title {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -.3px;
    margin-bottom: 10px;
    color: var(--text);
}

.feat-desc {
    font-size: 14px;
    line-height: 1.7;
    color: var(--muted);
    font-weight: 300;
}

/* ── HOW IT WORKS ──────────────────────────────────── */
.how {
    padding: clamp(80px, 11vw, 140px) clamp(24px, 5vw, 72px);
    position: relative;
}

.how-inner {
    max-width: 1100px;
    margin: 0 auto;
}

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

.step {
    padding: 0 40px 0 0;
    position: relative;
}

.step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 64px;
    right: 20px;
    width: 1px;
    height: 60px;
    background: linear-gradient(180deg, var(--border) 0%, transparent 100%);
}

.step-num {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 800;
    font-size: clamp(52px, 6vw, 88px);
    line-height: .9;
    letter-spacing: -4px;
    display: block;
    margin-bottom: 20px;
    background: linear-gradient(135deg,
    rgba(91,155,213,0.28) 0%,
    rgba(76,175,80,0.14) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.step-title {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 700;
    font-size: clamp(20px, 2.2vw, 26px);
    letter-spacing: -.4px;
    margin-bottom: 12px;
    color: var(--text);
}

.step-desc {
    font-size: 14.5px;
    line-height: 1.72;
    color: var(--muted);
    font-weight: 300;
    max-width: 280px;
}

/* ── DOWNLOAD ──────────────────────────────────────── */
.download {
    padding: clamp(80px, 11vw, 140px) clamp(24px, 5vw, 72px);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.dl-glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(ellipse 55% 70% at 50% 50%, rgba(91,155,213,0.07) 0%, transparent 65%);
}

/* mini key strip decoration */
.dl-keys {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    opacity: .18;
    pointer-events: none;
}

.dl-key {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid currentColor;
}

.download-inner {
    position: relative;
    z-index: 1;
    max-width: 560px;
    margin: 0 auto;
}

.download-inner h2 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 800;
    font-size: clamp(32px, 4vw, 54px);
    letter-spacing: -2px;
    line-height: .96;
    margin-bottom: 20px;
}

.download-inner p {
    font-size: 16px;
    color: var(--muted);
    margin-bottom: 44px;
    font-weight: 300;
}

.play-btn {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    padding: 18px 36px;
    border-radius: 18px;
    border: 1px solid rgba(76,175,80,0.25);
    background: var(--surface-2);
    text-decoration: none;
    color: var(--text);
    transition: border-color .2s, transform .2s, box-shadow .2s;
}

.play-btn:hover {
    border-color: rgba(76,175,80,0.5);
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(76,175,80,0.14);
}

.play-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.play-text { text-align: left; }

.play-text small {
    display: block;
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 3px;
}

.play-text strong {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -.4px;
}

/* ── FOOTER ────────────────────────────────────────── */
footer {
    padding: 28px clamp(20px, 5vw, 40px);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: center;
}

.footer-inner {
    max-width: 1100px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-logo {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 800;
    font-size: 16px;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -.3px;
}

.footer-logo span { color: var(--accent); }

footer small {
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    color: var(--muted);
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 18px;
}

.footer-links a {
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s;
}
.footer-links a:hover { color: var(--accent); }

/* ── DIVIDER ───────────────────────────────────────── */
.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border) 30%, var(--border) 70%, transparent);
    max-width: 1100px;
    margin: 0 auto;
}

/* ── RESPONSIVE ────────────────────────────────────── */
@media (max-width: 860px) {
    .hero-inner {
    grid-template-columns: 1fr;
    }

    .hero-left { padding: 32px 0 0; }

    .hero-right {
    padding: 0 0 32px;
    width: 100%;
    }

    .key-grid-wrap {
    transform: none;
    max-width: 360px;
    width: 100%;
    }

    .kbd-section {
    max-width: 360px;
    width: 100%;
    margin-top: 20px;
    }

    .kbd-svg { max-width: 280px; }

    .steps {
    grid-template-columns: 1fr;
    gap: 48px;
    }

    .step:not(:last-child)::after { display: none; }
    .step { padding: 0; }
}

@media (max-width: 520px) {
    .hero-h1 { letter-spacing: -1px; }
    .key-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; }
    .feat-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 360px) {
    .feat-grid { grid-template-columns: 1fr; }
    .hero-actions { flex-direction: column; }
    .btn-fill, .btn-ghost { justify-content: center; }
}
