/* Daria Melnyk — apps site. No external fonts or scripts: nothing loads from third parties. */
:root {
  --bg: #08090b;
  --bg-raised: #111317;
  --line: rgba(255, 255, 255, .08);
  --text: #f4f4f6;
  --mute: #9a9ca6;
  --radius: 22px;
  --max: 1180px;
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* WattNow */
  --w-green: #3ddc84;
  --w-cyan: #19c9c3;
  --w-amber: #ffb020;
  --w-red: #ff5d5d;
  /* Readly */
  --r-green: #3ccf7f;
  --r-deep: #10241a;
  /* Heroes of Hire (palette from the app) */
  --h-abyss: #0f1226;
  --h-night: #161a33;
  --h-dusk: #22264a;
  --h-stone: #343a6b;
  --h-violet: #7555e8;
  --h-violet-light: #a38eff;
  --h-arcane: #6cb8ff;
  --h-gold: #e0b054;
  --h-mist: #a9aed0;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: min(var(--max), 100% - 40px); margin-inline: auto; }

/* ---------- Top bar ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px max(20px, calc((100% - var(--max)) / 2));
  background: linear-gradient(to bottom, rgba(8, 9, 11, .85), rgba(8, 9, 11, 0));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.brand { display: flex; gap: 10px; align-items: center; text-decoration: none; font-weight: 650; letter-spacing: -.01em; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: conic-gradient(from 200deg, var(--w-green), var(--w-cyan), var(--h-violet), var(--r-green), var(--w-green));
  color: #08090b; font-size: 14px; font-weight: 800;
}
.topnav { display: flex; gap: 6px; align-items: center; }
.topnav a { text-decoration: none; color: var(--mute); padding: 6px 10px; border-radius: 999px; font-size: 15px; transition: color .2s, background .2s; }
.topnav a:hover { color: var(--text); background: var(--line); }
.lang { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; margin-left: 8px; }
.lang button { background: none; border: 0; padding: 4px 10px; border-radius: 999px; cursor: pointer; color: var(--mute); font-size: 13px; font-weight: 600; }
.lang button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
@media (max-width: 720px) { .topnav a { display: none; } }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: grid; align-items: start; justify-items: center; padding: max(100px, 13vh) 0 calc(clamp(170px, 38vh, 440px) + 24px); }
.hero-inner { position: relative; text-align: center; z-index: 1; }
.eyebrow { color: var(--mute); font-size: 15px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; }
.hero h1 {
  font-size: clamp(44px, 8vw, 100px); line-height: .98; letter-spacing: -.045em; margin: 14px 0 18px; font-weight: 750;
}
.hero h1 .grad {
  background: linear-gradient(100deg, var(--w-green) 0%, var(--w-cyan) 30%, var(--h-violet-light) 62%, var(--h-gold) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lead { color: var(--mute); font-size: clamp(18px, 2.2vw, 22px); max-width: 640px; margin: 0 auto; }
.app-chips { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }
.app-chip {
  display: flex; gap: 10px; align-items: center; text-decoration: none;
  padding: 8px 16px 8px 8px; border-radius: 999px; background: rgba(12, 14, 24, .78); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, .12);
  transition: transform .25s, background .25s, border-color .25s;
}
.app-chip:hover { transform: translateY(-2px); background: rgba(24, 27, 40, .9); border-color: rgba(255, 255, 255, .18); }
.app-chip img, .app-chip .hoh-chip { width: 34px; height: 34px; border-radius: 9px; }
.hoh-chip { display: grid; place-items: center; background: var(--h-night); border: 1px solid var(--h-stone); }
.scroll-hint { position: absolute; bottom: 26px; left: 50%; translate: -50% 0; color: var(--mute); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; z-index: 1; }
@media (max-width: 720px), (max-height: 760px) { .scroll-hint { display: none; } }
.scroll-hint::after { content: ""; display: block; width: 1px; height: 36px; margin: 10px auto 0; background: linear-gradient(var(--mute), transparent); animation: drip 2s infinite; }
@keyframes drip { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------- Shared app section ---------- */
.app { position: relative; padding: 120px 0; overflow: hidden; }
.app-head { display: flex; gap: 18px; align-items: center; margin-bottom: 18px; }
.app-head img, .app-head .hoh-icon { width: 64px; height: 64px; border-radius: 16px; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }
.app-kicker { font-size: 14px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; }
.app h2 { font-size: clamp(38px, 6vw, 72px); letter-spacing: -.04em; line-height: 1; margin: 6px 0 0; font-weight: 750; }
.app .tagline { font-size: clamp(20px, 2.6vw, 28px); line-height: 1.3; letter-spacing: -.015em; max-width: 760px; margin: 22px 0 0; }
.app .tagline em { font-style: normal; }
.grid-2 { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; margin-top: 56px; }
@media (max-width: 920px) { .grid-2 { grid-template-columns: 1fr; } }
.features { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.features li { padding: 18px 20px; border-radius: 16px; background: rgba(12, 14, 22, .72); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--line); color: var(--mute); font-size: 15px; }
.features li b { display: block; color: var(--text); font-size: 16px; margin-bottom: 4px; font-weight: 620; }
.store-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 36px; align-items: center; }
.store {
  display: inline-flex; gap: 10px; align-items: center; text-decoration: none;
  padding: 10px 18px; border-radius: 14px; background: #fff; color: #000; font-weight: 600; font-size: 15px;
  transition: transform .2s;
}
.store:hover { transform: translateY(-2px); }
.store svg { width: 22px; height: 22px; }
.store.soon { background: transparent; color: var(--mute); border: 1px dashed rgba(255, 255, 255, .22); cursor: default; }
.store.soon:hover { transform: none; }
.text-link { color: var(--mute); font-size: 15px; text-decoration: none; border-bottom: 1px solid var(--line); }
.text-link:hover { color: var(--text); }

/* Phone frames */
.phones { position: relative; height: 620px; }
.phone {
  position: absolute; width: 270px; border-radius: 44px; padding: 10px; background: #1b1c20;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), 0 40px 80px rgba(0, 0, 0, .55);
  transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}
.phone img { border-radius: 34px; width: 100%; }
.phone.back { right: 0; top: 50px; transform: rotate(6deg) scale(.9); opacity: .85; }
.phone.front { left: 8%; top: 0; z-index: 2; }
.phones:hover .phone.back { transform: rotate(9deg) scale(.92) translateX(18px); }
.phones:hover .phone.front { transform: rotate(-2deg) translateX(-10px); }
.watch {
  position: absolute; z-index: 3; left: -6%; bottom: 10px; width: 150px; border-radius: 40px; padding: 9px; background: #1b1c20;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 30px 60px rgba(0, 0, 0, .6);
}
.watch img { border-radius: 32px; }
@media (max-width: 920px) {
  .phones { height: 560px; max-width: 420px; margin: 0 auto; width: 100%; }
  .phone { width: 230px; }
  .watch { left: 0; width: 120px; }
}
@media (max-width: 420px) { .phones { height: 480px; } .phone { width: 200px; } }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s, transform .9s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- WattNow ---------- */
#wattnow { background: none; }
#wattnow .app-kicker { color: var(--w-cyan); }
#wattnow .tagline em { color: var(--w-green); transition: color .6s; }
#wattnow.outage .tagline em { color: var(--w-amber); }

.energy {
  position: relative; border-radius: 28px; padding: 26px; background: linear-gradient(180deg, #0f1214, #0a0c0d);
  border: 1px solid var(--line); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}
.energy-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; font-weight: 650; font-size: 15px; background: rgba(61, 220, 132, .12); color: var(--w-green); transition: background .5s, color .5s; }
.status-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 12px currentColor; }
.outage .status-pill { background: rgba(255, 176, 32, .14); color: var(--w-amber); }
.grid-toggle {
  border: 0; cursor: pointer; padding: 11px 18px; border-radius: 14px; font-weight: 650; font-size: 15px;
  background: var(--text); color: var(--bg); display: inline-flex; gap: 8px; align-items: center;
  transition: transform .15s, background .3s;
}
.grid-toggle:hover { transform: translateY(-1px); }
.grid-toggle:active { transform: scale(.97); }
.outage .grid-toggle { background: var(--w-amber); }
.energy svg.flow { width: 100%; height: auto; display: block; margin: 18px 0 6px; overflow: visible; }
.flow .wire { fill: none; stroke: rgba(255, 255, 255, .08); stroke-width: 6; stroke-linecap: round; }
.flow .pulse { fill: none; stroke-width: 4; stroke-linecap: round; stroke-dasharray: 2 22; animation: flow 1s linear infinite; transition: opacity .5s, stroke .5s; }
.flow .pulse.grid { stroke: var(--w-green); }
.flow .pulse.home { stroke: var(--w-green); }
.outage .flow .pulse.grid { opacity: 0; }
.outage .flow .pulse.home { stroke: var(--w-amber); animation-duration: .7s; }
@keyframes flow { to { stroke-dashoffset: -24; } }
.flow .node-bg { fill: #15191c; stroke: rgba(255, 255, 255, .1); }
.flow .label { fill: var(--mute); font: 600 13px var(--font); text-anchor: middle; }
.flow .value { fill: var(--text); font: 650 15px var(--font); text-anchor: middle; }
.flow .value.pct { font-size: 26px; }
@media (max-width: 520px) {
  .flow .label { font-size: 20px; }
  .flow .value { font-size: 21px; }
  .flow .value.pct { font-size: 30px; }
}
.flow .pylon { stroke: var(--w-green); transition: stroke .5s; }
.outage .flow .pylon { stroke: #3a3d44; }
.flow .window { fill: #ffe9a8; transition: fill .4s, opacity .4s; }
.outage .flow .window { fill: var(--w-amber); }
.flow .bolt { fill: var(--w-amber); }
.flow .x-mark { stroke: var(--w-red); stroke-width: 3; stroke-linecap: round; opacity: 0; transition: opacity .4s; }
.outage .flow .x-mark { opacity: 1; }
.flow .ring-track { fill: none; stroke: rgba(255, 255, 255, .08); stroke-width: 7; }
.flow .ring { fill: none; stroke: url(#ringGrad); stroke-width: 7; stroke-linecap: round; transform: rotate(-90deg); transform-origin: center; transform-box: fill-box; transition: stroke-dashoffset .8s; }
.outage .flow .ring { stroke: var(--w-amber); }
.energy-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 8px; }
.energy-stats div { padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .035); }
.energy-stats dt { color: var(--mute); font-size: 13px; }
.energy-stats dd { margin: 2px 0 0; font-weight: 650; font-variant-numeric: tabular-nums; font-size: 18px; }
@media (max-width: 520px) { .energy-stats { grid-template-columns: 1fr 1fr; } .energy-stats div:last-child { grid-column: span 2; } }

/* iOS-style notification */
.toast {
  position: absolute; left: 50%; top: -24px; width: min(360px, calc(100% - 24px)); translate: -50% 0;
  display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 20px;
  background: rgba(40, 42, 48, .82); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .5); border: 1px solid rgba(255, 255, 255, .08);
  opacity: 0; transform: translateY(-14px) scale(.96); pointer-events: none;
  transition: opacity .35s, transform .45s cubic-bezier(.2, .8, .2, 1.2); z-index: 5;
}
.toast.show { opacity: 1; transform: none; }
.toast img { width: 38px; height: 38px; border-radius: 9px; }
.toast .t-head { display: flex; justify-content: space-between; color: var(--mute); font-size: 12px; }
.toast b { display: block; font-size: 15px; }
.toast span.t-body { font-size: 14px; color: #d8d9de; }

/* ---------- Readly ---------- */
#readly { background: none; }
#readly .app-kicker { color: var(--r-green); }
#readly .tagline em { color: var(--r-green); }
.planner {
  border-radius: 28px; padding: 26px; background: #121513; border: 1px solid var(--line);
}
.planner h3 { margin: 0 0 4px; font-size: 20px; letter-spacing: -.01em; }
.planner .hint { color: var(--mute); font-size: 14px; margin: 0 0 18px; }
.planner-inputs { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 10px; }
@media (max-width: 520px) { .planner-inputs { grid-template-columns: 1fr 1fr; } .planner-inputs label:last-child { grid-column: span 2; } }
.planner label { display: grid; gap: 6px; font-size: 13px; color: var(--mute); }
.planner input {
  width: 100%; padding: 12px 14px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .1); background: #0b0d0c; color: var(--text);
  font: 600 17px var(--font); font-variant-numeric: tabular-nums; color-scheme: dark;
}
.planner input:focus { outline: none; border-color: var(--r-green); box-shadow: 0 0 0 3px rgba(60, 207, 127, .2); }
.plan-summary { display: flex; gap: 18px; align-items: center; margin: 22px 0 16px; }
.plan-ring { width: 92px; height: 92px; flex: none; }
.plan-ring circle { fill: none; stroke-width: 9; }
.plan-ring .track { stroke: rgba(255, 255, 255, .08); }
.plan-ring .bar { stroke: var(--r-green); stroke-linecap: round; transform: rotate(-90deg); transform-origin: center; transition: stroke-dashoffset .6s; }
.plan-ring text { fill: var(--text); font: 700 18px var(--font); text-anchor: middle; dominant-baseline: central; }
.per-day { font-size: clamp(26px, 3.2vw, 34px); font-weight: 750; letter-spacing: -.03em; line-height: 1.1; }
.per-day small { display: block; color: var(--mute); font-size: 15px; font-weight: 500; letter-spacing: 0; margin-top: 4px; }
.plan-days { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 260px; overflow: auto; scrollbar-width: thin; }
.plan-days li {
  display: grid; grid-template-columns: 92px 1fr auto; gap: 10px; align-items: center;
  padding: 9px 12px; border-radius: 12px; background: rgba(255, 255, 255, .03); font-size: 15px;
  animation: rise .4s both;
}
.plan-days li.today { background: rgba(60, 207, 127, .13); }
.plan-days li.today .d { color: var(--r-green); font-weight: 650; }
.plan-days li .d { color: var(--mute); }
.plan-days li .p { font-variant-numeric: tabular-nums; }
.plan-days li .n { color: var(--mute); font-variant-numeric: tabular-nums; font-size: 14px; }
.plan-days li.finish .n { color: var(--r-green); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
.plan-note { color: var(--mute); font-size: 14px; margin-top: 12px; min-height: 1.4em; }
.streak { display: flex; gap: 5px; margin-top: 18px; }
.streak span { flex: 1; height: 26px; border-radius: 6px; background: rgba(60, 207, 127, .1); }
.streak span.on { background: var(--r-green); }
.streak span.on:nth-child(odd) { background: #2fae69; }

/* ---------- Heroes of Hire ---------- */
#heroes { background: none; }
#heroes .app-kicker { color: var(--h-violet-light); }
#heroes .tagline em { color: var(--h-gold); }
.hoh-icon { display: grid; place-items: center; background: var(--h-dusk); border: 1px solid var(--h-stone); }
.badge-dev { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; font-weight: 650; color: var(--h-gold); padding: 5px 11px; border-radius: 999px; border: 1px solid rgba(224, 176, 84, .4); background: rgba(224, 176, 84, .08); margin-left: 6px; vertical-align: middle; }
.realm { margin-top: 56px; }
.realm-map { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 8px; align-items: end; padding: 0 4px; }
@media (max-width: 820px) { .realm-map { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 22px; } }
.castle .c-name { text-align: center; overflow-wrap: anywhere; hyphens: auto; line-height: 1.25; min-height: 2.5em; }
@media (max-width: 820px) { .castle svg { max-width: 76px; } }
.castle {
  background: none; border: 0; padding: 0; cursor: pointer; display: grid; justify-items: center; gap: 8px;
  color: var(--h-mist); font-size: 12px; font-weight: 600; letter-spacing: .02em; transition: transform .25s, color .25s;
}
.castle svg { width: 100%; max-width: 92px; height: auto; overflow: visible; }
.castle .stone { fill: var(--h-dusk); stroke: var(--h-stone); stroke-width: 1.5; transition: fill .3s; }
.castle .roof { fill: var(--h-stone); transition: fill .3s; }
.castle .win { fill: var(--h-gold); }
.castle .flag { fill: var(--h-violet-light); transform-origin: left center; animation: wave 2.4s ease-in-out infinite; transform-box: fill-box; }
@keyframes wave { 50% { transform: skewY(-12deg) scaleX(.85); } }
.castle:hover, .castle[aria-pressed="true"] { transform: translateY(-6px); color: var(--h-gold); }
.castle[aria-pressed="true"] .stone { fill: var(--h-dusk); stroke: var(--h-gold); }
.castle[aria-pressed="true"] .roof { fill: var(--h-violet); }
.realm-ground { height: 2px; margin-top: 6px; background: linear-gradient(90deg, transparent, var(--h-stone), transparent); }

.quest { display: grid; grid-template-columns: 1fr .8fr; gap: 28px; margin-top: 40px; align-items: start; }
@media (max-width: 920px) { .quest { grid-template-columns: 1fr; } }
.card-flip { perspective: 1400px; }
.card-inner { position: relative; transition: transform .7s cubic-bezier(.3, .7, .2, 1); transform-style: preserve-3d; min-height: 330px; }
.card-flip.flipped .card-inner { transform: rotateY(180deg); }
.card-face {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: 24px; padding: 26px; background: linear-gradient(180deg, var(--h-dusk), var(--h-night));
  border: 1px solid var(--h-stone); display: flex; flex-direction: column; box-shadow: 0 30px 60px rgba(0, 0, 0, .35);
}
.card-face.back { transform: rotateY(180deg); background: linear-gradient(180deg, #262a54, var(--h-dusk)); }
.q-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.q-tag { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: rgba(163, 142, 255, .14); color: var(--h-violet-light); }
.q-tag.lvl { background: rgba(108, 184, 255, .14); color: var(--h-arcane); }
.q-text { font-size: clamp(19px, 2.2vw, 23px); line-height: 1.35; font-weight: 620; letter-spacing: -.01em; margin: 18px 0 auto; }
.q-answer { color: #dcdcf0; font-size: 15.5px; line-height: 1.6; overflow: auto; margin: 14px 0 auto; }
.q-answer code, .q-text code { font-family: var(--mono); font-size: .88em; background: rgba(255, 255, 255, .08); padding: 1px 5px; border-radius: 5px; }
.q-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.btn-hoh { border: 0; cursor: pointer; padding: 11px 18px; border-radius: 14px; font-weight: 650; font-size: 15px; background: var(--h-violet); color: #fff; transition: background .2s, transform .15s; }
.btn-hoh:hover { background: #6447d6; }
.btn-hoh:active { transform: scale(.97); }
.btn-hoh.ghost { background: transparent; border: 1px solid var(--h-stone); color: var(--h-mist); }
.btn-hoh.ghost:hover { border-color: var(--h-violet-light); color: #fff; background: transparent; }
.btn-hoh.gold { background: var(--h-gold); color: #1a1530; }
.hero-stats { border-radius: 24px; padding: 24px; background: rgba(15, 18, 38, .6); border: 1px solid var(--h-stone); }
.hero-stats h3 { margin: 0; font-size: 15px; color: var(--h-mist); font-weight: 600; }
.lvl-line { display: flex; justify-content: space-between; align-items: baseline; margin-top: 8px; }
.lvl-line b { font-size: 30px; letter-spacing: -.02em; }
.lvl-line span { color: var(--h-gold); font-weight: 700; font-variant-numeric: tabular-nums; }
.xp { height: 10px; border-radius: 99px; background: var(--h-dusk); overflow: hidden; margin: 12px 0 20px; }
.xp i { display: block; height: 100%; width: 35%; background: linear-gradient(90deg, var(--h-gold), #f3d08a); border-radius: 99px; transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.skill-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 14px; color: var(--h-mist); }
.skill-list li { display: grid; grid-template-columns: 110px 1fr; gap: 10px; align-items: center; }
.skill-list .bar { height: 6px; border-radius: 99px; background: var(--h-dusk); overflow: hidden; }
.skill-list .bar i { display: block; height: 100%; background: var(--h-arcane); border-radius: 99px; transition: width .8s; }
.xp-pop { position: absolute; font-weight: 800; color: var(--h-gold); pointer-events: none; animation: pop 1.1s forwards; font-size: 20px; text-shadow: 0 2px 12px rgba(224, 176, 84, .5); }
@keyframes pop { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-46px); } }
.tech { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 28px; }
.tech span { font-size: 13px; color: var(--h-mist); padding: 5px 11px; border-radius: 999px; border: 1px solid var(--h-stone); }

/* ---------- About + footer ---------- */
.about { padding: 120px 0 clamp(220px, 38vh, 440px); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
@media (max-width: 820px) { .about-grid { grid-template-columns: 1fr; } }
.about h2 { font-size: clamp(34px, 5vw, 56px); letter-spacing: -.04em; line-height: 1.02; margin: 0; }
.about p { color: var(--mute); font-size: 18px; }
.principles { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.principles li { padding: 18px 20px; border-radius: 16px; border: 1px solid var(--line); background: rgba(12, 14, 22, .78); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.principles b { display: block; font-size: 17px; }
.principles span { color: var(--mute); font-size: 15px; }
.contact-btn { display: inline-flex; margin-top: 18px; padding: 12px 20px; border-radius: 14px; background: var(--text); color: var(--bg); text-decoration: none; font-weight: 650; }
footer { border-top: 1px solid var(--line); padding: 36px 0 48px; color: var(--mute); font-size: 14px; }
.foot { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 28px; }
@media (max-width: 820px) { .foot { grid-template-columns: 1fr 1fr; } }
.foot h4 { color: var(--text); font-size: 14px; margin: 0 0 10px; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--text); }
.legal { margin-top: 30px; font-size: 13px; line-height: 1.6; }

/* ---------- Document pages (support, privacy) ---------- */
.doc { width: min(760px, 100% - 40px); margin: 0 auto; padding: 120px 0 80px; }
.doc h1 { font-size: clamp(34px, 5vw, 48px); letter-spacing: -.035em; line-height: 1.05; margin: 14px 0 8px; }
.doc h2 { font-size: 22px; margin: 38px 0 8px; letter-spacing: -.01em; }
.doc p, .doc li { color: #c9cad1; }
.doc .updated { color: var(--mute); font-size: 14px; }
.doc .doc-head { display: flex; gap: 14px; align-items: center; }
.doc .doc-head img { width: 52px; height: 52px; border-radius: 13px; }
.doc a { color: var(--text); }
.doc hr { border: 0; border-top: 1px solid var(--line); margin: 48px 0; }
.doc [lang="uk"][hidden], .doc [lang="en"][hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Story backdrop ---------- */
body { background: #05060b; }
main, footer { position: relative; z-index: 1; }
footer { background: rgba(5, 6, 11, .92); }
#scene { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
#scene .sky { position: absolute; inset: 0; background: linear-gradient(180deg, #161b40, #a5523f); }
#scene .dawn-glow { position: absolute; inset: auto 0 0 0; height: 70%; opacity: 0;
  background: radial-gradient(80% 70% at 50% 100%, rgba(255, 178, 102, .55), rgba(255, 120, 80, .15) 45%, transparent 70%); }
#scene canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
#scene .moon { position: absolute; width: 54px; height: 54px; border-radius: 50%; translate: -50% -50%;
  background: radial-gradient(circle at 38% 36%, #fffaf0, #e8e1cf 55%, #cfc6b0);
  box-shadow: 0 0 40px 8px rgba(255, 244, 214, .25), 0 0 120px 30px rgba(255, 244, 214, .08); }
#scene .city { position: absolute; left: 0; bottom: 0; width: 100%; height: clamp(170px, 38vh, 440px); overflow: hidden; }
#scene .win { opacity: .06; fill: #2a2f42; transition: opacity .5s, fill .5s; }
#scene .win.on { opacity: .92; fill: var(--c, #ffd98a); }
#scene .win.our { opacity: 1; transition: fill 1s; }
#scene .our-glow { opacity: .55; transition: fill 1s; animation: breathe 4s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .8; } }
#scene .beacon { fill: #ff4d4d; animation: blink 1.6s steps(1) infinite; }
@keyframes blink { 50% { opacity: .15; } }
#scene .ground-fade { position: absolute; inset: auto 0 0 0; height: 14vh; background: linear-gradient(transparent, rgba(5, 6, 11, .85)); }
@media (max-width: 720px) { #scene .city { height: 34vh; } .hero { padding-bottom: 34vh; } #scene .moon { width: 38px; height: 38px; } }

/* Chapter header: the time of the story */
.chapter { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; flex-wrap: wrap; }
.hero .chapter { justify-content: center; margin-bottom: 22px; }
.clock {
  font: 700 15px var(--mono); letter-spacing: .08em; padding: 6px 12px; border-radius: 10px;
  color: #ffe2a6; background: rgba(255, 217, 138, .08); border: 1px solid rgba(255, 217, 138, .25);
  text-shadow: 0 0 12px rgba(255, 217, 138, .6);
}
#wattnow .clock { color: var(--w-amber); border-color: rgba(255, 176, 32, .35); background: rgba(255, 176, 32, .08); }
#readly .clock { color: var(--r-green); border-color: rgba(60, 207, 127, .35); background: rgba(60, 207, 127, .08); text-shadow: 0 0 12px rgba(60, 207, 127, .5); }
#heroes .clock { color: var(--h-violet-light); border-color: rgba(163, 142, 255, .35); background: rgba(163, 142, 255, .08); text-shadow: 0 0 12px rgba(163, 142, 255, .5); }
.story { color: #c9cbd6; font-size: 17px; font-style: italic; }
.tagline, .hero p.lead, .story { text-shadow: 0 2px 18px rgba(0, 0, 0, .55); }

/* Our flat and the skyline details */
#scene .person { opacity: 0; transition: opacity .8s; }
#scene.someone-home .person { opacity: 1; }
#scene .pose { opacity: 0; transition: opacity .6s; }
#scene .pose.on { opacity: 1; }
#scene .motherland { fill: #232a4a; }
#scene .motherland .rim { stroke: rgba(220, 228, 255, .45); stroke-width: 1.4; }
#scene .bridge g { stroke: #2c3456; }
#scene .bridge path:nth-child(2) { fill: #222947; }
#scene .lavra .gold { fill: #b8913f; }
#scene .bridge path:first-child { fill: none; }

/* Sound toggle */
.sound-btn { display: grid; place-items: center; width: 34px; height: 34px; margin-left: 6px; border-radius: 999px; border: 1px solid var(--line); background: none; color: var(--mute); cursor: pointer; transition: color .2s, border-color .2s; }
.sound-btn:hover { color: var(--text); border-color: rgba(255, 255, 255, .2); }
.sound-btn[aria-pressed="true"] { color: var(--w-amber); border-color: rgba(255, 176, 32, .4); }
.sound-btn .on-icon { display: none; }
.sound-btn[aria-pressed="true"] .on-icon { display: block; }
.sound-btn[aria-pressed="true"] .off-icon { display: none; }

/* Hero text stays readable even where it meets the lit windows */
.hero-inner::before { content: ""; position: absolute; inset: -40px 0; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(6, 7, 14, .55), transparent); }

/* Short windows (laptops with the browser not maximised): a compact first screen above the city */
@media (max-height: 760px) and (min-width: 721px) {
  .hero { padding-top: 76px; }
  .hero .chapter { margin-bottom: 10px; }
  .hero .eyebrow { display: none; }
  .hero h1 { font-size: clamp(36px, 9.5vh, 84px); margin: 6px 0 12px; }
  .hero p.lead { font-size: 17px; max-width: 760px; }
  .app-chips { margin-top: 16px; }
  .app-chip img, .app-chip .hoh-chip { width: 28px; height: 28px; }
  .app-chip { padding: 6px 14px 6px 6px; font-size: 15px; }
  #scene .city { height: clamp(150px, 36vh, 440px); }
  .hero { padding-bottom: calc(clamp(150px, 36vh, 440px) + 16px); }
}
@media (max-height: 540px) and (min-width: 721px) {
  .hero p.lead { display: none; }
  #scene .city { height: 44vh; }
  .hero { padding-bottom: calc(44vh + 12px); }
}

/* Narrow screens: the top bar must fit next to the language and sound buttons */
@media (max-width: 720px) {
  .topbar { padding-inline: 14px; gap: 8px; }
  .brand { font-size: 15px; gap: 8px; min-width: 0; }
  .brand span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topnav { gap: 4px; flex: none; }
  .lang { margin-left: 0; }
  .lang button { padding: 4px 8px; }
  .sound-btn { margin-left: 2px; width: 32px; height: 32px; }
}
@media (max-width: 720px) {
  .hero { padding-top: 84px; }
  .hero .eyebrow { display: none; }
  .hero .chapter { margin-bottom: 8px; }
  .hero h1 { margin: 8px 0 14px; }
  .hero p.lead { font-size: 16px; }
  .app-chips { margin-top: 20px; gap: 8px; }
  .app-chip { padding: 5px 12px 5px 5px; font-size: 15px; }
  .app-chip img, .app-chip .hoh-chip { width: 28px; height: 28px; }
}
