/* GAZIFICATOR site - single stylesheet, no framework */

:root {
  --bg: #0c0d10;
  --bg-raise: #14161b;
  --bg-sink: #08090b;
  --line: #23262e;
  --line-soft: #1a1d23;
  --fg: #e8eaee;
  --fg-dim: #9aa1ad;
  --fg-faint: #6b7280;
  --accent: #ff7a2f;
  --accent-dim: #b8531c;
  --accent-fg: #120801;
  --ok: #3fbf7f;
  --warn: #e0a33a;
  --err: #e5544b;
  --radius: 10px;
  --wrap: 1080px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.6 var(--sans);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.25; font-weight: 650; letter-spacing: -0.01em; }
h1 { font-size: 2rem; margin: 0 0 1rem; }
h2 { font-size: 1.35rem; margin: 2.2rem 0 0.8rem; }
h3 { font-size: 1.05rem; margin: 1.6rem 0 0.5rem; }

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

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */

.site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(12, 13, 16, 0.9);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 0.95rem;
}
.brand:hover { text-decoration: none; color: var(--accent); }
.brand img { display: block; }

.site-nav { display: flex; gap: 22px; flex-wrap: wrap; margin-left: auto; }
.site-nav a { color: var(--fg-dim); font-size: 0.93rem; }
.site-nav a:hover { color: var(--fg); text-decoration: none; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 62vh;
  display: grid;
  place-items: center;
  text-align: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero video,
.hero .hero-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero .veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(8, 9, 11, 0.55) 0%, rgba(8, 9, 11, 0.72) 60%, var(--bg) 100%);
}

.hero-inner { position: relative; z-index: 2; padding: 80px 20px; }
.hero-inner h1 { font-size: clamp(2.2rem, 6vw, 4rem); margin: 0 0 0.4rem; letter-spacing: 0.02em; }
.hero-inner p { color: #cfd4dc; font-size: clamp(1rem, 2.2vw, 1.25rem); margin: 0 auto 1.8rem; max-width: 46ch; }

.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-status { color: #fff; font-weight: 700; font-size: clamp(1.8rem, 4.8vw, 3.2rem); line-height: 1.25; letter-spacing: 0.02em; }

@media (prefers-reduced-motion: reduce) {
  .hero video { display: none; }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-raise);
  color: var(--fg);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}
.btn:hover { border-color: var(--fg-faint); text-decoration: none; }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-fg);
}
.btn-primary:hover { background: #ff8c4a; border-color: #ff8c4a; }

.btn[disabled], .btn.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.btn-wide { width: 100%; }

/* ---------- sections ---------- */

main { flex: 1 0 auto; }

.section { padding: 56px 0; }
.section-head { text-align: center; max-width: 60ch; margin: 0 auto 34px; }
.section-head p { color: var(--fg-dim); }

/* ---------- pricing ---------- */

.tiers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(228px, 1fr));
  gap: 18px;
  align-items: stretch;
}

.tier {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raise);
  padding: 22px;
}
.tier.is-featured { border-color: var(--accent-dim); }

.tier h3 { margin: 0 0 6px; font-size: 1.1rem; }
.tier .price { font-size: 2rem; font-weight: 700; margin: 6px 0 2px; }
.tier .price small { font-size: 0.85rem; font-weight: 400; color: var(--fg-faint); }
.tier .blurb { color: var(--fg-dim); font-size: 0.9rem; margin: 0 0 14px; min-height: 3.2em; }
.tier ul { list-style: none; padding: 0; margin: 0 0 20px; }
.tier li { color: var(--fg-dim); font-size: 0.9rem; padding: 5px 0 5px 18px; position: relative; }
.tier li::before { content: "+"; position: absolute; left: 0; color: var(--accent); }
.tier .tier-foot { margin-top: auto; }

/* ---------- forms ---------- */

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px 18px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }

label { font-size: 0.85rem; color: var(--fg-dim); font-weight: 600; }

input[type="text"], input[type="email"], input[type="number"], select, textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-sink);
  color: var(--fg);
  font: inherit;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent-dim);
}
input:disabled { opacity: 0.5; }
input.invalid { border-color: var(--err); }

.hint { font-size: 0.8rem; color: var(--fg-faint); }

.check { display: flex; align-items: center; gap: 9px; }
.check label { font-weight: 500; color: var(--fg); font-size: 0.95rem; }
.check input { width: auto; }

.total-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  margin-top: 26px;
  padding-top: 18px;
}
.total-row .total { font-size: 1.5rem; font-weight: 700; }

.form-error {
  color: var(--err);
  font-size: 0.9rem;
  min-height: 1.4em;
  margin: 10px 0 0;
}

fieldset { border: 0; padding: 0; margin: 0; }

/* ---------- tables ---------- */

.table-scroll { overflow-x: auto; }

table.grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
}
table.grid th, table.grid td {
  text-align: left;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}
table.grid th { color: var(--fg-faint); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
table.grid td .btn { padding: 7px 14px; font-size: 0.88rem; font-weight: 500; }

.rel-name { font-weight: 600; }
.rel-type { color: var(--fg-faint); font-size: 0.82rem; }
.rel-build { color: var(--fg-faint); font-family: var(--mono); font-size: 0.82rem; }
.row-beta .rel-type { color: var(--warn); }
.na { color: var(--fg-faint); }

/* ---------- prose ---------- */

.prose { padding: 48px 20px 64px; max-width: 78ch; }
.prose p, .prose li { color: #c6cbd4; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin: 0.35rem 0; }
.prose strong { color: var(--fg); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

.callout {
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  background: var(--bg-raise);
  padding: 14px 18px;
  margin: 22px 0;
}
.callout p:last-child { margin-bottom: 0; }
.callout p:first-child { margin-top: 0; }

.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 0 42px;
  margin: 0 0 18px;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--bg-raise);
  border: 1px solid var(--line);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
}

pre.sample, code.sample {
  display: block;
  background: var(--bg-sink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  overflow-x: auto;
  font-size: 0.9rem;
  color: var(--fg);
}

/* ---------- footer ---------- */

.site-foot {
  flex-shrink: 0;
  border-top: 1px solid var(--line);
  margin-top: 40px;
  padding: 26px 20px;
  background: var(--bg-sink);
}
.foot-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  display: flex;
  gap: 16px 28px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}
.foot-copy { color: var(--fg-faint); font-size: 0.85rem; margin: 0; }
.foot-links, .foot-social { display: flex; gap: 18px; flex-wrap: wrap; }
.foot-links a, .foot-social a { color: var(--fg-dim); font-size: 0.85rem; }
.foot-links a:hover, .foot-social a:hover { color: var(--fg); text-decoration: none; }

/* ---------- error pages ---------- */

.oops { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 20px; }
.oops .code { font-size: 4rem; font-weight: 700; color: var(--accent); line-height: 1; }
.oops p { color: var(--fg-dim); }

/* ---------- admin views ---------- */

body.admin { padding: 24px; display: block; }
body.admin h1 { font-size: 1.3rem; }
body.admin h2 { font-size: 1rem; color: var(--fg-dim); }
body.admin pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--bg-sink);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  font-size: 0.8rem;
}
table.admin-table {
  border-collapse: collapse;
  font-size: 0.76rem;
  font-family: var(--mono);
  width: 100%;
}
table.admin-table th, table.admin-table td {
  border: 1px solid var(--line);
  padding: 4px 7px;
  text-align: left;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
table.admin-table th { background: var(--bg-raise); color: var(--fg-dim); position: sticky; top: 0; cursor: pointer; user-select: none; }
table.admin-table.fixed { table-layout: fixed; }
table.admin-table.fixed th, table.admin-table.fixed td { max-width: none; }
table.admin-table th[aria-sort="ascending"]::after { content: " \25B2"; }
table.admin-table th[aria-sort="descending"]::after { content: " \25BC"; }
table.admin-table .col-grip { position: absolute; top: 0; right: -3px; width: 7px; height: 100%; cursor: col-resize; z-index: 1; }
table.admin-table .col-grip:hover { background: var(--accent); opacity: 0.5; }
table.admin-table th.dragging { opacity: 0.4; }
table.admin-table th.drop-target { outline: 2px solid var(--accent); outline-offset: -2px; }
.admin-scroll { overflow: auto; max-height: calc(100vh - 110px); }
table.admin-table details pre { white-space: pre-wrap; max-width: 60ch; }

/* ---------- small screens ---------- */

@media (max-width: 640px) {
  .site-head { padding: 12px 16px; }
  .site-nav { gap: 14px; width: 100%; }
  .section { padding: 40px 0; }
  .hero { min-height: 52vh; }
  .foot-inner { flex-direction: column; align-items: flex-start; }
}

/* ---------- utilities ---------- */

.narrow { max-width: 62ch; margin-left: auto; margin-right: auto; }
.center { text-align: center; }
.pad-top { margin-top: 28px; }
