/* ==========================================================================
   Sunset Bay / Vleilands Estate
   Main stylesheet
   ========================================================================== */

:root {
  /* Brand colours, sampled from approved mockup */
  --color-primary: #FF9D00;
  --color-primary-dark: #E8830A;
  --color-primary-light: #FFB640;
  --color-dark: #231F20;
  --color-black: #000000;
  --color-text: #2B2B2B;
  --color-text-muted: #6B6B6B;
  --color-white: #FFFFFF;
  --color-bg-alt: #F7F6F3;
  --color-border: #E5E2DC;

  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --container-width: 1200px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-pill: 999px;

  --shadow-sm: 0 2px 8px rgba(35, 31, 32, 0.08);
  --shadow-md: 0 8px 24px rgba(35, 31, 32, 0.12);
  --shadow-lg: 0 16px 48px rgba(35, 31, 32, 0.18);

  --transition: 0.25s ease;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul[class], ol[class] { list-style: none; padding: 0; }
img, picture, video { max-width: 100%; display: block; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

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

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-white);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-black);
  font-weight: 600;
  line-height: 1.2;
}

h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.75rem); }

p { color: var(--color-text); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-primary);
  color: var(--color-black);
  padding: 0.75rem 1.25rem;
  z-index: 10000;
  font-weight: 600;
}
.skip-link:focus { left: 1rem; top: 1rem; }

.container {
  width: 100%;
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.section {
  padding-block: clamp(3rem, 6vw, 5.5rem);
}

.section--alt { background: var(--color-bg-alt); }

.section-head {
  text-align: center;
  max-width: 680px;
  margin-inline: auto;
  margin-bottom: 2.5rem;
}

.section-head p { color: var(--color-text-muted); margin-top: 0.75rem; }

.eyebrow {
  display: inline-block;
  color: var(--color-primary-dark);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin-bottom: 0.75rem;
}

.underline-accent {
  display: block;
  width: 64px;
  height: 3px;
  background: var(--color-primary);
  margin-top: 0.9rem;
  margin-bottom: 1.25rem;
}

.center .underline-accent { margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}
.btn--pill { border-radius: var(--radius-pill); }

.btn--primary {
  background: var(--color-primary);
  color: var(--color-black);
}
.btn--primary:hover, .btn--primary:focus-visible {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn--outline {
  background: transparent;
  border-color: var(--color-dark);
  color: var(--color-dark);
}
.btn--outline:hover, .btn--outline:focus-visible {
  background: var(--color-dark);
  color: var(--color-white);
}

.btn--block { width: 100%; }
.btn--lg { padding: 1rem 2.25rem; font-size: 1.05rem; }

.btn:focus-visible {
  outline: 3px solid var(--color-primary-dark);
  outline-offset: 2px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow var(--transition);
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.65rem;
}

.site-header__logo img { height: 56px; width: auto; }

.site-header__nav { display: none; }

.site-nav__list {
  display: flex;
  gap: 2rem;
}
.site-nav__list a {
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding-block: 0.25rem;
}
.site-nav__list a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--color-primary);
  transform: scaleX(0);
  transition: transform var(--transition);
}
.site-nav__list a:hover::after,
.site-nav__list a:focus-visible::after { transform: scaleX(1); }

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}
.nav-toggle__bar {
  width: 20px;
  height: 2px;
  background: var(--color-dark);
  margin-inline: auto;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero banner ---------- */
.hero-banner {
  position: relative;
  overflow: hidden;
  max-height: 640px;
}
.hero-banner img {
  width: 100%;
  height: 100%;
  max-height: 640px;
  object-fit: cover;
}

/* ---------- Intro / coming soon ---------- */
/* Sits directly under the hero image, and the next section already starts
   a new background colour - both edges need less padding than a typical
   section, since the image/colour change already provides separation. */
#about {
  padding-top: clamp(1.5rem, 3vw, 2rem);
  padding-bottom: clamp(1.5rem, 3vw, 2rem);
}

.intro {
  text-align: center;
  max-width: 760px;
  margin-inline: auto;
  padding-top: clamp(0.5rem, 1.5vw, 1rem);
  padding-bottom: clamp(1rem, 2.5vw, 1.5rem);
}
.intro .badge {
  display: inline-block;
  background: var(--color-dark);
  color: var(--color-white);
  font-family: var(--font-heading);
  font-size: 1.1rem;
  padding: 0.6rem 1.75rem;
  border-radius: var(--radius-pill);
  margin-block: 1.25rem;
}
.intro__lead { font-size: 1.05rem; color: var(--color-text-muted); }
.intro__by { font-weight: 700; margin-top: 1.25rem; }
.intro__coming-soon {
  font-family: var(--font-heading);
  color: var(--color-primary);
  font-size: clamp(2.25rem, 6vw, 3.5rem);
  margin-top: 2rem;
  letter-spacing: 0.03em;
}
.intro__actions { margin-top: 1.25rem; }

/* ---------- Two column feature ---------- */
.feature-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
@media (min-width: 860px) {
  .feature-grid { grid-template-columns: 1fr 1fr; gap: 4rem; }
  .feature-grid--reverse .feature-grid__media { order: 2; }
  .feature-grid--reverse .feature-grid__body { order: 1; }
}

.feature-grid__media img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.stacked-media { display: grid; gap: 1.25rem; }
@media (min-width: 560px) {
  .stacked-media { grid-template-columns: 1fr 1fr; }
}

.stacked-media img {
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.feature-grid__body p { margin-top: 1rem; }
.feature-grid__body .statement {
  font-weight: 600;
  font-size: 1.15rem;
  margin-top: 1.5rem;
  color: var(--color-dark);
}

/* ---------- Full-width statement banner ---------- */
.statement-banner {
  background: var(--color-primary);
  color: var(--color-black);
  text-align: center;
  padding-block: 1.75rem;
  padding-inline: 1.25rem;
  font-family: var(--font-heading);
  font-size: clamp(1.1rem, 2.4vw, 1.6rem);
  font-weight: 600;
}

/* ---------- Video section ---------- */
.video-frame {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: #000;
}
.video-frame video { width: 100%; height: auto; display: block; max-height: 640px; }

/* ---------- Gallery carousel ---------- */
.gallery {
  margin-top: 2.5rem;
  position: relative;
}
.gallery__track-wrap {
  overflow: hidden;
  border-radius: var(--radius-md);
}
.gallery__track {
  display: flex;
  transition: transform 0.5s ease;
}
.gallery__slide {
  flex: 0 0 100%;
  padding-inline: 0.5rem;
}
@media (min-width: 640px) {
  .gallery__slide { flex: 0 0 50%; }
}
@media (min-width: 992px) {
  .gallery__slide { flex: 0 0 33.3333%; }
}
.gallery__slide figure {
  margin: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background: var(--color-bg-alt);
}
.gallery__slide img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.gallery__slide:hover img { transform: scale(1.04); }
.gallery__slide figcaption {
  padding: 0.75rem 1rem;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.gallery__nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.gallery__arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--color-dark);
  background: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition);
}
.gallery__arrow:hover { background: var(--color-dark); color: var(--color-white); }

.gallery__dots {
  display: flex;
  gap: 0.5rem;
}
.gallery__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--color-border);
  border: none;
  padding: 0;
}
.gallery__dot.is-active { background: var(--color-primary); }

/* ---------- CTA section ---------- */
.cta-section {
  text-align: center;
  max-width: 700px;
  margin-inline: auto;
}
.cta-section p { margin-top: 1rem; }
.cta-section .btn { margin-top: 1.75rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-dark);
  color: var(--color-white);
  padding-block: 3.5rem 2rem;
  text-align: center;
  position: relative;
}
.site-footer__inner { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.site-footer__logo img { height: 64px; width: auto; filter: brightness(0) invert(1); }
.site-footer__tagline { color: #cfcfcf; }
.site-footer__social { display: flex; gap: 1rem; margin-top: 0.25rem; }
.site-footer__social a {
  width: 38px; height: 38px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition), border-color var(--transition);
}
.site-footer__social a:hover { background: var(--color-primary); border-color: var(--color-primary); color: var(--color-black); }
.site-footer__legal a { color: #cfcfcf; text-decoration: underline; font-size: 0.9rem; }
.site-footer__legal a:hover { color: var(--color-primary); }
.site-footer__copy { color: #9a9a9a; font-size: 0.85rem; margin-top: 1rem; }

.back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-black);
  border: none;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  z-index: 900;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }

/* ---------- Persistent mobile "Join the Waiting List" bar ---------- */
:root { --mobile-cta-bar-height: 76px; }

.mobile-cta-bar { display: none; }
.page-join .mobile-cta-bar { display: none !important; }

@media (max-width: 860px) {
  .mobile-cta-bar {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 950;
    padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(6px);
    border-top: 1px solid var(--color-border);
    box-shadow: 0 -4px 16px rgba(35, 31, 32, 0.1);
  }

  /* Reserves space so the fixed bar never covers the footer/last section */
  body:not(.page-join) { padding-bottom: var(--mobile-cta-bar-height); }

  /* Keeps back-to-top from being covered by the CTA bar */
  body:not(.page-join) .back-to-top { bottom: calc(var(--mobile-cta-bar-height) + 0.75rem); }
}

/* ---------- Forms (join waiting list) ---------- */
.form-card {
  max-width: 720px;
  margin-inline: auto;
  background: var(--color-white);
}

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.text-left { text-align: left; margin-inline: 0; }
.narrow { max-width: 820px; }
.mt-lg { margin-top: 2.5rem; }

/* ---------- Legal content ---------- */
.legal-list {
  padding-left: 1.25rem;
  display: grid;
  gap: 1.75rem;
}
.legal-list h2 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* Locks background scrolling while the off-canvas mobile menu is open */
body.nav-open { overflow: hidden; }

/* ---------- Desktop inline nav ---------- */
@media (min-width: 861px) {
  .site-header__nav { display: flex; }
}

/* ---------- Off-canvas mobile nav ---------- */
.site-nav {
  display: none;
}
.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(35, 31, 32, 0.45);
  z-index: 998;
  opacity: 0;
  transition: opacity var(--transition);
}
.nav-backdrop.is-open {
  display: block;
  opacity: 1;
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .site-nav {
    display: block;
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(320px, 80vw);
    background: var(--color-white);
    box-shadow: var(--shadow-lg);
    padding: 6rem 2rem 2rem;
    transform: translateX(100%);
    transition: transform var(--transition);
    z-index: 999;
    overflow-y: auto;
  }
  .site-nav.is-open { transform: translateX(0); }
  .site-nav__list { flex-direction: column; gap: 1.5rem; }
  .site-header__actions .btn { display: none; }
  .site-nav .btn { display: inline-flex; margin-top: 2rem; }
}

.nav-close {
  display: none;
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: transparent;
  font-size: 1.1rem;
  color: var(--color-dark);
  transition: background var(--transition), color var(--transition);
}
.nav-close:hover { background: var(--color-dark); color: var(--color-white); }

@media (max-width: 860px) {
  .nav-close { display: flex; }
}

@media (max-width: 480px) {
  .btn { padding: 0.75rem 1.4rem; font-size: 0.9rem; }
  .intro__coming-soon { font-size: 2.25rem; }
}
