/* petfinder.ai — shared base: design tokens, reset and components used by the site and the dashboard.
   The look intentionally mirrors bartosziwanczyk.me (Geist + Geist Mono, violet → teal, aurora + grid). */

:root {
  color-scheme: dark;
  --bg: #07070B;
  --surface: rgba(255, 255, 255, .035);
  --surface-solid: #101018;
  --border: rgba(255, 255, 255, .08);
  --border-strong: rgba(255, 255, 255, .16);
  --ink: #F4F4F7;
  --ink-2: #A1A1B5;
  --violet: #8B7CFF;
  --teal: #3DDBD9;
  --lime: #C8F560;
  --on-lime: #07070B;
  --on-accent: #07070B;
  --good: #7BE7A2;
  --bad: #FF8F8F;
  --nav-bg: rgba(16, 16, 24, .72);
  --chip: rgba(255, 255, 255, .06);
  --chip-strong: rgba(255, 255, 255, .12);
  --grid-line: rgba(255, 255, 255, .05);
  --aurora-1: rgba(139, 124, 255, .30);
  --aurora-2: rgba(61, 219, 217, .22);
  --aurora-3: rgba(91, 75, 232, .34);
  --spot-bg: rgba(139, 124, 255, .08);
  --spot-ring: rgba(139, 124, 255, .7);
  --glow: rgba(139, 124, 255, .35);
  --live-glow: rgba(200, 245, 96, .55);
  --radar: rgba(61, 219, 217, .30);
  --map-road: rgba(255, 255, 255, .07);
  --map-main: rgba(139, 124, 255, .22);
  --map-water: rgba(61, 219, 217, .10);
  --map-park: rgba(200, 245, 96, .06);
  --shadow: inset 0 1px 0 rgba(255, 255, 255, .045), 0 24px 48px -28px rgba(0, 0, 0, .7);
  --selection: rgba(139, 124, 255, .32);
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='.04'/%3E%3C/svg%3E");

  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --maxw: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --r-tile: 20px;
  --r-inner: 12px;
  --pad: clamp(20px, 2.4vw, 30px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #F6F6FA;
  --surface: rgba(255, 255, 255, .72);
  --surface-solid: #FFFFFF;
  --border: rgba(14, 14, 22, .08);
  --border-strong: rgba(14, 14, 22, .16);
  --ink: #0E0E16;
  --ink-2: #555570;
  --violet: #5B4BE8;
  --teal: #0E7C7A;
  --lime: #3F6212;
  --on-lime: #FFFFFF;
  --on-accent: #FFFFFF;
  --good: #1F7A45;
  --bad: #C0392B;
  --nav-bg: rgba(255, 255, 255, .78);
  --chip: rgba(14, 14, 22, .05);
  --chip-strong: rgba(14, 14, 22, .10);
  --grid-line: rgba(14, 14, 22, .055);
  --aurora-1: rgba(139, 124, 255, .24);
  --aurora-2: rgba(61, 219, 217, .22);
  --aurora-3: rgba(91, 75, 232, .16);
  --spot-bg: rgba(91, 75, 232, .06);
  --spot-ring: rgba(91, 75, 232, .5);
  --glow: rgba(91, 75, 232, .28);
  --live-glow: rgba(63, 98, 18, .35);
  --radar: rgba(14, 124, 122, .22);
  --map-road: rgba(14, 14, 22, .07);
  --map-main: rgba(91, 75, 232, .18);
  --map-water: rgba(14, 124, 122, .10);
  --map-park: rgba(63, 98, 18, .08);
  --shadow: 0 1px 2px rgba(14, 14, 22, .04), 0 14px 32px -18px rgba(14, 14, 22, .18);
  --selection: rgba(91, 75, 232, .18);
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='.035'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  min-height: 100vh;
  position: relative;
  overflow-x: clip;
  background: var(--noise) var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
svg { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--selection); }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3, h4 { text-wrap: balance; }
p { text-wrap: pretty; }

.wrap { width: min(var(--maxw), 100% - 2 * var(--gutter)); margin-inline: auto; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; z-index: 100; top: 10px; left: 10px; padding: 10px 16px; border-radius: 10px;
  background: var(--ink); color: var(--bg); font-size: .9rem; text-decoration: none; transform: translateY(-200%);
}
.skip:focus { transform: none; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Background: aurora glow + faint grid */
.bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.bg::before {
  content: ""; position: absolute; inset: -12% -10% auto -10%; height: 92vh; filter: blur(20px);
  background:
    radial-gradient(40% 50% at 28% 22%, var(--aurora-3), transparent 70%),
    radial-gradient(34% 44% at 78% 26%, var(--aurora-2), transparent 70%),
    radial-gradient(46% 56% at 52% 8%, var(--aurora-1), transparent 70%);
}
.bg::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 52% at 50% 16%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 52% at 50% 16%, #000 20%, transparent 75%);
}

/* Icons, gradient text, live dot */
.i {
  width: 1.2em; height: 1.2em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.grad {
  background: linear-gradient(100deg, var(--violet), var(--teal));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.live {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none;
  background: var(--lime); animation: live 2.2s infinite;
}
@keyframes live {
  0% { box-shadow: 0 0 0 0 var(--live-glow); }
  70% { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 50px; padding: 0 24px; border-radius: 999px; border: 1px solid transparent;
  font: 500 .98rem var(--sans); letter-spacing: -.005em; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, border-color .25s, color .25s;
}
.btn .i { width: 17px; height: 17px; transition: transform .25s var(--ease); }
.btn:hover .fx { transform: translateX(3px); }
.btn-primary { background: var(--ink); color: var(--bg); box-shadow: 0 12px 36px -14px var(--glow); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 44px -14px var(--glow); }
.btn-ghost { background: var(--chip); color: var(--ink); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--chip-strong); transform: translateY(-2px); }

.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: transparent; color: var(--ink-2); cursor: pointer; transition: color .2s, background .2s;
}
.icon-btn:hover { color: var(--ink); background: var(--chip); }
.icon-btn .i { width: 18px; height: 18px; }
:root[data-theme="dark"] .i-moon, :root[data-theme="light"] .i-sun { display: none; }

.logo {
  display: inline-flex; align-items: center; white-space: nowrap;
  font-size: .98rem; letter-spacing: -.02em; color: var(--ink); text-decoration: none;
}
.logo i { width: 9px; height: 9px; margin-right: 10px; border-radius: 50%; background: linear-gradient(135deg, var(--violet), var(--teal)); box-shadow: 0 0 12px var(--glow); }
.logo b { font-weight: 600; }
.logo span { font-weight: 600; color: var(--teal); }

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