/* ==========================================================================
   Liora Essence — base: reset, document, typography, accessibility floor
   ========================================================================== */

*, *::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(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  font-feature-settings: "kern" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1,h2,h3,h4,figure,blockquote,p,dl,dd { margin: 0; }
ul[class],ol[class] { list-style: none; margin: 0; padding: 0; }
img,picture,video,canvas,svg { display: block; max-width: 100%; height: auto; }
input,button,textarea,select { font: inherit; color: inherit; }

/* ---- Headings: Playfair carries the personality, so it is set tight ---- */
h1,h2,h3,h4,.u-display {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--text);
  text-wrap: balance;
}
h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }

p { text-wrap: pretty; }
p + p { margin-top: var(--sp-4); }

/* Body copy never exceeds a comfortable measure */
.u-prose { max-width: var(--measure); }
.u-prose p,
.u-prose li { font-size: var(--step-0); line-height: 1.7; }

/* Prices, quantities, order numbers — tabular so columns align */
.u-numeric, .price, .amount, .woocommerce-Price-amount {
  font-family: var(--font-numeric);
  font-feature-settings: "tnum" 1, "kern" 1;
  font-variant-numeric: tabular-nums;
}

a { color: var(--text); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--accent-fill); }

/* ---- Focus: visible, always, and not removed on mouse ---- */
:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 1px;
}

/* ---- Skip link — first tab stop ---- */
.skip-link {
  position: absolute; left: var(--sp-4); top: -100px;
  z-index: 999;
  background: var(--surface-inverse); color: var(--text-inverse);
  padding: var(--sp-3) var(--sp-4);
  text-decoration: none;
  transition: top var(--dur-fast) var(--ease);
}
.skip-link:focus { top: var(--sp-4); color: var(--text-inverse); }

.screen-reader-text, .u-visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%);
  white-space: nowrap; border: 0;
}
.screen-reader-text:focus {
  width: auto; height: auto; clip-path: none;
  padding: var(--sp-3) var(--sp-4); margin: 0;
  background: var(--surface-inverse); color: var(--text-inverse);
  z-index: 999;
}

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

.section { padding-block: var(--sp-8); }
@media (min-width: 768px) { .section { padding-block: var(--sp-9); } }

/* Sections declare their own ground; no cancelling specificity chains.
   Every surface variant sets BOTH background and color. */
.section--sunken  { background: var(--surface-sunken);  color: var(--text); }
.section--inverse { background: var(--surface-inverse); color: var(--text-inverse); }
.section--inverse h1,
.section--inverse h2,
.section--inverse h3,
.section--inverse h4 { color: var(--text-inverse); }
.section--inverse a  { color: var(--text-inverse); }

/* ---- Touch targets: 44px minimum, per WCAG 2.5.5 ---- */
.btn, .nav__link, .icon-btn {
  min-height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
}
