/* ============================================================
   TRELLIS STACK · BASE
   Resets, typography primitives, shared components.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }

/* Subtle paper grain — keeps large cream fields from feeling flat/digital */
body.grain::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--t-ink); color: var(--t-cream);
  padding: 12px 20px; z-index: 1000; border-radius: 0 0 var(--r-sm) 0;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 2px solid var(--t-rose);
  outline-offset: 3px;
  border-radius: 4px;
}

.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;
}

/* ---------- Layout ---------- */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.section { padding: var(--section-y) 0; }
.measure { max-width: var(--maxw-text); }

/* ---------- Type ---------- */
.t-hero { font-family: var(--font-display); font-size: var(--t-hero); line-height: var(--lh-tight); font-weight: 500; letter-spacing: -0.01em; }
.t-d1   { font-family: var(--font-display); font-size: var(--t-d1);   line-height: var(--lh-tight); font-weight: 500; }
.t-d2   { font-family: var(--font-display); font-size: var(--t-d2);   line-height: var(--lh-snug);  font-weight: 500; }
.t-d3   { font-family: var(--font-display); font-size: var(--t-d3);   line-height: var(--lh-snug);  font-weight: 600; }

.lead { font-size: var(--t-lead); line-height: 1.55; color: var(--text-2); }
.em { font-style: italic; color: var(--accent); }

/* A display heading followed directly by body copy needs clearance, stated once.
 *
 * Two decisions above combine into a collision. The reset zeroes every heading
 * margin (line 26), and the display steps run at line-height 1.05 — tight enough
 * that a Cormorant descender ("y" in "Privacy Policy", "p" in "flagship") spills
 * out of its own line box by ~22px at the largest step. So a heading with no gap
 * after it does not merely sit close to the next paragraph, it lands ON it: the
 * descenders cross the paragraph's first line. Six blocks across five pages hit
 * this, at both viewports.
 *
 * The tight leading is right INSIDE a multi-line headline and stays; only the
 * boundary to the next element needs room. The rule lives here, beside the reset
 * that causes it, rather than in each section's stylesheet — every section that
 * stacks eyebrow → heading → lead needs the identical clearance, and leaving it
 * to each one is what produced six independent omissions.
 *
 * 22px is measured, not chosen: it is what `.page-hero__lead` already carries
 * after the even-larger `.t-hero`, and that pair is the one heading→copy
 * boundary on the site that never collided. */
.t-hero + .lead, .t-d1 + .lead, .t-d2 + .lead, .t-d3 + .lead { margin-top: 22px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: var(--t-label); letter-spacing: var(--tracking-label);
  text-transform: uppercase; color: var(--text-3); font-weight: 600;
}
.eyebrow--dot::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); flex: none;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 15px 30px; border-radius: var(--r-pill);
  background: var(--t-forest); color: var(--t-cream);
  font-size: var(--t-sm); font-weight: 600; letter-spacing: 0.01em;
  box-shadow: var(--sh-sm);
  transition: transform var(--dur-fast) var(--ease-soft), box-shadow var(--dur-fast) var(--ease-soft), background var(--dur-fast) var(--ease-soft);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--sh-md); }
.btn:active { transform: translateY(0); }
.btn--ghost {
  background: transparent; color: var(--text);
  border: 1.5px solid var(--border-strong); box-shadow: none;
}
.btn--ghost:hover { border-color: var(--accent); background: rgba(183,106,116,0.06); }
.on-dark .btn--ghost { color: var(--on-dark); }
.btn--sm { padding: 11px 22px; font-size: var(--t-xs); }

/* ---------- Arch frame — the recurring signature shape ---------- */
.arch-top { border-radius: var(--r-arch); }
.arch-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-arch);
  box-shadow: var(--sh-md);
}

/* ---------- Scroll reveal (JS toggles .reveal-ready / .is-in) ---------- */
[data-reveal] { opacity: 1; }
html.reveal-ready [data-reveal] {
  opacity: 0;
  transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
html.reveal-ready [data-reveal="fade"] { transform: none; }
html.reveal-ready [data-reveal]:not([data-reveal="fade"]):not([data-reveal="scale"]) { transform: translateY(22px); }
html.reveal-ready [data-reveal="scale"] { transform: scale(0.97); }
html.reveal-ready [data-reveal].is-in { opacity: 1; transform: none; }

.reveal-line { display: block; overflow: hidden; }
.reveal-line > span { display: inline-block; }
html.reveal-ready .reveal-line > span {
  transform: translateY(105%);
  transition: transform var(--dur-slow) var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
html.reveal-ready [data-reveal].is-in .reveal-line > span { transform: none; }

/* ---------- Divider with diamond (echoes logo ornament) ---------- */
.divider {
  display: flex; align-items: center; justify-content: center;
  gap: 14px; margin: 0 auto;
}
.divider .line { flex: 1; height: 1px; background: currentColor; opacity: 0.3; max-width: 90px; }
.divider .diamond {
  width: 8px; height: 8px; border: 1.5px solid currentColor;
  opacity: 0.55; transform: rotate(45deg); flex: none;
}

@media (max-width: 860px) {
  .section { padding: clamp(3.5rem, 12vw, 6rem) 0; }
}
