/* LeoWeb — custom CSS (ported 1:1 from src/app/globals.css).
   Tailwind utility classes (bg-ink, text-lime, etc.) are supplied at runtime
   by the Tailwind CDN build configured in includes/head.php — this file only
   contains the custom, non-utility CSS: base rules, effects and components. */

:root {
  --color-ink: #07090f;
  --color-panel: #0c1018;
  --color-panel2: #111827;
  --color-line: #1d2637;
  --color-line2: #2a3550;
  --color-fog: #8a94ad;
  --color-snow: #e8edf7;
  --color-lime: #c6ff4a;
  --color-cyan: #3be8ff;
  --color-amber: #ffb454;
  --color-rose: #ff5c7a;
  --font-display: "Unbounded", system-ui, sans-serif;
  --font-body: "Space Grotesk", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

/* ============ BASE ============ */

html {
  scroll-behavior: smooth;
  overflow-y: scroll;
  scrollbar-gutter: stable both-edges;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(1100px 560px at 85% -10%, rgba(59, 232, 255, 0.07), transparent 60%),
    radial-gradient(900px 480px at 8% 6%, rgba(198, 255, 74, 0.055), transparent 55%),
    radial-gradient(900px 700px at 50% 115%, rgba(255, 180, 84, 0.05), transparent 60%),
    var(--color-ink);
  color: var(--color-snow);
  font-family: var(--font-body);
  overflow-x: hidden;
}

::selection {
  background: var(--color-lime);
  color: var(--color-ink);
}

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--color-ink); }
::-webkit-scrollbar-thumb { background: var(--color-line2); border: 2px solid var(--color-ink); }
::-webkit-scrollbar-thumb:hover { background: var(--color-lime); }

section { scroll-margin-top: 84px; }

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 89;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(232, 237, 247, 0.016) 0px,
    rgba(232, 237, 247, 0.016) 1px,
    transparent 1px,
    transparent 3px
  );
}

/* ============ AMBIENT LAYERS ============ */

.grid-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(138, 148, 173, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(138, 148, 173, 0.055) 1px, transparent 1px);
  background-size: 76px 76px;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 20%, black 30%, transparent 78%);
}

.scan-beam {
  position: fixed;
  left: 0;
  right: 0;
  top: -12%;
  height: 140px;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent, rgba(198, 255, 74, 0.05) 45%, rgba(59, 232, 255, 0.07) 55%, transparent);
  animation: beam 9s linear infinite;
}

@keyframes beam {
  0% { top: -18%; }
  100% { top: 112%; }
}

/* ============ TYPE ============ */

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

.text-outline {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--color-snow);
}

.text-outline-lime {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--color-lime);
}

.kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--color-lime);
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.kicker::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--color-lime);
}

/* ============ BUTTONS ============ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.85rem 1.4rem;
  border: 1px solid var(--color-snow);
  color: var(--color-snow);
  background: transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s, color 0.2s, border-color 0.2s;
  user-select: none;
  min-width: 0;
  white-space: normal;
  word-break: break-word;
}

.btn-lime {
  background: var(--color-lime);
  border-color: var(--color-lime);
  color: var(--color-ink);
  box-shadow: 5px 5px 0 rgba(59, 232, 255, 0.55);
}

.btn-lime:hover { transform: translate(2px, 2px); box-shadow: 3px 3px 0 rgba(59, 232, 255, 0.55); }
.btn-lime:active { transform: translate(5px, 5px); box-shadow: 0 0 0 rgba(59, 232, 255, 0.55); }

.btn-neon {
  position: relative;
  padding: 1rem 2rem;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(198, 255, 74, 0.18) 0%, rgba(198, 255, 74, 0.08) 100%);
  border: 1px solid rgba(198, 255, 74, 0.95);
  color: var(--color-snow);
  box-shadow: 0 0 40px rgba(198, 255, 74, 0.4), inset 0 0 1px rgba(255, 255, 255, 0.35);
  text-shadow: 0 0 10px rgba(198, 255, 74, 0.7);
  overflow: hidden;
}

.btn-neon::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at top left, rgba(198, 255, 74, 0.25), transparent 35%), radial-gradient(circle at bottom right, rgba(255, 255, 255, 0.18), transparent 30%);
  opacity: 0.75;
  pointer-events: none;
  mix-blend-mode: screen;
}

.btn-neon:hover {
  transform: translate(-1px, -1px);
  background: linear-gradient(180deg, rgba(198, 255, 74, 0.24) 0%, rgba(198, 255, 74, 0.12) 100%);
  box-shadow: 0 0 55px rgba(198, 255, 74, 0.6), inset 0 0 4px rgba(255, 255, 255, 0.55);
}

.btn-ghost:hover {
  border-color: var(--color-lime);
  color: var(--color-lime);
  background: rgba(198, 255, 74, 0.06);
  box-shadow: 4px 4px 0 rgba(198, 255, 74, 0.22);
  transform: translate(-1px, -1px);
}

.btn-danger { border-color: var(--color-rose); color: var(--color-rose); }
.btn-danger:hover {
  background: rgba(255, 92, 122, 0.1);
  box-shadow: 4px 4px 0 rgba(255, 92, 122, 0.3);
  transform: translate(-1px, -1px);
}

.btn:disabled { opacity: 0.55; pointer-events: none; }

.lang-switch {
  white-space: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.lang-switch::-webkit-scrollbar { display: none; }
.lang-switch a { white-space: nowrap; }

#mobile-menu { overflow-y: auto; }
#mobile-menu nav { gap: 0.7rem; }
#mobile-menu nav a {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
  text-overflow: ellipsis;
  overflow: hidden;
  font-size: clamp(1.4rem, 6.5vw, 2.2rem);
  line-height: 1.05;
  padding: 0.65rem 0;
  max-width: 100%;
}
#mobile-menu nav a span { flex-shrink: 0; margin-right: 0.55rem; }
#mobile-menu .lang-switch {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-start;
  overflow-x: auto;
  max-width: 100%;
}
#mobile-menu .lang-switch::-webkit-scrollbar { display: none; }
#mobile-menu .lang-switch a {
  white-space: nowrap;
  padding: 0.55rem 0.85rem;
}
#mobile-menu .mobile-menu-top-row {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.75rem;
}
#mobile-menu .mobile-menu-top-row .lang-switch {
  flex: 0 1 auto;
  width: auto;
  min-width: 0;
}
#mobile-menu .mobile-menu-top-row a {
  flex: 0 1 auto;
  width: auto;
}

.svc-row, .portfolio-card, .ref-card { min-width: 0; }
.portfolio-card > * { min-width: 0; }

@media (max-width: 900px) {
  .lang-switch { justify-content: flex-start; }
  .lang-switch a { padding-left: 0.85rem; padding-right: 0.85rem; }
  .svc-row { align-items: flex-start; }
  .svc-row .svc-arrow { justify-self: end; }
  .portfolio-tab { font-size: 10px; padding: 0.75rem 0.85rem; }
  .hero-term-line, .term-line, .svc-title, .ref-card h3, .portfolio-tab, .field, .btn, .kicker, .font-display { word-break: break-word; overflow-wrap: anywhere; }
  body.admin-page header .max-w-[1200px],
  body.admin-page nav,
  body.admin-page main { padding-left: 1rem; padding-right: 1rem; }
  body.admin-page header .max-w-[1200px] { flex-wrap: wrap; align-items: flex-start; row-gap: 0.75rem; }
  body.admin-page header .ml-auto { width: 100%; flex-wrap: wrap; justify-content: flex-start; gap: 0.75rem; }
  body.admin-page header .ml-auto > * { min-width: 0; }
  .tab-btn { min-width: 0; }
}

@media (max-width: 760px) {
  .coverflow { width: 100%; left: 0; padding: 0 12px; }
  .coverflow .track { height: 520px; perspective: 900px; touch-action: pan-y; }
  .coverflow .card { width: 90vw; margin-left: -45vw; max-width: 680px; }
  .coverflow .nav-arrow { width: 38px; height: 38px; display: none !important; }
  .coverflow .title { font-size: clamp(24px, 7vw, 32px); }
  .coverflow .caption { position: static; transform: none; left: auto; bottom: auto; z-index: 2; display:flex; justify-content:center; width:100%; max-width:100%; padding:12px 0; margin-top:42px; gap:12px; flex-wrap: wrap; }
  .coverflow .dots { justify-content: center; flex-wrap: wrap; }
  .coverflow .browser-body { overflow: hidden; }
  .coverflow .browser-body img { position: absolute; left: 0; top: var(--browser-bar-h, 0px); width: 100%; height: calc(100% - var(--browser-bar-h, 0px)); object-fit: cover; object-position: 50% 12%; transform: none; opacity: 1 !important; pointer-events: none; }
  header#site-header .max-w-[1400px] { padding-left: 1rem; padding-right: 1rem; }
  .btn { font-size: 11px; padding: 0.75rem 1rem; min-width: 0; white-space: normal; }
  .kicker { font-size: 10px; letter-spacing: 0.18em; }
  .font-display { line-height: 1.05; }
  #cookie-banner, #cookie-toast, #mobile-menu { max-width: 100%; }
  #mobile-menu nav a { font-size: clamp(1.4rem, 6.5vw, 2.1rem); }
  #mobile-menu nav a span { margin-right: 0.45rem; }
}

@media (max-width: 760px) {
  footer dl {
    display: block;
  }
  footer dl > div {
    display: block !important;
    margin-bottom: 0.9rem;
  }
  footer dl > div:last-child {
    margin-bottom: 0;
  }
  footer dl dt,
  footer dl dd {
    display: block !important;
    width: auto !important;
    min-width: 0;
  }
  footer dl dt {
    margin-bottom: 0.15rem;
  }
  footer dl dd {
    margin: 0;
  }
  footer dl dd a {
    display: inline-block;
    width: 100%;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
  }
  footer nav { width: 100%; justify-content: center; gap: 0.6rem; }
  #mobile-menu .mobile-menu-top-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.75rem; }
  #mobile-menu .mobile-menu-top-row > * { min-width: 0; }
  footer nav .text-line2 { display: none; }
  footer nav a, footer nav button { white-space: normal; padding: 0.2rem 0.35rem; }

  .coverflow { width: 100%; left: 0; padding: 0 12px; }
  .btn { font-size: 10px; padding: 0.7rem 0.95rem; }
  .portfolio-tab { font-size: 9px; padding: 0.65rem 0.8rem; }
  body.admin-page header .ml-auto { width: 100%; justify-content: space-between; }
  body.admin-page nav { gap: 0.35rem; }
  .tab-btn { padding-left: 0.8rem; padding-right: 0.8rem; }
}

/* ============ FIELDS ============ */

.flabel {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-fog);
  margin-bottom: 0.45rem;
}

.field {
  width: 100%;
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  color: var(--color-snow);
  padding: 0.85rem 1rem;
  font-size: 15px;
  font-family: var(--font-body);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  outline: none;
}

.field::placeholder { color: #525e78; }

.field:focus {
  border-color: var(--color-lime);
  box-shadow: 3px 3px 0 rgba(198, 255, 74, 0.25);
  background: #0e1420;
}

select.field {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23c6ff4a' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.6rem;
}

select.field option { background: var(--color-panel); color: var(--color-snow); }

/* ============ REVEAL / MOTION ============ */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.75s cubic-bezier(0.2, 0.6, 0.2, 1), transform 0.75s cubic-bezier(0.2, 0.6, 0.2, 1);
  transition-delay: var(--rd, 0ms);
}

.reveal.on { opacity: 1; transform: none; }

.reveal-left { transform: translateX(-30px); }
.reveal-left.on { transform: none; }

@media (prefers-reduced-motion: reduce) and (hover: hover) and (pointer: fine) {
  .reveal, .reveal-left { opacity: 1; transform: none; transition: none; }
  .scan-beam, .marquee-track, .spin-slow { animation: none !important; }
  .preloader-glow, .preloader-logo-wrap::after, .load-bar::before, .preloader-title.glitch {
    animation: none !important;
  }
}

@media (max-width: 768px) {
  .scan-beam { animation-duration: 12s; }
  .marquee-track { animation-duration: 28s; }
  .spin-slow { animation-duration: 18s; }
  .floaty { animation-duration: 6s; }
  .reveal, .reveal-left { transition-duration: 0.55s; }
  .reveal { transform: translateY(16px); }
  .reveal-left { transform: translateX(-18px); }
}

@media (min-width: 1024px) {
  .glitch, .hero-glitch, .hero-shimmer, .hero-jitter, .hero-neon {
    animation-duration: 1.4s !important;
    animation-timing-function: ease-in-out !important;
  }
  .hero-glitch::before, .hero-glitch::after {
    animation-duration: 1.4s !important;
  }
  .hero-neon::after { animation: none !important; }
}

/* ============ MARQUEE ============ */

.marquee {
  overflow: hidden;
  white-space: nowrap;
  border-block: 1px solid var(--color-line);
  direction: ltr;
}

.marquee-track {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  animation: marquee 24s linear infinite;
  will-change: transform;
}

.marquee-group {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-shrink: 0;
}

.marquee-track span {
  flex-shrink: 0;
}

.marquee:hover .marquee-track { animation-play-state: paused; }

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-33.3333%); }
}

.glitch::before { color: var(--color-cyan); z-index: -1; animation: glitch-a 3.2s infinite steps(1); }
.glitch::after { color: var(--color-rose); z-index: -2; animation: glitch-b 2.7s infinite steps(1); }

@keyframes glitch-a {
  0%, 93%, 100% { transform: none; opacity: 0; }
  94% { transform: translate(-4px, 2px); opacity: 0.8; }
  96% { transform: translate(3px, -1px); opacity: 0.5; }
  98% { transform: translate(-2px, 1px); opacity: 0.8; }
}

@keyframes glitch-b {
  0%, 90%, 100% { transform: none; opacity: 0; }
  91% { transform: translate(4px, -2px); opacity: 0.7; }
  93% { transform: translate(-3px, 2px); opacity: 0.4; }
  95% { transform: translate(2px, -1px); opacity: 0.7; }
}

/* Hero-specific glitch: uses pseudo-elements with the element text via data-text */
.hero-glitch {
  position: relative;
  display: inline-block;
}
.hero-glitch::before, .hero-glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  pointer-events: none;
  overflow: hidden;
  white-space: nowrap;
}
.hero-glitch::before {
  color: var(--color-cyan);
  z-index: 3;
  mix-blend-mode: screen;
  animation: hero-glitch-a 700ms linear both;
  opacity: 0.95;
}
.hero-glitch::after {
  color: var(--color-rose);
  z-index: 2;
  mix-blend-mode: screen;
  animation: hero-glitch-b 700ms linear both;
  opacity: 0.9;
}

@keyframes hero-glitch-a {
  0% { transform: translate(0,0); opacity: 0; clip-path: inset(0 0 0 0); }
  10% { transform: translate(-6px, 3px); opacity: 1; }
  30% { transform: translate(4px, -2px); opacity: 0.7; }
  50% { transform: translate(-2px, 2px); opacity: 0.9; }
  100% { transform: translate(0,0); opacity: 0; }
}

@keyframes hero-glitch-b {
  0% { transform: translate(0,0); opacity: 0; }
  12% { transform: translate(5px, -3px); opacity: 0.9; }
  35% { transform: translate(-4px, 2px); opacity: 0.6; }
  60% { transform: translate(2px, -1px); opacity: 0.85; }
  100% { transform: translate(0,0); opacity: 0; }
}

/* Clone-based glitch visuals (used by JS clones) */
.glitch-clone {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  mix-blend-mode: screen;
  transform-origin: left top;
  will-change: transform, opacity;
}
.glitch-clone.cyan { color: var(--color-cyan); opacity: 0.95; }
.glitch-clone.rose { color: var(--color-rose); opacity: 0.9; }

@keyframes clone-glitch-move {
  0% { transform: translate(0,0) skew(0deg); opacity: 1; }
  30% { transform: translate(-6px,3px) skew(-6deg); opacity: 0.95; }
  60% { transform: translate(4px,-2px) skew(4deg); opacity: 0.85; }
  100% { transform: translate(0,0) skew(0deg); opacity: 0; }
}

/* New hero shimmer + flicker effect */
.hero-shimmer {
  position: relative;
}
.hero-shimmer::before {
  content: '';
  position: absolute;
  left: -40%;
  top: -10%;
  width: 60%;
  height: 120%;
  transform: skewX(-20deg);
  background: linear-gradient(90deg, rgba(255,255,255,0.02), rgba(255,255,255,0.6), rgba(255,255,255,0.02));
  mix-blend-mode: overlay;
  pointer-events: none;
  opacity: 0;
  z-index: 10;
  filter: blur(8px);
  animation: shimmer-sweep 850ms ease-in-out forwards;
}

@keyframes shimmer-sweep {
  0% { left: -40%; opacity: 0; }
  15% { opacity: 0.6; }
  60% { left: 120%; opacity: 0.25; }
  100% { left: 120%; opacity: 0; }
}

/* subtle flicker via transform jitter */
.hero-shimmer.jitter {
  animation: hero-jitter 850ms linear both;
}
@keyframes hero-jitter {
  0% { transform: translateY(0) scale(1); }
  20% { transform: translateY(-2px) scale(1.01); }
  40% { transform: translateY(1px) scale(0.995); }
  60% { transform: translateY(-1px) scale(1.002); }
  100% { transform: translateY(0) scale(1); }
}

/* Reliable neon pulse effect for hero title */
.hero-neon {
  animation: none !important;
  text-shadow: none !important;
}
.scramble-char {
  display: inline-block;
  color: inherit;
  min-width: 0.5ch;
}
@keyframes neon-pulse {
  0% { text-shadow: 0 0 6px rgba(198,255,74,0.12), 0 0 12px rgba(255,255,255,0.03); }
  50% { text-shadow: 0 0 12px rgba(198,255,74,0.3), 0 0 20px rgba(59,232,255,0.18); }
  100% { text-shadow: 0 0 6px rgba(198,255,74,0.12), 0 0 12px rgba(255,255,255,0.03); }
}

/* optional scanline overlay during pulse */
.hero-neon::after {
  content: '';
  position: absolute;
  left: 0; top: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 2;
  background: linear-gradient(180deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.01) 100%);
  mix-blend-mode: screen; opacity: 0;
  transform: translateY(-10%);
  animation: none;
}


@keyframes neon-flicker {
  0%, 100% { opacity: 1; filter: brightness(1.12) saturate(1.08); }
  8% { opacity: 0.84; filter: brightness(0.86) saturate(0.95); }
  16% { opacity: 1; filter: brightness(1.18) saturate(1.12); }
  24% { opacity: 0.9; filter: brightness(0.96) saturate(1.02); }
  52% { opacity: 1; filter: brightness(1.2) saturate(1.15); }
  72% { opacity: 0.92; filter: brightness(0.92) saturate(1.03); }
}

@keyframes hue-glow {
  0%, 100% { filter: hue-rotate(0deg); }
  50% { filter: hue-rotate(10deg); }
}

@keyframes text-glitch {
  0%, 100% { text-shadow: 0 0 18px rgba(255,255,255,0.92), 0 0 32px rgba(255,255,255,0.3); }
  10% { text-shadow: 0 0 24px rgba(198,255,74,0.85), -2px 0 8px rgba(198,255,74,0.6); }
  20% { text-shadow: 0 0 22px rgba(198,255,74,0.78), 2px 0 8px rgba(198,255,74,0.55); }
  30% { text-shadow: 0 0 30px rgba(198,255,74,0.9), 0 0 40px rgba(59,232,255,0.4); }
  40% { text-shadow: 0 0 20px rgba(198,255,74,0.75), 0 0 30px rgba(255,255,255,0.22); }
  60% { text-shadow: 0 0 26px rgba(198,255,74,0.85), 0 0 36px rgba(255,255,255,0.32); }
  80% { text-shadow: 0 0 24px rgba(198,255,74,0.82), 0 0 34px rgba(255,255,255,0.28); }
}

/* ============ MISC LIVING BITS ============ */

.blink { animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.spin-slow { animation: spin-slow 16s linear infinite; }
@keyframes spin-slow { to { transform: rotate(360deg); } }

.pulse-dot { position: relative; }
.pulse-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 1px solid var(--color-lime);
  border-radius: 999px;
  animation: pulse-ring 2s ease-out infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(1.8); opacity: 0; }
}

.wa-pulse { position: relative; }
.wa-pulse::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid var(--color-lime);
  animation: pulse-ring 2.2s ease-out infinite;
}

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.floaty { animation: floaty 5s ease-in-out infinite; }


.nav-link {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-fog);
  position: relative;
  padding: 0.35rem 0;
  transition: color 0.2s;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 1px;
  width: 100%;
  background: var(--color-lime);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.nav-link:hover { color: var(--color-snow); }
.nav-link:hover::after { transform: scaleX(1); }

.svc-row { transition: background 0.25s ease; position: relative; }

.svc-row::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(198, 255, 74, 0.05), transparent 65%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
  pointer-events: none;
}

.svc-row:hover::before { transform: scaleX(1); }

.svc-row .svc-title { transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1), color 0.25s; }
.svc-row:hover .svc-title { transform: translateX(14px); color: var(--color-lime); }

.svc-row .svc-arrow { transition: transform 0.3s ease, opacity 0.25s; opacity: 0.35; }
.svc-row:hover .svc-arrow { transform: translate(6px, -6px) rotate(45deg) scale(1.15); opacity: 1; color: var(--color-lime); }

.ref-card img { transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.5s; }
.ref-card:hover img { transform: scale(1.06); filter: saturate(1.15); }

/* ============ ADMIN PAGE TWEAKS ============ */
/* Make admin pages visually simpler and present a normal, centered panel */
body.admin-page {
  background: #0b0f14; /* solid darker background for clarity */
}
/* fully hide ambient decorative layers on admin pages */
body.admin-page::before,
body.admin-page::after,
body.admin-page .grid-layer,
body.admin-page .scan-beam { display: none !important; opacity: 0 !important; }

/* Login wrapper adjustments (centered, narrower, simpler card) */
.admin-login-wrap {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(6,10,12,0.45);
}
.admin-login-wrap .max-w-md { max-width: 640px; }
.admin-login-wrap .border {
  background: #0e141a; /* slightly lighter panel */
  border-radius: 8px;
  border: 1px solid rgba(46,60,80,0.6);
  box-shadow: none;
  padding: 0;
}
.admin-login-wrap .admin-login-logo-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem;
  border-radius: 1.15rem;
  background: rgba(198,255,74,0.06);
  border: 1px solid rgba(198,255,74,0.55);
  box-shadow: 0 0 18px rgba(198,255,74,0.18);
}
.admin-login-wrap .logo-box { border:none; background:transparent; box-shadow:none; }
.admin-login-wrap .logo-box img {
  filter: brightness(1.35) saturate(1.3);
}

/* Card header and content spacing */
.admin-login-wrap .border > .flex.items-center { border-bottom: 1px solid rgba(46,60,80,0.5); }
.admin-login-wrap form.p-8 { padding: 2rem; }

/* Larger, clearer form controls */
.admin-login-wrap .field { font-size: 16px; padding: 0.9rem 1rem; }
.admin-login-wrap .btn-lime { padding: 0.9rem 1.4rem; font-size: 13px; }

@media (max-width: 640px) {
  .admin-login-wrap {
    padding: 1rem;
  }
  .admin-login-wrap .max-w-md { max-width: 92%; }
  .admin-login-wrap .border { box-shadow: none; }
  .admin-login-wrap .border > .flex.items-center {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  .admin-login-wrap .admin-login-logo-wrapper {
    margin: 0 auto;
  }
  .admin-login-wrap .kicker,
  .admin-login-wrap h1 {
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
    white-space: normal;
    text-align: center;
  }
  .admin-login-wrap .kicker {
    font-size: 0.65rem;
  }
  .admin-login-wrap h1 {
    font-size: 1.1rem;
    line-height: 1.1;
  }
  .admin-login-wrap .field,
  .admin-login-wrap .btn-lime {
    width: 100%;
    font-size: 15px;
  }
  .admin-login-wrap .btn-lime {
    white-space: normal;
  }
}

.ref-card { transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s; }
.ref-card:hover {
  border-color: var(--color-lime);
  box-shadow: 8px 8px 0 rgba(198, 255, 74, 0.14);
  transform: translate(-3px, -3px);
}

.map-dark { filter: grayscale(1) invert(0.9) hue-rotate(190deg) contrast(0.92) brightness(0.92); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.toast-in { animation: toast-in 0.3s ease both; }

html.custom-cursor,
body.custom-cursor,
html.custom-cursor *,
body.custom-cursor *,
body.custom-cursor *::before,
body.custom-cursor *::after,
.custom-cursor,
.custom-cursor *,
.custom-cursor *::before,
.custom-cursor *::after {
  cursor: none !important;
}

.cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 95;
    pointer-events: none;
    min-width: 24px;
    min-height: 24px;
    padding: 4px 7px;
    color: var(--color-lime);
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: -0.05em;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.72);
    border: 1px solid rgba(198, 255, 74, 0.85);
}

@media (pointer: coarse) {
  .cursor-dot { display: none; }
}

.chip {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.28rem 0.6rem;
  border: 1px solid;
  display: inline-block;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.02em;
  color: transparent;
  -webkit-text-stroke: 1px var(--color-line2);
  transition: -webkit-text-stroke-color 0.4s;
  user-select: none;
}
.wordmark:hover { -webkit-text-stroke-color: var(--color-lime); }

.term-line { font-family: var(--font-mono); font-size: 12.5px; line-height: 1.9; color: var(--color-fog); }
.term-line.ok { color: var(--color-lime); }

.switch {
  width: 44px;
  height: 22px;
  border: 1px solid var(--color-line2);
  background: var(--color-panel);
  position: relative;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  flex: none;
}

.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: var(--color-fog);
  transition: transform 0.2s cubic-bezier(0.2, 0.7, 0.2, 1), background 0.2s;
}

.switch.on { background: rgba(198, 255, 74, 0.12); border-color: var(--color-lime); }
.switch.on::after { transform: translateX(22px); background: var(--color-lime); }

