/* Import Onest Font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Onest:wght@400;500;700&display=swap');

/* Swiss Design System - Strict Layout Rules */
:root {
    /* 1. Grid System */
    --grid-desktop: repeat(4, 1fr);
    --grid-mobile: repeat(2, 1fr);
    --grid-gap-desktop: 2vw;
    /* Fluid gap */
    --grid-gap-mobile: 4vw;

    /* 2. Colors - Minimalist Swiss Palette */
    --color-bg: #FFFFFF;
    --color-text: #000000;
    --color-gray: #888888;
    --color-light-gray: #F4F4F4;
    --color-brand: #000000;
    --color-blue: #003FAB;
    /* Brand blue accent color */
    --color-accent: #003FAB;

    /* 3. Typography - Fluid Scale (Reduced) */
    /* Clamp(min, preferred, max) */
    --font-h1: clamp(3.375rem, 8.1vw, 6.075rem);
    --font-h2: clamp(2.375rem, 5.4vw, 4.05rem);
    --font-h3: clamp(1.25rem, 2.5vw, 2rem);
    --font-h4: clamp(0.75rem, 1.2vw, 0.875rem);
    --font-body: clamp(0.875rem, 1vw, 1.05rem);

    --line-height-heading: 1.1;
    --line-height-body: 1.5;

    /* 4. Spacing System (The Rhythm) */
    /* Scales down on mobile */
    --space-2: clamp(8px, 1vw, 16px);
    /* XS */
    --space-3: clamp(16px, 2vw, 24px);
    /* S */
    --space-4: clamp(32px, 4vw, 48px);
    /* M */
    --space-5: clamp(64px, 8vw, 96px);
    /* L */
    --space-6: clamp(96px, 12vw, 160px);
    /* XL */
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: 'Onest', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: var(--line-height-body);
    font-size: var(--font-body);
    letter-spacing: -0.015em;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

ul {
    list-style: none;
}

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

/* Typography Utilities */
.h1 {
    font-size: var(--font-h1);
    line-height: 1;
    font-weight: 700;
    letter-spacing: -0.04em;
}

.h2 {
    font-size: var(--font-h2);
    line-height: 1.0;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.h3 {
    font-size: var(--font-h3);
    line-height: 1;
    font-weight: 500;
    letter-spacing: -0.03em;
}

.h4 {
    font-size: var(--font-h4);
    line-height: 1.4;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.body {
    font-size: var(--font-body);
    line-height: var(--line-height-body);
    font-weight: 400;
    text-wrap: balance;
}

/* Spacing Utilities */
.mt-2 {
    margin-top: var(--space-2);
}

.mt-3 {
    margin-top: var(--space-3);
}

.mt-4 {
    margin-top: var(--space-4);
}

.mt-5 {
    margin-top: var(--space-5);
}

.mt-6 {
    margin-top: var(--space-6);
}


.mb-2 {
    margin-bottom: var(--space-2);
}

.mb-3 {
    margin-bottom: var(--space-3);
}

.mb-4 {
    margin-bottom: var(--space-4);
}

.mb-5 {
    margin-bottom: var(--space-5);
}

.mb-6 {
    margin-bottom: var(--space-6);
}

/* Grid Layout System */
.container {
    max-width: 100%;
    margin: 0 auto;
}

.grid {
    display: grid;
    grid-template-columns: var(--grid-mobile);
    gap: var(--grid-gap-mobile);
}

@media (min-width: 768px) {
    .container {
        padding-left: var(--grid-gap-desktop);
        padding-right: var(--grid-gap-desktop);
    }

    .grid {
        grid-template-columns: var(--grid-desktop);
        gap: var(--grid-gap-desktop);
    }
}

@media (max-width: 767px) {
    .container {
        padding-left: var(--grid-gap-mobile);
        padding-right: var(--grid-gap-mobile);
    }
}

/* Debug Grid */
.debug-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
}

.debug-grid .container {
    height: 100%;
    display: grid;
    grid-template-columns: var(--grid-mobile);
    gap: var(--grid-gap-mobile);
}

@media (min-width: 768px) {
    .debug-grid .container {
        grid-template-columns: var(--grid-desktop);
        gap: var(--grid-gap-desktop);
    }
}

.debug-col {
    background: rgba(255, 0, 0, 0.05);
    border-left: 1px solid rgba(255, 0, 0, 0.1);
    height: 100%;
}

/* Power Line Alignment Utilities (Grid Placement) */
.col-span-full {
    grid-column: 1 / -1;
}

.col-span-1 {
    grid-column: span 1;
}

.col-span-2 {
    grid-column: span 2;
}

.col-span-3 {
    grid-column: span 3;
}

.col-start-1 {
    grid-column-start: 1;
}

.col-start-2 {
    grid-column-start: 2;
}

.col-start-3 {
    grid-column-start: 3;
}

.col-start-4 {
    grid-column-start: 4;
}

/* Specific Components */

/* Header */
.header {
    padding: var(--space-3) 0;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: transparent;
}

.header__logo {
    width: 150px;
    height: auto;
}

.header__action {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

/* Sections */
.section {
    padding-top: var(--space-6);
    padding-bottom: var(--space-6);
    border-top: 1px solid rgba(0, 0, 0, 0.2);
}

.section:first-of-type {
    border-top: none;
}

/* Hero */
.hero {
    height: 100vh;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.hero__video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero__content {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: var(--space-4);
}

.hero__title {
    color: white;
    margin-bottom: var(--space-3);
}

.hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    padding-top: var(--space-3);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.hero__meta-item {
    color: white;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: var(--space-2) var(--space-4);
    border: 1px solid var(--color-text);
    text-transform: uppercase;
    font-size: var(--font-h4);
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
}

.btn:hover {
    background: var(--color-text);
    color: var(--color-bg);
}

.btn--white {
    background: white;
    color: black;
    border-color: white;
}

.btn--white:hover {
    background: transparent;
    color: white;
    border-color: white;
}

.btn--blue {
    background: var(--color-blue);
    color: white;
    border-color: var(--color-blue);
}

/* Utility Classes */
.text-white {
    color: white;
}

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

.text-muted {
    opacity: 0.5;
}

/* Footer */
.footer {
    background: var(--color-text);
    color: var(--color-bg);
    padding: var(--space-6) var(--space-3);
}

.footer__links {
    display: flex;
    gap: var(--space-4);
}

.footer__copyright {
    opacity: 0.5;
}

/* Numbered Circle (small 32px) */
.num-circle-sm {
    width: 32px;
    height: 32px;
    border: 1px solid currentColor;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-4);
    opacity: 0.5;
    font-size: 0.75rem;
}

/* Numbered Circle (large 48px) */
.num-circle {
    width: 48px;
    height: 48px;
    border: 1px solid currentColor;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-3);
}

/* List Item with Number */
.list-item {
    display: flex;
    gap: var(--space-2);
}

.list-item__num {
    min-width: 24px;
    opacity: 0.5;
}

/* Testimonial Separator */
.testimonial__separator {
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.2);
    margin-bottom: var(--space-2);
}

/* Program Date Pill */
.program-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border: 1px solid white;
    border-radius: 50px;
    margin-bottom: var(--space-3);
}

/* Section Backgrounds */
.section--blue {
    background-color: var(--color-blue);
    color: white;
}

.section--gray {
    background-color: var(--color-light-gray);
}

/* Inner 2-Column Grid */
.grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

.grid-3col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
}

.grid-4col {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-4);
}

/* Immersive Video Section */
.immersive-video {
    width: 100%;
    height: 50vh;
    min-height: 400px;
    position: relative;
    overflow: hidden;
}

.immersive-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Team Photo */
.team-photo {
    width: 100%;
    height: 60%;
    object-fit: cover;
    object-position: center top;
    margin-bottom: var(--space-4);
}

/* Section Image */
.section-image {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.section-image--tall {
    height: 600px;
}

/* FAQ Details */
.faq-item {
    break-inside: avoid;
    border-bottom: 1px solid black;
    padding-bottom: var(--space-2);
    margin-bottom: var(--space-2);
}

.faq-item summary {
    cursor: pointer;
    font-weight: 500;
}

.faq-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2) var(--space-4);
}

/* Pricing Divider */
.pricing-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    padding-top: var(--space-4);
}

/* Mobile Tweaks */
@media (max-width: 768px) {
    :root {
        --grid-gap: var(--grid-gap-mobile);

        /* Tighter vertical rhythm on mobile */
        --space-2: 6px;
        --space-3: 12px;
        --space-4: 20px;
        --space-5: 32px;
        --space-6: 48px;
    }

    .col-start-2,
    .col-start-3,
    .col-start-4 {
        grid-column-start: auto;
    }

    /* Cap col spans to max 2 on mobile */
    .col-span-2,
    .col-span-3,
    .col-span-4 {
        grid-column: span 2;
    }

    /* Hero mobile */
    .hero__meta {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-2);
        border-top: none;
        padding-top: 0;
    }

    /* Inner grids stack on mobile */
    .grid-3col {
        grid-template-columns: 1fr;
    }

    /* 4-col becomes 2-col on mobile (e.g. yacht specs) */
    .grid-4col {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-3);
        justify-items: start;
    }

    /* FAQ single column */
    .faq-columns {
        grid-template-columns: 1fr;
    }

    /* Section image height auto on mobile */
    .section-image--tall {
        height: auto;
    }
}

@media (max-width: 767px) {
    .desktop-only {
        display: none !important;
    }

    .h-mobile-large {
        height: 50vh !important;
        object-fit: cover;
    }
}

@media (min-width: 768px) {
    .mobile-only {
        display: none !important;
    }
}

/* Masonry Gallery */
.gallery-section {
    padding-left: 0;
    padding-right: 0;
    overflow: hidden;
}

.gallery-section .container {
    padding-left: var(--grid-gap-desktop);
    padding-right: var(--grid-gap-desktop);
}

.masonry-gallery {
    columns: 5;
    column-gap: 10px;
    width: 100%;
    margin-top: var(--space-4);
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 10px;
    border-radius: 0;
    overflow: hidden;
}

.masonry-item img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.masonry-item:hover img {
    transform: scale(1.03);
}

.gallery-load-more {
    text-align: center;
    padding: var(--space-5) 0 0;
}

@media (max-width: 768px) {
    .gallery-section .container {
        padding-left: var(--grid-gap-mobile);
        padding-right: var(--grid-gap-mobile);
    }

    .masonry-gallery {
        columns: 3;
        column-gap: 6px;
    }

    .masonry-item {
        margin-bottom: 6px;
    }
}

/* Footer Theme */
.footer-blue {
    background-color: var(--color-blue);
    color: var(--color-white);
}

.footer-blue .text-muted {
    color: rgba(255, 255, 255, 0.6) !important;
}

.footer-blue a {
    color: var(--color-white);
}

/* Immersive Image (replaces video) */
.immersive-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}