/* ==========================================================================
   OPTIM — Smart boiler room ("Daylight to Control Room")
   Same design system as the anti-scale site (/rusub): white at the top,
   warming to cream and amber, then the dark control-room zone with orange
   accents (the colours of the online dashboard).
   ========================================================================== */

@font-face { font-family: "Vazirmatn"; src: url("../fonts/Vazirmatn-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("../fonts/Vazirmatn-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("../fonts/Vazirmatn-Black.woff2") format("woff2"); font-weight: 900; font-display: swap; }

/* ---------- Tokens: light zone (default) / dark zone ---------- */
:root, .tone-light {
  --fg: #1b1f2a;
  --fg-2: #3c4352;
  --fg-3: #5c6473;
  --accent: #ea580c;
  --accent-2: #f59e0b;
  --accent-text: #9a3412;
  --accent-bg: rgba(234, 88, 12, .10);
  --card: rgba(255, 255, 255, .84);
  --card-border: rgba(154, 52, 18, .15);
  --card-shadow: 0 22px 44px -26px rgba(120, 53, 15, .34), 0 2px 6px rgba(120, 53, 15, .05);
  --line: rgba(154, 52, 18, .14);
  --ok: #15803d; --ok-bg: rgba(21, 128, 61, .10);
  --bad: #b91c1c; --bad-bg: rgba(185, 28, 28, .08);
  --chip-bg: rgba(255, 255, 255, .9); --chip-fg: #7c2d12; --chip-border: rgba(154, 52, 18, .22);
  --btn-bg: linear-gradient(135deg, #ea580c 0%, #c2410c 100%); --btn-fg: #fff;
  --btn-glow: 0 14px 30px -12px rgba(194, 65, 12, .6);
  --field-bg: rgba(255, 255, 255, .94); --field-border: rgba(154, 52, 18, .28);
  --header-h: 92px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --r-sm: 10px; --r-md: 16px; --r-lg: 24px; --r-xl: 32px;
}
.tone-dark,
html[data-tone="dark"] .site-header,
html[data-tone="dark"] .hud,
html[data-tone="dark"] .fab {
  --fg: #ffffff;
  --fg-2: #e3e8ef;
  --fg-3: #aab4c3;
  --accent: #ff9a3c;
  --accent-2: #ffc46b;
  --accent-text: #ffd0a6;
  --accent-bg: rgba(255, 154, 60, .14);
  --card: rgba(255, 255, 255, .05);
  --card-border: rgba(255, 255, 255, .13);
  --card-shadow: 0 26px 50px -26px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .06);
  --line: rgba(255, 255, 255, .13);
  --ok: #6ee7a8; --ok-bg: rgba(110, 231, 168, .12);
  --bad: #fca5a5; --bad-bg: rgba(252, 165, 165, .12);
  --chip-bg: rgba(255, 255, 255, .08); --chip-fg: #f1f4f8; --chip-border: rgba(255, 255, 255, .2);
  --btn-bg: linear-gradient(135deg, #ffb35c 0%, #f07f00 100%); --btn-fg: #1f1300;
  --btn-glow: 0 14px 34px -12px rgba(255, 140, 40, .55);
  --field-bg: rgba(255, 255, 255, .06); --field-border: rgba(255, 255, 255, .22);
}
.tone-light, .tone-dark { color: var(--fg); }

/* ---------- Base ---------- */
[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; overflow-x: clip; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: #fff; color: #1b1f2a;
  font-family: Vazirmatn, Tahoma, "Segoe UI", sans-serif; font-size: 16px; line-height: 1.9;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
svg { max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { line-height: 1.35; font-weight: 900; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.mono { font-family: ui-monospace, "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace; letter-spacing: .02em; }
.num { font-variant-numeric: tabular-nums; }
.ltr { direction: ltr; unicode-bidi: embed; display: inline-block; }
.container { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: 24px; }
@media (max-width: 767px) { :root, .tone-light { --header-h: 76px; } .container { padding-inline: 16px; } }

/* ---------- Buttons / chips / cards ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  padding: .8em 1.6em; border-radius: 14px; font-weight: 700; font-size: .95rem; line-height: 1.4;
  border: 1.5px solid transparent; white-space: nowrap; position: relative; overflow: hidden; isolation: isolate;
  transition: transform .3s var(--ease), box-shadow .3s, background .3s, border-color .3s, color .3s;
}
.btn svg { width: 1.15em; height: 1.15em; flex: none; }
.btn-primary { background: var(--btn-bg); color: var(--btn-fg); box-shadow: var(--btn-glow); }
.btn-primary::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%);
  transform: translateX(-130%); transition: transform .7s var(--ease);
}
.btn-primary:hover { transform: translateY(-3px); filter: brightness(1.06); }
.btn-primary:hover::after { transform: translateX(130%); }
.btn-outline { border-color: var(--accent); color: var(--accent-text); background: transparent; }
.btn-outline:hover { background: var(--accent-bg); transform: translateY(-3px); }
.btn-sm { padding: .5em 1.1em; font-size: .85rem; border-radius: 12px; }
.btn-lg { padding: 1em 2em; font-size: 1.05rem; }

.chip {
  display: inline-flex; align-items: center; gap: .45em; padding: .28em .9em; border-radius: 999px;
  font-size: .78rem; font-weight: 700; line-height: 1.7;
  background: var(--chip-bg); color: var(--chip-fg); border: 1px solid var(--chip-border);
}
.chip svg { width: 1em; height: 1em; flex: none; }
.chip.accent { color: var(--accent-text); border-color: var(--accent); background: var(--accent-bg); }
.chip.mint { color: var(--ok); border-color: var(--ok); background: var(--ok-bg); }
.chip.warn { color: var(--bad); border-color: var(--bad); background: var(--bad-bg); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); position: relative; flex: none; }
.dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid currentColor; opacity: .5; animation: ping 1.8s cubic-bezier(0, 0, .2, 1) infinite; }
@keyframes ping { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(2.1); opacity: 0; } }

.card {
  position: relative; background: var(--card); border: 1px solid var(--card-border); border-radius: var(--r-lg);
  box-shadow: var(--card-shadow); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: transform .45s var(--ease), box-shadow .45s, border-color .45s;
}
.spot::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), var(--accent-bg), transparent 62%);
}
.spot:hover::after { opacity: 1; }
.lift:hover { transform: translateY(-7px); border-color: var(--accent); }

/* ---------- Header: floating capsule ---------- */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 100; padding-top: 14px; color: var(--fg); pointer-events: none; }
.header-inner {
  pointer-events: auto; height: 66px; padding: 0 12px 0 10px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border-radius: 22px; position: relative; min-width: 0;
  background: rgba(255, 255, 255, .88); border: 1px solid rgba(124, 45, 18, .14);
  box-shadow: 0 1px 0 #fff inset, 0 18px 40px -22px rgba(120, 53, 15, .45), 0 2px 8px rgba(120, 53, 15, .06);
  -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5);
  transition: background .45s, border-color .45s, box-shadow .45s, height .35s var(--ease);
}
.header-inner::before { content: ""; position: absolute; inset-inline: 22px; bottom: -1px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, #f59e0b, #ea580c, transparent); opacity: .75; }
.site-header.scrolled .header-inner { height: 58px; }
html[data-tone="dark"] .site-header .header-inner { background: rgba(20, 26, 40, .82); border-color: rgba(255, 255, 255, .14); box-shadow: 0 1px 0 rgba(255, 255, 255, .08) inset, 0 20px 44px -22px rgba(0, 0, 0, .8); }
.brand { display: flex; align-items: center; gap: 16px; padding: 6px 12px 6px 4px; flex: none; min-width: 0; }
.brand-logo { display: grid; place-items: center; height: 44px; padding: 0 14px; border-radius: 14px; background: #fbf6f1; border: 1px solid rgba(124, 45, 18, .1); transition: transform .3s var(--ease); }
.brand-logo:hover { transform: translateY(-2px); }
html[data-tone="dark"] .site-header .brand-logo { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .14); }
.brand img { height: 26px; width: auto; }
.logo-on-dark { display: none; }
html[data-tone="dark"] .site-header .logo-on-light { display: none; }
html[data-tone="dark"] .site-header .logo-on-dark { display: block; }
.brand-sep { width: 1px; height: 30px; background: linear-gradient(180deg, transparent, var(--line) 20%, var(--line) 80%, transparent); }
.brand-text { display: block; line-height: 1.25; min-width: 0; }
.brand-text strong { display: block; font-size: 1.02rem; font-weight: 900; margin-bottom: 3px; white-space: nowrap; }
.brand-text small { display: flex; align-items: center; gap: 7px; font-size: .7rem; font-weight: 700; color: var(--fg-3); white-space: nowrap; }
.brand-text small .dot { width: 6px; height: 6px; background: #16a34a; color: #16a34a; }
.nav { display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 16px; background: rgba(124, 45, 18, .05); min-width: 0; }
html[data-tone="dark"] .site-header .nav { background: rgba(255, 255, 255, .07); }
.nav a { padding: .5em .9em; font-size: .88rem; font-weight: 700; color: var(--fg-2); border-radius: 12px; white-space: nowrap; transition: color .25s, background .3s, box-shadow .3s; }
.nav a:hover { background: rgba(234, 88, 12, .09); color: var(--fg); }
.nav a.active { background: #fff; color: var(--accent-text); box-shadow: 0 6px 16px -8px rgba(120, 53, 15, .5), 0 0 0 1px rgba(124, 45, 18, .08); }
html[data-tone="dark"] .site-header .nav a.active { background: #ff9a3c; color: #1f1300; box-shadow: 0 6px 18px -6px rgba(255, 154, 60, .6); }
.nav .nav-home { display: none; }
.header-cta { display: flex; align-items: center; gap: 10px; flex: none; }
.phone-pill { display: inline-flex; align-items: center; gap: .6em; padding: .4em .5em; direction: ltr; font-weight: 800; font-size: .95rem; color: var(--fg); }
.phone-pill svg { width: 34px; height: 34px; padding: 8px; border-radius: 50%; background: var(--accent-bg); color: var(--accent-text); }
.hdr-btn { border-radius: 14px; padding: .7em 1.15em; }
.nav-toggle { display: none; width: 44px; height: 44px; border-radius: 14px; border: 1px solid var(--line); background: var(--chip-bg); flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 0; }
.nav-toggle span { width: 20px; height: 2px; border-radius: 2px; background: var(--fg); transition: transform .3s, opacity .3s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@keyframes dropIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@media (max-width: 1500px) { .phone-pill span { display: none; } .phone-pill { padding: 0; } }
@media (max-width: 1320px) { .brand-text small { display: none; } .nav a { padding: .5em .66em; font-size: .84rem; } }
@media (max-width: 1180px) {
  .nav { position: absolute; top: calc(100% + 10px); left: 0; right: 0; flex-direction: column; align-items: stretch; padding: 10px; display: none; border-radius: 20px;
    background: rgba(255, 255, 255, .97) !important; border: 1px solid rgba(124, 45, 18, .14); box-shadow: 0 24px 50px -20px rgba(120, 53, 15, .5); }
  html[data-tone="dark"] .site-header .nav { background: rgba(20, 26, 40, .97) !important; border-color: rgba(255, 255, 255, .16); }
  .nav.open { display: flex; animation: dropIn .35s var(--ease); }
  .nav a { padding: .8em 1em; font-size: 1rem; }
  .nav .nav-home { display: block; margin-top: 6px; border-top: 1px solid var(--line); border-radius: 0 0 12px 12px; color: var(--accent-text); }
  .nav-toggle { display: flex; }
  .brand-text small { display: flex; }
}
@media (max-width: 767px) {
  .site-header { padding-top: 10px; } .header-inner { height: 56px; border-radius: 18px; padding: 0 8px; gap: 8px; }
  .site-header.scrolled .header-inner { height: 54px; }
  .brand { gap: 10px; padding: 4px; } .brand-logo { height: 38px; padding: 0 10px; border-radius: 12px; } .brand img { height: 22px; }
  .brand-text strong { font-size: .88rem; margin: 0; } .brand-text small { display: none; } .brand-sep { height: 22px; }
  .header-cta { gap: 6px; } .hdr-btn span { display: none; } .hdr-btn { width: 40px; height: 40px; padding: 0; border-radius: 12px; }
  .nav-toggle { width: 40px; height: 40px; }
}
@media (max-width: 440px) { .phone-pill { display: none; } .brand-sep { display: none; } .brand { gap: 8px; } }
@media (max-width: 360px) { .brand-text { display: none; } }

/* ---------- Scroll progress + thermometer HUD ---------- */
.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 110; transform-origin: right; transform: scaleX(0); background: linear-gradient(270deg, #fde68a, #f97316 55%, #9a3412); }
.hud { position: fixed; top: 50%; right: 10px; z-index: 80; width: 30px; transform: translateY(-50%); display: none; flex-direction: column; align-items: center; gap: 8px; color: var(--fg); pointer-events: none; }
@media (min-width: 1380px) { html.js .hud { display: flex; } }
.hud-tube { position: relative; width: 14px; height: 168px; border-radius: 999px; border: 1.5px solid var(--accent); background: var(--chip-bg); overflow: hidden; }
.hud-fill { position: absolute; inset: 0; transform-origin: bottom; transform: scaleY(0); background: linear-gradient(0deg, #c2410c, #f97316 60%, #fde68a); }
.hud-tube i { position: absolute; left: 50%; width: 4px; height: 4px; border-radius: 50%; background: rgba(255, 255, 255, .85); animation: hudBubble 3.2s linear infinite; }
.hud-tube i:nth-child(2) { animation-delay: -1.1s; left: 30%; } .hud-tube i:nth-child(3) { animation-delay: -2.1s; left: 70%; }
@keyframes hudBubble { from { bottom: -6px; opacity: 0; } 15% { opacity: 1; } to { bottom: 100%; opacity: 0; } }
.hud-pct { font-size: .72rem; font-weight: 800; color: var(--accent-text); direction: ltr; }
.hud-lbl { writing-mode: vertical-rl; font-size: .66rem; font-weight: 700; color: var(--fg-3); }

/* ---------- Floating buttons / toast ---------- */
.fab { position: fixed; bottom: 22px; left: 22px; z-index: 90; display: flex; flex-direction: column; gap: 10px; transition: opacity .4s, transform .5s var(--ease); }
.fab a, .fab button { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; border: 0; box-shadow: 0 14px 30px -10px rgba(60, 20, 0, .5); transition: transform .3s var(--ease), opacity .3s; }
.fab a:hover, .fab button:hover { transform: scale(1.1); }
.fab .call { background: var(--btn-bg); color: var(--btn-fg); animation: fabPulse 2.6s infinite; }
.fab .top { background: var(--card); color: var(--fg); border: 1px solid var(--card-border); opacity: 0; pointer-events: none; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.fab .top.show { opacity: 1; pointer-events: auto; }
.fab svg { width: 24px; height: 24px; }
@keyframes fabPulse { 0% { box-shadow: 0 0 0 0 rgba(234, 88, 12, .55); } 70% { box-shadow: 0 0 0 18px rgba(234, 88, 12, 0); } 100% { box-shadow: 0 0 0 0 rgba(234, 88, 12, 0); } }
html.in-story .fab { opacity: 0; pointer-events: none; transform: translateY(24px); }
@media (max-width: 767px) { .fab { bottom: 14px; left: 12px; gap: 8px; } .fab a, .fab button { width: 44px; height: 44px; } .fab svg { width: 20px; height: 20px; } }
.toast { position: fixed; bottom: 24px; right: 24px; z-index: 120; max-width: 320px; padding: 14px 20px; border-radius: var(--r-md); background: #1b2233; color: #fff; border: 1px solid #ff9a3c; font-size: .9rem; transform: translateY(90px); opacity: 0; transition: all .45s var(--ease); }
.toast.show { transform: none; opacity: 1; }

/* ---------- Sections + palette (white → cream → amber → control room) ---------- */
.section { position: relative; padding: 112px 0 168px; overflow: clip; background: linear-gradient(180deg, var(--c-top), var(--c-bot)); }
.section > .container { position: relative; z-index: 2; }
.section-head { text-align: center; max-width: 800px; margin: 0 auto 60px; }
.section-head .chip { margin-bottom: 18px; }
.section-head h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); margin-bottom: .5em; }
.section-head p { color: var(--fg-2); font-size: 1.05rem; }
.section-head.tight { margin: 76px auto 30px; }
.section-head.tight h3 { font-size: clamp(1.3rem, 2.4vw, 1.8rem); }
@media (max-width: 767px) { .section { padding: 72px 0 128px; } .section-head { margin-bottom: 38px; } }

#nigc      { --c-top: #ffffff; --c-bot: #fff8f1; --c-next: #fff4ea; }
#compare   { --c-top: #fff4ea; --c-bot: #ffefe0; --c-next: #ffeada; }
#curve     { --c-top: #ffeada; --c-bot: #ffe4cd; --c-next: #ffdfc4; }
#features  { --c-top: #ffdfc4; --c-bot: #ffd9b8; --c-next: #1b2233; }
#dashboard { --c-top: #1b2233; --c-bot: #171d2c; --c-next: #151b29; }
#calc      { --c-top: #151b29; --c-bot: #131826; --c-next: #121724; }
#product   { --c-top: #121724; --c-bot: #101521; --c-next: #0f131e; }
#faq       { --c-top: #0f131e; --c-bot: #0d111b; --c-next: #0c1019; }
#contact   { --c-top: #0c1019; --c-bot: #0a0d15; }

/* ---------- Wave dividers ---------- */
.wave { position: absolute; left: 0; right: 0; bottom: -1px; height: 96px; z-index: 1; pointer-events: none; color: var(--c-next); overflow: hidden; }
.wave svg { position: absolute; left: 0; bottom: 0; width: 3200px; max-width: none; height: 96px; will-change: transform; }
.wave .w2 { opacity: .42; } .wave .w3 { opacity: .2; }

/* ---------- Reveal utilities (JS only) ---------- */
html.js .reveal { opacity: 0; translate: 0 38px; transition: opacity .95s var(--ease), translate .95s var(--ease); }
html.js .reveal.from-right { translate: 60px 0; } html.js .reveal.from-left { translate: -60px 0; }
html.js .reveal.in { opacity: 1; translate: 0 0; }
html.js .stagger > * { opacity: 0; translate: 0 54px; scale: .95; transition: opacity .85s var(--ease), translate .85s var(--ease), scale .85s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
html.js .stagger.in > * { opacity: 1; translate: 0 0; scale: 1; }
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-block: .14em; margin-block: -.14em; }
.wi { display: inline-block; }
html.js .split .wi { transform: translateY(118%); opacity: 0; transition: transform 1s var(--ease) calc(var(--i) * 55ms), opacity .6s calc(var(--i) * 55ms); }
html.js .split.in .wi { transform: none; opacity: 1; }
em { font-style: normal; }
h1 em, h2 em, h3 em { background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.split em .wi, .ch-title em .wi { background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.split em, .ch-title em { background: none; }

/* ==========================================================================
   HERO — pinned chapter slider (scroll scrubs the story)
   ========================================================================== */
.story { position: relative; background: #fff; }
html.js .story { height: 500vh; height: 500svh; }
.story-pin { position: relative; overflow: clip; min-height: 100svh; background: #fff; }
html.js .story-pin { position: sticky; top: 0; height: 100vh; height: 100svh; min-height: 0; }
.story-grid {
  position: relative; z-index: 2; height: 100%; display: grid; align-items: center;
  grid-template-columns: minmax(0, .84fr) minmax(0, 1.16fr); gap: clamp(24px, 4vw, 64px);
  padding-top: calc(var(--header-h) + 10px); padding-bottom: 104px;
}
.story-text { min-width: 0; }
.chapters { display: grid; }
.chapter { grid-area: 1 / 1; visibility: hidden; transition: visibility 0s .9s; pointer-events: none; min-width: 0; }
.chapter.is-active { visibility: visible; transition-delay: 0s; pointer-events: auto; }
.kicker { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; font-weight: 700; font-size: .95rem; color: var(--accent-text); }
.kicker .num { padding: 0 .75em; border: 1.5px solid currentColor; border-radius: 999px; font-size: .82rem; line-height: 1.9; }
.ch-title { font-size: clamp(1.95rem, 3.7vw + .4rem, 3.4rem); line-height: 1.32; letter-spacing: -.01em; margin-bottom: .45em; }
.ch-copy { font-size: clamp(1rem, .5vw + .9rem, 1.12rem); color: var(--fg-2); max-width: 34em; margin-bottom: 1.3em; }
.ch-extra { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
html.js .ch-fade { opacity: 0; translate: 0 22px; transition: opacity .5s, translate .6s var(--ease); }
html.js .chapter.is-active .ch-fade { opacity: 1; translate: 0 0; transition: opacity .8s var(--ease) var(--d, .35s), translate .9s var(--ease) var(--d, .35s); }
html.js .ch-title .wi { transform: translateY(118%); opacity: 0; transition: transform .55s var(--ease-io) calc(var(--i) * 14ms), opacity .35s; }
html.js .chapter.is-active .ch-title .wi { transform: none; opacity: 1; transition: transform 1.05s var(--ease) calc(.18s + var(--i) * 60ms), opacity .7s calc(.18s + var(--i) * 60ms); }
html.js .chapter.is-past .ch-title .wi { transform: translateY(-118%); }

.story-visual { min-width: 0; position: relative; }
.panel {
  position: relative; height: min(64vh, 600px); height: min(64svh, 600px); border-radius: var(--r-xl); overflow: hidden; isolation: isolate;
  background: #f4f8fc; border: 1px solid rgba(30, 41, 59, .14); touch-action: pan-y;
  box-shadow: 0 40px 80px -40px rgba(120, 53, 15, .45), 0 2px 0 rgba(255, 255, 255, .9) inset;
}
.panel-tint { position: absolute; inset: 0; z-index: -1; background: #fff5eb; }
#scene { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; display: block; z-index: 1; }
.wipe { position: absolute; inset: 0; z-index: 4; pointer-events: none; background: var(--wc, #ffe9d6); opacity: 0; clip-path: circle(0% at 72% 50%); }
.wipe.go { animation: wipe 1.05s var(--ease-io) both; }
@keyframes wipe { 0% { opacity: .85; clip-path: circle(0% at 72% 50%); } 55% { opacity: .55; clip-path: circle(80% at 72% 50%); } 100% { opacity: 0; clip-path: circle(150% at 72% 50%); } }

.p-chip { position: absolute; z-index: 5; display: inline-flex; align-items: center; gap: .55em; padding: .35em .95em; border-radius: 999px; font-size: .72rem; font-weight: 800; letter-spacing: .06em;
  color: #ffe6cf; background: rgba(20, 26, 40, .88); border: 1px solid rgba(255, 154, 60, .45); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); direction: ltr; }
.p-status { top: 16px; right: 16px; }
.p-status i { width: 8px; height: 8px; border-radius: 50%; background: #ff6b5b; flex: none; animation: stPulse 1.6s infinite; }
.p-status[data-s="1"] i { background: #ffc23d; } .p-status[data-s="2"] i, .p-status[data-s="3"] i { background: #ff9a3c; } .p-status[data-s="4"] i { background: #4eeaa3; }
@keyframes stPulse { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .55); } 100% { box-shadow: 0 0 0 9px rgba(255, 255, 255, 0); } }
.p-curve { position: absolute; z-index: 5; top: 16px; left: 16px; width: 210px; padding: 6px 8px 2px; border-radius: 16px; opacity: 0; pointer-events: none;
  background: rgba(255, 255, 255, .94); border: 1px solid rgba(154, 52, 18, .2); box-shadow: 0 18px 30px -18px rgba(60, 20, 0, .55); font-family: Vazirmatn, Tahoma, sans-serif; }
.p-curve svg { display: block; width: 100%; height: auto; }
.gauges { margin-top: 12px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 11px 16px 12px; border-radius: 18px; color: #f1f4f8;
  background: rgba(20, 26, 40, .94); border: 1px solid rgba(255, 154, 60, .35); box-shadow: 0 22px 40px -22px rgba(20, 10, 0, .7); }
.g-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: .74rem; font-weight: 700; color: #cdd5e0; }
.g-val { font-weight: 900; font-size: .92rem; color: #fff; direction: ltr; font-variant-numeric: tabular-nums; }
.g-bar { height: 6px; margin-top: 4px; border-radius: 999px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.g-bar i { display: block; height: 100%; width: 100%; border-radius: inherit; transform-origin: right; transform: scaleX(.5); }
.g-out i { background: linear-gradient(270deg, #93c5fd, #2563eb); }
.g-flow i { background: linear-gradient(270deg, #fdba74, #ea580c); }
.g-gas i { background: linear-gradient(270deg, #fcd34d, #dc2626); }

.story-nav { position: absolute; z-index: 6; left: 0; right: 0; bottom: 24px; display: flex; align-items: flex-end; gap: 22px; }
.segs { flex: 1; display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.seg { background: none; border: 0; padding: 8px 0 0; text-align: right; display: flex; flex-direction: column; gap: 8px; color: var(--fg-3); }
.seg-bar { display: block; height: 6px; border-radius: 999px; background: rgba(154, 52, 18, .14); overflow: hidden; }
.seg-bar i { display: block; height: 100%; border-radius: inherit; transform-origin: right; transform: scaleX(0); background: linear-gradient(270deg, #ea580c, #f59e0b); }
.seg-label { font-size: .84rem; font-weight: 800; line-height: 1.4; color: var(--fg-2); transition: color .3s; }
.seg.done .seg-label { color: var(--accent-text); } .seg.on .seg-label { color: var(--fg); } .seg:not(.on):not(.done) .seg-label { opacity: .75; }
.seg:hover .seg-label { color: var(--fg); }
.nav-tools { display: flex; align-items: center; gap: 8px; flex: none; }
.arrow { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--card-border); background: var(--card); display: grid; place-items: center; transition: transform .3s var(--ease), background .3s; }
.arrow:hover { transform: scale(1.1); background: var(--accent-bg); }
.arrow svg { width: 20px; height: 20px; }
.skip { font-size: .8rem; font-weight: 700; color: var(--accent-text); padding: .4em .9em; border-radius: 999px; border: 1px dashed var(--accent); white-space: nowrap; }
.skip:hover { background: var(--accent-bg); }
.mouse { width: 22px; height: 34px; border-radius: 12px; border: 2px solid var(--accent); position: relative; display: block; }
.mouse i { position: absolute; left: 50%; top: 6px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--accent); animation: wheel 1.6s ease-in-out infinite; }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 80% { transform: translateY(11px); opacity: 0; } 100% { opacity: 0; } }
@keyframes chevDown { 0%, 100% { transform: translateY(-4px); opacity: .3; } 50% { transform: translateY(6px); opacity: 1; } }
.story > .wave { z-index: 7; color: #fff; }

/* start cue, next-chapter teaser, live caption */
.start-cue { display: flex; align-items: center; gap: 16px; margin-top: 22px; padding: 14px 20px 14px 16px; border-radius: 20px; width: fit-content; max-width: 100%;
  border: 1.5px solid var(--accent); background: linear-gradient(135deg, rgba(234, 88, 12, .10), rgba(245, 158, 11, .08)); color: var(--accent-text); text-align: right; line-height: 1.5; position: relative;
  box-shadow: 0 18px 34px -22px rgba(194, 65, 12, .6); transition: transform .3s var(--ease), background .3s; }
.start-cue:hover { transform: translateY(-3px); background: var(--accent-bg); }
.start-cue::before { content: ""; position: absolute; inset: -6px; border-radius: 26px; border: 2px solid var(--accent); opacity: 0; animation: cueRing 2.4s ease-out infinite; pointer-events: none; }
@keyframes cueRing { 0% { transform: scale(.96); opacity: .55; } 100% { transform: scale(1.06); opacity: 0; } }
.start-cue .mouse { flex: none; width: 26px; height: 40px; border-radius: 14px; }
.cue-text strong { display: block; font-size: 1.05rem; font-weight: 900; color: var(--fg); }
.cue-text small { display: block; font-size: .8rem; font-weight: 400; color: var(--fg-2); max-width: 24em; }
.cue-chev { display: grid; margin-inline-start: 4px; } .cue-chev svg { width: 22px; height: 22px; margin: -7px 0; animation: chevDown 1.5s ease-in-out infinite; } .cue-chev svg:nth-child(2) { animation-delay: .25s; }
.start-cue.nudge { animation: cueNudge 1.1s ease-in-out infinite; }
@keyframes cueNudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(8px); } }
.next-ch { display: inline-flex; align-items: center; gap: .5em; margin-top: 16px; padding: .5em 1.1em; border-radius: 999px; border: 1.5px dashed var(--accent); background: transparent; color: var(--accent-text); font-size: .86rem; font-weight: 800; transition: background .3s, transform .3s var(--ease); }
.next-ch svg { width: 18px; height: 18px; animation: chevDown 1.5s ease-in-out infinite; }
.next-ch:hover { background: var(--accent-bg); transform: translateY(-2px); }
.p-caption { position: absolute; z-index: 5; left: 16px; bottom: 16px; max-width: calc(100% - 32px); display: flex; align-items: center; gap: 10px; padding: .4em 1em .4em .45em; border-radius: 16px; color: #f1f4f8; font-size: .86rem; font-weight: 700; line-height: 1.55;
  background: rgba(20, 26, 40, .92); border: 1px solid rgba(255, 154, 60, .4); box-shadow: 0 16px 30px -16px rgba(20, 10, 0, .8); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.pc-step { flex: none; padding: .2em .7em; border-radius: 999px; background: #ff9a3c; color: #1f1300; font-size: .72rem; font-weight: 800; direction: ltr; }
.p-caption.tick #pcText { animation: capIn .6s var(--ease); } .p-caption.tick .pc-step { animation: capPop .5s var(--ease); }
@keyframes capIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes capPop { 0% { transform: scale(.7); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }

/* no-JS / reduced motion: stack chapters, show the final scene */
html:not(.js) .chapter, html.rm .chapter { visibility: visible; }
html:not(.js) .chapters, html.rm .chapters { display: block; }
html:not(.js) .chapter, html.rm .chapter { margin-bottom: 40px; }
html.rm .story { height: auto; } html.rm .story-pin { position: relative; height: auto; min-height: 0; }
html.rm .story-grid { height: auto; padding-bottom: 60px; align-items: start; } html.rm .story-visual { position: sticky; top: calc(var(--header-h) + 16px); }
html.rm .story-nav, html.rm .hud, html.rm .start-cue, html.rm .next-ch { display: none !important; }

@media (max-width: 1000px) {
  .story-grid { grid-template-columns: 1fr; grid-template-rows: auto 1fr; gap: 14px; padding-top: calc(var(--header-h) + 6px); padding-bottom: 92px; align-items: start; }
  .story-visual { order: -1; }
  .panel { height: min(32svh, 300px); border-radius: 22px; }
  .gauges { margin-top: 8px; gap: 10px; padding: 7px 10px 8px; border-radius: 14px; } .g-bar { height: 4px; margin-top: 2px; } .g-row { font-size: .62rem; flex-wrap: wrap; line-height: 1.5; } .g-val { font-size: .74rem; }
  .p-status { top: 10px; right: 10px; font-size: .6rem; padding: .25em .7em; }
  .p-curve { top: 10px; left: 10px; width: 150px; padding: 4px 6px 0; border-radius: 12px; }
  .ch-title { font-size: clamp(1.55rem, 6.4vw, 2.2rem); margin-bottom: .35em; }
  .ch-copy { font-size: .94rem; margin-bottom: .9em; line-height: 1.8; }
  .kicker { margin-bottom: 8px; font-size: .85rem; }
  .ch-extra { gap: 8px; } .ch-extra .btn { padding: .62em 1.1em; font-size: .88rem; }
  .story-nav { bottom: 12px; gap: 10px; } .seg-label { display: none; } .seg { padding-top: 0; } .nav-tools .skip { display: none; } .arrow { width: 38px; height: 38px; }
  .p-caption { left: 10px; bottom: 10px; max-width: calc(100% - 20px); font-size: .7rem; gap: 7px; padding: .3em .8em .3em .35em; border-radius: 12px; } .pc-step { font-size: .62rem; }
  .start-cue { margin-top: 12px; padding: 9px 14px 9px 12px; gap: 12px; border-radius: 16px; } .start-cue .mouse { width: 20px; height: 32px; }
  .cue-text strong { font-size: .92rem; } .cue-text small { font-size: .72rem; } .cue-chev { display: none; }
  .next-ch { margin-top: 8px; font-size: .8rem; padding: .35em .9em; }
}
@media (min-width: 600px) and (max-width: 1000px) and (min-height: 800px) {
  .story-grid { grid-template-rows: auto auto; align-content: center; gap: 28px; }
  .panel { height: min(40svh, 470px); }
  .ch-title { font-size: clamp(2.2rem, 5.6vw, 3.2rem); } .ch-copy { font-size: 1.12rem; max-width: 36em; }
  .kicker { font-size: 1rem; margin-bottom: 14px; } .seg-label { display: block; }
}
@media (max-width: 1000px) and (max-height: 720px) {
  .panel { height: 26svh; border-radius: 18px; }
  .story-grid { gap: 10px; padding-bottom: 62px; }
  .gauges { margin-top: 6px; padding: 5px 10px 6px; }
  .kicker { margin-bottom: 4px; font-size: .8rem; } .kicker .num { font-size: .72rem; }
  .ch-title { font-size: clamp(1.35rem, 5.6vw, 1.8rem); margin-bottom: .3em; }
  .ch-copy { font-size: .86rem; line-height: 1.7; margin-bottom: .6em; }
  .chapter:not(:last-child) .ch-extra { display: none; }
  .story-nav { bottom: 8px; } .arrow { width: 34px; height: 34px; }
  .cue-text small { display: none; } .start-cue { margin-top: 8px; padding: 7px 12px; }
  .p-curve { width: 120px; }
}
@media (max-width: 1000px) and (max-height: 520px) and (orientation: landscape) {
  .story-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto; align-items: center; gap: 18px; padding-top: calc(var(--header-h) + 4px); padding-bottom: 50px; }
  .story-visual { order: 0; }
  .panel { height: calc(100svh - var(--header-h) - 70px); }
  .gauges, .start-cue, .next-ch, .p-caption { display: none; }
  .ch-title { font-size: clamp(1.15rem, 3.4vw, 1.5rem); } .ch-copy { font-size: .8rem; line-height: 1.65; }
  .ch-extra .btn { padding: .45em .9em; font-size: .8rem; }
}
@media (max-height: 700px) and (min-width: 1001px) { .panel { height: 54svh; } .ch-title { font-size: clamp(1.8rem, 3.2vw, 2.7rem); } }
@media (max-width: 420px) { .gauges { gap: 8px; padding-inline: 8px; } .g-row { flex-wrap: nowrap; font-size: .56rem; gap: 4px; white-space: nowrap; } .g-val { font-size: .68rem; } }

/* ---------- Marquee ---------- */
.marquee { position: relative; z-index: 3; overflow: hidden; direction: ltr; background: #fff; border-block: 1px solid rgba(154, 52, 18, .12); padding: 16px 0; }
.marquee-track { display: flex; gap: 56px; width: max-content; will-change: transform; }
.marquee-track span { display: inline-flex; align-items: center; gap: .6em; font-weight: 800; font-size: .95rem; color: #7c2d12; white-space: nowrap; direction: rtl; }
.marquee-track svg { width: 1.15em; height: 1.15em; color: #16a34a; }

/* ==========================================================================
   NIGC approval
   ========================================================================== */
.nigc-hero { display: grid; grid-template-columns: 150px 1fr; gap: 36px; align-items: center; padding: 40px 44px; border-top: 5px solid var(--accent); overflow: hidden; }
.nigc-hero::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(60% 120% at 100% 0%, rgba(245, 158, 11, .12), transparent 60%); }
.nigc-seal { color: var(--accent); width: 150px; }
.nigc-seal svg { width: 100%; height: auto; display: block; }
.seal-spin { transform-origin: 60px 60px; animation: spin 26s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.nigc-hero h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); margin: .45em 0 .35em; }
.nigc-hero p { color: var(--fg-2); font-size: 1.05rem; max-width: 46em; }
.nigc-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.quote-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; max-width: 980px; margin-inline: auto; }
.quote { margin: 0; padding: 28px; display: flex; flex-direction: column; }
.q-big { font-size: 1rem; font-weight: 700; color: var(--fg-2); line-height: 1.3; }
.q-big b { font-size: 2.6rem; font-weight: 900; color: var(--accent); }
.quote blockquote { margin: 12px 0 16px; font-size: .95rem; color: var(--fg); flex: 1; }
.quote figcaption { font-size: .78rem; color: var(--fg-3); border-top: 1px dashed var(--line); padding-top: 10px; }
.quote figcaption a, .ans a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.src-note { text-align: center; color: var(--fg-3); font-size: .82rem; margin-top: 18px; }
@media (max-width: 900px) { .quote-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .nigc-hero { grid-template-columns: 1fr; padding: 26px; gap: 14px; text-align: center; } .nigc-seal { width: 96px; margin: 0 auto; } .nigc-actions { justify-content: center; } }

/* ==========================================================================
   Traditional vs smart
   ========================================================================== */
.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.compare-card { padding: 34px; overflow: hidden; }
.compare-card.bad { border-top: 4px solid #dc2626; }
.compare-card.good { border-top: 4px solid #16a34a; }
.compare-card .head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.compare-card h3 { font-size: 1.3rem; }
.mini-chart { width: 100%; height: auto; display: block; margin: 6px 0 4px; color: var(--fg); font-family: Vazirmatn, Tahoma, sans-serif; }
html.js .mini-chart .draw { stroke-dasharray: 1 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.8s var(--ease) .4s; }
html.js .compare-grid.in .mini-chart .draw, html.rm .mini-chart .draw { stroke-dashoffset: 0; }
.check-list { list-style: none; padding: 0; margin: 12px 0 0; }
.check-list li { display: flex; gap: .65em; align-items: flex-start; padding: .55em 0; font-size: .93rem; border-top: 1px dashed var(--line); }
.check-list li svg { width: 1.2em; height: 1.2em; flex: none; margin-top: .35em; }
.check-list.bad li svg { color: var(--bad); } .check-list.good li svg { color: var(--ok); }
@media (max-width: 900px) { .compare-grid { grid-template-columns: 1fr; } .compare-card { padding: 24px; } }

/* ==========================================================================
   Heating curve (interactive)
   ========================================================================== */
.curve-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 28px; align-items: start; }
.curve-chart { padding: 18px 18px 14px; }
.curve-chart svg { display: block; width: 100%; height: auto; color: var(--fg); overflow: visible; }
.cv-legend { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; font-size: .8rem; font-weight: 700; color: var(--fg-2); margin-top: 6px; }
.cv-legend span { display: inline-flex; align-items: center; gap: 8px; }
.cv-legend i { display: inline-block; }
.lg-s { width: 22px; height: 5px; border-radius: 3px; background: #ea580c; }
.lg-f { width: 22px; border-top: 3px dashed #ef4444; }
.lg-w { width: 16px; height: 12px; border-radius: 3px; background: rgba(239, 68, 68, .22); }
.curve-ctrl, .calc-form, .calc-result { padding: 32px; }
.title { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-weight: 800; margin-bottom: 16px; }
.val { padding: .25em .9em; border-radius: 10px; background: var(--accent-bg); border: 1px solid var(--accent); color: var(--accent-text); font-weight: 900; direction: ltr; white-space: nowrap; }
input[type=range] { width: 100%; -webkit-appearance: none; appearance: none; height: 8px; border-radius: 999px; outline: none; background: linear-gradient(to left, var(--accent) var(--pct, 25%), rgba(154, 52, 18, .18) var(--pct, 25%)); }
.tone-dark input[type=range] { background: linear-gradient(to left, var(--accent) var(--pct, 25%), rgba(255, 255, 255, .16) var(--pct, 25%)); }
input[type=range]:focus-visible { outline: 3px solid var(--accent); outline-offset: 6px; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 4px solid var(--accent); box-shadow: 0 6px 16px rgba(120, 53, 15, .4); cursor: pointer; }
input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 4px solid var(--accent); box-shadow: 0 6px 16px rgba(120, 53, 15, .4); cursor: pointer; }
.range-marks { display: flex; justify-content: space-between; gap: 6px; font-size: .72rem; color: var(--fg-2); margin: 10px 0 26px; }
.radio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.radio-card { position: relative; }
.radio-card input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.radio-card span { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 10px; height: 100%; text-align: center; font-size: .85rem; font-weight: 700; border-radius: var(--r-md); border: 1.5px solid var(--line); background: rgba(255, 255, 255, .55); transition: all .3s var(--ease); }
.tone-dark .radio-card span { background: rgba(255, 255, 255, .04); }
.radio-card span::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--fg-3); transition: all .3s; }
.radio-card input:checked + span { border-color: var(--accent); background: var(--accent-bg); transform: translateY(-3px); box-shadow: 0 12px 24px -14px rgba(194, 65, 12, .6); }
.radio-card input:checked + span::before { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 3px rgba(234, 88, 12, .25); }
.radio-card input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.result-box { padding: 16px 18px; border-radius: var(--r-md); background: rgba(255, 255, 255, .7); border: 1px solid var(--line); transition: transform .3s var(--ease), border-color .3s; }
.tone-dark .result-box { background: rgba(255, 255, 255, .04); }
.result-box:hover { border-color: var(--accent); transform: translateY(-3px); }
.result-box .t { font-size: .8rem; color: var(--fg-2); margin-bottom: 4px; }
.result-box .v { font-size: 1.6rem; font-weight: 900; color: var(--accent-text); line-height: 1.3; direction: rtl; }
.result-box .v.bad { color: var(--bad); }
.result-box .s { font-size: .74rem; color: var(--ok); margin-top: 4px; font-weight: 700; }
.cv-waste { margin-top: 14px; padding: 14px 16px; border-radius: var(--r-md); background: var(--bad-bg); border: 1px solid rgba(185, 28, 28, .3); }
.cv-waste .t { font-size: .8rem; color: var(--fg-2); margin-bottom: 8px; }
.wbar { height: 10px; border-radius: 999px; background: rgba(185, 28, 28, .14); overflow: hidden; margin-bottom: 6px; }
.wbar i { display: block; height: 100%; border-radius: inherit; transform-origin: right; transform: scaleX(.5); transition: transform .25s; background: linear-gradient(270deg, #f87171, #b91c1c); }
.cv-waste b { color: var(--bad); font-size: .92rem; }
.calc-note { color: var(--fg-2); font-size: .76rem; margin: 14px 0 0; }
@media (max-width: 900px) { .curve-grid, .calc-grid { grid-template-columns: 1fr; } .curve-ctrl, .calc-form, .calc-result { padding: 24px; } .curve-chart { padding: 10px 6px 10px; } }
@media (max-width: 520px) { .title { flex-wrap: wrap; } .radio-grid, .result-grid { grid-template-columns: 1fr; } .radio-card span { flex-direction: row; justify-content: center; padding: 10px; } }

/* ==========================================================================
   Features
   ========================================================================== */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature { padding: 30px; }
.feature .icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 18px; background: var(--accent-bg); color: var(--accent-text); border: 1px solid var(--accent); transition: transform .5s var(--ease); }
.feature .icon svg { width: 26px; height: 26px; }
.feature:hover .icon { transform: rotate(-10deg) scale(1.12); }
.feature .icon.mint { background: var(--ok-bg); color: var(--ok); border-color: var(--ok); }
.feature h3 { font-size: 1.1rem; margin-bottom: .4em; }
.feature p { color: var(--fg-2); font-size: .93rem; }
@media (max-width: 960px) { .features-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .features-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   Dashboard tour (dark zone)
   ========================================================================== */
.dash { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; align-items: start; }
.dash-tabs { display: grid; gap: 8px; }
.dtab { position: relative; overflow: hidden; text-align: right; padding: 12px 16px 13px; border-radius: 16px; border: 1px solid var(--card-border); background: var(--card); transition: border-color .3s, background .3s, transform .3s var(--ease); }
.dtab b { display: block; font-size: .95rem; }
.dtab small { display: block; font-size: .76rem; color: var(--fg-3); line-height: 1.6; }
.dtab i { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--accent); transform-origin: right; transform: scaleX(0); }
.dtab:hover { border-color: rgba(255, 154, 60, .5); transform: translateX(-3px); }
.dtab.on { border-color: var(--accent); background: var(--accent-bg); }
.dtab.on i { transform: scaleX(1); }
.dtab.on.run i { animation: tabRun var(--dwell, 5s) linear both; }
@keyframes tabRun { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.browser { border-radius: 18px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .14); background: #eef2f6; box-shadow: 0 50px 90px -40px rgba(0, 0, 0, .85), 0 0 0 1px rgba(255, 154, 60, .12); position: sticky; top: calc(var(--header-h) + 16px); }
.br-bar { display: flex; align-items: center; gap: 14px; padding: 10px 14px; background: #1e2533; }
.br-dots { display: flex; gap: 6px; } .br-dots i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; } .br-dots i:nth-child(2) { background: #febc2e; } .br-dots i:nth-child(3) { background: #28c840; }
.br-url { flex: 1; display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 8px; background: rgba(255, 255, 255, .08); color: #cbd5e1; font-size: .78rem; direction: ltr; }
.br-url svg { width: 12px; height: 12px; color: #4ade80; }
.br-view { aspect-ratio: 16 / 10; display: grid; place-items: center; background: #f1f5f9; overflow: hidden; }
.br-view img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.browser.narrow .br-view img { width: auto; height: auto; max-width: 92%; max-height: 90%; object-fit: contain; border-radius: 14px; box-shadow: 0 20px 40px -22px rgba(15, 23, 42, .45); }
.browser.swap .br-view img { animation: shotIn .65s var(--ease); }
@keyframes shotIn { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
.roles { margin-top: 80px; }
.roles-head { text-align: center; max-width: 720px; margin: 0 auto 28px; }
.roles-head h3 { font-size: clamp(1.3rem, 2.4vw, 1.8rem); margin-bottom: .3em; }
.roles-head p { color: var(--fg-2); }
.roles-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.role { padding: 22px; }
.r-lvl { display: inline-block; font-size: .72rem; font-weight: 800; color: var(--accent-text); padding: .15em .7em; border-radius: 999px; border: 1px solid var(--accent); background: var(--accent-bg); }
.role h4 { font-size: 1.05rem; margin: 10px 0 4px; }
.role p { font-size: .86rem; color: var(--fg-2); }
.sec-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 28px 0 0; }
.dash-cta { text-align: center; margin-top: 30px; }
@media (max-width: 1000px) {
  .dash { grid-template-columns: 1fr; }
  .dash-tabs { grid-auto-flow: column; grid-auto-columns: minmax(200px, 64%); overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; }
  .dtab { scroll-snap-align: start; } .dtab:hover { transform: none; }
  .browser { position: relative; top: 0; }
  .roles-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) { .roles-grid { grid-template-columns: 1fr; } .br-view { aspect-ratio: 4 / 3; } }

/* ==========================================================================
   Calculator
   ========================================================================== */
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.calc-result .head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 20px; }
.calc-result h3 { font-size: 1.15rem; }
.result-total { margin-top: 14px; padding: 22px; border-radius: var(--r-md); color: #fff; background: linear-gradient(135deg, #ea580c, #7c2d12); display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; box-shadow: 0 24px 40px -22px rgba(120, 40, 0, .8); }
.result-total .t { color: #ffe1c7; font-size: .85rem; }
.result-total .v { font-size: 1.7rem; font-weight: 900; line-height: 1.3; }
.result-total .v small { font-size: .85rem; font-weight: 400; color: #ffe1c7; }
.result-total .btn-primary { background: #fff; color: #7c2d12; box-shadow: none; }
.field label { display: block; font-size: .85rem; font-weight: 700; margin-bottom: 6px; }
.field input { width: 100%; padding: .8em 1em; border-radius: 12px; border: 1px solid var(--field-border); background: var(--field-bg); color: var(--fg); font: inherit; font-size: .92rem; transition: border-color .25s, box-shadow .25s; }
.field input::placeholder { color: var(--fg-3); }
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-bg); }
.bump { animation: bump .45s var(--ease); }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.06); } 100% { transform: scale(1); } }

/* ==========================================================================
   Product + install steps
   ========================================================================== */
.prod-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 28px; align-items: start; }
.g-main { padding: 0; overflow: hidden; }
.g-main img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.g-main.swap img { animation: shotIn .6s var(--ease); }
.g-thumbs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 10px; }
.g-th { padding: 0; border: 2px solid transparent; border-radius: 12px; overflow: hidden; background: none; opacity: .62; transition: opacity .3s, border-color .3s, transform .3s var(--ease); }
.g-th img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.g-th:hover { opacity: 1; transform: translateY(-3px); }
.g-th.on { border-color: var(--accent); opacity: 1; }
.prod-info { padding: 32px; }
.prod-info .top { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.prod-info .code { font-size: .7rem; color: var(--fg-3); direction: ltr; }
.prod-info h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); margin-bottom: .2em; }
.prod-info > p { color: var(--fg-2); }
.specs { list-style: none; padding: 0; margin: 14px 0 18px; font-size: .9rem; }
.specs li { display: flex; justify-content: space-between; gap: 12px; padding: .55em 0; border-top: 1px dashed var(--line); }
.specs li span:first-child { color: var(--fg-3); white-space: nowrap; } .specs li span:last-child { font-weight: 800; color: var(--fg); text-align: left; }
.specs li span.mint { color: var(--ok); }
.fit { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 22px; font-size: .85rem; color: var(--fg-2); }
.prod-actions { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 900px) { .prod-grid { grid-template-columns: 1fr; } .prod-info { padding: 24px; } }
@media (max-width: 520px) { .g-thumbs { grid-template-columns: repeat(3, 1fr); } }
.steps-line { margin-top: 80px; }
.install-line { position: relative; height: 6px; margin: 0 8% 34px; border-radius: 999px; background: rgba(255, 255, 255, .14); }
.install-line i { position: absolute; inset: 0; border-radius: inherit; transform-origin: right; transform: scaleX(var(--lp, 0)); background: linear-gradient(270deg, #ffc46b, #ff7a1a); box-shadow: 0 0 16px rgba(255, 140, 40, .7); }
.install-line .drop { position: absolute; top: 50%; right: calc(var(--lp, 0) * 100%); width: 20px; height: 26px; margin: -16px -10px 0 0; border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%; transform: rotate(180deg); background: radial-gradient(circle at 50% 70%, #fff6c2, #ffb12e 45%, #f05a0c); box-shadow: 0 0 18px #ff8a2a; }
.install-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.install-step { padding: 28px 22px; text-align: center; }
.install-step .no { font-size: 2.6rem; font-weight: 900; line-height: 1; margin-bottom: 10px; background: linear-gradient(135deg, #ffc46b, #ff7a1a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.install-step h3 { font-size: 1.02rem; margin-bottom: .3em; } .install-step p { font-size: .88rem; color: var(--fg-2); }
@media (max-width: 960px) { .install-grid { grid-template-columns: 1fr 1fr; } .install-line { display: none; } }
@media (max-width: 520px) { .install-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   Cross-sell, FAQ, CTA, footer
   ========================================================================== */
.combo { display: flex; align-items: center; gap: 22px; padding: 24px 28px; margin-bottom: 84px; color: var(--fg); }
.combo:hover { border-color: #7dd3fc; transform: translateY(-4px); }
.combo-ico { flex: none; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: rgba(56, 189, 248, .14); color: #7dd3fc; border: 1px solid rgba(125, 211, 252, .5); }
.combo-ico svg { width: 30px; height: 30px; }
.combo-txt { flex: 1; display: grid; gap: 2px; }
.combo-txt small { font-size: .78rem; font-weight: 800; color: #7dd3fc; }
.combo-txt b { font-size: 1.2rem; }
.combo-txt span { font-size: .9rem; color: var(--fg-2); }
.combo-go { width: 28px; height: 28px; color: #7dd3fc; flex: none; transition: transform .3s var(--ease); }
.combo:hover .combo-go { transform: translateX(-6px); }
@media (max-width: 600px) { .combo { flex-wrap: wrap; padding: 20px; gap: 14px; } .combo-go { display: none; } }

.faq-list { max-width: 880px; margin: 0 auto; display: grid; gap: 12px; }
.faq { padding: 0; overflow: hidden; }
.faq summary { list-style: none; cursor: pointer; padding: 20px 24px; display: flex; justify-content: space-between; align-items: center; gap: 16px; font-weight: 800; }
.faq summary::-webkit-details-marker { display: none; }
.faq .pm { flex: none; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--accent); display: grid; place-items: center; color: var(--accent); transition: transform .4s var(--ease), background .3s; }
.faq .pm svg { width: 16px; height: 16px; }
.faq[open] .pm { transform: rotate(135deg); background: var(--accent-bg); }
.faq .ans { padding: 0 24px 22px; color: var(--fg-2); font-size: .94rem; animation: fadeDown .45s var(--ease); }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

.cta-box { text-align: center; padding: 60px 40px; border-radius: var(--r-xl); border: 1px solid var(--card-border); position: relative; overflow: hidden;
  background: radial-gradient(ellipse at 50% 125%, rgba(255, 140, 0, .38), transparent 62%), rgba(255, 255, 255, .03); }
.cta-box h2 { font-size: clamp(1.6rem, 3.4vw, 2.6rem); margin: 14px 0 10px; }
.cta-box > p { color: var(--fg-2); max-width: 36em; margin: 0 auto; }
.cta-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 32px; }
.cta-card { padding: 22px 16px; display: grid; justify-items: center; gap: 4px; color: var(--fg); }
.cta-card:hover { transform: translateY(-6px); border-color: var(--accent); }
.cta-card svg { width: 30px; height: 30px; color: var(--accent); margin-bottom: 6px; }
.cta-card b { font-size: 1rem; } .cta-card span { font-size: .82rem; color: var(--fg-3); }
@media (max-width: 900px) { .cta-grid { grid-template-columns: 1fr 1fr; } .cta-box { padding: 40px 18px; } }
@media (max-width: 440px) { .cta-grid { grid-template-columns: 1fr; } }

.site-footer { position: relative; z-index: 2; overflow: clip; padding: 64px 0 0; color: #fff; background: linear-gradient(180deg, #0a0d15, #05070b); }
.site-footer .container { position: relative; z-index: 2; }
.footer-mark { position: absolute; z-index: 1; left: 50%; bottom: -.18em; transform: translateX(-50%); font-size: clamp(8rem, 24vw, 22rem); font-weight: 900; line-height: 1; letter-spacing: .04em; white-space: nowrap; direction: ltr;
  color: transparent; -webkit-text-stroke: 2px rgba(255, 154, 60, .2); user-select: none; pointer-events: none; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer-grid h4 { font-size: 1rem; margin-bottom: 14px; } .footer-grid p { color: #d3dae4; font-size: .9rem; margin-bottom: .6em; }
.footer-grid .hl { color: #ff9a3c; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-grid li a { color: #d3dae4; font-size: .9rem; transition: color .25s, padding .25s; } .footer-grid li a:hover { color: #ff9a3c; padding-inline-start: 6px; }
.footer-bottom { margin-top: 44px; padding: 20px 0 22px; border-top: 1px solid rgba(255, 255, 255, .12); text-align: center; font-size: .8rem; color: #b8c2d0; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
html.rm .ch-title .wi, html.rm .split .wi { transform: none !important; opacity: 1 !important; }
html.rm .ch-fade, html.rm .reveal, html.rm .stagger > * { opacity: 1 !important; translate: none !important; scale: none !important; }

/* ---------- projects ---------- */
.proj-grid { display: grid; grid-template-columns: 1.65fr 1fr; gap: 24px; align-items: stretch; }
.proj-card { overflow: hidden; display: flex; flex-direction: column; }
.proj-media { aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--r-lg) var(--r-lg) 0 0; }
.proj-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.proj-card:hover .proj-media img { transform: scale(1.04); }
.proj-body { padding: 24px 26px 26px; }
.proj-body h3 { font-size: 1.25rem; margin-bottom: .45em; }
.proj-body p { color: var(--fg-2); line-height: 1.95; }
.proj-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 16px; font-size: .86rem; color: var(--accent-text); }
.proj-meta span { display: inline-flex; align-items: center; gap: .4em; }
.proj-meta svg { width: 1.1em; height: 1.1em; }
.proj-cta { padding: 30px 28px; display: flex; flex-direction: column; gap: 14px; justify-content: center; }
.proj-cta h3 { font-size: 1.3rem; }
.proj-cta p { color: var(--fg-2); line-height: 1.95; }
.proj-cta .btn { justify-content: center; }
.proj-ico { width: 44px; height: 44px; color: var(--accent); }
@media (max-width: 900px) { .proj-grid { grid-template-columns: 1fr; } }
.proj-types { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 24px; }
.proj-type { overflow: hidden; display: flex; flex-direction: column; }
.proj-type img { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; border-radius: var(--r-lg) var(--r-lg) 0 0; }
.proj-type > div { padding: 18px 20px 22px; }
.proj-type h3 { font-size: 1.05rem; margin: .35em 0 .4em; }
.proj-type p { color: var(--fg-2); font-size: .92rem; line-height: 1.9; }
.proj-where { font-size: .8rem; color: var(--accent-text); }
@media (max-width: 1100px) { .proj-types { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .proj-types { grid-template-columns: 1fr; } }

/* ---- history ---- */
.hist-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 28px; }
.hist-fact { padding: 28px 24px; }
.hist-fact .no { font-size: 2.4rem; font-weight: 900; line-height: 1; margin-bottom: 10px; background: linear-gradient(135deg, #ffc46b, #ff7a1a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hist-fact h3 { font-size: 1.05rem; margin-bottom: .3em; } .hist-fact p { font-size: .9rem; color: var(--fg-2); }
.hist-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.hist-gen { overflow: hidden; padding: 0; }
.hist-gen img { display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.hist-gen .hg-body { padding: 18px 18px 22px; } .hist-gen .mono { font-size: .75rem; color: var(--accent); }
.hist-gen h3 { font-size: 1rem; margin: .25em 0 .3em; } .hist-gen p { font-size: .86rem; color: var(--fg-2); }
@media (max-width: 960px) { .hist-grid { grid-template-columns: 1fr 1fr; } .hist-facts { grid-template-columns: 1fr; } }
.hist-sub { font-size: 1.05rem; margin: 34px 0 14px; color: var(--fg-2); }
.hist-legacy .hist-gen img { aspect-ratio: 6/5; object-fit: cover; background: #f4f1ec; }
.hist-facts { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .hist-facts { grid-template-columns: 1fr 1fr; } }
