/*
Theme Name: FORGE FITNESS
Theme URI: https://forgefitness.example.com
Author: NextCatalyst LLC
Author URI: https://nextcatalyst.example.com
Description: A premium custom theme for FORGE FITNESS - a personal training gym in Ebisu, Tokyo. Built with ACF + custom templates.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: forge-fitness
Tags: custom-theme, personal-gym, fitness, dark-theme, acf
*/

/* ============================================================
   CSS Custom Properties
============================================================ */
:root {
    --ff-dark:       #1a1a2e;
    --ff-dark-mid:   #16213e;
    --ff-dark-deep:  #0f0f1e;
    --ff-accent:     #e94560;
    --ff-accent-hover: #d63a55;
    --ff-text-light: #eeeeee;
    --ff-text-muted: rgba(238, 238, 238, 0.6);
    --ff-text-muted-more: rgba(238, 238, 238, 0.45);
    --ff-bg-light:   #f8f9fa;
    --ff-text-dark:  #1a1a2e;
    --ff-text-dark-muted: rgba(26, 26, 46, 0.65);
    --ff-border-light: rgba(255, 255, 255, 0.08);
    --ff-border-dark:  rgba(0, 0, 0, 0.1);
    --ff-card-bg:    rgba(255, 255, 255, 0.04);
    --ff-radius-md:  12px;
    --ff-radius-lg:  16px;
    --ff-radius-xl:  20px;
    --ff-shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);
    --ff-shadow-card-hover: 0 12px 48px rgba(0, 0, 0, 0.5);
    --ff-transition: 0.3s ease;
    --ff-container:  1100px;
    --ff-header-height: 72px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--ff-header-height) + 16px);
    font-size: 16px;
}

body {
    font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'YuGothic', 'Yu Gothic', sans-serif;
    background-color: var(--ff-dark);
    color: var(--ff-text-light);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--ff-transition);
}

ul {
    list-style: none;
}

/* ============================================================
   Typography
============================================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.75rem); }

p {
    line-height: 1.8;
}

/* ============================================================
   Layout Utilities
============================================================ */
.ff-container {
    width: 100%;
    max-width: var(--ff-container);
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
}

.ff-container--narrow {
    max-width: 760px;
}

.ff-container--wide {
    max-width: 1280px;
}

.ff-section {
    padding: 96px 0;
}

.ff-section--sm {
    padding: 64px 0;
}

.ff-section-header {
    text-align: center;
    margin-bottom: 64px;
}

.ff-section-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--ff-accent);
    margin-bottom: 16px;
}

/* ============================================================
   Header
============================================================ */
.ff-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--ff-header-height);
    display: flex;
    align-items: center;
    transition: background var(--ff-transition), box-shadow var(--ff-transition), backdrop-filter var(--ff-transition);
    background: transparent;
}

.ff-header.is-scrolled {
    background: rgba(15, 15, 30, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 2px 24px rgba(0, 0, 0, 0.4);
}

.ff-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: var(--ff-container);
    margin: 0 auto;
    padding: 0 24px;
}

.ff-header__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    color: var(--ff-text-light);
    text-transform: uppercase;
}

.ff-header__logo .ff-logo-icon {
    color: var(--ff-accent);
    font-size: 1.4rem;
}

.ff-header__logo .ff-logo-accent {
    color: var(--ff-accent);
}

.ff-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ff-nav a {
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(238, 238, 238, 0.8);
    border-radius: 6px;
    transition: color var(--ff-transition), background var(--ff-transition);
}

.ff-nav a:hover {
    color: var(--ff-text-light);
    background: rgba(255, 255, 255, 0.08);
}

.ff-nav a.is-current {
    color: var(--ff-accent);
}

.ff-header__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: var(--ff-accent);
    color: #fff !important;
    font-size: 0.875rem;
    font-weight: 700;
    border-radius: 50px;
    transition: background var(--ff-transition), transform var(--ff-transition), box-shadow var(--ff-transition);
}

.ff-header__cta:hover {
    background: var(--ff-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(233, 69, 96, 0.4);
}

.ff-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    background: none;
    border: none;
    color: var(--ff-text-light);
}

.ff-hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: currentColor;
    transition: transform var(--ff-transition), opacity var(--ff-transition);
}

.ff-hamburger.is-active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.ff-hamburger.is-active span:nth-child(2) {
    opacity: 0;
}

.ff-hamburger.is-active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ============================================================
   Footer
============================================================ */
.ff-footer {
    background: var(--ff-dark-deep);
    border-top: 1px solid var(--ff-border-light);
    padding: 64px 0 32px;
}

.ff-footer__grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.ff-footer__brand .ff-footer__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    color: var(--ff-text-light);
    text-transform: uppercase;
    margin-bottom: 16px;
}

.ff-footer__brand .ff-logo-icon {
    color: var(--ff-accent);
}

.ff-footer__brand p {
    font-size: 0.875rem;
    color: var(--ff-text-muted);
    line-height: 1.7;
    margin-bottom: 20px;
}

.ff-footer__social {
    display: flex;
    gap: 12px;
}

.ff-footer__social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--ff-border-light);
    color: var(--ff-text-muted);
    font-size: 0.9rem;
    transition: all var(--ff-transition);
}

.ff-footer__social a:hover {
    border-color: var(--ff-accent);
    color: var(--ff-accent);
    background: rgba(233, 69, 96, 0.1);
}

.ff-footer__col h4 {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ff-text-light);
    margin-bottom: 20px;
}

.ff-footer__col ul li {
    margin-bottom: 10px;
}

.ff-footer__col ul li a {
    font-size: 0.875rem;
    color: var(--ff-text-muted);
    transition: color var(--ff-transition);
}

.ff-footer__col ul li a:hover {
    color: var(--ff-accent);
}

.ff-footer__col .ff-footer__contact-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.875rem;
    color: var(--ff-text-muted);
    margin-bottom: 12px;
}

.ff-footer__col .ff-footer__contact-item i {
    color: var(--ff-accent);
    margin-top: 3px;
    flex-shrink: 0;
}

.ff-footer__bottom {
    border-top: 1px solid var(--ff-border-light);
    padding-top: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.ff-footer__bottom p {
    font-size: 0.8rem;
    color: var(--ff-text-muted-more);
}

.ff-footer__bottom-links {
    display: flex;
    gap: 20px;
}

.ff-footer__bottom-links a {
    font-size: 0.8rem;
    color: var(--ff-text-muted-more);
    transition: color var(--ff-transition);
}

.ff-footer__bottom-links a:hover {
    color: var(--ff-accent);
}

/* ============================================================
   Buttons
============================================================ */
.ff-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 36px;
    font-size: 0.9375rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: all var(--ff-transition);
    border: 2px solid transparent;
    line-height: 1;
    white-space: nowrap;
}

.ff-btn--primary {
    background: var(--ff-accent);
    color: #fff;
    border-color: var(--ff-accent);
}

.ff-btn--primary:hover {
    background: var(--ff-accent-hover);
    border-color: var(--ff-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(233, 69, 96, 0.4);
    color: #fff;
}

.ff-btn--outline {
    background: transparent;
    color: var(--ff-text-light);
    border-color: rgba(238, 238, 238, 0.4);
}

.ff-btn--outline:hover {
    border-color: var(--ff-text-light);
    background: rgba(238, 238, 238, 0.08);
    color: var(--ff-text-light);
}

.ff-btn--outline-accent {
    background: transparent;
    color: var(--ff-accent);
    border-color: var(--ff-accent);
}

.ff-btn--outline-accent:hover {
    background: var(--ff-accent);
    color: #fff;
}

.ff-btn--lg {
    padding: 18px 48px;
    font-size: 1rem;
}

.ff-btn--sm {
    padding: 10px 24px;
    font-size: 0.8125rem;
}

.ff-btn--full {
    width: 100%;
}

/* ============================================================
   Cards
============================================================ */
.ff-card {
    background: var(--ff-card-bg);
    border: 1px solid var(--ff-border-light);
    border-radius: var(--ff-radius-lg);
    padding: 40px 32px;
    transition: all var(--ff-transition);
}

.ff-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--ff-shadow-card-hover);
    border-color: rgba(233, 69, 96, 0.35);
}

.ff-card--white {
    background: #fff;
    border-color: transparent;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
    color: var(--ff-text-dark);
}

.ff-card--white:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border-color: rgba(233, 69, 96, 0.2);
}

.ff-card--featured {
    background: var(--ff-dark);
    border: 2px solid var(--ff-accent);
    box-shadow: 0 0 40px rgba(233, 69, 96, 0.2);
}

.ff-card--featured:hover {
    box-shadow: 0 0 60px rgba(233, 69, 96, 0.35);
}

/* ============================================================
   Headings
============================================================ */
.ff-heading {
    color: var(--ff-text-light);
    font-weight: 700;
}

.ff-heading--dark {
    color: var(--ff-text-dark);
}

.ff-heading--accent {
    color: var(--ff-accent);
}

/* ============================================================
   Page Header (inner pages)
============================================================ */
.ff-page-header {
    padding-top: calc(var(--ff-header-height) + 60px);
    padding-bottom: 80px;
    background:
        linear-gradient(135deg, rgba(10, 10, 20, 0.9) 0%, rgba(26, 26, 46, 0.85) 100%),
        url('./assets/images/training-02.jpg') center / cover no-repeat;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.ff-page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 40px,
            rgba(255,255,255,0.02) 40px,
            rgba(255,255,255,0.02) 41px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 40px,
            rgba(255,255,255,0.02) 40px,
            rgba(255,255,255,0.02) 41px
        );
    pointer-events: none;
}

.ff-page-header__label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(233, 69, 96, 0.15);
    color: var(--ff-accent);
    border: 1px solid rgba(233, 69, 96, 0.3);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.ff-page-header h1 {
    color: var(--ff-text-light);
    margin-bottom: 16px;
    position: relative;
}

.ff-page-header p {
    color: var(--ff-text-muted);
    font-size: 1.0625rem;
    max-width: 560px;
    margin: 0 auto;
    position: relative;
}

/* ============================================================
   Scroll Animation
============================================================ */
.ff-animate {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.ff-animate.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.ff-animate--left {
    opacity: 0;
    transform: translateX(-32px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.ff-animate--left.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.ff-animate--right {
    opacity: 0;
    transform: translateX(32px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.ff-animate--right.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.ff-animate-delay-1 { transition-delay: 0.1s; }
.ff-animate-delay-2 { transition-delay: 0.2s; }
.ff-animate-delay-3 { transition-delay: 0.3s; }
.ff-animate-delay-4 { transition-delay: 0.4s; }

/* ============================================================
   Utility Classes
============================================================ */
.ff-section--alt {
    background: var(--ff-dark-mid);
}

.ff-section-subtitle {
    color: var(--ff-text-muted);
    margin-top: 16px;
    font-size: 1.0625rem;
}

.ff-section-label--mb {
    margin-bottom: 8px;
}

.ff-button-group {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
}

/* ============================================================
   CTA Section
============================================================ */
.ff-cta-section {
    background: linear-gradient(135deg, var(--ff-accent) 0%, #c73a52 100%);
    padding: 96px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.ff-cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.ff-cta-section h2 {
    color: #fff;
    margin-bottom: 16px;
    position: relative;
}

.ff-cta-section p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.0625rem;
    margin-bottom: 40px;
    position: relative;
}

.ff-cta-section .ff-btn--white {
    background: #fff;
    color: var(--ff-accent);
    border-color: #fff;
}

.ff-cta-section .ff-btn--white:hover {
    background: transparent;
    color: #fff;
    border-color: #fff;
}

.ff-cta-section__inner {
    position: relative;
}

.ff-cta-section__label {
    color: rgba(255, 255, 255, 0.8);
}

.ff-cta-section__note {
    margin-top: 24px;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
}

.ff-btn--outline-white {
    border-color: rgba(255, 255, 255, 0.6);
    color: #fff;
}

.ff-btn--outline-white:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* ============================================================
   Badge
============================================================ */
.ff-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.ff-badge--accent {
    background: var(--ff-accent);
    color: #fff;
}

.ff-badge--outline {
    border: 1px solid var(--ff-border-light);
    color: var(--ff-text-muted);
}

.ff-badge--popular {
    background: linear-gradient(135deg, #f6a623, #e94560);
    color: #fff;
}

/* ============================================================
   Divider
============================================================ */
.ff-divider {
    border: none;
    border-top: 1px solid var(--ff-border-light);
    margin: 40px 0;
}

.ff-divider--light {
    border-top-color: var(--ff-border-dark);
}

/* ============================================================
   Accessibility
============================================================ */
:focus-visible {
    outline: 2px solid var(--ff-accent);
    outline-offset: 3px;
}

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

/* ============================================================
   Responsive
============================================================ */
@media (max-width: 1024px) {
    .ff-footer__grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    :root {
        --ff-header-height: 64px;
    }

    .ff-section {
        padding: 72px 0;
    }

    .ff-nav,
    .ff-header__cta {
        display: none;
    }

    .ff-hamburger {
        display: flex;
    }

    .ff-footer__grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .ff-footer__bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .ff-section {
        padding: 56px 0;
    }

    .ff-container {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* ============================================================
   Mobile Nav Overlay
============================================================ */
.ff-mobile-nav {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(15, 15, 30, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding-top: var(--ff-header-height);
}

.ff-mobile-nav.is-open {
    display: flex;
}

.ff-mobile-nav a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ff-text-light);
    padding: 12px 24px;
    border-radius: 8px;
    transition: color var(--ff-transition);
}

.ff-mobile-nav a:hover {
    color: var(--ff-accent);
}

.ff-mobile-nav .ff-btn {
    margin-top: 16px;
}
