/* 
    FITNESS STUDIO 123 - V2 DYNAMIC REDESIGN (Mobile-First Optimization)
    Focus: Mobile-First, Fluid Typography, Playful, Unique, High-Impact
*/

:root {
    --clr-bg: #050510;
    --clr-dark: #0a0a16;
    --clr-black: #000000;
    --clr-primary: #1e90ff;
    --clr-accent: #ff0000;
    --clr-accent-glow: rgba(255, 0, 0, 0.4);
    --clr-gold: #FFD700;
    --clr-card: rgba(255, 255, 255, 0.03);
    --clr-border: rgba(255, 255, 255, 0.1);

    /* Constraint 1: User Fonts */
    --f-main: 'Inter', 'Noto Sans JP', sans-serif;
    --f-width: 0.96;
    --f-lh: 1.15;
    --f-ls: -0.01em;

    /* SKILL: Fluid Typography (clamp) */
    --text-fluid-sm: clamp(0.875rem, 0.8rem + 0.3vw, 1rem);
    --text-fluid-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
    --text-fluid-lg: clamp(1.125rem, 1rem + 0.6vw, 1.3rem);
    --text-fluid-xl: clamp(1.25rem, 1rem + 1vw, 1.5rem);
    --text-fluid-2xl: clamp(1.5rem, 1.2rem + 1.5vw, 2rem);
    --text-fluid-3xl: clamp(1.8rem, 1.5rem + 2vw, 2.5rem);
    --text-fluid-4xl: clamp(2rem, 1.5rem + 3vw, 3.5rem);
    --text-fluid-5xl: clamp(2.5rem, 2rem + 4vw, 5rem);

    /* SKILL: Fluid Spacing */
    --space-fluid-sm: clamp(1rem, 0.8rem + 1vw, 1.5rem);
    --space-fluid-md: clamp(1.5rem, 1rem + 2vw, 3rem);
    --space-fluid-lg: clamp(2rem, 1.5rem + 3vw, 4rem);
    --space-fluid-section: clamp(4rem, 3rem + 5vw, 8rem);
}

/* Reset & Base applying SKILL: Mobile First */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background-color: var(--clr-bg);
    color: #fff;
    font-family: var(--f-main);
    line-height: var(--f-lh);
    letter-spacing: var(--f-ls);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    width: 100%;
    font-size: var(--text-fluid-base);
}

/* Base Layout (Mobile First) */
.container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 var(--space-fluid-sm);
    /* SKILL: Safe Area Setup */
    padding-left: max(var(--space-fluid-sm), env(safe-area-inset-left));
    padding-right: max(var(--space-fluid-sm), env(safe-area-inset-right));
}

/* Mobile sections have less padding */
.section {
    padding: var(--space-fluid-section) 0;
    position: relative;
    z-index: 2;
    width: 100%;
}

/* Mobile-first Grids (Stack by default) */
.grid {
    display: grid;
    gap: var(--space-fluid-md);
    grid-template-columns: 1fr;
}

/* Breakpoints (Mobile First min-width approach) */
@media (min-width: 768px) {

    .col-2,
    .col-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .col-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .gap-huge {
        gap: 80px;
    }
}

.flex {
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .flex {
        flex-direction: row;
    }
}

.items-center {
    align-items: center;
}

.align-center,
.text-center {
    text-align: center;
}

.text-right {
    text-align: left;
}

@media (min-width: 768px) {
    .text-right {
        text-align: right;
    }
}

.bg-dark {
    background-color: var(--clr-dark);
}

.bg-black {
    background-color: var(--clr-black);
}

.overflow-hidden {
    overflow: hidden;
}

/* Typographic Defaults (Fluid) */
h1,
h2,
h3,
h4,
.section-title,
.sub-title {
    font-weight: 900;
    transform: scaleX(var(--f-width));
    transform-origin: left;
}

.section-title.text-center {
    transform-origin: center;
}

.section-title,
.sub-title {
    font-size: var(--text-fluid-4xl);
    margin-bottom: var(--space-fluid-md);
}

/* Kinetic Background */
.kinetic-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

.mesh-gradient {
    position: absolute;
    width: 150%;
    height: 150%;
    top: -25%;
    left: -25%;
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 46, 46, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(30, 144, 255, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(10, 17, 40, 1) 0%, var(--clr-bg) 100%);
    filter: blur(80px);
    animation: backgroundMove 20s infinite alternate linear;
}

@keyframes backgroundMove {
    from {
        transform: rotate(0deg) scale(1.1);
    }

    to {
        transform: rotate(10deg) scale(1);
    }
}

.floating-text {
    position: absolute;
    bottom: 5vh;
    left: -10%;
    font-size: 15vw;
    font-weight: 900;
    opacity: 0.03;
    white-space: nowrap;
    pointer-events: none;
    font-style: italic;
    transform: rotate(-3deg);
}

/* Header & Mobile Nav (SKILL: Bottom Nav / Hamburger) */
.global-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: var(--space-fluid-sm) 0;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    /* Safe Area Top */
    padding-top: max(var(--space-fluid-sm), env(safe-area-inset-top));
}

.global-header.scrolled {
    padding-top: max(10px, env(safe-area-inset-top));
    padding-bottom: 10px;
    backdrop-filter: blur(20px);
    background: rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid var(--clr-border);
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: var(--text-fluid-lg);
    font-weight: 900;
    letter-spacing: 2px;
}

.logo-accent {
    color: var(--clr-accent);
    font-size: 1.2em;
    margin-left: 5px;
}

/* Desktop Nav Hidden on Mobile */
.nav-desktop {
    display: none;
}

@media (min-width: 1024px) {
    .nav-desktop {
        display: flex;
        align-items: center;
    }

    .nav-desktop a {
        color: rgba(255, 255, 255, 0.6);
        text-decoration: none;
        margin-left: 30px;
        font-size: 0.8rem;
        font-weight: 700;
        letter-spacing: 1px;
        transition: 0.3s;
        /* SKILL: Minimum Touch Target Desktop */
        padding: 10px;
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .nav-desktop a:hover {
        color: var(--clr-accent);
    }
}

/* SKILL: Mobile Bottom Nav (Visible only < 768px) */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 22, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--clr-border);
    display: flex;
    justify-content: space-around;
    z-index: 1000;
    /* SKILL: Safe Area Bottom */
    padding-bottom: env(safe-area-inset-bottom);
}

@media (min-width: 768px) {
    .mobile-bottom-nav {
        display: none;
    }
}

.mobile-bottom-nav a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* SKILL: WCAG Touch Target 44px min */
    min-height: 60px;
    min-width: 60px;
    flex: 1;
}

.mobile-bottom-nav a i {
    font-size: 1.5rem;
    margin-bottom: 2px;
}

.mobile-bottom-nav a.active {
    color: var(--clr-accent);
}

/* Push body to prevent content hidden behind bottom nav on mobile */
body {
    padding-bottom: 70px;
}

@media (min-width: 768px) {
    body {
        padding-bottom: 0;
    }
}

/* Buttons (SKILL: Min Touch Size) */
.btn-3d {
    display: inline-flex;
    padding: 15px 30px;
    /* Mobile safe size */
    border-radius: 12px;
    font-weight: 900;
    text-decoration: none;
    text-transform: uppercase;
    transition: 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    border: none;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    /* SKILL: Touch Target */
    min-height: 48px;
    font-size: var(--text-fluid-sm);
}

@media (min-width: 768px) {
    .btn-3d {
        width: auto;
        padding: 18px 45px;
        font-size: var(--text-fluid-base);
    }
}

.btn-3d.primary {
    background: linear-gradient(135deg, var(--clr-accent), #9b0000);
    color: #fff;
    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 0.3),
        0 0 0 4px var(--clr-bg),
        0 15px 35px rgba(255, 46, 46, 0.4);
}

.btn-3d.outline {
    background: transparent;
    color: #fff;
    box-shadow:
        inset 0 0 0 2px rgba(255, 255, 255, 0.2),
        0 0 0 4px var(--clr-bg),
        0 10px 20px rgba(0, 0, 0, 0.4);
}

.btn-3d:hover {
    transform: translateY(-5px) scale(1.05);
    filter: brightness(1.2);
}

.btn-pulse {
    position: relative;
    padding: 10px 20px;
    background: var(--clr-primary);
    border-radius: 50px;
    color: white;
    text-decoration: none;
    font-weight: 700;
    animation: pulser 2s infinite;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* SKILL: Min touch */
    min-height: 44px;
}

@keyframes pulser {
    0% {
        box-shadow: 0 0 0 0 rgba(30, 144, 255, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(30, 144, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(30, 144, 255, 0);
    }
}

/* Hero V2 */
main {
    position: relative;
    z-index: 2;
    overflow: hidden;
}

.hero-v2 {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    padding-top: max(100px, env(safe-area-inset-top));
    padding-bottom: 50px;
    z-index: 2;
    width: 100%;
}

@media (min-width: 1024px) {
    .hero-v2 {
        flex-direction: row;
        align-items: center;
    }
}

.hero-visual {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 60%;
    z-index: 1;
    clip-path: polygon(0 20%, 100% 0, 100% 100%, 0 100%);
    opacity: 0.3;
}

@media (min-width: 1024px) {
    .hero-visual {
        top: 0;
        bottom: auto;
        width: 65%;
        height: 100%;
        clip-path: polygon(15% 0, 100% 0, 100% 100%, 0% 100%);
        opacity: 0.6;
    }
}

.hero-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-grid {
    position: relative;
    z-index: 2;
}

.hero-copy {
    max-width: 800px;
}

.kinetic-h1 {
    font-size: clamp(1.4rem, 4.5vw, 4.2rem);
    /* Optimized to fit 15 characters on mobile without wrapping */
    line-height: 1.3;
    margin-bottom: 20px;
}

.kinetic-h1 span {
    display: inline-block;
    white-space: nowrap;
}

.hero-badge {
    background: var(--clr-accent);
    color: #000;
    display: inline-block;
    padding: 5px 15px;
    font-weight: 900;
    border-radius: 4px;
    margin-bottom: 30px;
    letter-spacing: 2px;
}

.hero-lead {
    font-size: var(--text-fluid-lg);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
    max-width: 650px;
    line-height: 1.6;
}

.hero-cta-v2 {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

@media (min-width: 768px) {
    .hero-cta-v2 {
        flex-direction: row;
        width: auto;
    }
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 3px;
    opacity: 0.5;
    animation: bounce 2s infinite;
}

/* Animations */
.reveal-v2 {
    opacity: 0;
    filter: blur(20px);
    transform: translateY(40px) skewY(2deg);
    transition: all 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-v2.active {
    opacity: 1;
    filter: blur(0px);
    transform: translateY(0) skewY(0deg);
}

.delay-1 {
    transition-delay: 0.15s;
}

.delay-2 {
    transition-delay: 0.3s;
}

.delay-3 {
    transition-delay: 0.45s;
}

/* Components */
.glass-frame {
    background: var(--clr-card);
    backdrop-filter: blur(25px);
    padding: var(--space-fluid-md);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    max-width: 100%;
    transition: 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.glass-frame:hover {
    border-color: rgba(255, 46, 46, 0.3);
    box-shadow: 0 30px 60px rgba(255, 46, 46, 0.2);
    transform: translateY(-8px) scale(1.02);
}

@media (min-width: 768px) {
    .glass-frame.rotate-mobile {
        transform: rotate(-3deg);
        border-radius: 40px;
    }
}

.glass-frame img {
    border-radius: 20px;
    width: 100%;
    display: block;
}

.story-text p {
    font-size: var(--text-fluid-base);
    margin-bottom: 1em;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.highlight-gold,
.highlight-red {
    color: var(--clr-accent) !important;
    font-weight: 900;
    text-shadow: 0 0 15px rgba(255, 46, 46, 0.3);
}

.quote-card {
    margin-top: 50px;
    padding: var(--space-fluid-md);
    background: var(--clr-card);
    backdrop-filter: blur(25px);
    border-radius: 20px;
    font-size: var(--text-fluid-2xl);
    border-left: 8px solid var(--clr-accent);
    line-height: 1.4;
    box-shadow: 20px 20px 60px rgba(0, 0, 0, 0.3);
}

/* Pulse Section */
.pulse-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 50px;
}

@media (min-width: 768px) {
    .pulse-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }
}

.pulse-card {
    background: var(--clr-card);
    padding: var(--space-fluid-md);
    border-radius: 30px;
    border: 1px solid var(--clr-border);
    transition: 0.5s;
    height: 100%;
}

.pulse-icon {
    font-size: var(--text-fluid-4xl);
    color: var(--clr-accent);
    margin-bottom: 20px;
}

.pulse-card h3 {
    font-size: var(--text-fluid-2xl);
    margin-bottom: 15px;
}

/* Strategy Stack */
.card-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.benefit-item {
    background: var(--clr-card);
    backdrop-filter: blur(20px);
    padding: var(--space-fluid-sm);
    border-radius: 30px;
    display: grid;
    grid-template-columns: 1fr;
    text-align: center;
    border: 1px solid var(--clr-border);
}

@media (min-width: 768px) {
    .benefit-item {
        grid-template-columns: 100px 1fr;
        text-align: left;
        padding: 40px 60px;
        border-radius: 40px;
    }
}

.benefit-num {
    font-size: var(--text-fluid-4xl);
    font-weight: 900;
    color: var(--clr-accent);
    opacity: 0.5;
    margin-bottom: 15px;
}

/* Features Update */
.feat-panel {
    background: #fff;
    color: #000;
    padding: var(--space-fluid-md);
    border-radius: 30px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
}

@media (min-width: 1024px) {
    .feat-panel {
        flex-direction: row;
        align-items: flex-start;
    }
}

.feat-icon i {
    font-size: 0.7rem;
    color: var(--clr-text-muted);
}

/* =========================================
   Back to Top Button
   ========================================= */
.back-to-top {
    position: fixed;
    bottom: max(30px, calc(env(safe-area-inset-bottom) + 30px));
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(25, 25, 25, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 215, 0, 0.2);
    box-shadow:
        inset 0 0 20px rgba(255, 255, 255, 0.05),
        0 10px 30px rgba(0, 0, 0, 0.5);
    color: var(--clr-accent);
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.9);
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.back-to-top:hover {
    background: rgba(40, 40, 40, 0.8);
    border-color: rgba(255, 215, 0, 0.5);
    transform: translateY(-5px) scale(1.05);
    box-shadow:
        inset 0 0 20px rgba(255, 255, 255, 0.1),
        0 15px 40px rgba(255, 215, 0, 0.15);
}

.back-to-top:active {
    transform: translateY(0) scale(0.95);
}

/* Mobile Adjustments for Back to Top */
@media screen and (max-width: 768px) {
    .back-to-top {
        width: 50px;
        height: 50px;
        bottom: calc(85px + env(safe-area-inset-bottom));
        /* Above mobile nav */
        right: 15px;
        font-size: 20px;
    }
}


.feat-panel h4 {
    font-size: var(--text-fluid-xl);
    margin-bottom: 10px;
}

/* Pricing */
.tier-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    align-items: stretch;
}

@media (min-width: 1024px) {
    .tier-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }
}

.tier-card {
    background: var(--clr-card);
    backdrop-filter: blur(20px);
    padding: var(--space-fluid-md);
    border-radius: 30px;
    border: 1px solid var(--clr-border);
    text-align: center;
    display: flex;
    flex-direction: column;
}

.tier-card.featured {
    background: linear-gradient(135deg, var(--clr-accent), #9b0000);
    color: #fff;
    position: relative;
    border: none;
    margin: 20px 0;
}

@media (min-width: 1024px) {
    .tier-card.featured {
        transform: scale(1.05);
        margin: 0;
        z-index: 10;
        box-shadow: 0 30px 60px rgba(255, 46, 46, 0.3);
    }
}

.tier-price {
    font-size: var(--text-fluid-3xl);
    font-weight: 900;
    margin: 20px 0;
}

.tier-price span {
    font-size: 1rem;
    opacity: 0.8;
}

.tier-list {
    list-style: none;
    flex-grow: 1;
}

.tier-list li {
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: var(--text-fluid-base);
}

.tier-list li span {
    font-size: 0.8rem;
}

.badge-free {
    display: block;
    width: max-content;
    margin: 15px auto 0; /* Creates balanced space above the badge, and centers it */
    background: var(--clr-gold, #FFD700);
    color: #000;
    padding: 6px 20px;
    border-radius: 8px;
    font-size: 1.6rem;
    font-weight: 900;
    letter-spacing: 2px;
    box-shadow: 0 6px 15px rgba(255, 215, 0, 0.4);
}

.tier-list li:last-child {
    border-bottom: none;
}

.popular-tag {
    position: absolute;
    top: -15px;
    right: 20px;
    font-size: 0.7rem;
    font-weight: 900;
    background: #000;
    color: #fff;
    padding: 8px 15px;
    border-radius: 20px;
}

/* FAQ Updated */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.faq-list .glass-frame h3 {
    font-size: var(--text-fluid-lg);
}

.faq-list .glass-frame p {
    font-size: var(--text-fluid-base);
}

/* Closing V2 */
.closing-v2 {
    padding: var(--space-fluid-section) 0;
}

.final-headline {
    font-size: var(--text-fluid-4xl);
    margin-bottom: 30px;
}

.btn-mega {
    display: inline-flex;
    padding: 20px 30px;
    font-size: var(--text-fluid-lg);
    font-weight: 900;
    background: white;
    color: black;
    text-decoration: none;
    border-radius: 100px;
    box-shadow: 0 0 50px rgba(255, 255, 255, 0.2);
    transition: 0.5s;
    border: none;
    width: 100%;
    align-items: center;
    justify-content: center;
    text-align: center;
    /* SKILL: touch */
    min-height: 60px;
}

@media (min-width: 768px) {
    .btn-mega {
        padding: 25px 60px;
        width: auto;
        font-size: var(--text-fluid-xl);
    }
}

/* Footer */
.minimal-footer {
    padding: var(--space-fluid-md) 0;
    border-top: 1px solid var(--clr-border);
    position: relative;
    z-index: 2;
    background-color: var(--clr-bg);
}

.minimal-footer .grid {
    text-align: center;
}

@media (min-width: 768px) {
    .minimal-footer .grid {
        text-align: left;
    }
}

.f-brand p,
.f-contact p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
    font-size: var(--text-fluid-base);
    line-height: 1.6;
}