/* ===================================================
   BASE STYLESHEET — Reset + Typography + Utilities
   === */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=DM+Sans:wght@300;400;500;600&display=swap');

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: var(--space-20);
}

body {
  min-height: 100dvh;
  line-height: 1.6;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  transition: background-color var(--transition-slow), color var(--transition-slow);
}

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

ul[role='list'], ol[role='list'] { list-style: none; }

input, button, textarea, select { font: inherit; color: inherit; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  text-wrap: balance;
  line-height: 1.15;
  font-weight: 400;
}

p, li, figcaption {
  text-wrap: pretty;
  max-width: 72ch;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-interactive);
}
a:hover { color: var(--color-primary-hover); }

::selection {
  background: color-mix(in oklab, var(--color-primary) 25%, transparent);
  color: var(--color-text);
}

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

@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;
  }
}

button { cursor: pointer; background: none; border: none; }

/* ── Utilities ── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border-width: 0;
}

.container {
  width: 100%;
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-6);
}
.container--narrow { max-width: var(--content-narrow); }
.container--default { max-width: var(--content-default); }

.section {
  padding-block: clamp(var(--space-12), 8vw, var(--space-32));
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-8);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--radius-full);
  border: 2px solid transparent;
  transition: all var(--transition-interactive);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: #2d6a4f;
  color: #fff;
  border-color: #2d6a4f;
  box-shadow: 0 4px 14px rgba(45,106,79,0.35);
}
.btn-primary:hover {
  background: #4a9e78;
  border-color: #4a9e78;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(74,158,120,0.45);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-outline:hover {
  background: var(--color-primary);
  color: #fff;
  transform: translateY(-1px);
}

.btn-gold {
  background: var(--color-gold);
  color: #fff;
  border-color: var(--color-gold);
}
.btn-gold:hover {
  background: var(--color-gold-hover);
  border-color: var(--color-gold-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(181, 133, 10, 0.35);
}

.btn-lg {
  padding: var(--space-4) var(--space-10);
  font-size: var(--text-base);
}

/* ── Section label / eyebrow ── */
.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: var(--space-3);
}

/* ── Divider line ── */
.divider {
  width: 48px;
  height: 2px;
  background: var(--color-primary);
  margin: var(--space-4) 0;
}
.divider--center { margin-inline: auto; }

/* ── Card ── */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  transition: box-shadow var(--transition-interactive), transform var(--transition-interactive);
}
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in oklab, var(--color-bg) 88%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-divider);
  transition: box-shadow var(--transition-interactive), background var(--transition-slow);
}
.site-header.scrolled { box-shadow: var(--shadow-sm); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--color-text);
}
.logo-img {
  height: 56px;
  width: auto;
  object-fit: contain;
  display: block;
}
.logo-mark {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}
.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.logo-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--color-text);
  letter-spacing: 0.01em;
}
.logo-tagline {
  font-size: var(--text-xs);
  font-weight: 300;
  color: var(--color-text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Desktop nav */
.nav-desktop {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}
.nav-desktop a {
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
  position: relative;
  padding-bottom: 2px;
}
.nav-desktop a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-primary);
  transition: width var(--transition-interactive);
}
.nav-desktop a:hover, .nav-desktop a.active {
  color: var(--color-text);
}
.nav-desktop a:hover::after, .nav-desktop a.active::after {
  width: 100%;
}

/* Header controls */
.header-controls {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.theme-toggle {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  transition: all var(--transition-interactive);
}
.theme-toggle:hover {
  background: var(--color-surface-offset);
  color: var(--color-text);
}

/* Mobile menu */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: var(--space-2);
  color: var(--color-text);
}
.hamburger span {
  display: block;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.nav-mobile {
  display: none;
  flex-direction: column;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: var(--space-6);
  gap: var(--space-4);
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  font-size: var(--text-base);
  font-weight: 400;
  color: var(--color-text-muted);
  padding-block: var(--space-2);
  border-bottom: 1px solid var(--color-divider);
}
.nav-mobile a:hover, .nav-mobile a.active { color: var(--color-primary); }
.nav-mobile .btn { align-self: flex-start; margin-top: var(--space-2); }

@media (max-width: 768px) {
  .nav-desktop { display: none; }
  .hamburger { display: flex; }
  .header-controls .btn { display: none; }
}

/* ── Footer ── */
.site-footer {
  background: var(--color-surface-offset);
  border-top: 1px solid var(--color-border);
  padding-block: var(--space-16) var(--space-8);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-12);
  margin-bottom: var(--space-12);
}

.footer-brand p {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  margin-top: var(--space-4);
  max-width: 300px;
}

.footer-col h4 {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: var(--space-2); }
.footer-col ul a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.footer-col ul a:hover { color: var(--color-primary); }

.footer-bottom {
  border-top: 1px solid var(--color-divider);
  padding-top: var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
}
.footer-bottom p { font-size: var(--text-xs); color: var(--color-text-faint); max-width: none; }

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.anim-fade-up { animation: fadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) both; }
.anim-fade    { animation: fadeIn 0.6s ease both; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* Scroll-triggered reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1), transform 0.7s cubic-bezier(0.16,1,0.3,1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Page active nav */
.active-page { color: var(--color-primary) !important; }
.active-page::after { width: 100% !important; }
