/* ============================================================================
   ANAHITA HUB — "Garnet Night" design system
   Private counsel for mind, fertility & intimate health — EN / FA / AR.
   One stylesheet for all three locales: logical properties throughout,
   per-language typography via html[lang], RTL-native composition.
   ============================================================================ */

/* ----------------------------------------------------------------------------
   1 · TOKENS
---------------------------------------------------------------------------- */
:root {
  /* Night surfaces — warm black with a garnet undertone, never blue */
  --night-0: #0b0708;
  --night-1: #120b0e;
  --night-2: #191016;
  --night-3: #231620;
  --night-veil: rgba(11, 7, 8, 0.86);

  /* Garnet — the pomegranate jewel scale */
  --garnet-deep: #571323;
  --garnet: #8e1f2f;
  --garnet-bright: #b23247;
  --rose: #d9909e;            /* interactive text-level accent — AA on night   */
  --rose-soft: #e7b6bf;

  /* Burnished metal */
  --copper: #c9976b;
  --copper-soft: #e2c39e;

  /* Ink */
  --ivory: #f2eae4;
  --ivory-dim: rgba(242, 234, 228, 0.72);
  --ivory-faint: rgba(242, 234, 228, 0.45);

  /* Semantic — urgent care steps OUTSIDE the red family on purpose */
  --amber: #d9a441;
  --amber-ink: #f3d9a4;

  /* Hairlines & glows */
  --line: rgba(217, 144, 158, 0.16);
  --line-strong: rgba(217, 144, 158, 0.3);
  --glow-garnet: 0 0 44px rgba(142, 31, 47, 0.35);
  --shadow-card: 0 18px 50px rgba(0, 0, 0, 0.45);

  /* Wing hues: Mind leans wine/plum, Body leans garnet/copper */
  --wing-mind: #7c2440;
  --wing-mind-soft: #c795ab;
  --wing-body: #96422b;
  --wing-body-soft: #d9a98a;

  /* Type scale (fluid) */
  --fs-hero: clamp(2.3rem, 5.4vw, 4rem);
  --fs-h1: clamp(2rem, 4.2vw, 3.1rem);
  --fs-h2: clamp(1.5rem, 2.8vw, 2.15rem);
  --fs-h3: clamp(1.12rem, 1.7vw, 1.35rem);
  --fs-lead: clamp(1.05rem, 1.6vw, 1.24rem);
  --fs-body: 1rem;
  --fs-small: 0.87rem;
  --fs-kicker: 0.78rem;

  /* Rhythm */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.75rem;
  --space-4: 2.75rem;
  --space-5: 4.25rem;
  --space-6: 6.5rem;
  --shell: 74rem;
  --shell-text: 46rem;
  --radius: 14px;
  --radius-lg: 22px;

  /* Motion — slow and liquid */
  --ease-water: cubic-bezier(0.22, 0.68, 0.32, 1);
  --t-slow: 0.9s;
  --t-med: 0.5s;
  --t-fast: 0.25s;
}

/* Per-language families & rhythm ------------------------------------------ */
html[lang="en"] {
  --font-display: "Source Serif 4", "Times New Roman", serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --lh-body: 1.72;
  --lh-heading: 1.18;
  --ls-kicker: 0.22em;
}
html[lang="fa"],
html[lang="ar"] {
  --font-display: "Vazirmatn", "Segoe UI", Tahoma, sans-serif;
  --font-body: "Vazirmatn", "Segoe UI", Tahoma, sans-serif;
  --lh-body: 2.05;
  --lh-heading: 1.55;
  --ls-kicker: 0;
}

/* ----------------------------------------------------------------------------
   2 · RESET & BASE
---------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

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

body {
  background: var(--night-0);
  color: var(--ivory);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
a { color: var(--rose); text-decoration: none; transition: color var(--t-fast) var(--ease-water); }
a:hover { color: var(--rose-soft); }
ul, ol { padding: 0; }
summary { list-style: none; cursor: pointer; }
summary::-webkit-details-marker { display: none; }

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

:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  inset-inline-start: 1rem;
  top: -4rem;
  z-index: 200;
  background: var(--garnet);
  color: var(--ivory);
  padding: 0.6rem 1.2rem;
  border-radius: 0 0 var(--radius) var(--radius);
  transition: top var(--t-fast) var(--ease-water);
}
.skip-link:focus { top: 0; }

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

/* ----------------------------------------------------------------------------
   3 · NIGHT ATMOSPHERE — layered background, girih lattice, grain
---------------------------------------------------------------------------- */
.night {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 15% 0%, rgba(124, 36, 64, 0.20), transparent 55%),
    radial-gradient(110% 80% at 88% 12%, rgba(150, 66, 43, 0.13), transparent 52%),
    radial-gradient(140% 120% at 50% 120%, rgba(87, 19, 35, 0.22), transparent 60%),
    var(--night-0);
}

/* Girih lattice — an eight-point star tile, barely-there */
.night::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='112' height='112' viewBox='0 0 112 112'%3E%3Cg fill='none' stroke='%23d9909e' stroke-width='0.75'%3E%3Crect x='34' y='34' width='44' height='44'/%3E%3Crect x='34' y='34' width='44' height='44' transform='rotate(45 56 56)'/%3E%3Cpath d='M56 0v20M56 92v20M0 56h20M92 56h20'/%3E%3Ccircle cx='56' cy='56' r='3'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 112px 112px;
}

/* Fine grain so gradients never band */
.night::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ----------------------------------------------------------------------------
   4 · TYPOGRAPHY
---------------------------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--lh-heading);
  color: var(--ivory);
  text-wrap: balance;
}
html[lang="fa"] h1, html[lang="ar"] h1,
html[lang="fa"] h2, html[lang="ar"] h2 { font-weight: 700; }

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

p { color: var(--ivory-dim); }
strong { color: var(--ivory); font-weight: 600; }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-size: var(--fs-kicker);
  font-weight: 600;
  letter-spacing: var(--ls-kicker);
  text-transform: uppercase;
  color: var(--copper);
}
html[lang="fa"] .kicker, html[lang="ar"] .kicker {
  text-transform: none;
  font-size: 0.92rem;
}
.kicker::before {
  content: "";
  width: 26px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--copper));
}
[dir="rtl"] .kicker::before {
  background: linear-gradient(-90deg, transparent, var(--copper));
}

.lead {
  font-size: var(--fs-lead);
  color: var(--ivory-dim);
  max-width: var(--shell-text);
}

/* ----------------------------------------------------------------------------
   5 · LAYOUT PRIMITIVES
---------------------------------------------------------------------------- */
.shell {
  width: min(var(--shell), 100% - 3rem);
  margin-inline: auto;
}
.shell--text { width: min(var(--shell-text), 100% - 3rem); margin-inline: auto; }

.section { padding-block: var(--space-6); position: relative; }
.section--tight { padding-block: var(--space-5); }

.section-head { max-width: 44rem; margin-block-end: var(--space-4); }
.section-head h2 { margin-block: 0.9rem 0.8rem; }
.section-head > p { max-width: 40rem; }

.grid-2 { display: grid; gap: 1.4rem; grid-template-columns: repeat(2, 1fr); }
.grid-3 { display: grid; gap: 1.4rem; grid-template-columns: repeat(3, 1fr); }
.grid-4 { display: grid; gap: 1.3rem; grid-template-columns: repeat(4, 1fr); }
@media (max-width: 62rem) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 40rem) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* Water rule — the flowing divider signature */
.water-rule {
  height: 1px;
  border: 0;
  margin-block: 0;
  background: linear-gradient(90deg,
    transparent 0%, var(--line-strong) 18%,
    var(--copper) 50%, var(--line-strong) 82%, transparent 100%);
  background-size: 200% 100%;
  animation: water-drift 14s linear infinite;
  opacity: 0.55;
}
@keyframes water-drift {
  from { background-position: 0% 0; }
  to { background-position: 200% 0; }
}
@media (prefers-reduced-motion: reduce) { .water-rule { animation: none; } }

/* ----------------------------------------------------------------------------
   6 · HEADER & NAVIGATION
---------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: linear-gradient(var(--night-veil), rgba(11, 7, 8, 0.62));
  border-block-end: 1px solid transparent;
  transition: border-color var(--t-med) var(--ease-water),
              background var(--t-med) var(--ease-water);
}
.site-header.is-scrolled {
  border-block-end-color: var(--line);
  background: linear-gradient(rgba(11, 7, 8, 0.94), rgba(11, 7, 8, 0.85));
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 0.85rem;
}

/* Brand lockup */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--ivory);
}
.brand:hover { color: var(--ivory); }
.brand__seal { width: 42px; height: 42px; flex: none; color: var(--rose); }
.brand__seal svg { width: 100%; height: 100%; }
.brand__text { display: flex; flex-direction: column; line-height: 1.25; }
.brand__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.18rem;
  letter-spacing: 0.04em;
}
html[lang="fa"] .brand__name, html[lang="ar"] .brand__name { letter-spacing: 0; }
.brand__tag { font-size: 0.72rem; color: var(--copper); letter-spacing: 0.12em; text-transform: uppercase; }
html[lang="fa"] .brand__tag, html[lang="ar"] .brand__tag {
  letter-spacing: 0; text-transform: none; font-size: 0.8rem;
}

/* Primary nav */
.nav { display: flex; align-items: center; gap: 0.4rem; }
.nav > a, .nav-wing > button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  color: var(--ivory-dim);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color var(--t-fast), background var(--t-fast);
}
.nav > a:hover, .nav > a.is-active,
.nav-wing > button:hover, .nav-wing.is-open > button {
  color: var(--ivory);
  background: rgba(142, 31, 47, 0.16);
}
.nav-wing { position: relative; }
.nav-wing > button::after {
  content: "";
  width: 7px; height: 7px;
  border-inline-end: 1.5px solid currentColor;
  border-block-end: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  opacity: 0.7;
  transition: transform var(--t-fast) var(--ease-water);
}
.nav-wing.is-open > button::after { transform: rotate(225deg) translateY(-1px); }

/* Wing dropdown panel */
.wing-panel {
  position: absolute;
  inset-inline-start: 50%;
  transform: translateX(-50%) translateY(8px);
  top: calc(100% + 10px);
  min-width: 21rem;
  padding: 0.9rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--night-3), var(--night-1));
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card), var(--glow-garnet);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-fast) var(--ease-water),
              transform var(--t-fast) var(--ease-water),
              visibility var(--t-fast);
}
[dir="rtl"] .wing-panel { transform: translateX(50%) translateY(8px); }
.nav-wing.is-open .wing-panel {
  opacity: 1; visibility: visible;
  transform: translateX(-50%) translateY(0);
}
[dir="rtl"] .nav-wing.is-open .wing-panel { transform: translateX(50%) translateY(0); }

.wing-panel a {
  display: block;
  padding: 0.6rem 0.85rem;
  border-radius: 10px;
  color: var(--ivory-dim);
  font-size: 0.93rem;
  transition: background var(--t-fast), color var(--t-fast);
}
.wing-panel a:hover { background: rgba(142, 31, 47, 0.18); color: var(--ivory); }
.wing-panel a small { display: block; font-size: 0.78rem; color: var(--ivory-faint); }
.wing-panel__label {
  display: block;
  padding: 0.25rem 0.85rem 0.55rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--copper);
}
html[lang="fa"] .wing-panel__label, html[lang="ar"] .wing-panel__label {
  letter-spacing: 0; text-transform: none; font-size: 0.82rem;
}

/* Header actions */
.header-actions { display: flex; align-items: center; gap: 0.9rem; }

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.lang-switch a {
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
  color: var(--ivory-faint);
  transition: background var(--t-fast), color var(--t-fast);
}
.lang-switch a:hover { color: var(--ivory); }
.lang-switch a.is-active { background: var(--garnet); color: var(--ivory); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.78rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.96rem;
  transition: transform var(--t-fast) var(--ease-water),
              box-shadow var(--t-fast) var(--ease-water),
              background var(--t-fast), color var(--t-fast),
              border-color var(--t-fast);
}
.btn-primary {
  color: var(--ivory);
  background: linear-gradient(135deg, var(--garnet-bright), var(--garnet) 55%, var(--garnet-deep));
  box-shadow: 0 8px 26px rgba(142, 31, 47, 0.42);
}
.btn-primary:hover {
  color: var(--ivory);
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(178, 50, 71, 0.5);
}
.btn-ghost {
  color: var(--rose);
  border: 1px solid var(--line-strong);
  background: rgba(142, 31, 47, 0.07);
}
.btn-ghost:hover { color: var(--ivory); border-color: var(--rose); }
.btn-copper {
  color: var(--night-0);
  background: linear-gradient(135deg, var(--copper-soft), var(--copper));
  font-weight: 700;
}
.btn-copper:hover { transform: translateY(-2px); color: var(--night-0); }

/* Mobile toggle + overlay nav */
.menu-toggle {
  display: none;
  width: 44px; height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.menu-toggle span {
  width: 20px; height: 1.6px;
  background: var(--ivory);
  transition: transform var(--t-fast) var(--ease-water), opacity var(--t-fast);
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.6px) rotate(-45deg); }

.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 90;
  padding: 6.5rem 2rem 3rem;
  background: linear-gradient(170deg, var(--night-1), var(--night-0) 70%);
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-med) var(--ease-water), visibility var(--t-med);
}
.mobile-nav.is-open { opacity: 1; visibility: visible; }
.mobile-nav__group { margin-block-end: 1.8rem; }
.mobile-nav__label {
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--copper);
  margin-block-end: 0.6rem;
  display: block;
}
html[lang="fa"] .mobile-nav__label, html[lang="ar"] .mobile-nav__label {
  letter-spacing: 0; text-transform: none; font-size: 0.85rem;
}
.mobile-nav a {
  display: block;
  padding: 0.65rem 0;
  font-size: 1.12rem;
  color: var(--ivory-dim);
  border-block-end: 1px solid rgba(217, 144, 158, 0.07);
}
.mobile-nav a:hover, .mobile-nav a.is-active { color: var(--ivory); }
.mobile-nav .btn { margin-block-start: 1.4rem; width: 100%; }

@media (max-width: 68rem) {
  .nav, .header-actions .btn { display: none; }
  .menu-toggle { display: flex; }
}

/* ----------------------------------------------------------------------------
   7 · HERO
---------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding-block: var(--space-6) var(--space-5);
  overflow: clip;
}
.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: var(--space-5);
  align-items: center;
}
@media (max-width: 62rem) { .hero__inner { grid-template-columns: 1fr; } }

.hero h1 { font-size: var(--fs-hero); margin-block: 1.1rem 1.2rem; }
.hero .lead { margin-block-end: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; align-items: center; }

/* The seal stage — Anahita's star over slow water rings */
.seal-stage {
  position: relative;
  aspect-ratio: 1;
  max-width: 22rem;
  margin-inline: auto;
  display: grid;
  place-items: center;
}
.seal-stage__rings, .seal-stage__mark { position: absolute; inset: 0; }
.seal-stage__mark { display: grid; place-items: center; }
.seal-stage__mark svg { width: 52%; height: 52%; color: var(--rose); filter: drop-shadow(0 0 26px rgba(142, 31, 47, 0.55)); }
.seal-stage__rings svg { width: 100%; height: 100%; }
.ring { fill: none; stroke: var(--line); stroke-width: 0.7; transform-origin: center; }
.ring--pulse { animation: ring-pulse 9s var(--ease-water) infinite; }
.ring--pulse2 { animation: ring-pulse 9s var(--ease-water) 4.5s infinite; }
@keyframes ring-pulse {
  0% { transform: scale(0.62); opacity: 0; }
  22% { opacity: 0.85; }
  100% { transform: scale(1.06); opacity: 0; }
}
.ring--slow { animation: ring-turn 70s linear infinite; stroke-dasharray: 3 7; }
@keyframes ring-turn { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .ring--pulse, .ring--pulse2, .ring--slow { animation: none; opacity: 0.5; }
}

/* Water thread under hero headings */
.water-thread { width: min(30rem, 88%); height: 14px; margin-block-start: 0.4rem; overflow: visible; }
.water-thread path {
  fill: none;
  stroke: url(#thread-grad);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-dasharray: 260 900;
  animation: thread-flow 11s linear infinite;
  opacity: 0.85;
}
@keyframes thread-flow { to { stroke-dashoffset: -1160; } }
@media (prefers-reduced-motion: reduce) { .water-thread path { animation: none; stroke-dasharray: none; } }

/* Pathway page hero variant */
.hero--pathway { padding-block: var(--space-5) var(--space-4); }
.hero--pathway .hero__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 320px); align-items: start; }
@media (max-width: 62rem) { .hero--pathway .hero__inner { grid-template-columns: 1fr; } }

.hero-side {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  background: linear-gradient(165deg, rgba(35, 22, 32, 0.75), rgba(18, 11, 14, 0.6));
}
.hero-side p { font-size: var(--fs-small); color: var(--copper); letter-spacing: 0.1em; text-transform: uppercase; margin-block-end: 0.9rem; }
html[lang="fa"] .hero-side p, html[lang="ar"] .hero-side p { letter-spacing: 0; text-transform: none; font-size: 0.9rem; }
.hero-side ul { list-style: none; display: grid; gap: 0.55rem; }
.hero-side li { display: flex; gap: 0.6rem; align-items: baseline; color: var(--ivory-dim); font-size: 0.94rem; }
.hero-side li::before {
  content: "";
  flex: none;
  width: 7px; height: 7px;
  border-radius: 50% 50% 50% 0;
  background: radial-gradient(circle at 35% 35%, var(--rose), var(--garnet));
  transform: rotate(-45deg) translateY(1px);
}
[dir="rtl"] .hero-side li::before { border-radius: 50% 50% 0 50%; transform: rotate(45deg) translateY(1px); }

/* ----------------------------------------------------------------------------
   8 · CARDS — iwan panels, wing cards, detail cards
---------------------------------------------------------------------------- */
.iwan {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.8rem 1.6rem 1.6rem;
  background: linear-gradient(170deg, rgba(35, 22, 32, 0.6), rgba(18, 11, 14, 0.35));
  transition: transform var(--t-med) var(--ease-water),
              border-color var(--t-med), box-shadow var(--t-med);
}
/* the shallow pointed arch crowning each card */
.iwan::before {
  content: "";
  position: absolute;
  top: -1px;
  inset-inline: 14%;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 16' preserveAspectRatio='none'%3E%3Cpath d='M0 15 C 26 15 40 12 50 3 C 60 12 74 15 100 15' fill='none' stroke='%23c9976b' stroke-width='1.1' opacity='0.66'/%3E%3C/svg%3E");
  background-size: 100% 100%;
  pointer-events: none;
}
.iwan:hover, a.iwan:focus-visible {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-card);
}
a.iwan { display: block; color: inherit; }
a.iwan:hover { color: inherit; }

.iwan .index {
  font-family: var(--font-display);
  font-size: 0.86rem;
  color: var(--copper);
  letter-spacing: 0.14em;
}
.iwan h3 { margin-block: 0.55rem 0.55rem; }
.iwan p { font-size: 0.95rem; }
.iwan .link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-block-start: 0.9rem;
  color: var(--rose);
  font-size: 0.9rem;
  font-weight: 600;
}
a.iwan:hover .link { color: var(--rose-soft); }

/* Wing tinting */
.iwan--mind { --wing: var(--wing-mind); --wing-soft: var(--wing-mind-soft); }
.iwan--body { --wing: var(--wing-body); --wing-soft: var(--wing-body-soft); }
.iwan--mind, .iwan--body { border-block-start: 1px solid var(--line); }
.iwan--mind:hover { box-shadow: 0 18px 50px rgba(0,0,0,0.45), 0 0 40px rgba(124, 36, 64, 0.28); }
.iwan--body:hover { box-shadow: 0 18px 50px rgba(0,0,0,0.45), 0 0 40px rgba(150, 66, 43, 0.24); }
.iwan .wing-chip {
  display: inline-block;
  font-size: 0.74rem;
  padding: 0.22rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--wing, var(--line));
  color: var(--wing-soft, var(--ivory-dim));
  margin-block-end: 0.8rem;
}

/* Wing header block on home */
.wing-head {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin-block-end: var(--space-3);
}
.wing-head__glyph {
  width: 52px; height: 52px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(150deg, rgba(35,22,32,0.8), rgba(18,11,14,0.5));
  color: var(--copper);
}
.wing-head__glyph svg { width: 26px; height: 26px; }
.wing-head h2 { font-size: var(--fs-h2); }
.wing-head p { font-size: var(--fs-small); color: var(--ivory-faint); }

/* Detail cards (deep pathway content) */
.detail-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.7rem 1.6rem;
  background: linear-gradient(175deg, rgba(25, 16, 22, 0.85), rgba(18, 11, 14, 0.55));
}
.detail-card .index { font-family: var(--font-display); color: var(--copper); font-size: 0.85rem; letter-spacing: 0.14em; }
.detail-card h3 { margin-block: 0.5rem 0.9rem; }
.detail-card ul { list-style: none; display: grid; gap: 0.65rem; }
.detail-card li {
  position: relative;
  padding-inline-start: 1.25rem;
  color: var(--ivory-dim);
  font-size: 0.95rem;
}
.detail-card li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.62em;
  width: 7px; height: 7px;
  border-radius: 50% 50% 50% 0;
  background: radial-gradient(circle at 35% 35%, var(--rose), var(--garnet));
  transform: rotate(-45deg);
}
[dir="rtl"] .detail-card li::before { border-radius: 50% 50% 0 50%; transform: rotate(45deg); }

.detail-grid { display: grid; gap: 1.4rem; grid-template-columns: repeat(2, 1fr); }
@media (max-width: 56rem) { .detail-grid { grid-template-columns: 1fr; } }

/* Prose + note */
.prose p + p { margin-block-start: 0.9rem; }
.prose ul { list-style: none; display: grid; gap: 0.7rem; margin-block-start: 1rem; }
.prose li { position: relative; padding-inline-start: 1.35rem; color: var(--ivory-dim); }
.prose li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.6em;
  width: 7px; height: 7px;
  border-radius: 50% 50% 50% 0;
  background: radial-gradient(circle at 35% 35%, var(--rose), var(--garnet));
  transform: rotate(-45deg);
}
[dir="rtl"] .prose li::before { border-radius: 50% 50% 0 50%; transform: rotate(45deg); }

.note {
  border-inline-start: 3px solid var(--amber);
  border-radius: var(--radius);
  background: rgba(217, 164, 65, 0.07);
  color: var(--amber-ink);
  padding: 1.2rem 1.4rem;
  font-size: 0.93rem;
}

.split { display: grid; gap: var(--space-4); grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); align-items: start; }
@media (max-width: 56rem) { .split { grid-template-columns: 1fr; } }

/* ----------------------------------------------------------------------------
   9 · PROCESS TIMELINE (how a consultation unfolds)
---------------------------------------------------------------------------- */
.steps { display: grid; gap: 1.3rem; grid-template-columns: repeat(4, 1fr); counter-reset: step; }
@media (max-width: 62rem) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 40rem) { .steps { grid-template-columns: 1fr; } }
.step {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.4rem;
  background: linear-gradient(175deg, rgba(25, 16, 22, 0.8), rgba(18, 11, 14, 0.45));
  counter-increment: step;
}
.step::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: transparent;
  -webkit-text-stroke: 1px var(--copper);
  display: block;
  margin-block-end: 0.6rem;
  opacity: 0.9;
}
html[lang="fa"] .step::before { content: counter(step, persian); -webkit-text-stroke: 0; color: var(--copper); }
html[lang="ar"] .step::before { content: counter(step, arabic-indic); -webkit-text-stroke: 0; color: var(--copper); }
.step h3 { font-size: 1.05rem; margin-block-end: 0.5rem; }
.step p { font-size: 0.92rem; }

/* ----------------------------------------------------------------------------
   10 · FAQ
---------------------------------------------------------------------------- */
.faq-list { display: grid; gap: 0.9rem; max-width: 52rem; }
.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(175deg, rgba(25, 16, 22, 0.75), rgba(18, 11, 14, 0.45));
  transition: border-color var(--t-fast);
}
.faq-item[open] { border-color: var(--line-strong); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.3rem;
  font-weight: 600;
  color: var(--ivory);
}
.faq-icon {
  flex: none;
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  position: relative;
  transition: transform var(--t-fast) var(--ease-water), background var(--t-fast);
}
.faq-icon::before, .faq-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  background: var(--rose);
  width: 10px; height: 1.5px;
}
.faq-icon::after { transform: rotate(90deg); transition: transform var(--t-fast) var(--ease-water); }
.faq-item[open] .faq-icon { background: var(--garnet); border-color: var(--garnet); }
.faq-item[open] .faq-icon::before, .faq-item[open] .faq-icon::after { background: var(--ivory); }
.faq-item[open] .faq-icon::after { transform: rotate(180deg); }
.faq-a { padding: 0 1.3rem 1.2rem; color: var(--ivory-dim); font-size: 0.95rem; }
.faq-a p + p { margin-block-start: 0.7rem; }

/* ----------------------------------------------------------------------------
   11 · CONSULTATION FORM
---------------------------------------------------------------------------- */
.form-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2.2rem 2rem;
  background: linear-gradient(165deg, rgba(35, 22, 32, 0.8), rgba(18, 11, 14, 0.6));
  box-shadow: var(--shadow-card);
}
.form-grid { display: grid; gap: 1.2rem; }
.form-row { display: grid; gap: 1.2rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 40rem) { .form-row { grid-template-columns: 1fr; } }

.field { display: grid; gap: 0.45rem; }
.field label { font-size: 0.88rem; font-weight: 600; color: var(--ivory-dim); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 0.85rem 1.05rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(11, 7, 8, 0.55);
  color: var(--ivory);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.field textarea { min-height: 9.5rem; resize: vertical; }
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23d9909e' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-inline-end: 2.6rem;
}
[dir="rtl"] .field select { background-position: left 1rem center; }
.field select option { background: var(--night-2); color: var(--ivory); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(217, 144, 158, 0.14);
}
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"], .field select[aria-invalid="true"] {
  border-color: var(--garnet-bright);
}
.form-hint { font-size: 0.85rem; color: var(--ivory-faint); }
.form-status { font-size: 0.92rem; color: var(--copper-soft); min-height: 1.4em; }
.form-status[data-tone="error"] { color: var(--rose-soft); }

/* ----------------------------------------------------------------------------
   12 · TRUST STRIP & CHARTER
---------------------------------------------------------------------------- */
.charter { display: grid; gap: 1.3rem; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 56rem) { .charter { grid-template-columns: 1fr; } }
.charter .iwan h3 { display: flex; align-items: center; gap: 0.6rem; font-size: 1.05rem; }
.charter .iwan h3 svg { width: 20px; height: 20px; color: var(--copper); flex: none; }

/* ----------------------------------------------------------------------------
   13 · CTA BAND
---------------------------------------------------------------------------- */
.cta-band {
  position: relative;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-5) 2rem;
  background:
    radial-gradient(85% 130% at 50% 115%, rgba(142, 31, 47, 0.3), transparent 60%),
    linear-gradient(165deg, rgba(35, 22, 32, 0.9), rgba(18, 11, 14, 0.7));
  overflow: clip;
}
.cta-band::before {
  content: "";
  position: absolute;
  top: -1px;
  inset-inline: 22%;
  height: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 16' preserveAspectRatio='none'%3E%3Cpath d='M0 15 C 26 15 40 12 50 3 C 60 12 74 15 100 15' fill='none' stroke='%23c9976b' stroke-width='1' opacity='0.7'/%3E%3C/svg%3E");
  background-size: 100% 100%;
}
.cta-band h2 { margin-block-end: 0.8rem; }
.cta-band p { max-width: 36rem; margin-inline: auto; margin-block-end: 1.6rem; }
.cta-band .hero-actions { justify-content: center; }

/* ----------------------------------------------------------------------------
   14 · FOOTER
---------------------------------------------------------------------------- */
.site-footer {
  margin-block-start: var(--space-6);
  border-block-start: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(87, 19, 35, 0.14));
  padding-block: var(--space-5) var(--space-3);
}
.footer-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 0.9fr));
  margin-block-end: var(--space-4);
}
@media (max-width: 62rem) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 40rem) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand p { font-size: 0.92rem; max-width: 24rem; margin-block-start: 0.9rem; }
.footer-col h3 {
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--copper);
  margin-block-end: 1rem;
  font-family: var(--font-body);
  font-weight: 600;
}
html[lang="fa"] .footer-col h3, html[lang="ar"] .footer-col h3 {
  letter-spacing: 0; text-transform: none; font-size: 0.95rem;
}
.footer-col ul { list-style: none; display: grid; gap: 0.55rem; }
.footer-col a { color: var(--ivory-dim); font-size: 0.93rem; }
.footer-col a:hover { color: var(--ivory); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  padding-block-start: var(--space-3);
  border-block-start: 1px solid rgba(217, 144, 158, 0.08);
  font-size: 0.84rem;
  color: var(--ivory-faint);
}

/* ----------------------------------------------------------------------------
   15 · REVEALS
---------------------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(26px); }
.reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity var(--t-slow) var(--ease-water), transform var(--t-slow) var(--ease-water);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* ----------------------------------------------------------------------------
   16 · BREADCRUMB
---------------------------------------------------------------------------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.85rem;
  color: var(--ivory-faint);
  padding-block-start: var(--space-3);
}
.crumbs a { color: var(--ivory-faint); }
.crumbs a:hover { color: var(--rose); }
.crumbs .sep { opacity: 0.5; }

/* ============================================================================
   17 · LANDING GATE (index.html)
   ============================================================================ */
.gate-body { min-height: 100vh; display: grid; }
.gate {
  position: relative;
  display: grid;
  place-items: center;
  padding: 3rem 1.5rem;
}
.gate__frame {
  position: absolute;
  inset: 1.1rem;
  border: 1px solid rgba(201, 151, 107, 0.2);
  border-radius: 26px;
  pointer-events: none;
}
.gate__frame::before, .gate__frame::after {
  content: "";
  position: absolute;
  width: 40px; height: 40px;
  border: 1px solid var(--copper);
  opacity: 0.55;
}
.gate__frame::before { top: -1px; inset-inline-start: -1px; border-inline-end: 0; border-block-end: 0; border-start-start-radius: 26px; }
.gate__frame::after { bottom: -1px; inset-inline-end: -1px; border-inline-start: 0; border-block-start: 0; border-end-end-radius: 26px; }

.gate__inner { position: relative; text-align: center; max-width: 62rem; width: 100%; }
.gate__seal { width: 96px; height: 96px; margin-inline: auto; color: var(--rose); filter: drop-shadow(0 0 30px rgba(142,31,47,0.6)); }
.gate__seal svg { width: 100%; height: 100%; }

.gate__brand {
  font-family: "Source Serif 4", serif;
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  margin-block: 1.2rem 0.4rem;
  background: linear-gradient(120deg, var(--ivory) 30%, var(--copper-soft) 70%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.gate__names {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 1.6rem;
  font-size: clamp(1.15rem, 2.6vw, 1.7rem);
  color: var(--ivory-dim);
  margin-block-end: 0.9rem;
}
.gate__names [lang="fa"], .gate__names [lang="ar"] { font-family: "Vazirmatn", sans-serif; }
.gate__names .dot { color: var(--garnet-bright); }

.gate__line { color: var(--ivory-faint); font-size: 0.98rem; max-width: 40rem; margin-inline: auto; }
.gate__line + .gate__line { margin-block-start: 0.2rem; }

.gate__cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  margin-block-start: 3rem;
  text-align: start;
}
@media (max-width: 56rem) { .gate__cards { grid-template-columns: 1fr; max-width: 26rem; margin-inline: auto; } }

.gate-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.7rem 1.5rem 1.5rem;
  background: linear-gradient(168deg, rgba(35, 22, 32, 0.72), rgba(18, 11, 14, 0.5));
  color: var(--ivory);
  overflow: clip;
  transition: transform var(--t-med) var(--ease-water),
              border-color var(--t-med), box-shadow var(--t-med);
}
.gate-card::before {
  content: "";
  position: absolute;
  top: -1px; inset-inline: 18%;
  height: 15px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 16' preserveAspectRatio='none'%3E%3Cpath d='M0 15 C 26 15 40 12 50 3 C 60 12 74 15 100 15' fill='none' stroke='%23c9976b' stroke-width='1.1' opacity='0.6'/%3E%3C/svg%3E");
  background-size: 100% 100%;
}
.gate-card:hover, .gate-card:focus-visible {
  transform: translateY(-5px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-card), var(--glow-garnet);
  color: var(--ivory);
}
.gate-card__meta { font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--copper); }
.gate-card[dir="rtl"] .gate-card__meta { letter-spacing: 0; text-transform: none; font-size: 0.85rem; }
.gate-card__script {
  display: block;
  font-size: 1.9rem;
  font-weight: 700;
  margin-block: 0.7rem 0.4rem;
}
.gate-card[dir="rtl"] .gate-card__script { font-family: "Vazirmatn", sans-serif; }
.gate-card[dir="ltr"] .gate-card__script { font-family: "Source Serif 4", serif; font-weight: 600; }
.gate-card__action {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--rose);
  font-weight: 600;
}
.gate-card:hover .gate-card__action { color: var(--rose-soft); }
.gate-card__arrow { transition: transform var(--t-fast) var(--ease-water); }
.gate-card:hover .gate-card__arrow { transform: translateX(4px); }
.gate-card[dir="rtl"]:hover .gate-card__arrow { transform: translateX(-4px); }

.gate__foot {
  margin-block-start: 3rem;
  display: flex;
  justify-content: center;
  gap: 1.6rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--ivory-faint);
}
.gate__foot span { display: inline-flex; align-items: center; gap: 0.5rem; }
.gate__foot .gem { width: 5px; height: 5px; border-radius: 50%; background: var(--garnet-bright); }

/* ----------------------------------------------------------------------------
   18 · UTILITIES
---------------------------------------------------------------------------- */
.center { text-align: center; }
.mt-2 { margin-block-start: var(--space-2); }
.mt-3 { margin-block-start: var(--space-3); }
.mt-4 { margin-block-start: var(--space-4); }
.muted { color: var(--ivory-faint); }

/* ============================================================================
   19 · ADVANCED ATMOSPHERE — living aurora, embers, lantern, progress
   All layers are JS-injected or pseudo-elements: no page markup changes.
   Every animation is disabled under prefers-reduced-motion.
   ============================================================================ */

/* --- Living aurora: two vast gradient veils drifting behind everything ----- */
.aurora {
  position: fixed;
  inset: -20%;
  z-index: -1;
  pointer-events: none;
  filter: blur(60px) saturate(1.15);
  opacity: 0.55;
}
.aurora::before, .aurora::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  mix-blend-mode: screen;
}
.aurora::before {
  background:
    radial-gradient(38% 30% at 28% 32%, rgba(140, 32, 52, 0.5), transparent 70%),
    radial-gradient(30% 26% at 68% 22%, rgba(124, 36, 64, 0.34), transparent 70%);
  animation: aurora-a 36s ease-in-out infinite alternate;
}
.aurora::after {
  background:
    radial-gradient(32% 26% at 70% 68%, rgba(150, 90, 50, 0.26), transparent 70%),
    radial-gradient(26% 22% at 30% 78%, rgba(178, 50, 71, 0.22), transparent 70%);
  animation: aurora-b 44s ease-in-out infinite alternate;
}
@keyframes aurora-a {
  0%   { transform: translate3d(-4%, -2%, 0) scale(1); }
  50%  { transform: translate3d(3%, 4%, 0) scale(1.12); }
  100% { transform: translate3d(-2%, 2%, 0) scale(1.04); }
}
@keyframes aurora-b {
  0%   { transform: translate3d(3%, 2%, 0) scale(1.06) rotate(2deg); }
  100% { transform: translate3d(-3%, -3%, 0) scale(1) rotate(-2deg); }
}
@media (prefers-reduced-motion: reduce) {
  .aurora::before, .aurora::after { animation: none; }
}

/* --- Ember canvas (JS-driven drifting sparks) ------------------------------ */
.embers {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  mix-blend-mode: screen;
}

/* --- Lantern: a soft light that follows the pointer ------------------------ */
.lantern {
  position: fixed;
  z-index: 0;
  width: 46rem;
  height: 46rem;
  margin: -23rem 0 0 -23rem;
  border-radius: 50%;
  pointer-events: none;
  mix-blend-mode: screen;
  background: radial-gradient(circle,
    rgba(178, 50, 71, 0.10) 0%,
    rgba(201, 151, 107, 0.05) 34%,
    transparent 62%);
  opacity: 0;
  transition: opacity 0.8s var(--ease-water);
  will-change: transform;
}
body.has-lantern .lantern { opacity: 1; }

/* --- Scroll progress: garnet filament along the top ------------------------ */
.scroll-progress {
  position: fixed;
  top: 0;
  inset-inline-start: 0;
  z-index: 140;
  height: 2px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--garnet), var(--garnet-bright), var(--copper));
  box-shadow: 0 0 12px rgba(178, 50, 71, 0.7);
  pointer-events: none;
}
[dir="rtl"] .scroll-progress { transform-origin: 100% 50%; }

/* ============================================================================
   20 · ADVANCED SURFACES — tilt, specular, spotlight borders
   ============================================================================ */

/* 3D tilt stage (JS sets --tilt-x/--tilt-y/--px/--py on .iwan, .gate-card) */
.tilt-on .iwan, .tilt-on .gate-card, .tilt-on .detail-card, .tilt-on .step {
  transform-style: preserve-3d;
  transform: perspective(950px)
             rotateX(var(--tilt-x, 0deg))
             rotateY(var(--tilt-y, 0deg))
             translateY(var(--lift, 0px));
  transition: transform 0.18s var(--ease-water),
              border-color var(--t-med), box-shadow var(--t-med);
}
.tilt-on .iwan:hover, .tilt-on .gate-card:hover { --lift: -5px; }

/* Specular sheen — a highlight that follows the cursor across the card */
.iwan::after, .gate-card::after, .detail-card::after, .step::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--t-med) var(--ease-water);
  background:
    radial-gradient(38rem circle at var(--px, 50%) var(--py, 50%),
      rgba(231, 182, 191, 0.09), transparent 42%),
    radial-gradient(20rem circle at var(--px, 50%) var(--py, 50%),
      rgba(201, 151, 107, 0.08), transparent 46%);
}
.iwan:hover::after, .gate-card:hover::after,
.detail-card:hover::after, .step:hover::after { opacity: 1; }

/* Spotlight border — luminous edge tracking the cursor */
.iwan, .gate-card, .detail-card, .step { position: relative; overflow: clip; }
.iwan > .edge-light, .gate-card > .edge-light,
.detail-card > .edge-light, .step > .edge-light {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  pointer-events: none;
  background: radial-gradient(24rem circle at var(--px, 50%) var(--py, 50%),
    rgba(217, 144, 158, 0.55), rgba(201, 151, 107, 0.22) 34%, transparent 60%);
  -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;
  opacity: 0;
  transition: opacity var(--t-med) var(--ease-water);
}
.iwan:hover > .edge-light, .gate-card:hover > .edge-light,
.detail-card:hover > .edge-light, .step:hover > .edge-light { opacity: 1; }

/* --- Magnetic primary buttons + click bloom -------------------------------- */
.btn-primary { position: relative; overflow: clip; will-change: transform; }
.btn-primary .bloom {
  position: absolute;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(242, 234, 228, 0.55);
  transform: translate(-50%, -50%) scale(0);
  pointer-events: none;
  animation: bloom 0.7s var(--ease-water) forwards;
}
@keyframes bloom {
  to { transform: translate(-50%, -50%) scale(34); opacity: 0; }
}

/* ============================================================================
   21 · RICHER REVEALS — ink-in-water entrances
   ============================================================================ */
.reveal { opacity: 0; transform: translateY(30px) scale(0.985); filter: blur(10px); }
.reveal.is-in {
  opacity: 1;
  transform: none;
  filter: blur(0);
  transition:
    opacity var(--t-slow) var(--ease-water),
    transform var(--t-slow) var(--ease-water),
    filter var(--t-slow) var(--ease-water);
  transition-delay: var(--stagger, 0s);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; filter: none; }
}

/* Hero headline: word-by-word surfacing + copper ink sheen */
.hero h1 .w {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.55em);
  filter: blur(6px);
  animation: word-rise 0.9s var(--ease-water) forwards;
  animation-delay: calc(0.12s + var(--wi) * 0.07s);
}
@keyframes word-rise {
  to { opacity: 1; transform: none; filter: blur(0); }
}
.hero h1.ink {
  background: linear-gradient(100deg,
    var(--ivory) 0%, var(--ivory) 55%,
    var(--copper-soft) 72%, var(--ivory) 88%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  animation: ink-sheen 9s var(--ease-water) 1.4s infinite;
}
@keyframes ink-sheen {
  0%, 55% { background-position: 120% 0; }
  85%, 100% { background-position: -60% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hero h1 .w { animation: none; opacity: 1; transform: none; filter: none; }
  .hero h1.ink { animation: none; color: var(--ivory); background: none; }
}

/* Water-thread: traveling pearl of light */
.water-thread .pearl {
  fill: var(--copper-soft);
  filter: drop-shadow(0 0 6px rgba(201, 151, 107, 0.9));
}

/* ============================================================================
   22 · GRAND ORNAMENT — arch horizons & watermark
   ============================================================================ */
.section + .section::before,
.section + .section--tight::before {
  content: "";
  position: absolute;
  top: 0;
  inset-inline: 12%;
  height: 22px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 22' preserveAspectRatio='none'%3E%3Cpath d='M0 21 C 30 21 42 17 50 5 C 58 17 70 21 100 21' fill='none' stroke='%23c9976b' stroke-width='0.6' opacity='0.5'/%3E%3Ccircle cx='50' cy='5' r='1.2' fill='%23b23247' opacity='0.9'/%3E%3C/svg%3E");
  background-size: 100% 100%;
  pointer-events: none;
}

/* Colossal watermark behind the footer */
.site-footer { position: relative; overflow: clip; }
.site-footer::before {
  content: "ANAHITA";
  position: absolute;
  inset-inline: 0;
  bottom: -0.28em;
  z-index: -1;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(5rem, 16vw, 15rem);
  line-height: 1;
  letter-spacing: 0.08em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(217, 144, 158, 0.10);
  pointer-events: none;
  user-select: none;
}
html[lang="fa"] .site-footer::before { content: "آناهیتا"; letter-spacing: 0; -webkit-text-stroke: 0; color: rgba(217, 144, 158, 0.05); }
html[lang="ar"] .site-footer::before { content: "أناهيتا"; letter-spacing: 0; -webkit-text-stroke: 0; color: rgba(217, 144, 158, 0.05); }

/* Seal breathing glow (hero stage) */
.seal-stage__mark svg {
  animation: seal-breathe 7s var(--ease-water) infinite;
}
@keyframes seal-breathe {
  0%, 100% { filter: drop-shadow(0 0 22px rgba(142, 31, 47, 0.45)); transform: scale(1); }
  50% { filter: drop-shadow(0 0 44px rgba(178, 50, 71, 0.75)); transform: scale(1.035); }
}
@media (prefers-reduced-motion: reduce) { .seal-stage__mark svg { animation: none; } }

/* Gate brand: slow copper shimmer */
.gate__brand {
  background-size: 200% 100%;
  animation: gate-shimmer 11s var(--ease-water) infinite;
}
@keyframes gate-shimmer {
  0%, 60% { background-position: 0% 0; }
  80% { background-position: 100% 0; }
  100% { background-position: 0% 0; }
}
@media (prefers-reduced-motion: reduce) { .gate__brand { animation: none; } }
