/* styles.css — Algo-Rhythm Studio Design System v3.0 */

/* 1. Typography & Reset */
@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,300;0,400;0,700;1,400&family=Montserrat:wght@500;600;700;800&display=swap');

:root {
    /* NEW PRIMARY PALETTE (Inspired by Business Card) */
    --bg: #191024;
    /* Deep Plum Background */
    --surface: #2A1D38;
    /* Card/Glass Surface */
    --text: #e6ebf5;
    --muted: #c0b8cd;
    /* Soft Purple Muted Text */

    /* BRAND ACCENTS */
    --primary-accent: #FC00FF;
    /* Hot Magenta/Pink */
    --secondary-accent: #FF7B00;
    /* Electric Gold/Orange */

    /* AI Coach Remap (Mapping old colors to new accents for consistency) */
    --echo-primary: #FC00FF;
    /* Magenta */
    --echo-glow: #FF7B00;
    /* Gold */
    --muse-primary: #FC00FF;
    /* Magenta */
    --muse-glow: #FF7B00;
    /* Gold */
    --intuition-primary: #FF7B00;
    /* Gold */
    --remix-primary: #FF7B00;
    /* Gold */

    /* UI Physics */
    --radius: 24px;
    --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 25px rgba(252, 0, 255, 0.2);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Lato', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
.brand .title,
.btn {
    font-family: 'Montserrat', sans-serif;
}

a {
    text-decoration: none;
    transition: 0.3s;
    color: var(--text);
}

a:hover {
    color: var(--neon-cyan);
    text-shadow: 0 0 10px rgba(0, 191, 255, 0.4);
}

/* 2. The "Aurora" Living Background */
@keyframes aurora {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.hero {
    position: relative;
    padding: 160px 0 120px;
    text-align: center;
    overflow: hidden;
    background: radial-gradient(circle at top center, rgba(252, 0, 255, 0.25) 0%, transparent 50%),
        radial-gradient(circle at bottom left, rgba(255, 123, 0, 0.1) 0%, transparent 40%),
        radial-gradient(circle at bottom right, rgba(252, 0, 255, 0.1) 0%, transparent 40%);
    animation: aurora 15s ease infinite;
}

/* Cyberpunk Grid Overlay with Circuitry Texture */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;

    /* Simulate Circuit/Grid Pattern */
    background-image:
        /* Fine Grid for Texture */
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        /* Larger, more prominent Circuit Lines (using primary accent) */
        linear-gradient(rgba(252, 0, 255, 0.1) 2px, transparent 2px),
        linear-gradient(90deg, rgba(252, 0, 255, 0.1) 2px, transparent 2px);

    background-size: 50px 50px, 50px 50px, 200px 200px, 200px 200px;

    /* Mask to fade out the grid at the bottom */
    mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
    z-index: -1;
    pointer-events: none;
}

.hero h1 {
    font-size: 56px;
    line-height: 1.1;
    margin-bottom: 24px;
    background: linear-gradient(to right, #fff, #b0bec5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero .lead {
    font-size: 20px;
    color: var(--muted);
    max-width: 650px;
    margin: 0 auto 40px;
}

/* 3. Navigation */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(11, 14, 20, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand img {
    width: 36px;
    animation: pulse 3s infinite;
}

.brand .title {
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.5px;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--muted);
}

.nav-links a.active {
    color: var(--neon-cyan);
}

.nav-links a.cta {
    border: 1px solid var(--neon-cyan);
    padding: 8px 24px;
    border-radius: 99px;
    color: var(--neon-cyan);
    transition: 0.3s;
}

.nav-links a.cta:hover {
    background: var(--neon-cyan);
    color: #000;
    box-shadow: 0 0 20px rgba(0, 191, 255, 0.5);
}

.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
}

/* 4. Glassmorphism Cards */
.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 100px 0;
}

.card,
.coach-card,
.app-card {
    background: rgba(21, 26, 35, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.card:hover,
.coach-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Coach Identity & Avatars */
.coach-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.coach-card {
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* FIX: Ensure avatars are circular and not squashed */
.coach-avatar {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: block;
    object-fit: cover;
    /* This crops the rectangle to fit the circle perfectly */
    border: none !important;
    /* Force remove any borders */
}

/* Individual Coach Glows (Shadow only, NO BORDERS on image) */
.echo.coach-card {
    border-bottom: 2px solid var(--echo-primary);
    background: linear-gradient(180deg, rgba(21, 26, 35, 0.6) 0%, rgba(83, 109, 254, 0.15) 100%);
}

.echo .coach-avatar {
    box-shadow: 0 0 30px rgba(83, 109, 254, 0.4);
}

.muse.coach-card {
    border-bottom: 2px solid var(--muse-primary);
    background: linear-gradient(180deg, rgba(21, 26, 35, 0.6) 0%, rgba(224, 64, 251, 0.15) 100%);
}

.muse .coach-avatar {
    box-shadow: 0 0 30px rgba(224, 64, 251, 0.4);
}

.intuition.coach-card {
    border-bottom: 2px solid var(--intuition-primary);
    background: linear-gradient(180deg, rgba(21, 26, 35, 0.6) 0%, rgba(245, 124, 0, 0.15) 100%);
}

.intuition .coach-avatar {
    box-shadow: 0 0 30px rgba(245, 124, 0, 0.4);
}

.remix.coach-card {
    border-bottom: 2px solid var(--remix-primary);
    background: linear-gradient(180deg, rgba(21, 26, 35, 0.6) 0%, rgba(255, 61, 0, 0.15) 100%);
}

.remix .coach-avatar {
    box-shadow: 0 0 30px rgba(255, 61, 0, 0.4);
}

/* 5. Scroll Reveal & Footer */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.btn-primary-light {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 36px;
    border-radius: 12px;
    font-size: 15px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;

    background: #fff;
    /* White background */
    color: #000;
    /* Black text */
    border: 1px solid #000;
    font-weight: 800;
    box-shadow: 0 0 20px rgba(252, 0, 255, 0.3);
    /* Magenta Glow */
}

.btn-primary-light:hover {
    box-shadow: 0 0 40px rgba(252, 0, 255, 0.6);
    transform: scale(1.05);
}

.btn-outline {
    display: inline-block;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 16px 36px;
    border-radius: 12px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-outline:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

input,
textarea,
select {
    width: 100%;
    background: #0f1219;
    border: 1px solid #2a3142;
    color: #fff;
    padding: 16px;
    border-radius: 12px;
    font-family: 'Lato';
    margin-bottom: 16px;
    font-size: 16px;
}

input:focus {
    outline: none;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 191, 255, 0.1);
}

.footer {
    padding: 80px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 14px;
    color: var(--muted);
    background: #080a0f;
}

.footer h4 {
    color: #fff;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 12px;
}

.footer a {
    display: block;
    margin-bottom: 10px;
    color: var(--muted);
}

.footer a:hover {
    color: var(--neon-cyan);
    transform: translateX(5px);
}

@media (max-width: 900px) {
    .coach-grid {
        grid-template-columns: 1fr 1fr;
    }

    .hero h1 {
        font-size: 40px;
    }
}

@media (max-width: 600px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: #0b0e14;
        flex-direction: column;
        padding: 20px;
        border-bottom: 1px solid #333;
    }

    .nav-links.mobile-visible {
        display: flex;
    }

    .nav-toggle {
        display: block;
    }

    .coach-grid {
        grid-template-columns: 1fr;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* --- 3D FLIP CARD ENGINE --- */

/* The Container */
.coach-flip-container {
    perspective: 1000px;
    /* Gives the 3D depth */
    cursor: pointer;
}

/* The Inner Wrapper (This is what actually rotates) */
.coach-flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

/* The Trigger Class (Added by JS when clicked) */
.coach-flip-container.flipped .coach-flip-inner {
    transform: rotateY(180deg);
}

/* Common Styles for Front and Back */
.coach-front,
.coach-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    /* Hide the back when facing away */
    backface-visibility: hidden;
    border-radius: 24px;
    padding: 32px 20px;

    /* Ensure glassmorphism works on both sides */
    background: rgba(21, 26, 35, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* FRONT: This is your existing card design */
.coach-front {
    z-index: 2;
}

/* BACK: This is the hidden side */
.coach-back {
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #0f1219;
    /* Slightly darker for contrast */
    border: 2px solid var(--neon-cyan);
    /* Highlight border */
}

/* Specific Border Colors for the Back */
.coach-flip-container.echo .coach-back {
    border-color: var(--echo-primary);
    box-shadow: 0 0 20px rgba(83, 109, 254, 0.2);
}

.coach-flip-container.muse .coach-back {
    border-color: var(--muse-primary);
    box-shadow: 0 0 20px rgba(224, 64, 251, 0.2);
}

.coach-flip-container.intuition .coach-back {
    border-color: var(--intuition-primary);
    box-shadow: 0 0 20px rgba(245, 124, 0, 0.2);
}

.coach-flip-container.remix .coach-back {
    border-color: var(--remix-primary);
    box-shadow: 0 0 20px rgba(255, 61, 0, 0.2);
}

/* --- ENGAGEMENT INDEX FLIP CARDS --- */
/* Specific styling for EI cards to match the Coach physics */
.ei-flip-container {
    perspective: 1000px;
    cursor: pointer;
    min-height: 320px;
    /* Slightly shorter than coach cards */
}

/* Color-coded Back Borders */
.coach-flip-container.reward .coach-back {
    border-color: #00E676;
    box-shadow: 0 0 20px rgba(0, 230, 118, 0.2);
}

.coach-flip-container.penalty .coach-back {
    border-color: #FF3D00;
    box-shadow: 0 0 20px rgba(255, 61, 0, 0.2);
}

.coach-flip-container.trust .coach-back {
    border-color: #2979FF;
    box-shadow: 0 0 20px rgba(41, 121, 255, 0.2);
}

/* Front Header Borders */
.coach-front.reward {
    border-top: 4px solid #00E676;
}

.coach-front.penalty {
    border-top: 4px solid #FF3D00;
}

.coach-front.trust {
    border-top: 4px solid #2979FF;
}

/* --- HOMEPAGE FEATURE FLIP CARDS --- */
/* 1. Love is Blind (Cyan) */
.coach-flip-container.feature-cyan .coach-back {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 20px rgba(0, 191, 255, 0.2);
}

.coach-front.feature-cyan {
    border-top: 3px solid var(--neon-cyan);
}

/* 2. Systemic Trust (Pink) */
.coach-flip-container.feature-pink .coach-back {
    border-color: var(--neon-pink);
    box-shadow: 0 0 20px rgba(255, 64, 129, 0.2);
}

.coach-front.feature-pink {
    border-top: 3px solid var(--neon-pink);
}

/* 3. AI Coaches (Orange/Intuition Color) */
.coach-flip-container.feature-orange .coach-back {
    border-color: var(--intuition-primary);
    box-shadow: 0 0 20px rgba(245, 124, 0, 0.2);
}

.coach-front.feature-orange {
    border-top: 3px solid var(--intuition-primary);
}

/* 4. No Swiping (White) */
.coach-flip-container.feature-white .coach-back {
    border-color: #fff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.coach-front.feature-white {
    border-top: 3px solid #fff;
}