/* Geist font */
@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600&family=Geist+Mono:wght@400&display=swap');

/* ─── Design Tokens ─────────────────────────────── */
:root {
  /* Text */
  --ink: #f1f5f9;
  --ink-muted: rgba(241, 245, 249, 0.6);
  --ink-subtle: rgba(241, 245, 249, 0.32);

  /* Glass surfaces */
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-bg-hover: rgba(255, 255, 255, 0.07);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-strong: rgba(255, 255, 255, 0.16);

  /* Inputs */
  --input-bg: rgba(255, 255, 255, 0.05);
  --input-border: rgba(255, 255, 255, 0.11);
  --input-border-focus: rgba(99, 179, 237, 0.75);
  --input-shadow-focus: 0 0 0 3px rgba(99, 179, 237, 0.12);

  /* Accent */
  --accent: #63b3ed;
  --accent-glow: rgba(99, 179, 237, 0.14);
  --accent-border: rgba(99, 179, 237, 0.28);

  /* Semantic */
  --success: #68d391;
  --error: #fc8181;
  --warning: #f6ad55;

  /* Spacing (4 px base) */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-6: 24px;
  --s-8: 32px;
  --s-10: 40px;
  --s-12: 48px;
  --s-16: 64px;
  --s-24: 96px;

  /* Legacy aliases */
  --space-xxs: var(--s-1);
  --space-xs:  var(--s-2);
  --space-sm:  var(--s-3);
  --space-md:  var(--s-4);
  --space-lg:  var(--s-6);
  --space-xl:  var(--s-8);
  --space-2xl: var(--s-10);
  --space-3xl: var(--s-12);
  --space-4xl: var(--s-16);
  --space-5xl: var(--s-24);

  /* Radii */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-pill: 100px;

  /* Legacy aliases */
  --rounded-sm: var(--r-sm);
  --rounded-md: var(--r-md);
  --rounded-lg: var(--r-lg);
  --rounded-pill: var(--r-pill);
}

/* ─── Reset ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ─── Body ───────────────────────────────────────── */
body {
  font-family: 'Geist', Inter, system-ui, -apple-system, sans-serif;
  color: var(--ink);
  line-height: 1.6;
  background: radial-gradient(ellipse at 15% 10%, #0f1c30 0%, #080d18 45%, #040609 100%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── Starfield (JS injects box-shadow values) ─── */
#stars, #stars2, #stars3 {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100%; height: 100%;
}
#stars {
  width: 1px; height: 1px;
  background: transparent;
  animation: animStar 50s linear infinite;
}
#stars::after {
  content: " ";
  position: absolute;
  top: 2000px;
  width: 1px; height: 1px;
  background: transparent;
}
#stars2 {
  width: 2px; height: 2px;
  background: transparent;
  animation: animStar 100s linear infinite;
}
#stars2::after {
  content: " ";
  position: absolute;
  top: 2000px;
  width: 2px; height: 2px;
  background: transparent;
}
#stars3 {
  width: 3px; height: 3px;
  background: transparent;
  animation: animStar 150s linear infinite;
}
#stars3::after {
  content: " ";
  position: absolute;
  top: 2000px;
  width: 3px; height: 3px;
  background: transparent;
}
@keyframes animStar {
  from { transform: translateY(0px); }
  to   { transform: translateY(-2000px); }
}

/* ─── Links ──────────────────────────────────────── */
a {
  color: var(--ink-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover { color: var(--ink); }

/* ─── No spinners on number inputs ───────────────── */
input[type="number"] { -moz-appearance: textfield; }
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ─── Input group (label + field) ───────────────── */
.input-group {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
}

.input-group label {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-subtle);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: 'Geist Mono', ui-monospace, monospace;
}

.calc-input {
  width: 100%;
  height: 46px;
  padding: 0 var(--s-4);
  border: 1px solid var(--input-border);
  border-radius: var(--r-md);
  background: var(--input-bg);
  color: var(--ink);
  font-family: 'Geist', inherit;
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.calc-input:focus {
  border-color: var(--input-border-focus);
  background: rgba(99, 179, 237, 0.04);
  box-shadow: var(--input-shadow-focus);
}
.calc-input:hover:not(:focus) {
  border-color: rgba(255, 255, 255, 0.2);
}
.calc-input::placeholder {
  color: var(--ink-subtle);
  font-size: 15px;
}

/* ─── Utility ────────────────────────────────────── */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}
