/* ==========================================================================
   MASOUN — Base: reset, typography, layout primitives, motion utilities
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
}

body {
  margin: 0;
  background: var(--c-onyx);
  color: var(--c-text);
  font-family: var(--f-body);
  font-size: var(--fs-body);
  font-weight: 300;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
html[lang="en"] body { line-height: 1.7; }

body.is-locked { overflow: hidden; }

/* The hidden attribute always wins over component display rules */
[hidden] { display: none !important; }

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, p, figure, blockquote { margin: 0; }

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 400;
  line-height: 1.25;
}
html[lang="en"] h1, html[lang="en"] h2, html[lang="en"] h3 { font-weight: 300; line-height: 1.08; }

::selection { background: var(--c-cognac); color: var(--c-ivory); }

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

.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; inset-inline-start: 16px; top: -60px; z-index: 200;
  background: var(--c-ivory); color: var(--c-onyx); padding: 10px 18px;
  transition: top .3s var(--ease);
}
.skip-link:focus { top: 16px; }

/* Layout ------------------------------------------------------------------ */
.container {
  width: 100%;
  max-width: calc(var(--maxw) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: calc(860px + var(--gutter) * 2); }

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

.theme-ivory {
  --c-text: var(--c-onyx);
  --c-text-soft: rgba(14, 12, 10, .7);
  --c-text-mute: rgba(14, 12, 10, .5);
  --line-light: var(--line-dark);
  background: var(--c-ivory);
  color: var(--c-text);
}
.theme-parchment { background: var(--c-ivory-2); }

/* Typography helpers ------------------------------------------------------ */
.la {
  font-family: var(--f-ui-la);
  font-weight: 400;
  letter-spacing: .28em;
  text-transform: uppercase;
  font-size: var(--fs-micro);
  direction: ltr;
  unicode-bidi: isolate;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--f-ui-la);
  font-size: var(--fs-micro);
  font-weight: 400;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--c-sand);
  margin-bottom: 22px;
}
.eyebrow::before {
  content: "";
  width: 28px; height: 1px;
  background: var(--c-gold);
  opacity: .7;
}
.theme-ivory .eyebrow { color: var(--c-sand-dark); }

.h2 { font-size: var(--fs-h2); }
.lead { font-size: var(--fs-lead); color: var(--c-text-soft); max-width: 46ch; }

.num {
  font-family: var(--f-display-la);
  font-style: italic;
  font-weight: 300;
  font-size: 15px;
  letter-spacing: .06em;
  color: var(--c-sand);
  direction: ltr;
  unicode-bidi: isolate;
}

.price {
  font-family: var(--f-body);
  font-weight: 400;
  font-feature-settings: "tnum";
  direction: rtl;
  unicode-bidi: isolate;
}
.price small { font-size: .72em; color: var(--c-text-mute); margin-inline-start: 4px; }
html[lang="en"] .price { direction: ltr; }

/* Icons ------------------------------------------------------------------- */
.i { width: 22px; height: 22px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.2; }
.i--sm { width: 16px; height: 16px; }
.i--lg { width: 28px; height: 28px; }
[dir="rtl"] .i-dir { transform: scaleX(-1); }
[dir="ltr"] .i-back { transform: scaleX(-1); }

/* Grain overlay for dark surfaces ------------------------------------------ */
.grain { position: relative; isolation: isolate; }
.grain::after {
  content: "";
  position: absolute; inset: 0;
  background-image: var(--noise);
  opacity: .06;
  pointer-events: none;
  z-index: 1;
}

/* Reveal on scroll (only when JS is running) ------------------------------- */
.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 32px, 0);
  transition:
    opacity var(--dur-slow) var(--ease-out) var(--d, 0s),
    transform 1.5s var(--ease-out) var(--d, 0s);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

.js [data-reveal="mask"] {
  opacity: 1;
  transform: none;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1.6s var(--ease-in-out) var(--d, 0s);
}
.js [data-reveal="mask"].is-in { clip-path: inset(0 0 0 0); }

.js [data-reveal="fade"] { transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .js [data-reveal], .js [data-reveal="mask"] { opacity: 1; transform: none; clip-path: none; }
}

/* Visibility helpers ------------------------------------------------------- */
@media (max-width: 1099px) { .hide-mobile { display: none !important; } }
@media (min-width: 1100px) { .hide-desktop { display: none !important; } }
