/* =========================================================================
   ORA — reset, typography, RTL foundation
   ========================================================================= */

/* --- fonts: self-hosted -------------------------------------------------
   Deliberately not Google Fonts. The CDN is unreliable from Iran, and a
   blocked stylesheet means a flash of fallback type on every visit. Two
   variable files cover every weight the site uses.
   ---------------------------------------------------------------------- */

@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/CormorantGaramond.woff2") format("woff2-variations");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
  /* Latin only — never let this shadow the Persian face. */
  unicode-range: u+0000-00ff, u+0131, u+0152-0153, u+02bb-02bc, u+2000-206f,
                 u+2074, u+20ac, u+2122, u+2191, u+2193, u+2212, u+2215;
}

/* --- reset --------------------------------------------------------------- */

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

* { margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-block-start: calc(var(--header-h) + 1rem);
}

body {
  min-height: 100svh;
  background: var(--c-bg);
  color: var(--c-ink-2);
  font-family: var(--f-fa);
  font-size: var(--t-body);
  font-weight: 400;
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  /* ss02 only. Vazirmatn's ss01 substitutes Persian glyphs for Latin digits,
     which silently rewrites data: a batch code or order reference stops
     matching what is printed on the customer's box. Persian numerals are
     produced deliberately instead — Intl for prices, literal ۰-۹ in markup. */
  font-feature-settings: "ss02";
  overflow-x: hidden;
}

img, video, canvas, svg {
  display: block;
  max-width: 100%;
}

/* <picture> is a wrapper for art direction, not a layout box. Left as a
   normal element it sits between the sized container and the <img>, so
   `img { height: 100% }` resolves against its auto height and the image
   collapses back to its intrinsic ratio. display:contents removes it from
   the box tree and lets the <img> size against the real container. */
picture { display: contents; }

button, input, select, textarea {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

button { background: none; border: 0; cursor: pointer; }

a { color: inherit; text-decoration: none; }

ul, ol { list-style: none; }

svg { fill: none; flex: none; }

:target { scroll-margin-block-start: calc(var(--header-h) + 2rem); }

/* --- headings ------------------------------------------------------------ */

h1, h2, h3, h4 {
  color: var(--c-ink);
  font-weight: 500;
  line-height: var(--lh-heading);
  text-wrap: balance;
}

h1 { font-size: var(--t-h1); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); }

p { text-wrap: pretty; }

/* --- RTL + bidirectional text -------------------------------------------
   The single most common way a Persian site betrays that it was built from
   an LTR template: letter-spacing applied globally. Persian is a joined
   script — tracking literally pulls the glyphs apart at the connections.
   Tracking is opt-in here, via .lat, and only ever on Latin runs.
   ---------------------------------------------------------------------- */

:where([lang="fa"], [dir="rtl"]) { letter-spacing: normal; }

/* Latin inside Persian copy: brand names, sizes, "EDP". Isolated so the
   bidi algorithm can't reorder surrounding Persian punctuation. */
.lat {
  direction: ltr;
  unicode-bidi: isolate;
  font-family: var(--f-lat);
  letter-spacing: 0.06em;
}

.lat--sans {
  font-family: var(--f-fa);
  letter-spacing: 0.08em;
  font-size: 0.92em;
}

/* Numerals that must stay Latin (order refs, batch codes). Persian digits
   are the default everywhere else and are written into the markup. */
.num-lat {
  direction: ltr;
  unicode-bidi: isolate;
  font-variant-numeric: tabular-nums;
}

.num { font-variant-numeric: tabular-nums; }

/* --- layout helpers ------------------------------------------------------ */

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap--wide { max-width: 1680px; }
.wrap--narrow { max-width: 980px; }

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

.stack > * + * { margin-block-start: var(--flow, 1rem); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --- section heading ----------------------------------------------------- */

.section-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-3);
  text-align: center;
  margin-block-end: var(--s-8);
}

/* Weight 300, not 400. Vazirmatn's lighter cut is what carries the
   editorial register at display size — at 400 a large Persian heading reads
   like UI copy that happened to be set big. */
.section-head__title {
  font-size: var(--t-h1);
  font-weight: 300;
  line-height: var(--lh-display);
  color: var(--c-ink);
  max-inline-size: 22ch;
}

.section-head__sub {
  max-width: 52ch;
  color: var(--c-ink-3);
  font-size: var(--t-sm);
  margin-block-start: var(--s-1);
}

/* The small brass rule under section titles in the reference design. */
.rule {
  width: 64px;
  height: 1px;
  border: 0;
  background: linear-gradient(
    to left,
    transparent,
    var(--c-gold) 22%,
    var(--c-gold) 78%,
    transparent
  );
  opacity: 0.8;
}

.eyebrow {
  font-size: var(--t-xs);
  font-weight: 500;
  color: var(--c-gold);
  text-transform: uppercase;
}

/* --- focus --------------------------------------------------------------- */

:focus-visible {
  outline: 2px solid var(--c-gold);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

.skip-link {
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 50%;
  translate: 50% -140%;
  z-index: calc(var(--z-header) + 10);
  padding: var(--s-3) var(--s-5);
  background: var(--c-ink);
  color: var(--c-bg);
  font-size: var(--t-sm);
  transition: translate var(--d-base) var(--ease);
}

.skip-link:focus-visible { translate: 50% 0; }

/* --- scroll reveal -------------------------------------------------------
   Elements start displaced and are released by IntersectionObserver. The
   no-js / no-observer path leaves them visible: opacity is only removed
   once JS has claimed the document.
   ---------------------------------------------------------------------- */

.js [data-reveal] {
  opacity: 0;
  translate: 0 22px;
  transition:
    opacity var(--d-reveal) var(--ease),
    translate var(--d-reveal) var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}

.js [data-reveal].is-revealed {
  opacity: 1;
  translate: 0 0;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .js [data-reveal] { opacity: 1; translate: none; }
}

/* --- selection ----------------------------------------------------------- */

::selection {
  background: var(--c-gold);
  color: #fff;
}

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--c-bg-alt); }
::-webkit-scrollbar-thumb {
  background: rgb(245 243 240 / 14%);
  border: 3px solid var(--c-bg-alt);
  border-radius: var(--r-full);
}
::-webkit-scrollbar-thumb:hover { background: rgb(212 165 116 / 42%); }
