/* ============================================================
   Hai Performance · Webtools landing
   Themes: dark / light    Intensities: subtle / heavy / max
============================================================ */

:root {
  /* brand (constant) */
  --teal: #329793;
  --teal-bright: #4ec5c0;
  --teal-deep: #154663;
  --orange: #F18714;
  --orange-bright: #ff9d33;

  /* type */
  --font-display: "Space Grotesk", -apple-system, system-ui, sans-serif;
  --font-body: "Inter", -apple-system, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

/* ============== THEME: DARK ============== */
.theme-dark {
  --bg: #060d11;
  --bg-1: #0a1418;
  --bg-2: #0e1c22;
  --surface: #0f1c22;
  --surface-2: #142730;
  --line: rgba(120, 200, 200, 0.10);
  --line-2: rgba(120, 200, 200, 0.18);
  --line-3: rgba(120, 200, 200, 0.30);
  --fg: #d8eef0;
  --fg-dim: #8aa6ac;
  --fg-faint: #5b7479;
  --accent-primary: var(--teal-bright);
  --grid-color: rgba(120, 200, 200, 0.045);
  --grid-color-strong: rgba(120, 200, 200, 0.10);
  --tile-grid-color: rgba(120, 200, 200, 0.035);
  --header-bg: rgba(6, 13, 17, 0.6);
  --btn-primary-fg: #1a0d00;
  --tile-bg: linear-gradient(180deg, var(--surface) 0%, var(--bg-2) 100%);
  --pro-bg: linear-gradient(135deg, rgba(21, 70, 99, 0.4) 0%, rgba(15, 28, 34, 0.8) 60%, rgba(241, 135, 20, 0.06) 100%);
}

/* ============== THEME: LIGHT ============== */
.theme-light {
  --bg: #f3f6f7;
  --bg-1: #eef3f4;
  --bg-2: #e6edee;
  --surface: #ffffff;
  --surface-2: #f7fafa;
  --line: rgba(21, 70, 99, 0.10);
  --line-2: rgba(21, 70, 99, 0.18);
  --line-3: rgba(21, 70, 99, 0.32);
  --fg: #0c2a3d;
  --fg-dim: #466069;
  --fg-faint: #7a8e95;
  --accent-primary: var(--teal-deep);
  --grid-color: rgba(21, 70, 99, 0.05);
  --grid-color-strong: rgba(21, 70, 99, 0.10);
  --tile-grid-color: rgba(21, 70, 99, 0.04);
  --header-bg: rgba(243, 246, 247, 0.7);
  --btn-primary-fg: #1a0d00;
  --tile-bg: linear-gradient(180deg, #ffffff 0%, #f1f6f7 100%);
  --pro-bg: linear-gradient(135deg, rgba(50, 151, 147, 0.10) 0%, #ffffff 60%, rgba(241, 135, 20, 0.10) 100%);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.theme-dark { background: #060d11; }
.theme-light { background: #f3f6f7; }
body { background: transparent; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ============== PAGE SHELL ============== */

.page {
  position: relative;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  overflow: hidden;
  isolation: isolate;
}

/* base grid (subtle by default; intensified at higher levels) */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--grid-color) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-color) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, black 30%, transparent 90%);
}
.intensity-heavy .bg-grid {
  background-image:
    linear-gradient(to right, var(--grid-color-strong) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-color-strong) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(180deg, black 0%, black 80%, transparent 100%);
}
.intensity-max .bg-grid {
  background-image:
    linear-gradient(to right, var(--grid-color-strong) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-color-strong) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: none;
  animation: gridDrift 18s linear infinite;
}
@keyframes gridDrift {
  0%   { background-position: 0 0; }
  100% { background-position: 32px 32px; }
}

.bg-glow {
  position: fixed;
  z-index: -1;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.45;
}
.bg-glow-1 {
  top: -20%;
  left: -10%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, rgba(50, 151, 147, 0.55), transparent 65%);
}
.bg-glow-2 {
  top: 10%;
  right: -15%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(241, 135, 20, 0.22), transparent 65%);
}
.bg-glow-3 {
  bottom: -20%;
  left: 30%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(78, 197, 192, 0.4), transparent 65%);
  animation: glowPulse 6s ease-in-out infinite;
}
@keyframes glowPulse {
  0%, 100% { opacity: 0.35; transform: scale(1); }
  50%      { opacity: 0.6;  transform: scale(1.1); }
}
.theme-light .bg-glow { opacity: 0.3; filter: blur(140px); }
.theme-light .bg-glow-1 { background: radial-gradient(circle, rgba(50, 151, 147, 0.35), transparent 65%); }
.theme-light .bg-glow-2 { background: radial-gradient(circle, rgba(241, 135, 20, 0.20), transparent 65%); }

/* ============== INTENSITY LAYERS (heavy + max) ============== */

.bg-scanlines {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(0, 0, 0, 0.18) 3px,
    transparent 4px
  );
  mix-blend-mode: multiply;
  opacity: 0.35;
}
.theme-light .bg-scanlines {
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(21, 70, 99, 0.08) 3px,
    transparent 4px
  );
  mix-blend-mode: multiply;
  opacity: 0.6;
}
.intensity-max .bg-scanlines { opacity: 0.5; }

.bg-noise {
  position: fixed;
  inset: 0;
  z-index: 51;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='120' height='120' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
}
.intensity-max .bg-noise { opacity: 0.09; animation: noiseShift 0.4s steps(4) infinite; }
@keyframes noiseShift {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-2px, 1px); }
  50%  { transform: translate(1px, -2px); }
  75%  { transform: translate(-1px, 2px); }
  100% { transform: translate(0, 0); }
}

.bg-vignette {
  position: fixed;
  inset: 0;
  z-index: 49;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,0.55) 100%);
}
.theme-light .bg-vignette {
  background: radial-gradient(ellipse at center, transparent 60%, rgba(21, 70, 99, 0.18) 100%);
}

.bg-sweep {
  position: fixed;
  top: 0;
  left: -50%;
  width: 60%;
  height: 100vh;
  z-index: 48;
  pointer-events: none;
  background: linear-gradient(105deg,
    transparent 40%,
    rgba(78, 197, 192, 0.08) 49%,
    rgba(241, 135, 20, 0.06) 51%,
    transparent 60%);
  animation: sweep 7s linear infinite;
}
.theme-light .bg-sweep {
  background: linear-gradient(105deg,
    transparent 40%,
    rgba(50, 151, 147, 0.08) 49%,
    rgba(241, 135, 20, 0.06) 51%,
    transparent 60%);
}
@keyframes sweep {
  0%   { transform: translateX(0); }
  100% { transform: translateX(280%); }
}

/* HUD corners (max only) */
.hud-corner {
  position: fixed;
  z-index: 52;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-primary);
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 18px;
  opacity: 0.7;
}
.hud-corner::before,
.hud-corner::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border-color: var(--accent-primary);
  border-style: solid;
  border-width: 0;
}
.hud-tl { top: 64px; left: 0; align-items: flex-start; }
.hud-tr { top: 64px; right: 0; align-items: flex-end; }
.hud-bl { bottom: 64px; left: 0; align-items: flex-start; }
.hud-br { bottom: 64px; right: 0; align-items: flex-end; }
.hud-tl::before { top: 4px; left: 4px;  border-top-width: 1px; border-left-width: 1px; }
.hud-tr::before { top: 4px; right: 4px; border-top-width: 1px; border-right-width: 1px; }
.hud-bl::before { bottom: 4px; left: 4px;  border-bottom-width: 1px; border-left-width: 1px; }
.hud-br::before { bottom: 4px; right: 4px; border-bottom-width: 1px; border-right-width: 1px; }

/* edge ticker (max only) */
.bg-ticker {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 22px;
  z-index: 53;
  overflow: hidden;
  background: linear-gradient(180deg, transparent, rgba(78,197,192,0.08));
  border-top: 1px solid rgba(78, 197, 192, 0.25);
  pointer-events: none;
}
.theme-light .bg-ticker {
  background: linear-gradient(180deg, transparent, rgba(21,70,99,0.05));
  border-top-color: rgba(21, 70, 99, 0.18);
}
.bg-ticker-track {
  display: flex;
  white-space: nowrap;
  animation: ticker 50s linear infinite;
  height: 100%;
  align-items: center;
}
.bg-ticker-row {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--accent-primary);
  padding: 0 32px;
  opacity: 0.65;
}
@keyframes ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ============== HEADER ============== */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 22px 56px;
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 5;
  backdrop-filter: blur(8px);
  background: var(--header-bg);
}

.brand img {
  height: 32px;
  width: auto;
  display: block;
}
/* light theme: logo is colored teal+orange and reads well as-is.
   dark theme keeps it as-is (its palette pops on dark too) */

.nav { display: flex; align-items: center; gap: 36px; }
.nav-link {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-dim);
  transition: color 0.15s ease;
  position: relative;
}
.nav-link:hover { color: var(--accent-primary); }
.nav-link:hover::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1px;
  background: var(--accent-primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  margin-right: 6px;
}
.lang-btn {
  background: transparent;
  border: none;
  color: var(--fg-faint);
  padding: 4px;
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  transition: color 0.15s;
}
.lang-btn.on { color: var(--accent-primary); }
.lang-btn:hover { color: var(--fg); }
.lang-sep { color: var(--fg-faint); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 2px;
  border: 1px solid transparent;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.btn-ghost {
  color: var(--fg-dim);
  border-color: var(--line-2);
}
.btn-ghost:hover {
  color: var(--fg);
  border-color: var(--line-3);
  background: rgba(50, 151, 147, 0.06);
}
.btn-primary {
  background: var(--orange);
  color: var(--btn-primary-fg);
  border-color: var(--orange);
  font-weight: 600;
}
.btn-primary:hover {
  background: var(--orange-bright);
  border-color: var(--orange-bright);
  box-shadow: 0 0 24px rgba(241, 135, 20, 0.4);
}
.btn-lg { padding: 13px 22px; font-size: 13px; }

/* ============== HERO ============== */

.main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px 56px 80px;
  position: relative;
  z-index: 2;
}
.intensity-max .main { padding-bottom: 110px; }

.hero { max-width: 760px; margin-bottom: 72px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 28px;
  padding: 6px 12px 6px 10px;
  border: 1px solid rgba(50, 151, 147, 0.30);
  border-radius: 2px;
  background: rgba(50, 151, 147, 0.06);
}
.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 8px var(--accent-primary);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.headline {
  font-family: var(--font-display);
  font-size: clamp(42px, 5.4vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 500;
  margin: 0 0 28px;
  color: var(--fg);
}
.headline-line { display: block; position: relative; }
.headline-line:nth-child(2) {
  color: var(--accent-primary);
  font-style: italic;
  font-weight: 400;
}

/* glitch on max */
.intensity-max .headline-line::before,
.intensity-max .headline-line::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  pointer-events: none;
  mix-blend-mode: screen;
}
.intensity-max .headline-line::before {
  color: var(--orange);
  transform: translate(2px, 0);
  clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
  animation: glitchA 4s steps(1) infinite;
}
.intensity-max .headline-line::after {
  color: var(--teal-bright);
  transform: translate(-2px, 0);
  clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
  animation: glitchB 4s steps(1) infinite;
}
.theme-light.intensity-max .headline-line::before,
.theme-light.intensity-max .headline-line::after {
  mix-blend-mode: multiply;
  opacity: 0.7;
}
@keyframes glitchA {
  0%, 92%, 100% { transform: translate(0, 0); opacity: 0; }
  93% { transform: translate(3px, 0); opacity: 1; }
  95% { transform: translate(-2px, 1px); opacity: 1; }
  97% { transform: translate(2px, -1px); opacity: 1; }
}
@keyframes glitchB {
  0%, 92%, 100% { transform: translate(0, 0); opacity: 0; }
  93% { transform: translate(-3px, 0); opacity: 1; }
  95% { transform: translate(2px, -1px); opacity: 1; }
  97% { transform: translate(-2px, 1px); opacity: 1; }
}

.sub {
  font-size: 17px;
  line-height: 1.55;
  color: var(--fg-dim);
  max-width: 580px;
  margin: 0 0 28px;
  text-wrap: pretty;
}

.hero-chips { display: flex; gap: 12px; flex-wrap: wrap; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 7px 12px;
  border-radius: 2px;
  border: 1px solid var(--line-2);
  color: var(--fg-dim);
  background: var(--surface);
}
.chip-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-primary); }
.chip-dot.pro { background: var(--orange); }

/* ============== TOOLS SECTION ============== */

.tools-section { margin-bottom: 72px; }
.tools-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 0 18px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.section-label { color: var(--fg-dim); }
.section-count { color: var(--fg-faint); }

.tile-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
@media (max-width: 760px) { .tile-grid { grid-template-columns: 1fr; } }

/* ============== TILE ============== */

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 28px 28px 24px;
  min-height: 240px;
  background: var(--tile-bg);
  border: 1px solid var(--line-2);
  border-radius: 3px;
  color: var(--fg);
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1),
              border-color 0.25s ease,
              box-shadow 0.25s ease,
              background 0.25s ease;
  overflow: hidden;
  isolation: isolate;
}
.tile::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(to right, var(--tile-grid-color) 1px, transparent 1px),
    linear-gradient(to bottom, var(--tile-grid-color) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.7;
}
.intensity-max .tile { border-radius: 0; }
.intensity-max .tile::before { background-size: 16px 16px; opacity: 1; }

/* corner brackets */
.bracket {
  position: absolute;
  width: 14px;
  height: 14px;
  pointer-events: none;
  transition: border-color 0.25s ease, width 0.25s ease, height 0.25s ease;
}
.br-tl { top: 8px; left: 8px;
  border-top: 1px solid var(--line-3); border-left: 1px solid var(--line-3); }
.br-tr { top: 8px; right: 8px;
  border-top: 1px solid var(--line-3); border-right: 1px solid var(--line-3); }
.br-bl { bottom: 8px; left: 8px;
  border-bottom: 1px solid var(--line-3); border-left: 1px solid var(--line-3); }
.br-br { bottom: 8px; right: 8px;
  border-bottom: 1px solid var(--line-3); border-right: 1px solid var(--line-3); }
.intensity-max .bracket { width: 18px; height: 18px; }
.intensity-max .br-tl { border-top-color: var(--accent-primary); border-left-color: var(--accent-primary); }
.intensity-max .br-tr { border-top-color: var(--accent-primary); border-right-color: var(--accent-primary); }
.intensity-max .br-bl { border-bottom-color: var(--orange); border-left-color: var(--orange); }
.intensity-max .br-br { border-bottom-color: var(--orange); border-right-color: var(--orange); }

.tile-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}
.tile-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-primary);
  padding: 4px 9px;
  border: 1px solid rgba(50, 151, 147, 0.35);
  border-radius: 2px;
  background: rgba(50, 151, 147, 0.07);
}
.tile-code {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--fg-faint);
}

.tile-body { flex: 1; }
.tile-name {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-weight: 500;
  margin: 0 0 10px;
  color: var(--fg);
}
.tile-desc {
  font-size: 14px;
  line-height: 1.55;
  color: var(--fg-dim);
  margin: 0;
  text-wrap: pretty;
}

.tile-foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px dashed var(--line-2);
}
.tile-accept {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-family: var(--font-mono);
  font-size: 11px;
}
.tile-accept-label {
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-faint);
}
.tile-accept-val { color: var(--fg); letter-spacing: 0.04em; }
.tile-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange);
  transition: gap 0.2s ease, transform 0.2s ease;
}
.tile-cta svg { transition: transform 0.2s ease; }

/* ============== HOVER VARIANTS ============== */
.tile:hover { border-color: var(--teal); }
.tile.accent:hover { border-color: var(--orange); }
.tile:hover .bracket {
  border-color: var(--teal-bright);
  width: 18px;
  height: 18px;
}
.tile.accent:hover .bracket { border-color: var(--orange-bright); }
.tile:hover .tile-cta { gap: 10px; }
.tile:hover .tile-cta svg { transform: translateX(2px); }

.tile.hover-lift:hover {
  transform: translateY(-3px);
  box-shadow:
    0 16px 40px -8px rgba(0, 0, 0, 0.5),
    0 0 0 1px var(--teal),
    0 0 32px -4px rgba(50, 151, 147, 0.4);
}
.theme-light .tile.hover-lift:hover {
  box-shadow:
    0 16px 40px -8px rgba(21, 70, 99, 0.18),
    0 0 0 1px var(--teal),
    0 0 32px -4px rgba(50, 151, 147, 0.25);
}
.tile.hover-lift.accent:hover {
  box-shadow:
    0 16px 40px -8px rgba(0, 0, 0, 0.5),
    0 0 0 1px var(--orange),
    0 0 32px -4px rgba(241, 135, 20, 0.35);
}
.theme-light .tile.hover-lift.accent:hover {
  box-shadow:
    0 16px 40px -8px rgba(21, 70, 99, 0.18),
    0 0 0 1px var(--orange),
    0 0 32px -4px rgba(241, 135, 20, 0.25);
}

.trace {
  position: absolute;
  background: var(--teal-bright);
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 0 8px var(--teal-bright);
}
.tile.accent .trace { background: var(--orange-bright); box-shadow: 0 0 8px var(--orange-bright); }
.trace-top    { top: -1px;    left: 0;     height: 1px; width: 0; }
.trace-right  { top: 0;       right: -1px; width: 1px;  height: 0; }
.trace-bottom { bottom: -1px; right: 0;    height: 1px; width: 0; }
.trace-left   { bottom: 0;    left: -1px;  width: 1px;  height: 0; }
.tile.hover-trace:hover .trace { opacity: 1; }
.tile.hover-trace:hover .trace-top    { width: 100%; transition: width 0.35s ease 0s; }
.tile.hover-trace:hover .trace-right  { height: 100%; transition: height 0.35s ease 0.35s; }
.tile.hover-trace:hover .trace-bottom { width: 100%; transition: width 0.35s ease 0.7s; }
.tile.hover-trace:hover .trace-left   { height: 100%; transition: height 0.35s ease 1.05s; }

.scanline {
  position: absolute;
  top: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent,
    rgba(78, 197, 192, 0.9) 30%,
    rgba(78, 197, 192, 0.9) 70%,
    transparent);
  box-shadow: 0 0 12px rgba(78, 197, 192, 0.6);
  opacity: 0;
  pointer-events: none;
}
.tile.accent .scanline {
  background: linear-gradient(90deg,
    transparent,
    rgba(241, 135, 20, 0.9) 30%,
    rgba(241, 135, 20, 0.9) 70%,
    transparent);
  box-shadow: 0 0 12px rgba(241, 135, 20, 0.6);
}
.tile.hover-scan:hover .scanline {
  opacity: 1;
  animation: scan 1.4s linear infinite;
}
@keyframes scan {
  0%   { top: -2px; }
  100% { top: 100%; }
}

.tile.hover-shimmer { position: relative; }
.tile.hover-shimmer::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg,
    transparent 30%,
    rgba(78, 197, 192, 0.18) 48%,
    rgba(241, 135, 20, 0.12) 52%,
    transparent 70%);
  transform: translateX(-100%);
  transition: transform 0s;
}
.tile.hover-shimmer:hover::after {
  transform: translateX(100%);
  transition: transform 0.9s ease;
}

/* heavy / max give every tile an always-on faint glow */
.intensity-heavy .tile,
.intensity-max .tile {
  box-shadow: inset 0 0 0 1px rgba(78, 197, 192, 0.05),
              0 0 24px -8px rgba(50, 151, 147, 0.25);
}
.theme-light.intensity-heavy .tile,
.theme-light.intensity-max .tile {
  box-shadow: inset 0 0 0 1px rgba(21, 70, 99, 0.05),
              0 4px 18px -8px rgba(21, 70, 99, 0.18);
}

/* ============== PRO CALLOUT ============== */

.pro-callout {
  position: relative;
  border: 1px solid var(--line-2);
  border-radius: 3px;
  padding: 48px 48px;
  overflow: hidden;
  background: var(--pro-bg);
}
.intensity-max .pro-callout { border-radius: 0; }
.pro-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--grid-color-strong) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-color-strong) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 70% 100% at 100% 50%, black, transparent 80%);
  pointer-events: none;
}
.pro-callout-inner { position: relative; max-width: 620px; }
.pro-callout-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--orange);
  margin-bottom: 16px;
}
.pro-callout-title {
  font-family: var(--font-display);
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 500;
  margin: 0 0 14px;
  color: var(--fg);
}
.pro-callout-body {
  font-size: 15px;
  line-height: 1.55;
  color: var(--fg-dim);
  margin: 0 0 24px;
  text-wrap: pretty;
}

/* ============== FOOTER ============== */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 56px 32px;
  position: relative;
  z-index: 2;
  background: var(--header-bg);
  backdrop-filter: blur(8px);
}
.intensity-max .site-footer { padding-bottom: 56px; }
.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 16px;
}
.footer-tag { font-size: 13px; color: var(--fg-dim); }
.footer-links { display: flex; gap: 22px; }
.footer-link {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-faint);
  transition: color 0.15s;
}
.footer-link:hover { color: var(--accent-primary); }

.footer-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--fg-faint);
  text-transform: uppercase;
}
.footer-dot {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--fg-faint);
  display: inline-block;
}
.footer-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--accent-primary);
}
.status-led {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 8px var(--accent-primary);
  animation: pulse 2s ease-in-out infinite;
}

/* ============== COOKIE / PRIVACY NOTICE ============== */

.cookie-notice {
  position: fixed;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  display: flex;
  justify-content: center;
  pointer-events: none;
  animation: cookieIn 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.intensity-max .cookie-notice { bottom: 44px; }
@keyframes cookieIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.cookie-notice-inner {
  pointer-events: auto;
  width: 100%;
  max-width: 720px;
  display: flex;
  align-items: stretch;
  gap: 24px;
  padding: 18px 22px;
  background: var(--surface);
  border: 1px solid var(--line-3);
  border-radius: 3px;
  box-shadow: 0 16px 48px -8px rgba(0, 0, 0, 0.45);
  position: relative;
}
.theme-light .cookie-notice-inner {
  box-shadow: 0 16px 48px -12px rgba(21, 70, 99, 0.25);
}
.intensity-max .cookie-notice-inner { border-radius: 0; }
.cookie-notice-inner::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  width: 3px;
  background: linear-gradient(180deg, var(--teal), var(--orange));
}
.cookie-notice-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cookie-notice-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--accent-primary);
  margin-bottom: 4px;
}
.cookie-notice-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  color: var(--fg);
  letter-spacing: -0.005em;
}
.cookie-notice-body {
  font-size: 13px;
  line-height: 1.5;
  color: var(--fg-dim);
  margin: 4px 0 0;
  text-wrap: pretty;
}
.cookie-notice-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
  justify-content: center;
  flex-shrink: 0;
}
.cookie-notice-link {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-dim);
  white-space: nowrap;
  transition: color 0.15s;
}
.cookie-notice-link:hover { color: var(--accent-primary); }
@media (max-width: 640px) {
  .cookie-notice { left: 12px; right: 12px; bottom: 12px; }
  .cookie-notice-inner { flex-direction: column; gap: 16px; padding: 16px; }
  .cookie-notice-actions { flex-direction: row; align-items: center; justify-content: space-between; width: 100%; }
}


@media (max-width: 900px) {
  .site-header { padding: 18px 24px; gap: 16px; flex-wrap: wrap; }
  .nav { display: none; }
  .main { padding: 48px 24px 64px; }
  .pro-callout { padding: 32px 24px; }
  .site-footer { padding: 24px; }
  .footer-row { flex-direction: column; align-items: flex-start; }
  .footer-meta { flex-wrap: wrap; }
  .hud-corner { display: none; }
}
