/* ═══════════════════════════════════════════════════════════════════
   KeyFall Piano — coming-soon promo page
   Single-file CSS. Matches the app's dark/purple/amber aesthetic.
   ═══════════════════════════════════════════════════════════════════ */

:root {
    /* Surfaces */
    --bg-deep:        #0a0b11;
    --bg-base:        #0d0e14;
    --bg-raised:      #14161f;
    --bg-card:        #1a1d26;
    --bg-card-hover:  #20232e;

    /* Strokes */
    --stroke-soft:    rgba(255, 255, 255, 0.06);
    --stroke-mid:     rgba(255, 255, 255, 0.12);
    --stroke-strong:  rgba(255, 255, 255, 0.22);

    /* Brand */
    --purple:         #b478ff;
    --purple-dim:     #8b5fd4;
    --amber:          #ffd166;
    --amber-dim:      #d9aa3e;
    --teal:           #4ecdc4;
    --pink:           #ff7eb6;
    --orange:         #ff9f43;
    --blue:           #4d96ff;

    /* Text */
    --text-hi:        #f5f7fc;
    --text:           #cdd2dd;
    --text-mid:       #8e95a5;
    --text-dim:       #6a7080;

    /* Type */
    --font-sans:      'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --font-serif:     'Playfair Display', Georgia, serif;

    /* Layout */
    --content-max:    1240px;
    --shadow-lg:      0 24px 60px rgba(0, 0, 0, 0.5);
    --shadow-md:      0 12px 28px rgba(0, 0, 0, 0.35);
    --radius-lg:      18px;
    --radius-md:      12px;
    --radius-sm:      8px;
}

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

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

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

button, input { font-family: inherit; }

/* ═══════════════════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════════════════ */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 24px 40px;
    overflow: hidden;
}

/* Atmospheric background — radial gradients suggest the app's
   purple/amber palette without competing with content. */
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(ellipse at 20% 10%, rgba(180, 120, 255, 0.20) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(255, 209, 102, 0.13) 0%, transparent 55%),
        radial-gradient(ellipse at 50% 50%, rgba(78, 205, 196, 0.06) 0%, transparent 60%),
        linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-base) 100%);
}
.hero-bg::after {
    /* Subtle grain texture for richness */
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
    opacity: 0.03;
    mix-blend-mode: overlay;
    pointer-events: none;
}

.hero-inner {
    position: relative;
    z-index: 1;
    max-width: 820px;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}
.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--stroke-mid);
}
.brand-name {
    font-family: var(--font-sans);
    font-weight: 800;
    font-size: 22px;
    letter-spacing: -0.02em;
    color: var(--text-hi);
}
.brand-name-dim { color: var(--text-mid); font-weight: 500; }

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(180, 120, 255, 0.10);
    border: 1px solid rgba(180, 120, 255, 0.30);
    border-radius: 999px;
    color: var(--purple);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--purple);
    box-shadow: 0 0 0 0 rgba(180, 120, 255, 0.7);
    animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(180, 120, 255, 0.7); }
    70% { box-shadow: 0 0 0 12px rgba(180, 120, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(180, 120, 255, 0); }
}

.hero-title {
    font-family: var(--font-sans);
    font-weight: 800;
    font-size: clamp(38px, 6.5vw, 76px);
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--text-hi);
    max-width: 14ch;
}
.hero-title em {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 500;
    background: linear-gradient(135deg, var(--purple) 0%, var(--amber) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.01em;
}

.hero-sub {
    font-size: clamp(16px, 1.6vw, 18px);
    line-height: 1.65;
    color: var(--text);
    max-width: 56ch;
}

.email-form {
    display: flex;
    align-items: stretch;
    gap: 8px;
    width: 100%;
    max-width: 460px;
    padding: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--stroke-mid);
    border-radius: 12px;
    transition: border-color 0.2s, background 0.2s;
}
.email-form:focus-within {
    border-color: rgba(180, 120, 255, 0.5);
    background: rgba(180, 120, 255, 0.04);
    box-shadow: 0 0 0 4px rgba(180, 120, 255, 0.08);
}
.email-form input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    padding: 10px 14px;
    color: var(--text-hi);
    font-size: 15px;
}
.email-form input::placeholder { color: var(--text-dim); }
.email-form button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: linear-gradient(135deg, var(--purple) 0%, var(--purple-dim) 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
    white-space: nowrap;
}
.email-form button:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
    box-shadow: 0 8px 20px rgba(180, 120, 255, 0.32);
}
.email-form button:active { transform: translateY(0); }

.micro-note {
    font-size: 12.5px;
    color: var(--text-dim);
    letter-spacing: 0.02em;
}

.hero-scroll {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--text-mid);
    text-decoration: none;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
    opacity: 0.75;
    transition: opacity 0.2s, transform 0.3s;
}
.hero-scroll:hover { opacity: 1; color: var(--text-hi); }
.hero-scroll svg { animation: floatDown 2.2s ease-in-out infinite; }
@keyframes floatDown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

/* ═══════════════════════════════════════════════════════════════════
   SHOWCASE REEL
   ═══════════════════════════════════════════════════════════════════ */

.showcase {
    padding: 100px 24px 100px;
    background: var(--bg-base);
    position: relative;
}
.showcase::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(180, 120, 255, 0.08) 0%, transparent 50%);
    pointer-events: none;
}
/* Alternate showcase — second reel gets a subtly different background
   so the two stages read as distinct moments rather than one giant slab. */
.showcase-alt {
    background: var(--bg-deep);
}
.showcase-alt::before {
    background: radial-gradient(ellipse at 50% 0%, rgba(255, 209, 102, 0.07) 0%, transparent 50%);
}
.showcase-inner {
    position: relative;
    max-width: var(--content-max);
    margin: 0 auto;
}

/* Section header above each reel — eyebrow + headline. Keeps the two
   carousels labelled and gives the page rhythm. */
.section-header {
    margin-bottom: 40px;
    text-align: center;
}
.section-header .section-eyebrow { margin-bottom: 14px; }
.section-header .section-h {
    max-width: none;
    margin: 0 auto;
}
.section-header .section-h em {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 500;
    background: linear-gradient(135deg, var(--purple) 0%, var(--amber) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
/* Amber eyebrow variant for the second (studio) reel — visually pairs
   with the warmer background tint. */
.eyebrow-amber { color: var(--amber); }

.reel { display: flex; flex-direction: column; gap: 28px; }

.reel-stage {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--bg-card);
    border: 1px solid var(--stroke-mid);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    cursor: grab;
}
.reel-stage:active { cursor: grabbing; }

.reel-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}
.reel-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    position: relative;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
}
.reel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.reel-slide.placeholder {
    background:
        linear-gradient(135deg, rgba(180, 120, 255, 0.08) 0%, rgba(255, 209, 102, 0.06) 100%),
        var(--bg-card);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-mid);
    padding: 32px;
    gap: 12px;
}
.reel-slide.placeholder .ph-num {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 56px;
    color: var(--text-dim);
    line-height: 1;
}
.reel-slide.placeholder .ph-label {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-mid);
}
.reel-slide.placeholder .ph-hint {
    font-size: 12px;
    color: var(--text-dim);
    font-style: italic;
    max-width: 32ch;
}

.reel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(13, 14, 20, 0.7);
    backdrop-filter: blur(8px);
    border: 1px solid var(--stroke-mid);
    border-radius: 50%;
    color: var(--text-hi);
    cursor: pointer;
    transition: background 0.15s, transform 0.15s, border-color 0.15s;
}
.reel-arrow:hover {
    background: rgba(180, 120, 255, 0.25);
    border-color: rgba(180, 120, 255, 0.5);
    transform: translateY(-50%) scale(1.05);
}
.reel-prev { left: 16px; }
.reel-next { right: 16px; }

/* Caption overlays the bottom portion of the stage with a gradient fade
   so the image and the caption are visible together — no scrolling
   needed to read what's on screen. Sits inside .reel-stage, absolutely
   positioned across the bottom. */
.reel-caption-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 28px 32px 28px;
    background: linear-gradient(
        180deg,
        rgba(10, 11, 17, 0) 0%,
        rgba(10, 11, 17, 0.72) 55%,
        rgba(10, 11, 17, 0.92) 100%
    );
    pointer-events: none;            /* let clicks pass through to the image */
}
.reel-caption {
    max-width: 70ch;
    pointer-events: auto;            /* caption itself is selectable */
}
.reel-eyebrow {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--purple);
    margin-bottom: 8px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}
.reel-title {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: clamp(20px, 2.4vw, 28px);
    letter-spacing: -0.02em;
    color: var(--text-hi);
    line-height: 1.2;
    margin-bottom: 8px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s;
}
.reel-desc {
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--text);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s;
}
.reel-caption.fading .reel-title,
.reel-caption.fading .reel-desc { opacity: 0; }

/* Dots live in their own row underneath the stage. */
.reel-dots-row {
    display: flex;
    justify-content: center;
    margin-top: 4px;
}
.reel-dots {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    padding-bottom: 4px;
}
.reel-dot {
    width: 8px;
    height: 8px;
    border: none;
    background: var(--stroke-strong);
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    transition: background 0.18s, transform 0.18s, width 0.25s;
}
.reel-dot:hover { background: var(--text-dim); }
.reel-dot.active {
    width: 28px;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--purple), var(--amber));
}

/* ═══════════════════════════════════════════════════════════════════
   FEATURES
   ═══════════════════════════════════════════════════════════════════ */

.features {
    padding: 120px 24px;
    background: var(--bg-deep);
}
.features-inner {
    max-width: var(--content-max);
    margin: 0 auto;
}

.section-eyebrow {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--amber);
    margin-bottom: 12px;
}
.section-h {
    font-family: var(--font-sans);
    font-weight: 800;
    font-size: clamp(32px, 4vw, 48px);
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--text-hi);
    margin-bottom: 48px;
    max-width: 22ch;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}
.feature-card {
    padding: 26px 24px 24px;
    background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-raised) 100%);
    border: 1px solid var(--stroke-mid);
    border-radius: var(--radius-md);
    transition: border-color 0.2s, transform 0.2s, background 0.2s;
}
.feature-card:hover {
    border-color: var(--stroke-strong);
    transform: translateY(-2px);
    background: linear-gradient(180deg, var(--bg-card-hover) 0%, var(--bg-card) 100%);
}
.feature-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}
.feature-icon[data-tint="purple"]  { background: rgba(180, 120, 255, 0.15); color: var(--purple); }
.feature-icon[data-tint="amber"]   { background: rgba(255, 209, 102, 0.15); color: var(--amber); }
.feature-icon[data-tint="teal"]    { background: rgba(78, 205, 196, 0.15); color: var(--teal); }
.feature-icon[data-tint="pink"]    { background: rgba(255, 126, 182, 0.15); color: var(--pink); }
.feature-card h3 {
    font-family: var(--font-sans);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-hi);
    margin-bottom: 8px;
}
.feature-card p {
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--text);
}

/* ═══════════════════════════════════════════════════════════════════
   CTA STRIP — second email-capture moment
   ═══════════════════════════════════════════════════════════════════ */

.cta-strip {
    padding: 100px 24px;
    background: linear-gradient(135deg, rgba(180, 120, 255, 0.08) 0%, rgba(255, 209, 102, 0.04) 100%), var(--bg-deep);
    border-top: 1px solid var(--stroke-soft);
    border-bottom: 1px solid var(--stroke-soft);
    text-align: center;
}
.cta-inner {
    max-width: 580px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}
.cta-h {
    font-family: var(--font-sans);
    font-weight: 800;
    font-size: clamp(28px, 3.4vw, 42px);
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--text-hi);
}
.cta-sub {
    font-size: 15px;
    color: var(--text);
    margin-bottom: 8px;
}

/* ═══════════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════════ */

.site-footer {
    padding: 56px 24px 40px;
    background: var(--bg-deep);
    border-top: 1px solid var(--stroke-soft);
}
.footer-inner {
    max-width: var(--content-max);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}
.footer-tagline {
    font-size: 13px;
    color: var(--text-dim);
    margin-top: 4px;
}
.footer-meta { font-size: 13px; color: var(--text-dim); }

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 720px) {
    .hero { padding: 60px 20px 40px; }
    /* On narrow screens, give the caption overlay tighter padding and
       slightly smaller text so it doesn't drown out the image. */
    .reel-caption-overlay { padding: 18px 16px 16px; }
    .reel-title { font-size: 18px; margin-bottom: 6px; }
    .reel-desc { font-size: 13px; line-height: 1.45; }
    .reel-arrow { width: 40px; height: 40px; }
    .reel-prev { left: 8px; }
    .reel-next { right: 8px; }
    .features, .showcase, .cta-strip { padding-left: 20px; padding-right: 20px; }
    .footer-inner { flex-direction: column; align-items: flex-start; }
    .email-form { flex-direction: column; }
    .email-form button { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}
