/* ========================================
   BASE STYLES — Dark warm editorial theme
   Matches reference: C:\Coding\Pear
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
  /* Core palette — warm dark */
  --color-base: #171312;
  --color-surface: #2A201C;
  --color-surface-raised: #332620;
  --color-surface-dim: #1c1612;
  --color-border: #3D2D27;
  --color-text: #F3E6D6;
  --color-text-muted: rgba(243, 230, 214, 0.55);
  --color-text-subtle: rgba(243, 230, 214, 0.32);

  /* Brand — pear green */
  --color-brand: #6F8E3F;
  --color-brand-light: #9DBF5E;
  --color-brand-dark: #4E622A;
  --color-brand-dim: rgba(111, 142, 63, 0.15);

  /* Accent — violet */
  --color-violet: #A05BFF;
  --color-violet-light: #BF8FFF;
  --color-violet-dark: #7A3FE0;
  --color-violet-dim: rgba(160, 91, 255, 0.15);

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.75rem;
  --text-5xl: 3.5rem;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --space-5xl: 8rem;

  /* Layout */
  --max-width: 1152px;
  --max-width-narrow: 800px;
  --radius-sm: 4px;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
}

/* ---- Reset ---- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
}

/* ---- Utility ---- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.container--narrow {
  max-width: var(--max-width-narrow);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ---- Typography ---- */
.heading-1 {
  font-size: var(--text-4xl);
  letter-spacing: -0.02em;
  line-height: 0.95;
}

.heading-2 {
  font-size: var(--text-3xl);
  letter-spacing: -0.01em;
}

.heading-3 {
  font-size: var(--text-2xl);
}

.heading-4 {
  font-size: var(--text-xl);
}

.subtext {
  color: var(--color-text-muted);
  font-size: var(--text-base);
  line-height: 1.7;
  font-weight: 300;
}

.label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-brand-light);
}

/* ---- Dividers ---- */
.divider-brand {
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(111, 142, 63, 0.35), transparent);
  border: none;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.7rem 1.5rem;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: 100px;
  border: 1px solid transparent;
  transition: all var(--transition-base);
  white-space: nowrap;
  cursor: pointer;
}

.btn--primary {
  background: var(--color-brand);
  color: var(--color-base);
  border-color: var(--color-brand);
}

.btn--primary:hover {
  background: var(--color-brand-light);
  box-shadow: 0 0 24px rgba(111, 142, 63, 0.35);
}

.btn--outline {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn--outline:hover {
  border-color: var(--color-text);
  color: #fff;
}

.btn--outline-brand {
  background: transparent;
  color: var(--color-brand-light);
  border-color: rgba(111, 142, 63, 0.45);
}

.btn--outline-brand:hover {
  background: rgba(111, 142, 63, 0.1);
  border-color: var(--color-brand);
}

.btn--violet {
  background: var(--color-violet);
  color: #fff;
  border-color: var(--color-violet);
}

.btn--violet:hover {
  background: var(--color-violet-light);
  box-shadow: 0 0 24px rgba(160, 91, 255, 0.35);
}

.btn--ghost {
  background: transparent;
  color: var(--color-text);
  border-color: rgba(243, 230, 214, 0.2);
}

.btn--ghost:hover {
  border-color: var(--color-text);
  background: rgba(243, 230, 214, 0.05);
}

.btn--small {
  padding: 0.45rem 1rem;
  font-size: var(--text-xs);
}

.btn--large {
  padding: 0.9rem 2rem;
  font-size: var(--text-sm);
}

/* ---- Cards ---- */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.38);
}

.card__image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: linear-gradient(135deg, var(--color-surface-raised) 0%, var(--color-border) 100%);
}

.card__body {
  padding: var(--space-lg);
}

/* ---- Header ---- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(23, 19, 18, 0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background var(--transition-base), border-color var(--transition-base);
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  background: rgba(23, 19, 18, 0.95);
  border-bottom-color: var(--color-border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.site-logo {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text);
}

.site-logo span {
  color: var(--color-brand-light);
}

.nav-desktop {
  display: none;
}

.nav-desktop__list {
  display: flex;
  gap: var(--space-xl);
}

.nav-desktop__link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
  position: relative;
}

.nav-desktop__link:hover,
.nav-desktop__link--active {
  color: var(--color-text);
}

.nav-desktop__link--active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-brand);
  border-radius: 1px;
}

.header-cta {
  display: none;
}

/* Mobile menu button */
.menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}

.menu-toggle__bar {
  width: 24px;
  height: 2px;
  background: var(--color-text);
  transition: transform var(--transition-base), opacity var(--transition-base);
}

.menu-toggle.is-open .menu-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.is-open .menu-toggle__bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-open .menu-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav overlay */
.nav-mobile {
  display: none;
  position: fixed;
  inset: 72px 0 0 0;
  background: var(--color-base);
  z-index: 99;
  padding: var(--space-2xl) var(--space-lg);
}

.nav-mobile.is-open {
  display: block;
}

.nav-mobile__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.nav-mobile__link {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  color: var(--color-text);
  transition: color var(--transition-fast);
}

.nav-mobile__link:hover {
  color: var(--color-brand-light);
}

/* ---- Footer ---- */
.site-footer {
  background: var(--color-surface-dim);
  color: var(--color-text);
  padding: var(--space-4xl) 0 var(--space-xl);
  border-top: 1px solid var(--color-border);
}

.footer__grid {
  display: grid;
  gap: var(--space-2xl);
  margin-bottom: var(--space-3xl);
}

.footer__brand {
  max-width: 320px;
}

.footer__logo {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-md);
}

.footer__logo span {
  color: var(--color-brand-light);
}

.footer__tagline {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
}

.footer__heading {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-text-subtle);
  margin-bottom: var(--space-md);
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer__link {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}

.footer__link:hover {
  color: var(--color-brand-light);
}

.footer__bottom {
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-items: center;
  text-align: center;
}

.footer__copy {
  font-size: var(--text-xs);
  color: var(--color-text-subtle);
}

.footer__socials {
  display: flex;
  gap: var(--space-md);
}

.footer__social-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-weight: 600;
  transition: all var(--transition-fast);
}

.footer__social-link:hover {
  background: var(--color-brand);
  color: var(--color-base);
  border-color: var(--color-brand);
}

/* ---- Section spacing ---- */
.section {
  padding: var(--space-4xl) 0;
  border-top: 1px solid var(--color-border);
}

.section:first-of-type {
  border-top: none;
}

.section--surface {
  background: var(--color-surface-dim);
}

.section__header {
  margin-bottom: var(--space-2xl);
}

.section__header .label {
  margin-bottom: var(--space-sm);
}

.section__header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.view-all-link {
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-brand-light);
  transition: color var(--transition-fast);
  white-space: nowrap;
}

.view-all-link:hover {
  color: var(--color-brand);
}

/* ---- Responsive ---- */
@media (min-width: 640px) {
  .container {
    padding: 0 2rem;
  }
}

@media (min-width: 768px) {
  :root {
    --text-4xl: 3.25rem;
    --text-5xl: 4.25rem;
  }

  .heading-1 {
    font-size: var(--text-5xl);
  }

  .footer__grid {
    grid-template-columns: 1.5fr 1fr 1fr;
  }

  .footer__bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

@media (min-width: 1024px) {
  .nav-desktop {
    display: block;
  }

  .header-cta {
    display: inline-flex;
  }

  .menu-toggle {
    display: none;
  }
}
