/* ==========================================================================
   L'AERIO · base styles + reset
   ========================================================================== */

/* ── Font faces ─────────────────────────────────────────────────────── */
@font-face {
  font-family: 'DM Serif Display';
  src: url('/assets/fonts/DMSerifDisplay-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'DM Serif Display';
  src: url('/assets/fonts/DMSerifDisplay-Italic.ttf') format('truetype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'EB Garamond';
  src: url('/assets/fonts/EBGaramond-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'EB Garamond';
  src: url('/assets/fonts/EBGaramond-Italic.ttf') format('truetype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Cardo';
  src: url('/assets/fonts/Cardo-Italic.ttf') format('truetype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

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

html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: 1.1875rem; /* 19px desktop · WCAG-comfortable body */
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  min-height: 100svh;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

@media (max-width: 768px) {
  body { font-size: 1.125rem; line-height: 1.55; } /* 18px mobile */
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

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

a {
  color: var(--wine);
  text-decoration: none;
  transition: color var(--m-fast);
}
a:hover { color: var(--bronze); }

ul, ol { list-style: none; }

/* ── Typography ─────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  color: var(--wine);
  letter-spacing: -0.01em;
}
.section--wine h1, .section--wine h2, .section--wine h3,
.section--wine h4, .section--wine h5, .section--wine h6,
.section--cream h1, .section--cream h2, .section--cream h3 { color: var(--wine); }
.section--wine h1, .section--wine h2, .section--wine h3,
.section--wine h4, .section--wine h5, .section--wine h6 { color: var(--cream); }

h1 { font-size: var(--type-display); }
h2 { font-size: var(--type-52); }
h3 { font-size: var(--type-40); }
h4 { font-size: var(--type-32); }
h5 { font-size: var(--type-26); }
h6 { font-size: var(--type-21); }

p { max-width: 65ch; }
.flow > * + * { margin-top: var(--sp-24); }

em, i { font-style: italic; }
strong, b { font-weight: 500; }

.font-display  { font-family: var(--font-display); }
.font-body     { font-family: var(--font-body); }
.font-accent   { font-family: var(--font-accent); font-style: italic; }

/* ── Layout primitives ──────────────────────────────────────────────── */
.container {
  max-width: var(--max-content);
  margin-inline: auto;
  padding-inline: var(--gutter-d);
}
@media (max-width: 1024px) { .container { padding-inline: var(--gutter-t); } }
@media (max-width: 768px)  { .container { padding-inline: var(--gutter-m); } }

.reading {
  max-width: var(--max-read);
  margin-inline: auto;
  padding-inline: var(--gutter-d);
}
@media (max-width: 768px) { .reading { padding-inline: var(--gutter-m); } }

.section {
  padding-block: var(--section-y-d);
}
@media (max-width: 1024px) { .section { padding-block: var(--section-y-t); } }
@media (max-width: 768px)  { .section { padding-block: var(--section-y-m); } }

.section--tight { padding-block: var(--sp-48); }

.section--wine {
  background: var(--wine);
  color: var(--cream);
}
.section--wine h1, .section--wine h2, .section--wine h3,
.section--wine h4, .section--wine h5, .section--wine h6 {
  color: var(--cream);
}
.section--wine a { color: var(--cream); }
.section--wine a:hover { color: var(--bronze); }

.section--cream {
  background: var(--cream);
}

/* ── Hairlines ──────────────────────────────────────────────────────── */
.hairline {
  border: 0;
  border-top: 1px solid var(--wine-12);
  margin-block: var(--sp-48);
}
.hairline--bronze {
  border-top-color: var(--bronze);
}
.hairline--center {
  width: 80px;
  margin-inline: auto;
}

/* ── Buttons ────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-8);
  padding: 14px 24px;
  font-family: var(--font-body);
  font-size: var(--type-16);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--cream);
  background: var(--wine);
  border: 1px solid var(--wine);
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: all var(--m-fast);
}
.btn:hover {
  background: var(--bronze);
  border-color: var(--bronze);
  color: var(--cream);
}
.btn--ghost {
  color: var(--wine);
  background: transparent;
}
.btn--ghost:hover {
  background: var(--wine);
  color: var(--cream);
}
.btn--cream {
  color: var(--wine);
  background: var(--cream);
  border-color: var(--cream);
}
.btn--cream:hover {
  background: var(--bronze);
  color: var(--cream);
  border-color: var(--bronze);
}

/* ── Eyebrow + section labels ───────────────────────────────────────── */
.eyebrow {
  font-family: var(--font-body);
  font-size: var(--type-12);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bronze-text);
  margin-bottom: var(--sp-16);
}
.section--wine .eyebrow { color: rgba(239,231,217,0.78); }

/* ── Pull quote ─────────────────────────────────────────────────────── */
.pullquote {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: var(--type-32);
  line-height: 1.3;
  color: var(--wine);
  padding-left: var(--sp-32);
  border-left: 2px solid var(--bronze);
  margin: var(--sp-48) 0;
  max-width: var(--max-read);
}

/* ── Cards ──────────────────────────────────────────────────────────── */
.card {
  background: var(--vellum-warm);
  padding: var(--sp-32);
  border: 1px solid var(--wine-12);
  transition: transform var(--m-fast), border-color var(--m-fast);
  display: block;
  text-decoration: none;
  color: inherit;
}
.card:hover {
  transform: translateY(-2px);
  border-color: var(--bronze);
  color: inherit;
}
.card h3 { margin-bottom: var(--sp-12); }
.card p  { margin-top: var(--sp-8); color: var(--black-soft); }

/* ── Focus ──────────────────────────────────────────────────────────── */
*:focus-visible {
  outline: 2px solid var(--bronze);
  outline-offset: 4px;
}

/* ── Skip-to-content ────────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  padding: 0.75rem 1.25rem;
  background: var(--wine);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: var(--type-14);
  text-decoration: none;
  transition: top 200ms ease;
}
.skip-link:focus { top: 1rem; }

/* ── Utility ────────────────────────────────────────────────────────── */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.center  { text-align: center; }
.italic  { font-style: italic; }
.muted   { color: var(--bronze-text); }
.mb-8    { margin-bottom: var(--sp-8); }
.mb-16   { margin-bottom: var(--sp-16); }
.mb-24   { margin-bottom: var(--sp-24); }
.mb-32   { margin-bottom: var(--sp-32); }
.mb-48   { margin-bottom: var(--sp-48); }
.mb-64   { margin-bottom: var(--sp-64); }

.grid    { display: grid; gap: var(--sp-32); }
.grid-2  { grid-template-columns: repeat(2, 1fr); }
.grid-3  { grid-template-columns: repeat(3, 1fr); }
.grid-4  { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1024px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ── Scroll-reveal ──────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--m-medium), transform var(--m-medium);
}
.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

/* ── Print ──────────────────────────────────────────────────────────── */
@media print {
  .site-header, .site-footer, .skip-link { display: none !important; }
  body { color: #000; background: #fff; font-size: 12pt; }
  a { color: #000; text-decoration: underline; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; }
  .section { padding-block: 1rem; }
}
