/* ============================================================
   MAIN.CSS — Modern Reset · CSS Custom Properties · Base Typography
   Load order: 1 of 4
   ============================================================ */

/* ── Modern CSS Reset ────────────────────────────────────── */

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  hanging-punctuation: first last;
  scroll-behavior: smooth;
}

body {
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100dvh;
  overflow-x: hidden;
}

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

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

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.15;
}

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

ul, ol {
  list-style: none;
}

address {
  font-style: normal;
}

fieldset {
  border: none;
}

/* ── Custom Properties (:root) ───────────────────────────── */

:root {
  /* Color palette — black / white / gray with gold accent */
  --color-ink-900:       #1a1a1a;
  --color-ink-700:       #2d2d2d;
  --color-ink-500:       #5a5a5a;
  --color-ink-400:       #7a7a7a;
  --color-ink-300:       #9a9a9a;
  --color-ink-200:       #c0c0c0;
  --color-ink-100:       #d8d8d8;
  --color-ink-050:       #ebebeb;

  --color-surface-0:     #ffffff;
  --color-surface-1:     #f6f6f6;
  --color-surface-2:     #ededed;
  --color-dark:          #111111;
  --color-dark-alt:      #1c1c1c;

  --color-accent:       #C9963A;
  --color-accent-hover: #B07E28;
  --color-accent-light: rgba(201, 150, 58, 0.10);

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

  /* Layout */
  --nav-height:     72px;
  --max-width:      1280px;
  --section-pad:    clamp(4.5rem, 9vw, 8rem);
  --container-px:   clamp(1.25rem, 5vw, 2.5rem);

  /* Border radius */
  --radius-xs:   2px;
  --radius-sm:   3px;
  --radius-md:   6px;
  --radius-lg:   12px;
  --radius-full: 9999px;

  /* Motion */
  --ease-out:        cubic-bezier(0.0, 0, 0.2, 1);
  --ease-in-out:     cubic-bezier(0.4, 0, 0.2, 1);
  --transition-ui:   150ms ease;
  --transition-med:  300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-modal: 280ms cubic-bezier(0.0, 0, 0.2, 1);

  /* Stacking */
  --z-nav:     1000;
  --z-overlay: 1500;
  --z-modal:   2000;
}

/* ── 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;
  }
}

/* ── Base typography ─────────────────────────────────────── */

body {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-ink-900);
  background-color: var(--color-surface-0);
}

/* ── Scroll margin — compensates for sticky nav on anchor jump ── */

section[id],
[id="footer"] {
  scroll-margin-top: var(--nav-height);
}

/* ── Focus styles — never suppress, just restyle ─────────── */

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

:focus:not(:focus-visible) {
  outline: none;
}
