/* ========================================
   Chordhaus — landing site
   Synthwave aesthetic matching the iOS app
   ======================================== */

:root {
    --bg:           #0A0418;
    --bg-card:      #1A0830;
    --bg-elevated:  #2A0F4A;
    --teal:         #5CFFE5;
    --pink:         #FF3DC8;
    --purple:       #B14BFF;
    --gold:         #FFD93D;
    --text:         #F5F0FF;
    --text-dim:     rgba(245, 240, 255, 0.6);
    --text-faint:   rgba(245, 240, 255, 0.35);
    --border:       rgba(177, 75, 255, 0.25);
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display",
                 "Helvetica Neue", Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    background-image:
        radial-gradient(ellipse at top, rgba(177, 75, 255, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse at bottom, rgba(255, 61, 200, 0.08) 0%, transparent 60%);
    background-attachment: fixed;
}

/* ── Container ────────────────────────────────────────────── */

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Top nav ──────────────────────────────────────────────── */

.nav {
    padding: 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 18px;
    letter-spacing: 0.02em;
}

.brand-logo {
    width: 32px;
    height: 32px;
    border-radius: 7px;
    background: linear-gradient(135deg, var(--teal), var(--purple), var(--pink));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--bg);
    font-weight: 900;
    box-shadow: 0 0 24px rgba(177, 75, 255, 0.4);
}

.brand-name {
    background: linear-gradient(135deg, var(--teal), var(--pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 24px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    align-items: center;
}

.nav-links a {
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--teal);
}

/* Mobiili: kompakti App Store -ikoninappi nav-linkkien tilalle */
.nav-mobile-cta {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 9px;
    color: #fff;
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: border-color 0.2s ease;
}

.nav-mobile-cta:hover {
    border-color: rgba(92, 255, 229, 0.5);
}

.nav-mobile-cta svg {
    flex-shrink: 0;
}

/* ── Hero ─────────────────────────────────────────────────── */

.hero {
    padding: 60px 0 100px;
    position: relative;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

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

.hero-device {
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1400px;
    perspective-origin: center;
}

@media (max-width: 900px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 60px;
    }
    .hero-text {
        text-align: center;
    }
    .hero {
        padding: 40px 0 60px;
    }
}

.hero-badge {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(255, 217, 61, 0.1);
    border: 1px solid rgba(255, 217, 61, 0.4);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 28px;
}

.hero-title {
    font-size: clamp(48px, 8vw, 96px);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 24px;
    background: linear-gradient(135deg, var(--teal) 0%, var(--purple) 50%, var(--pink) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 80px rgba(177, 75, 255, 0.3);
}

.hero-tagline {
    font-size: clamp(20px, 2.8vw, 28px);
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text);
    margin: 0 0 18px;
    line-height: 1.3;
}

.hero-subtitle {
    font-size: clamp(15px, 1.8vw, 18px);
    color: var(--text-dim);
    max-width: 540px;
    margin: 0 0 36px;
    font-weight: 400;
    line-height: 1.55;
}

@media (max-width: 900px) {
    .hero-tagline { margin: 0 auto 18px; max-width: 600px; }
    .hero-subtitle { margin: 0 auto 36px; }
}

/* App Store -lataus-badge — Applen design-ohjeiden tyyliä mukaileva */
.appstore-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 11px 22px 11px 18px;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    color: #fff;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.appstore-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.6),
                0 0 32px rgba(92, 255, 229, 0.15);
    border-color: rgba(92, 255, 229, 0.4);
}

.appstore-badge svg {
    flex-shrink: 0;
}

.appstore-badge-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    text-align: left;
}

.appstore-badge-small {
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.85);
}

.appstore-badge-big {
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #fff;
    margin-top: 2px;
}

/* ── Section ──────────────────────────────────────────────── */

.section {
    padding: 80px 0;
}

.section-title {
    font-size: 32px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--teal), var(--pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    text-align: center;
    color: var(--text-dim);
    font-size: 16px;
    margin-bottom: 56px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

/* ── Features grid ────────────────────────────────────────── */

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.feature {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px 28px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(177, 75, 255, 0.05) 100%);
    pointer-events: none;
}

.feature:hover {
    border-color: rgba(92, 255, 229, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 40px rgba(177, 75, 255, 0.2);
}

.feature-icon {
    display: inline-block;
    font-size: 28px;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.feature-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--teal);
    position: relative;
    z-index: 1;
}

.feature-desc {
    font-size: 14px;
    color: var(--text-dim);
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* ── iPhone frame (3D mockup) ─────────────────────────────── */

/*
 * Landscape-iPhone-mockup: tumma kehys + sisäinen näyttö johon screenshot.
 * Käyttää CSS-perspektiiviä ja rotateY:tä luomaan 3D-vinotelusta.
 * Aspect-ratio 19.5:9 vastaa iPhone 14/15/16-malleja landscapessa.
 */
.iphone-frame {
    position: relative;
    width: 100%;
    max-width: 540px;
    aspect-ratio: 19.5 / 9;
    background: linear-gradient(145deg, #1a1a1a 0%, #0a0a0a 100%);
    border-radius: 38px;
    padding: 10px;
    box-shadow:
        /* Outer rim — luo metallisen kiillon */
        inset 0 0 0 1px rgba(255, 255, 255, 0.08),
        inset 0 0 0 2px rgba(0, 0, 0, 0.5),
        /* Drop shadow */
        0 30px 80px rgba(0, 0, 0, 0.7),
        0 10px 30px rgba(177, 75, 255, 0.25);
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.iphone-tilt-right {
    transform: perspective(1400px) rotateY(-12deg) rotateX(4deg);
}

.iphone-tilt-left {
    transform: perspective(1400px) rotateY(12deg) rotateX(4deg);
}

.iphone-frame:hover {
    transform: perspective(1400px) rotateY(0deg) rotateX(0deg) scale(1.02);
}

.iphone-screen {
    width: 100%;
    height: 100%;
    background: #000;
    border-radius: 28px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.04);
}

.iphone-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Dynamic Island (notch) — vaakatasossa landscape-iPhonessa vasen reuna */
.iphone-notch {
    position: absolute;
    top: 50%;
    left: 18px;
    transform: translateY(-50%);
    width: 8px;
    height: 60px;
    background: #000;
    border-radius: 4px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    z-index: 2;
}

/* ── Sequencer showcase section ───────────────────────────── */

.sequencer-showcase {
    padding-top: 40px;
}

.sequencer-content {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 50px;
    align-items: center;
}

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

.section-title.left-align {
    text-align: left;
    margin-bottom: 16px;
}

.sequencer-desc {
    font-size: 16px;
    color: var(--text-dim);
    line-height: 1.65;
    margin-bottom: 22px;
    max-width: 480px;
}

.sequencer-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sequencer-list li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 10px;
    color: var(--text-dim);
    font-size: 15px;
    line-height: 1.5;
}

.sequencer-list li::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--teal);
    font-weight: 700;
}

.sequencer-device {
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1400px;
}

@media (max-width: 900px) {
    .sequencer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .sequencer-text {
        text-align: center;
    }
    .section-title.left-align {
        text-align: center;
    }
    .sequencer-desc {
        margin: 0 auto 22px;
    }
    .sequencer-list {
        max-width: 380px;
        margin: 0 auto;
    }
    .sequencer-list li {
        text-align: left;
    }
    /* Mobile: less aggressive tilt */
    .iphone-tilt-right,
    .iphone-tilt-left {
        transform: perspective(1400px) rotateY(-6deg) rotateX(2deg);
    }
}

/* ── How it works (3 steps) ───────────────────────────────── */

.how-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.how-step {
    text-align: center;
    padding: 24px 20px;
    position: relative;
}

.how-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--teal), var(--purple));
    color: var(--bg);
    font-weight: 900;
    font-size: 20px;
    margin-bottom: 18px;
    box-shadow: 0 0 24px rgba(92, 255, 229, 0.4);
}

.how-step-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--teal);
    margin-bottom: 10px;
}

.how-step-desc {
    font-size: 14px;
    color: var(--text-dim);
    line-height: 1.6;
}

.how-footnote {
    text-align: center;
    color: var(--text-faint);
    font-size: 14px;
    margin-top: 24px;
}

.how-footnote a {
    color: var(--teal);
    text-decoration: none;
    border-bottom: 1px solid rgba(92, 255, 229, 0.3);
    transition: border-color 0.2s ease;
}

.how-footnote a:hover {
    border-bottom-color: var(--teal);
}

/* ── Closing CTA — Start writing ──────────────────────────── */

.closing-cta {
    padding: 60px 0 80px;
}

.closing-card {
    text-align: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 64px 32px;
    position: relative;
    overflow: hidden;
}

.closing-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center,
                rgba(177, 75, 255, 0.12) 0%,
                transparent 70%);
    pointer-events: none;
}

.closing-title {
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 900;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--teal), var(--purple), var(--pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
    position: relative;
    z-index: 1;
}

.closing-desc {
    color: var(--text-dim);
    margin-bottom: 32px;
    font-size: 16px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.closing-card .appstore-badge {
    position: relative;
    z-index: 1;
}

/* ── Email signup (säilytetty mahdollista myöhempää käyttöä varten) ── */

.signup {
    text-align: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 56px 24px;
    margin: 40px 0;
    position: relative;
    overflow: hidden;
}

.signup::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(255, 61, 200, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.signup-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--text);
    position: relative;
    z-index: 1;
}

.signup-subtitle {
    color: var(--text-dim);
    margin-bottom: 28px;
    position: relative;
    z-index: 1;
}

.signup-form {
    display: flex;
    gap: 8px;
    max-width: 460px;
    margin: 0 auto;
    flex-wrap: wrap;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.signup-input {
    flex: 1;
    min-width: 240px;
    padding: 14px 18px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.signup-input:focus {
    outline: none;
    border-color: var(--teal);
}

.signup-input::placeholder {
    color: var(--text-faint);
}

.signup-button {
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--teal), var(--purple));
    border: none;
    border-radius: 10px;
    color: var(--bg);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.signup-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(92, 255, 229, 0.4);
}

.signup-note {
    font-size: 12px;
    color: var(--text-faint);
    margin-top: 16px;
    position: relative;
    z-index: 1;
}

/* ── Footer ───────────────────────────────────────────────── */

.footer {
    border-top: 1px solid var(--border);
    padding: 40px 0;
    margin-top: 60px;
    text-align: center;
}

.footer-links {
    display: flex;
    gap: 28px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--teal);
}

.footer-copy {
    font-size: 12px;
    color: var(--text-faint);
}

/* ── Sub-pages (privacy / support) ────────────────────────── */

.page {
    padding: 60px 0 80px;
    max-width: 760px;
    margin: 0 auto;
}

.page-title {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--teal), var(--pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-meta {
    color: var(--text-faint);
    font-size: 13px;
    margin-bottom: 40px;
}

.page h2 {
    font-size: 22px;
    font-weight: 700;
    margin-top: 36px;
    margin-bottom: 12px;
    color: var(--text);
}

.page h3 {
    font-size: 17px;
    font-weight: 700;
    margin-top: 24px;
    margin-bottom: 8px;
    color: var(--teal);
}

.page p, .page li {
    color: var(--text-dim);
    margin-bottom: 14px;
    font-size: 16px;
    line-height: 1.65;
}

.page ul {
    padding-left: 24px;
    margin-bottom: 14px;
}

.page a {
    color: var(--teal);
    text-decoration: none;
    border-bottom: 1px solid rgba(92, 255, 229, 0.3);
    transition: border-color 0.2s ease;
}

.page a:hover {
    border-bottom-color: var(--teal);
}

/* ── Responsive ───────────────────────────────────────────── */

@media (max-width: 720px) {
    /* Nav: piilota in-page-linkit, näytä App Store -ikoninappi */
    .nav-links {
        display: none;
    }
    .nav-mobile-cta {
        display: inline-flex;
    }

    /* Features: 2 saraketta puhelimessa, kompaktimpi sisältö */
    .features {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .feature {
        padding: 20px 16px;
    }
    .feature-icon {
        font-size: 22px;
        margin-bottom: 10px;
    }
    .feature-title {
        font-size: 15px;
        margin-bottom: 6px;
    }
    .feature-desc {
        font-size: 12.5px;
        line-height: 1.5;
    }

    /* Hero: kevyemmin paddingia */
    .hero {
        padding: 40px 0 60px;
    }
    .section {
        padding: 50px 0;
    }
}

@media (max-width: 380px) {
    /* Hyvin kapea näyttö: pienennä reunoja vielä */
    .container {
        padding: 0 16px;
    }
    .feature {
        padding: 16px 12px;
    }
}
