/* ============================================================
   BASE — Reset · Typography · Utilities
   ============================================================ */

/* ── MODERN RESET ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + var(--desktop-nav-h, 0px) + 8px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Offset for fixed mobile header + tab bar */
  padding-top: var(--nav-h);
  padding-bottom: var(--tab-total);
  overflow-x: hidden;
}

@media (min-width: 1024px) {
  body {
    padding-top: var(--desktop-nav-h);
    padding-bottom: 0;
  }
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: 1rem; }
ul, ol { list-style: none; }

/* ── FONT LOADING ────────────────────────────────────────── */
/* Loaded via wp_enqueue_style in functions.php */

/* ── TYPOGRAPHY SCALE ────────────────────────────────────── */

/* Display headings — Fraunces (serif) */
.t-display-xl {
  font-family: var(--font-display);
  font-size: var(--text-4xl);    /* 36px mobile */
  font-weight: 400;
  font-style: normal;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.t-display-lg {
  font-family: var(--font-display);
  font-size: var(--text-3xl);    /* 30px mobile */
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.t-display-md {
  font-family: var(--font-display);
  font-size: var(--text-2xl);    /* 24px mobile */
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
}

@media (min-width: 1024px) {
  .t-display-xl {
    font-size: var(--text-7xl);  /* 72px desktop */
    letter-spacing: -0.03em;
  }
  .t-display-lg {
    font-size: var(--text-5xl);  /* 44px desktop */
  }
  .t-display-md {
    font-size: var(--text-3xl);  /* 30px desktop */
  }
}

/* Body / UI text */
.t-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.t-body    { font-size: var(--text-base); line-height: 1.65; color: var(--ink-2); }
.t-body-sm { font-size: var(--text-sm);  line-height: 1.6;  color: var(--ink-2); }
.t-price   { font-family: var(--font-display); font-weight: 600; color: var(--ink); }

/* ── LAYOUT PRIMITIVES ───────────────────────────────────── */

.container {
  width: 100%;
  max-width: var(--max-content);
  margin-inline: auto;
  padding-inline: var(--page-margin);
}

.section {
  padding-block: var(--section-y);
}
.section--sm {
  padding-block: var(--section-y-sm);
}
.section--inv {
  background: var(--bg-inv);
  color: var(--ink-inv);
}
.section--surface {
  background: var(--bg-surface);
}

/* Grid helpers */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-4); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-6); }

@media (min-width: 768px) {
  .grid-2 { gap: var(--sp-6); }
}

@media (min-width: 1024px) {
  .grid-3 { gap: var(--sp-8); }
}

/* Flex helpers */
.flex        { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between{ display: flex; align-items: center; justify-content: space-between; }
.flex-col    { display: flex; flex-direction: column; }
.gap-2  { gap: var(--sp-2); }
.gap-4  { gap: var(--sp-4); }
.gap-6  { gap: var(--sp-6); }
.gap-8  { gap: var(--sp-8); }

/* ── DIMENSION DIVIDER (signature element) ─────────────── */

.dim-divider {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding-block: var(--sp-4);
}

.dim-divider__line {
  flex: 1;
  height: 1px;
  background: var(--tan);
  position: relative;
}

.dim-divider__line::before,
.dim-divider__line::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 6px;
  height: 6px;
  border-top: 1.5px solid var(--tan);
  border-right: 1.5px solid var(--tan);
}

.dim-divider__line::before {
  left: 0;
  transform: translateY(-50%) rotate(-135deg);
}

.dim-divider__line::after {
  right: 0;
  transform: translateY(-50%) rotate(45deg);
}

.dim-divider__label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--tan);
  white-space: nowrap;
}

/* ── SECTION LABELS (eyebrows) ──────────────────────────── */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--forest);
  display: block;
  margin-bottom: var(--sp-3);
}

.eyebrow--tan   { color: var(--tan); }
.eyebrow--muted { color: var(--ink-3); }
.eyebrow--inv   { color: rgba(196,168,130,0.7); }

/* ── SCROLL REVEAL ───────────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--dur-enter) var(--ease-out),
              transform var(--dur-enter) var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--dur-slow) var(--ease-out),
              transform var(--dur-slow) var(--ease-out);
}

.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 60ms; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 120ms; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 180ms; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 240ms; }
.reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 300ms; }

.reveal-stagger.is-visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* ── ACCESSIBILITY ───────────────────────────────────────── */

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

.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--espresso);
  color: var(--ink-inv);
  padding: var(--sp-3) var(--sp-6);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font: 600 var(--text-sm)/1 var(--font-body);
  z-index: 9999;
  transition: top var(--dur-fast) var(--ease-out);
}

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

/* Focus visible — replaces default browser outline */
:focus-visible {
  outline: 2.5px solid var(--espresso);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

/* ── REDUCED MOTION ─────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal, .reveal-stagger > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ── IMAGE PLACEHOLDERS (dev) ───────────────────────────── */

.img-placeholder {
  background: var(--tan-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tan);
  font-size: var(--text-sm);
}

/* ── WORDPRESS SPECIFIC ─────────────────────────────────── */

/* WP core alignments */
.aligncenter { display: block; margin-inline: auto; }
.alignleft   { float: left; margin-right: var(--sp-4); }
.alignright  { float: right; margin-left: var(--sp-4); }
.alignwide   { margin-inline: calc(-1 * var(--page-margin)); }

/* WP gallery captions */
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: var(--text-sm); color: var(--ink-3); margin-top: var(--sp-2); }

/* WP admin bar offset */
.admin-bar body { padding-top: calc(var(--nav-h) + 32px); }
@media (min-width: 1024px) {
  .admin-bar body { padding-top: calc(var(--desktop-nav-h) + 32px); }
  .admin-bar .site-header,
  .admin-bar .nav-desktop { top: 32px; }
}
