/* ── DESIGN TOKENS ───────────────────────────────────────────── */
:root {
  --c-bg:           #0D0D12;
  --c-surface:      #1A1525;
  --c-fg:           #FFFFFF;
  --c-accent:       #9B5CF6;
  --c-accent-light: #C084FC;
  --c-muted:        #9D9DB8;
  --c-border:       rgba(155, 92, 246, 0.2);

  --f-display: Arial, 'Helvetica Neue', Helvetica, sans-serif;
  --f-mono:    Arial, 'Helvetica Neue', Helvetica, sans-serif;

  /* type scale */
  --s-10:   0.625rem;
  --s-11:   0.6875rem;
  --s-13:   0.8125rem;
  --s-15:   0.9375rem;
  --s-20:   1.25rem;
  --s-28:   1.75rem;
  --s-36:   2.25rem;
  --s-hero: clamp(3rem, 7.5vw, 6.5rem);

  --max-w:     1160px;
  --gutter:    clamp(1.25rem, 5vw, 3.5rem);
  --section-v: clamp(3.5rem, 7vw, 6rem);

  --banner-h: 33px;
  --nav-h:    52px;
}

/* ── RESET ───────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--f-mono);
  font-size: var(--s-15);
  background: var(--c-bg);
  color: var(--c-fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a  { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ── LAYOUT ──────────────────────────────────────────────────── */
.wrap {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.eyebrow {
  font-family: var(--f-mono);
  font-size: var(--s-11);
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--c-muted);
}

/* ── DEMO BANNER ─────────────────────────────────────────────── */
.demo-banner {
  position: sticky;
  top: 0;
  z-index: 300;
  background: var(--c-surface);
  color: var(--c-accent);
  font-family: var(--f-mono);
  font-size: var(--s-11);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  padding: 8px;
  height: var(--banner-h);
}

/* ── NAV ─────────────────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--nav-h);
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: var(--gutter);
}

.nav-brand {
  font-family: var(--f-mono);
  font-size: var(--s-13);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nav-brand em { font-style: normal; color: var(--c-accent); }

.nav-links { display: flex; gap: 2rem; align-items: center; }

/* Covers both public <a> links and admin <button> nav items */
.nav-links a,
.nav-links button.nav-item {
  font-family: var(--f-mono);
  font-size: var(--s-13);
  color: var(--c-muted);
  letter-spacing: 0.04em;
  transition: color 0.15s;
}
.nav-links button.nav-item {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-links a:hover,              .nav-links a.active,
.nav-links button.nav-item:hover, .nav-links button.nav-item.active { color: var(--c-fg); }

.badge {
  background: var(--c-accent);
  color: #fff;
  font-size: var(--s-10);
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  margin-left: 4px;
  vertical-align: middle;
}

/* ── SECTIONS ────────────────────────────────────────────────── */
.section-outer { border-bottom: 1px solid var(--c-border); }
.section-inner { padding-block: var(--section-v); }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--c-border);
  flex-wrap: wrap;
}
.section-num {
  font-family: var(--f-mono);
  font-size: var(--s-11);
  color: var(--c-muted);
  letter-spacing: 0.1em;
}
.section-title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: var(--s-28);
  letter-spacing: -0.01em;
  line-height: 1;
}

/* ── FORMS ───────────────────────────────────────────────────── */
label, .field-label {
  font-family: var(--f-mono);
  font-size: var(--s-11);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-muted);
}

input[type=text], input[type=email], input[type=tel],
input[type=number], input[type=password], textarea, select {
  background: transparent;
  border: 1px solid var(--c-border);
  border-radius: 0;
  color: var(--c-fg);
  font-family: var(--f-mono);
  font-size: var(--s-13);
  padding: 0.75rem 0.875rem;
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--c-muted); }
input::placeholder, textarea::placeholder { color: var(--c-muted); opacity: 0.4; }
select { cursor: pointer; }
select option { background: var(--c-bg); }
textarea { resize: vertical; }

/* ── TAGS ────────────────────────────────────────────────────── */
.tag {
  font-family: var(--f-mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--c-muted);
  border: 1px solid var(--c-border);
  padding: 2px 8px;
}

/* ── CREDITS ─────────────────────────────────────────────────── */
.credits {
  border-top: 1px solid var(--c-border);
  padding: 1.25rem var(--gutter);
  display: flex;
  justify-content: center;
}

.credits-inner {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  text-decoration: none;
  opacity: 0.5;
  transition: opacity 0.2s;
}
.credits-inner:hover { opacity: 1; }

.credits-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.credits-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.credits-label {
  font-family: var(--f-mono);
  font-size: var(--s-10);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-muted);
}

.credits-name {
  font-family: var(--f-mono);
  font-size: var(--s-13);
  font-weight: 700;
  color: var(--c-fg);
  letter-spacing: 0.03em;
}

.credits-url {
  font-family: var(--f-mono);
  font-size: var(--s-11);
  color: var(--c-accent);
  letter-spacing: 0.04em;
}

/* ── SAFE-AREA INSETS (notch / home indicator) ───────────────── */
@supports (padding: env(safe-area-inset-left)) {
  .demo-banner, nav {
    padding-left: max(var(--gutter), env(safe-area-inset-left));
    padding-right: max(var(--gutter), env(safe-area-inset-right));
  }
  .wrap {
    padding-left: max(var(--gutter), env(safe-area-inset-left));
    padding-right: max(var(--gutter), env(safe-area-inset-right));
  }
}
