*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; tab-size: 4; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-16);
  line-height: var(--lh-base);
  color: var(--color-ink);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; text-decoration: none; transition: color var(--t-fast) var(--ease); }
a:hover { color: var(--color-brand); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--lh-tight);
  margin: 0 0 var(--sp-4);
}
h1 { font-size: clamp(var(--fs-32), 4vw, var(--fs-48)); }
h2 { font-size: clamp(var(--fs-24), 3vw, var(--fs-32)); }
h3 { font-size: var(--fs-20); }
h4 { font-size: var(--fs-18); }

p { margin: 0 0 var(--sp-4); }

button { font: inherit; cursor: pointer; }

ul, ol { margin: 0; padding: 0; list-style: none; }

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

/* Numbers, prices, phone numbers — keep LTR rendering even under RTL. */
.is-ltr { direction: ltr; unicode-bidi: isolate; }

/* Visually-hidden helper for screen-reader-only labels. */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Focus ring */
:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container-wide { max-width: var(--container-wide); }

/* Section padding */
.section { padding-block: clamp(var(--sp-12), 8vw, var(--sp-24)); }
.section-tight { padding-block: clamp(var(--sp-8), 5vw, var(--sp-12)); }

.section-title {
  text-align: center;
  margin-bottom: var(--sp-3);
}
.section-subtitle {
  text-align: center;
  color: var(--color-ink-3);
  max-width: 56ch;
  margin: 0 auto var(--sp-10);
}

/* RTL-specific overrides: places where logical properties don't reach. */
[dir="rtl"] .icon-flip { transform: scaleX(-1); }

/* Pre-render hide to prevent FOUC on i18n. */
html:not(.is-ready) [data-i18n] { visibility: hidden; }
