/* ═══════════════════════════════════════════════════════
   SCHULTZ83 — Design System v2
   Clean · Modern · Premium
═══════════════════════════════════════════════════════ */

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

/* ── TOKENS ── */
:root {
  /* Colors */
  --bg:          #F8F7F5;
  --bg-subtle:   #F1EFEB;
  --surface:     #FFFFFF;
  --surface-2:   #FAFAF9;
  --border:      #E5E2DD;
  --border-strong: #D0CCC5;
  --text:        #1C1917;
  --text-2:      #44403C;
  --muted:       #78716C;
  --muted-light: #A8A29E;

  /* Accent — warm amber/copper */
  --accent:      #D97706;
  --accent-dark: #B45309;
  --accent-light: #FEF3C7;
  --accent-glow: rgba(217,119,6,0.12);

  /* Status */
  --green:       #16A34A;
  --green-bg:    #F0FDF4;
  --green-border: #BBF7D0;
  --red:         #DC2626;
  --red-bg:      #FEF2F2;
  --red-border:  #FECACA;
  --yellow:      #CA8A04;
  --yellow-bg:   #FEFCE8;
  --yellow-border: #FEF08A;

  /* Typography */
  --font-display: 'Syne', sans-serif;
  --font-body:    'Inter', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;
  --font-logo:    'Anybody', cursive;

  /* Geometry */
  --r-sm:  6px;
  --r:     10px;
  --r-lg:  16px;
  --r-xl:  24px;

  /* Shadows */
  --shadow-xs:  0 1px 2px rgba(0,0,0,0.05);
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg:  0 8px 32px rgba(0,0,0,0.10), 0 4px 8px rgba(0,0,0,0.05);
  --shadow-accent: 0 4px 20px rgba(217,119,6,0.20);

  /* Nav */
  --nav-h: 60px;
}

[data-theme="dark"] {
  --bg:          #0F0E0C;
  --bg-subtle:   #171512;
  --surface:     #1C1A17;
  --surface-2:   #231F1B;
  --border:      #2E2A25;
  --border-strong: #3D3830;
  --text:        #F5F0E8;
  --text-2:      #D6D0C8;
  --muted:       #8B7E72;
  --muted-light: #6B5D52;

  --accent:      #F59E0B;
  --accent-dark: #D97706;
  --accent-light: rgba(245,158,11,0.12);
  --accent-glow: rgba(245,158,11,0.15);

  --green:       #22C55E;
  --green-bg:    rgba(22,163,74,0.12);
  --green-border: rgba(22,163,74,0.25);
  --red:         #EF4444;
  --red-bg:      rgba(220,38,38,0.12);
  --red-border:  rgba(220,38,38,0.25);
  --yellow:      #EAB308;
  --yellow-bg:   rgba(202,138,4,0.12);
  --yellow-border: rgba(202,138,4,0.25);

  --shadow-xs:  0 1px 2px rgba(0,0,0,0.20);
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.25), 0 1px 2px rgba(0,0,0,0.15);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.30), 0 2px 4px rgba(0,0,0,0.15);
  --shadow-lg:  0 8px 32px rgba(0,0,0,0.40), 0 4px 8px rgba(0,0,0,0.20);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  transition: background .3s, color .3s;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ── TEXTURE ── */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpath d='M0 0h60v60H0z' fill='none'/%3E%3Ccircle cx='30' cy='30' r='.5' fill='%23000' opacity='.025'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 0;
}

/* ══════════════════════════════════════
   NAVIGATION
══════════════════════════════════════ */
.nav {
  position: sticky; top: 0; z-index: 3000;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem;
  background: rgba(248,247,245,0.85);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  transition: background .3s, border-color .3s;
}
[data-theme="dark"] .nav {
  background: rgba(15,14,12,0.85);
}
.nav-logo {
  font-family: var(--font-logo);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: .01em;
  display: flex; align-items: center; gap: .4rem;
}
.nav-logo-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  margin-bottom: 1px;
}
.nav-center {
  display: flex; gap: .25rem; list-style: none; align-items: center;
}
.nav-center a {
  font-size: .85rem; font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  padding: .45rem .85rem;
  border-radius: var(--r-sm);
  transition: color .2s, background .2s;
  letter-spacing: -.01em;
}
.nav-center a:hover { color: var(--text); background: var(--bg-subtle); }
.nav-center a.active {
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--border);
}
.nav-right { display: flex; align-items: center; gap: .5rem; }
.nav-theme-btn {
  width: 36px; height: 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  cursor: pointer; color: var(--muted); font-size: .9rem;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s; box-shadow: var(--shadow-xs);
}
.nav-theme-btn:hover { border-color: var(--accent); color: var(--accent); }
.nav-hamburger {
  display: none; width: 36px; height: 36px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-sm); cursor: pointer; color: var(--muted);
  align-items: center; justify-content: center; font-size: 1rem;
  transition: all .2s;
}
.nav-mobile {
  display: none; position: fixed; top: var(--nav-h); left: 0; right: 0; z-index: 199;
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: .75rem; box-shadow: var(--shadow-lg);
  flex-direction: column; gap: .25rem;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  font-size: .9rem; font-weight: 500; color: var(--text-2);
  text-decoration: none; padding: .65rem 1rem; border-radius: var(--r-sm);
  transition: background .2s, color .2s;
}
.nav-mobile a:hover, .nav-mobile a.active { background: var(--bg-subtle); color: var(--text); }
@media (max-width: 768px) {
  .nav-center { display: none; }
  .nav-hamburger { display: flex; }
}
@media (max-width: 480px) {
  .nav { padding: 0 1rem; }
}

/* ══════════════════════════════════════
   SHARED LAYOUT
══════════════════════════════════════ */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
}
.page-wrap { position: relative; z-index: 1; }

/* ── SECTION HEADINGS ── */
.section-eyebrow {
  font-family: var(--font-mono);
  font-size: .7rem; font-weight: 500;
  color: var(--accent);
  letter-spacing: .12em; text-transform: uppercase;
  margin-bottom: .75rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700; letter-spacing: -.03em;
  color: var(--text); line-height: 1.1;
}
.section-sub {
  font-size: .95rem; color: var(--muted);
  line-height: 1.7; margin-top: .75rem;
}

/* ── CARDS ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  transition: border-color .2s, box-shadow .2s, transform .2s;
  overflow: hidden;
}
.card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.card-pad { padding: 1.5rem; }

/* ── TAGS ── */
.tag {
  display: inline-flex; align-items: center;
  font-size: .75rem; font-weight: 500; font-family: var(--font-mono);
  padding: .3rem .7rem; border-radius: 100px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: var(--surface);
  transition: all .2s; white-space: nowrap;
}
.tag:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.tag-accent { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.tag-list { display: flex; flex-wrap: wrap; gap: .4rem; }

/* ── STATUS INDICATORS ── */
.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  display: inline-block; flex-shrink: 0;
}
.status-dot.green  { background: var(--green); box-shadow: 0 0 6px var(--green); animation: pulse 2s infinite; }
.status-dot.red    { background: var(--red); }
.status-dot.yellow { background: var(--yellow); animation: blink .9s infinite; }

.status-badge {
  display: inline-flex; align-items: center; gap: .35rem;
  font-family: var(--font-mono); font-size: .68rem; font-weight: 500;
  padding: .2rem .65rem; border-radius: 100px;
  letter-spacing: .04em; text-transform: uppercase;
  border: 1px solid;
}
.status-badge.online  { color: var(--green);  border-color: var(--green-border);  background: var(--green-bg); }
.status-badge.offline { color: var(--red);    border-color: var(--red-border);    background: var(--red-bg); }
.status-badge.checking { color: var(--yellow); border-color: var(--yellow-border); background: var(--yellow-bg); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-body); font-size: .88rem; font-weight: 500;
  padding: .65rem 1.25rem; border-radius: var(--r);
  cursor: pointer; transition: all .2s; text-decoration: none;
  white-space: nowrap; letter-spacing: -.01em;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--text); color: var(--bg);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--accent); box-shadow: var(--shadow-accent); }
.btn-accent {
  background: var(--accent); color: white;
  box-shadow: var(--shadow-accent);
}
.btn-accent:hover { background: var(--accent-dark); }
.btn-ghost {
  background: var(--surface); color: var(--text-2);
  border-color: var(--border); box-shadow: var(--shadow-xs);
}
.btn-ghost:hover { border-color: var(--border-strong); color: var(--text); }
.btn-sm { font-size: .8rem; padding: .45rem .9rem; }

/* ── FORMS ── */
.form-label {
  font-family: var(--font-mono); font-size: .68rem; font-weight: 500;
  color: var(--muted); letter-spacing: .1em; text-transform: uppercase;
  display: block; margin-bottom: .4rem;
}
.form-input, .form-textarea {
  width: 100%; background: var(--bg-subtle); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: .65rem .85rem;
  color: var(--text); font-family: var(--font-body); font-size: .9rem;
  outline: none; transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none;
}
.form-input:focus, .form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-textarea { resize: vertical; min-height: 100px; }
.form-group { margin-bottom: 1.1rem; }

/* ── DIVIDER ── */
.divider {
  border: none; height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 2rem 0;
}

/* ── FOOTER ── */
.footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--border);
  padding: 2.5rem 2rem;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
}
.footer-left {
  font-family: var(--font-logo); font-size: .8rem; color: var(--muted);
  letter-spacing: .01em;
}
.footer-left a { color: var(--accent); text-decoration: none; }
.footer-links { display: flex; gap: 1.25rem; }
.footer-links a {
  font-size: .82rem; color: var(--muted); text-decoration: none;
  transition: color .2s;
}
.footer-links a:hover { color: var(--text); }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 4px var(--green); }
  50%       { box-shadow: 0 0 10px var(--green), 0 0 20px rgba(22,163,74,.3); }
}
@keyframes blink {
  0%, 100% { opacity: 1; } 50% { opacity: .35; }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── SCROLL FADE-IN UTILITY ── */
.reveal {
  opacity: 0; transform: translateY(20px);
  transition: opacity .5s ease, transform .5s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ── MODAL ── */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 800;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(8px);
  align-items: flex-start; justify-content: center;
  padding: 1.5rem; overflow-y: auto;
}
.modal-overlay.open { display: flex; animation: fadeIn .2s ease; }
.modal-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: 2rem;
  width: 100%; max-width: 440px; box-shadow: var(--shadow-lg);
  animation: slideDown .25s ease;
  margin: auto;
}
.modal-title {
  font-family: var(--font-display); font-size: 1.3rem; font-weight: 700;
  letter-spacing: -.03em; color: var(--text); margin-bottom: 1.5rem;
}
.modal-actions { display: flex; gap: .6rem; justify-content: flex-end; margin-top: 1.5rem; }
.form-error {
  font-family: var(--font-mono); font-size: .72rem; color: var(--red);
  margin-top: .5rem; display: none;
}

/* ══════════════════════════════════════
   RESPONSIVE HELPERS
══════════════════════════════════════ */
@media (max-width: 600px) {
  .footer { flex-direction: column; align-items: flex-start; }
  .footer-links { flex-wrap: wrap; gap: .75rem; }
}
