/* Explain: Styles for site sections, header, mobile panel, and footer layout. */
/* ---------- Section rhythm ---------- */
.section {
    position: relative;
    padding: clamp(4rem, 8vw, 7.5rem) 1.25rem;
    scroll-margin-top: 84px;
}

.section + .section {
    border-top: 1px solid var(--border-color);
}

.wrap {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
}

/* ---------- Mobile: every opened view clears the fixed header ---------- */
@media (max-width: 1023px) {
    .section:not(.section--wheel) {
        padding-top: calc(var(--mvm-header-h, 88px) + 1.75rem);
        scroll-margin-top: calc(var(--mvm-header-h, 88px) + 1rem);
    }

    .section:not(.section--wheel),
    .hero,
    .site-footer {
        padding-left: max(1.25rem, env(safe-area-inset-left, 0px));
        padding-right: max(1.25rem, env(safe-area-inset-right, 0px));
    }

    .site-footer {
        padding-bottom: calc(2rem + env(safe-area-inset-bottom, 0px));
    }

    .section,
    .hero,
    .page-hero {
        overflow-wrap: break-word;
    }

    .contact-value,
    .footer-link,
    .form-note,
    .form-status {
        overflow-wrap: anywhere;
    }

    .btn-gold,
    .btn-ghost {
        max-width: 100%;
    }

    .pillar,
    .train-card,
    .contact-card,
    .contact-form,
    .coach-bio,
    .contact-aside {
        min-width: 0;
    }
}

/* ---------- Bright ivory / platinum sections ---------- */
.section--philosophy,
.section--training,
.section--contact {
    --text-color: #242424;
    --text-muted: #6B6B6B;
    --primary-color: #A9874F;
    --secondary-color: #8A8A8A;
    --accent-color: #C5A46D;
    --border-color: rgba(36, 36, 36, 0.1);
    --border-strong: rgba(197, 164, 109, 0.5);
    --surface-card: linear-gradient(180deg, #FFFFFF 0%, #F7F5F0 100%);
    --field-bg: #FFFFFF;
    --metal-gradient: linear-gradient(160deg, #242424 0%, #6B6B6B 30%, #C5A46D 52%, #34383E 74%, #242424 100%);
    --metal-text-gradient: linear-gradient(120deg, #A9874F 0%, #C5A46D 36%, #E2CDA2 66%, #A9874F 100%);
    --shadow-lift: 0 30px 60px -40px rgba(36, 36, 36, 0.28);
    --success-color: #1F6B45;
    --error-color: #A32B2B;
    color: #242424;
}

.section--philosophy {
    background:
        radial-gradient(60% 60% at 100% 0%, #FFFFFF 0%, transparent 60%),
        radial-gradient(52% 52% at 0% 100%, rgba(197, 164, 109, 0.14) 0%, transparent 62%),
        linear-gradient(180deg, #FAF8F4 0%, #F0EDE6 100%);
}

.section--training {
    background:
        radial-gradient(60% 60% at 0% 0%, #FFFFFF 0%, transparent 60%),
        radial-gradient(55% 65% at 100% 100%, rgba(192, 192, 192, 0.35) 0%, transparent 62%),
        linear-gradient(180deg, #EFECE5 0%, #FAF8F4 100%);
}

.section--contact {
    background:
        radial-gradient(60% 70% at 10% 100%, rgba(197, 164, 109, 0.15) 0%, transparent 62%),
        radial-gradient(55% 55% at 95% 0%, #FFFFFF 0%, transparent 60%),
        linear-gradient(180deg, #FAF8F4 0%, #F0EDE6 100%);
}

/* ---------- Deep charcoal photographic sections ---------- */
.section--coach,
.section--studio,
.section--community {
    --text-color: #FFFFFF;
    --text-muted: #B8B8B8;
    --primary-color: #C5A46D;
    --secondary-color: #C0C0C0;
    --accent-color: #C5A46D;
    --border-color: rgba(192, 192, 192, 0.16);
    --border-strong: rgba(197, 164, 109, 0.5);
    --surface-card: linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.02) 100%);
    --field-bg: rgba(255, 255, 255, 0.06);
    --metal-gradient: linear-gradient(160deg, #FFFFFF 0%, #E8E9EA 28%, #C5A46D 52%, #E2CDA2 72%, #C0C0C0 100%);
    --metal-text-gradient: linear-gradient(120deg, #FFFFFF 0%, #E8E9EA 28%, #C5A46D 52%, #E2CDA2 72%, #C0C0C0 100%);
    color: #FFFFFF;
}

.section--coach {
    background:
        radial-gradient(65% 70% at 0% 40%, rgba(197, 164, 109, 0.15) 0%, transparent 62%),
        radial-gradient(60% 60% at 100% 0%, rgba(192, 192, 192, 0.1) 0%, transparent 60%),
        linear-gradient(180deg, #2B2B2B 0%, #242424 55%, #1C1C1C 100%);
}

.section--studio {
    background:
        radial-gradient(70% 60% at 50% 0%, rgba(197, 164, 109, 0.13) 0%, transparent 62%),
        radial-gradient(60% 60% at 0% 100%, rgba(192, 192, 192, 0.09) 0%, transparent 60%),
        linear-gradient(180deg, #1C1C1C 0%, #292929 100%);
}

/* ---------- Header ---------- */
.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 80;
    --text-color: #FFFFFF;
    --text-muted: #C7CBD1;
    border-bottom: 1px solid transparent;
    transition: background-color 0.4s ease, border-color 0.4s ease, backdrop-filter 0.4s ease;
}

.site-header.is-solid {
    background: rgba(28, 28, 28, 0.92);
    border-bottom-color: rgba(197, 164, 109, 0.32);
    backdrop-filter: blur(18px);
}

/* Keep the fixed bar clear of the iPhone notch / Dynamic Island. */
.site-header {
    padding-top: env(safe-area-inset-top, 0px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0.5rem 1.25rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
    min-height: 44px;
}

.brand-logo {
    display: block;
    width: auto;
    height: 56px;
    object-fit: contain;
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.7));
}

.header-inner .brand-logo {
    height: 72px;
}

@media (min-width: 1024px) {
    .header-inner .brand-logo {
        height: 92px;
    }
}

/* Header brand mark: show only the emblem + "Me Versus Me" lettering.
   The small tagline baked into the bottom of the artwork is hidden without
   scaling, squashing or otherwise touching the visible mark. */
.brand-logo-crop {
    display: block;
    flex: 0 0 auto;
    height: 60px;
    overflow: hidden;
    line-height: 0;
}

@media (min-width: 1024px) {
    .brand-logo-crop {
        height: 76px;
    }
}

.desk-nav {
    display: none;
    align-items: center;
    gap: 1.75rem;
}

@media (min-width: 1024px) {
    .desk-nav {
        display: flex;
    }
}

.nav-link {
    position: relative;
    padding: 0.35rem 0;
    font-family: var(--font-label);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    text-decoration: none;
    color: #C7CBD1;
    transition: color 0.25s ease;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 1px;
    background: var(--champagne-gradient);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: #FFFFFF;
}

.nav-link:hover::after {
    width: 100%;
}

.menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-color);
    font-size: 1rem;
    cursor: pointer;
    transition: border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.menu-btn:hover {
    border-color: var(--metallic-silver);
    color: var(--metallic-silver);
    box-shadow: 0 0 22px -8px rgba(197, 164, 109, 0.85);
}

@media (min-width: 1024px) {
    .menu-btn {
        display: none;
    }
}

/* ---------- Mobile panel ---------- */
.mobile-backdrop {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(12, 12, 12, 0.8);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.mobile-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

.mobile-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 95;
    display: flex;
    flex-direction: column;
    width: min(88vw, 400px);
    padding: 1.25rem 1.4rem 2rem;
    overflow-y: auto;
    background: linear-gradient(160deg, #2B2B2B 0%, #1C1C1C 100%);
    border-left: 1px solid var(--border-color);
    transform: translateX(102%);
    visibility: hidden;
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.45s ease;
}

.mobile-panel.is-open {
    transform: translateX(0);
    visibility: visible;
}

.mobile-panel {
    padding-top: calc(1.25rem + env(safe-area-inset-top, 0px));
    padding-bottom: calc(2rem + env(safe-area-inset-bottom, 0px));
}

.mobile-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.mobile-panel-logo {
    display: block;
    width: auto;
    height: 48px;
    object-fit: contain;
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.6));
}

.mobile-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    margin: 0 0 0 0.5rem;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #D9BD85;
    font-size: 1.45rem;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.25s ease, transform 0.25s ease;
}

.mobile-close i {
    display: block;
    font-size: 1.45rem;
    line-height: 1;
    color: inherit;
    background: none;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
}

.mobile-close:hover,
.mobile-close:focus-visible,
.mobile-close:active {
    border: 0;
    background: transparent;
    box-shadow: none;
    color: #F0D9A8;
}

.mobile-close:hover i,
.mobile-close:focus-visible i,
.mobile-close:active i {
    color: #F0D9A8;
}

.mobile-close:focus-visible {
    outline: 2px solid #D9BD85;
    outline-offset: 2px;
}

@media (max-width: 420px) {
    .mobile-close {
        width: 44px;
        height: 44px;
        margin-left: 0.35rem;
        font-size: 1.4rem;
    }

    .mobile-close i {
        font-size: 1.4rem;
    }
}

.mobile-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 54px;
    padding: 0.95rem 0.15rem;
    border-bottom: 1px solid var(--border-color);
    font-family: var(--font-label);
    font-size: 1.1rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    color: #E8EAED;
    transition: color 0.25s ease, padding-left 0.25s ease;
}

.mobile-link:hover {
    color: #C5A46D;
    padding-left: 0.4rem;
}

.mobile-link i {
    font-size: 0.72rem;
    color: #C5A46D;
}

.mobile-panel-foot {
    display: grid;
    gap: 0.85rem;
    margin-top: auto;
    padding-top: 1.75rem;
}

/* The phone / Instagram buttons sit on a dark charcoal panel, so they carry
   their own readable palette instead of the global text colour. */
.mobile-panel-foot .btn-ghost {
    background: #292929;
    border: 1.5px solid #C6AA73;
    color: #F5EBD8;
    opacity: 1;
}

.mobile-panel-foot .btn-ghost i {
    color: #D9BD85;
}

.mobile-panel-foot .btn-ghost:hover,
.mobile-panel-foot .btn-ghost:focus-visible,
.mobile-panel-foot .btn-ghost:active {
    background: #333333;
    border-color: #D9BD85;
    color: #FFFFFF;
}

.mobile-panel-foot .btn-ghost:hover i,
.mobile-panel-foot .btn-ghost:focus-visible i,
.mobile-panel-foot .btn-ghost:active i {
    color: #F0D9A8;
}

.mobile-panel-foot a.btn-ghost:visited {
    background: #292929;
    border-color: #C6AA73;
    color: #F5EBD8;
}

/* ---------- Split layout ---------- */
.split {
    display: grid;
    gap: 2.25rem;
}

@media (min-width: 900px) {
    .split--coach {
        grid-template-columns: 0.85fr 1.15fr;
        align-items: start;
        gap: 3.5rem;
    }
}

/* ---------- Contact layout ---------- */
.contact-grid {
    display: grid;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .contact-grid {
        grid-template-columns: 1.1fr 0.9fr;
        gap: 2.5rem;
        align-items: start;
    }
}

/* ---------- Footer ---------- */
.site-footer {
    padding: 3.5rem 1.25rem 2rem;
    border-top: 1px solid var(--border-color);
    background: linear-gradient(180deg, #242424 0%, #161616 100%);
    --text-color: #FFFFFF;
    --text-muted: #A9AEB6;
    --primary-color: #C5A46D;
}

.footer-grid {
    display: grid;
    gap: 2.5rem;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 1.4fr 1fr 1fr;
    }
}

.footer-title {
    margin-bottom: 1rem;
    font-family: var(--font-label);
    font-size: 0.78rem;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: #C5A46D;
}

.footer-link {
    display: block;
    padding: 0.35rem 0;
    font-size: 0.92rem;
    text-decoration: none;
    color: #C4C8CE;
    transition: color 0.25s ease;
}

.footer-link:hover {
    color: #FFFFFF;
}

.footer-link--legal {
    display: inline-block;
    padding: 0;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    color: #C5A46D;
}

.footer-link--legal:hover {
    color: #FFFFFF;
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.6rem 1.5rem;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.78rem;
    color: var(--text-muted);
}