/* Mercury Project homepage — shared by /index.html (cs) and /en/index.html (en).
   nginx serves .css with a 1-year immutable cache: bump the ?v= query in both
   HTML files whenever this file changes. Images and fonts under /home/ are
   treated as immutable: give a changed file a new name. */

/* DM Sans (SIL OFL, see fonts/OFL.txt), self-hosted so no visitor data goes to a font CDN */
@font-face {
  font-family: 'DM Sans'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('fonts/dm-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'DM Sans'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('fonts/dm-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #08080d;
  --bg-card: #101018;
  --bg-soft: rgba(255,255,255,0.03);
  --text: #e8e6e3;
  --text-secondary: #a3a3ab;
  --text-tertiary: #84848f;
  --border: #1c1c29;
  --border-strong: #2a2a3a;
  --nav-bg: rgba(8,8,13,0.72);
  --mercury: #c0c0c0;
  --mercury-glow: rgba(192,192,192,0.15);
  --shadow: 0 16px 34px rgba(0,0,0,0.18);

  /* Five star colours — the logo, the services and the particles share them */
  --star-1: #6c9bff;
  --star-2: #50d8b5;
  --star-3: #f0a050;
  --star-4: #c084fc;
  --star-5: #f472b6;
  --star-1-glow: rgba(108,155,255,0.12);
  --star-2-glow: rgba(80,216,181,0.12);
  --star-3-glow: rgba(240,160,80,0.12);
  --star-4-glow: rgba(192,132,252,0.12);
  --star-5-glow: rgba(244,114,182,0.12);

  --mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, Consolas, 'Liberation Mono', monospace;
  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 28px);
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #fafaf9;
  --bg-card: #ffffff;
  --bg-soft: rgba(28,25,23,0.03);
  --text: #1c1917;
  --text-secondary: #57534e;
  --text-tertiary: #6f6862;
  --border: #e7e5e4;
  --border-strong: #d6d3d1;
  --nav-bg: rgba(250,250,249,0.94);
  --mercury: #78716c;
  --mercury-glow: rgba(120,113,108,0.12);
  --shadow: 0 14px 30px rgba(28,25,23,0.07);

  --star-1: #3b6fd9;
  --star-2: #2ba886;
  --star-3: #c07830;
  --star-4: #9055d0;
  --star-5: #d04888;
  --star-1-glow: rgba(59,111,217,0.08);
  --star-2-glow: rgba(43,168,134,0.08);
  --star-3-glow: rgba(192,120,48,0.08);
  --star-4-glow: rgba(144,85,208,0.08);
  --star-5-glow: rgba(208,72,136,0.08);
  --focus: #1f8a6d;
  color-scheme: light;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  font-size: 17px;
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.5s ease, color 0.4s ease;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--focus, var(--star-2));
  outline-offset: 3px;
  border-radius: 6px;
}

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

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 300;
  padding: 0.5rem 0.9rem; border-radius: 999px;
  background: var(--bg-card); border: 1px solid var(--border-strong);
  text-decoration: none; font-size: 0.85rem;
}
.skip-link:focus { top: 0.75rem; }

#mercury-canvas, #droplet-canvas {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}
#mercury-canvas { z-index: 0; }
#mercury-canvas.fx-front { z-index: 58; } /* warp / constellation play over every section, Labs included */
#droplet-canvas { z-index: 60; }

.page { position: relative; z-index: 1; }
.page.barrel-roll { animation: barrelRoll 1.4s cubic-bezier(.5,0,.3,1); transform-origin: 50% 40vh; }
@keyframes barrelRoll { from { transform: rotate(0); } to { transform: rotate(360deg); } }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.mono {
  font-family: var(--mono);
}

/* ============ Navigation ============ */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--border);
  transition: background 0.5s ease, border-color 0.4s ease;
}
.nav-inner {
  display: flex; align-items: center; gap: 1rem;
  height: 60px;
}
.nav-brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  text-decoration: none; font-weight: 600; letter-spacing: -0.02em;
  font-size: 0.95rem; white-space: nowrap;
}
.nav-brand svg { width: 26px; height: 26px; transition: transform 0.5s ease; }
.nav-brand:hover svg { transform: rotate(36deg); }
.nav-links {
  display: flex; gap: 1.35rem; margin-left: auto;
  list-style: none;
}
.nav-links a {
  text-decoration: none; color: var(--text-secondary);
  font-size: 0.86rem; font-weight: 500;
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-tools { display: flex; align-items: center; gap: 0.55rem; }
.nav-links + .nav-tools { margin-left: 0.6rem; }

.labs-pill {
  position: relative;
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.38rem 0.8rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.02em;
  color: var(--text);
  background:
    linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
    linear-gradient(120deg, var(--star-1), var(--star-2), var(--star-3), var(--star-4), var(--star-5)) border-box;
  border: 1.5px solid transparent;
  box-shadow: 0 0 18px rgba(192,132,252,0.18);
  white-space: nowrap;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.labs-pill:hover { transform: translateY(-1px); box-shadow: 0 0 26px rgba(192,132,252,0.32); }
.labs-pill .spark { color: var(--star-4); }
.labs-pill .egg-count {
  font-family: var(--mono);
  font-size: 0.68rem; font-weight: 500;
  color: var(--text-secondary);
  padding: 0.05rem 0.4rem; border-radius: 999px;
  background: var(--bg-soft);
}

.lang-switch {
  display: inline-flex; border: 1px solid var(--border); border-radius: 999px;
  overflow: hidden;
  font-family: var(--mono); font-size: 0.7rem; font-weight: 500;
}
.lang-switch a, .lang-switch span {
  padding: 0.32rem 0.6rem; text-decoration: none; color: var(--text-secondary);
  letter-spacing: 0.06em;
}
.lang-switch a:hover { color: var(--text); }
.lang-switch a:focus-visible { outline-offset: -3px; border-radius: 999px; }
.lang-switch [aria-current] { color: var(--text); background: var(--bg-soft); }

.theme-toggle {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: border-color 0.3s ease, transform 0.3s ease;
}
.theme-toggle:hover { border-color: var(--text-tertiary); transform: scale(1.06); }
.theme-toggle svg {
  width: 17px; height: 17px;
  fill: none; stroke: var(--text-secondary);
  stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}
.theme-toggle .sun-icon { display: none; }
[data-theme="light"] .theme-toggle .sun-icon { display: block; }
[data-theme="light"] .theme-toggle .moon-icon { display: none; }

/* ============ Hero ============ */
.hero {
  position: relative;
  padding: clamp(3.5rem, 9vw, 6.5rem) 0 3.2rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.hero::before {
  content: '';
  position: absolute; left: 50%; top: 0;
  width: min(900px, 100%); height: 520px;
  transform: translateX(-50%);
  background:
    radial-gradient(closest-side, rgba(108,155,255,0.10), transparent 70%),
    radial-gradient(closest-side at 70% 40%, rgba(192,132,252,0.08), transparent 70%);
  pointer-events: none; z-index: -1;
}
.logo-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 84px; height: 84px;
  margin-bottom: 1.4rem;
  cursor: pointer; position: relative;
  user-select: none; -webkit-user-select: none;
  -webkit-touch-callout: none;
  border-radius: 50%;
}
.logo-mark svg { width: 72px; height: 72px; transition: transform 0.5s ease, filter 0.5s ease; }
.logo-mark:hover svg {
  filter: drop-shadow(0 0 16px rgba(192,192,192,0.45));
  transform: scale(1.08) rotate(12deg);
}
.logo-mark::after {
  content: ''; position: absolute; inset: -2px;
  border-radius: 50%; border: 1px solid var(--mercury);
  opacity: 0; animation: logoPulse 3.5s ease-in-out 4s infinite;
}
@keyframes logoPulse {
  0%, 100% { opacity: 0; transform: scale(1); }
  50% { opacity: 0.22; transform: scale(1.2); }
}

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text-secondary);
  font-family: var(--mono);
  font-size: 0.68rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: 1.1rem;
}
.hero h1 {
  max-width: 900px;
  margin: 0 auto 0.9rem;
  font-size: clamp(2.1rem, 5.6vw, 4rem); font-weight: 700;
  line-height: 1.05; letter-spacing: -0.045em;
  text-wrap: balance;
}
.hero .subtitle {
  max-width: 760px; margin: 0 auto;
  color: var(--text-secondary);
  font-size: clamp(1rem, 2vw, 1.15rem); line-height: 1.65;
}
.hero-actions {
  display: flex; justify-content: center; gap: 0.8rem; flex-wrap: wrap;
  margin-top: 1.6rem;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  min-width: 210px;
  padding: 0.82rem 1.2rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600; font-size: 0.92rem;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.btn-primary {
  color: #071014;
  background: linear-gradient(135deg, #7dd3fc, #50d8b5);
  border-color: rgba(80,216,181,0.25);
  box-shadow: 0 14px 28px rgba(80,216,181,0.16);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 18px 34px rgba(80,216,181,0.24); }
.btn-secondary { color: var(--text); background: var(--bg-soft); }
.btn-secondary:hover { border-color: var(--text-tertiary); transform: translateY(-1px); }

.proof-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.95rem; margin-top: 2.4rem;
  text-align: left;
}
.proof-item {
  display: flex; flex-direction: column;
  padding: 1rem 1.05rem;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
  border-radius: 1.1rem;
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
a.proof-item:hover { border-color: var(--star-1); transform: translateY(-2px); }
.proof-value { font-size: 1.12rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 0.25rem; line-height: 1.3; }
.proof-label { color: var(--text-secondary); font-size: 0.82rem; line-height: 1.55; }
.proof-apps { display: flex; gap: 0.35rem; margin-bottom: 0.45rem; }
.proof-apps img { width: 28px; height: 28px; border-radius: 7px; }

.labs-ribbon {
  display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.3rem 0.6rem;
  margin-bottom: 1.6rem;
  padding: 0.4rem 0.5rem 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  font-size: 0.8rem; color: var(--text-secondary);
}
.labs-ribbon .ribbon-label { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--star-4); }
.labs-ribbon a {
  text-decoration: none; font-weight: 600; color: var(--text);
  padding: 0.2rem 0.65rem; border-radius: 999px; border: 1px solid var(--border);
  background: var(--bg-card);
  transition: border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.labs-ribbon a.kids:hover { border-color: var(--star-2); color: var(--star-2); box-shadow: 0 0 14px var(--star-2-glow); }
.labs-ribbon a.squadron:hover { border-color: var(--star-5); color: var(--star-5); box-shadow: 0 0 14px var(--star-5-glow); }
.labs-ribbon a.planets:hover { border-color: var(--star-4); color: var(--star-4); box-shadow: 0 0 14px var(--star-4-glow); }
[data-theme="light"] .labs-ribbon .ribbon-label { color: #7440b8; }
[data-theme="light"] .labs-ribbon a.kids:hover { color: #17775d; border-color: #17775d; }
[data-theme="light"] .labs-ribbon a.squadron:hover { color: #b03a72; border-color: #b03a72; }
[data-theme="light"] .labs-ribbon a.planets:hover { color: #7440b8; border-color: #7440b8; }
.labs-ribbon .egg-count { font-family: var(--mono); font-size: 0.7rem; color: var(--text-tertiary); margin-left: 0.2rem; }

.apps-strip {
  display: flex; align-items: center; gap: 1rem;
  margin-top: 0.95rem;
  padding: 0.85rem 1.1rem;
  border-radius: 1.1rem;
  border: 1px solid var(--border);
  background:
    radial-gradient(circle at 0% 50%, rgba(80,216,181,0.10), transparent 40%),
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
  text-decoration: none; text-align: left;
  box-shadow: var(--shadow);
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.apps-strip:hover { border-color: var(--star-2); transform: translateY(-2px); }
.apps-strip .icons { display: flex; flex-shrink: 0; }
.apps-strip .icons img { width: 40px; height: 40px; border-radius: 10px; border: 2px solid var(--bg); margin-left: -10px; }
.apps-strip .icons img:first-child { margin-left: 0; }
.apps-strip strong { display: block; font-size: 1.05rem; letter-spacing: -0.02em; }
.apps-strip span { display: block; color: var(--text-secondary); font-size: 0.84rem; line-height: 1.5; }
.apps-strip .arrow { margin-left: auto; font-size: 1.2rem; color: var(--text-tertiary); transition: transform 0.25s ease; }
.apps-strip:hover .arrow { transform: translateX(4px); color: var(--star-2); }

/* ============ Sections ============ */
.section {
  padding: clamp(3rem, 7vw, 4.75rem) 0;
  border-bottom: 1px solid var(--border);
}
.section-label {
  font-family: var(--mono); letter-spacing: 0.14em;
  font-size: 0.7rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--text-tertiary);
  margin-bottom: 0.7rem;
}
.section h2 {
  font-size: clamp(1.6rem, 3.6vw, 2.4rem);
  line-height: 1.12; letter-spacing: -0.035em;
  margin-bottom: 0.8rem;
  max-width: 820px;
  text-wrap: balance;
}
.section-intro {
  max-width: 760px;
  margin-bottom: 2rem;
  color: var(--text-secondary);
  font-size: 1rem; line-height: 1.7;
}

/* ============ Services ============ */
.services {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
}
.service-item {
  padding: 1.35rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--c, var(--star-1));
  border-radius: 0.4rem 1rem 1rem 0.4rem;
  position: relative; overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
.service-item::before {
  content: ''; position: absolute; inset: 0 auto 0 0; width: 0;
  background: linear-gradient(90deg, var(--g, var(--star-1-glow)), transparent);
  transition: width 0.5s ease;
}
.service-item:hover::before { width: 100%; }
.service-item:hover { transform: translateY(-2px); box-shadow: 0 0 26px var(--g); border-color: var(--c); }
.service-item[data-color="1"] { --c: var(--star-1); --g: var(--star-1-glow); }
.service-item[data-color="2"] { --c: var(--star-2); --g: var(--star-2-glow); }
.service-item[data-color="3"] { --c: var(--star-3); --g: var(--star-3-glow); }
.service-item[data-color="4"] { --c: var(--star-4); --g: var(--star-4-glow); }
.service-item h3 {
  font-size: 1.02rem; font-weight: 600; letter-spacing: -0.015em;
  margin-bottom: 0.45rem; position: relative;
}
.service-item h3 .dot { color: var(--c); margin-right: 0.35rem; }
.service-item p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.6; position: relative; }

.focus-area {
  margin-top: 1.25rem;
  padding: 1.2rem 1.5rem;
  background: var(--star-5-glow);
  border-left: 3px solid var(--star-5);
  border-radius: 0.4rem 1rem 1rem 0.4rem;
}
.focus-area p { font-size: 0.92rem; color: var(--text-secondary); line-height: 1.6; }
.focus-area strong { color: var(--text); font-weight: 500; }

/* ============ Apps ============ */
.value-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: -0.8rem 0 2.6rem; }
.value-chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.35rem 0.8rem; border-radius: 999px;
  border: 1px solid var(--border); background: var(--bg-soft);
  font-size: 0.8rem; font-weight: 500; color: var(--text-secondary);
}
.value-chip::before { content: '✓'; color: var(--star-2); font-weight: 700; }

.app-list { display: grid; gap: clamp(2.5rem, 6vw, 4.5rem); }
.app-row {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 5vw, 4.5rem);
  align-items: center;
}
.app-row:nth-child(even) .app-media { order: 2; }

.app-media {
  position: relative;
  min-height: 470px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 2rem;
  border: 1px solid var(--border);
  background:
    radial-gradient(60% 60% at 50% 45%, var(--app-glow), transparent 72%),
    linear-gradient(160deg, var(--app-bg-1), var(--app-bg-2));
  overflow: hidden;
  isolation: isolate;
}
.app-media::after {
  /* faint star dust */
  content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0.55;
  background-image:
    radial-gradient(1px 1px at 12% 18%, #fff, transparent),
    radial-gradient(1px 1px at 78% 12%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 88% 64%, #fff, transparent),
    radial-gradient(1px 1px at 22% 82%, #fff, transparent),
    radial-gradient(1px 1px at 52% 8%, #fff, transparent),
    radial-gradient(1px 1px at 6% 52%, #fff, transparent);
}
.phone {
  position: relative;
  width: 205px;
  border-radius: 34px;
  padding: 7px;
  background: #0b0b10;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.14),
    0 30px 60px rgba(0,0,0,0.45),
    0 0 50px var(--app-glow);
}
.phone img { width: 100%; height: auto; border-radius: 27px; }
.phone.back {
  position: absolute;
  width: 175px;
  transform: translate(-58%, 4%) rotate(-9deg);
  opacity: 0.9;
  filter: saturate(0.9) brightness(0.85);
}
.phone.front { transform: translate(28%, 0) rotate(3deg); z-index: 1; }
.app-row:hover .phone.front { transform: translate(28%, -6px) rotate(2deg); }
.phone.front, .phone.back { transition: transform 0.6s cubic-bezier(.2,.8,.2,1); }

.app-copy .app-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.app-icon {
  width: 76px; height: 76px; border-radius: 18px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.25), 0 0 0 1px rgba(255,255,255,0.08);
}
.app-copy h3 { font-size: clamp(1.6rem, 3vw, 2.1rem); line-height: 1.1; letter-spacing: -0.035em; }
.app-sub {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--app-accent-text, var(--text-tertiary));
  margin-top: 0.25rem;
}
.app-tagline { font-size: 1.08rem; line-height: 1.6; margin-bottom: 1rem; }
.app-facts { list-style: none; display: grid; gap: 0.55rem; margin-bottom: 1.2rem; }
.app-facts li {
  position: relative; padding-left: 1.5rem;
  color: var(--text-secondary); font-size: 0.92rem; line-height: 1.55;
}
.app-facts li::before {
  content: ''; position: absolute; left: 0.1rem; top: 0.55em;
  width: 0.55rem; height: 0.55rem; border-radius: 50%;
  background: var(--app-accent);
  box-shadow: 0 0 10px var(--app-accent);
}
.app-facts strong { color: var(--text); font-weight: 600; }
.app-meta {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.04em;
  color: var(--text-tertiary); margin-bottom: 1.2rem;
}
.app-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 0.6rem 1.2rem; }
.store-badge { display: inline-block; line-height: 0; border-radius: 10px; transition: transform 0.2s ease; }
.store-badge:hover { transform: translateY(-2px); }
.store-badge img { width: 150px; height: 50px; }
.text-link {
  text-decoration: none; font-size: 0.9rem; font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 1px;
  transition: border-color 0.2s ease;
}
.text-link:hover { border-color: var(--text); }

.app-row[data-app="movestory"] {
  --app-accent: #ff8fb1; --app-accent-text: #6fc27a;
  --app-glow: rgba(255,170,120,0.28);
  --app-bg-1: #10301b; --app-bg-2: #3f7a35;
}
.app-row[data-app="luckyroll"] {
  --app-accent: #e2b04a; --app-accent-text: #d6a042;
  --app-glow: rgba(255,230,190,0.22);
  --app-bg-1: #2b1a0e; --app-bg-2: #6b4424;
}
.app-row[data-app="carstory"] {
  --app-accent: #ef3b2f; --app-accent-text: #e2554b;
  --app-glow: rgba(255,80,60,0.24);
  --app-bg-1: #14161c; --app-bg-2: #3a2a24;
}
[data-theme="light"] .app-row[data-app="movestory"] { --app-accent-text: #2f7a3a; }
[data-theme="light"] .app-row[data-app="luckyroll"] { --app-accent-text: #8a5a18; }
[data-theme="light"] .app-row[data-app="carstory"] { --app-accent-text: #b8281e; }
.app-row[data-app="macometr"] {
  --app-accent: #34c759; --app-accent-text: #4fd27a;
  --app-glow: rgba(52,199,89,0.22);
  --app-bg-1: #0b1220; --app-bg-2: #0f3b3a;
}
[data-theme="light"] .app-row[data-app="macometr"] { --app-accent-text: #1f7a3a; }

/* Mac apps: menu bar + panel crops, laid out like the phone pair */
.screen {
  position: relative; width: 250px;
  border-radius: 16px; overflow: hidden; line-height: 0;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.14), 0 30px 60px rgba(0,0,0,0.45), 0 0 50px var(--app-glow);
}
.screen img { width: 100%; height: auto; }
.screen.back {
  position: absolute; width: 200px;
  transform: translate(-48%, 4%) rotate(-7deg);
  opacity: 0.9; filter: saturate(0.9) brightness(0.85);
}
.screen.front { transform: translate(24%, 0) rotate(2deg); z-index: 1; }
.app-row:hover .screen.front { transform: translate(24%, -6px) rotate(1.5deg); }
.screen.front, .screen.back { transition: transform 0.6s cubic-bezier(.2,.8,.2,1); }
@media (max-width: 560px) {
  .screen { width: 196px; border-radius: 13px; }
  .screen.back { width: 160px; }
  .apps-strip .icons img { width: 32px; height: 32px; border-radius: 8px; }
}
.store-soon {
  display: inline-flex; align-items: center; min-height: 50px; padding: 0 1.1rem;
  border-radius: 10px; border: 1px dashed var(--border-strong);
  color: var(--text-secondary); font-size: 0.85rem; font-weight: 600;
}

/* ============ Work / range ============ */
.case-grid, .range-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
}
.range-grid { margin-top: 1.1rem; }
.case-card, .range-card {
  padding: 1.35rem;
  border-radius: 1.2rem;
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: var(--shadow);
}
.case-card { background: radial-gradient(circle at top right, var(--k, var(--star-1-glow)), transparent 40%), var(--bg-card); }
.case-card:nth-child(2) { --k: var(--star-2-glow); }
.case-card:nth-child(3) { --k: var(--star-3-glow); }
.range-card { background: var(--bg-soft); box-shadow: none; }
.case-kicker, .range-step {
  display: inline-flex;
  font-family: var(--mono);
  font-size: 0.66rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--text-tertiary);
  margin-bottom: 0.65rem;
}
.range-step { padding: 0.18rem 0.55rem; border-radius: 999px; background: var(--bg-soft); color: var(--text-secondary); letter-spacing: 0.08em; }
.case-card h3, .range-card h4 { font-size: 1.02rem; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 0.5rem; line-height: 1.35; }
.case-card p, .range-card p { color: var(--text-secondary); font-size: 0.87rem; line-height: 1.6; }
.case-tags { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 1rem; }
.case-tag {
  padding: 0.26rem 0.55rem; border-radius: 999px;
  border: 1px solid var(--border); background: var(--bg-soft);
  color: var(--text-secondary); font-size: 0.68rem; font-weight: 500;
}
.subhead {
  font-family: var(--mono);
  font-size: 0.7rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--text-tertiary);
  margin: 2.6rem 0 0.4rem;
}

/* ============ ActaIntel (platform we develop) ============ */
.section h2 + .app-meta { margin: -0.2rem 0 1.1rem; }
/* .info-grid (contact) is declared later with a wide gap; the double class wins regardless of order */
.info-grid.spec-grid {
  gap: 1px; margin-top: 0.9rem;
  background: var(--border);
  border: 1px solid var(--border); border-radius: 1.2rem;
  overflow: hidden;
}
.spec-grid .info-block { background: var(--bg-card); padding: 1rem 1.15rem 1.1rem; }
.spec-grid .info-block dd { color: var(--text-secondary); font-size: 0.87rem; line-height: 1.6; }
#actaintel .focus-area { background: var(--star-4-glow); border-left-color: var(--star-4); }
#actaintel .app-actions { margin-top: 1.3rem; }
.focus-area .text-link { font-size: inherit; border-bottom-color: var(--text-tertiary); }
.focus-area .text-link:hover { border-bottom-color: var(--text); }

/* ============ About ============ */
.about-text { max-width: 820px; font-size: 1rem; color: var(--text-secondary); line-height: 1.8; }
.about-text p + p { margin-top: 1rem; }
.about-text strong { color: var(--text); font-weight: 500; }
.year-link {
  font: inherit; font-weight: 500; color: var(--text);
  background: none; border: 0; padding: 0;
  cursor: pointer;
  border-bottom: 1px dashed var(--star-3);
  position: relative;
}
.year-link::after { content: ' ✦'; content: ' ✦' / ''; color: var(--star-3); font-size: 0.75em; }
.year-link:hover { border-bottom-style: solid; text-shadow: 0 0 10px var(--star-3-glow); }

/* ============ CTA + contact ============ */
.cta-band {
  display: flex; justify-content: space-between; align-items: center; gap: 1.4rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: 1.4rem;
  border: 1px solid rgba(80,216,181,0.2);
  background:
    radial-gradient(circle at right top, rgba(80,216,181,0.13), transparent 40%),
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
  box-shadow: var(--shadow);
  margin-bottom: 2.6rem;
}
.cta-band h2 { margin-bottom: 0.45rem; font-size: clamp(1.3rem, 3vw, 1.85rem); }
.cta-band p { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.65; max-width: 580px; }
.cta-actions { display: flex; gap: 0.7rem; flex-wrap: wrap; flex-shrink: 0; }

.info-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem 2rem;
}
.info-block dt {
  font-family: var(--mono);
  font-size: 0.7rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-tertiary); margin-bottom: 0.3rem;
}
.info-block dd { font-size: 0.95rem; }
.info-block a { text-decoration: none; border-bottom: 1px solid var(--border-strong); }
.info-block a:hover { border-color: var(--text); }

/* ============ Mercury Labs (always night sky, in both themes) ============ */
.labs {
  --l-text: #efeef8;
  --l-text-2: #b4b2cc;
  --l-text-3: #8f8cab;
  --l-border: rgba(255,255,255,0.1);
  --l-card: rgba(18,16,34,0.72);
  position: relative;
  color: var(--l-text);
  background:
    radial-gradient(60% 50% at 15% 10%, rgba(108,155,255,0.20), transparent 70%),
    radial-gradient(50% 45% at 85% 30%, rgba(192,132,252,0.22), transparent 70%),
    radial-gradient(60% 50% at 50% 100%, rgba(244,114,182,0.14), transparent 70%),
    #05050c;
  padding: clamp(4rem, 10vw, 7rem) 0 clamp(4rem, 9vw, 6rem);
  overflow: hidden;
  isolation: isolate;
  --focus: #50d8b5;
  color-scheme: dark;
}
.labs::before {
  content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0.8;
  background-image:
    radial-gradient(1px 1px at 4% 12%, #fff, transparent),
    radial-gradient(1px 1px at 14% 64%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 23% 30%, #cfe0ff, transparent),
    radial-gradient(1px 1px at 33% 86%, #fff, transparent),
    radial-gradient(1px 1px at 41% 8%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 57% 52%, #ffe7f2, transparent),
    radial-gradient(1px 1px at 66% 18%, #fff, transparent),
    radial-gradient(1px 1px at 74% 76%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 86% 40%, #e9ddff, transparent),
    radial-gradient(1px 1px at 93% 90%, #fff, transparent),
    radial-gradient(1px 1px at 97% 6%, #fff, transparent);
  background-size: 640px 640px;
}
.labs::after {
  /* soft hand-off from the page above */
  content: ''; position: absolute; inset: 0 0 auto 0; height: 120px; z-index: -1;
  background: linear-gradient(var(--bg), transparent);
  opacity: 0.6;
}
/* In light mode Labs is a rounded window into the night sky rather than a fade */
[data-theme="light"] .labs { margin: 0 clamp(8px, 1.5vw, 18px) clamp(8px, 1.5vw, 18px); border-radius: clamp(1.4rem, 3vw, 2.4rem); }
[data-theme="light"] .labs::after { display: none; }
.labs .section-label { color: var(--l-text-3); }
.labs-head { max-width: 860px; margin-bottom: 3rem; }
.labs-kicker {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--l-text-2);
  margin-bottom: 1rem;
}
.labs-kicker svg { width: 20px; height: 20px; }
.labs h2 {
  font-size: clamp(2.4rem, 7.5vw, 5.2rem);
  line-height: 0.98; letter-spacing: -0.05em;
  padding-bottom: 0.1em; /* keeps descenders inside the gradient's clip box */
  margin-bottom: 1rem;
  background: linear-gradient(100deg, #9cc0ff 0%, #7fe7cf 25%, #ffc48a 50%, #d8a8ff 75%, #ff9ccc 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  text-wrap: balance;
}
.labs-lead { font-size: clamp(1.02rem, 2vw, 1.2rem); color: var(--l-text-2); line-height: 1.65; max-width: 720px; }

.game-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem; }
.game-card {
  position: relative;
  display: flex; flex-direction: column;
  border-radius: 1.8rem;
  border: 1px solid var(--l-border);
  background: var(--l-card);
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0,0,0,0.35);
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}
.game-card:hover { transform: translateY(-4px); border-color: rgba(255,255,255,0.22); box-shadow: 0 36px 70px rgba(0,0,0,0.45), 0 0 50px var(--game-glow); }
.game-card[data-game="kids"] { --game-glow: rgba(80,216,181,0.18); --game-accent: #7fe7cf; }
.game-card[data-game="squadron"] { --game-glow: rgba(244,114,182,0.18); --game-accent: #ff9ccc; }
.game-visual {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  background: #070712;
}
.game-visual img, .game-visual svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.game-visual::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(10,9,22,0.92));
}
.game-card:hover .game-visual img { transform: scale(1.04); }
.game-visual img { transition: transform 1.2s ease; }
.game-badge {
  position: absolute; left: 1rem; top: 1rem; z-index: 1;
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 0.3rem 0.65rem; border-radius: 999px;
  background: rgba(5,5,12,0.66); border: 1px solid var(--l-border);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: var(--l-text);
}
.game-body { padding: 0.4rem 1.6rem 1.6rem; display: flex; flex-direction: column; flex: 1; }
.game-body h3 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); letter-spacing: -0.04em; line-height: 1.1; margin-bottom: 0.6rem; }
.game-body h3 span { color: var(--game-accent); }
.game-body p { color: var(--l-text-2); font-size: 0.96rem; line-height: 1.65; margin-bottom: 1rem; }
.game-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.4rem; }
.game-chips li {
  list-style: none;
  padding: 0.24rem 0.6rem; border-radius: 999px;
  border: 1px solid var(--l-border); background: rgba(255,255,255,0.04);
  font-size: 0.74rem; color: var(--l-text-2);
}
.game-actions { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 0.7rem 1.2rem; }
.btn-play {
  color: #0a0716; border: 0;
  background: linear-gradient(120deg, var(--game-accent), #fff3c4);
  box-shadow: 0 12px 30px var(--game-glow);
  min-width: 0; padding: 0.9rem 1.5rem; font-size: 0.98rem;
}
.btn-play:hover { transform: translateY(-2px) scale(1.02); }
.labs .text-link { color: var(--l-text); border-color: rgba(255,255,255,0.25); }
.labs .text-link:hover { border-color: #fff; }

/* Secret solar system */
.eggs {
  margin-top: clamp(3.5rem, 8vw, 5.5rem);
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 4rem); align-items: start;
}
.eggs-head h3 { font-size: clamp(1.7rem, 4vw, 2.6rem); letter-spacing: -0.04em; line-height: 1.08; margin-bottom: 0.7rem; }
.eggs-head p { color: var(--l-text-2); line-height: 1.65; margin-bottom: 1.4rem; }
.egg-progress { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 1.6rem; }
.egg-progress-bar {
  flex: 1; height: 8px; border-radius: 99px; background: rgba(255,255,255,0.08); overflow: hidden;
}
.egg-progress-bar span {
  display: block; height: 100%; width: var(--p, 0%);
  background: linear-gradient(90deg, #6c9bff, #50d8b5, #f0a050, #c084fc, #f472b6);
  border-radius: inherit; transition: width 0.8s cubic-bezier(.2,.8,.2,1);
}
.egg-progress-text { font-family: var(--mono); font-size: 0.8rem; color: var(--l-text-2); white-space: nowrap; }

.orbit {
  position: relative; width: 100%; max-width: 440px; aspect-ratio: 1; margin: 0 auto;
}
.orbit-sun {
  position: absolute; left: 50%; top: 50%; width: 16%; height: 16%;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 0 18px rgba(255,255,255,0.35));
}
.orbit-sun svg { width: 100%; height: 100%; animation: sunTurn 40s linear infinite; }
@keyframes sunTurn { to { transform: rotate(360deg); } }
.ring {
  position: absolute; left: 50%; top: 50%;
  width: var(--d); aspect-ratio: 1;
  /* percentage margins resolve against the (square) orbit's width */
  margin: calc(var(--d) / -2) 0 0 calc(var(--d) / -2);
  border-radius: 50%;
  border: 1px dashed rgba(255,255,255,0.12);
  animation: orbitSpin var(--t) linear infinite;
  animation-delay: var(--delay, 0s);
}
.ring .planet {
  position: absolute; left: 50%; top: 0;
  width: var(--s); height: var(--s);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  opacity: 0.28; filter: grayscale(1) brightness(0.8);
  transition: opacity 0.8s ease, filter 0.8s ease, box-shadow 0.8s ease;
}
.ring.found { border-color: rgba(255,255,255,0.22); border-style: solid; }
.ring.found .planet { opacity: 1; filter: none; box-shadow: 0 0 16px var(--pg, rgba(255,255,255,0.4)); }
@keyframes orbitSpin { to { transform: rotate(360deg); } }

.egg-list { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.egg {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.35rem 0.8rem;
  align-items: start;
  padding: 0.95rem 1rem;
  border-radius: 1.1rem;
  border: 1px solid var(--l-border);
  background: rgba(255,255,255,0.03);
  transition: border-color 0.4s ease, background 0.4s ease;
}
.egg.found { border-color: rgba(255,255,255,0.22); background: rgba(255,255,255,0.06); }
.egg-planet { width: 30px; height: 30px; border-radius: 50%; margin-top: 0.15rem; opacity: 0.45; filter: grayscale(0.8); transition: all 0.6s ease; }
.egg.found .egg-planet { opacity: 1; filter: none; box-shadow: 0 0 14px var(--pg); }
.egg-top { display: flex; justify-content: space-between; gap: 0.5rem; align-items: baseline; }
.egg-planet-name { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--l-text-3); }
.egg-status { font-size: 0.7rem; color: var(--l-text-3); white-space: nowrap; }
.egg.found .egg-status { color: #7fe7cf; }
.egg h4 { font-size: 0.98rem; letter-spacing: -0.01em; line-height: 1.3; margin: 0.1rem 0 0.2rem; }
.egg p { font-size: 0.8rem; color: var(--l-text-2); line-height: 1.5; }
.egg kbd {
  font-family: var(--mono); font-size: 0.72rem;
  padding: 0.02rem 0.32rem; border-radius: 5px;
  border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.06);
  color: var(--l-text);
}
.egg-launch {
  grid-column: 2; justify-self: start;
  margin-top: 0.45rem;
  padding: 0.32rem 0.8rem; border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.22); background: rgba(255,255,255,0.05);
  color: var(--l-text); font-size: 0.76rem; font-weight: 600; cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.egg-launch:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.4); transform: translateY(-1px); }
.egg-launch::before { content: '▶ '; font-size: 0.7em; }
.egg.pluto { grid-column: 1 / -1; border-style: dashed; }
.egg.pluto:not(.unlocked) .egg-planet { opacity: 0.35; }
.egg.pluto:not(.unlocked) h4 { color: var(--l-text-2); }
.egg.pluto:not(.unlocked) .egg-launch { display: none; }
.egg.pluto .egg-unlocked-copy { display: none; }
.egg.pluto.unlocked .egg-unlocked-copy { display: block; }
.egg.pluto.unlocked .egg-locked-copy { display: none; }
.egg.pluto.unlocked { border-color: rgba(255,200,240,0.4); background: rgba(244,114,182,0.08); }
.egg-reset {
  margin-top: 1rem; background: none; border: 0; padding: 0;
  font-size: 0.74rem; color: var(--l-text-3); cursor: pointer; text-decoration: underline;
}
.egg-reset:hover { color: var(--l-text-2); }

/* Planet skins (used in the orbit and on the cards) */
.pl-mercury { --pg: rgba(200,200,210,0.55); background: radial-gradient(circle at 32% 30%, #f2f2f4, #9c9ca4 48%, #4b4b55 100%); }
.pl-venus   { --pg: rgba(240,200,130,0.55); background: radial-gradient(circle at 32% 30%, #fff1cf, #e2b468 50%, #8c5a1e 100%); }
.pl-earth   { --pg: rgba(110,190,255,0.6);  background: radial-gradient(circle at 70% 65%, rgba(80,170,90,0.95) 0 18%, transparent 19%), radial-gradient(circle at 34% 40%, rgba(90,180,100,0.95) 0 14%, transparent 15%), radial-gradient(circle at 32% 30%, #b8ecff, #2f86e0 50%, #163f7a 100%); }
.pl-mars    { --pg: rgba(255,120,80,0.55);  background: radial-gradient(circle at 32% 30%, #ffc2a0, #d9572d 50%, #6b2210 100%); }
.pl-jupiter { --pg: rgba(240,190,140,0.55); background: radial-gradient(circle at 32% 30%, rgba(255,255,255,0.35), transparent 45%), repeating-linear-gradient(172deg, #f2dcbc 0 9%, #c98d5c 9% 15%, #ead2ae 15% 24%, #b8774a 24% 28%); }
.pl-saturn  { --pg: rgba(240,220,160,0.55); background: radial-gradient(circle at 32% 30%, #fff5d6, #d9bb7a 52%, #8a6a32 100%); position: relative; }
.pl-saturn::after {
  content: ''; position: absolute; left: -38%; right: -38%; top: 42%; height: 16%;
  border-radius: 50%; border: 2px solid rgba(240,220,170,0.85);
  transform: rotate(-18deg);
}
.pl-uranus  { --pg: rgba(150,240,235,0.55); background: radial-gradient(circle at 32% 30%, #e2fffd, #6fd3dc 52%, #2a7f8c 100%); }
.pl-neptune { --pg: rgba(110,140,255,0.6);  background: radial-gradient(circle at 32% 30%, #c9d8ff, #3d63e0 52%, #1a2a7a 100%); }
.pl-pluto   { --pg: rgba(255,210,230,0.55); background: radial-gradient(circle at 60% 60%, rgba(255,240,230,0.9) 0 16%, transparent 17%), radial-gradient(circle at 32% 30%, #f3e2d6, #b08f7c 55%, #5e4638 100%); }

/* ============ Footer ============ */
.site-footer {
  position: relative; z-index: 1;
  padding: 2.4rem 0 2.8rem;
  border-top: 1px solid var(--border);
  font-size: 0.82rem; color: var(--text-tertiary);
}
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.2rem 2rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; list-style: none; }
.footer-links a { text-decoration: none; border-bottom: 1px solid var(--border); color: var(--text-secondary); }
.footer-links a:hover { color: var(--text); border-color: var(--text); }
.footer-hint {
  margin-top: 1.1rem;
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.06em;
  color: var(--text-tertiary);
}
.footer-hint a { color: var(--text-secondary); }

/* ============ Toast ============ */
.toast {
  position: fixed; left: 50%; bottom: 1.4rem; z-index: 400;
  transform: translate(-50%, calc(100% + 2rem));
  visibility: hidden;
  max-width: min(92vw, 520px);
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  background: rgba(14,12,28,0.92);
  border: 1px solid rgba(255,255,255,0.16);
  color: #f0eff8;
  font-size: 0.85rem; line-height: 1.4;
  box-shadow: 0 16px 40px rgba(0,0,0,0.4);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: transform 0.45s cubic-bezier(.2,.8,.2,1), visibility 0s linear 0.45s;
  pointer-events: none;
  text-align: center;
}
.toast.show { transform: translate(-50%, 0); visibility: visible; transition: transform 0.45s cubic-bezier(.2,.8,.2,1), visibility 0s; }

/* ============ Shooting star ============ */
.shooting-star {
  position: fixed; z-index: 70;
  width: 46px; height: 46px; margin: -23px 0 0 -23px;
  border: 0; border-radius: 50%; padding: 0;
  background: transparent; cursor: pointer;
  animation: shoot var(--dur, 3.2s) linear forwards;
}
.shooting-star::before {
  /* the head */
  content: ''; position: absolute; left: 50%; top: 50%;
  width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 12px 4px rgba(255,255,255,0.7), 0 0 30px 8px rgba(192,132,252,0.5);
}
.shooting-star::after {
  /* the tail, pointing back along the flight path */
  content: ''; position: absolute; left: 50%; top: 50%;
  width: 150px; height: 2px; margin-top: -1px;
  transform-origin: 0 50%;
  transform: rotate(var(--tail, 215deg));
  background: linear-gradient(90deg, rgba(255,255,255,0.85), rgba(192,132,252,0.35) 40%, transparent);
  border-radius: 2px;
}
@keyframes shoot {
  0% { transform: translate(0, 0); opacity: 0; }
  8% { opacity: 1; }
  85% { opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)); opacity: 0; }
}

/* ============ Konami planet ============ */
.orbit-planet {
  position: fixed; z-index: 55; pointer-events: none;
  width: 68px; height: 68px; border-radius: 50%;
  background: radial-gradient(circle at 28% 28%, rgba(255,255,255,0.22), rgba(255,255,255,0) 24%), url('img/mercury-planet-160.webp') center/cover no-repeat;
  box-shadow: 0 0 48px rgba(108,155,255,0.18), 0 0 26px rgba(244,114,182,0.14), inset -12px -6px 18px rgba(0,0,0,0.3);
  animation: sunTurn 12s linear infinite;
}

/* ============ Overlays (terminal, 1998) ============ */
.overlay {
  position: fixed; inset: 0; z-index: 9999;
  display: none; overflow: auto;
}
.overlay.active { display: block; animation: overlayIn 0.25s ease; }
@keyframes overlayIn { from { opacity: 0; transform: scale(0.985); } to { opacity: 1; transform: none; } }
.overlay-close {
  position: fixed; top: 1rem; right: 1rem; z-index: 2;
  font-family: var(--mono); font-size: 0.75rem;
  padding: 0.4rem 0.8rem; border-radius: 999px; cursor: pointer;
  background: rgba(0,0,0,0.5); color: #fff; border: 1px solid rgba(255,255,255,0.35);
}
.terminal {
  background: #000; color: #00ff41;
  font-family: var(--mono); font-size: 14px; line-height: 1.6;
  padding: 2rem;
}
.terminal .scanline {
  position: fixed; left: 0; right: 0; top: 0; height: 3px;
  background: rgba(0,255,65,0.15);
  animation: scanline 4s linear infinite; pointer-events: none;
}
.terminal .crt {
  position: fixed; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,0.1) 0 1px, transparent 1px 3px);
}
.terminal .term-line { min-height: 1.4em; white-space: pre-wrap; }
@keyframes scanline { from { top: -3px; } to { top: 100%; } }

.geocities {
  background: #000080; color: #ffff00;
  font-family: 'Comic Sans MS', 'Chalkboard SE', cursive;
  padding: 2rem; text-align: center;
}
.geocities h2 {
  font-size: 2rem; color: #ff00ff; text-shadow: 2px 2px #00ffff;
  animation: geoBlink 0.5s step-end infinite; margin-bottom: 1rem;
}
.geocities .geo-counter { color: #00ff00; margin: 1rem 0; }
.geocities .geo-construction { font-size: 1.5rem; margin: 1.5rem 0; animation: geoBlink 0.8s step-end infinite; }
.geocities .geo-marquee { overflow: hidden; }
.geocities .geo-marquee div { display: inline-block; white-space: nowrap; padding-left: 100%; font-size: 1.1rem; animation: marquee 16s linear infinite; }
.geocities p { color: #fff; line-height: 2; }
.geocities .geo-guestbook { color: #00ffff; margin-top: 1.5rem; }
.geocities .geo-small { color: #ff0; font-size: 0.8rem; margin-top: 1.5rem; }
.geocities hr { border: 0; border-top: 2px solid #ff00ff; margin: 1rem 0; }
@keyframes geoBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes marquee { to { transform: translateX(-100%); } }

/* ============ Scroll reveal (only when JS is running) ============ */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.visible { opacity: 1; transform: none; }

/* ============ Responsive ============ */
@media (max-width: 980px) {
  .nav-links { display: none; }
  .nav-tools { margin-left: auto; }
  .proof-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app-row { grid-template-columns: 1fr; }
  .app-row:nth-child(even) .app-media { order: 0; }
  .eggs { grid-template-columns: 1fr; }
  .orbit { max-width: 360px; }
  .info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cta-band { flex-direction: column; align-items: flex-start; }
  .cta-actions { width: 100%; }
  .cta-actions .btn { flex: 1; }
}
@media (max-width: 760px) {
  .services, .case-grid, .range-grid, .game-grid { grid-template-columns: 1fr; }
  .egg-list { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  html { font-size: 16px; }
  .nav-brand .brand-text { display: none; }
  .labs-pill .label-long { display: none; }
  .hero { text-align: left; }
  .hero h1, .hero .subtitle { margin-left: 0; }
  .hero-actions { justify-content: stretch; }
  .hero-actions .btn { width: 100%; min-width: 0; }
  .logo-mark { width: 64px; height: 64px; }
  .logo-mark svg { width: 56px; height: 56px; }
  .proof-grid { grid-template-columns: 1fr; }
  .labs-ribbon { justify-content: flex-start; border-radius: 1rem; }
  .apps-strip .arrow { display: none; }
  .app-media { min-height: 380px; border-radius: 1.4rem; }
  .phone { width: 168px; border-radius: 28px; padding: 6px; }
  .phone img { border-radius: 22px; }
  .phone.back { width: 140px; }
  .info-grid { grid-template-columns: 1fr; }
  .game-body { padding: 0.3rem 1.15rem 1.3rem; }
  .btn-play { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.001s !important; }
  .orbit-sun svg, .orbit-planet { animation: none !important; }
  /* frozen, not removed: each ring keeps its negative delay so the planets stay spread out */
  .ring { animation-duration: var(--t) !important; animation-iteration-count: infinite !important; animation-play-state: paused !important; }
  .geocities .geo-marquee div { white-space: normal; padding-left: 0; }
  .shooting-star.static { animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

@media print {
  :root, [data-theme] {
    --bg: #fff; --bg-card: #fff; --bg-soft: transparent;
    --text: #111; --text-secondary: #333; --text-tertiary: #555;
    --border: #ccc; --border-strong: #999;
    --star-1: #3b6fd9; --star-2: #2ba886; --star-3: #c07830; --star-4: #9055d0; --star-5: #d04888;
  }
  .app-row[data-app="movestory"] { --app-accent-text: #2f7a3a; }
  .app-row[data-app="luckyroll"] { --app-accent-text: #8a5a18; }
  .app-row[data-app="carstory"] { --app-accent-text: #b8281e; }
  .app-row[data-app="macometr"] { --app-accent-text: #1f7a3a; }
  #mercury-canvas, #droplet-canvas, .nav, .labs, .toast, .overlay, .shooting-star, .orbit-planet, .skip-link { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .js .reveal { opacity: 1; transform: none; }
  .section { padding: 1rem 0; }
  .app-media { display: none; }
  .app-row { grid-template-columns: 1fr; }
}
