/* ============================================================
   BRONTË SPRINGS — Private Estate on the Brontë River
   Colour Palette: Earth, stone, mist, aged linen
   Typography: Cormorant Garamond + Jost
   ============================================================ */

/* --- Custom Properties --- */
:root {
    /* Earth tones */
    --color-earth:       #3d3426;
    --color-bark:        #5c4a3a;
    --color-stone:       #8a7d6b;
    --color-lichen:      #a09478;
    --color-linen:       #e8e0d4;
    --color-parchment:   #f5f0e8;
    --color-cream:       #faf8f4;
    --color-mist:        #f0ede7;
    --color-white:       #fdfcfa;

    /* Accent */
    --color-moss:        #6b7c5e;
    --color-heather:     #7d6b7a;

    /* Typography */
    --font-heading: 'Cormorant Garamond', 'Georgia', serif;
    --font-body:    'Jost', 'Helvetica Neue', sans-serif;

    /* Spacing */
    --space-xs:  0.5rem;
    --space-sm:  1rem;
    --space-md:  2rem;
    --space-lg:  4rem;
    --space-xl:  8rem;
    --space-xxl: 12rem;

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
    --duration: 0.6s;
    --duration-slow: 1.2s;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-weight: 300;
    color: var(--color-earth);
    background-color: var(--color-cream);
    line-height: 1.7;
    letter-spacing: 0.01em;
    overflow-x: hidden;
}

::selection {
    background-color: var(--color-linen);
    color: var(--color-earth);
}

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

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

ul {
    list-style: none;
}

/* --- Preloader --- */
#preloader {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: var(--color-cream);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s var(--ease-out), visibility 0.8s;
}

#preloader.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-text {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 300;
    color: var(--color-bark);
    letter-spacing: 0.15em;
    animation: preloaderPulse 2s var(--ease-in-out) infinite;
}

@keyframes preloaderPulse {
    0%, 100% { opacity: 0.3; }
    50%      { opacity: 1; }
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 300;
    line-height: 1.15;
}

h2 {
    font-size: clamp(2.2rem, 5vw, 4rem);
    letter-spacing: -0.01em;
    color: var(--color-earth);
}

h3 {
    font-size: clamp(1.3rem, 2vw, 1.6rem);
    color: var(--color-bark);
    margin-bottom: var(--space-sm);
}

p {
    max-width: 38em;
    margin-bottom: var(--space-sm);
}

.lead {
    font-size: clamp(1.05rem, 1.5vw, 1.2rem);
    line-height: 1.8;
    color: var(--color-bark);
}

.section-label {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--color-stone);
    margin-bottom: var(--space-md);
    position: relative;
    padding-left: 3rem;
}

.section-label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 2rem;
    height: 1px;
    background: var(--color-lichen);
}

.section-label--light {
    color: var(--color-linen);
}

.section-label--light::before {
    background: rgba(232, 224, 212, 0.4);
}

/* --- Container --- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* --- Navigation --- */
#main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: var(--space-md) 0;
    transition: background var(--duration) var(--ease-out),
                padding var(--duration) var(--ease-out),
                backdrop-filter var(--duration) var(--ease-out);
}

#main-nav.is-scrolled {
    background: rgba(253, 252, 250, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: var(--space-sm) 0;
    box-shadow: 0 1px 0 rgba(61, 52, 38, 0.06);
}

.nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    color: var(--color-cream);
    transition: color var(--duration) var(--ease-out);
}

.logo-sub {
    font-family: var(--font-body);
    font-size: 0.55rem;
    font-weight: 300;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(250, 248, 244, 0.6);
    transition: color var(--duration) var(--ease-out);
}

#main-nav.is-scrolled .logo-text {
    color: var(--color-earth);
}

#main-nav.is-scrolled .logo-sub {
    color: var(--color-stone);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.nav-links a {
    font-size: 0.75rem;
    font-weight: 300;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(250, 248, 244, 0.7);
    transition: color 0.3s var(--ease-out);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width 0.4s var(--ease-out);
}

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

.nav-links a:hover {
    color: var(--color-cream);
}

#main-nav.is-scrolled .nav-links a {
    color: var(--color-stone);
}

#main-nav.is-scrolled .nav-links a:hover {
    color: var(--color-earth);
}

.nav-cta {
    padding: 0.6em 1.5em;
    border: 1px solid rgba(250, 248, 244, 0.25);
    transition: border-color 0.3s var(--ease-out), color 0.3s var(--ease-out);
}

.nav-cta::after {
    display: none;
}

.nav-cta:hover {
    border-color: rgba(250, 248, 244, 0.6);
}

#main-nav.is-scrolled .nav-cta {
    border-color: var(--color-linen);
}

#main-nav.is-scrolled .nav-cta:hover {
    border-color: var(--color-bark);
    color: var(--color-earth);
}

/* Nav toggle (mobile) */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 28px;
    height: 20px;
    position: relative;
    z-index: 1001;
}

.nav-toggle-bar {
    display: block;
    width: 100%;
    height: 1px;
    background: var(--color-cream);
    position: absolute;
    left: 0;
    transition: transform 0.4s var(--ease-out), opacity 0.3s, background 0.3s;
}

.nav-toggle-bar:first-child { top: 4px; }
.nav-toggle-bar:last-child  { bottom: 4px; }

#main-nav.is-scrolled .nav-toggle-bar {
    background: var(--color-earth);
}

.nav-toggle.is-active .nav-toggle-bar:first-child {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-active .nav-toggle-bar:last-child {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: var(--color-earth);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s var(--ease-out), visibility 0.5s;
}

.mobile-menu.is-open {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-links a {
    display: block;
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    font-weight: 300;
    color: var(--color-linen);
    padding: 0.3em 0;
    text-align: center;
    transition: color 0.3s;
}

.mobile-menu-links a:hover {
    color: var(--color-cream);
}

.mobile-menu-footer {
    position: absolute;
    bottom: var(--space-md);
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-stone);
}

/* --- Hero --- */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-media {
    position: absolute;
    inset: 0;
    z-index: 0;
}

/* Hero video — sits behind the fallback image, loads normally */
.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    z-index: 0;
}

/* Hide native browser play button (all vendor prefixes) */
.hero-video::-webkit-media-controls-panel,
.hero-video::-webkit-media-controls-play-button,
.hero-video::-webkit-media-controls-start-playback-button,
.hero-video::-webkit-media-controls,
.hero-video::-webkit-media-controls-overlay-play-button {
    display: none !important;
    -webkit-appearance: none;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Fallback image sits ON TOP of video — covers any play button */
.hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background-image: url('../images/hero-field.jpg');
    background-color: #3d3426;
    background-size: cover;
    background-position: center;
    transform: scale(1.05);
    animation: heroZoom 20s var(--ease-in-out) forwards;
    transition: opacity 1.2s ease;
}

/* When video is playing, fade the cover image away to reveal it */
.hero-video.is-playing + .hero-image {
    opacity: 0;
}

@keyframes heroZoom {
    to { transform: scale(1); }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(
            ellipse 80% 50% at 50% 45%,
            rgba(61, 52, 38, 0.25) 0%,
            transparent 70%
        ),
        linear-gradient(
            to bottom,
            rgba(61, 52, 38, 0.3) 0%,
            rgba(61, 52, 38, 0.25) 35%,
            rgba(61, 52, 38, 0.2) 55%,
            rgba(61, 52, 38, 0.35) 100%
        );
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--color-cream);
    padding: var(--space-md);
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.5), 0 0 40px rgba(0, 0, 0, 0.2);
}

.hero-eyebrow {
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: rgba(250, 248, 244, 0.9);
    margin-bottom: var(--space-sm);
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.45), 0 0 30px rgba(0, 0, 0, 0.15);
    animation: fadeUp 1s var(--ease-out) 0.5s both;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 300;
    letter-spacing: 0.02em;
    line-height: 1;
    margin-bottom: var(--space-sm);
    animation: fadeUp 1s var(--ease-out) 0.7s both;
}

.hero-subtitle {
    font-family: var(--font-heading);
    font-size: clamp(1.05rem, 2.2vw, 1.5rem);
    font-weight: 400;
    font-style: italic;
    color: rgba(250, 248, 244, 0.88);
    letter-spacing: 0.02em;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.3);
    animation: fadeUp 1s var(--ease-out) 0.9s both;
}

.hero-scroll {
    position: absolute;
    bottom: var(--space-lg);
    left: 50%;
    transform: translateX(-50%);
    animation: fadeUp 1s var(--ease-out) 1.2s both;
}

.scroll-line {
    display: block;
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, rgba(250, 248, 244, 0.5), transparent);
    animation: scrollPulse 2s var(--ease-in-out) infinite;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.2; transform: scaleY(0.6); }
    50%      { opacity: 0.6; transform: scaleY(1); }
}

/* --- Sections --- */
.section {
    padding: var(--space-xl) 0;
}

/* Split layout */
.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    align-items: center;
}

.split--reverse {
    direction: rtl;
}

.split--reverse > * {
    direction: ltr;
}

.split-text h2 {
    margin-bottom: var(--space-md);
}

/* Image frames */
.image-frame {
    position: relative;
    overflow: hidden;
}

.image-frame::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid rgba(61, 52, 38, 0.06);
    pointer-events: none;
}

/* Placeholder images (replace with real photos) */
.placeholder-image {
    width: 100%;
    aspect-ratio: 4 / 5;
    background-size: cover;
    background-position: center;
}

.essence-img {
    background-image: url('../images/essence-property.jpg');
    background-color: #3d5c4a;
    aspect-ratio: 4 / 5;
}

.horses-img {
    background-image: url('../images/horses-barn-fall.jpg');
    background-color: #5c4a3a;
    aspect-ratio: 4 / 5;
}

.sanctuary-img {
    background-image: url('../images/sanctuary-interior-barn.jpg');
    background-color: #5c4a3a;
    aspect-ratio: 4 / 5;
}

/* Full bleed image sections */
.full-bleed-image {
    position: relative;
    height: 80vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: var(--space-lg);
}

.land-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
}

.land-hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    background-image: url('../images/land-drone.jpg');
    background-color: #3d5c3a;
    background-size: cover;
    background-position: center;
    transition: opacity 1s ease;
}

.land-video.is-playing + .land-hero-img {
    opacity: 0;
}

.sanctuary-hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    background-image: url('../images/sanctuary-barn-real.jpg');
    background-color: #2a2a2a;
    background-size: cover;
    background-position: center;
}

.full-bleed-overlay {
    position: absolute;
    inset: 0;
    background: rgba(61, 52, 38, 0.45);
    z-index: 1;
}

.full-bleed-text {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--color-cream);
}

.full-bleed-text h2 {
    color: var(--color-cream);
}

/* Grid layout */
.grid-three {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    padding-top: var(--space-lg);
}

.grid-item h3 {
    font-size: clamp(1.2rem, 1.5vw, 1.4rem);
}

.grid-item p {
    color: var(--color-stone);
    font-size: 0.95rem;
}

/* Parallax section */
.section--parallax {
    height: 50vh;
    min-height: 300px;
    padding: 0;
    position: relative;
    overflow: hidden;
}

.parallax-image {
    position: absolute;
    inset: -20% 0;
    width: 100%;
    height: 140%;
    background-image: url('../images/parallax-autumn.jpg');
    background-color: #8a7c3e;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* Center header */
.center-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.center-header h2 {
    margin-bottom: var(--space-md);
}

.center-header .lead {
    max-width: 36em;
    margin: 0 auto;
}

/* Experience cards */
.experience-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}

.experience-card {
    cursor: default;
}

.experience-card-image {
    overflow: hidden;
    margin-bottom: var(--space-sm);
}

.experience-card-image .placeholder-image {
    aspect-ratio: 3 / 2;
    transition: transform 0.8s var(--ease-out);
}

.experience-card:hover .experience-card-image .placeholder-image {
    transform: scale(1.04);
}

.exp-img-1 { background-image: url('../images/exp-foraging-new.jpg'); background-color: #4a5c3a; }
.exp-img-2 { background-image: url('../images/exp-walks-dawn.jpg'); background-color: #4a5040; }
.exp-img-3 { background-image: url('../images/exp-equine-pond.jpg'); background-color: #3a4a5c; }
.exp-img-4 { background-image: url('../images/exp-craft-new.jpg'); background-color: #3a3a3a; }
.exp-img-5 { background-image: url('../images/exp-stillness-new.jpg'); background-color: #3d4a26; }
.exp-img-6 { background-image: url('../images/exp-darksky-bonfire.jpg'); background-color: #1a1814; }

.experience-card h3 {
    font-size: 1.2rem;
    margin-bottom: var(--space-xs);
}

.experience-card p {
    font-size: 0.9rem;
    color: var(--color-stone);
    line-height: 1.6;
}

/* --- Quote --- */
.section--quote {
    padding: var(--space-xxl) 0;
    background: var(--color-mist);
}

.pull-quote {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.pull-quote p {
    font-family: var(--font-heading);
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 300;
    font-style: italic;
    line-height: 1.5;
    color: var(--color-bark);
    max-width: none;
    margin-bottom: var(--space-md);
}

.pull-quote cite {
    font-family: var(--font-body);
    font-style: normal;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-stone);
}

/* --- Enquire --- */
.section--enquire {
    padding: var(--space-xxl) 0;
    text-align: center;
}

.enquire-inner h2 {
    margin-bottom: var(--space-md);
}

.enquire-inner .lead {
    max-width: 34em;
    margin: 0 auto var(--space-lg);
}

.enquire-contact {
    margin-bottom: var(--space-lg);
}

.email-link {
    font-family: var(--font-heading);
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    font-weight: 300;
    letter-spacing: 0.02em;
    color: var(--color-bark);
    position: relative;
    display: inline-block;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--color-linen);
    transition: border-color 0.3s var(--ease-out), color 0.3s var(--ease-out);
}

.email-link:hover {
    border-color: var(--color-bark);
    color: var(--color-earth);
}

.enquire-note {
    font-size: 0.8rem;
    color: var(--color-stone);
    letter-spacing: 0.02em;
    line-height: 1.8;
}

/* --- Footer --- */
.site-footer {
    padding: var(--space-lg) 0;
    border-top: 1px solid rgba(61, 52, 38, 0.08);
}

.footer-inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 400;
    letter-spacing: 0.03em;
}

.footer-tagline {
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-stone);
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.85rem;
    color: var(--color-stone);
}

.footer-contact a {
    transition: color 0.3s;
}

.footer-contact a:hover {
    color: var(--color-earth);
}

.footer-legal {
    font-size: 0.75rem;
    color: var(--color-lichen);
    text-align: right;
}

.footer-legal p {
    margin-bottom: 0.3rem;
}

.footer-link {
    transition: color 0.3s;
}

.footer-link:hover {
    color: var(--color-bark);
}

/* --- Reveal Animations --- */
[data-reveal] {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity var(--duration-slow) var(--ease-out),
                transform var(--duration-slow) var(--ease-out);
}

[data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive --- */

/* Tablet */
@media (max-width: 1024px) {
    .nav-links {
        display: none;
    }

    .nav-toggle {
        display: block;
    }

    .split {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .split--reverse {
        direction: ltr;
    }

    .grid-three {
        grid-template-columns: repeat(2, 1fr);
    }

    .experience-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile */
@media (max-width: 640px) {
    :root {
        --space-xl: 5rem;
        --space-xxl: 7rem;
    }

    .grid-three {
        grid-template-columns: 1fr;
    }

    .experience-grid {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-legal {
        text-align: center;
    }

    .full-bleed-image {
        height: 60vh;
    }

    .hero-content {
        padding: var(--space-sm);
    }

    .hero-video {
        object-position: 65% center;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .hero-image {
        transform: scale(1);
    }

    [data-reveal] {
        opacity: 1;
        transform: none;
    }
}
