/* ================================================
   BASE.CSS — Reset + Custom Properties + Base
   ================================================ */

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

:root {
  /* ---- Colors ---- */
  --color-bg:              #f7f4ef;
  --color-surface:         #f9f7f3;
  --color-surface-offset:  #f0ece6;
  --color-text:            #28251d;
  --color-text-muted:      #7a7570;
  --color-text-faint:      #b8b4ad;
  --color-primary:         #3d6b58;
  --color-primary-hover:   #2e5244;
  --color-primary-light:   #d4e5dc;
  --color-accent-italic:   #4a7a5e;
  --color-dark-bg:         #1f1e1b;
  --color-dark-surface:    #2a2926;
  --color-dark-text:       #e8e4dc;
  --color-dark-muted:      #9a9690;
  --color-border:          rgba(40, 37, 29, 0.10);

  /* ---- Layout ---- */
  --header-height: 72px;

  /* ---- Fluid Type Scale ---- */
  --text-xs:   clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl:  clamp(2.5rem, 1rem + 4vw, 5rem);

  /* ---- Spacing (4px grid) ---- */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* ---- Border Radius ---- */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-full: 9999px;

  /* ---- Shadows ---- */
  --shadow-sm: 0 1px 2px rgba(28, 25, 18, 0.06);
  --shadow-md: 0 4px 12px rgba(28, 25, 18, 0.08);
  --shadow-lg: 0 12px 32px rgba(28, 25, 18, 0.12);

  /* ---- Transitions ---- */
  --transition: 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---- HTML / Body ---- */
html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: 'Jost', sans-serif;
  font-weight: 400;
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.65;
  overflow-x: hidden;
}

/* ---- Headings — serif only for 24px+ ---- */
h1, h2, h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
  line-height: 1.1;
  color: var(--color-text);
}

h4, h5, h6 {
  font-family: 'Jost', sans-serif;
  font-weight: 500;
  line-height: 1.3;
}

/* ---- Links ---- */
a {
  color: inherit;
  text-decoration: none;
}

/* ---- Lists ---- */
ul, ol {
  list-style: none;
}

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

/* ---- Buttons ---- */
button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* ---- Forms ---- */
input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

strong {
  font-weight: 500;
}

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

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
