/* ============================================================
   Green Martini — Push to Main
   Mobile-first stylesheet. Dark base so the sunset palette and
   the signature green accent glow.
   ============================================================ */

/* ---------- Self-hosted fonts (no third-party request) ---------- */
@font-face {
    font-family: "Space Grotesk";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("assets/fonts/space-grotesk-500.woff2") format("woff2");
}
@font-face {
    font-family: "Space Grotesk";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("assets/fonts/space-grotesk-700.woff2") format("woff2");
}
@font-face {
    font-family: "IBM Plex Sans";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("assets/fonts/ibm-plex-sans-400.woff2") format("woff2");
}
@font-face {
    font-family: "IBM Plex Sans";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("assets/fonts/ibm-plex-sans-600.woff2") format("woff2");
}

/* ---------- Design tokens ---------- */
:root {
    /* base */
    --bg: #080b14;
    --bg-2: #0c1120;
    --ink: #eef1f8; /* primary text — AA on --bg */
    --ink-soft: #b9c1d6; /* secondary text */
    --ink-faint: #8b93ab;

    /* signature green-martini green (accent: buttons, links, highlights) */
    --green: #2bffb0;
    --green-deep: #12c98a;
    --green-ink: #04130d; /* text on green fills */

    /* sunset golds + amber */
    --gold: #ffc66b;
    --amber: #ff9d57;

    /* teal -> deep ocean blue */
    --teal: #46c9d6;
    --ocean: #143a63;

    /* secondary accent: lavender / purple (echoes the hair) */
    --lavender: #b89cf0;

    /* surfaces */
    --surface: rgba(255, 255, 255, 0.04);
    --surface-line: rgba(255, 255, 255, 0.12);
    --focus: var(--green);

    /* type */
    --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
    --font-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;

    /* rhythm */
    --maxw: 1180px;
    --pad: clamp(1.25rem, 5vw, 4rem);
    --section-y: clamp(4.5rem, 12vw, 9rem);
    --radius: 14px;
}

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

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

body {
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6;
    font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img {
    max-width: 100%;
    display: block;
    height: auto;
}

a {
    color: var(--green);
    text-decoration: none;
}
a:hover {
    color: #67ffc8;
}

em {
    font-style: italic;
}

/* ---------- Accessibility helpers ---------- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: 50%;
    top: -4rem;
    transform: translateX(-50%);
    z-index: 100;
    background: var(--green);
    color: var(--green-ink);
    padding: 0.6rem 1.1rem;
    border-radius: 0 0 10px 10px;
    font-weight: 600;
    transition: top 0.2s ease;
}
.skip-link:focus {
    top: 0;
}

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

/* ============================================================
   Atmosphere — gradient mesh + soft grain + slow drift
   ============================================================ */
.atmosphere {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: var(--bg);
}

.mesh {
    position: absolute;
    inset: -25%;
    background:
        radial-gradient(
            38% 38% at 18% 20%,
            rgba(43, 255, 176, 0.16),
            transparent 70%
        ),
        radial-gradient(
            46% 46% at 82% 28%,
            rgba(184, 156, 240, 0.18),
            transparent 72%
        ),
        radial-gradient(
            60% 55% at 75% 88%,
            rgba(255, 157, 87, 0.2),
            transparent 70%
        ),
        radial-gradient(
            55% 55% at 25% 92%,
            rgba(20, 58, 99, 0.55),
            transparent 75%
        ),
        radial-gradient(
            50% 40% at 50% 50%,
            rgba(255, 198, 107, 0.08),
            transparent 80%
        );
    filter: blur(28px) saturate(118%);
    animation: meshDrift 36s ease-in-out infinite alternate;
    will-change: transform;
}

@keyframes meshDrift {
    0% {
        transform: translate3d(-2%, -1%, 0) scale(1.04) rotate(0deg);
    }
    50% {
        transform: translate3d(2%, 1.5%, 0) scale(1.12) rotate(1.5deg);
    }
    100% {
        transform: translate3d(-1%, 2%, 0) scale(1.06) rotate(-1deg);
    }
}

/* soft film grain via inline SVG turbulence — tiny, no extra request */
.grain {
    position: absolute;
    inset: 0;
    opacity: 0.06;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%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)'/%3E%3C/svg%3E");
    background-size: 220px 220px;
}

/* ============================================================
   Layout primitives
   ============================================================ */
main {
    position: relative;
}

.section {
    padding-block: var(--section-y);
    padding-inline: var(--pad);
}

.section__inner {
    width: 100%;
    max-width: var(--maxw);
    margin-inline: auto;
}

.section__title {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.01em;
    font-size: clamp(1.7rem, 1.2rem + 2.6vw, 3rem);
    margin-bottom: 1.5rem;
    text-wrap: balance;
}
.section__title em {
    color: var(--green);
    font-style: normal;
}

.eyebrow {
    font-family: var(--font-display);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.28em;
    font-size: 0.78rem;
    color: var(--lavender);
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.01em;
    padding: 0.95rem 1.6rem;
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: pointer;
    transition:
        transform 0.18s ease,
        box-shadow 0.25s ease,
        background 0.2s ease;
    white-space: nowrap;
}
.btn--primary {
    background: linear-gradient(135deg, var(--green), var(--green-deep));
    color: var(--green-ink);
}
.btn--primary:hover {
    color: var(--green-ink);
    transform: translateY(-2px);
}
.btn:active {
    transform: translateY(0);
}

/* gentle glow pulse on CTAs */
.glow {
    box-shadow:
        0 0 0 rgba(43, 255, 176, 0),
        0 8px 30px rgba(43, 255, 176, 0.25);
    animation: glowPulse 3.6s ease-in-out infinite;
}
@keyframes glowPulse {
    0%,
    100% {
        box-shadow: 0 8px 26px rgba(43, 255, 176, 0.18);
    }
    50% {
        box-shadow: 0 10px 40px rgba(43, 255, 176, 0.42);
    }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(5rem, 12vh, 8rem) var(--pad) 4rem;
}

.hero__inner {
    width: 100%;
    max-width: var(--maxw);
    margin-inline: auto;
    display: grid;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
    grid-template-columns: 1fr;
}

.hero__copy {
    order: 2;
}
.hero__portrait {
    order: 1;
    justify-self: center;
    max-width: 360px;
}
.hero__portrait img {
    width: 100%;
    border-radius: 18px;
    border: 1px solid var(--surface-line);
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.55),
        0 0 60px rgba(43, 255, 176, 0.12);
}

.wordmark {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.6rem, 1.5rem + 9vw, 6.5rem);
    line-height: 0.95;
    letter-spacing: -0.02em;
    margin: 0.4rem 0 0.6rem;
    background: linear-gradient(
        100deg,
        var(--ink) 0%,
        var(--gold) 60%,
        var(--green) 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-wrap: balance;
}

.album {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.6rem 1rem;
    margin-bottom: 1.2rem;
}
.album__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.3rem, 1rem + 2vw, 2rem);
    color: var(--ink);
}
.album__date {
    font-family: var(--font-display);
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.85rem;
    color: var(--green-ink);
    background: var(--green);
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
}

.hero__lede {
    max-width: 46ch;
    color: var(--ink-soft);
    font-size: clamp(1.05rem, 1rem + 0.4vw, 1.3rem);
    margin-bottom: 2rem;
}

.hero__cta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
}
.hero__cta-note {
    font-size: 0.9rem;
    color: var(--ink-faint);
}

.scroll-hint {
    position: absolute;
    left: 50%;
    bottom: 1.6rem;
    transform: translateX(-50%);
    width: 26px;
    height: 42px;
    border: 2px solid var(--surface-line);
    border-radius: 14px;
    display: none;
}
.scroll-hint span {
    position: absolute;
    left: 50%;
    top: 8px;
    width: 4px;
    height: 8px;
    margin-left: -2px;
    border-radius: 2px;
    background: var(--green);
    animation: scrollDot 1.8s ease-in-out infinite;
}
@keyframes scrollDot {
    0% {
        opacity: 0;
        transform: translateY(0);
    }
    40% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(14px);
    }
}

/* ============================================================
   About
   ============================================================ */
.about__grid {
    display: grid;
    gap: clamp(1.5rem, 4vw, 3rem);
    grid-template-columns: 1fr;
}
.about__lead p,
.about__long p {
    margin-bottom: 1rem;
    color: var(--ink-soft);
}
.about__lead strong {
    color: var(--ink);
}
.about__lead em,
.about__long em {
    color: var(--green);
    font-style: normal;
}
.about__tagline {
    font-family: var(--font-display);
    font-weight: 500;
    color: var(--gold) !important;
    font-size: 1.15rem;
}

/* ============================================================
   Mood / teaser
   ============================================================ */
.mood {
    text-align: center;
}
.mood__inner {
    max-width: 32ch;
}
.mood__line {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.015em;
    font-size: clamp(2rem, 1.2rem + 5.5vw, 4.4rem);
    text-wrap: balance;
    background: linear-gradient(
        120deg,
        var(--gold),
        var(--amber) 45%,
        var(--lavender)
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.mood__sub {
    margin-top: 1.4rem;
    color: var(--ink-soft);
    font-size: 1.05rem;
    max-width: 32ch;
    margin-inline: auto;
}

/* ============================================================
   Email capture
   ============================================================ */
.signup {
    text-align: center;
}
.signup__inner {
    max-width: 640px;
    background: var(--surface);
    border: 1px solid var(--surface-line);
    border-radius: var(--radius);
    padding: clamp(1.8rem, 5vw, 3rem);
    backdrop-filter: blur(6px);
}
.signup__sub {
    color: var(--ink-soft);
    margin-bottom: 1.8rem;
}
.signup__form .field {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}
.signup__form input[type="email"] {
    width: 100%;
    font-family: var(--font-body);
    font-size: 1.05rem;
    color: var(--ink);
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--surface-line);
    border-radius: 999px;
    padding: 0.95rem 1.3rem;
    outline: none;
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}
.signup__form input[type="email"]::placeholder {
    color: var(--ink-faint);
}
.signup__form input[type="email"]:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(43, 255, 176, 0.25);
}
.signup__form input.invalid {
    border-color: var(--amber);
    box-shadow: 0 0 0 3px rgba(255, 157, 87, 0.22);
}
.signup__hp {
    position: absolute;
    left: -5000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.signup__msg {
    min-height: 1.4em;
    margin-top: 1rem;
    font-size: 0.95rem;
    font-weight: 600;
}
.signup__msg.is-success {
    color: var(--green);
}
.signup__msg.is-error {
    color: var(--amber);
}
.signup__fineprint {
    margin-top: 0.8rem;
    font-size: 0.82rem;
    color: var(--ink-faint);
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
    padding: clamp(3rem, 8vw, 5rem) var(--pad) 3rem;
    border-top: 1px solid var(--surface-line);
    text-align: center;
}
.footer__brand {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: 0.02em;
    background: linear-gradient(100deg, var(--ink), var(--green));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 1.4rem;
}
.socials {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem 1.6rem;
    margin-bottom: 1.6rem;
}
.social {
    font-family: var(--font-display);
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--ink-soft);
    padding: 0.4rem 0.2rem;
    position: relative;
    transition: color 0.18s ease;
}
.social::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: var(--green);
    transition: width 0.22s ease;
}
.social:hover {
    color: var(--ink);
}
.social:hover::after {
    width: 100%;
}
.footer__legal {
    color: var(--ink-faint);
    font-size: 0.85rem;
}

/* ============================================================
   Background-music toggle (fixed, bottom-right)
   ============================================================ */
.music-toggle {
    position: fixed;
    right: clamp(1rem, 3vw, 2rem);
    bottom: clamp(1rem, 3vw, 2rem);
    z-index: 50;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem 0.6rem 0.7rem;
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    color: var(--ink);
    background: rgba(12, 17, 32, 0.72);
    border: 1px solid var(--surface-line);
    border-radius: 999px;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        background 0.2s ease;
}
.music-toggle:hover {
    transform: translateY(-2px);
    border-color: var(--green);
    color: var(--ink);
}
.music-toggle__icon {
    width: 20px;
    height: 20px;
    fill: var(--green);
    flex-shrink: 0;
}
/* show the right icon for the current state */
.music-toggle .icon-mute {
    display: none;
}
.music-toggle.is-playing .icon-play {
    display: none;
}
.music-toggle.is-playing .icon-mute {
    display: inline;
}
/* only pulse-glow while music is playing */
.music-toggle:not(.is-playing) {
    animation: none;
    box-shadow: none;
}

/* ============================================================
   Scroll reveal (fade + rise) — applied via JS adding .is-visible
   ============================================================ */
.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition:
        opacity 0.7s ease,
        transform 0.7s ease;
}
.reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* ============================================================
   Larger screens
   ============================================================ */
@media (min-width: 760px) {
    .scroll-hint {
        display: block;
    }
    .about__grid {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }
    .signup__form .field {
        flex-direction: row;
    }
    .signup__form .field .btn {
        flex-shrink: 0;
    }
}

@media (min-width: 920px) {
    .hero__inner {
        grid-template-columns: 1.15fr 0.85fr;
    }
    .hero__copy {
        order: 1;
    }
    .hero__portrait {
        order: 2;
        max-width: 420px;
    }
}

/* ============================================================
   Reduced motion — honor the user's preference
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
    .mesh {
        animation: none;
        transform: scale(1.08);
    }
    .reveal {
        opacity: 1;
        transform: none;
    }
    .scroll-hint span {
        display: none;
    }
}
