/* ==========================================================================
   LEGACY OPERATIONS · Design System
   styles.css · Part A foundations
   --------------------------------------------------------------------------
   01. Design tokens
   02. Reset & base
   03. Layout (container, sections, section heads)
   04. Typography helpers
   05. Buttons
   06. Badges & pills
   07. Navigation
   08. Cards (story, motto, focus, service, step, review, fit)
   09. Forms (base)
   10. Popups / toasts
   11. Footer
   12. Motion & utilities
   13. Responsive
   ========================================================================== */

/* --------------------------------------------------------------------------
   01. Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* Brand palette */
  --burgundy: #5C1A2B;
  --burgundy-dark: #2A0E17;
  --burgundy-deep: #1D0910;
  --gold: #C9A24B;
  --gold-bright: #DBB561;
  --gold-soft: rgba(201, 162, 75, 0.14);
  --ivory: #F7F1E6;
  --sand: #EDE2CC;
  --sand-line: #E3D8C4;
  --emerald: #2F5D50;
  --emerald-deep: #25493F;
  --charcoal: #241F1F;
  --charcoal-soft: #322A2A;

  /* Semantic */
  --text: #40332C;
  --text-muted: #726A62;
  --text-on-dark: #D8C7AE;
  --surface: #FFFFFF;
  --surface-warm: var(--ivory);
  --line: var(--sand-line);
  --line-on-dark: rgba(247, 241, 230, 0.14);

  /* Typography */
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --fs-hero: clamp(2.5rem, 6vw, 4.25rem);
  --fs-h1: clamp(2.1rem, 4.5vw, 3.25rem);
  --fs-h2: clamp(1.75rem, 3.5vw, 2.5rem);
  --fs-h3: clamp(1.25rem, 2.2vw, 1.5rem);
  --fs-h4: 1.0625rem;
  --fs-lead: clamp(1rem, 1.6vw, 1.125rem);
  --fs-body: 0.9375rem;
  --fs-small: 0.8438rem;
  --fs-tiny: 0.75rem;
  --fs-eyebrow: 0.75rem;

  /* Spacing (8px grid) */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 64px;
  --space-7: 88px;
  --space-8: 112px;
  --section-y: clamp(56px, 9vw, 104px);

  /* Radius */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-pill: 100px;

  /* Elevation */
  --shadow-sm: 0 1px 3px rgba(36, 31, 31, 0.08), 0 1px 2px rgba(36, 31, 31, 0.04);
  --shadow-md: 0 6px 20px rgba(36, 31, 31, 0.10), 0 2px 6px rgba(36, 31, 31, 0.06);
  --shadow-lg: 0 18px 44px rgba(42, 14, 23, 0.16), 0 4px 12px rgba(42, 14, 23, 0.08);

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 240ms;

  /* Layout */
  --container: 1080px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--text);
  background: var(--surface-warm);
  -webkit-font-smoothing: antialiased;
}

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

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

ul,
ol {
  list-style: none;
}

button {
  font: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--burgundy);
  line-height: 1.15;
}

em {
  font-style: italic;
  color: var(--gold);
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Skip link: invisible until keyboard-focused */
.skip-link {
  position: absolute;
  top: -48px;
  left: 12px;
  z-index: 100;
  background: var(--gold);
  color: var(--burgundy-dark);
  font-weight: 700;
  font-size: 0.875rem;
  padding: 10px 18px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  transition: top var(--dur) var(--ease);
}

.skip-link:focus {
  top: 0;
}

::selection {
  background: var(--burgundy);
  color: var(--ivory);
}

/* --------------------------------------------------------------------------
   03. Layout
   -------------------------------------------------------------------------- */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-3);
}

.section {
  padding-block: var(--section-y);
}

/* Alternating section surfaces */
.surface-warm  { background: var(--surface-warm); }
.surface-white { background: var(--surface); }
.surface-sand  { background: var(--sand); }
.surface-dark  { background: var(--charcoal); color: var(--ivory); }
.surface-brand { background: var(--burgundy-dark); color: var(--ivory); }

.section-head {
  max-width: 640px;
  margin-bottom: var(--space-5);
}

.section-head h2 {
  font-size: var(--fs-h2);
}

.section-head p {
  margin-top: var(--space-2);
  font-size: var(--fs-lead);
  color: var(--text);
  line-height: 1.6;
}

/* Dark-surface section head overrides */
.surface-dark .section-head h2,
.surface-brand .section-head h2 { color: var(--ivory); }
.surface-dark .section-head p   { color: #C9BCA8; }
.surface-brand .section-head p  { color: var(--text-on-dark); }

/* --------------------------------------------------------------------------
   04. Typography helpers
   -------------------------------------------------------------------------- */
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.surface-dark .eyebrow,
.surface-brand .eyebrow { color: var(--gold); }

.lead {
  font-size: var(--fs-lead);
  line-height: 1.65;
}

.stars {
  color: var(--gold);
  letter-spacing: 3px;
  font-size: 1.125rem;
  margin-left: 10px;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   05. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1;
  transition: transform var(--dur) var(--ease),
              background-color var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
  will-change: transform;
}

.btn:hover  { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--gold);
  color: var(--burgundy-dark);
}

/* Light surfaces: invert to burgundy so the hover never washes out */
.btn-primary:hover {
  background: var(--burgundy);
  color: var(--ivory);
  box-shadow: var(--shadow-md);
}

/* Dark surfaces: brighten instead, gold pops on dark */
.hero .btn-primary:hover,
.event-hero .btn-primary:hover,
.page-hero .btn-primary:hover,
.surface-dark .btn-primary:hover,
.surface-brand .btn-primary:hover,
.home-cta-band .btn-primary:hover,
.book-cta .btn-primary:hover,
.contact-cta .btn-primary:hover {
  background: var(--gold-bright);
  color: var(--burgundy-dark);
}

.btn-ghost {
  border: 1.5px solid rgba(247, 241, 230, 0.4);
  color: var(--ivory);
  font-weight: 600;
  padding: 12.5px 26px;
}

.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.btn-brand {
  background: var(--burgundy);
  color: var(--ivory);
}

.btn-brand:hover {
  background: var(--burgundy-dark);
  box-shadow: var(--shadow-md);
}

.btn-quiet {
  border: 1.5px solid var(--sand-line);
  color: var(--burgundy);
  background: transparent;
  font-weight: 600;
  padding: 12.5px 26px;
}

.btn-quiet:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* --------------------------------------------------------------------------
   06. Badges & pills
   -------------------------------------------------------------------------- */
.badge {
  display: inline-block;
  background: var(--surface);
  border: 1.5px solid var(--sand-line);
  border-radius: var(--radius-pill);
  padding: 8px 18px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--burgundy);
  letter-spacing: 0.02em;
}

.badge span {
  color: var(--text-muted);
  font-weight: 500;
}

.badge-gold {
  background: var(--gold-soft);
  border-color: transparent;
  color: var(--burgundy);
}

.date-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--burgundy);
  color: var(--ivory);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  line-height: 1.1;
  min-width: 56px;
}

.date-chip .dc-day {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}

.date-chip .dc-mon {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold-bright);
}

/* --------------------------------------------------------------------------
   07. Navigation
   -------------------------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(42, 14, 23, 0.96);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--ivory);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  max-width: var(--container);
  margin-inline: auto;
  padding: 16px var(--space-3);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-lockup svg,
.brand-lockup .brand-img {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.footer-brand .brand-img {
  width: 32px;
  height: 32px;
}

.brand-lockup .bn {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ivory);
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-size: 0.875rem;
  font-weight: 500;
}

.nav-links a:not(.btn):not(.nav-cta) {
  opacity: 0.85;
  transition: opacity var(--dur) var(--ease), color var(--dur) var(--ease);
}

.nav-links a:not(.btn):not(.nav-cta):hover {
  opacity: 1;
  color: var(--gold);
}

.nav-links a.active {
  color: var(--gold);
  opacity: 1;
}

.nav-cta {
  background: var(--gold);
  color: var(--burgundy-dark);
  font-weight: 700;
  font-size: 0.8125rem;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  transition: background-color var(--dur) var(--ease),
              color var(--dur) var(--ease),
              transform var(--dur) var(--ease);
}

.nav-cta:hover {
  background: #D2AB56;
  color: var(--burgundy-dark);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--ivory);
  border-radius: var(--radius-sm);
}

/* Mobile menu overlay */
@media (max-width: 800px) {
  .nav-links {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--burgundy-dark);
    border-top: 1px solid var(--line-on-dark);
    padding: var(--space-3);
    gap: var(--space-2);
    box-shadow: var(--shadow-lg);
  }

  .nav-links.open a {
    display: block;
    font-size: 1rem;
    padding: 12px 4px;
    width: 100%;
  }

  .nav-links.open .nav-cta {
    display: inline-block;
    margin-top: 8px;
    padding: 12px 24px;
    width: auto;
  }
}

/* Very narrow screens: force single column so nothing overflows */
@media (max-width: 380px) {
  .grid > * {
    flex: 1 1 100%;
  }
}

/* --------------------------------------------------------------------------
   08. Cards
   -------------------------------------------------------------------------- */
.card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
}

/* Motto */
.motto-card {
  background: var(--burgundy);
  color: var(--ivory);
  border-radius: var(--radius-md);
  padding: var(--space-4);
}

.motto-card .me {
  color: var(--gold);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 10px;
}

.motto-card .mt {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.375rem;
  line-height: 1.35;
}

/* Focus (emerald) */
.focus-card {
  background: var(--emerald);
  color: var(--ivory);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
}

.focus-card .ft {
  font-weight: 700;
  font-size: 0.875rem;
  margin-bottom: 6px;
  color: #BFE0D2;
}

.focus-card .fd {
  font-size: 0.875rem;
  line-height: 1.55;
  color: #E7F1EC;
}

/* Service */
.svc-card {
  background: var(--ivory);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  border-top: 4px solid var(--gold);
}

.svc-card h3 {
  font-size: var(--fs-h3);
  margin-bottom: var(--space-2);
}

.svc-card ul li {
  font-size: var(--fs-small);
  padding: 9px 0;
  border-bottom: 1px solid var(--sand-line);
  color: var(--text);
}

.svc-card ul li:last-child {
  border-bottom: none;
}

/* Service gallery card (photo-first, used on services page) */
.gallery-card {
  background: var(--ivory);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border-top: 4px solid var(--gold);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.gallery-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.gallery-card .gc-media,
img.gc-media {
  aspect-ratio: 4 / 3;
  width: 100%;
  object-fit: cover;
  background: var(--sand);
  overflow: hidden;
}

.gallery-card .gc-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-card .gc-body {
  padding: var(--space-3);
}

.gallery-card h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.gallery-card p {
  font-size: var(--fs-small);
  color: var(--text);
}

/* Step / process */
.step-card {
  background: var(--charcoal);
  color: var(--ivory);
  border-radius: var(--radius-md);
  padding: var(--space-3);
}

.step-card .sn {
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 1.625rem;
  font-weight: 700;
}

.step-card h3 {
  color: var(--ivory);
  font-size: 1rem;
  margin: 10px 0 8px;
  font-family: var(--font-body);
  font-weight: 700;
}

.step-card p {
  font-size: var(--fs-small);
  color: var(--text-on-dark);
  line-height: 1.55;
}

/* Review */
.review-card {
  background: var(--charcoal-soft);
  border-radius: 14px;
  padding: var(--space-3) var(--space-4);
}

.review-card .rn {
  color: var(--ivory);
  font-weight: 700;
  font-size: 0.875rem;
  margin-bottom: 8px;
}

.review-card .rt {
  font-size: var(--fs-small);
  color: var(--text-on-dark);
  line-height: 1.55;
}

/* Fit */
.fit-card {
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
}

.fit-card.yes {
  background: var(--emerald);
  color: var(--ivory);
}

.fit-card.no {
  background: var(--ivory);
  border: 1.5px solid var(--sand-line);
}

.fit-card .ftt {
  font-weight: 700;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.fit-card.yes .ftt { color: #BFE0D2; }
.fit-card.no  .ftt { color: var(--text-muted); }

.fit-card ul {
  padding-left: 18px;
  list-style: disc;
  font-size: 0.8125rem;
  line-height: 1.8;
}

.fit-card.yes ul { color: #E7F1EC; }
.fit-card.no  ul { color: var(--text); }

/* Note callout */
.note-callout {
  margin-top: var(--space-4);
  background: var(--sand);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  font-size: var(--fs-small);
  color: #4A3B27;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
    09. Forms (base, used by booking/contact in later phases)
   -------------------------------------------------------------------------- */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: var(--space-2);
}

.field label {
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--burgundy);
}

.field input,
.field select,
.field textarea {
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--sand-line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-soft);
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

/* --------------------------------------------------------------------------
   10. Popups / toasts (review pop-ups, Part B feature, base here)
   -------------------------------------------------------------------------- */
.toast {
  position: fixed;
  z-index: 90;
  left: var(--space-3);
  bottom: var(--space-3);
  max-width: 340px;
  background: var(--charcoal);
  color: var(--ivory);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: var(--space-2) var(--space-3);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.toast .rt-name {
  font-weight: 700;
  font-size: var(--fs-small);
  margin-bottom: 4px;
}

.toast .rt-text {
  font-size: 0.8125rem;
  color: var(--text-on-dark);
  line-height: 1.5;
}

.toast .rt-close {
  position: absolute;
  top: 8px;
  right: 10px;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1;
}

@media (prefers-reduced-motion: reduce) {
  .toast {
    transition: opacity var(--dur) var(--ease);
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   11. Footer
   -------------------------------------------------------------------------- */
.footer {
  background: var(--burgundy-dark);
  color: var(--ivory);
  padding: var(--space-5) 0 var(--space-3);
}

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-brand svg {
  width: 32px;
  height: 32px;
}

.footer-brand .bn {
  font-family: var(--font-display);
  font-size: 1.0625rem;
}

.footer-contact {
  font-size: var(--fs-small);
  color: #C9BCA8;
  line-height: 1.9;
}

.footer-bottom {
  margin-top: var(--space-5);
  padding-top: var(--space-3);
  border-top: 1px solid var(--line-on-dark);
  font-size: 0.71875rem;
  color: var(--text-muted);
  text-align: center;
  letter-spacing: 0.04em;
}

/* --------------------------------------------------------------------------
   12. Motion & utilities
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 600ms var(--ease), transform 600ms var(--ease);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

/* Shared grids */
.grid {
  display: flex;
  flex-wrap: wrap;
}

.grid > * {
  flex: 1 1 300px;
  min-width: 0;
}

.grid-2 > * { flex-basis: 420px; }
.grid-3 > * { flex-basis: 300px; }

.grid > * + * {
  margin-left: 0;
}

/* Gapped flex/grid helper (no negative-margin math) */
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }

.text-center { text-align: center; }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }

/* --------------------------------------------------------------------------
   13. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 800px) {
  .section {
    padding-block: 56px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn:hover,
  .gallery-card:hover,
  .nav-cta:hover {
    transform: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
