/* ==========================================================================
   iMonetary — the public pages (home, journal)
   Midnight glass and liquid gold. The identity is the old one (ink, royal
   navy, royal gold, parchment; Libre Caslon for headlines); the material is
   new: frosted glass that catches the light, gold that moves like liquid
   metal, shapes that merge like liquid (inspired by Libraries.dev, written
   here from scratch: no framework, nothing loaded from another site).
   Logical properties throughout, so Farsi mirrors without extra rules.
   ========================================================================== */

/* Animatable angles for the beams and the metal (where the browser can). */
@property --beam-a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@property --metal-a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }

:root {
  --ink: #05060a;
  --ink-2: #0a0d16;
  --navy: #0e1f4b;
  --navy-deep: #071230;
  --gold: #c6a15b;
  --gold-hi: #e4c588;
  --gold-lo: #8c6a2e;
  --parchment: #f3efe6;
  --text: #e9e5dc;
  --muted: #9aa1b4;
  --faint: #6c7387;
  --line: rgba(243, 239, 230, 0.08);
  --line-2: rgba(243, 239, 230, 0.14);
  --gold-line: rgba(198, 161, 91, 0.28);

  --glass-top: rgba(255, 255, 255, 0.075);
  --glass-bottom: rgba(255, 255, 255, 0.02);
  --glass-tint: rgba(12, 18, 36, 0.38);
  --glass-blur: 18px;

  --f-display: 'Libre Caslon Display', 'Cormorant Garamond', Georgia, serif;
  --f-body: 'IBM Plex Sans', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --radius: 22px;
  --radius-sm: 14px;
  --max: 1200px;
  --gutter: clamp(1.15rem, 4vw, 2.5rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --track-eyebrow: 0.16em;
  --case-eyebrow: uppercase;
  --lh: 1.65;
}

/* Farsi: Vazirmatn throughout, no letter-spacing (Persian letters join),
   no capitals to speak of, a little more line height. */
html[lang="fa"] {
  --f-display: 'Vazirmatn', Tahoma, sans-serif;
  --f-body: 'Vazirmatn', Tahoma, sans-serif;
  --f-mono: 'Vazirmatn', Tahoma, sans-serif;
  --track-eyebrow: 0;
  --case-eyebrow: none;
  --lh: 1.95;
}
/* Chinese: the reader's own system fonts; Latin letters and digits keep the
   site's. No tracked-out capitals, no italics, nothing under 12px. */
html[lang="zh"] {
  --f-display: 'Libre Caslon Display', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans CJK SC', 'Source Han Sans SC', sans-serif;
  --f-body: 'IBM Plex Sans', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans CJK SC', 'Source Han Sans SC', sans-serif;
  --f-mono: 'IBM Plex Mono', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans CJK SC', sans-serif;
  --track-eyebrow: 0.04em;
  --case-eyebrow: none;
  --lh: 1.8;
}

/* ── Base ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 6.5rem; -webkit-text-size-adjust: 100%; }
body.home, body.journal {
  background: var(--ink);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: var(--lh);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
}
[hidden] { display: none !important; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(198, 161, 91, 0.35); color: var(--parchment); }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 {
  font-family: var(--f-display);
  font-weight: 400;
  color: var(--parchment);
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
html[lang="fa"] h1, html[lang="fa"] h2, html[lang="fa"] h3 { font-weight: 700; letter-spacing: 0; line-height: 1.45; }
html[lang="zh"] h1, html[lang="zh"] h2, html[lang="zh"] h3 { font-weight: 600; letter-spacing: 0; line-height: 1.3; }
html[lang="zh"] em, html[lang="zh"] i { font-style: normal; }
h2 { font-size: clamp(2rem, 3.6vw, 2.9rem); }
h3 { font-size: 1.28rem; }
html[lang="fa"] h2 { font-size: clamp(1.7rem, 3vw, 2.35rem); }
html[lang="fa"] h3 { font-size: 1.12rem; }
html[lang="zh"] h2 { font-size: clamp(1.75rem, 3.1vw, 2.45rem); }
p { color: var(--muted); text-wrap: pretty; }

.skip-link {
  position: absolute; inset-inline-start: 1rem; top: -4rem; z-index: 300;
  background: var(--gold); color: var(--ink); padding: 0.6rem 1rem; border-radius: 10px; font-weight: 500;
}
.skip-link:focus { top: 1rem; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* The wordmark is Latin in every language: it keeps its tracking. */
.wordmark {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.12rem; font-weight: 500; letter-spacing: 0.14em; color: var(--parchment);
  direction: ltr; unicode-bidi: isolate; white-space: nowrap;
}
html[lang] body .wordmark { letter-spacing: 0.14em !important; }
.wordmark-icon { width: 22px; height: 22px; }

/* ── Ambient: liquid light behind the glass ─────────────────────────────── */
.ambient { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; background:
  radial-gradient(120% 70% at 50% -10%, rgba(14, 31, 75, 0.85), transparent 60%),
  radial-gradient(60% 50% at 100% 30%, rgba(14, 31, 75, 0.35), transparent 70%),
  linear-gradient(180deg, var(--navy-deep) 0%, var(--ink) 55%, var(--ink) 100%); }
.ambient-liquid { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.9; filter: blur(2px); }
.ambient-glow {
  position: absolute; top: -25vh; left: 50%; width: 1100px; height: 1100px; translate: -50% 0;
  background: radial-gradient(circle, rgba(198, 161, 91, 0.09), transparent 60%);
  animation: drift 26s ease-in-out infinite;
}
.ambient-grain {
  position: absolute; inset: -50%; opacity: 0.06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@keyframes drift {
  0%, 100% { transform: translate(-2%, 0) scale(1); }
  50% { transform: translate(2%, 4%) scale(1.07); }
}

/* ── Glass ─────────────────────────────────────────────────────────────── */
.glass {
  position: relative;
  background:
    linear-gradient(180deg, var(--glass-top), var(--glass-bottom)),
    var(--glass-tint);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    inset 0 -1px 0 rgba(0, 0, 0, 0.35),
    0 1px 2px rgba(0, 0, 0, 0.4),
    0 24px 60px -28px rgba(0, 0, 0, 0.75);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  isolation: isolate;
}
/* Light caught on the edge of the glass, following the pointer (data-glare). */
.glass[data-glare]::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 0;
  background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, -20%), rgba(228, 197, 136, 0.10), transparent 45%);
  opacity: var(--glare, 0); transition: opacity 0.4s var(--ease);
}
.glass > * { position: relative; z-index: 1; }

/* ── Border beam: light that rides the edge ─────────────────────────────── */
.beam::after {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none; z-index: 2;
  background: conic-gradient(from var(--beam-a), transparent 0deg 250deg, rgba(228, 197, 136, 0) 262deg,
    rgba(228, 197, 136, 0.85) 300deg, #fff6df 312deg, rgba(198, 161, 91, 0.0) 330deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: beam 7s linear infinite;
}
.beam-soft::after { opacity: 0.55; animation-duration: 10s; }
@keyframes beam { to { --beam-a: 360deg; } }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  font-family: var(--f-body); font-weight: 500; font-size: 0.95rem; line-height: 1.2;
  padding: 0.9rem 1.55rem; border-radius: 999px; white-space: nowrap;
  transition: transform 0.35s var(--spring), box-shadow 0.35s var(--ease), background 0.3s var(--ease), color 0.3s;
  isolation: isolate;
}
.btn-sm { padding: 0.6rem 1.1rem; font-size: 0.85rem; }
.btn-lg { padding: 1.05rem 1.85rem; font-size: 1rem; }
.btn:active { transform: scale(0.97); }

/* Liquid metal: a gold face with a moving sheen, and a halo ring of molten
   gold that wanders around it and leans towards the pointer. */
.btn-metal {
  color: #1a1206;
  background:
    radial-gradient(120% 140% at var(--mx, 30%) var(--my, 0%), rgba(255, 248, 225, 0.75), transparent 45%),
    linear-gradient(180deg, #f3dca2 0%, #d6b066 42%, #a8803b 70%, #e2c27c 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 -2px 6px rgba(90, 60, 15, 0.45),
    0 10px 30px -10px rgba(198, 161, 91, 0.55), 0 0 0 1px rgba(80, 56, 16, 0.6);
}
.btn-metal::before {
  content: ''; position: absolute; inset: -3px; border-radius: inherit; padding: 2px; z-index: -1; pointer-events: none;
  background: conic-gradient(from var(--metal-a), #6b4e1c, #f7e7bc, #b48a42, #fff3d1, #7a5a22, #e7c98a, #6b4e1c);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  filter: drop-shadow(0 0 6px rgba(228, 197, 136, 0.45));
  animation: metal 5.5s linear infinite;
  opacity: 0.85;
}
.btn-metal::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 1;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.55) 48%, transparent 60%);
  background-size: 250% 100%; background-position: 120% 0; mix-blend-mode: soft-light;
  animation: sheen 6s var(--ease) infinite;
}
.btn-metal > * { position: relative; z-index: 2; }
.btn-metal:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), inset 0 -2px 6px rgba(90, 60, 15, 0.45), 0 16px 40px -12px rgba(228, 197, 136, 0.7), 0 0 0 1px rgba(80, 56, 16, 0.6); }
@keyframes metal { to { --metal-a: 360deg; } }
@keyframes sheen { 0%, 55% { background-position: 120% 0; } 100% { background-position: -120% 0; } }

.btn-glass {
  color: var(--parchment);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--line-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.btn-glass:hover { border-color: var(--gold-line); color: var(--gold-hi); transform: translateY(-2px); }
.i-arrow { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
html[dir="rtl"] .i-arrow--side { transform: scaleX(-1); }

/* ── Navigation: a floating glass capsule ──────────────────────────────── */
.site-nav { position: fixed; inset-inline: 0; top: 0; z-index: 100; padding: 1rem var(--gutter) 0; pointer-events: none; }
.nav-capsule {
  pointer-events: auto;
  max-width: var(--max); margin: 0 auto;
  display: flex; align-items: center; gap: 1.25rem;
  padding: 0.55rem 0.6rem 0.55rem 1.15rem; padding-inline: 1.15rem 0.6rem;
  border-radius: 999px;
  --glass-tint: rgba(8, 11, 22, 0.35);
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s;
}
.site-nav.is-scrolled .nav-capsule { --glass-tint: rgba(6, 9, 18, 0.72); border-color: var(--line-2); }

.nav-links { position: relative; display: flex; align-items: center; gap: 0.15rem; margin-inline-start: auto; padding: 0.2rem; }
.nav-links a {
  position: relative; z-index: 1; padding: 0.5rem 0.95rem; border-radius: 999px;
  font-size: 0.9rem; color: var(--muted); transition: color 0.25s;
}
.nav-links a:hover, .nav-links a.is-active { color: var(--parchment); }

/* Liquid layers: the blobs go through the goo filter; text never does. */
/* The blobs are drawn solid (the filter keeps only what is nearly opaque)
   and the whole layer is faded afterwards. */
.goo-layer { position: absolute; inset: 0; filter: url(#im-goo); pointer-events: none; z-index: 0; transition: opacity 0.35s var(--ease); }
.goo-blob {
  position: absolute; top: 50%; height: 2.2rem; translate: 0 -50%;
  inset-inline-start: 0; width: 0; border-radius: 999px;
  background: #f3efe6;
}
.goo-blob.is-lead { transition: inset-inline-start 0.32s var(--spring), width 0.32s var(--spring); }
.goo-blob.is-trail { transition: inset-inline-start 0.62s var(--spring), width 0.62s var(--spring); }
.nav-links > .goo-layer { opacity: 0; }
.nav-links.goo-on > .goo-layer { opacity: 0.12; }

.nav-actions { display: flex; align-items: center; gap: 0.6rem; margin-inline-start: auto; }
.nav-links + .nav-actions { margin-inline-start: 0.4rem; }
.nav-login { font-size: 0.9rem; color: var(--muted); padding: 0.5rem 0.6rem; transition: color 0.25s; }
.nav-login:hover { color: var(--parchment); }

/* Language: a droplet that splits into four. */
.lang-menu { position: relative; width: 2.6rem; height: 2.6rem; }
.goo-layer--menu { inset: -0.2rem; overflow: visible; opacity: 0.1; }
.lang-menu.is-open .goo-layer--menu { opacity: 0.16; }
.goo-drop {
  position: absolute; inset-inline-start: 0.2rem; top: 0.2rem; width: 2.6rem; height: 2.6rem; border-radius: 50%;
  background: #f3efe6;
  transition: transform 0.55s var(--spring); transition-delay: calc(var(--i, 0) * 35ms);
}
.lang-toggle {
  position: relative; z-index: 2; width: 2.6rem; height: 2.6rem; border-radius: 50%;
  display: grid; place-items: center; color: var(--parchment);
}
.lang-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.lang-current { position: absolute; inset-block-end: -0.15rem; inset-inline-end: -0.35rem; font-family: 'IBM Plex Mono', monospace; font-size: 0.56rem; letter-spacing: 0.04em; padding: 0.05rem 0.28rem; border-radius: 6px; background: var(--gold); color: var(--ink); line-height: 1.3; }
.lang-options { position: absolute; inset-inline-start: 0; top: 0; width: 2.6rem; height: 2.6rem; z-index: 1; pointer-events: none; }
.lang-options li { position: absolute; inset: 0; transition: transform 0.55s var(--spring), opacity 0.25s; transition-delay: calc(var(--i) * 35ms); opacity: 0; }
.lang-options a {
  display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%;
  font-size: 0.74rem; font-weight: 500; color: var(--parchment); font-family: var(--f-body);
}
.lang-options a[lang="fa"] { font-family: 'Vazirmatn', Tahoma, sans-serif; font-size: 0.85rem; }
.lang-options a[lang="zh"] { font-family: 'PingFang SC', 'Microsoft YaHei', 'Noto Sans CJK SC', sans-serif; font-size: 0.72rem; }
.lang-options a:hover, .lang-options a.is-active { color: var(--gold-hi); }
.lang-menu.is-open .lang-options { pointer-events: auto; }
.lang-menu.is-open .lang-options li { opacity: 1; transform: translateY(calc(var(--i) * 2.85rem)); }
.lang-menu.is-open .goo-drop:not(.is-root) { transform: translateY(calc(var(--i) * 2.85rem)); }

.nav-toggle { display: none; width: 2.6rem; height: 2.6rem; border-radius: 50%; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.nav-toggle span { width: 18px; height: 1.5px; background: var(--parchment); border-radius: 2px; transition: transform 0.35s var(--spring); }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

.nav-sheet {
  pointer-events: auto; max-width: var(--max); margin: 0.6rem auto 0; padding: 1.1rem; border-radius: 26px;
  display: flex; flex-direction: column; gap: 0.2rem;
  --glass-tint: rgba(6, 9, 18, 0.86);
  transform-origin: top center; animation: sheet 0.45s var(--spring);
}
.nav-sheet > a:not(.btn) { padding: 0.85rem 0.9rem; border-radius: 14px; font-size: 1.05rem; color: var(--parchment); }
.nav-sheet > a:not(.btn):active { background: rgba(255, 255, 255, 0.05); }
.nav-sheet .btn { margin-top: 0.6rem; }
.nav-sheet-langs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.4rem; margin-top: 0.4rem; }
.nav-sheet-langs a { text-align: center; padding: 0.6rem 0.2rem; border-radius: 12px; border: 1px solid var(--line); font-size: 0.85rem; color: var(--muted); }
.nav-sheet-langs a.is-active { border-color: var(--gold-line); color: var(--gold-hi); }
.nav-sheet-langs a[lang="fa"] { font-family: 'Vazirmatn', Tahoma, sans-serif; }
@keyframes sheet { from { opacity: 0; transform: translateY(-10px) scale(0.97); } }

/* ── Hero ──────────────────────────────────────────────────────────────── */
.hero {
  position: relative; min-height: 100svh;
  display: grid; place-items: center;
  padding: 9rem var(--gutter) 5rem;
}
.hero-inner { position: relative; z-index: 2; max-width: 840px; text-align: center; }
.pill-eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.42rem 0.95rem 0.42rem 0.8rem; padding-inline: 0.8rem 0.95rem; border-radius: 999px;
  border: 1px solid var(--gold-line); background: rgba(198, 161, 91, 0.06);
  font-size: 0.8rem; color: var(--gold-hi); margin-bottom: 1.8rem;
}
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold-hi); box-shadow: 0 0 0 0 rgba(228, 197, 136, 0.6); animation: live 2.4s ease-out infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(228, 197, 136, 0.55); } 70%, 100% { box-shadow: 0 0 0 9px rgba(228, 197, 136, 0); } }
.hero-headline { font-size: clamp(2.55rem, 6.2vw, 4.7rem); margin-bottom: 1.6rem; }
html[lang="fa"] .hero-headline { font-size: clamp(2.05rem, 4.9vw, 3.55rem); }
html[lang="zh"] .hero-headline { font-size: clamp(2.05rem, 4.9vw, 3.5rem); line-height: 1.25; }
html[lang="fr"] .hero-headline { font-size: clamp(2.35rem, 5.6vw, 4.25rem); }
.hero-headline { background: linear-gradient(180deg, #fffaf0 0%, #efe6d2 55%, #cdb88f 130%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { font-size: clamp(1.02rem, 1.4vw, 1.17rem); max-width: 600px; margin: 0 auto 2.4rem; }
.hero-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.9rem; margin-bottom: 2.8rem; }
.trust-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; }
.chip {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.9rem; border-radius: 999px;
  font-size: 0.82rem; color: var(--muted);
  --glass-blur: 10px;
}
.chip svg { width: 15px; height: 15px; fill: none; stroke: var(--gold); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* Floating tiles: each one a small living sample of the platform. */
.hero-tiles { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.tile {
  position: absolute; width: 112px; height: 112px; padding: 10px; border-radius: 30px;
  --glass-tint: rgba(10, 14, 28, 0.5);
  translate: var(--fx, 0) var(--fy, 0);
  transition: translate 1.2s var(--ease);
  animation: bob 9s ease-in-out infinite; animation-delay: calc(var(--n, 0) * -1.7s);
}
.tile-face {
  width: 100%; height: 100%; border-radius: 22px; display: grid; place-items: center; position: relative; overflow: hidden;
  background: radial-gradient(120% 120% at 30% 0%, rgba(255, 255, 255, 0.06), transparent 60%), #070a13;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}
.tile-label {
  position: absolute; inset-inline: 0; bottom: -1.75rem; text-align: center;
  font-size: 0.74rem; color: var(--faint); letter-spacing: 0.02em; opacity: 0.9;
}
.t-intel { inset-inline-start: 7%; top: 24%; --n: 0; }
.t-secure { inset-inline-start: 15%; top: 64%; --n: 1; }
.t-vip { inset-inline-end: 8%; top: 20%; --n: 2; }
.t-assist { inset-inline-end: 16%; top: 62%; --n: 3; }
.t-invoice { inset-inline-end: 2.5%; top: 41%; --n: 4; width: 92px; height: 92px; border-radius: 26px; }
.t-invoice .tile-face { border-radius: 18px; }
.t-invoice .tile-label { display: none; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.tile-glyph { width: 34px; height: 34px; fill: none; stroke: var(--gold-hi); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.tile-face.beam { border-radius: 22px; }
.tile-face.beam::after { animation-duration: 4.5s; }

/* Thinking orbs: specks of gold that orbit while something is worked out. */
.orbs { position: relative; width: 56px; height: 56px; display: block; }
.orbs i {
  position: absolute; left: 50%; top: 50%; width: var(--s, 3px); height: var(--s, 3px); margin: calc(var(--s, 3px) / -2);
  border-radius: 50%; background: var(--gold-hi); box-shadow: 0 0 6px rgba(228, 197, 136, 0.8);
  animation: orbit var(--t, 3s) linear infinite; animation-delay: var(--dl, 0s);
  opacity: var(--o, 0.9);
}
@keyframes orbit {
  from { transform: rotate(var(--a0, 0deg)) translateX(var(--r, 18px)) rotate(0deg) scale(1); }
  50% { transform: rotate(calc(var(--a0, 0deg) + 180deg)) translateX(calc(var(--r, 18px) * 0.55)) scale(0.6); }
  to { transform: rotate(calc(var(--a0, 0deg) + 360deg)) translateX(var(--r, 18px)) scale(1); }
}
.orbs-inline { width: 22px; height: 22px; display: none; }
.orbs-inline i { background: #2a1d08; box-shadow: none; }
.btn-glass .orbs-inline i { background: var(--gold-hi); }
.form-submit.is-loading .orbs-inline { display: block; }
.form-submit.is-loading .btn-label { opacity: 0.75; }

/* Liquid metal ring (VIP). */
.metal-ring { display: block; width: 50px; height: 50px; border-radius: 50%; position: relative;
  background: conic-gradient(from var(--metal-a), #5c4316, #f8e9c2, #b08640, #fff4d6, #6e521e, #ecd096, #5c4316);
  animation: metal 4.5s linear infinite;
  -webkit-mask: radial-gradient(circle, transparent 54%, #000 56%, #000 70%, transparent 72%);
  mask: radial-gradient(circle, transparent 54%, #000 56%, #000 70%, transparent 72%);
  filter: drop-shadow(0 0 10px rgba(228, 197, 136, 0.55));
}

/* The assistant: two eyes that blink, and look where you are. */
.bot { display: flex; gap: 12px; translate: var(--ex, 0) var(--ey, 0); transition: translate 0.25s var(--ease); }
.bot i { width: 15px; height: 15px; border-radius: 50%; background: #c9cdd8; box-shadow: 0 0 12px rgba(201, 205, 216, 0.25); animation: blink 4.8s infinite; transform-origin: center; }
.bot i + i { animation-delay: 0.03s; }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(0.1); } }

.pixel-doc { width: 40px; height: 48px; image-rendering: pixelated; }

/* ── Sections ──────────────────────────────────────────────────────────── */
.section { position: relative; padding: clamp(5rem, 10vw, 8.5rem) var(--gutter); }
.section-inner { max-width: var(--max); margin: 0 auto; }
.section-head { max-width: 720px; margin-bottom: 3.2rem; }
.section-head.is-center { margin-inline: auto; text-align: center; }
.section-head.is-split { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.section-head h2 { margin-bottom: 1rem; }
.section-lead { font-size: 1.06rem; max-width: 620px; }
.section-head.is-center .section-lead { margin-inline: auto; }
.center { text-align: center; }

.eyebrow, .tag, .flow-phase {
  font-family: var(--f-mono); font-size: 0.74rem; font-weight: 500;
  letter-spacing: var(--track-eyebrow); text-transform: var(--case-eyebrow);
  color: var(--gold);
}
.eyebrow { margin-bottom: 1rem; display: inline-flex; align-items: center; gap: 0.6rem; }
.eyebrow::before { content: ''; width: 22px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
html[dir="rtl"] .eyebrow::before { background: linear-gradient(-90deg, transparent, var(--gold)); }
.section-head.is-center .eyebrow::after { content: ''; width: 22px; height: 1px; background: linear-gradient(-90deg, transparent, var(--gold)); }
html[dir="rtl"] .section-head.is-center .eyebrow::after { background: linear-gradient(90deg, transparent, var(--gold)); }
html[lang="fa"] .eyebrow, html[lang="fa"] .tag, html[lang="fa"] .flow-phase { font-size: 0.82rem; font-weight: 600; }
html[lang="zh"] .eyebrow, html[lang="zh"] .tag, html[lang="zh"] .flow-phase { font-size: 0.8rem; }

/* Statement */
.statement { max-width: 980px; text-align: center; }
.statement .eyebrow { justify-content: center; }
.statement-title { font-size: clamp(2.2rem, 4.8vw, 3.8rem); margin-bottom: 1.6rem; }
html[lang="fa"] .statement-title { font-size: clamp(1.85rem, 3.8vw, 2.9rem); }
html[lang="zh"] .statement-title { font-size: clamp(1.9rem, 3.9vw, 2.9rem); }
.statement-body { font-size: clamp(1.05rem, 1.5vw, 1.22rem); max-width: 760px; margin: 0 auto; color: #b4b9c7; }

/* ── The platform: a vein of liquid gold through the ecosystem ─────────── */
.flow { --pad: 3.4rem; --px: 1.85rem; position: relative; display: grid; gap: 1.1rem; padding-inline-start: var(--pad); }
.flow-pipe { position: absolute; inset-block: 0.6rem; inset-inline-start: calc(var(--px) - 13px); width: 26px; }
.flow-track { position: absolute; inset-block: 0; left: 50%; width: 1px; margin-left: -0.5px;
  background: linear-gradient(180deg, var(--gold-line), rgba(243, 239, 230, 0.10) 40%, rgba(243, 239, 230, 0.06)); }
.flow-goo { position: absolute; inset: -10px -10px auto; height: calc(var(--live, 40%) + 20px); filter: url(#im-goo-thin); }
.flow-liquid { position: absolute; top: 10px; bottom: 10px; left: 50%; width: 5px; margin-left: -2.5px; border-radius: 5px;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 60%, #a8803b); }
.flow-drop { position: absolute; left: 50%; top: 10px; width: 13px; height: 13px; margin-left: -6.5px; border-radius: 50%; background: var(--gold-hi);
  animation: fall 4.8s cubic-bezier(0.55, 0, 0.45, 1) infinite; animation-delay: calc(var(--d, 0) * -1.6s); }
@keyframes fall { 0% { transform: translateY(0) scale(0.4); } 12% { transform: translateY(4%) scale(1); } 88% { transform: translateY(var(--fall, 200px)) scale(1); } 100% { transform: translateY(var(--fall, 200px)) scale(0.4); } }
.flow-item { position: relative; }
.flow-node { position: absolute; inset-inline-start: calc(var(--px) - var(--pad) - 6.5px); top: 1.7rem; width: 13px; height: 13px; border-radius: 50%;
  background: var(--ink); border: 1px solid var(--faint); }
.flow-item.is-live .flow-node { background: var(--gold-hi); border-color: var(--gold-hi); box-shadow: 0 0 0 5px rgba(198, 161, 91, 0.16), 0 0 18px rgba(228, 197, 136, 0.6); }
.flow-card { padding: 1.5rem 1.7rem; border-radius: var(--radius); transition: transform 0.45s var(--spring), border-color 0.3s; }
.flow-card:hover { transform: translateX(4px); border-color: var(--line-2); }
html[dir="rtl"] .flow-card:hover { transform: translateX(-4px); }
.flow-meta { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.55rem; }
.flow-card h3 { margin-bottom: 0.45rem; display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.3rem 0.9rem; }
.flow-card p { max-width: 640px; }
.flow-domain { font-family: 'IBM Plex Mono', monospace; font-size: 0.8rem; color: var(--gold); letter-spacing: 0.02em; border-bottom: 1px solid transparent; }
html[lang] body .flow-domain { letter-spacing: 0.02em !important; }
.flow-domain:hover { border-color: var(--gold); }
.badge { font-size: 0.7rem; font-weight: 500; padding: 0.18rem 0.62rem; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); }
html[lang="fa"] .badge { font-size: 0.76rem; }
html[lang="zh"] .badge { font-size: 0.75rem; }
.badge-live { color: var(--gold-hi); border-color: rgba(198, 161, 91, 0.5); background: rgba(198, 161, 91, 0.08); }
.badge-roadmap { opacity: 0.7; }

/* ── Security: a bento of glass ────────────────────────────────────────── */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.bento-card { padding: 1.6rem 1.6rem 1.7rem; display: flex; flex-direction: column; gap: 0.55rem; min-height: 210px; transition: transform 0.45s var(--spring), border-color 0.3s; }
.bento-card:hover { transform: translateY(-4px); border-color: var(--line-2); }
.bento-card.is-wide { grid-column: span 2; }
.bento-card h3 { font-size: 1.22rem; }
html[lang="fa"] .bento-card h3 { font-size: 1.06rem; }
.bento-card p:not(.tag) { font-size: 0.95rem; }
.bento-card.is-next { border-style: dashed; border-color: var(--line-2); --glass-tint: rgba(12, 18, 36, 0.2); }
.bento-card.is-next .tag { color: var(--muted); }
.steps { margin-top: auto; padding-top: 1.1rem; display: flex; align-items: center; gap: 0.5rem; }
.step { font-family: 'IBM Plex Mono', monospace; font-size: 0.86rem; color: var(--parchment); padding: 0.45rem 0.8rem; border-radius: 12px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); }
.step.is-code { color: var(--gold-hi); border-color: var(--gold-line); letter-spacing: 0.08em; }
.step.is-ok { display: grid; place-items: center; width: 2.3rem; height: 2.3rem; padding: 0; border-radius: 50%; background: rgba(198, 161, 91, 0.14); border-color: rgba(198, 161, 91, 0.45); }
.step.is-ok svg { width: 16px; height: 16px; fill: none; stroke: var(--gold-hi); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.step-join { flex: 0 1 34px; height: 1px; background: linear-gradient(90deg, var(--line-2), var(--gold-line)); }

/* ── Membership: four levels, joined by a thread of liquid gold ────────── */
.levels { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 2.2rem; }
.goo-layer--levels { z-index: 0; filter: url(#im-goo-thin); }
.levels-bar { position: absolute; top: 71px; inset-inline: 12.5%; height: 6px; border-radius: 6px;
  background: linear-gradient(90deg, #7a4a2a, #8d96a0 36%, #4d64a8 64%, var(--gold)); }
html[dir="rtl"] .levels-bar { background: linear-gradient(-90deg, #7a4a2a, #8d96a0 36%, #4d64a8 64%, var(--gold)); }
.levels-bead { position: absolute; top: 74px; width: 22px; height: 22px; margin-top: -11px; border-radius: 50%; background: var(--gold-hi);
  inset-inline-start: var(--bead, 12%); translate: -50% 0; transition: inset-inline-start 0.8s var(--spring); }
html[dir="rtl"] .levels-bead { translate: 50% 0; }
.level {
  position: relative; z-index: 1; text-align: center; padding: 1.5rem 1.2rem 1.7rem; border-radius: var(--radius);
  border: 1px solid transparent; transition: border-color 0.3s, background 0.3s, transform 0.45s var(--spring);
  outline: none;
}
.level:hover, .level:focus-visible, .level.is-on { border-color: var(--line); background: rgba(255, 255, 255, 0.025); transform: translateY(-4px); }
.level:focus-visible { border-color: var(--gold-line); }
.level.is-vip { border-color: var(--gold-line); background: linear-gradient(180deg, rgba(198, 161, 91, 0.07), rgba(198, 161, 91, 0.01)); }
.medal { position: relative; display: grid; place-items: center; width: 100px; height: 100px; margin: 0 auto 1.15rem; border-radius: 50%; overflow: hidden;
  box-shadow: inset 0 2px 1px rgba(255, 255, 255, 0.5), inset 0 -6px 14px rgba(0, 0, 0, 0.45), 0 18px 34px -16px rgba(0, 0, 0, 0.9); }
.medal-sheen { position: absolute; inset: 0; border-radius: 50%; background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.55) 45%, transparent 58%); background-size: 260% 100%; background-position: 130% 0; transition: background-position 1.1s var(--ease); mix-blend-mode: soft-light; }
.level:hover .medal-sheen, .level:focus-visible .medal-sheen, .level.is-on .medal-sheen { background-position: -130% 0; }
.medal-bronze { background: radial-gradient(circle at 35% 25%, #f2c49a, transparent 42%), conic-gradient(from 210deg, #6d3f22, #c27f50, #f0c39a, #9b6034, #5a3218, #b8774a, #6d3f22); }
.medal-silver { background: radial-gradient(circle at 35% 25%, #ffffff, transparent 42%), conic-gradient(from 210deg, #5d646e, #c6ccd4, #f7f9fb, #8b939d, #4f565f, #b7bec7, #5d646e); }
.medal-diamond { background: radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.9), transparent 40%), conic-gradient(from 200deg, #1d2b4d, #7fa5ff, #e9f1ff, #9d8cff, #20335e, #9be7ff, #1d2b4d); }
.medal-diamond svg { width: 46px; height: 46px; fill: rgba(255, 255, 255, 0.18); stroke: rgba(255, 255, 255, 0.92); stroke-width: 1.2; stroke-linejoin: round; filter: drop-shadow(0 0 6px rgba(190, 220, 255, 0.8)); position: relative; z-index: 1; }
.medal-vip { background: radial-gradient(circle at 35% 25%, #fff3d1, transparent 42%), conic-gradient(from var(--metal-a), #6b4e1c, #f7e7bc, #b48a42, #fff3d1, #7a5a22, #e7c98a, #6b4e1c); animation: metal 7s linear infinite; }
.medal-vip .metal-ring { width: 74px; height: 74px; animation-direction: reverse; filter: drop-shadow(0 0 4px rgba(60, 40, 10, 0.6)); }
.level-name { font-size: 1.5rem; margin-bottom: 0.35rem; }
html[lang="fa"] .level-name { font-size: 1.25rem; }
.level.is-vip .level-name { background: linear-gradient(180deg, #fff3d1, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.level-line { font-size: 0.93rem; }
.levels-note { text-align: center; font-size: 0.9rem; color: var(--faint); margin-bottom: 1.8rem; }

/* ── Journal ───────────────────────────────────────────────────────────── */
.link-arrow { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--gold-hi); font-size: 0.95rem; padding-bottom: 0.15rem; border-bottom: 1px solid transparent; }
.link-arrow:hover { border-color: var(--gold); }
.journal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
/* On the home page, one or two articles share the width rather than leave a gap. */
#journal .journal-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.post-card { display: flex; flex-direction: column; overflow: hidden; padding: 0; transition: transform 0.45s var(--spring), border-color 0.3s; }
.post-card:hover { transform: translateY(-5px); border-color: var(--line-2); }
.post-cover { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #0f1a3a, #07091a); overflow: hidden; }
.post-cover img { width: 100%; height: 100%; object-fit: cover; }
.post-cover canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.post-cover.is-empty::after { content: ''; position: absolute; inset: 0; background: radial-gradient(80% 90% at 20% 0%, rgba(198, 161, 91, 0.25), transparent 60%); }
.post-body { padding: 1.25rem 1.4rem 1.5rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.post-date { font-size: 0.8rem; color: var(--faint); }
.post-card h3 { font-size: 1.18rem; line-height: 1.3; }
html[lang="fa"] .post-card h3 { font-size: 1.05rem; line-height: 1.6; }
.post-card p { font-size: 0.93rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ── Forms ─────────────────────────────────────────────────────────────── */
.panel { padding: clamp(1.6rem, 4vw, 3.2rem); border-radius: 30px; }
.form-panel { display: grid; grid-template-columns: 0.85fr 1.25fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.form-panel.is-quiet { --glass-tint: rgba(12, 18, 36, 0.24); }
.form-intro h2 { margin-bottom: 0.9rem; }
.form-intro p:not(.eyebrow) { max-width: 360px; }
.invite-form { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.2rem; }
.field { display: flex; flex-direction: column; gap: 0.45rem; }
.field-full { grid-column: 1 / -1; }
.field label { font-size: 0.82rem; color: var(--muted); font-weight: 500; }
.field .optional { color: var(--faint); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; padding: 0.85rem 1rem; border-radius: 14px;
  background: rgba(5, 7, 14, 0.55); border: 1px solid var(--line-2); color: var(--parchment);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: rgba(243, 239, 230, 0.22); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(198, 161, 91, 0.14), inset 0 1px 2px rgba(0, 0, 0, 0.35); background: rgba(5, 7, 14, 0.75); }
.field input.is-invalid, .field select.is-invalid, .field textarea.is-invalid { border-color: #c97a6d; }
.field input[dir="ltr"] { text-align: start; }
html[dir="rtl"] .field input[dir="ltr"] { text-align: right; }
.field select { appearance: none; -webkit-appearance: none; padding-inline-end: 2.6rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-size: 5px 5px; background-repeat: no-repeat; background-position: right 1.25rem center, right 0.95rem center; }
html[dir="rtl"] .field select { background-position: left 0.95rem center, left 1.25rem center; }
.field select option { background: #0b1020; color: var(--parchment); }
.field textarea { resize: vertical; min-height: 6.5rem; }

/* Voice glow: light rises from the bottom of the field as you write. */
.voice { position: relative; border-radius: 14px; }
.voice textarea { position: relative; z-index: 1; background: rgba(5, 7, 14, 0.6); }
.voice-glow {
  position: absolute; inset-inline: 8%; bottom: -2px; height: 70%; z-index: 0; pointer-events: none; border-radius: 50%;
  background: radial-gradient(60% 100% at var(--vx, 50%) 100%, rgba(228, 197, 136, 0.55), rgba(110, 140, 255, 0.18) 45%, transparent 75%);
  filter: blur(14px); opacity: var(--vl, 0); transform: scaleY(calc(0.4 + var(--vl, 0) * 0.6)); transform-origin: bottom;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.voice.is-thinking .voice-glow { --vl: 0.75; background: radial-gradient(60% 100% at 50% 100%, rgba(228, 197, 136, 0.55), rgba(110, 140, 255, 0.18) 45%, transparent 75%); animation: sweepx 1.6s ease-in-out infinite alternate; }
@keyframes sweepx { from { translate: -18% 0; } to { translate: 18% 0; } }

.form-submit-row { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 1rem; margin-top: 0.3rem; }
.form-status { font-size: 0.9rem; color: var(--muted); }
.form-status.is-success { color: var(--gold-hi); }
.form-status.is-error { color: #e09a8c; }
.form-submit.is-done { pointer-events: none; }

/* ── Footer ────────────────────────────────────────────────────────────── */
.site-footer { position: relative; padding: 4rem var(--gutter) 2.6rem; border-top: 1px solid var(--line); background: linear-gradient(180deg, rgba(7, 18, 48, 0.25), transparent); }
.footer-inner { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: 1.2fr 2fr; gap: 2.5rem 3rem; }
.footer-tagline { margin-top: 0.9rem; font-family: var(--f-display); font-size: 1.15rem; color: #b4b9c7; }
html[lang="fa"] .footer-tagline { font-size: 1rem; }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.footer-cols > div { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-head { font-size: 0.78rem; color: var(--parchment); font-weight: 500; margin-bottom: 0.2rem; }
.footer-cols a { font-size: 0.9rem; color: var(--muted); transition: color 0.2s; width: fit-content; }
.footer-cols a:hover { color: var(--gold-hi); }
.footer-base { grid-column: 1 / -1; display: flex; align-items: center; flex-wrap: wrap; gap: 0.8rem 1.6rem; padding-top: 1.8rem; border-top: 1px solid var(--line); }
.footer-legal, .footer-credit { font-size: 0.8rem; color: var(--faint); }
.footer-credit a { color: var(--gold); }
.footer-credit a:hover { color: var(--gold-hi); }
.footer-lang { position: relative; display: flex; gap: 0.1rem; padding: 0.25rem; border-radius: 999px; border: 1px solid var(--line-2); margin-inline-start: auto; }
.footer-lang .goo-blob { height: 1.9rem; background: var(--gold); }
.footer-lang > .goo-layer { opacity: 0; }
.footer-lang.goo-on > .goo-layer { opacity: 1; }
.footer-lang-option { position: relative; z-index: 1; min-width: 2.6rem; text-align: center; padding: 0.3rem 0.7rem; border-radius: 999px; font-size: 0.78rem; color: var(--muted); transition: color 0.25s; }
.footer-lang-option[lang="fa"] { font-family: 'Vazirmatn', Tahoma, sans-serif; }
.footer-lang-option:hover { color: var(--parchment); }
.footer-lang-option.is-active { color: var(--ink); font-weight: 500; }
.footer-lang:not(.goo-on) .footer-lang-option.is-active { background: var(--gold); }

/* ── Journal pages (blog.routes.js) ─────────────────────────────────── */
body.journal main { min-height: 70vh; }
.journal-head { padding: clamp(9rem, 16vw, 12rem) var(--gutter) 1rem; }
.journal-head h1, .article-head h1 {
  font-size: clamp(2.5rem, 5.6vw, 4.3rem); margin-bottom: 1.1rem;
  background: linear-gradient(180deg, #fffaf0 0%, #efe6d2 55%, #cdb88f 130%); -webkit-background-clip: text; background-clip: text; color: transparent;
}
html[lang="fa"] .journal-head h1, html[lang="fa"] .article-head h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); }
html[lang="zh"] .journal-head h1, html[lang="zh"] .article-head h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); }
.journal-list { padding-top: 2.5rem; }
.journal-grid .post-card.is-lead { grid-column: span 2; }
.journal-grid .post-card.is-lead h3 { font-size: 1.6rem; }
html[lang="fa"] .journal-grid .post-card.is-lead h3 { font-size: 1.3rem; }
.post-read { margin-top: auto; padding-top: 0.6rem; display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.88rem; color: var(--gold-hi); }
.post-read .i-arrow { width: 15px; height: 15px; transition: transform 0.35s var(--spring); }
.post-card:hover .post-read .i-arrow { transform: translateX(4px); }
html[dir="rtl"] .post-card:hover .post-read .i-arrow { transform: scaleX(-1) translateX(4px); }
.journal-empty { padding: 3rem 2rem; text-align: center; font-size: 1.05rem; }
.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2.2rem; }
.journal-cta { margin-top: clamp(3.5rem, 7vw, 5.5rem); display: flex; align-items: center; justify-content: space-between; gap: 1.5rem 2.5rem; flex-wrap: wrap; }
.journal-cta h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin-bottom: 0.4rem; }
.journal-after { padding-top: 1rem; }

.article-head { max-width: 820px; margin: 0 auto; padding: clamp(8.5rem, 14vw, 10.5rem) var(--gutter) 0.5rem; }
.back { margin-bottom: 1.8rem; font-size: 0.9rem; color: var(--muted); }
.back:hover { color: var(--gold-hi); }
.i-back { width: 16px; height: 16px; }
.article-meta { font-size: 0.85rem; color: var(--faint); margin-bottom: 0.9rem; }
.article-lead { font-size: clamp(1.1rem, 1.6vw, 1.28rem); color: #b9bdca; max-width: 720px; }
.article-cover { max-width: 1120px; margin: 2.6rem auto 0; padding: 0 var(--gutter); }
.article-cover img { width: 100%; max-height: 600px; object-fit: cover; border-radius: 26px; border: 1px solid var(--line);
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.9); }
.article-cover { position: relative; }

.prose { max-width: 720px; margin: 3rem auto 0; padding: 0 var(--gutter); font-size: 1.13rem; line-height: 1.85; color: #d9d5cb; }
html[lang="fa"] .prose { font-size: 1.08rem; line-height: 2.15; }
html[lang="zh"] .prose { line-height: 1.95; }
.prose > * + * { margin-top: 1.25em; }
.prose p { color: inherit; }
.prose h2 { font-size: clamp(1.55rem, 2.6vw, 2rem); margin-top: 2.2em; }
.prose h3 { font-size: 1.3rem; margin-top: 1.8em; color: var(--gold-hi); }
html[lang="fa"] .prose h2 { font-size: 1.45rem; } html[lang="fa"] .prose h3 { font-size: 1.18rem; }
.prose a { color: var(--gold-hi); text-decoration: underline; text-decoration-color: rgba(228, 197, 136, 0.4); text-underline-offset: 0.2em; }
.prose a:hover { text-decoration-color: var(--gold-hi); }
.prose strong { color: var(--parchment); font-weight: 600; }
.prose blockquote { border-inline-start: 2px solid var(--gold); padding: 0.2em 0 0.2em 1.3rem; padding-inline: 1.3rem 0;
  font-family: var(--f-display); font-size: 1.32em; line-height: 1.5; color: var(--parchment); }
html[lang="fa"] .prose blockquote { font-size: 1.15em; line-height: 1.9; }
.prose ul, .prose ol { padding-inline-start: 1.4rem; }
.prose ul { list-style: disc; } .prose ol { list-style: decimal; }
.prose li + li { margin-top: 0.45em; }
.prose li::marker { color: var(--gold); }
.prose hr { border: 0; height: 1px; margin: 2.6em auto; width: 40%; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.prose figure { margin-block: 2.2em; }
.prose img { width: 100%; border-radius: 18px; border: 1px solid var(--line); }
.prose figcaption { margin-top: 0.7rem; text-align: center; font-size: 0.88rem; color: var(--faint); }
.prose code { font-family: var(--f-mono); font-size: 0.88em; padding: 0.12em 0.4em; border-radius: 6px; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); }
html[lang="fa"] .prose code, html[lang="zh"] .prose code { font-family: 'IBM Plex Mono', ui-monospace, monospace; }
.prose pre { padding: 1.1rem 1.3rem; border-radius: 16px; background: rgba(5, 7, 14, 0.7); border: 1px solid var(--line); overflow-x: auto; font-size: 0.9rem; line-height: 1.6; }
.prose pre code { padding: 0; border: 0; background: none; }
.article-versions { max-width: 720px; margin: 3.5rem auto 0; padding: 1.6rem var(--gutter) 0; border-top: 1px solid var(--line); }
.article-versions p { font-size: 0.85rem; margin-bottom: 0.8rem; }
.article-versions div { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.article-versions .chip { color: var(--parchment); }
.article-versions .chip[lang="fa"] { font-family: 'Vazirmatn', Tahoma, sans-serif; }
.preview-banner { position: fixed; z-index: 150; inset-inline: 0; bottom: 1rem; margin: 0 auto; width: fit-content; max-width: calc(100% - 2rem);
  padding: 0.65rem 1.2rem; border-radius: 999px; background: var(--gold); color: var(--ink); font-weight: 500; font-size: 0.9rem;
  box-shadow: 0 14px 40px -12px rgba(0, 0, 0, 0.8); }
@media (max-width: 980px) { .journal-grid .post-card.is-lead { grid-column: span 2; } }
@media (max-width: 640px) {
  .journal-grid .post-card.is-lead { grid-column: auto; }
  .journal-cta { flex-direction: column; align-items: stretch; }
  .article-cover { padding: 0; } .article-cover img { border-radius: 0; border-inline: 0; }
  .prose { font-size: 1.06rem; }
}

/* ── Reveal ────────────────────────────────────────────────────────────── */
.reveal, .reveal-up { opacity: 0; transform: translateY(18px); filter: blur(6px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease), filter 0.9s var(--ease); }
.reveal.is-visible, .reveal-up.is-visible { opacity: 1; transform: none; filter: none; }
.hero-inner .reveal:nth-child(2) { transition-delay: 0.08s; }
.hero-inner .reveal:nth-child(3) { transition-delay: 0.16s; }
.hero-inner .reveal:nth-child(4) { transition-delay: 0.24s; }
.hero-inner .reveal:nth-child(5) { transition-delay: 0.32s; }
.bento .reveal-up:nth-child(2n) { transition-delay: 0.06s; }
.bento .reveal-up:nth-child(3n) { transition-delay: 0.12s; }

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 1180px) {
  .hero-tiles { position: relative; inset: auto; display: flex; justify-content: center; gap: 0.8rem; margin: 0 auto 2.2rem; order: -1; }
  .hero { display: flex; flex-direction: column; justify-content: center; }
  .tile, .t-invoice { position: relative; inset: auto; left: auto; top: auto; margin: 0; width: 66px; height: 66px; padding: 6px; border-radius: 20px; animation-duration: 7s; translate: none; }
  .tile-face, .t-invoice .tile-face { border-radius: 15px; }
  .tile-label { display: none; }
  .orbs { transform: scale(0.62); }
  .metal-ring { width: 34px; height: 34px; }
  .bot { gap: 8px; } .bot i { width: 10px; height: 10px; }
  .tile-glyph { width: 24px; height: 24px; }
  .pixel-doc { width: 28px; height: 34px; }
  .hero { padding-top: 7.5rem; }
}
@media (max-width: 980px) {
  .nav-links, .nav-login { display: none; }
  .nav-actions, .nav-links + .nav-actions { margin-inline-start: auto; }
  .nav-toggle { display: inline-flex; }
  .nav-capsule { gap: 0.5rem; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .levels { grid-template-columns: repeat(2, 1fr); }
  .levels .goo-layer--levels { display: none; }
  .form-panel { grid-template-columns: 1fr; }
  .journal-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav-cta { display: none; }
  .hero-tiles { gap: 0.5rem; }
  .tile, .t-invoice { width: 56px; height: 56px; padding: 5px; border-radius: 17px; }
  .tile-face, .t-invoice .tile-face { border-radius: 13px; }
  .orbs { transform: scale(0.52); }
  .metal-ring { width: 28px; height: 28px; }
  .bot i { width: 8px; height: 8px; } .bot { gap: 7px; }
  .tile-glyph { width: 20px; height: 20px; }
  .pixel-doc { width: 24px; height: 29px; }
  .lang-menu { display: none; }
  .hero { padding: 7rem var(--gutter) 4rem; min-height: auto; }
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .hero-ctas .btn { width: 100%; }
  .bento { grid-template-columns: 1fr; }
  .bento-card.is-wide { grid-column: auto; }
  .bento-card { min-height: 0; }
  .levels { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
  .medal { width: 76px; height: 76px; }
  .medal-vip .metal-ring { width: 56px; height: 56px; }
  .level { padding: 1.2rem 0.6rem 1.3rem; }
  .invite-form { grid-template-columns: 1fr; }
  .journal-grid { grid-template-columns: 1fr; }
  .flow { --pad: 2.5rem; --px: 1.1rem; }
  .flow-card { padding: 1.25rem 1.3rem; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .footer-lang { margin-inline-start: 0; }
  .btn { white-space: normal; text-align: center; }
}

/* ── Respect the reader's settings ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .reveal, .reveal-up { opacity: 1; transform: none; filter: none; }
  .ambient-liquid { display: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .glass, .btn-glass, .nav-sheet { -webkit-backdrop-filter: none; backdrop-filter: none; background: #0c1226; }
  .ambient-liquid, .ambient-grain { display: none; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: rgba(12, 17, 33, 0.94); }
}
@media (forced-colors: active) {
  .goo-layer, .ambient, .beam::after, .btn-metal::before, .btn-metal::after { display: none; }
  .btn { border: 1px solid ButtonText; }
}
