/* ═══════════════════════════════════════════════════════════
   GRIND LANDING PAGE — STYLES
   Dark theme, brand orange (#FF954D), premium editorial
   ═══════════════════════════════════════════════════════════ */

/* ─── DESIGN TOKENS ─────────────────────────────────────── */
:root {
    /* Color — Dark Theme */
    --color-bg:         #000000;
    --color-bg-alt:     #0A0A0A;
    --color-surface:    #101014;
    --color-surface-2:  #18181C;
    --color-white:      #FFFFFF;
    --color-charcoal:   #2A2A2A;
    --color-gray-800:   #3A3A3A;
    --color-gray-600:   #6B6B6B;
    --color-gray-500:   #818181;
    --color-gray-400:   #9A9A9A;
    --color-gray-200:   rgba(255, 255, 255, 0.1);
    --color-gray-100:   rgba(255, 255, 255, 0.06);
    --color-text:       #F4F4F4;
    --color-text-muted: #818181;
    --color-accent:     #FF954D;
    --color-accent-hover: #FF6B50;
    --color-accent-glow: rgba(255, 149, 77, 0.15);

    /* Typography */
    --font-display: 'Space Grotesk', sans-serif;
    --font-body:    'Inter', -apple-system, sans-serif;

    /* Spacing */
    --space-xs:   0.5rem;
    --space-sm:   1rem;
    --space-md:   1.5rem;
    --space-lg:   2.5rem;
    --space-xl:   4rem;
    --space-2xl:  6rem;
    --space-3xl:  10rem;

    /* Layout */
    --container-max: 1200px;
    --container-pad: 2rem;

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    /* Motion */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
    --duration-base: 0.7s;
    --duration-slow: 1s;
    --duration-slower: 1.4s;
}


/* ─── RESET & BASE ──────────────────────────────────────── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ─── NOISE TEXTURE ─────────────────────────────────────── */
.noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* ─── AMBIENT MESH ──────────────────────────────────────── */
.ambient-mesh {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background-color: var(--color-bg);
}

.ambient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    animation: drift 20s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

.orb-1 {
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--color-accent) 0%, transparent 70%);
    top: -10%;
    left: -10%;
}

.orb-2 {
    width: 70vw;
    height: 70vw;
    background: radial-gradient(circle, #3a2518 0%, transparent 70%);
    bottom: -20%;
    right: -10%;
    animation-delay: -10s;
}

@keyframes drift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(15%, 15%) scale(1.2); }
}

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

a {
    text-decoration: none;
    color: inherit;
}

::selection {
    background-color: var(--color-accent);
    color: var(--color-bg);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--color-bg);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ─── CUSTOM CURSOR ─────────────────────────────────────── */
@media (hover: hover) and (pointer: fine) {
    body, a, button, select, input, [role="button"], .btn, .nav__hamburger, .coach-cta, .btn--appstore {
        cursor: none !important;
    }
}

.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 99999;
    pointer-events: none;
}
.cursor-dot {
    width: 6px;
    height: 6px;
    background-color: var(--color-white);
    transition: opacity 0.15s ease;
}
.cursor-outline {
    width: 30px;
    height: 30px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: width 0.2s, height 0.2s, background-color 0.2s, opacity 0.2s;
}
.cursor-outline.active {
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Hide custom cursor elements on touch devices */
@media (hover: none) and (pointer: coarse) {
    .cursor-dot, .cursor-outline {
        display: none !important;
    }
}


/* ─── UTILITIES ─────────────────────────────────────────── */
.coach-cta {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.coach-cta.show-hint {
    background-color: var(--color-surface-2) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: var(--color-text-muted) !important;
    pointer-events: none;
    transform: scale(0.98);
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-pad);
}

.text-muted {
    color: var(--color-text-muted);
}

.text-accent {
    color: var(--color-accent);
}

.section-headline {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1;
    letter-spacing: -0.04em;
    color: var(--color-text);
}

/* Scroll offset for anchor links — matches fixed nav height */
#athletes,
#coaches,
#how-it-works {
    scroll-margin-top: 52px;
}

.section-label {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 0.875rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}


/* ─── BUTTONS ───────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: 0.02em;
    border: none;
    cursor: pointer;
    transition: all 0.35s var(--ease-out-expo);
    white-space: nowrap;
}

.btn--primary {
    background: linear-gradient(135deg, #FFC84B 0%, #FF954D 40%, #FF6B50 100%);
    color: var(--color-bg);
    border-radius: 100px;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.01em;
}

.btn--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 32px rgba(255, 149, 77, 0.3);
}

.btn--outline {
    background-color: transparent;
    color: var(--color-text);
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    border-radius: 100px;
    font-weight: 700;
}

.btn--outline:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    transform: translateY(-1px);
}

/* ── App Store Badge ── */
.btn--appstore {
    background-color: var(--color-white);
    color: var(--color-bg);
    border-radius: 14px;
    gap: 0.65rem;
    padding: 0.6rem 1.4rem;
    font-weight: 700;
}

.btn--appstore:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 32px rgba(255, 255, 255, 0.12);
}

.btn__appstore-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.15;
}

.btn__appstore-small {
    font-size: 0.6rem;
    font-weight: 400;
    letter-spacing: 0.03em;
}

.btn__appstore-large {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* ── Button Sizes ── */
.btn--sm {
    padding: 0.6rem 1.4rem;
    font-size: 0.9rem;
}

.btn--sm.btn--appstore {
    padding: 0.4rem 1rem;
    border-radius: 10px;
}

.btn--sm.btn--appstore svg {
    width: 18px;
    height: 18px;
}

.btn--sm .btn__appstore-text {
    display: none;
}

.btn--lg {
    padding: 1rem 2.2rem;
    font-size: 1.05rem;
}

.btn--lg.btn--appstore {
    padding: 0.7rem 1.6rem;
}

.btn--xl {
    padding: 1.15rem 3rem;
    font-size: 1.1rem;
}

.btn--xl.btn--appstore {
    padding: 0.75rem 1.8rem;
}

.final-cta .btn--outline {
    border-color: rgba(255, 255, 255, 0.35); /* Increased contrast border so it doesn't look disabled */
    color: rgba(255, 255, 255, 0.9); /* ~90% white text */
    background-color: transparent;
    transition: border-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.final-cta .btn--outline:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}


/* ─── DEVICE FRAMES ─────────────────────────────────────── */
.device-frame {
    position: relative;
    display: inline-block;
    overflow: hidden;
    background: #000;
}

/* Real iPhone styling for mobile device frames */
.device-frame:not(.device-frame--desktop) {
    border-radius: 40px;
    border: 9px solid #1c1c1e; /* Thinner Titanium Bezel */
    outline: 1px solid rgba(255, 255, 255, 0.12); /* Silver Chamfer */
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.6),
        0 12px 30px rgba(0, 0, 0, 0.35),
        inset 0 0 8px rgba(0, 0, 0, 0.8);
}

/* Dynamic Island */
.device-frame:not(.device-frame--desktop)::before {
    content: '';
    position: absolute;
    top: 14px; /* Lowered slightly for realistic placement */
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 16px;
    background-color: #000;
    border-radius: 8px;
    z-index: 10;
}

/* Home Indicator */
.device-frame:not(.device-frame--desktop)::after {
    content: '';
    position: absolute;
    top: auto !important; /* Overrides the inset: 0 inherit from glassmorphism overlay */
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 90px;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    z-index: 10;
}

.device-frame img {
    display: block;
    width: 100%;
    height: auto;
}

.crop-right {
    width: 101% !important;
    max-width: none !important;
}

.device-frame:not(.device-frame--desktop) img {
    margin-top: -9.5%; /* Crops less from the top to prevent button/header clipping */
    margin-bottom: -5%; /* Keeps more spacing at the bottom */
}

.device-frame--large {
    border-radius: 40px;
}

.device-frame--desktop {
    border-radius: 20px;
    border: 9px solid #1c1c1e; /* Graphite Titanium Bezel just like phone */
    outline: 1px solid rgba(255, 255, 255, 0.12); /* Silver Chamfer */
    box-shadow:
        0 40px 100px rgba(0, 0, 0, 0.5),
        0 15px 40px rgba(0, 0, 0, 0.3);
}

/* Glassmorphism & Glow on Device Frames */
.device-frame::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    pointer-events: none;
}

.floating {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
    100% { transform: translateY(0px); }
}


/* ─── SCROLL REVEAL ANIMATIONS ──────────────────────────── */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition:
        opacity var(--duration-base) var(--ease-out-expo),
        transform var(--duration-base) var(--ease-out-expo);
}

.reveal-up.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 {
    transition-delay: 0.15s;
}

.reveal-delay-2 {
    transition-delay: 0.3s;
}

.reveal-delay-3 {
    transition-delay: 0.45s;
}

/* Line-by-Line Reveal Masks */
.reveal-mask {
    display: inline-flex;
    overflow: hidden;
    vertical-align: bottom;
    padding-bottom: 0.1em;
    margin-bottom: -0.1em;
}

.reveal-line {
    display: inline-block;
    transform: translateY(110%) rotate(2deg);
    opacity: 0;
    transition: 
        transform 0.9s cubic-bezier(0.2, 1, 0.2, 1),
        opacity 0.9s cubic-bezier(0.2, 1, 0.2, 1);
    transform-origin: top left;
}

.reveal-lines.revealed .reveal-line {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
}

/* Stagger lines */
.reveal-mask:nth-child(2) .reveal-line { transition-delay: 0.1s; }
.reveal-mask:nth-child(3) .reveal-line { transition-delay: 0.2s; }
.reveal-mask:nth-child(4) .reveal-line { transition-delay: 0.3s; }
.reveal-mask:nth-child(5) .reveal-line { transition-delay: 0.4s; }
.reveal-mask:nth-child(6) .reveal-line { transition-delay: 0.5s; }


/* ═══════════════════════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════════════════════ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0); /* Pre-define transparent border to prevent starting from text-color (white) */
    transition: background-color 0.4s var(--ease-out-expo),
                border-color 0.4s var(--ease-out-expo),
                padding 0.4s var(--ease-out-expo),
                backdrop-filter 0.4s var(--ease-out-expo),
                -webkit-backdrop-filter 0.4s var(--ease-out-expo);
}

.nav.scrolled {
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom-color: rgba(255, 255, 255, 0.06); /* Transition only the border color to prevent jank */
    padding: 0.6rem 0;
}

.nav__inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-pad);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav__logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    z-index: 10;
}

.nav__logo-mark {
    width: 32px;
    height: 32px;
}

.nav__logo-text {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
    color: var(--color-text);
}

.nav__links {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav__link {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.65); /* Increased default visibility */
    transition: color 0.25s ease;
    letter-spacing: 0.01em;
}

.nav__link:hover {
    color: #ffffff; /* Full white on hover */
}

.nav__actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav__actions .coach-cta {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
    box-shadow: none !important;
    transition: border-color 0.3s ease, color 0.3s ease !important;
}

.nav__actions .coach-cta:hover {
    background: rgba(255, 255, 255, 0.03) !important;
    border-color: var(--color-accent) !important; /* Transition to GRIND orange */
    color: var(--color-accent) !important; /* Transition to GRIND orange */
}

.nav__hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 10;
}

.nav__hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-text);
    transition: all 0.35s var(--ease-out-expo);
    border-radius: 2px;
}

.nav__hamburger.active span:first-child {
    transform: rotate(45deg) translateY(5.5px);
}

.nav__hamburger.active span:last-child {
    transform: rotate(-45deg) translateY(-5.5px);
}


/* ─── MOBILE MENU ───────────────────────────────────────── */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 99;
    background-color: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s var(--ease-out-expo);
}

.mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-menu__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    text-align: center;
}

.mobile-menu__link {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.5rem;
    color: var(--color-text);
    transition: color 0.25s ease;
}

.mobile-menu__link:hover {
    color: var(--color-accent);
}

.mobile-menu__divider {
    width: 40px;
    height: 1px;
    background-color: var(--color-gray-200);
}

.mobile-menu__cta {
    margin-top: 0.5rem;
}


/* ═══════════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════════ */
.hero {
    padding: 10rem 0 8.5rem; /* Slightly reduced empty vertical space at bottom */
    overflow: hidden;
    background-color: var(--color-bg);
}

.hero__content {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-pad);
    display: grid;
    grid-template-columns: 1.15fr 0.85fr; /* Widen copy column to prevent headline wrapping */
    gap: 4rem;
    align-items: center;
}

.hero__headline {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.75rem, 5.25vw, 4.85rem); /* Reduced slightly to ensure single-line wraps on desktop */
    line-height: 0.95;
    letter-spacing: -0.05em;
    color: var(--color-text);
}

.hero__headline-line {
    display: block;
}

.hero__sub {
    margin-top: 2.25rem; /* Balanced spacing: 36px */
    font-size: 1.125rem;
    line-height: 1.65;
    color: var(--color-text-muted);
    max-width: 480px; /* Slightly wider to let the text flow nicely */
}

.hero__ctas {
    margin-top: 1.85rem; /* Balanced spacing: 30px */
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Phone composition */
.hero__visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 0;
}

.hero__phone-group {
    position: relative;
    width: 100%;
    max-width: 500px;
    display: flex;
    justify-content: center;
    margin-left: -50px; /* Shift phone composition 50px left to connect with copy */
}

.hero__phone {
    position: relative;
    border-radius: 40px;
    border: 9px solid #1c1c1e; /* Thinner Titanium Bezel */
    outline: 1px solid rgba(255, 255, 255, 0.12); /* Silver Chamfer */
    background: #000;
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.6),
        0 12px 30px rgba(0, 0, 0, 0.35),
        inset 0 0 8px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    transition: transform 0.8s var(--ease-out-expo);
}

/* Dynamic Island */
.hero__phone::before {
    content: '';
    position: absolute;
    top: 14px; /* Lowered slightly for realistic placement */
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 16px;
    background-color: #000;
    border-radius: 8px;
    z-index: 10;
}

/* Home Indicator */
.hero__phone::after {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 90px;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    z-index: 10;
}

.hero__phone img {
    display: block;
    width: 100%;
    height: auto;
    margin-top: -9.5%; /* Crops less from the top to prevent button/header clipping */
    margin-bottom: -5%; /* Keeps more spacing at the bottom */
}

.hero__phone--main {
    position: relative;
    z-index: 3;
    width: 322px; /* Increased center phone by approximately 15% */
}

.hero__phone--main img {
    filter: brightness(1.15) contrast(1.15); /* Boost screen contrast and brightness 15% */
}

.hero__phone--secondary {
    position: absolute;
    width: 220px;
    z-index: 1;
    opacity: 0.65; /* Increased opacity by ~10% (from 0.55) */
    filter: blur(1px);
}

.hero__phone--secondary img {
    filter: brightness(0.8) contrast(1); /* Increased brightness by 10% (from 0.7) */
}

.hero__phone--left {
    left: -90px; /* Pushed further left */
    top: 50%;
    transform: translateY(-50%) rotate(-6deg);
}

.hero__phone--right {
    right: -90px; /* Pushed further right */
    top: 50%;
    transform: translateY(-50%) rotate(6deg);
}


/* ═══════════════════════════════════════════════════════════
   THE PROBLEM
   ═══════════════════════════════════════════════════════════ */
.problem {
    padding: 90px 0; /* Compressed vertical padding by ~25% */
    background-color: var(--color-bg);
    border-top: 1px solid var(--color-gray-100);
}

.problem__header {
    text-align: center;
    margin-bottom: 80px; /* Compressed gap to animation area */
}

.problem__visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 380px; /* Restrained animation window height */
    margin-bottom: 80px; /* Compressed gap to closing statement */
}

.fragments {
    position: relative;
    width: 100%;
    max-width: 900px;
    height: 100%;
    margin: 0 auto;
}

.fragment {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.1rem 2.2rem; /* Increased size ~30% */
    background: rgba(255, 255, 255, 0.04); /* Higher contrast backdrop */
    border: 1px solid rgba(255, 255, 255, 0.15); /* Increased contrast border */
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 1.15rem; /* Increased font-size ~25% */
    font-weight: 500;
    color: #ffffff; /* High contrast white */
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    
    /* Default: anchored in center, offset using CSS variables */
    left: 50%;
    top: 50%;
    transform: translate3d(-50%, -50%, 0) translate3d(var(--x), var(--y), 0) rotate(var(--r));
    transform-origin: center center;
    will-change: transform, opacity; /* Force hardware acceleration on Safari/iOS WebKit */
    transition: transform 0.05s linear, opacity 0.05s linear; /* Smooth scroll-bound updates */
}

/* Custom coordinate mapping for wide distributed scatter area */
.fragment--1 { --x: -320px; --y: -130px; --r: -3deg; }
.fragment--2 { --x: 290px;  --y: -110px; --r: 2deg; }
.fragment--3 { --x: -330px; --y: 30px;   --r: 4deg; }
.fragment--4 { --x: 310px;  --y: 50px;   --r: -2deg; }
.fragment--5 { --x: -120px; --y: -90px;  --r: -4deg; }
.fragment--6 { --x: 120px;  --y: -70px;  --r: 3deg; }
.fragment--7 { --x: -180px; --y: 110px;  --r: -2deg; }
.fragment--8 { --x: 160px;  --y: 130px;  --r: 2deg; }
.fragment--9 { --x: -60px;  --y: -140px; --r: -3deg; }
.fragment--10 { --x: 80px;  --y: -130px; --r: 4deg; }
.fragment--11 { --x: -20px;  --y: 150px;  --r: -2deg; }

.problem__converge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.6);
    opacity: 0;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    pointer-events: none;
    z-index: 5;
    transition: transform 0.05s linear, opacity 0.05s linear;
}

.problem__logo-symbol {
    width: 64px; /* Increased to be even more prominent */
    height: 64px;
}

.problem__logo-wordmark {
    font-family: var(--font-display);
    font-size: 3rem; /* Increased size to 3rem (~48px) */
    font-weight: 700;
    color: #ffffff; /* Bright white symbol directly on dark backdrop */
    letter-spacing: 0.05em;
    line-height: 1;
}

.problem__resolution {
    text-align: center;
}

.problem__together {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: var(--color-accent); /* Color it GRIND orange instead of logo symbol */
    text-transform: uppercase;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .problem {
        padding: 80px 0;
    }
    
    .problem__visual {
        height: 350px; /* Preserve vertical window height for absolute fragments on mobile */
        margin-bottom: 60px;
    }
    
    .fragments {
        position: relative;
        width: 100%;
        max-width: 440px;
        height: 100%;
        margin: 0 auto;
    }
    
    .fragment {
        position: absolute !important;
        font-size: 0.9rem; /* Slightly smaller for mobile boundaries */
        padding: 0.7rem 1.3rem; /* Slightly smaller */
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    }

    /* Smaller coordinate mapping for mobile boundaries */
    .fragment--1 { --x: -100px; --y: -110px; --r: -3deg; }
    .fragment--2 { --x: 90px;   --y: -95px;  --r: 2deg; }
    .fragment--3 { --x: -115px; --y: -30px;  --r: 4deg; }
    .fragment--4 { --x: 105px;  --y: -15px;  --r: -2deg; }
    .fragment--5 { --x: -40px;  --y: -65px;  --r: -4deg; }
    .fragment--6 { --x: 50px;   --y: -55px;  --r: 3deg; }
    .fragment--7 { --x: -100px; --y: 45px;   --r: -2deg; }
    .fragment--8 { --x: 90px;   --y: 55px;   --r: 2deg; }
    .fragment--9 { --x: -45px;  --y: 90px;   --r: -3deg; }
    .fragment--10 { --x: 45px;  --y: 95px;   --r: 4deg; }
    .fragment--11 { --x: -5px;  --y: 130px;  --r: -2deg; }

    .problem__converge {
        transform: translate(-50%, -50%) scale(0.75); /* Keep active and scale down slightly */
    }
    .problem__logo-symbol {
        width: 44px; /* Slightly smaller for mobile */
        height: 44px;
    }
    .problem__logo-wordmark {
        font-size: 2.25rem; /* Slightly smaller for mobile */
    }
}


/* ═══════════════════════════════════════════════════════════
   READY
   ═══════════════════════════════════════════════════════════ */
.ready {
    padding: 90px 0; /* Compressed vertical padding by ~25% */
    background-color: var(--color-bg);
    border-top: 1px solid var(--color-gray-100);
}

.ready__grid {
    display: grid;
    grid-template-columns: 1.12fr 0.88fr; /* Widen text area slightly */
    gap: 5rem;
    align-items: center;
}

.ready .section-headline {
    font-size: clamp(2.5rem, 5vw, 4.3rem) !important; /* Reduced 5-8% to keep "NO SECOND-GUESSING." on one line */
}

.ready__plan-box {
    margin-top: 44px; /* Positioned 40-48px below main headline */
}

.ready__plan-sub {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text-muted);
    letter-spacing: 0.05em;
}

.ready__plan-main {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-accent); /* Color it GRIND orange */
    letter-spacing: 0.08em;
    margin-top: 4px;
}

.ready__visual {
    display: flex;
    justify-content: center;
}

.ready__visual .device-frame {
    max-width: 375px; /* Increased width ~10% (from 340px) */
    margin-left: -35px; /* Shift phone left 35px to connect with copy */
}


/* ═══════════════════════════════════════════════════════════
   TRAINING
   ═══════════════════════════════════════════════════════════ */
.training {
    padding: 60px 0 120px 0; /* Reduced top padding, kept standard bottom padding */
    background-color: var(--color-bg);
    border-top: 1px solid var(--color-gray-100);
}

.training__header {
    margin-bottom: 70px; /* Increased space between title and visual content */
}

.training__content {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr; /* Shift grid columns to push copy closer */
    gap: 5.5rem; /* Gap is exactly 88px, falling inside the 80-100px range */
    align-items: center; /* Center visual and copy vertically */
}

.training__visual {
    display: flex;
    justify-content: center;
}

.training__visual .device-frame {
    max-width: 356px; /* Reduced phone size by ~5% (from 375px) */
}

.training__details {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding-top: 0; /* Removed padding-top to keep details aligned vertically */
    margin-left: -60px; /* Shift column 60px left to tighten visual relationship */
}

.detail-card {
    padding: 1.25rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08); /* Subtle horizontal divider */
}

.detail-card:last-child {
    border-bottom: none;
}

.detail-card__label {
    display: block;
    font-family: var(--font-display);
    font-weight: 700; /* Stronger weight */
    font-size: 1.25rem; /* Increased size by ~20-25% */
    letter-spacing: 0.02em;
    color: #ffffff; /* Bright white */
    text-transform: uppercase; /* Uppercase heading */
    margin-bottom: 0.4rem;
}

.detail-card__text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--color-text-muted); /* Smaller and muted description */
}


/* ═══════════════════════════════════════════════════════════
   PROGRESS
   ═══════════════════════════════════════════════════════════ */
.progress {
    padding: var(--space-3xl) 0;
    background-color: var(--color-bg-alt);
    border-top: 1px solid var(--color-gray-100);
}

.progress__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
}

.progress__visual {
    display: flex;
    justify-content: center;
}

.progress__visual .device-frame {
    max-width: 375px; /* Increased phone size by 10% (from 340px) */
    margin-right: -30px; /* Shift phone 30px right */
}

.progress__text {
    margin-left: -30px; /* Shift copy 30px left to tighten composition */
}

.progress__tagline {
    margin-top: 2rem;
    font-family: var(--font-display);
    font-size: 1.05rem; /* Increased slightly to ~17px while remaining secondary */
    font-weight: 600;
    color: var(--color-text-muted); /* Muted secondary styling */
    letter-spacing: 0.05em;
    text-transform: uppercase;
}


/* ═══════════════════════════════════════════════════════════
   NUTRITION
   ═══════════════════════════════════════════════════════════ */
.nutrition {
    padding: var(--space-3xl) 0;
    background-color: var(--color-bg);
    border-top: 1px solid var(--color-gray-100);
}

.nutrition__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
}

.nutrition__sub {
    margin-top: 1.85rem;
    font-size: 0.95rem; /* Small and restrained copy */
    line-height: 1.6;
    color: var(--color-text-muted); /* Muted style */
    max-width: 380px;
}

.nutrition__visual {
    display: flex;
    justify-content: center;
}

.nutrition__visual .device-frame {
    max-width: 375px; /* Increased width ~10-12% (from 340px) */
    margin-left: -35px; /* Shift phone left 35px to connect with copy */
}


/* ═══════════════════════════════════════════════════════════
   COACH CONNECTION
   ═══════════════════════════════════════════════════════════ */
.coach-connection {
    padding: var(--space-3xl) 0;
    background-color: var(--color-bg-alt);
    border-top: 1px solid var(--color-gray-100);
}

.coach-connection__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
}

.coach-connection__visual {
    display: flex;
    justify-content: center;
}

.coach-connection__visual .device-frame {
    max-width: 340px;
}

.coach-connection__sub {
    margin-top: 2rem;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--color-text-muted);
    max-width: 420px;
}


/* ═══════════════════════════════════════════════════════════
   LIFESTYLE BREAK
   ═══════════════════════════════════════════════════════════ */
.lifestyle-break {
    position: relative;
    height: 50vh;
    min-height: 360px;
    max-height: 540px;
    overflow: hidden;
}

.lifestyle-break__image {
    position: absolute;
    inset: 0;
}

.lifestyle-break__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(30%) contrast(1.05) brightness(0.7);
}


/* ═══════════════════════════════════════════════════════════
   FOR COACHES
   ═══════════════════════════════════════════════════════════ */
.for-coaches {
    padding: 80px 0; /* Tightened padding */
    background-color: var(--color-surface);
    border-top: 1px solid var(--color-gray-100);
}

.for-coaches__header {
    text-align: center;
    margin-bottom: 36px; /* Tightened margin */
}

.for-coaches__sub {
    margin-top: 1.5rem;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--color-text-muted);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.for-coaches__visual {
    display: flex;
    justify-content: center;
    margin-bottom: 44px; /* Tightened margin */
}

.for-coaches__visual .device-frame--desktop {
    max-width: 820px; /* Occupies ~68% of 1200px container */
    width: 100%;
}

.for-coaches__statement {
    text-align: center;
    margin-bottom: 28px; /* Spacing of 28px (within 24-32px range) to the button below */
}

.for-coaches__statement-title {
    font-family: var(--font-display);
    font-size: 2.2rem; /* Scaled up to medium-large display type */
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.16em; /* Added prominent tracking (letter spacing) */
    margin-bottom: 0;
}

.for-coaches__statement-sub {
    display: none; /* Hide since it has been removed from HTML */
}

.for-coaches__cta {
    text-align: center;
}

.for-coaches__cta .coach-cta {
    background: var(--color-accent) !important; /* Solid GRIND orange background */
    color: #000000 !important; /* Black text */
    border: none !important;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(255, 149, 77, 0.15) !important; /* Muted orange dropshadow glow */
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.for-coaches__cta .coach-cta:hover {
    background: #ffaa6b !important; /* Slightly lighter orange on hover */
    transform: translateY(-2px);
}


/* ═══════════════════════════════════════════════════════════
   HOW IT WORKS
   ═══════════════════════════════════════════════════════════ */
.how-it-works {
    padding: 75px 0; /* Reduced padding by 25% to compress section height */
    background-color: var(--color-bg);
    border-top: 1px solid var(--color-gray-100);
}

.how-it-works__header {
    text-align: center;
    margin-bottom: 24px; /* Reduced vertical gap between label and steps by 40-50px */
}

.how-it-works .section-label {
    font-size: 1.15rem; /* Increased size ~25-30% */
    color: rgba(255, 255, 255, 0.55); /* Increased contrast */
    letter-spacing: 0.12em;
    font-weight: 600;
}

.steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    max-width: 900px; /* Kept narrow to maintain huge negative space on the sides */
    margin: 0 auto;
}

.step {
    text-align: center;
    flex: 1;
    padding: 0 1rem; /* Reduced from 2rem to give text more horizontal space */
    
    /* Initial state for entry scroll-animation */
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1), transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.step__number {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 3rem;
    color: var(--color-accent); /* Keep orange numbers */
    letter-spacing: -0.04em;
    line-height: 1;
    margin-bottom: 1.25rem;
}

.step__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.25rem; /* Increased size by ~13% for legibility */
    letter-spacing: -0.01em;
    color: var(--color-text); /* White titles */
    margin-bottom: 0.75rem;
    white-space: nowrap; /* Prevent titles from wrapping onto multiple lines */
}

.step__text {
    font-size: 1.05rem; /* Increased slightly for better copy weight */
    line-height: 1.6;
    color: var(--color-text-muted); /* Muted grey descriptions */
}

.step__divider {
    display: flex;
    align-items: center;
    padding-top: 1.5rem;
}

.step__line {
    position: relative;
    width: 80px;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.08); /* Understated dark track line */
}

.step__line-inner {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background-color: var(--color-accent); /* Active orange progress */
    transition: width 0.8s ease;
}

/* Sequential Progression Animation: 01 -> line -> 02 -> line -> 03 */
.steps.active .step:nth-child(1) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0s;
}

.steps.active .step__divider:nth-child(2) .step__line-inner {
    width: 100%;
    transition-delay: 0.5s;
}

.steps.active .step:nth-child(3) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 1.2s;
}

.steps.active .step__divider:nth-child(4) .step__line-inner {
    width: 100%;
    transition-delay: 1.7s;
}

.steps.active .step:nth-child(5) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 2.4s;
}


/* ═══════════════════════════════════════════════════════════
   FINAL CTA
   ═══════════════════════════════════════════════════════════ */
.final-cta {
    padding: var(--space-3xl) 0 var(--space-2xl);
    background-color: var(--color-bg-alt);
    text-align: center;
    position: relative;
    overflow: hidden;
    border-top: 1px solid var(--color-gray-100);
}

.final-cta__headline {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.5rem, 5.5vw, 5rem);
    line-height: 1;
    letter-spacing: -0.04em;
    color: var(--color-text);
    margin-bottom: var(--space-xl);
}

.final-cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    justify-content: center;
}

.final-cta__mark {
    margin-top: 45px; /* Moved 30-40px upward to reduce excessive space */
    opacity: 0.12; /* Slightly increased visibility of brand symbol */
}

.final-cta__logo {
    width: 120px;
    height: 120px;
    margin: 0 auto;
}


/* ═══════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════ */
.footer {
    padding: 3.125rem 0; /* Increased vertical padding by ~10px */
    background-color: var(--color-bg);
    border-top: 1px solid var(--color-gray-100);
}

.footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer__brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer__logo-mark {
    width: 24px;
    height: 24px;
}

.footer__logo-text {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    color: var(--color-text);
    letter-spacing: -0.02em;
}

.footer__links {
    display: flex;
    gap: 2rem;
}

.footer__links a {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.6); /* Increased link opacity for readability */
    transition: color 0.25s ease;
}

.footer__links a:hover {
    color: #ffffff; /* Transition to full white on hover */
}

.footer__copy {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6); /* Increased text opacity for readability */
}


/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — TABLET
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    :root {
        --container-pad: 1.5rem;
    }

    .hero__content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 4rem;
    }

    .hero__sub {
        margin-left: auto;
        margin-right: auto;
    }

    .hero__ctas {
        justify-content: center;
    }

    .hero__phone-group {
        margin-left: 0; /* Center phone group on mobile/tablet viewports */
    }

    .hero__phone--main {
        width: 260px;
    }

    .hero__phone--secondary {
        width: 200px;
    }

    .hero__phone--left {
        left: -40px;
    }

    .hero__phone--right {
        right: -40px;
    }

    .ready__grid,
    .progress__grid,
    .nutrition__grid,
    .coach-connection__grid {
        grid-template-columns: 1fr;
        gap: 4rem;
        text-align: center;
    }

    .ready__sub,
    .progress__sub,
    .nutrition__sub,
    .coach-connection__sub {
        margin-left: auto;
        margin-right: auto;
    }

    .ready__tagline {
        text-align: center;
    }

    .ready__visual {
        order: 2;
    }

    .ready__visual .device-frame {
        margin-left: 0; /* Reset desktop shift */
    }

    .progress__visual {
        order: -1;
    }

    .progress__visual .device-frame {
        margin-right: 0; /* Reset desktop shift */
    }

    .progress__text {
        margin-left: 0; /* Reset desktop shift */
        text-align: center;
    }

    .nutrition__visual .device-frame {
        margin-left: 0; /* Reset desktop shift */
    }

    .coach-connection__visual {
        order: -1;
    }

    .training__content {
        grid-template-columns: 1fr;
        gap: 4rem;
        text-align: center;
    }

    .training__header {
        text-align: center;
    }

    .training__details {
        padding-top: 0;
        margin-left: 0; /* Reset desktop shift */
    }

    .detail-card {
        text-align: left;
    }
}


/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    :root {
        --container-pad: 1.25rem;
        --space-3xl: 6rem;
        --space-2xl: 4rem;
    }

    .nav__links {
        display: none;
    }

    .nav__actions .btn--primary {
        display: none;
    }

    .nav__hamburger {
        display: flex;
    }

    .hero {
        padding: 8rem 0 4rem;
    }

    .hero__headline {
        font-size: clamp(2.5rem, 10vw, 3.5rem);
    }

    .hero__sub {
        font-size: 1rem;
    }

    .hero__ctas {
        flex-direction: column;
        align-items: center;
    }

    .hero__phone--main {
        width: 240px;
    }

    .hero__phone--secondary {
        width: 180px;
        opacity: 0.3;
    }

    .hero__phone--left {
        left: -30px;
    }

    .hero__phone--right {
        right: -30px;
    }

    .section-headline {
        font-size: clamp(1.75rem, 7vw, 2.75rem);
    }

    .fragments {
        gap: 0.65rem;
    }

    .fragment {
        padding: 0.6rem 1rem;
        font-size: 0.75rem;
    }

    .steps {
        flex-direction: column;
        gap: 0;
        align-items: center;
    }

    .step {
        padding: 2rem 0;
    }

    .step__title {
        white-space: normal; /* Allow text wrapping on narrow mobile screens to avoid overflow */
    }

    .step__divider {
        padding-top: 0;
    }

    .step__line {
        width: 1px;
        height: 40px;
    }

    .final-cta__headline {
        font-size: clamp(2rem, 8vw, 3.5rem);
    }

    .final-cta__actions {
        flex-direction: column;
        align-items: center;
    }

    .footer__inner {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .footer__links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1.5rem;
    }

    .lifestyle-break {
        height: 35vh;
        min-height: 240px;
    }
}

@media (max-width: 480px) {
    .hero__phone--secondary {
        display: none;
    }

    .hero__phone--main {
        width: 260px;
    }

    .device-frame {
        max-width: 280px !important;
    }

    .for-coaches__visual .device-frame--desktop {
        max-width: 100% !important;
    }
}
