/* ==========================================================================
   Golden Elegance — base styles
   Idea: "opening the jewelry box" — pearl surface, night-green velvet, gold light.
   Rules from the brief: gold only as accent (<10% of a screen, always flat),
   no letter-spacing on Persian, only transform / opacity / clip-path animate.
   ========================================================================== */

:root {
  /* Palette (brief §02) */
  --green: #293730;          /* night green — velvet of the box, brand signature */
  --gold: #bf8f21;           /* accent only: hairlines, details, hover */
  --green-royal: #1c543c;    /* the hero's outlined «Golden Elegance», the board's gradient */
  --black: #0c0d0c;          /* jewelry stages (suggested, confirm with jeweler) */
  --pearl: #f4f0e8;          /* opening, philosophy, price board (confirm with jeweler) */

  --pearl-shade: #ebe5d9;
  --pearl-soft: rgb(244 240 232 / 0.74);   /* secondary text on dark */
  --ink: var(--green);                     /* body text on pearl */
  --ink-soft: rgb(41 55 48 / 0.72);
  --gold-line: rgb(191 143 33 / 0.6);
  --gold-faint: rgb(191 143 33 / 0.28);
  --up: #4d6a56;             /* price changes: quiet, in the palette; arrows carry the meaning too */
  --down: #8b5848;

  /* Typography — chosen by the jeweler: Parastoo for headings, Estedad for text (option B),
     Nastaliq (Gulzar) once, for the closing title of scene 9 */
  --font-text: "Estedad", "Estedad Fallback", sans-serif;
  --font-display: "Parastoo", "Estedad Fallback", serif;
  --font-callig: "Gulzar", "Parastoo", serif;
  --display-weight: 400;
  --display-leading: 1.5;
  --display-scale: 1.12;     /* Parastoo sits smaller on the body than Estedad */

  /* Motion */
  --ease-lux: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-silk: cubic-bezier(0.65, 0.05, 0.36, 1);

  /* Layout */
  --gutter: clamp(16px, 4.2vw, 64px);
  --header-h: 88px;
}

@media (max-width: 899px) {
  :root { --header-h: 68px; }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
img, video, svg { display: block; max-width: 100%; }
picture { display: contents; }   /* the <img> inside lays out as the frame's own child */

/* The mark, shown as the jeweler's round badge: the square artwork inside a circle,
   ringed in flat gold — as on the original badge. The artwork itself is untouched. */
.logo-badge {
  border-radius: 50%;
  box-shadow: 0 0 0 var(--ring, 1.5px) var(--gold);
}
ul { list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100svh;
  background: var(--pearl);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: clamp(1rem, 0.96rem + 0.18vw, 1.0625rem);
  font-weight: 400;
  line-height: 1.9;
  letter-spacing: 0;           /* never space Persian letters apart */
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

::selection { background: var(--green); color: var(--pearl); }

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

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Latin words inside Persian text keep their own direction */
bdi, .ltr { unicode-bidi: isolate; }
.latin { letter-spacing: 0.08em; }   /* spacing allowed only on small Latin text */

.num { font-variant-numeric: tabular-nums; }
.num-sep { font-variant-numeric: normal; }   /* «٬» and «٫» keep their own width among tabular digits */

/* A hairline between items. Never «·» beside Persian digits: it reads as the zero «۰». */
.sep-bar {
  display: inline-block;
  width: 1px;
  height: 0.9em;
  margin-inline: 0.65em;
  vertical-align: -0.1em;
  background: currentColor;
  opacity: 0.4;
}

/* ---------- Display type ---------- */
.display {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  line-height: var(--display-leading);
  letter-spacing: 0;
}

/* Line-by-line mask reveal: each line clips its own inner span.
   Extra block padding keeps dots and descenders of Persian letters inside the mask. */
.line {
  display: block;
  overflow: hidden;
  padding: 0.14em 0.1em 0.26em;      /* room for dots, descenders and tails that ink beyond the glyph box */
  margin: -0.14em -0.1em -0.26em;
}
.line__inner { display: block; }

/* Hairline link with gold rule drawn from the right (reading direction) */
.hairline-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.hairline-link::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0.6em;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.6s var(--ease-lux);
}
.hairline-link:hover::after,
.hairline-link:focus-visible::after,
.hairline-link[aria-current="page"]::after { transform: scaleX(1); }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  padding-inline: var(--gutter);
  color: var(--ink);
  transition:
    color 0.5s var(--ease-lux),
    background-color 0.5s var(--ease-lux),
    transform 0.7s var(--ease-silk);
}
.site-header::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: var(--gold-faint);
  opacity: 0;
  transition: opacity 0.5s var(--ease-lux);
}
.site-header[data-tone="dark"] { color: var(--pearl); }
.site-header.is-solid[data-tone="light"] { background-color: rgb(244 240 232 / 0.92); }
.site-header.is-solid[data-tone="dark"] { background-color: rgb(41 55 48 / 0.92); }
.site-header.is-solid::after { opacity: 1; }
.site-header.is-hidden { transform: translateY(-100%); }
html.menu-open .site-header[data-tone] { background-color: transparent; color: var(--pearl); transform: none; }
html.menu-open .site-header[data-tone]::after { opacity: 0; }

.site-header__inner {
  height: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
}

.brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.brand img {
  height: 56px;
  width: auto;
}

.site-nav ul {
  display: flex;
  gap: clamp(1.5rem, 2.6vw, 2.75rem);
}
.site-nav a {
  font-size: 0.9375rem;
  font-weight: 400;
}

.header-aside {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* Gold price indicator — quiet, no ticker (brief §05). Wired to the API in stage 3. */
.price-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  min-height: 44px;
  font-size: 0.8125rem;
  white-space: nowrap;
}
.price-chip__label { display: inline-flex; align-items: center; gap: 0.55em; }
.price-chip__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1px solid currentColor;
  opacity: 0.55;
}
.price-chip__dot[data-state="live"] { background: var(--gold); border-color: var(--gold); opacity: 1; }
.price-chip__dot[data-state="stale"] { border-color: var(--gold); opacity: 1; }
.price-chip__sep { display: inline-block; width: 1px; height: 0.95em; background: currentColor; opacity: 0.35; }
.price-chip__value { font-variant-numeric: tabular-nums; }
.price-chip__unit { font-size: 0.85em; opacity: 0.75; }

.menu-toggle {
  display: none;
  align-items: center;
  gap: 0.7rem;
  min-width: 44px;
  min-height: 44px;
  font-size: 0.875rem;
}
.menu-toggle__lines {
  position: relative;
  width: 22px;
  height: 7px;
}
.menu-toggle__lines::before,
.menu-toggle__lines::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  height: 1px;
  background: currentColor;
  transition: transform 0.6s var(--ease-silk);
}
.menu-toggle__lines::before { top: 0; }
.menu-toggle__lines::after { bottom: 0; }
.menu-open .menu-toggle__lines::before { transform: translateY(3px) rotate(45deg); }
.menu-open .menu-toggle__lines::after { transform: translateY(-3px) rotate(-45deg); }

/* Mobile: a symmetrical header — menu at the start (right), the mark in the centre,
   the gold indicator at the end (left), compacted to two quiet lines. */
@media (max-width: 899px) {
  .site-header__inner {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    grid-template-areas: "menu brand price";
    gap: 0.75rem;
  }
  .brand { grid-area: brand; justify-self: center; }
  .brand img { height: 46px; }
  .site-nav { display: none; }
  .header-aside { display: contents; }
  .menu-toggle { display: inline-flex; grid-area: menu; justify-self: start; }

  .header-aside .price-chip {
    grid-area: price;
    justify-self: end;
    display: grid;
    grid-template-columns: auto auto;
    grid-template-areas: "label label" "value unit";
    justify-items: end;
    align-content: center;
    column-gap: 0.3em;
    font-size: 0.6875rem;
    line-height: 1.45;
  }
  .header-aside .price-chip__label {
    grid-area: label;
    display: inline-flex;
    align-items: center;
    gap: 0.45em;
    opacity: 0.8;
  }
  .header-aside .price-chip__sep { display: none; }
  .header-aside .price-chip__value { grid-area: value; font-size: 0.8125rem; }
  .header-aside .price-chip__unit { grid-area: unit; }
}

/* ---------- Mobile menu: a velvet panel dropping from the top ---------- */
.site-menu {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(var(--header-h) + 6svh) var(--gutter) max(2rem, env(safe-area-inset-bottom));
  background: var(--green);
  color: var(--pearl);
  visibility: hidden;
  clip-path: inset(0 0 100% 0);
  transition:
    clip-path 0.9s var(--ease-silk),
    visibility 0s linear 0.9s;
}
.menu-open .site-menu {
  visibility: visible;
  clip-path: inset(0 0 0 0);
  transition: clip-path 0.9s var(--ease-silk), visibility 0s;
}
.site-menu__list li {
  border-bottom: 1px solid var(--gold-faint);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease-lux), transform 0.8s var(--ease-lux);
}
.menu-open .site-menu__list li {
  opacity: 1;
  transform: none;
  transition-delay: calc(0.32s + var(--i, 0) * 0.07s);
}
.site-menu__list a {
  display: flex;
  align-items: center;
  min-height: 64px;
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: clamp(1.85rem, 7vw, 2.6rem);
  line-height: 1.5;
}
.site-menu__foot {
  display: grid;
  gap: 0.25rem;
  font-size: 0.875rem;
  color: var(--pearl-soft);
}
.site-menu__foot .price-chip { display: none; color: var(--pearl); }   /* the header shows it at every width */
@media (min-width: 900px) {
  .site-menu { display: none; }
}

/* ==========================================================================
   Pearl progress — a small pearl travelling a gold hairline on the left edge
   ========================================================================== */
.pearl-rail {
  position: fixed;
  left: clamp(10px, 1.8vw, 30px);
  top: 50%;
  z-index: 30;
  width: 1px;
  height: 34vh;
  margin-top: -17vh;
  background: var(--gold-line);
  pointer-events: none;
  transition: opacity 0.5s var(--ease-lux);
}
.pearl-rail__pearl {
  position: absolute;
  top: 0;
  left: -4px;
  width: 9px;
  height: 9px;
  margin-top: -4.5px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #fff 0 18%, #f6f2ea 38%, #ddd5c8 74%, #c4bbad 100%);
  box-shadow: 0 0 0 0.5px rgb(12 13 12 / 0.18), 0 1px 2px rgb(12 13 12 / 0.22);
  will-change: transform;
}
.menu-open .pearl-rail { opacity: 0; }

/* ==========================================================================
   Scenes 1–2: the opening and "opening the box"
   Default (no JS / reduced motion): two stacked full-height scenes.
   html.is-cinematic: the velvet sits on top of the opening and is unveiled by scroll.
   ========================================================================== */
.intro { position: relative; }

.scene-opening {
  position: relative;
  overflow: clip;                     /* the large slanted name never widens the page */
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: calc(var(--header-h) + 1.5rem) var(--gutter) 6.5rem;
  background: var(--pearl);
}

.hero-media {
  position: relative;
  isolation: isolate;                 /* the outlined name can tuck behind the film */
  /* portrait vitrine: as tall as the screen allows, never wider than the column */
  width: min(100%, 35rem, (100svh - var(--header-h) - 9rem) * 0.8);
  aspect-ratio: 4 / 5;
}
.hero-media__inner {
  position: absolute;
  inset: 0;
  transition: opacity 1.8s var(--ease-lux), transform 1.8s var(--ease-lux);
}
.js:not(.is-ready) .hero-media__inner { opacity: 0; transform: translateY(14px); }
.hero-media img,
.hero-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--focus, 50% 50%);
}
.hero-media__inner > video {
  position: absolute;
  inset: 0;
  opacity: 0;                         /* the still shows until the film really plays, then it dissolves in */
  transition: opacity 1.2s var(--ease-lux);
}
.hero-media__inner > video.is-playing { opacity: 1; }

/* «Golden» · «Elegance»: the name outlined in green beside the film, a little faded, on a rising
   diagonal — «Golden» low at the left, «Elegance» high at the right. Phones: above and below.
   Moved only with CSS (rotate, translate): the film around them is what the scroll animation moves. */
.hero-word {
  position: absolute;
  z-index: -1;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--word-fs);
  line-height: 1;
  white-space: nowrap;
  color: rgb(28 84 60 / 0.3);           /* without outline support: a pale green fill */
  rotate: -14deg;
  opacity: 0.72;
  pointer-events: none;
  user-select: none;
  transition: opacity 2s var(--ease-lux) 0.5s, translate 2.4s var(--ease-lux) 0.5s;
}
@supports (-webkit-text-stroke: 1px black) {
  /* royal green, a shade brighter than the brand's night green so it still reads as green when faded */
  .hero-word { color: transparent; -webkit-text-stroke: 1.3px #1c543c; }
}
/* a baseline marker: main.js reads where the baseline sits inside the word's box */
.hero-word__base { display: inline-block; width: 0; height: 0; }
/* each word fades softly toward the outside */
.hero-word--golden {
  left: 0.1em;
  bottom: calc(100% + 0.12em);
  transform-origin: left bottom;
  -webkit-mask-image: linear-gradient(to left, #000 35%, rgb(0 0 0 / 0.35));
  mask-image: linear-gradient(to left, #000 35%, rgb(0 0 0 / 0.35));
}
.hero-word--elegance {
  right: 0.1em;
  top: calc(100% + 0.08em);
  transform-origin: right top;
  -webkit-mask-image: linear-gradient(to right, #000 35%, rgb(0 0 0 / 0.35));
  mask-image: linear-gradient(to right, #000 35%, rgb(0 0 0 / 0.35));
}
/* they arrive from the film, a moment after it */
.js:not(.is-ready) .hero-word { opacity: 0; }
.js:not(.is-ready) .hero-word--golden { translate: 0 18px; }
.js:not(.is-ready) .hero-word--elegance { translate: 0 -18px; }

@media (max-width: 1023px) {
  /* the words above and below the film: sized by the screen's width and height alike,
     and the film leaves them exactly that room (2.6 word-heights), so nothing meets the header */
  .scene-opening { --word-fs: clamp(2.4rem, min(12vw, 6.5svh), 4.2rem); }
  .hero-media { width: min(100%, 35rem, (100svh - var(--header-h) - 9rem - 2.6 * var(--word-fs)) * 0.8); }
}
@media (min-width: 1024px) {
  /* as large as the space beside the film allows («Elegance» is about 3.2 em wide) */
  .scene-opening {
    --hero-w: min(35rem, (100svh - var(--header-h) - 9rem) * 0.8);
    --word-fs: clamp(3rem, ((100vw - var(--hero-w)) / 2 - 4.5rem) / 3.3, 8.5rem);
  }
  .hero-word--golden {
    left: auto;
    right: calc(100% + 2rem);
    bottom: 10%;
    transform-origin: right center;
  }
  .hero-word--elegance {
    right: auto;
    left: calc(100% + 2rem);
    top: 10%;
    transform-origin: left center;
  }
  .js:not(.is-ready) .hero-word--golden { translate: 28px 0; }
  .js:not(.is-ready) .hero-word--elegance { translate: -28px 0; }
  /* main.js sets each word's size and angle along its diagonal; until then it waits unseen */
  .js .hero-word:not(.is-placed) { opacity: 0; transition: none; }
  @supports (-webkit-text-stroke: 1px black) {
    .hero-word { -webkit-text-stroke-width: 1.5px; }
  }
}

/* Temporary, clearly-marked slot until the studio photo/video arrives */
.placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 0.6rem;
  padding: 2rem;
  text-align: center;
  background: var(--pearl-shade);
  outline: 1px solid var(--gold-line);
  outline-offset: -14px;
}
.placeholder__label {
  font-size: 0.95rem;
  color: var(--ink);
}
.placeholder__note {
  max-width: 22rem;
  font-size: 0.8125rem;
  line-height: 1.9;
  color: var(--ink-soft);
}
.placeholder--dark {
  background: var(--ph-bg, #2f3e37);
  outline-color: var(--gold-faint);
}
.placeholder--dark .placeholder__label { color: var(--pearl); }
.placeholder--dark .placeholder__note { color: var(--pearl-soft); }

/* Scroll cue: a gold hairline drawn slowly downwards — no arrow, no "scroll" text */
.scroll-cue {
  position: absolute;
  bottom: 1.75rem;
  left: 50%;
  width: 1px;
  height: 64px;
  margin-left: -0.5px;
  overflow: hidden;
}
.scroll-cue::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gold);
  transform: scaleY(0);
  transform-origin: top center;
  animation: cue-draw 3.2s var(--ease-silk) infinite;
}
@keyframes cue-draw {
  0%      { transform: scaleY(0); transform-origin: top center; }
  48%     { transform: scaleY(1); transform-origin: top center; }
  52%     { transform: scaleY(1); transform-origin: bottom center; }
  100%    { transform: scaleY(0); transform-origin: bottom center; }
}

/* ---------- Scene 2: velvet ---------- */
.scene-velvet {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: var(--header-h) var(--gutter);
  overflow: hidden;
  color: var(--pearl);
  background-color: var(--green);
  /* the depth of velvet: edges sink into shadow; the foot returns to flat green
     so scene 3 continues without a seam */
  background-image:
    linear-gradient(to bottom, transparent 72%, var(--green) 100%),
    radial-gradient(130% 95% at 50% 42%, transparent 38%, rgb(12 13 12 / 0.32) 100%);
}

.velvet__halo {
  position: absolute;
  inset: 0;
  pointer-events: none;
  transform-origin: 50% 40%;
  background:
    radial-gradient(min(52vmax, 720px) circle at 50% 40%,
      rgb(244 240 232 / 0.17) 0%,
      rgb(244 240 232 / 0.075) 34%,
      rgb(238 228 220 / 0.025) 62%,
      transparent 100%);
}

.velvet__content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.velvet__logo {
  --ring: 3px;
  width: clamp(136px, 15vw, 212px);
  height: auto;
}

.velvet__rule {
  display: block;
  width: 56px;
  height: 1px;
  margin: clamp(2rem, 4.5svh, 3rem) auto clamp(1.5rem, 3.5svh, 2.25rem);
  background: var(--gold);
}

.reveal-title {
  font-size: calc(var(--display-scale) * clamp(2.35rem, 1.2rem + 4.4vw, 5.4rem));
  color: var(--pearl);
}

/* «درخششی»: the dot of «خ» becomes a diamond that keeps catching the light. On screen the word is
   written «درحششی» (2026-11-09, the user's idea): «ح» is «خ» without its dot, so the diamond is the only
   dot and nothing peeks out under it; screen readers and search engines get «درخششی» (.sr-only).
   The word is not split:
   a zero-size anchor right after it sits on the baseline at the word's left end, and the diamond
   hangs from it over the font's own dot — measured in Parastoo: 2.106em to the right, 0.43em up;
   lifted to 0.53em (2026-11-08, the user's wish) so it floats just above the letter
   (independent of line-height and of the font's line metrics). */
.gem {
  position: relative;
  display: inline-block;
  width: 0;
  height: 0;
  pointer-events: none;
  transition: opacity 1.2s var(--ease-lux);
}
.gem svg {
  position: absolute;
  left: 1.606em;                      /* 2.106em − half the 1em box */
  top: -1.03em;                       /* −0.53em − half the 1em box */
  width: 1em;
  max-width: none;                    /* the anchor is zero-wide: the global svg max-width would collapse it */
  height: 1em;
  overflow: visible;
}
.gem__stone { transform: scale(1.15); }
.gem__halo, .gem__rays, .gem__glint, .gem__shine { transform-box: fill-box; transform-origin: center; }
.gem__halo { animation: gem-halo 4.8s ease-in-out infinite; }
.gem__rays { opacity: 0; animation: gem-rays 4.8s ease-out infinite; }
.gem__glint { opacity: 0; animation: gem-glint 4.8s ease-out infinite; }
.gem__glint--b { scale: 0.7; animation-delay: 2.4s; }
.gem__shine { animation: gem-shine 4.8s ease-in-out infinite; }
@keyframes gem-halo { 0%, 100% { opacity: 0.45; } 50% { opacity: 0.85; } }
@keyframes gem-glint {
  0% { opacity: 0; transform: scale(0) rotate(0deg); }
  7% { opacity: 1; transform: scale(1.5) rotate(35deg); }
  16%, 100% { opacity: 0; transform: scale(0) rotate(70deg); }
}
@keyframes gem-rays {
  0%, 38% { opacity: 0; transform: scale(0.45); }
  47% { opacity: 0.9; transform: scale(1.05); }
  64%, 100% { opacity: 0; transform: scale(1.25); }
}
@keyframes gem-shine {
  0%, 22% { transform: translateX(-26px) skewX(-20deg); }
  44%, 100% { transform: translateX(26px) skewX(-20deg); }
}
/* until the font is in, the dot is not yet where the diamond expects it */
.js:not(.is-ready) .gem { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .gem__halo, .gem__rays, .gem__glint, .gem__shine { animation: none; }
  .gem__glint--a { opacity: 0.8; transform: scale(0.75) rotate(20deg); }
  .gem__shine { opacity: 0; }
}

/* The gold hairline that rides the velvet's leading edge, with the lid's soft shadow */
.intro__edge { display: none; }

/* ---------- Cinematic mode ---------- */
.is-cinematic .intro {
  height: 100svh;
  overflow: hidden;
}
.is-cinematic .scene-velvet {
  position: absolute;
  inset: 0;
}
.is-cinematic .intro__edge {
  display: block;
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 2;
  height: 1px;
  background: var(--gold);
  pointer-events: none;
  will-change: transform;
}
.is-cinematic .intro__edge::after {
  content: "";
  position: absolute;
  inset: 1px 0 auto 0;
  height: 56px;
  background: linear-gradient(to bottom, rgb(12 13 12 / 0.12), transparent);
}

/* ==========================================================================
   Scene 3 — the signature piece rests in the velvet; the camera draws near.
   Text on the right, the jewel on the left, never overlapping.
   ========================================================================== */
.scene-signature {
  position: relative;
  padding: clamp(5rem, 14svh, 10rem) var(--gutter) clamp(9rem, 30svh, 17rem);
  color: var(--pearl);
  /* velvet above, dusk below: hands over to the black stage of scene 4 without a seam */
  background: linear-gradient(to bottom, var(--green) 0%, var(--green) 56%, var(--black) 100%);
  overflow: clip;
}

.signature {
  max-width: 82rem;
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 6fr);
  grid-template-areas: "text media";
  align-items: center;
  column-gap: clamp(3rem, 7vw, 8rem);
}

.signature__text { grid-area: text; }
.signature__rule {
  display: block;
  width: 40px;
  height: 1px;
  background: var(--gold);
  transform-origin: right center;
}
.signature__kicker {
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--pearl-soft);
}
.signature__title {
  margin-top: 0.5rem;
  text-wrap: balance;                 /* a long name breaks evenly, never one word alone */
  font-size: calc(var(--display-scale) * clamp(2.3rem, 1.2rem + 3.1vw, 4.5rem));
}
.signature__specs {
  margin-top: 1.25rem;
  font-size: 0.9375rem;
  color: var(--pearl-soft);
  font-variant-numeric: tabular-nums;
}

.signature__media {
  grid-area: media;
  justify-self: center;
  /* a portrait vitrine; the 1.1× close-up stays inside the column gap */
  width: min(100%, (100svh - 10rem) * 0.8);
  aspect-ratio: 4 / 5;
}
.signature__frame {
  position: relative;
  width: 100%;
  height: 100%;
}
.signature__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--focus, 50% 50%);
}

@media (max-width: 767px) {
  .signature {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "media" "text";
    row-gap: 2.75rem;
  }
  .signature__media { width: min(100%, 26rem); }
}

/* ==========================================================================
   Scene 4 — the cinematic sequence: one stage, four states
   (silhouette · detail · brilliance · perfection).
   Default: the four states stacked. Cinematic: pinned, crossfading in place.
   ========================================================================== */
.scene-sequence {
  position: relative;
  padding: clamp(4rem, 10svh, 7rem) var(--gutter);
  color: var(--pearl);
  background: var(--black);
}

.sequence__states {
  max-width: 82rem;
  margin-inline: auto;
  display: grid;
  row-gap: clamp(5rem, 14svh, 9rem);
}

.sequence__state {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  grid-template-areas: "text media";
  align-items: center;
  column-gap: clamp(3rem, 6vw, 7rem);
}

.sequence__text { grid-area: text; }
.sequence__index {
  font-size: 0.8125rem;
  color: var(--pearl-soft);
}
.sequence__word {
  margin-top: 0.75rem;
  font-size: calc(var(--display-scale) * clamp(3rem, 1.6rem + 4.4vw, 6.5rem));
}
.sequence__line {
  max-width: 22rem;
  margin-top: 1rem;
  color: var(--pearl-soft);
}

/* the frame is a fixed window; the picture inside it moves, like a lens */
.sequence__media {
  grid-area: media;
  position: relative;
  height: min(72svh, 46rem);
  overflow: hidden;
}
.sequence__frame {
  position: absolute;
  inset: 0;
}
/* One very large photo can serve several states as crops:
   <img style="--focus: 62% 40%; --zoom: 2.4"> */
.sequence__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--focus, 50% 50%);
  transform-origin: var(--focus, 50% 50%);
  scale: var(--zoom, 1);
}

@media (max-width: 767px) {
  .sequence__state {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "media" "text";
    row-gap: 1.75rem;
  }
  .sequence__media { height: min(56svh, 30rem); }
  .sequence__word { margin-top: 0.25rem; }
}

/* Cinematic: the four states share one pinned stage */
.is-cinematic .scene-sequence {
  height: 100svh;
  padding: 0;
  overflow: hidden;
}
.is-cinematic .sequence__states {
  position: relative;
  height: 100%;
  max-width: none;
  display: block;
}
.is-cinematic .sequence__state {
  position: absolute;
  inset: 0;
  max-width: calc(82rem + 2 * var(--gutter));
  margin-inline: auto;
  padding: var(--header-h) var(--gutter) clamp(2rem, 6svh, 4rem);
}
@media (max-width: 767px) {
  .is-cinematic .sequence__state {
    align-content: center;
    padding-top: calc(var(--header-h) * 0.6);
  }
}

/* ==========================================================================
   Scene 5 — the collections: each one its own editorial moment
   ========================================================================== */
.scene-collections {
  position: relative;
  padding-top: clamp(6rem, 16svh, 10rem);
  color: var(--pearl);
  background: var(--black);
}

.collections__head {
  max-width: 82rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.collections__rule {
  display: block;
  width: 40px;
  height: 1px;
  background: var(--gold);
  transform-origin: right center;
}
.collections__title {
  margin-top: 1.25rem;
  font-size: calc(var(--display-scale) * clamp(2.6rem, 1.4rem + 4vw, 5.5rem));
}
.collections__all {
  margin-top: 0.25rem;
  font-size: 0.9375rem;
  color: var(--pearl-soft);
}
.collections__all:hover { color: var(--pearl); }

.collection {
  max-width: 82rem;
  margin-inline: auto;
  padding: clamp(4rem, 12svh, 8rem) var(--gutter);
  display: grid;
  column-gap: clamp(2.5rem, 6vw, 7rem);
}
.collection__weight {
  margin-top: 0.35rem;
  font-size: 0.875rem;
  color: var(--pearl-soft);
}
.collection__index {
  font-size: 0.875rem;
  color: var(--gold);          /* gold on black/green: legible at any size */
}
.collection__name {
  margin-top: 0.25rem;
  text-wrap: balance;
  font-size: calc(var(--display-scale) * clamp(2.1rem, 1.2rem + 2.8vw, 4rem));
}
.collection__line {
  max-width: 26rem;
  color: var(--pearl-soft);
}
.collection__cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 1rem;
  padding-bottom: 0.15rem;
  border-bottom: 1px solid var(--gold-line);
  font-size: 0.9375rem;
}
.collection__media {
  position: relative;
  overflow: hidden;
}
.collection__frame {
  position: absolute;
  inset: 0;
}
.collection__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--focus, 50% 50%);
  transform-origin: var(--focus, 50% 50%);
  scale: var(--zoom, 1);          /* a slight zoom trims a stray edge of a photo */
}

/* 01 — a tall image at the start (right), the words sitting low at the far side */
.collection--offset {
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  grid-template-areas: "media head" "media body";
}
.collection--offset .collection__media {
  grid-area: media;
  justify-self: start;
  width: min(100%, (100svh - 8rem) * 0.8);
  aspect-ratio: 4 / 5;
}
.collection--offset .collection__head { grid-area: head; align-self: end; }
.collection--offset .collection__body { grid-area: body; align-self: start; padding-top: 1rem; }

/* 02 — centred, like a single piece in a vitrine */
.collection--center {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "head" "media" "body";
  justify-items: center;
  row-gap: clamp(1.25rem, 3svh, 2rem);
  text-align: center;
}
.collection--center .collection__head { grid-area: head; }
.collection--center .collection__media {
  grid-area: media;
  /* name above, sentence below, all inside one pinned screen — the picture as large as that allows */
  width: min(100%, 30rem, (100svh - var(--header-h) - 15.5rem) * 0.8);
  aspect-ratio: 4 / 5;
}
.collection--center .collection__body { grid-area: body; display: grid; justify-items: center; }
.collection--center .collection__line { max-width: 30rem; }

/* wide screens: a triptych — the name beside the top of the picture, the sentence beside its foot,
   so the picture can take nearly the whole height of the screen */
@media (min-width: 1024px) {
  .collection--center {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    grid-template-areas: "head media body";
    align-items: stretch;
    column-gap: clamp(2rem, 4vw, 4.5rem);
    text-align: start;
  }
  .collection--center .collection__media {
    width: min(34rem, (100svh - var(--header-h) - 7rem) * 0.8);
  }
  .collection--center .collection__head { justify-self: end; align-self: start; padding-top: 8%; }
  .collection--center .collection__body { justify-self: start; align-self: end; justify-items: start; padding-bottom: 8%; }
  .collection--center .collection__line { max-width: 18rem; }
  .collection--center .collection__name { font-size: calc(var(--display-scale) * clamp(2.3rem, 0.9rem + 2.7vw, 3.4rem)); text-wrap: balance; }
}

/* 03 — mirrored: words at the start, image at the far side */
.collection--mirror {
  grid-template-columns: minmax(0, 4fr) minmax(0, 6fr);
  grid-template-areas: "head media" "body media";
}
.collection--mirror .collection__media {
  grid-area: media;
  justify-self: center;
  width: min(100%, (100svh - 10rem) * 0.8);
  aspect-ratio: 4 / 5;
}
.collection--mirror .collection__head { grid-area: head; align-self: end; }
.collection--mirror .collection__body { grid-area: body; align-self: start; padding-top: 1rem; }

@media (max-width: 767px) {
  .collection--offset,
  .collection--mirror {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "media" "head" "body";
    row-gap: 1.25rem;
  }
  .collection--offset .collection__body,
  .collection--mirror .collection__body { padding-top: 0; }
  .collection--offset .collection__media { width: 100%; }
  .collection--mirror .collection__media { width: min(100%, (100svh - 18rem) * 0.8); }
}

/* The velvet curtain (brief: at most twice on the whole site — used once) */
.curtain { position: relative; }
.curtain__panel {
  position: relative;
  background-color: var(--green);
  background-image: radial-gradient(130% 95% at 50% 45%, transparent 40%, rgb(12 13 12 / 0.3) 100%);
}
.curtain__edge { display: none; }

.is-cinematic .curtain {
  height: 100svh;
  overflow: hidden;
}
.is-cinematic .curtain > .collection--center {
  height: 100%;
  align-content: center;
  padding-block: calc(var(--header-h) * 0.6) clamp(1.5rem, 4svh, 3rem);
}
.is-cinematic .curtain__panel {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
}
.is-cinematic .curtain__panel > .collection {
  width: 100%;
  padding-block: calc(var(--header-h) * 0.6) clamp(1.5rem, 4svh, 3rem);
}
.is-cinematic .curtain__edge {
  display: block;
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 2;
  width: 1px;
  background: var(--gold);
  pointer-events: none;
  will-change: transform;
}

/* ==========================================================================
   Scene 6 — the price board: a jeweler's vitrine board, not a spreadsheet
   ========================================================================== */
.scene-prices {
  position: relative;
  padding: clamp(5rem, 14svh, 9rem) var(--gutter);
  color: var(--ink);
  background: var(--pearl);
  border-top: 1px solid var(--gold-line);
}

.board {
  /* a dark vitrine on the pearl page: black falling into royal green, lit from one corner */
  /* the writing is gold, flat (no gradient): a lighter gold than the brand's #bf8f21, which is
     too dark for small text over the green glow — these keep ≥ 4.7:1 everywhere on the board */
  --board-ink: #e2c06e;
  --board-soft: #cdb584;
  --board-line: rgb(191 143 33 / 0.2);
  --board-up: #9acfa9;        /* the quiet up/down colours, lifted for the dark ground: ≥ 5:1 even under the green glow */
  --board-down: #eeb19c;
  position: relative;
  isolation: isolate;
  max-width: 54rem;
  margin-inline: auto;
  padding: clamp(1.5rem, 4.5vw, 3.75rem);
  color: var(--board-ink);
  border: 1px solid var(--gold-line);
  background:
    radial-gradient(75% 55% at 88% 0%, rgb(46 112 84 / 0.38), transparent 70%),
    radial-gradient(60% 45% at 8% 100%, rgb(0 0 0 / 0.55), transparent 72%),
    linear-gradient(158deg, #070908 0%, #0b1511 26%, #10261d 52%, #163a2c 78%, #0c1c15 100%);
  box-shadow: 0 48px 90px -48px rgb(12 13 12 / 0.55), 0 18px 36px -24px rgb(16 38 29 / 0.45);
}
.board::before {            /* the inner hairline of a vitrine frame */
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid var(--gold-faint);
  pointer-events: none;
}
.board::after {             /* velvet: a fine grain over the gradient, drawn in code (no image file) */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.07;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.board__table {
  width: 100%;
  border-collapse: collapse;
}
.board__caption {
  caption-side: top;
  padding-bottom: clamp(1.75rem, 4vw, 2.75rem);
  text-align: center;
}
.board__title {
  display: block;
  font-size: calc(var(--display-scale) * clamp(1.75rem, 1.2rem + 1.9vw, 2.7rem));
}
.board__meta {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--board-soft);
}
.board__flag {
  display: inline-block;
  margin-inline-start: 0.4em;
  padding-inline: 0.55em;
  border: 1px solid currentColor;
  color: var(--board-down);
  font-size: 0.8125rem;
  line-height: 1.7;
}

.board__table th,
.board__table td {
  padding-block: clamp(0.8rem, 1.8vw, 1.1rem);
  border-bottom: 1px solid var(--board-line);
  vertical-align: middle;
}
.board__table tbody tr:last-child > * { border-bottom: 0; }
.board__table th { text-align: start; font-weight: 400; }

.board__name { display: block; font-size: 1.0625rem; line-height: 1.6; }
.board__per {
  display: block;
  font-size: 0.8125rem;
  color: var(--board-soft);
  line-height: 1.6;
}
.board__manual { display: block; }
.board__manual::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-inline-end: 0.45em;
  border-radius: 50%;
  background: var(--gold);
  vertical-align: middle;
}

.board__price { width: 16em; padding-inline: clamp(0.75rem, 3vw, 2rem); }
/* number at the start, unit at the end: ones digits and units each line up */
.board__pricebox {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
}
.board__value {
  font-size: clamp(1.1rem, 0.98rem + 0.55vw, 1.45rem);
  font-variant-numeric: tabular-nums;
  transition: opacity 0.2s var(--ease-lux);
}
.board__value.is-swapping { opacity: 0; }
.board__unit { font-size: 0.75rem; color: var(--board-soft); }
/* the day's low and high, quiet under the price */
.board__range {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1em;
  margin-top: 0.2rem;
  font-size: 0.75rem;
  line-height: 1.7;
  color: var(--board-soft);
  font-variant-numeric: tabular-nums;
}
.board__range:empty { display: none; }
.board__time { white-space: nowrap; }
.board__meta a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--gold-line);
  text-underline-offset: 0.25em;
}
.board__meta a:hover { color: var(--board-ink); text-decoration-color: var(--gold); }

.board__change {
  width: 10em;
  text-align: end;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.board__change[data-dir="up"] { color: var(--board-up); }
.board__change[data-dir="down"] { color: var(--board-down); }
.board__change[data-dir="flat"] { color: var(--board-soft); }
.board__arrow { display: inline-block; margin-inline-end: 0.3em; font-size: 0.7em; }
.board__pct { margin-inline-start: 0.45em; }

.board__row.is-primary .board__name {
  font-family: var(--font-display);
  font-size: calc(var(--display-scale) * 1.3rem);
}
.board__row.is-primary .board__value { font-size: clamp(1.55rem, 1.15rem + 1.5vw, 2.35rem); }
.board__row.is-primary > * { border-bottom-color: var(--gold-faint); }
.board__row.is-gallery > * { border-top: 1px solid var(--gold-line); }

.board__empty td {
  padding-block: 2.25rem;
  text-align: center;
  color: var(--board-soft);
  font-size: 0.9375rem;
}

.board__note {
  max-width: 40rem;
  margin: clamp(1.5rem, 4vw, 2.25rem) auto 0;
  font-size: 0.8125rem;
  text-align: center;
  color: var(--board-soft);
}

@media (max-width: 639px) {
  .board { padding: 1.25rem 0.9rem; }
  .board__name { font-size: 0.9375rem; }
  .board__price { width: auto; padding-inline: 0.6rem; }
  .board__pricebox { flex-direction: column; align-items: flex-start; gap: 0; }
  .board__value { font-size: 1.02rem; }
  .board__row.is-primary .board__value { font-size: 1.4rem; }
  .board__change { width: auto; font-size: 0.75rem; }
  .board__range { flex-direction: column; font-size: 0.6875rem; }
  /* each row as two columns: the name (and its time) at the start; price, range and change at the end */
  .board__table, .board__table tbody { display: block; }
  .board__table caption { display: block; }
  .board__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "name price" "name change";
    align-items: start;
    column-gap: 0.75rem;
    padding-block: 0.85rem;
    border-bottom: 1px solid var(--board-line);
  }
  .board__row.is-primary { border-bottom-color: var(--gold-faint); }
  .board__table tbody tr:last-child { border-bottom: 0; }
  .board__row > th, .board__row > td { padding: 0; border: 0; }
  .board__row > th { grid-area: name; }
  .board__row > .board__price { grid-area: price; }
  .board__row > .board__change { grid-area: change; margin-top: 0.3rem; text-align: start; }
  .board__row.is-primary .board__name { font-size: calc(var(--display-scale) * 1.02rem); }
  .board__amount, .board__pct { display: inline; }
  .board__pct { margin-inline-start: 0.4em; }
  .board__pricebox { flex-direction: row; align-items: baseline; gap: 0.4rem; }
  .board__empty { display: block; }
}
@media (max-width: 359px) {
  .board__table th { min-width: 5.5em; }
  .board__row.is-primary .board__value { font-size: 1.2rem; }
}

/* ==========================================================================
   Scene 7 — «گزینش، با وسواس»: a dark window that opens onto a few pieces of the vitrine
   ========================================================================== */
.scene-craft {
  position: relative;
  padding: clamp(6rem, 16svh, 11rem) var(--gutter);
  color: var(--pearl);
  background: var(--black);
}

.craft {
  max-width: 82rem;
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(1rem, 2.5vw, 2.5rem);
  row-gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.craft__text { grid-column: 1 / span 5; grid-row: 1; align-self: center; }
.craft__rule {
  display: block;
  width: 40px;
  height: 1px;
  background: var(--gold);
  transform-origin: right center;
}
.craft__title {
  margin-top: 1.25rem;
  font-size: calc(var(--display-scale) * clamp(2.4rem, 1.3rem + 3.4vw, 4.8rem));
}
.craft__body {
  max-width: 30rem;
  margin-top: 1.5rem;
  color: var(--pearl-soft);
}
.craft__cta { margin-top: 1rem; }

/* each piece: a window (the photo drifts inside it), and its name beneath */
.craft__img { position: relative; margin: 0; }
.craft__window { position: relative; overflow: hidden; background: #111; }
/* taller than its window, so the gentle parallax never shows an edge */
.craft__frame { position: absolute; inset: -9% 0; }
.craft__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease-lux);
}
.craft__img--a { grid-column: 7 / span 6; grid-row: 1 / span 2; }
.craft__img--a .craft__window { aspect-ratio: 4 / 5; }
.craft__img--b { grid-column: 2 / span 4; grid-row: 2; margin-top: clamp(1rem, 6vw, 5rem); }
.craft__img--b .craft__window { aspect-ratio: 1; }
.craft__img--c { grid-column: 3 / span 6; grid-row: 3; }
.craft__img--c .craft__window { aspect-ratio: 3 / 2; }
.craft__img--d { grid-column: 10 / span 3; grid-row: 3; margin-top: clamp(3rem, 10vw, 9rem); }
.craft__img--d .craft__window { aspect-ratio: 4 / 5; }

.craft__caption {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-top: 0.9rem;
  font-size: 0.9375rem;
}
.craft__no { font-size: 0.75rem; color: var(--gold); }   /* gold on black: legible at any size */
.craft__name {
  color: var(--pearl-soft);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.35em;
  transition: color 0.4s var(--ease-lux), text-decoration-color 0.6s var(--ease-lux);
}
/* the name's link covers the whole piece, so the photo is clickable as well */
.craft__name::before { content: ""; position: absolute; inset: 0; z-index: 1; }
.craft__img:hover .craft__name,
.craft__name:focus-visible { color: var(--pearl); text-decoration-color: var(--gold); }
.craft__name:focus-visible { outline: none; }
.craft__img:has(.craft__name:focus-visible) .craft__window { outline: 1px solid var(--gold); outline-offset: 4px; }
@media (hover: hover) {
  .craft__img:hover .craft__frame img { transform: scale(1.035); }
}

@media (max-width: 767px) {
  .craft { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .craft__text { grid-column: 1 / -1; }
  .craft__img--a { grid-column: 1 / -1; grid-row: 2; }
  .craft__img--b { grid-column: 1 / span 4; grid-row: 3; margin-top: 0; }
  .craft__img--c { grid-column: 2 / span 5; grid-row: 4; }
  .craft__img--d { grid-column: 3 / span 4; grid-row: 5; margin-top: 0; }
}

/* ==========================================================================
   Scene 8 — the philosophy: a quiet editorial page on pearl
   ========================================================================== */
.scene-philosophy {
  position: relative;
  padding: clamp(7rem, 22svh, 14rem) var(--gutter);
  color: var(--ink);
  background: var(--pearl);
}
.philosophy {
  max-width: 82rem;
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(1rem, 2.5vw, 2.5rem);
}
.philosophy__mark {
  grid-column: 1 / span 2;
  display: block;
  width: 40px;
  height: 1px;
  background: var(--gold);          /* decorative only: gold on pearl is never text */
  transform-origin: right center;
}
.philosophy__title {
  grid-column: 1 / span 10;
  margin-top: 1.5rem;
  font-size: calc(var(--display-scale) * clamp(2.2rem, 1.2rem + 3.5vw, 5rem));
}
.philosophy__body {
  grid-column: 6 / span 5;
  max-width: 34rem;
  margin-top: clamp(2rem, 5vw, 3.5rem);
}
@media (max-width: 767px) {
  .philosophy__title, .philosophy__body { grid-column: 1 / -1; }
}

/* ==========================================================================
   Scene 9 — the closing signature, full screen on night green
   ========================================================================== */
.scene-finale {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: var(--header-h) var(--gutter);
  color: var(--pearl);
  background-color: var(--green);
  background-image: radial-gradient(130% 95% at 50% 42%, transparent 38%, rgb(12 13 12 / 0.3) 100%);
}
.finale {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.finale__logo {
  --ring: 2.5px;
  width: clamp(120px, 12vw, 172px);
  height: auto;
}
.finale__title {
  margin-top: clamp(2rem, 5svh, 3.5rem);
  font-family: var(--font-callig);
  font-weight: 400;
  font-size: clamp(2.3rem, 1.2rem + 3.6vw, 4.6rem);
  line-height: 2.1;
  letter-spacing: 0;
}
/* Nastaliq climbs and falls far beyond the line box: a deeper mask */
.finale__title .line {
  padding: 0.3em 0.3em 0.6em;
  margin: -0.3em -0.3em -0.6em;
}

/* Hairline button; on hover the gold fills it from right to left and the words turn black.
   .cta-line is the same button anywhere else on the site. */
.finale__cta,
.cta-line {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  margin-top: clamp(1.75rem, 5svh, 3rem);
  padding: 0.7rem 2.4rem;
  overflow: hidden;
  border: 1px solid var(--gold);
  color: var(--pearl);
  transition: color 0.6s var(--ease-lux);
}
.finale__cta::before,
.cta-line::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.7s var(--ease-silk);
}
.finale__cta:hover,
.finale__cta:focus-visible,
.cta-line:hover,
.cta-line:focus-visible { color: var(--black); }
.finale__cta:hover::before,
.finale__cta:focus-visible::before,
.cta-line:hover::before,
.cta-line:focus-visible::before { transform: scaleX(1); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  padding: clamp(3rem, 8svh, 5rem) var(--gutter) 2rem;
  color: var(--pearl);
  background: var(--green);
  border-top: 1px solid var(--gold-faint);
}
.footer {
  max-width: 82rem;
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem clamp(1.5rem, 3vw, 3rem);
}
.footer__label {
  font-family: var(--font-text);
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--pearl-soft);
}
.footer__text {
  margin-top: 0.5rem;
  font-style: normal;
}
.footer__soft { font-size: 0.875rem; color: var(--pearl-soft); }
.footer__links { margin-top: 0.25rem; }
.footer__links a { font-size: 0.9375rem; }
.footer__icons {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
  margin-top: 0.5rem;
}

/* ---------- Icon links (Instagram, routing apps) ----------
   Quiet in the site's own colours; on hover each icon takes its brand colour —
   the Instagram gradient (hidden <svg class="svg-defs"> at the top of each page),
   Google's own four-colour «G» (coloured in the markup), Neshan green. */
.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.icon-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  min-height: 44px;
  color: inherit;
}
.icon-link__icon {
  flex: none;
  width: 1.3rem;
  height: 1.3rem;
}
.icon-link__base { fill: currentColor; transition: opacity 0.45s var(--ease-lux); }
.icon-link__brand { opacity: 0; transition: opacity 0.45s var(--ease-lux); }
.icon-link--instagram .icon-link__brand { fill: url(#ge-brand-instagram); }
.icon-link--neshan .icon-link__brand { fill: #00b14f; }
.icon-link--phone .icon-link__brand { fill: var(--gold); }
.icon-link:hover .icon-link__brand,
.icon-link:focus-visible .icon-link__brand { opacity: 1; }
.icon-link:hover .icon-link__base,
.icon-link:focus-visible .icon-link__base { opacity: 0; }
.icon-link__text {
  font-size: 0.9375rem;
  background: linear-gradient(var(--gold), var(--gold)) no-repeat right bottom / 0 1px;   /* the gold hairline, drawn from the right */
  transition: background-size 0.6s var(--ease-lux);
}
.icon-link:hover .icon-link__text,
.icon-link:focus-visible .icon-link__text { background-size: 100% 1px; }
.icon-link__text.latin { font-size: 0.875rem; }
/* the phone: the number, and under it who answers */
.icon-link__stack { display: grid; justify-items: start; line-height: 1.6; }
.icon-link__who { font-size: 0.8125rem; color: var(--pearl-soft); }
.footer__base {
  max-width: 82rem;
  margin: clamp(2.5rem, 6vw, 4rem) auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--gold-faint);
  font-size: 0.8125rem;
  color: var(--pearl-soft);
}
@media (max-width: 899px) {
  .footer { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 479px) {
  .footer { grid-template-columns: minmax(0, 1fr); }
}

/* ==========================================================================
   Product pages: «برای محاسبه‌ی قیمت تقریبی…» — bold royal green in a gold frame, a light running
   round it. A button: it opens the chat and asks this piece's price (chat.js, data-chat-ask).
   ========================================================================== */
@property --hint-turn { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.price-hint {
  position: relative;
  display: block;
  max-width: 28rem;
  margin-top: 1.5rem;
  padding: 0.95rem 1.15rem;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.95;
  color: var(--green-royal);
  text-align: start;
  background: rgb(28 84 60 / 0.045);
  border: 0;
  border-radius: 3px;
  cursor: pointer;
  isolation: isolate;
}
/* the frame: a fine gold line, and a bright stretch of gold travelling round it */
.price-hint::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  padding: 2px;
  border-radius: inherit;
  background: conic-gradient(from var(--hint-turn),
    rgb(191 143 33 / 0.42) 0deg 220deg, #bf8f21 268deg, #e3b545 300deg, #fff4cf 312deg, #e3b545 324deg,
    #bf8f21 345deg, rgb(191 143 33 / 0.42) 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: hint-turn 4.5s linear infinite;
  pointer-events: none;
}
@keyframes hint-turn { to { --hint-turn: 360deg; } }
.price-hint__text {
  background: linear-gradient(var(--gold), var(--gold)) no-repeat right bottom / 0 1px;   /* hover: the gold hairline */
  transition: background-size 0.6s var(--ease-lux);
}
.price-hint:hover .price-hint__text,
.price-hint:focus-visible .price-hint__text { background-size: 100% 1px; }
.price-hint:focus-visible { outline: 1px solid var(--gold); outline-offset: 4px; }
/* on the black set pages: a lighter green of the same family */
.price-hint--dark { color: #8fcaa6; background: rgb(143 202 166 / 0.06); }
@media (prefers-reduced-motion: reduce) {
  .price-hint::before { animation: none; }
}

/* ==========================================================================
   Standalone pages (gold-price.php): a quiet title band under the header
   ========================================================================== */
.page-intro {
  padding: calc(var(--header-h) + clamp(3rem, 10svh, 6rem)) var(--gutter) 0;
  background: var(--pearl);
  color: var(--ink);
  text-align: center;
}
.page-intro__title {
  font-size: calc(var(--display-scale) * clamp(2.2rem, 1.3rem + 3vw, 4rem));
}
.page-intro__lead {
  max-width: 40rem;
  margin: 0.75rem auto 0;
  color: var(--ink-soft);
}
.page-intro + .scene-prices { border-top: 0; padding-top: clamp(2.5rem, 7svh, 4rem); }

/* ==========================================================================
   Lite mode (low-memory phones): no pins — a quiet fade-in as scenes arrive
   ========================================================================== */
.is-lite [data-lite-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1.2s var(--ease-lux), transform 1.2s var(--ease-lux);
}
.is-lite [data-lite-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   Reduced motion: no pins, no travelling — content simply present
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0s !important;
  }
  .scroll-cue::before { transform: scaleY(1); opacity: 0.6; }
  .site-menu { clip-path: none; }
}

/* Shown only when the site is opened straight from the disk (file://) — see main.js */
.file-notice {
  position: fixed;
  inset-inline: 1rem;
  bottom: 1rem;
  z-index: 70;
  max-width: 40rem;
  margin-inline: auto;
  padding: 1rem 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.9;
  color: var(--ink);
  background: var(--pearl);
  border: 1px solid var(--gold-line);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s var(--ease-lux), transform 0.5s var(--ease-lux);
}
.file-notice.is-on { opacity: 1; transform: none; }

/* «مشاوره در دایرکت»: a short note that the message was copied (collection.php, piece.php) */
.toast {
  position: fixed;
  left: 50%;
  bottom: max(1.5rem, env(safe-area-inset-bottom));
  z-index: 60;
  width: max-content;                 /* centred by left: 50% would otherwise only get half the screen */
  max-width: calc(100vw - 2rem);
  padding: 0.7rem 1.25rem;
  font-size: 0.875rem;
  color: var(--ink);
  background: var(--pearl);
  border: 1px solid var(--gold-line);
  opacity: 0;
  transform: translate(-50%, 16px);
  transition: opacity 0.4s var(--ease-lux), transform 0.5s var(--ease-lux);
  pointer-events: none;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
