/* Mish website, TEST version only. The look for every page, loaded after styles.css.
   New direction (owner, 23 Oct 2026): "keep the background a little more simple and static … the information
   interactive — swap that around", then "some sort of interesting background effect but minimalist". So the
   background is one still layer of faint map lines with two soft lights drifting very slowly underneath it (it never
   reacts to anything), and the glass cards on top are what catch the light and answer you. Phones get the same look
   without the costly parts (no blur behind the glass). The home page's own parts are in future-home.css. */

@property --spin {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

/* No faint blue box when you tap or hold something on a phone (owner, 25 Oct 2026: holding Check in showed one);
   each button shows its own press instead */
html {
  -webkit-tap-highlight-color: transparent;
}

:root {
  --page: #F6F5FB;
  --text: #0E0C14;
  --text-2: #5F5A6E;
  --glass: rgba(255, 255, 255, 0.7);
  --glass-solid: rgba(255, 255, 255, 0.92);
  --glass-line: rgba(14, 12, 20, 0.09);
  --glass-top: rgba(255, 255, 255, 0.95);
  --glass-shadow: 0 30px 60px -38px rgba(58, 31, 184, 0.35);
  --spot: rgba(109, 59, 255, 0.12);
  --spot-edge: rgba(109, 59, 255, 0.7);
  --inset: #F4F2FA;
  --light: 0.5;
  --lines: 0.05;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #050409;
    --text: #FFFFFF;
    --text-2: #B7B1C8;
    --glass: rgba(22, 19, 36, 0.6);
    --glass-solid: rgba(17, 15, 28, 0.9);
    --glass-line: rgba(255, 255, 255, 0.09);
    --glass-top: rgba(255, 255, 255, 0.11);
    --glass-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.9);
    --spot: rgba(156, 120, 255, 0.16);
    --spot-edge: rgba(190, 170, 255, 0.95);
    --inset: #1C1A27;
    --light: 0.75;
    --lines: 0.075;
  }
}

/* ---------- The background: faint map lines that stay still, with two soft lights drifting under them ----------
   (owner: "interesting … but minimalist", then no map lines overlapping or moving). The lines are one still layer;
   the lights wander underneath on slow loops (70 and 90 seconds) and never react to anything. Only the lights'
   position changes, so they are cheap to draw and phones stay smooth. */

/* The two lights: a violet one from the top left and a cooler blue one from the bottom right */
html::before,
html::after {
  content: "";
  position: fixed;
  z-index: -2;
  width: 80vmax;
  height: 80vmax;
  border-radius: 50%;
  opacity: var(--light);
  pointer-events: none;
  will-change: transform;
}

html::before {
  top: -36vmax;
  left: -24vmax;
  background: radial-gradient(closest-side, rgba(123, 77, 255, 0.42), rgba(123, 77, 255, 0.1) 55%, transparent);
  animation: drift-one 70s ease-in-out infinite alternate;
}

html::after {
  right: -28vmax;
  bottom: -40vmax;
  background: radial-gradient(closest-side, rgba(60, 203, 244, 0.26), rgba(60, 203, 244, 0.06) 55%, transparent);
  animation: drift-two 90s ease-in-out infinite alternate;
}

/* The map lines: one layer, still, on top of the lights */
body::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  background: url("/images/topo.svg") 0 0 / 900px repeat;
  opacity: var(--lines);
  pointer-events: none;
}

@keyframes drift-one {
  0% {
    transform: translate(0, 0) scale(1);
  }
  35% {
    transform: translate(30vw, 22vh) scale(1.08);
  }
  70% {
    transform: translate(10vw, 46vh) scale(0.94);
  }
  100% {
    transform: translate(42vw, 12vh) scale(1.04);
  }
}

@keyframes drift-two {
  0% {
    transform: translate(0, 0) scale(1);
  }
  40% {
    transform: translate(-34vw, -30vh) scale(1.1);
  }
  100% {
    transform: translate(-12vw, -58vh) scale(0.96);
  }
}

/* ---------- The top bar: see-through at the top, glass once you scroll, with a thin line of light along its edge ---------- */

.topbar {
  border-bottom-color: transparent;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  transition: background-color 0.45s ease, border-color 0.45s ease;
}

.topbar.scrolled {
  border-bottom-color: var(--glass-line);
  background: color-mix(in srgb, var(--page) 68%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  backdrop-filter: saturate(1.6) blur(18px);
}

.topbar::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(123, 77, 255, 0.7) 35%, rgba(60, 203, 244, 0.7) 65%, transparent);
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
}

.topbar.scrolled::after {
  opacity: 1;
}

.soon-pill {
  border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent);
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  letter-spacing: 0.02em;
}

/* ---------- Labels: a small capsule, like a heads-up display ---------- */

.kicker {
  gap: 9px;
  padding: 7px 15px 7px 12px;
  border-color: color-mix(in srgb, var(--primary) 34%, transparent);
  background: color-mix(in srgb, var(--primary) 9%, transparent);
  color: var(--primary);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.kicker .dot {
  box-shadow: 0 0 10px var(--primary-fill);
}

/* ---------- Glass cards that catch the light (a soft spotlight follows the pointer on computers) ---------- */

.qa,
.doc .sec,
.login-card,
.idea,
.numbered li,
.table-wrap,
.summary {
  --mx: 50%;
  --my: -600px;
  position: relative;
  border: 1px solid var(--glass-line);
  background: radial-gradient(420px circle at var(--mx) var(--my), var(--spot), transparent 65%), var(--glass-solid);
  box-shadow: inset 0 1px 0 var(--glass-top), var(--glass-shadow);
}

.summary {
  background:
    radial-gradient(420px circle at var(--mx) var(--my), var(--spot), transparent 65%),
    radial-gradient(ellipse at 100% 0%, rgba(60, 203, 244, 0.16), transparent 55%),
    color-mix(in srgb, var(--primary) 10%, var(--glass-solid));
}

.qa::after,
.doc .sec::after,
.login-card::after,
.idea::after,
.numbered li::after,
.action::after {
  content: "";
  position: absolute;
  inset: -1px;
  padding: 1px;
  border-radius: inherit;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, -600px), var(--spot-edge), transparent 70%);
  pointer-events: none;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}

.danger-card {
  background:
    linear-gradient(var(--glass-solid), var(--glass-solid)) padding-box,
    linear-gradient(140deg, rgba(217, 59, 74, 0.8), rgba(217, 59, 74, 0) 45%, rgba(217, 59, 74, 0.4)) border-box;
}

/* The house button: glass, a glowing icon, and light sweeping across on hover */
.action {
  --mx: 50%;
  --my: -600px;
  position: relative;
  border-color: color-mix(in srgb, var(--primary) 26%, transparent);
  background: radial-gradient(320px circle at var(--mx) var(--my), var(--spot), transparent 65%), color-mix(in srgb, var(--primary) 9%, var(--glass-solid));
  box-shadow: inset 0 1px 0 var(--glass-top);
}

.action-icon {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18) inset, 0 10px 24px -10px rgba(108, 60, 240, 0.9);
}

.btn-primary {
  position: relative;
  overflow: hidden;
  background: var(--brand);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14) inset, 0 16px 34px -16px rgba(109, 59, 255, 0.9);
}

.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.35) 50%, transparent 65%) -150% 0 / 60% 100% no-repeat;
  transition: background-position 0.8s ease;
  pointer-events: none;
}

@media (hover: hover) {
  .btn-primary:hover::after {
    background-position: 250% 0;
  }
}

.field input,
.comment-form textarea {
  border-color: var(--glass-line);
  background: color-mix(in srgb, var(--page) 70%, transparent);
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.field input:focus,
.comment-form textarea:focus {
  border-color: transparent;
  outline: 2px solid var(--primary);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--primary) 18%, transparent);
}

/* ---------- Inner pages: a big, crisp title over the world ---------- */

.page {
  padding-top: clamp(56px, 12vh, 120px);
}

.page h1,
.lost h1 {
  font-size: clamp(46px, 12.5vw, 104px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.lead {
  color: var(--text-2);
}

.page h2 {
  letter-spacing: -0.03em;
}

.doc .sec-num,
.numbered li::before {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16) inset, 0 8px 18px -8px rgba(108, 60, 240, 0.9);
}

/* Page not found: the pin stands alone in the dark */
.lost .mark .glow {
  opacity: 0.9;
}

.lost > .kicker {
  justify-self: center;
}

/* ---------- Footer ---------- */

.footer-links a {
  border: 1px solid transparent;
  transition: border-color 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}

@media (hover: hover) {
  .footer-links a:hover {
    border-color: var(--glass-line);
    background: var(--glass);
  }
}

.giant .wm {
  color: color-mix(in srgb, var(--text) 16%, transparent);
}

/* ---------- Phones: the same look, minus what costs smoothness ---------- */

@media (hover: none) {
  .topbar.scrolled {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: color-mix(in srgb, var(--page) 92%, transparent);
  }
}

@keyframes spin {
  to {
    --spin: 360deg;
  }
}

/* ---------- Calm version for people who turn animations off on their phone ---------- */

@media (prefers-reduced-motion: reduce) {
  html::before,
  html::after {
    animation: none; /* the two lights stay where they are */
  }
}
