:root {
    --navy: #0a1e3c;
    --navy-deep: #081830;
    --orange: #de673f;
    --slate: #a9bfca;
    --stone: #b5bbbd;
    --cream: #f8f5e6;
    --nav-link: #c8d7e0;
    --header-h: 100px;
    --gutter: clamp(16px, 4vw, 55px);
    --display: 'Alfa Slab One', Georgia, serif;
    --sans: 'Roboto', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
    margin: 0;
    font-family: var(--sans);
    background: var(--navy);
    color: var(--cream);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img { display: block; max-width: 100%; }
h1, h2, h3, h4, p { margin: 0; }

/* ---------- Header ---------- */
.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    height: var(--header-h);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--gutter);
    background: var(--navy);
    box-shadow: 0 10px 25px rgba(0, 0, 0, .25);
    transition: background-color .35s ease;
}
.site-header.scrolled { background: var(--orange); box-shadow: 0 4px 14px rgba(0, 0, 0, .15); }

.logo img { height: 52px; width: auto; }

.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a {
    color: var(--nav-link);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 300;
    letter-spacing: .01em;
    text-underline-offset: 5px;
    transition: opacity .2s;
}
.site-nav a:hover { opacity: .75; }
.site-nav a.active { text-decoration: underline; text-decoration-thickness: 1px; }
.site-nav .insta { display: flex; margin-left: 6px; }
.site-nav .insta svg { width: 32px; height: 32px; }

.nav-toggle {
    display: none;
    background: none;
    border: 0;
    width: 36px;
    height: 36px;
    padding: 6px;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
}
.nav-toggle span { display: block; height: 2px; background: var(--nav-link); border-radius: 2px; transition: transform .3s, opacity .3s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(10px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(var(--header-h) + 20px) var(--gutter) 40px;
    text-align: center;
}
.hero-title {
    font-family: var(--display);
    font-weight: 400;
    color: var(--stone);
    line-height: 1.12;
    filter: url(#rough);
}
.hero-title span { display: block; }
.hero-title .line1 { font-size: clamp(3rem, 12.4vw, 13rem); letter-spacing: .01em; }
.hero-title .line2 { font-size: clamp(2.2rem, 8.6vw, 9rem); margin-top: .35em; }

/* ---------- Intro ---------- */
.intro { padding: 50px var(--gutter) 130px; }
.intro-inner { width: fit-content; max-width: 100%; margin: 0 auto; }
.tagline {
    color: var(--orange);
    font-size: clamp(2.6rem, 7.4vw, 6rem);
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.1;
    text-align: center;
}
.intro-text {
    margin-top: 60px;
    font-size: clamp(1.4rem, 3.9vw, 3.1rem);
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.1;
}

/* ---------- Gallery mosaic ---------- */
.gallery-section { padding: 0 var(--gutter) 0; }
.gallery {
    display: grid;
    grid-template-columns: 835fr 372fr 231fr 372fr;
    grid-template-rows: 1fr 1fr;
    gap: 15px;
    aspect-ratio: 1840 / 840;
    margin-bottom: 15px;
}
.gallery.mirrored { direction: rtl; }
.gallery.mirrored .tile { direction: ltr; }
.tile { margin: 0; overflow: hidden; border-radius: 3px; background: rgba(255, 255, 255, .04); }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.tile:hover img { transform: scale(1.03); }
.tile-1 { grid-column: 1; grid-row: 1 / span 2; }
.tile-2 { grid-column: 2; grid-row: 1; }
.tile-3 { grid-column: 3 / 5; grid-row: 1; }
.tile-4 { grid-column: 2 / 4; grid-row: 2; }
.tile-5 { grid-column: 4; grid-row: 2; }

.gallery.count-4 .tile-4 { grid-column: 2 / 5; }
.gallery.count-3 { grid-template-columns: 1fr 1fr; }
.gallery.count-3 .tile-2 { grid-column: 2; grid-row: 1; }
.gallery.count-3 .tile-3 { grid-column: 2; grid-row: 2; }
.gallery.count-2 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; aspect-ratio: 2 / 1; }
.gallery.count-2 .tile-1, .gallery.count-2 .tile-2 { grid-row: 1; }
.gallery.count-2 .tile-2 { grid-column: 2; }
.gallery.count-1 { grid-template-columns: 1fr; grid-template-rows: 1fr; aspect-ratio: 16 / 7; }

.tile-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed rgba(169, 191, 202, .35);
    color: var(--slate);
    font-size: .9rem;
    text-align: center;
    padding: 12px;
}

/* ---------- Buttons ---------- */
.btn-wrap { display: flex; justify-content: center; padding: 15px 0 0; }
.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: min(410px, 100%);
    min-height: 64px;
    border: 4px solid #fff;
    color: #fff;
    text-decoration: none;
    font-size: .9rem;
    font-weight: 500;
    letter-spacing: .1em;
    transition: background-color .25s, color .25s;
}
.btn-outline:hover { background: #fff; color: var(--navy); }
.gallery-section .btn-wrap { padding-bottom: 90px; }

/* ---------- Section titles ---------- */
.section-title {
    color: var(--orange);
    font-size: clamp(3.2rem, 9.4vw, 7.5rem);
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.1;
    text-align: center;
}

/* ---------- Packages ---------- */
.packages {
    background: var(--slate);
    padding: 40px var(--gutter) 70px;
    text-align: center;
}
.pkg-note {
    color: var(--cream);
    font-size: clamp(1.6rem, 3.3vw, 2.7rem);
    font-weight: 400;
    margin-top: 30px;
}
.pkg-note + .pkg-note { margin-top: 20px; }
.pkg-highlight { margin-top: 10px; }
.pkg-highlight span {
    display: inline-block;
    position: relative;
    color: var(--navy);
    font-size: clamp(1.6rem, 3.3vw, 2.7rem);
    font-weight: 700;
    letter-spacing: -.01em;
    padding: 0 6px;
}
.pkg-highlight span::before,
.pkg-highlight span::after {
    content: '';
    position: absolute;
    left: -4px;
    right: -4px;
    height: 4px;
    background: var(--orange);
    border-radius: 2px;
}
.pkg-highlight span::before { top: 2px; transform: rotate(-.3deg); }
.pkg-highlight span::after { bottom: 2px; transform: rotate(.2deg); }

.pkg-grid {
    margin-top: 28px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    text-align: left;
}
.pkg-card {
    background: var(--navy);
    aspect-ratio: 448 / 366;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.pkg-card h3 {
    font-family: var(--display);
    font-weight: 400;
    color: var(--cream);
    font-size: clamp(2.2rem, 4.2vw, 3.7rem);
    line-height: 1.2;
    text-align: center;
}
.pkg-prices { list-style: none; margin: 10px 0 0; padding: 0; }
.pkg-prices li {
    color: var(--navy);
    font-size: clamp(1.1rem, 1.8vw, 1.55rem);
    line-height: 1.2;
    letter-spacing: -.015em;
}
.pkg-prices strong { font-weight: 500; }
.pkg-prices span { color: var(--orange); font-weight: 500; }

/* ---------- Workout times ---------- */
.workouts { padding: 40px var(--gutter) 60px; }
.schedule {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1300px;
    margin: 50px auto 0;
    text-align: center;
}
.schedule-group + .schedule-group { margin-top: 30px; }
.schedule-group h3 {
    color: var(--slate);
    font-weight: 400;
    font-size: clamp(2.8rem, 6vw, 6rem);
    line-height: 1.1;
    letter-spacing: -.01em;
}
.schedule-col:last-child .schedule-group h3 { font-size: clamp(2.4rem, 5vw, 5rem); }
.schedule-sub { font-size: clamp(1.05rem, 1.6vw, 1.4rem); margin-top: 18px; }
.schedule-group ul { list-style: none; margin: 14px 0 0; padding: 0; }
.schedule-group li {
    font-size: clamp(1.8rem, 3.2vw, 2.6rem);
    line-height: 1.45;
    font-variant-numeric: tabular-nums;
}

/* ---------- Sign up ---------- */
.signup { padding: 30px var(--gutter) 180px; }
.signup .btn-wrap { padding-top: 60px; }
.signup .btn-outline { width: min(605px, 100%); min-height: 94px; }

/* ---------- Footer ---------- */
.site-footer {
    background: var(--orange);
    clip-path: polygon(0 0, 100% 38px, 100% 100%, 0 100%);
    margin-top: -38px;
    padding: 130px var(--gutter) 90px;
    color: var(--navy);
}
.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 40px;
    align-items: start;
}
.site-footer h4 { font-weight: 400; font-size: 1.6rem; margin-bottom: 40px; }
.site-footer h4.big { font-size: 2.4rem; margin-bottom: 26px; }
.site-footer .muted { color: var(--slate); font-size: 1.15rem; line-height: 1.4; }
.footer-follow { padding-left: 10%; }
.footer-follow a {
    color: var(--navy);
    font-size: 1.7rem;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
}
.footer-follow a:hover { opacity: .75; }
.btn-phone {
    display: inline-block;
    margin-top: 6px;
    background: var(--navy);
    color: #fff;
    border: 4px solid #fff;
    padding: 18px 40px;
    text-decoration: none;
    font-size: .95rem;
    font-weight: 500;
    letter-spacing: .1em;
    transition: background-color .25s, color .25s;
}
.btn-phone:hover { background: #fff; color: var(--navy); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    :root { --header-h: 76px; }
    .logo img { height: 44px; }
    .nav-toggle { display: flex; }
    .site-nav {
        position: absolute;
        top: var(--header-h);
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        background: inherit;
        background-color: var(--navy);
        max-height: 0;
        overflow: hidden;
        transition: max-height .35s ease;
    }
    .site-header.scrolled .site-nav { background-color: var(--orange); }
    .site-nav.open { max-height: 320px; box-shadow: 0 12px 20px rgba(0, 0, 0, .2); }
    .site-nav a { padding: 16px var(--gutter); width: 100%; font-size: 1.15rem; }
    .site-nav .insta { margin: 0; }

    .intro { padding-bottom: 80px; }
    .intro-text { margin-top: 36px; }

    .gallery,
    .gallery.count-1, .gallery.count-2, .gallery.count-3, .gallery.count-4 {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: none;
        grid-auto-rows: 42vw;
        aspect-ratio: auto;
        direction: ltr;
        gap: 10px;
    }
    .gallery .tile { grid-column: auto !important; grid-row: auto !important; }
    .gallery .tile-1 { grid-column: 1 / -1 !important; grid-row: span 2 !important; }
    .gallery.count-2 .tile-2, .gallery.count-4 .tile-4 { grid-column: 1 / -1 !important; }

    .schedule { grid-template-columns: 1fr; gap: 40px; }
    .footer-grid { grid-template-columns: 1fr; gap: 50px; }
    .footer-follow { padding-left: 0; }
    .site-footer h4 { margin-bottom: 16px; }
    .signup { padding-bottom: 120px; }
}

@media (max-width: 480px) {
    .pkg-grid { grid-template-columns: 1fr; }
}
