/* =========================================================
   Browns Bay Sunday Market — Design System & Styles
   Mobile-first, accessible (WCAG AA+), performance-minded
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&display=swap');

/* --------------------- Design Tokens --------------------- */
:root {
  /* Palette — super warm vibrant coastal market */
  --c-primary: #E65100;
  /* vibrant deep orange */
  --c-primary-600: #E64A19;
  --c-primary-700: #BF360C;
  --c-primary-050: #FFF3E0;

  --c-accent: #00897B;
  /* vibrant teal */
  --c-accent-600: #00695C;
  --c-accent-050: #E0F2F1;

  --c-bg: #FFF8E1;
  /* sunny warm cream */
  --c-bg-alt: #FFECB3;
  /* warm light amber */
  --c-surface: #FFFFFF;
  --c-surface-2: #FFF3E0;

  --c-text: #3E2723;
  /* rich warm brown */
  --c-text-2: #4E342E;
  --c-muted: #8D6E63;
  --c-border: #FFCC80;
  --c-border-strong: #FFB74D;

  --c-success: #108246;
  --c-warning: #B36500;
  --c-warning-bg: #FFF4E6;
  --c-danger: #B52222;
  --c-danger-bg: #FDECEC;

  /* Typography */
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;

  /* Type scale (clamp for fluid) */
  --fs-xs: 0.875rem;
  --fs-sm: 1rem;
  --fs-base: 1.125rem;
  --fs-md: 1.25rem;
  --fs-lg: clamp(1.25rem, 1.1rem + 0.6vw, 1.4rem);
  --fs-xl: clamp(1.4rem, 1.2rem + 1vw, 1.75rem);
  --fs-2xl: clamp(1.75rem, 1.4rem + 1.5vw, 2.25rem);
  --fs-3xl: clamp(2.25rem, 1.8rem + 2.5vw, 3rem);
  --fs-4xl: clamp(2.75rem, 2.2rem + 3.5vw, 4rem);
  --fs-hero: clamp(3.5rem, 2.8rem + 5vw, 5.5rem);

  /* Spacing */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.875rem;
  --sp-4: 1.25rem;
  --sp-5: 1.25rem;
  --sp-6: 1.5rem;
  --sp-7: 2rem;
  --sp-8: 2.5rem;
  --sp-9: 3rem;
  --sp-10: 4rem;
  --sp-12: 5rem;
  --sp-16: 7rem;

  /* Layout */
  --container: 76rem;
  --container-narrow: 52rem;
  --container-wide: 88rem;

  /* Radius & shadow */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-full: 999px;

  --sh-sm: 0 2px 8px rgba(45, 35, 30, 0.04);
  --sh-md: 0 8px 24px -4px rgba(45, 35, 30, 0.08), 0 4px 10px -4px rgba(45, 35, 30, 0.04);
  --sh-lg: 0 32px 64px -16px rgba(45, 35, 30, 0.12), 0 16px 32px -8px rgba(45, 35, 30, 0.06);

  /* Motion */
  --ease: cubic-bezier(0.25, 1, 0.3, 1);
  --dur-1: 200ms;
  --dur-2: 350ms;
  --dur-3: 600ms;

  /* Layered layout */
  --z-banner: 40;
  --z-header: 50;
  --z-drawer: 60;
  --z-modal: 80;
  --z-top: 100;

  /* Header sizing (updated with JS on resize) */
  --header-h: 72px;
  --banner-h: 0px;
}

/* Prefer dark mode kept light — this is a daytime market */
@media (prefers-contrast: more) {
  :root {
    --c-muted: #453D36;
    --c-border: #BFAE98;
    --c-text-2: #1A1512;
  }
}

/* --------------------- Reset --------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  tab-size: 4;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--banner-h) + 12px);
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-bg);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img,
svg,
picture,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

img {
  font-style: italic;
  background-color: var(--c-bg-alt);
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
}

button {
  cursor: pointer;
}

ul,
ol {
  list-style: none;
}

a {
  color: var(--c-primary-600);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--c-primary-700);
}

/* Preserve list semantics where needed */
.prose ul,
.prose ol {
  padding-left: 1.25rem;
}

.prose ul {
  list-style: disc;
}

.prose ol {
  list-style: decimal;
}

.prose li+li {
  margin-top: 0.35em;
}

.prose p+p {
  margin-top: 0.9em;
}

.prose h2,
.prose h3 {
  margin-top: 1.4em;
  margin-bottom: 0.4em;
}

.prose a {
  color: var(--c-primary-600);
  text-decoration: underline;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* --------------------- A11y Primitives --------------------- */
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -44px;
  z-index: var(--z-top);
  background: var(--c-text);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  text-decoration: none;
  font-weight: 600;
  transition: top var(--dur-2) var(--ease);
}

.skip-link:focus-visible {
  top: 12px;
  color: #fff;
}

:focus-visible {
  outline: 3px solid var(--c-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --------------------- Typography --------------------- */
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--c-text);
  text-wrap: balance;
  margin-bottom: 0.5em;
}

h1 {
  font-size: clamp(2rem, 1.8rem + 3.5vw, 4rem);
}

h2 {
  font-size: var(--fs-3xl);
}

h3 {
  font-size: var(--fs-2xl);
}

h4 {
  font-size: var(--fs-xl);
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--c-primary);
  margin-bottom: var(--sp-4);
  position: relative;
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 2px;
  background: var(--c-primary);
  vertical-align: middle;
  margin-right: 12px;
  border-radius: 2px;
}

.lede {
  font-size: var(--fs-lg);
  color: var(--c-text-2);
  max-width: 65ch;
  text-wrap: pretty;
  line-height: 1.7;
}

/* --------------------- Layout --------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--sp-5);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.container--wide {
  max-width: var(--container-wide);
}

.section {
  padding-block: clamp(3rem, 2rem + 4vw, 6rem);
}

.section--tight {
  padding-block: clamp(2rem, 1.5rem + 2vw, 4rem);
}

.section--alt {
  background: var(--c-bg-alt);
}

.section--deep {
  background: var(--c-surface-2);
}

.section-head {
  max-width: 58ch;
  margin-bottom: clamp(2rem, 1.5rem + 1.5vw, 3rem);
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.stack>*+* {
  margin-top: var(--sp-4);
}

.stack-lg>*+* {
  margin-top: var(--sp-6);
}

.grid {
  display: grid;
  gap: var(--sp-5);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* --------------------- Alert Banner --------------------- */
.alert-banner {
  position: relative;
  background: var(--c-text);
  color: #F8E9D6;
  font-size: var(--fs-sm);
  z-index: var(--z-banner);
}

.alert-banner__inner {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding-block: 10px;
}

.alert-banner__icon {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  color: #F5A76B;
}

.alert-banner__text {
  flex: 1;
  line-height: 1.4;
}

.alert-banner__text strong {
  color: #fff;
}

.alert-banner__close {
  flex: 0 0 auto;
  color: #F8E9D6;
  padding: 6px;
  border-radius: var(--r-sm);
  display: inline-flex;
  transition: background var(--dur-1) var(--ease);
}

.alert-banner__close:hover {
  background: rgba(255, 255, 255, 0.12);
}

.alert-banner[hidden] {
  display: none;
}

/* --------------------- Site Header --------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: rgba(255, 250, 244, 0.7);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid rgba(234, 219, 204, 0.4);
  transition: all var(--dur-2) var(--ease);
}

.site-header.is-scrolled {
  background: rgba(255, 250, 244, 0.95);
  box-shadow: 0 4px 30px rgba(45, 35, 30, 0.05);
  border-bottom-color: var(--c-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  text-decoration: none;
  color: var(--c-text);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-lg);
  letter-spacing: -0.01em;
  line-height: 1.1;
  flex: 0 0 auto;
}

.brand:hover {
  color: var(--c-primary-600);
}

.brand__logo {
  width: 48px;
  height: 48px;
  border-radius: var(--r-md);
  background: var(--c-primary-050);
  overflow: hidden;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--c-border);
}

.brand__logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand__text {
  display: flex;
  flex-direction: column;
}

.brand__name {
  font-size: var(--fs-md);
}

.brand__tag {
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--c-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@media (max-width: 600px) {
  .brand__tag {
    display: none;
  }
}

/* Primary nav */
.primary-nav {
  display: none;
}

.primary-nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.primary-nav__link {
  position: relative;
  display: inline-block;
  padding: 8px 10px;
  color: var(--c-text-2);
  text-decoration: none;
  font-size: var(--fs-sm);
  font-weight: 500;
  border-radius: var(--r-sm);
  white-space: nowrap;
  transition: color var(--dur-1) var(--ease), background var(--dur-1) var(--ease);
}

.primary-nav__link:hover {
  color: var(--c-text);
  background: var(--c-bg-alt);
}

.primary-nav__link[aria-current="page"] {
  color: var(--c-primary-700);
  background: var(--c-primary-050);
}

.primary-nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 4px;
  height: 2px;
  background: var(--c-primary);
  border-radius: 2px;
}

/* --------------------- Dropdown Nav --------------------- */
.has-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--c-surface);
  min-width: 220px;
  border-radius: var(--r-md);
  box-shadow: var(--sh-lg);
  border: 1px solid var(--c-border);
  padding: var(--sp-2) 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease), visibility var(--dur-2);
  z-index: 100;
  list-style: none;
  margin: 0;
}

.has-dropdown:hover .dropdown-menu,
.has-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li {
  margin: 0;
}

.dropdown-menu a {
  display: block;
  padding: var(--sp-2) var(--sp-4);
  color: var(--c-text);
  text-decoration: none;
  font-weight: 500;
  transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}

.dropdown-menu a:hover,
.dropdown-menu a:focus {
  background: var(--c-bg-alt);
  color: var(--c-primary);
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  flex: 0 0 auto;
}

@media (max-width: 600px) {
  .header-actions .btn--accent {
    display: none;
  }
}

.icon-btn {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  color: var(--c-text-2);
  border-radius: var(--r-md);
  background: transparent;
  transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}

.icon-btn:hover {
  background: var(--c-bg-alt);
  color: var(--c-text);
}

.icon-btn svg {
  width: 22px;
  height: 22px;
}

.menu-toggle {
  display: inline-grid;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__open {
  display: none;
}

.menu-toggle[aria-expanded="false"] .menu-toggle__close {
  display: none;
}

@media (min-width: 1100px) {
  .primary-nav {
    display: block;
    margin-left: var(--sp-2);
  }

  .menu-toggle {
    display: none;
  }
}

/* --------------------- Mobile Overlay --------------------- */
.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: var(--z-drawer);
  display: flex;
  flex-direction: column;
  background: rgba(255, 248, 225, 0.95);
  backdrop-filter: blur(20px) saturate(200%);
  -webkit-backdrop-filter: blur(20px) saturate(200%);
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-drawer.is-open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: 14px var(--sp-5);
  min-height: var(--header-h);
}

.mobile-drawer__nav {
  padding: var(--sp-6) var(--sp-5);
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.mobile-drawer__list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  text-align: center;
}

.mobile-drawer__link {
  display: inline-block;
  padding: 12px;
  color: var(--c-text);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: 700;
  border-radius: var(--r-lg);
  transition: color var(--dur-2) var(--ease), transform var(--dur-2) var(--ease);
}

.mobile-drawer__link:hover {
  color: var(--c-primary);
  transform: scale(1.05);
}

.mobile-drawer__link[aria-current="page"] {
  color: var(--c-primary);
}

.mobile-drawer__link svg {
  display: none;
}

/* Mobile Nav Group */
.mobile-drawer__group {
  margin-block: var(--sp-4);
}

.mobile-drawer__label {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-xl);
  color: var(--c-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: var(--sp-2) var(--sp-4);
  margin-bottom: var(--sp-3);
  border-bottom: 1px solid rgba(45, 35, 30, 0.1);
}

.mobile-drawer__sublist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.mobile-drawer__sublist .mobile-drawer__link {
  font-size: var(--fs-lg);
  padding: 8px 12px;
}

.mobile-drawer__cta {
  margin-top: var(--sp-8);
  display: grid;
  gap: var(--sp-3);
  max-width: 300px;
  margin-inline: auto;
  width: 100%;
}

body.has-drawer-open {
  overflow: hidden;
}

@media (min-width: 960px) {
  .mobile-drawer {
    display: none !important;
  }
}

/* --------------------- Buttons --------------------- */
.btn {
  --btn-bg: var(--c-primary);
  --btn-bg-h: var(--c-primary-600);
  --btn-fg: #fff;
  --btn-border: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 16px 28px;
  font-size: var(--fs-base);
  font-weight: 600;
  line-height: 1;
  color: var(--btn-fg);
  background: var(--btn-bg);
  border: 1px solid var(--btn-border);
  border-radius: var(--r-full);
  text-decoration: none;
  transition: all var(--dur-2) var(--ease);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: all 0.6s ease;
}

.btn:hover::after {
  left: 100%;
}

.btn:hover {
  background: var(--btn-bg-h);
  color: var(--btn-fg);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -6px var(--btn-bg);
}

.btn:active {
  transform: translateY(1px);
  box-shadow: 0 4px 10px -4px var(--btn-bg);
}

.btn svg {
  width: 20px;
  height: 20px;
}

.btn--secondary {
  --btn-bg: var(--c-surface);
  --btn-bg-h: var(--c-bg-alt);
  --btn-fg: var(--c-text);
  --btn-border: var(--c-border-strong);
}

.btn--accent {
  --btn-bg: var(--c-accent);
  --btn-bg-h: var(--c-accent-600);
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-bg-h: var(--c-bg-alt);
  --btn-fg: var(--c-text);
  --btn-border: transparent;
}

.btn--ghost:hover {
  color: var(--c-text);
}

.btn--block {
  width: 100%;
}

.btn--sm {
  padding: 10px 16px;
  font-size: var(--fs-sm);
}

.btn--lg {
  padding: 16px 28px;
  font-size: var(--fs-md);
}

/* --------------------- Hero --------------------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--c-bg-alt);
  padding-block: clamp(3.5rem, 2.5rem + 5vw, 7rem);
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
      rgba(45, 35, 30, 0.7) 0%,
      rgba(45, 35, 30, 0.45) 45%,
      rgba(45, 35, 30, 0.85) 100%);
  z-index: 1;
}

/* --------------------- Hero Animations (Birds) --------------------- */
.animated-birds {
  position: absolute;
  top: 15%;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.bird {
  position: absolute;
  width: 40px;
  height: 40px;
  color: rgba(255, 255, 255, 0.4);
  animation: flyRight 25s linear infinite;
  opacity: 0;
}

.bird-1 {
  top: 10%;
  animation-delay: 0s;
  animation-duration: 22s;
}

.bird-2 {
  top: 25%;
  animation-delay: 7s;
  animation-duration: 28s;
  width: 30px;
  height: 30px;
}

.bird-3 {
  top: 15%;
  animation-delay: 14s;
  animation-duration: 25s;
  width: 50px;
  height: 50px;
  color: rgba(255, 255, 255, 0.2);
}

@keyframes flyRight {
  0% {
    transform: translateX(-10vw) translateY(0) scale(0.8);
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  50% {
    transform: translateX(50vw) translateY(-20px) scale(1);
  }

  90% {
    opacity: 1;
  }

  100% {
    transform: translateX(110vw) translateY(0) scale(0.8);
    opacity: 0;
  }
}

.hero__grid {
  position: relative;
  z-index: 2;
  display: grid;
  gap: var(--sp-5);
  max-width: 48rem;
  color: #fff;
}

.hero__grid h1,
.hero__grid .eyebrow,
.hero__grid .lede {
  color: inherit;
}

.hero__grid .eyebrow {
  color: #F5B98A;
}

.hero__grid h1 {
  color: #fff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.3);
}

.hero__grid .lede {
  color: #F3E8DA;
  font-weight: 400;
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-top: var(--sp-3);
}

.hero--compact {
  padding-block: clamp(2.5rem, 2rem + 3vw, 5rem);
}

/* Home hero variant with feature row */
.hero__features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--sp-4);
  margin-top: var(--sp-6);
  padding-top: var(--sp-6);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.hero__feature {
  color: #fff;
  display: flex;
  flex-direction: column;
}

.hero__feature strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  line-height: 1;
  color: #fff;
}

.hero__feature span {
  font-size: var(--fs-sm);
  color: #F3E8DA;
}

/* --------------------- Cards --------------------- */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  box-shadow: var(--sh-sm);
  transition: transform var(--dur-2) var(--ease),
    box-shadow var(--dur-2) var(--ease),
    border-color var(--dur-2) var(--ease);
  height: 100%;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--sh-md);
  border-color: var(--c-border-strong);
}

.card--flat {
  box-shadow: none;
}

.card--flat:hover {
  transform: none;
  box-shadow: var(--sh-sm);
}

.card__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  display: grid;
  place-items: center;
  background: var(--c-primary-050);
  color: var(--c-primary-700);
  margin-bottom: var(--sp-4);
}

.card__icon svg {
  width: 22px;
  height: 22px;
}

.card--accent .card__icon {
  background: var(--c-accent-050);
  color: var(--c-accent-600);
}

.card h3 {
  font-size: var(--fs-xl);
  margin-bottom: var(--sp-2);
}

.card p {
  color: var(--c-text-2);
}

.card--link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.card--link:hover {
  color: var(--c-text);
}

.card__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  margin-top: var(--sp-4);
  font-weight: 600;
  color: var(--c-primary-600);
}

.card__cta svg {
  width: 16px;
  height: 16px;
  transition: transform var(--dur-1) var(--ease);
}

.card--link:hover .card__cta svg {
  transform: translateX(3px);
}

/* --------------------- Feature Split --------------------- */
.split {
  display: grid;
  gap: var(--sp-7);
  align-items: center;
}

@media (min-width: 820px) {
  .split {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-10);
  }

  .split--reverse> :first-child {
    order: 2;
  }
}

.split__media {
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--c-bg-alt);
  box-shadow: var(--sh-md);
}

.split__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --------------------- Gallery --------------------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--sp-3);
}

.gallery__item {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--c-bg-alt);
  box-shadow: var(--sh-sm);
  transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
}

.gallery__item:hover {
  transform: scale(1.02);
  box-shadow: var(--sh-md);
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-3) var(--ease);
}

.gallery__item:hover img {
  transform: scale(1.05);
}

.gallery--feature {
  grid-template-columns: repeat(6, 1fr);
}

.gallery--feature .gallery__item:nth-child(1) {
  grid-column: span 4;
  grid-row: span 2;
  aspect-ratio: 4 / 3;
}

.gallery--feature .gallery__item {
  grid-column: span 2;
}

@media (min-width: 721px) {
  .gallery--feature .gallery__item:nth-child(4),
  .gallery--feature .gallery__item:nth-child(5) {
    grid-column: span 3;
  }
}

@media (max-width: 720px) {
  .gallery--feature {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery--feature .gallery__item:nth-child(1) {
    grid-column: span 2;
    grid-row: auto;
    aspect-ratio: 4 / 3;
  }

  .gallery--feature .gallery__item {
    grid-column: span 1;
  }
}

/* --------------------- Rate / Price Table --------------------- */
.rates {
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  background: var(--c-surface);
  overflow: hidden;
  box-shadow: var(--sh-sm);
}

.rates__head {
  padding: var(--sp-5) var(--sp-6);
  background: var(--c-surface-2);
  border-bottom: 1px solid var(--c-border);
}

.rates__head h3 {
  margin-bottom: var(--sp-1);
}

.rates__head p {
  color: var(--c-muted);
  font-size: var(--fs-sm);
  margin: 0;
}

.rates__table {
  width: 100%;
  border-collapse: collapse;
}

.rates__table th,
.rates__table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--c-border);
  font-size: var(--fs-sm);
}

.rates__table th {
  font-weight: 600;
  color: var(--c-text);
  background: var(--c-bg);
}

.rates__table tr:last-child td {
  border-bottom: none;
}

.rates__table td:not(:first-child),
.rates__table th:not(:first-child) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.rates__table .rate-label {
  font-weight: 600;
  color: var(--c-text);
}

.rates__table .rate-note {
  font-size: var(--fs-xs);
  color: var(--c-muted);
  font-weight: 400;
  display: block;
}

.rates__foot {
  padding: var(--sp-5) var(--sp-6);
  background: var(--c-bg);
  border-top: 1px solid var(--c-border);
  font-size: var(--fs-sm);
  color: var(--c-muted);
}

/* --------------------- Check/Cross List --------------------- */
.list-check,
.list-cross {
  display: grid;
  gap: var(--sp-3);
}

.list-check li,
.list-cross li {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding-left: 0;
}

.list-check li::before,
.list-cross li::before {
  content: "";
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: var(--r-full);
  background: var(--c-success);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='white'><path d='M16.7 5.3a1 1 0 0 1 0 1.4l-8 8a1 1 0 0 1-1.4 0l-4-4a1 1 0 1 1 1.4-1.4L8 12.6l7.3-7.3a1 1 0 0 1 1.4 0z'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px;
  margin-top: 2px;
}

.list-cross li::before {
  background: var(--c-danger);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='white'><path d='M5.3 5.3a1 1 0 0 1 1.4 0L10 8.6l3.3-3.3a1 1 0 1 1 1.4 1.4L11.4 10l3.3 3.3a1 1 0 0 1-1.4 1.4L10 11.4l-3.3 3.3a1 1 0 0 1-1.4-1.4L8.6 10 5.3 6.7a1 1 0 0 1 0-1.4z'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px;
}

.list-check li p,
.list-cross li p {
  margin: 0;
  color: var(--c-text-2);
}

.list-check li strong,
.list-cross li strong {
  color: var(--c-text);
}

/* --------------------- Callout --------------------- */
.callout {
  display: flex;
  gap: var(--sp-4);
  padding: var(--sp-5) var(--sp-6);
  border-radius: var(--r-md);
  border: 1px solid var(--c-border);
  background: var(--c-surface-2);
}

.callout__icon {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  background: var(--c-primary-050);
  color: var(--c-primary-700);
  display: grid;
  place-items: center;
}

.callout__icon svg {
  width: 18px;
  height: 18px;
}

.callout p {
  margin: 0;
  color: var(--c-text-2);
}

.callout p+p {
  margin-top: var(--sp-2);
}

.callout h4 {
  margin-bottom: var(--sp-1);
}

.callout--warning {
  background: var(--c-warning-bg);
  border-color: #F6D9B3;
}

.callout--warning .callout__icon {
  background: #F6D9B3;
  color: var(--c-warning);
}

.callout--info {
  background: var(--c-accent-050);
  border-color: #BFE0DB;
}

.callout--info .callout__icon {
  background: #BFE0DB;
  color: var(--c-accent-600);
}

.callout--danger {
  background: var(--c-danger-bg);
  border-color: #F0C7C7;
}

.callout--danger .callout__icon {
  background: #F0C7C7;
  color: var(--c-danger);
}

/* --------------------- FAQ / Details --------------------- */
.faq {
  display: grid;
  gap: var(--sp-3);
}

.faq details {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: box-shadow var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease);
}

.faq details[open] {
  border-color: var(--c-border-strong);
  box-shadow: var(--sh-sm);
}

.faq summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-5) var(--sp-6);
  cursor: pointer;
  font-weight: 600;
  color: var(--c-text);
  font-size: var(--fs-md);
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23B8441F'><path d='M10 14a1 1 0 0 1-.7-.3l-5-5a1 1 0 1 1 1.4-1.4L10 11.6l4.3-4.3a1 1 0 1 1 1.4 1.4l-5 5a1 1 0 0 1-.7.3z'/></svg>");
  background-size: contain;
  background-repeat: no-repeat;
  transition: transform var(--dur-2) var(--ease);
}

.faq details[open] summary::after {
  transform: rotate(180deg);
}

.faq__body {
  padding: 0 var(--sp-6) var(--sp-5);
  color: var(--c-text-2);
}

.faq__body>*+* {
  margin-top: var(--sp-3);
}

/* --------------------- Forms --------------------- */
.form {
  display: grid;
  gap: var(--sp-5);
}

.form__row {
  display: grid;
  gap: var(--sp-2);
}

.form__row--inline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
}

@media (max-width: 600px) {
  .form__row--inline {
    grid-template-columns: 1fr;
  }
}

.label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--c-text);
}

.label__required {
  color: var(--c-primary-600);
  margin-left: 2px;
}

.input,
.textarea,
.select {
  display: block;
  width: 100%;
  padding: 12px 14px;
  font-size: var(--fs-base);
  line-height: 1.45;
  color: var(--c-text);
  background: var(--c-surface);
  border: 1px solid var(--c-border-strong);
  border-radius: var(--r-md);
  transition: border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
}

.input:hover,
.textarea:hover,
.select:hover {
  border-color: var(--c-muted);
}

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(184, 68, 31, 0.18);
}

.textarea {
  min-height: 140px;
  resize: vertical;
}

.select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236B5F57'><path d='M10 14a1 1 0 0 1-.7-.3l-5-5a1 1 0 1 1 1.4-1.4L10 11.6l4.3-4.3a1 1 0 1 1 1.4 1.4l-5 5a1 1 0 0 1-.7.3z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
}

.input:invalid:not(:placeholder-shown),
.textarea:invalid:not(:placeholder-shown) {
  border-color: var(--c-danger);
}

.form__hint {
  font-size: var(--fs-xs);
  color: var(--c-muted);
}

.form__error {
  font-size: var(--fs-xs);
  color: var(--c-danger);
  display: none;
  align-items: center;
  gap: 6px;
}

.form__row.is-invalid .form__error {
  display: inline-flex;
}

.form__row.is-invalid .input,
.form__row.is-invalid .textarea {
  border-color: var(--c-danger);
}

.form__status {
  display: none;
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--r-md);
  background: var(--c-accent-050);
  border: 1px solid #BFE0DB;
  color: var(--c-accent-600);
  font-weight: 500;
  align-items: center;
  gap: var(--sp-3);
}

.form__status.is-visible {
  display: flex;
}

/* --------------------- Impact Section (Cool Section) --------------------- */
.impact-section {
  position: relative;
  overflow: hidden;
  background: var(--c-bg-alt);
}

.impact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--sp-6);
  margin-top: var(--sp-8);
}

.impact-card {
  background: var(--c-surface);
  padding: var(--sp-8) var(--sp-6);
  border-radius: var(--r-xl);
  text-align: center;
  box-shadow: var(--sh-md);
  border: 1px solid var(--c-border);
  transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
  position: relative;
  overflow: hidden;
}

.impact-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, var(--c-primary), var(--c-accent));
}

.impact-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--sh-lg);
}

.impact-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--sp-5);
  border-radius: var(--r-full);
  background: var(--c-primary-050);
  color: var(--c-primary);
  display: grid;
  place-items: center;
}

.impact-icon svg {
  width: 32px;
  height: 32px;
}

.impact-number {
  font-family: var(--font-display);
  font-size: var(--fs-4xl);
  font-weight: 700;
  color: var(--c-text);
  line-height: 1;
  margin-bottom: var(--sp-2);
}

.impact-label {
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--c-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* --------------------- Footer --------------------- */
.site-footer {
  background: #1A1512;
  color: #E9DDCF;
  padding-block: var(--sp-10) var(--sp-6);
  margin-top: var(--sp-12);
}

.site-footer a {
  color: #F5CCA0;
  text-decoration: none;
}

.site-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-grid {
  display: grid;
  gap: var(--sp-7);
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
}

@media (max-width: 960px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 540px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-brand {
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
}

.footer-brand__logo {
  width: 52px;
  height: 52px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex: 0 0 auto;
}

.footer-brand__logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.footer-brand__text {
  color: #F5E9D6;
}

.footer-brand__text strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  color: #fff;
}

.footer-brand__text span {
  font-size: var(--fs-sm);
  color: #C6B29C;
}

.footer-col h4 {
  color: #fff;
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  margin-bottom: var(--sp-4);
}

.footer-col ul {
  display: grid;
  gap: var(--sp-2);
}

.footer-col li {
  font-size: var(--fs-sm);
}

.footer-col p {
  font-size: var(--fs-sm);
  color: #C6B29C;
}

.footer-meta {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: var(--sp-7);
  padding-top: var(--sp-5);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--sp-4);
  font-size: var(--fs-xs);
  color: #9E8E7D;
}

.footer-meta p {
  font-size: inherit;
  color: inherit;
  max-width: 72ch;
}

.social {
  display: inline-flex;
  gap: var(--sp-2);
}

.social a {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #F5CCA0;
  transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}

.social a:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  text-decoration: none;
}

.social svg {
  width: 20px;
  height: 20px;
}

/* --------------------- Scroll-to-top --------------------- */
.to-top {
  position: fixed;
  right: var(--sp-5);
  bottom: var(--sp-5);
  width: 48px;
  height: 48px;
  border-radius: var(--r-full);
  background: var(--c-text);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: var(--sh-lg);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease), background var(--dur-1) var(--ease);
  z-index: var(--z-top);
}

.to-top:hover {
  background: var(--c-primary);
}

.to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.to-top svg {
  width: 20px;
  height: 20px;
}

/* --------------------- Page Header (interior) --------------------- */
.page-header {
  background: var(--c-bg-alt);
  padding-block: clamp(2.5rem, 2rem + 3vw, 5rem);
  border-bottom: 1px solid var(--c-border);
}

.page-header .container {
  max-width: var(--container-narrow);
}

.page-header h1 {
  margin-bottom: var(--sp-3);
}

.page-header .crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-sm);
  color: var(--c-muted);
  margin-bottom: var(--sp-4);
}

.page-header .crumbs a {
  color: var(--c-muted);
  text-decoration: none;
}

.page-header .crumbs a:hover {
  color: var(--c-text);
  text-decoration: underline;
}

.page-header .crumbs span[aria-current="page"] {
  color: var(--c-text);
}

.page-header .crumbs svg {
  width: 14px;
  height: 14px;
  color: var(--c-border-strong);
}

/* --------------------- Info Bar (key facts row) --------------------- */
.info-bar {
  display: grid;
  gap: var(--sp-3);
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  padding: var(--sp-5);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
}

.info-bar__item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
}

.info-bar__icon {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  background: var(--c-primary-050);
  color: var(--c-primary-700);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.info-bar__icon svg {
  width: 20px;
  height: 20px;
}

.info-bar__item strong {
  display: block;
  font-size: var(--fs-sm);
  color: var(--c-text);
}

.info-bar__item span {
  font-size: var(--fs-xs);
  color: var(--c-muted);
}

/* --------------------- Map Placeholder --------------------- */
.map-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--c-bg-alt);
  border: 1px solid var(--c-border);
}

.map-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* --------------------- Contact layout --------------------- */
.contact-layout {
  display: grid;
  gap: var(--sp-8);
  align-items: start;
  grid-template-columns: 1fr;
}

@media (min-width: 880px) {
  .contact-layout {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: var(--sp-10);
  }
}

/* --------------------- Utility --------------------- */
.text-center {
  text-align: center;
}

.text-muted {
  color: var(--c-muted);
}

.mt-0 {
  margin-top: 0 !important;
}

.mt-2 {
  margin-top: var(--sp-2);
}

.mt-4 {
  margin-top: var(--sp-4);
}

.mt-6 {
  margin-top: var(--sp-6);
}

.mt-8 {
  margin-top: var(--sp-8);
}

.flex {
  display: flex;
}

.flex-wrap {
  flex-wrap: wrap;
}

.items-center {
  align-items: center;
}

.gap-3 {
  gap: var(--sp-3);
}

.gap-4 {
  gap: var(--sp-4);
}

.divider {
  height: 1px;
  background: var(--c-border);
  border: 0;
  margin-block: var(--sp-8);
}

/* --------------------- Scroll Reveal System --------------------- */
/* Elements start hidden and animate in when [data-revealed] is added by JS */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}

[data-reveal="left"] {
  transform: translateX(-32px) translateY(0);
}

[data-reveal="right"] {
  transform: translateX(32px) translateY(0);
}

[data-reveal="scale"] {
  transform: scale(0.94) translateY(12px);
}

[data-revealed] {
  opacity: 1 !important;
  transform: none !important;
}

/* Staggered children — cards, gallery items, feature stats */
[data-reveal-stagger]>* {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}

[data-reveal-stagger].is-staggered>*:nth-child(1) {
  transition-delay: 0.04s;
}

[data-reveal-stagger].is-staggered>*:nth-child(2) {
  transition-delay: 0.12s;
}

[data-reveal-stagger].is-staggered>*:nth-child(3) {
  transition-delay: 0.20s;
}

[data-reveal-stagger].is-staggered>*:nth-child(4) {
  transition-delay: 0.28s;
}

[data-reveal-stagger].is-staggered>*:nth-child(5) {
  transition-delay: 0.34s;
}

[data-reveal-stagger].is-staggered>*:nth-child(6) {
  transition-delay: 0.40s;
}

[data-reveal-stagger].is-staggered>* {
  opacity: 1;
  transform: none;
}

/* --------------------- Hero Enhancements --------------------- */
/* Gentle Ken Burns drift on hero image — very subtle, no parallax */
@keyframes heroDrift {
  0% {
    transform: scale(1.0) translate(0, 0);
  }

  50% {
    transform: scale(1.04) translate(-0.5%, 0.3%);
  }

  100% {
    transform: scale(1.0) translate(0, 0);
  }
}

.hero__bg img {
  animation: heroDrift 25s ease-in-out infinite;
}

/* Hero text cascade on load */
.hero__grid .eyebrow,
.hero__grid h1,
.hero__grid .lede,
.hero__ctas {
  opacity: 0;
  transform: translateY(18px);
  animation: heroFadeUp 0.8s var(--ease) forwards;
}

.hero__grid .eyebrow {
  animation-delay: 0.1s;
}

.hero__grid h1 {
  animation-delay: 0.25s;
}

.hero__grid .lede {
  animation-delay: 0.4s;
}

.hero__ctas {
  animation-delay: 0.55s;
}

@keyframes heroFadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hero feature stats count-up style entrance */
.hero__features {
  opacity: 0;
  animation: heroFadeUp 0.7s var(--ease) 0.7s forwards;
}

.hero__feature strong {
  display: inline-block;
  transition: transform 0.4s var(--ease);
}

/* --------------------- Decorative Wave Dividers --------------------- */
.wave-divider {
  display: block;
  width: 100%;
  height: clamp(32px, 3vw, 64px);
  overflow: hidden;
  line-height: 0;
}

.wave-divider--flip {
  transform: rotate(180deg);
}

.wave-divider svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* --------------------- Enhanced Card Interactions --------------------- */
.card--link::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--r-lg);
  opacity: 0;
  background: linear-gradient(135deg, var(--c-primary-050) 0%, transparent 60%);
  transition: opacity 0.35s var(--ease);
  pointer-events: none;
  z-index: 0;
}

.card--link {
  position: relative;
  overflow: hidden;
}

.card--link:hover::before {
  opacity: 1;
}

.card--link>* {
  position: relative;
  z-index: 1;
}

.card--accent.card--link::before {
  background: linear-gradient(135deg, var(--c-accent-050) 0%, transparent 60%);
}

/* Icon lift on card hover */
.card--link:hover .card__icon {
  transform: translateY(-2px) scale(1.06);
  transition: transform 0.3s var(--ease);
}

.card__icon {
  transition: transform 0.3s var(--ease);
}

/* --------------------- Enhanced Gallery --------------------- */
.gallery__item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(26, 21, 18, 0.25) 100%);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
  pointer-events: none;
  border-radius: var(--r-md);
}

.gallery__item:hover::after {
  opacity: 1;
}

/* --------------------- Split Media Enhancements --------------------- */
.split__media {
  transition: box-shadow 0.4s var(--ease), transform 0.4s var(--ease);
}

.split__media:hover {
  transform: translateY(-3px) scale(1.005);
  box-shadow: var(--sh-lg);
}

/* --------------------- Button Enhancements --------------------- */
/* Subtle shine sweep on primary buttons */
.btn:not(.btn--secondary):not(.btn--ghost)::after {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(120deg,
      transparent 0%,
      rgba(255, 255, 255, 0.15) 50%,
      transparent 100%);
  transition: left 0.6s var(--ease);
  pointer-events: none;
}

.btn:not(.btn--secondary):not(.btn--ghost) {
  position: relative;
  overflow: hidden;
}

.btn:not(.btn--secondary):not(.btn--ghost):hover::after {
  left: 125%;
}

/* --------------------- Eyebrow Decoration --------------------- */
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 2px;
  background: var(--c-primary);
  border-radius: 2px;
  vertical-align: middle;
  margin-right: 10px;
  opacity: 0.65;
}

/* --------------------- Section Alt Soft Gradient --------------------- */
.section--alt {
  background: linear-gradient(180deg, var(--c-bg-alt) 0%, var(--c-bg) 100%);
}

/* --------------------- Coastguard CTA Card Glow --------------------- */
.card--flat[style*="text-align:center"] {
  position: relative;
  border: 1px solid var(--c-border);
  transition: box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}

.card--flat[style*="text-align:center"]:hover {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 1px var(--c-accent), 0 8px 30px -12px rgba(11, 122, 111, 0.18);
}

/* --------------------- Footer Reveal --------------------- */
.site-footer {
  position: relative;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(90%, 800px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245, 204, 160, 0.35), transparent);
}

/* --------------------- Callout Subtle Left Accent --------------------- */
.callout {
  border-left: 3px solid var(--c-primary);
}

.callout--warning {
  border-left-color: var(--c-warning);
}

.callout--info {
  border-left-color: var(--c-accent);
}

.callout--danger {
  border-left-color: var(--c-danger);
}

/* --------------------- Page Header Gradient --------------------- */
.page-header {
  background: linear-gradient(180deg, var(--c-bg-alt) 0%, var(--c-bg) 100%);
}

/* ----- Reduced Motion: disable all animation effects ----- */
@media (prefers-reduced-motion: reduce) {

  [data-reveal],
  [data-reveal-stagger]>* {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
  }

  .hero__bg img {
    animation: none !important;
  }

  .hero__grid .eyebrow,
  .hero__grid h1,
  .hero__grid .lede,
  .hero__ctas,
  .hero__features {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }

  .btn::after {
    display: none !important;
  }
}

/* --------------------- Print --------------------- */
@media print {

  .site-header,
  .site-footer,
  .alert-banner,
  .to-top,
  .mobile-drawer,
  .wave-divider {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  .hero,
  .page-header {
    background: none;
    color: #000;
    padding-block: 1rem;
  }

  .hero__bg,
  .hero__bg::after {
    display: none;
  }

  .hero__grid,
  .hero__grid h1,
  .hero__grid .eyebrow,
  .hero__grid .lede {
    color: #000 !important;
  }

  [data-reveal],
  [data-reveal-stagger]>* {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
}

/* --------------------- Reveal Animations --------------------- */
@media (prefers-reduced-motion: no-preference) {
  [data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
    will-change: opacity, transform;
  }

  [data-reveal="left"] {
    transform: translateX(-40px);
  }

  [data-reveal="right"] {
    transform: translateX(40px);
  }

  [data-reveal="scale"] {
    transform: scale(0.95);
  }

  [data-reveal][data-revealed] {
    opacity: 1;
    transform: translate(0) scale(1);
  }

  [data-reveal-stagger]>* {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
    will-change: opacity, transform;
  }

  [data-reveal-stagger].is-staggered>* {
    opacity: 1;
    transform: translateY(0);
  }

  [data-reveal-stagger].is-staggered>*:nth-child(1) {
    transition-delay: 0.05s;
  }

  [data-reveal-stagger].is-staggered>*:nth-child(2) {
    transition-delay: 0.15s;
  }

  [data-reveal-stagger].is-staggered>*:nth-child(3) {
    transition-delay: 0.25s;
  }

  [data-reveal-stagger].is-staggered>*:nth-child(4) {
    transition-delay: 0.35s;
  }

  [data-reveal-stagger].is-staggered>*:nth-child(5) {
    transition-delay: 0.45s;
  }

  [data-reveal-stagger].is-staggered>*:nth-child(6) {
    transition-delay: 0.55s;
  }

  [data-reveal-stagger].is-staggered>*:nth-child(7) {
    transition-delay: 0.65s;
  }

  [data-reveal-stagger].is-staggered>*:nth-child(8) {
    transition-delay: 0.75s;
  }
}

/* --------------------- Extraordinary Effects --------------------- */

/* 1. Scroll-Driven Circular Motion */
.scroll-driven-section {
  position: relative;
  overflow: hidden;
}

.scroll-circular-content {

  /* Only apply if the browser supports animation-timeline */
  @supports (animation-timeline: view()) {
    animation: circularReveal linear forwards;
    animation-timeline: view();
    animation-range: entry 0% cover 50%;
  }
}

@keyframes circularReveal {
  0% {
    opacity: 0;
    transform: translateX(-150px) rotate(-15deg) scale(0.8);
  }

  50% {
    opacity: 1;
    transform: translateX(0) rotate(0deg) scale(1);
  }

  100% {
    opacity: 1;
    transform: translateX(0) rotate(0deg) scale(1);
  }
}

/* 2. Vertical Parallax Image Frame */
.parallax-frame-section {
  position: relative;
  height: 250vh;
  /* Make section tall so we can scroll through it */
  background: var(--c-bg);
}

.parallax-sticky-container {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.parallax-bg-image {
  position: absolute;
  inset: 0;
  background-image: url('img/vertical-parallax.avif');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  /* Fallback for simple parallax */
  z-index: 1;
}

/* On supported browsers, make the image actually fixed while container is sticky */
@supports (animation-timeline: scroll()) {
  .parallax-bg-image {
    background-attachment: scroll;
    position: fixed;
  }
}

.parallax-overlay-frame {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: var(--c-bg);
  /* Use a clip-path to create a "frame" that reveals the image underneath */
  clip-path: polygon(0% 0%, 0% 100%, 20% 100%, 20% 20%, 80% 20%, 80% 80%, 20% 80%, 20% 100%, 100% 100%, 100% 0%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: clip-path 0.1s ease-out;

  @supports (animation-timeline: view()) {
    animation: frameReveal linear forwards;
    animation-timeline: view();
    animation-range: entry 0% exit 100%;
  }
}

@keyframes frameReveal {
  0% {
    clip-path: polygon(0% 0%, 0% 100%, 45% 100%, 45% 45%, 55% 45%, 55% 55%, 45% 55%, 45% 100%, 100% 100%, 100% 0%);
  }

  50% {
    clip-path: polygon(0% 0%, 0% 100%, 10% 100%, 10% 10%, 90% 10%, 90% 90%, 10% 90%, 10% 100%, 100% 100%, 100% 0%);
  }

  100% {
    clip-path: polygon(0% 0%, 0% 100%, -50% 100%, -50% -50%, 150% -50%, 150% 150%, -50% 150%, -50% 100%, 100% 100%, 100% 0%);
  }
}

.parallax-text-overlay {
  z-index: 3;
  color: var(--c-text);
  background: rgba(255, 248, 225, 0.9);
  padding: var(--sp-6) var(--sp-8);
  border-radius: var(--r-lg);
  text-align: center;
  box-shadow: var(--sh-lg);
  backdrop-filter: blur(10px);

  @supports (animation-timeline: view()) {
    animation: fadeOut linear forwards;
    animation-timeline: view();
    animation-range: entry 50% exit 80%;
  }
}

@keyframes fadeOut {
  0% {
    opacity: 1;
    transform: translateY(0);
  }

  100% {
    opacity: 0;
    transform: translateY(-50px);
  }
}

.parallax-title {
  font-size: var(--fs-4xl);
  color: var(--c-primary);
  margin-bottom: var(--sp-2);
}

/* --------------------- Footer --------------------- */
.footer-nerodyn {
  text-align: center;
  margin-top: var(--sp-4);
  font-size: var(--fs-sm);
  color: var(--c-muted);
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--sp-4);
}

.footer-nerodyn a {
  color: var(--c-primary);
  font-weight: bold;
  text-decoration: none;
  transition: color var(--dur-1) var(--ease);
}

.footer-nerodyn a:hover {
  color: var(--c-primary-050);
}

/* 3. Infographic Timeline */
.timeline-infographic {
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
  max-width: 650px;
  margin: 0 auto;
  position: relative;
}

.timeline-infographic::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 100px;
  width: 4px;
  background: var(--c-primary-100);
  border-radius: var(--r-full);
}

.timeline-step {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-6);
  position: relative;
  z-index: 2;
  transition: transform var(--dur-3) var(--ease), opacity var(--dur-3) var(--ease);
}

.timeline-time {
  width: 80px;
  text-align: right;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-lg);
  color: var(--c-primary);
  padding-top: var(--sp-4);
  flex-shrink: 0;
}

.timeline-dot {
  width: 24px;
  height: 24px;
  background: var(--c-bg);
  border: 4px solid var(--c-accent);
  border-radius: var(--r-full);
  margin-top: calc(var(--sp-4) + 2px);
  box-shadow: 0 0 0 6px var(--c-bg-alt);
  /* Matches section bg */
  flex-shrink: 0;
}

.timeline-content {
  flex: 1;
  background: var(--c-surface);
  padding: var(--sp-6) var(--sp-8);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-md);
  border: 1px solid var(--c-border);
  transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
}

.timeline-content:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh-lg);
}

.timeline-content h3 {
  margin-bottom: var(--sp-2);
  color: var(--c-heading);
  font-family: var(--font-display);
  font-size: var(--fs-xl);
}

.timeline-content p {
  color: var(--c-text);
  font-size: var(--fs-md);
  margin-bottom: 0;
}

@media (max-width: 600px) {
  .timeline-infographic::before {
    left: 28px;
  }

  .timeline-time {
    display: none;
  }

  .timeline-dot {
    margin-left: 18px;
  }

  .timeline-content {
    padding: var(--sp-5) var(--sp-5);
  }
}

/* 4. Bento Grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 280px;
  gap: var(--sp-4);
}

.bento-item {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--c-surface);
  box-shadow: var(--sh-md);
  border: 1px solid var(--c-border);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
}

.bento-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh-lg);
}

.bento-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.bento-item:hover img {
  transform: scale(1.05);
}

.bento-content {
  position: relative;
  z-index: 2;
  padding: var(--sp-5) var(--sp-6);
  background: linear-gradient(to top, rgba(26, 21, 18, 0.95) 0%, rgba(26, 21, 18, 0.6) 60%, transparent 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
}

.bento-content h3 {
  color: #fff;
  font-size: var(--fs-2xl);
  font-family: var(--font-display);
  margin-bottom: var(--sp-2);
}

.bento-content p {
  color: rgba(255, 255, 255, 0.85);
  font-size: var(--fs-md);
  margin-bottom: 0;
}

.bento-item--accent {
  background: var(--c-accent);
}

.bento-item--accent .bento-content {
  background: transparent;
  justify-content: center;
}

.bento-item--large {
  grid-column: span 2;
  grid-row: span 2;
}

.bento-item--wide {
  grid-column: span 2;
}

@media (max-width: 960px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 240px;
  }

  .bento-item--wide {
    grid-column: span 2;
  }
}

@media (max-width: 600px) {
  .bento-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 260px;
  }

  .bento-item--large,
  .bento-item--wide {
    grid-column: span 1;
    grid-row: span 1;
  }
}
/* --------------------- Scroll Reveal Animations --------------------- */
@media (prefers-reduced-motion: no-preference) {
  [data-reveal] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  [data-reveal="left"] { transform: translateX(-30px) translateY(0); }
  [data-reveal="right"] { transform: translateX(30px) translateY(0); }
  [data-reveal="scale"] { transform: scale(0.95); }
  
  [data-reveal][data-revealed] {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }

  [data-reveal-stagger] > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  [data-reveal-stagger].is-staggered > * {
    opacity: 1;
    transform: translate(0, 0);
  }
  
  [data-reveal-stagger].is-staggered > *:nth-child(1) { transition-delay: 0.1s; }
  [data-reveal-stagger].is-staggered > *:nth-child(2) { transition-delay: 0.2s; }
  [data-reveal-stagger].is-staggered > *:nth-child(3) { transition-delay: 0.3s; }
  [data-reveal-stagger].is-staggered > *:nth-child(4) { transition-delay: 0.4s; }
  [data-reveal-stagger].is-staggered > *:nth-child(5) { transition-delay: 0.5s; }
  [data-reveal-stagger].is-staggered > *:nth-child(6) { transition-delay: 0.6s; }
  [data-reveal-stagger].is-staggered > *:nth-child(n+7) { transition-delay: 0.7s; }
}

/* Fix dropdown pointer hover */
.has-dropdown > a svg {
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.has-dropdown:hover > a svg {
  transform: rotate(180deg);
}


/* Fix dropdown gap */
.has-dropdown::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 20px;
}
.dropdown-menu {
  pointer-events: auto;
}
/* Ensure reveal is visible */
[data-revealed] {
  opacity: 1 !important;
  transform: translate(0, 0) scale(1) !important;
}
.is-staggered > * {
  opacity: 1 !important;
  transform: translate(0, 0) scale(1) !important;
}
