/* ==========================================================================
   RNO Beauty, base: reset, typography, utilities
   Logical properties only, so the layout mirrors when <html dir="rtl">.
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-block-start: calc(var(--header-h) + var(--adminbar) + var(--space-4));
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  min-block-size: 100vh;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; }

:where(img, picture, video, svg) { display: block; max-inline-size: 100%; }
:where(img) { block-size: auto; }
:where(input, button, textarea, select) { font: inherit; color: inherit; }
:where(button) { cursor: pointer; background: none; border: 0; padding: 0; }
:where(a) { color: inherit; text-decoration: none; }
:where(p, h1, h2, h3, h4, h5, h6, figure, blockquote, dl, dd) { margin: 0; }
:where(ul[role="list"], ol[role="list"], .list-reset) { list-style: none; margin: 0; padding: 0; }
:where(table) { border-collapse: collapse; }
:where(hr) { border: 0; border-block-start: var(--border-thin); margin: 0; }
[hidden] { display: none !important; }

/* Headings */
h1, h2, h3, h4, .h1, .h2, .h3, .h4, .display {
  font-family: var(--font-display);
  font-weight: var(--fw-medium);
  line-height: var(--lh-heading);
  letter-spacing: var(--tracking-heading);
  color: var(--color-text);
  text-wrap: balance;
}
html[lang="ar"] :is(h1, h2, h3, h4, .h1, .h2, .h3, .h4, .display) { font-weight: var(--fw-regular); }
.display { font-size: var(--fs-display); line-height: var(--lh-tight); font-weight: var(--fw-regular); }
h1, .h1 { font-size: var(--fs-h1); }
h2, .h2 { font-size: var(--fs-h2); }
h3, .h3 { font-size: var(--fs-h3); }
h4, .h4 { font-size: var(--fs-h4); }
.display em, h1 em, h2 em { font-style: italic; color: var(--color-primary); }
html[lang="ar"] :is(.display, h1, h2) em { font-style: normal; }

p { text-wrap: pretty; }
.lead { font-size: var(--fs-lead); color: var(--color-text-muted); line-height: 1.6; }
.small { font-size: var(--fs-small); }
.xs { font-size: var(--fs-xs); }
.muted { color: var(--color-text-muted); }

/* Small uppercase label, echoing the logo tagline */
.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: var(--fw-medium);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-primary-ink);
}
html[lang="ar"] .eyebrow { text-transform: none; font-weight: var(--fw-semibold); }

.prose p + p { margin-block-start: 1em; }
.prose h2, .prose h3 { margin-block: 1.6em 0.5em; }
.prose ul, .prose ol { padding-inline-start: 1.25em; margin-block: 1em; }
.prose li + li { margin-block-start: 0.4em; }
.prose a { color: var(--color-secondary); text-decoration: underline; text-underline-offset: 3px; }

/* Numbers, prices, phones, IDs render LTR with Western digits */
.num, .price, [data-ltr] { direction: ltr; unicode-bidi: isolate; display: inline-block; }
html[lang="ar"] .price { font-family: var(--font-body-en); }
.price { font-variant-numeric: lining-nums tabular-nums; }

/* Focus (WCAG 2.1 AA) */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-secondary); outline-offset: 3px; border-radius: var(--radius-xs); }
::selection { background: var(--color-blush); color: var(--color-text); }

/* Accessibility helpers */
.visually-hidden, .screen-reader-text {
  position: absolute !important;
  inline-size: 1px; block-size: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute;
  inset-block-start: var(--space-2);
  inset-inline-start: var(--space-2);
  z-index: 1000;
  padding: var(--space-3) var(--space-4);
  background: var(--color-text);
  color: var(--color-surface);
  border-radius: var(--radius-sm);
  transform: translateY(-160%);
  transition: transform var(--dur-fast) var(--ease-out);
}
.skip-link:focus { transform: translateY(0); }

/* Icons */
.icon {
  inline-size: 1.25rem; block-size: 1.25rem;
  fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
  flex: none;
  display: inline-block;
  vertical-align: middle;
}
.icon--sm { inline-size: 1rem; block-size: 1rem; }
.icon--lg { inline-size: 1.75rem; block-size: 1.75rem; }
.icon--xl { inline-size: 2.25rem; block-size: 2.25rem; }

/* Scroll reveal: only elements below the fold get .is-pending (added by JS) */
.reveal { transition: opacity var(--dur-reveal) var(--ease-out), transform var(--dur-reveal) var(--ease-out); transition-delay: var(--reveal-delay, 0ms); }
.reveal.is-pending { opacity: 0; transform: translateY(var(--reveal-distance)); }
@media (prefers-reduced-motion: reduce) { .reveal.is-pending { opacity: 1; transform: none; } }

/* Utilities */
.text-start { text-align: start; }
.text-center { text-align: center; }
.text-end { text-align: end; }
.mt-0 { margin-block-start: 0; }
.mt-2 { margin-block-start: var(--space-2); }
.mt-4 { margin-block-start: var(--space-4); }
.mt-5 { margin-block-start: var(--space-5); }
.mt-6 { margin-block-start: var(--space-6); }
.mt-8 { margin-block-start: var(--space-8); }
.stack > * + * { margin-block-start: var(--stack-gap, var(--space-4)); }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--cluster-gap, var(--space-3)); }
.nowrap { white-space: nowrap; }

/* Standard-height numbers (Cormorant's default old-style figures make 10 look like IO). */
html { font-variant-numeric: lining-nums; }
