:root {
    --primary: #FF4D4D;
    --bg: #0F0F0F;
    --surface: #1E1E1E;
    --text: #FFFFFF;
    --text-dim: #A0A0A0;
    --accent: #2D2D2D;
}

* {
    box-sizing: border-box;   
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

body {
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Utility */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    background-color: var(--primary);
    color: white;
    padding: 12px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 77, 77, 0.3);
}

/* Header */
header {
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -1px;
}

/* Hero Section */
.hero {
    padding: 80px 0 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden; 
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-dim);
    max-width: 600px;
    margin-bottom: 40px;
}

/* --- PHONE SCROLL SECTION --- */

.phones-container {
    display: flex;
    gap: 30px; 
    
    /* 1. Remove side padding here. We will use Margins instead. */
    padding: 60px 0; 
    
    width: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    justify-content: flex-start;
    
    /* Hide Scrollbar */
    -ms-overflow-style: none;
    scrollbar-width: none;
    
    perspective: 1000px;
}

/* Hide scrollbar for Chrome/Safari */
.phones-container::-webkit-scrollbar {
    display: none;
}

/* --- THE FIX: Apply spacing directly to the items --- */

/* First Phone: Push it to the center */
.phone-mockup:first-child {
    margin-left: calc(50vw - 135px);
}

/* Last Phone: Add invisible margin so we can scroll past it */
.phone-mockup:last-child {
    margin-right: calc(50vw - 135px);
}

/* .phone-mockup styles... (keep existing) */
.phone-mockup {
    flex: 0 0 270px; 
    height: 550px;
    background: var(--surface);
    border: 6px solid #333;
    border-radius: 35px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    scroll-snap-align: center;
    will-change: transform, filter; 
    transition: transform 0.2s linear, filter 0.2s linear, border-color 0.2s;
    z-index: 1;
    cursor: default;
}

/* --- DESKTOP RESET --- */
/* On large screens, we want them centered together, not spread out by margins */
@media (min-width: 1150px) {
    .phones-container {
        justify-content: center;
        padding: 60px 20px; 
        overflow-x: visible; 
    }

    /* Reset the margins so they don't look weird on desktop */
    .phone-mockup:first-child { margin-left: 0; }
    .phone-mockup:last-child { margin-right: 0; }
}

/* ... keep the rest of your card/app-screen styles ... */
.app-screen {
    padding: 25px 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(to bottom, #1E1E1E, #151515);
}

/* Cards inside the phone */
.card {
    background: #2A2A2A;
    padding: 20px;
    border-radius: 18px;
    text-align: left;
    border: 1px solid #333;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    pointer-events: none; /* Let clicks pass through to phone */
}

.tag {
    font-size: 0.7rem;
    background: rgba(255, 77, 77, 0.2);
    color: var(--primary);
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: bold;
}

.card h3 {
    font-size: 1.3rem;
    margin: 12px 0 8px;
    line-height: 1.2;
}

.card p {
    font-size: 0.85rem;
    color: #ccc;
    margin-bottom: 20px;
    line-height: 1.4;
}

/* Features Section */
.features {
    padding: 80px 0;
    /* background: var(--accent); */
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

.feature-item {
    background: var(--surface);
    padding: 30px;
    border-radius: 12px;
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 15px;
}

.feature-item h3 { margin-bottom: 10px; }
.feature-item p { color: var(--text-dim); font-size: 0.95rem; }

/* Modal Styles */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8); display: none;
    justify-content: center; align-items: center; z-index: 1000;
    backdrop-filter: blur(5px);
}
.modal {
    background: var(--surface); padding: 40px; border-radius: 16px;
    max-width: 450px; width: 90%; text-align: center;
    border: 1px solid #333; position: relative;
}
.close-btn {
    position: absolute; top: 15px; right: 20px; font-size: 24px;
    cursor: pointer; color: var(--text-dim); background: none; border: none;
}
.input-group { display: flex; gap: 10px; }
input[type="email"] {
    flex: 1; padding: 12px; border-radius: 8px; border: 1px solid #444;
    background: #2D2D2D; color: white; outline: none;
}
input[type="email"]:focus { border-color: var(--primary); }
.modal-form-btn {
    background: var(--primary); color: white; border: none;
    padding: 12px 20px; border-radius: 8px; cursor: pointer; font-weight: bold;
}

@media (max-width: 600px) {
    .hero h1 { font-size: 2.5rem; }
    .input-group { flex-direction: column; }
    
}

/* --- 1. DESKTOP GRID (The Gap Fix) --- */
/* --- 1. DESKTOP GRID --- */
.skill-grid {
    display: grid !important;
    grid-template-columns: 1.5fr 1fr;
    gap: 0; /* Removed gap completely to bring them closer */
    align-items: start;
    width: 100%;
}

.skill-text {
    position: sticky;
    top: 50%;
    transform: translateY(-50%);
    padding-right: 40px; 
    margin-top: 100px;
    text-align: left; /* FIXED: Align text to the left */
}

.skill-visual {
    width: 100%;
    display: flex;
    justify-content: flex-start; 
    padding-left: 0;
}

/* --- 2. THE TREE STRUCTURE --- */
.tree-wrapper {
    position: relative;
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
}

/* ALIGNMENT FIX:
   We align everything based on the ICON WIDTH (60px).
   Center of Icon = 30px.
   Line Width = 4px.
   Line Left Position = 30px - 2px = 28px.
*/

.tree-line {
    position: absolute; /* Must remain absolute to sit behind icons */
    left: 28px; /* Desktop position */
    
    /* THE FIX: Use Top + Height Calc instead of Bottom */
    top: 30px; 
    height: calc(100% - 60px); 
    
    width: 4px;
    background: #333;
    z-index: 0;
    border-radius: 4px;
}

/* Mobile Alignment Override */
@media (max-width: 768px) {
    .tree-line {
        left: 38px; /* Mobile position */
    }
}
.tree-line-fill {
    position: absolute;
    top: 10px;
    left: 0;
    width: 100%;
    background: var(--primary);
    box-shadow: 0 0 15px var(--primary);
}



/* Nodes */
.tree-node {
    position: relative;
    display: flex;
    align-items: center; /* Vertically center text with icon */
    margin-bottom: 100px;
}

.tree-node:last-child {
    margin-bottom: 0;
}

.node-icon {
    width: 60px; 
    height: 60px;
    background: #222;
    border: 3px solid #444;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    color: #666;
    z-index: 2;
    box-shadow: 0 0 0 8px #151515; /* Mask */
    flex-shrink: 0; /* Prevent squishing */
}

/* Text Boxes */
.node-content {
    margin-left: 25px; /* Spacing between circle and text */
    background: var(--surface);
    padding: 15px 20px;
    border-radius: 12px;
    border: 1px solid #333;
    text-align: left; /* FIXED: Ensure box text is left aligned */
    transition: all 0.4s ease;
    opacity: 0.5;
    flex: 1; /* Allow text to fill remaining space */
}

/* States */
.tree-node.unlocked .node-icon {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
    box-shadow: 0 0 20px rgba(255, 77, 77, 0.4), 0 0 0 8px #151515;
    transform: scale(1.1);
}
.tree-node.unlocked .node-content { opacity: 1; border-color: #777; }


/* --- 3. MOBILE OVERRIDE --- */
@media (max-width: 768px) {
    .skill-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .skill-text {
        position: static;
        text-align: center; /* Center main heading on mobile */
        transform: translateY(0);
        margin-top: 0;
        
        padding-right: 0;
    }

    .skill-visual {
        justify-content: center;
    }

    .tree-wrapper {
        padding-left: 10px; /* Slight offset from screen edge */
        padding-right: 10px;
    }

    /* MOBILE ALIGNMENT FIX:
       We added 10px padding to wrapper.
       So Line Left = 28px (base) + 10px (padding) = 38px.
    */
    .tree-line {
        left: 38px; 
    }
    
    .node-content {
        margin-left: 20px;
        font-size: 0.9rem;
    }
}
/* --- GROWTH ZONE SECTION --- */

.growth-zone-section {
    padding: 80px 0 120px 0; /* Extra bottom padding for the arrow */
    background-color: var(--bg);
}

.growth-zone {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
}

/* Header Text - Keeping it clean and white/grey */
.growth-zone-text {
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.1;
    text-align: center;
    color: white; /* Removed the gradient text for a cleaner contrast */
    margin-bottom: 10px;
}

/* --- THE BAR CONTAINER --- */
.zone-meter {
    display: flex;
    width: 100%;
    max-width: 800px;
    height: 70px;
    border-radius: 50px;
    background: #151515; /* Very dark background for the "track" */
    border: 1px solid #333;
    padding: 4px;
    overflow: visible; /* Allows arrow to float outside */
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* --- BAR SEGMENTS --- */
.zone-part {
    flex: 1;
    display: flex;
    align-items: center;
    text-align: center;
    justify-content: center;
    font-weight: 800;
    color: var(--text-dim); /* Dim text for inactive zones */
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    border-radius: 46px; /* Rounded pill shape for hover states */
}

/* --- STATE STYLING --- */

/* 1. The Active "Sweet Spot" (Growth) */
.growth {
    background-color: var(--primary); /* Solid Primary Color */
    color: white;
    box-shadow: 0 0 25px rgba(255, 77, 77, 0.4); /* Glows by default */
    z-index: 5;
}

/* 2. The Inactive Zones (Comfort/Panic) */
.comfort, .panic {
    background-color: transparent; 
}

/* --- HOVER EFFECTS --- */

.zone-part:hover {
    transform: scale(1.05); 
    z-index: 100;
    color: white;
}

/* When hovering inactive zones, they light up with Primary color */
.comfort:hover, .panic:hover {

}

/* When hovering Growth, it pulses slightly brighter */
.growth:hover {
    transform: scale(1.1);
    box-shadow: 0 0 35px rgba(255, 77, 77, 0.6);
}

/* --- THE SWEET SPOT ARROW --- */

.sweet-spot {
    position: absolute;
    bottom: -60px;
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 1;
    transition: opacity 0.3s;
    animation: bounce 2s infinite;
    pointer-events: none;
}

.side-arrow {
    animation: none;
}

/* Dim the arrow if user looks at other zones */



.sweet-spot-arrow {
    font-size: 2rem;
    color: var(--primary); /* Arrow matches the bar */
    line-height: 1;
    text-shadow: 0 0 10px rgba(255, 77, 77, 0.5);
}

.arrow {
    font-size: 2rem;
    line-height: 1;
}

.sweet-spot-label {
    font-size: .8rem;
    text-transform: uppercase;
    color: var(--primary); /* Text matches the bar */
    letter-spacing: 1px;
    font-weight: 800;
    margin-top: 0px;
}

.label {
    font-size: .8rem;
}

/* Bounce Animation */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-6px);}
    60% {transform: translateY(-3px);}
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    .zone-meter { height: 60px; width: 95%; }
    .zone-part { font-size: 0.6rem; }
    .growth-zone-text h1 { font-size: 2rem; }
    .sweet-spot {bottom: -100px}
    .side-arrow {bottom: -80px}
}