/* ==========================================================================
   PygonX — design tokens
   Palette pulled from the logo: deep slate-navy snake, two-tone circuit
   green, amber plug accent, dotted "paper" background.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;600;700;800&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --ink: #173A56;
  --ink-soft: #2C5573;
  --ink-faint: #6E8AA0;
  --leaf: #2E9E5B;
  --leaf-deep: #1F7A45;
  --leaf-light: #4FC383;
  --amber: #F4A623;
  --amber-deep: #DB8E12;
  --paper: #F6F8F9;
  --mist: #EAF0F2;
  --white: #FFFFFF;
  --danger: #D6483F;
  --danger-soft: #FBE8E6;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 8px rgba(23, 58, 86, 0.06);
  --shadow: 0 10px 30px rgba(23, 58, 86, 0.10);
  --shadow-lg: 0 20px 50px rgba(23, 58, 86, 0.16);

  --font-display: 'Baloo 2', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(circle, rgba(23,58,86,0.10) 1px, transparent 1.2px);
  background-size: 22px 22px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brandword {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
}

p { line-height: 1.6; color: var(--ink-soft); margin: 0 0 1em; }
a { color: var(--leaf-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

code, pre, .mono { font-family: var(--font-mono); }

:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------- layout shells ---------- */
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

.topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: rgba(246,248,249,0.88);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(23,58,86,0.08);
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 34px; width: auto; display: block; }
.brand .brandword { font-size: 22px; }
.brand .brandword .x-letter { color: var(--leaf); }

.navlinks { display: flex; align-items: center; gap: 8px; }

/* ---------- buttons ---------- */
.btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14.5px;
  border: none;
  border-radius: var(--radius-sm);
  padding: 11px 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--leaf); color: var(--white); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--leaf-deep); }

.btn-amber { background: var(--amber); color: var(--ink); box-shadow: var(--shadow-sm); }
.btn-amber:hover { background: var(--amber-deep); }

.btn-ghost { background: transparent; color: var(--ink-soft); }
.btn-ghost:hover { background: var(--mist); }

.btn-outline { background: var(--white); color: var(--ink); border: 1.5px solid rgba(23,58,86,0.18); }
.btn-outline:hover { border-color: var(--ink-faint); }

.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover { background: #f6d3d0; }

.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-sm { padding: 7px 13px; font-size: 13px; }
.btn-block { width: 100%; justify-content: center; }

/* ---------- cards / panels ---------- */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 28px;
}

.panel {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(23,58,86,0.06);
}

/* ---------- forms ---------- */
label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 6px; color: var(--ink); }
input[type=text], input[type=email], input[type=password] {
  width: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  border: 1.5px solid rgba(23,58,86,0.16);
  background: var(--white);
  color: var(--ink);
  margin-bottom: 16px;
}
input:focus { border-color: var(--leaf); outline: none; box-shadow: 0 0 0 3px rgba(46,158,91,0.15); }

.field-error { color: var(--danger); font-size: 13px; margin: -10px 0 14px; min-height: 1em; }

.banner {
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 13.5px;
  margin-bottom: 16px;
}
.banner-error { background: var(--danger-soft); color: var(--danger); }
.banner-ok { background: #E4F6EC; color: var(--leaf-deep); }

/* ---------- utility ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--leaf-deep);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--amber);
  display: inline-block;
}

.muted { color: var(--ink-faint); }
.center { text-align: center; }
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }

.skeleton {
  background: linear-gradient(90deg, var(--mist) 25%, #f3f6f7 37%, var(--mist) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
