/* ==========================================================================
   ALTA TAILORS — Base: reset, typography, layout primitives
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body, h1, h2, h3, h4, p, figure, blockquote, ul, ol { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
img, picture, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }

body {
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

::selection { background: var(--gold); color: var(--navy-deep); }

:focus-visible { outline: 1px solid var(--gold); outline-offset: 4px; }

.skip-link {
  position: fixed; left: 1rem; top: -4rem; z-index: 1000;
  background: var(--gold); color: var(--navy-deep);
  padding: .75rem 1rem; font-size: var(--fs-small); font-weight: 600;
  transition: top var(--dur-fast) var(--ease-out);
}
.skip-link:focus { top: 1rem; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---- Typography ---- */
.display, .h1, .h2, .h3 {
  font-family: var(--font-display);
  font-weight: 300;
  letter-spacing: -0.015em;
  line-height: var(--lh-display);
}
.display { font-size: var(--fs-hero); line-height: var(--lh-tight); letter-spacing: -0.025em; }
.h1 { font-size: var(--fs-h1); line-height: 1.08; }
.h2 { font-size: var(--fs-h2); }
.h3 { font-size: var(--fs-h3); font-weight: 400; }
.display em, .h1 em, .h2 em, .h3 em { font-style: italic; font-weight: 300; }

.lead { font-size: var(--fs-lead); line-height: 1.7; font-weight: 300; max-width: 38ch; }
.body-copy { max-width: 60ch; color: var(--stone); }
.small { font-size: var(--fs-small); }

.label {
  display: inline-flex; align-items: center; gap: .9em;
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  line-height: 1.2;
}
.label--rule::before {
  content: ""; width: 2.4rem; height: 1px; background: currentColor; opacity: .7;
}
.numeral {
  font-family: var(--font-display); font-style: italic; font-weight: 300;
  color: var(--gold); line-height: 1;
}

/* ---- Layout ---- */
.container { width: 100%; max-width: var(--max-w); margin-inline: auto; padding-inline: var(--gutter); }
.section { position: relative; padding-block: var(--section-y); }
.section > *, .layer { position: relative; z-index: 2; }   /* content above the gold thread */

.grid-12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(1rem, 2vw, 2rem); }

/* ---- Surfaces ---- */
.theme-navy { background: var(--navy); color: var(--ivory); }
.theme-navy .body-copy, .theme-navy .muted { color: var(--mist); }
.theme-deep { background: var(--navy-deep); color: var(--ivory); }
.theme-deep .body-copy, .theme-deep .muted { color: var(--mist); }
.theme-espresso { background: var(--espresso); color: var(--ivory); }
.theme-espresso .body-copy, .theme-espresso .muted { color: #bfb3a5; }
.theme-ivory { background: var(--ivory); color: var(--ink); }
.theme-ivory .label { color: var(--gold-ink); }
.theme-ivory-2 { background: var(--ivory-2); color: var(--ink); }
.theme-ivory-2 .label { color: var(--gold-ink); }
.theme-navy .label, .theme-deep .label, .theme-espresso .label { color: var(--gold); }

.hairline { height: 1px; background: var(--line-light); border: 0; margin: 0; }
.theme-navy .hairline, .theme-deep .hairline, .theme-espresso .hairline { background: var(--line-dark); }

/* ---- Images with graceful fallback ----
   .media gets a woven-cloth texture so a missing/remote-blocked photo
   still reads as intentional. */
.media {
  position: relative; overflow: hidden; isolation: isolate;
  background-color: var(--navy-soft);
  background-image:
    repeating-linear-gradient(45deg, rgba(255,255,255,.035) 0 2px, transparent 2px 6px),
    repeating-linear-gradient(-45deg, rgba(0,0,0,.08) 0 2px, transparent 2px 6px),
    radial-gradient(120% 90% at 30% 20%, rgba(197,160,89,.22), transparent 60%);
}
.media img { width: 100%; height: 100%; object-fit: cover; }
.media img.is-broken { opacity: 0; }
.media__tag {
  position: absolute; left: .75rem; bottom: .75rem; z-index: 3;
  font-size: .62rem; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(245,241,234,.75); background: rgba(18,28,39,.55);
  padding: .35rem .55rem; backdrop-filter: blur(6px);
}

/* ---- Motion pre-states (only when JS + motion are active) ---- */
html.has-motion [data-fade] { opacity: 0; transform: translateY(24px); }
html.has-motion [data-split] { visibility: hidden; }

/* SplitText line masks: give each line room so descenders (g, y, p),
   ascenders and italic overhangs are never clipped. The negative margin
   cancels the padding so line spacing stays exactly as designed. */
[data-split] > div,
[data-split] .split-line-mask {
  padding: 0.1em 0.12em 0.24em 0.14em;   /* left room for italic swashes (p, g, f) */
  margin: -0.1em -0.12em -0.24em -0.14em;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
}
