/* ==========================================================================
   AUREL — Base layer
   Design tokens, reset, typography, utilities.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Surfaces — warm browns lifted from the photography */
  --ink: #100a05;
  --umber: #1a1008;
  --clay: #241708;
  --bark: #33210f;

  /* Accents */
  --gold: #d9a05b;
  --gold-lite: #f0c285;
  --gold-deep: #a06f34;
  --gold-ink: #8a5c28;
  --ember: #b4623a;

  /* Ink on dark */
  --bone: #f3ead9;
  --sand: #c6b096;
  --muted: rgba(243, 234, 217, 0.62);
  --faint: rgba(243, 234, 217, 0.5);

  /* Ink on light */
  --paper: #f6f0e5;
  --paper-2: #ece2d1;
  --graphite: #241a10;
  --graphite-soft: rgba(36, 26, 16, 0.72);

  /* Lines */
  --line: rgba(243, 234, 217, 0.16);
  --line-soft: rgba(243, 234, 217, 0.09);
  --line-dark: rgba(36, 26, 16, 0.16);
  --line-dark-soft: rgba(36, 26, 16, 0.09);

  /* Type */
  --font-display: 'Bodoni Moda', 'Didot', 'Bodoni MT', 'Playfair Display', Georgia, serif;
  --font-ui: 'Jost', 'Futura', 'Century Gothic', 'Avenir Next', system-ui, sans-serif;
  --font-editorial: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;

  /* Fluid type scale */
  --t-display: clamp(4rem, 13.5vw, 13.5rem);
  --t-h1: clamp(3rem, 8vw, 7.5rem);
  --t-h2: clamp(2.25rem, 5.2vw, 4.75rem);
  --t-h3: clamp(1.75rem, 3vw, 2.75rem);
  --t-h4: clamp(1.25rem, 1.7vw, 1.6rem);
  --t-lead: clamp(1.05rem, 1.35vw, 1.35rem);
  --t-body: clamp(0.95rem, 1.05vw, 1.0625rem);
  --t-small: 0.8125rem;
  --t-micro: 0.6875rem;

  /* Space */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;
  --s-9: 6rem;
  --s-10: 8rem;
  --gutter: clamp(1.25rem, 4.5vw, 4.5rem);
  --section-y: clamp(5.5rem, 12vw, 11rem);
  --max: 1680px;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --dur: 0.9s;

  /* Layers */
  --z-grain: 60;
  --z-header: 50;
  --z-menu: 70;
  --z-cursor: 90;
  --z-loader: 100;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--font-ui);
  font-size: var(--t-body);
  font-weight: 300;
  line-height: 1.65;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

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

img {
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
}

button {
  cursor: pointer;
}

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

ul,
ol {
  list-style: none;
}

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

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

/* ---------- Typography ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 0.86;
  letter-spacing: -0.015em;
}

.h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--t-h1);
  line-height: 0.94;
  letter-spacing: -0.01em;
}

.h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--t-h2);
  line-height: 1.02;
  letter-spacing: -0.005em;
}

.h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--t-h3);
  line-height: 1.12;
}

.h4 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--t-h4);
  line-height: 1.25;
}

.lead {
  font-family: var(--font-editorial);
  font-size: var(--t-lead);
  font-style: italic;
  font-weight: 400;
  line-height: 1.5;
  color: var(--sand);
}

.prose {
  max-width: 62ch;
  color: var(--muted);
}

.prose p + p {
  margin-top: 1.15em;
}

/* Micro label — the workhorse of the whole system */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.85em;
  font-size: var(--t-micro);
  font-weight: 400;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold);
}

.eyebrow::before {
  content: '';
  width: clamp(1.5rem, 3vw, 2.75rem);
  height: 1px;
  background: currentColor;
  opacity: 0.7;
  flex: none;
}

.eyebrow--plain::before {
  display: none;
}

.num {
  font-family: var(--font-ui);
  font-size: var(--t-micro);
  font-weight: 400;
  letter-spacing: 0.22em;
  font-variant-numeric: tabular-nums;
  color: var(--gold);
}

.meta {
  font-size: var(--t-micro);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ---------- Layout primitives ---------- */
.shell {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.shell--wide {
  max-width: none;
}

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

.section {
  position: relative;
  padding-block: var(--section-y);
}

.section--tight {
  padding-block: clamp(3.5rem, 7vw, 6.5rem);
}

.rule {
  height: 1px;
  background: var(--line);
  border: 0;
  width: 100%;
}

.rule--dark {
  background: var(--line-dark);
}

/* ---------- Utility ---------- */
.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: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 200;
  padding: 0.75rem 1.25rem;
  background: var(--gold);
  color: var(--ink);
  font-size: var(--t-micro);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transform: translateY(-160%);
  transition: transform 0.35s var(--ease-out);
}

.skip-link:focus {
  transform: translateY(0);
}

.on-dark {
  color: var(--bone);
}

.on-light {
  background: var(--paper);
  color: var(--graphite);
}

.on-light .prose {
  color: var(--graphite-soft);
}

.on-light .meta {
  color: var(--graphite-soft);
}

/* Accents and dimmed text need a darker value on a light ground. */
.on-light .eyebrow {
  color: var(--gold-ink);
}

.on-light .value__num {
  color: var(--gold-ink);
}

.on-light .card__price {
  color: var(--graphite-soft);
}

.on-light .value__text {
  color: var(--graphite-soft);
}

.on-light .split__quote {
  color: var(--graphite-soft);
}

/* Form fields must invert their tones on a light ground. */
.on-light .field {
  border-bottom-color: var(--line-dark);
}

.on-light .field label {
  --field-label: rgba(36, 26, 16, 0.68);
}

.on-light .field input::placeholder,
.on-light .field textarea::placeholder {
  --field-placeholder: rgba(36, 26, 16, 0.34);
}

.on-light .form__note {
  color: var(--graphite-soft);
}

.on-light .form__status {
  color: var(--gold-ink);
}

.on-light .rule {
  background: var(--line-dark);
}
