*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red: #c5372b;
  --red-bright: #e63946;
  --dark: #e9e6e4;
  --card: #ffffff;
  --card2: #f6f4f2;
  --border: #ded8d5;
  --text: #1a1513;
  --white: #1a1513;
  --muted: #6b6360;
  --faint: #8a8480;
  --green: #0f7055;
  --green-dark: #0f7055;
  --radius: 10px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--dark);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 15px;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ─────────────────────────────────────────────────────────────
   NAV
───────────────────────────────────────────────────────────── */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 64px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(233, 230, 228, .92);
  backdrop-filter: blur(12px);
  z-index: 100;
}

.logo {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -1px;
  color: var(--text);
}
.logo-red {
  color: var(--red);
  text-decoration: line-through;
  text-decoration-color: #7e1f14;
  text-decoration-thickness: 0.07em;
}
.logo-rest { color: var(--text); }

.nav-left { display: flex; align-items: center; gap: 28px; }
.nav-links { display: flex; align-items: center; gap: 18px; }
.nav-links a {
  font-size: 13px;
  color: var(--muted);
  transition: color .2s;
}
.nav-links a:hover { color: var(--text); }

.nav-guest { display: flex; align-items: center; gap: 10px; }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 18px;
  border-radius: 7px;
  cursor: pointer;
  transition: all .2s;
  display: inline-block;
}
.btn-ghost:hover { border-color: var(--red); color: var(--red); }

.btn-red {
  background: var(--red);
  border: 1px solid var(--red);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 20px;
  border-radius: 7px;
  cursor: pointer;
  transition: opacity .2s;
  display: inline-block;
}
.btn-red:hover { opacity: .85; }

.nav-user { display: none; align-items: center; gap: 10px; }
.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 5px 14px 5px 6px;
}
.user-chip-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.user-chip-info { line-height: 1.2; }
.user-chip-name { font-size: 13px; font-weight: 600; }
.user-chip-role {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
}
.user-chip-role.admin { color: var(--red); }
.user-chip-role.pro { color: #818cf8; }
.user-chip-role.free { color: var(--green); }

.nav-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 7px;
  cursor: pointer;
  transition: all .2s;
  display: inline-block;
}
.nav-btn:hover { color: var(--text); border-color: #b8b7b0; }
.nav-btn.danger:hover { color: #c5372b; border-color: #e6b9b4; }

/* ─────────────────────────────────────────────────────────────
   HERO
───────────────────────────────────────────────────────────── */
.hero {
  min-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 90px 40px 70px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -220px;
  left: 50%;
  transform: translateX(-50%);
  width: 820px;
  height: 820px;
  background: radial-gradient(circle, rgba(192,57,43,.10) 0, transparent 70%);
  pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }

.eyebrow {
  display: inline-block;
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
  margin-bottom: 22px;
}

h1 {
  font-size: clamp(52px, 9vw, 96px);
  font-weight: 900;
  line-height: .95;
  letter-spacing: -3px;
  margin-bottom: 28px;
}
h1 .strike {
  color: var(--red);
  text-decoration: line-through;
  text-decoration-color: var(--red);
  text-decoration-thickness: 4px;
}
.hero-sub {
  font-size: 18px;
  color: var(--muted);
  max-width: 560px;
  line-height: 1.6;
  margin: 0 auto 36px;
}
.hero-btns,
.hero-action-btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.btn-hero {
  background: var(--white);
  border: 1px solid var(--white);
  color: var(--dark);
  font-size: 15px;
  font-weight: 800;
  padding: 14px 34px;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity .2s;
}
.btn-hero:hover { opacity: .88; }
.btn-hero-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  padding: 14px 34px;
  border-radius: 8px;
  cursor: pointer;
  transition: all .2s;
}
.btn-hero-outline:hover { border-color: #b8b7b0; }
.hero-note {
  margin-top: 18px;
  font-size: 12px;
  color: var(--faint);
}
.hero-logged-in { display: none; flex-direction: column; align-items: center; gap: 16px; }
.hero-logged-in h2 { font-size: 30px; font-weight: 800; }
.hero-logged-in p { color: var(--muted); font-size: 15px; }

/* ─────────────────────────────────────────────────────────────
   SECTIONS
───────────────────────────────────────────────────────────── */
.section {
  padding: 86px 24px;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
}
.section-centered { text-align: center; }
.section-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 16px;
}
.section-title {
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 900;
  letter-spacing: -1.5px;
  margin-bottom: 52px;
  line-height: 1.1;
}

/* ─────────────────────────────────────────────────────────────
   FEATURES
───────────────────────────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2px;
}
.feat {
  background: var(--card);
  padding: 32px;
  border: 1px solid var(--border);
}
.feat-icon { font-size: 28px; margin-bottom: 16px; }
.feat h3 {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -.3px;
}
.feat p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

/* ─────────────────────────────────────────────────────────────
   PRICING
───────────────────────────────────────────────────────────── */
#pricing { max-width: 1040px; }
.pricing-intro {
  max-width: 650px;
  margin: -34px auto 34px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}
.plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 48px;
  text-align: left;
}
.plan {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  position: relative;
}
.plan.featured { border-color: var(--red); }
.plan-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 99px;
  white-space: nowrap;
}
.plan-name {
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 8px;
}
.plan-price {
  font-size: 42px;
  font-weight: 900;
  letter-spacing: -2px;
  margin-bottom: 4px;
}
.plan-price span {
  font-size: 16px;
  font-weight: 400;
  color: var(--muted);
}
.plan-desc {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 20px;
  line-height: 1.5;
}
.plan-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 24px;
}
.plan-features li {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.plan-features li::before {
  content: '✓';
  color: var(--green);
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 1px;
}
.plan-features li.no::before { content: '✕'; color: var(--faint); }
.plan-features li.no { color: var(--faint); }
.plan-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
  line-height: 1.2;
  cursor: pointer;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  transition: all .2s;
}

.plan-btn:hover {
  border-color: #b8b7b0;
}

.plan-btn.plan-btn-red {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.plan-btn.plan-btn-red:hover {
  opacity: .88;
}

.plan-note {
  font-size: 11px;
  color: var(--faint);
  margin-top: 10px;
  line-height: 1.5;
}
.compare-wrap {
  margin-top: 30px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  text-align: left;
}
.compare-head {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.compare-head h3 {
  font-size: 16px;
  font-weight: 900;
  margin-bottom: 4px;
}
.compare-head p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.compare-table th,
.compare-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.compare-table th {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 800;
  background: rgba(255,255,255,.6);
}
.compare-table tr:last-child td { border-bottom: none; }
.compare-table td:not(:first-child),
.compare-table th:not(:first-child) { text-align: center; }
.compare-feature { color: var(--text); font-weight: 600; }
.check { color: var(--green); font-weight: 900; }
.dash { color: var(--faint); }
.limit { color: var(--muted); }
.platform-note {
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid rgba(192,57,43,.35);
  background: rgba(192,57,43,.08);
  border-radius: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  text-align: left;
}
.platform-note strong { color: var(--text); }

/* ─────────────────────────────────────────────────────────────
   FOOTER
───────────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  text-align: center;
  color: var(--faint);
  font-size: 13px;
}
footer a { color: var(--muted); }

/* ─────────────────────────────────────────────────────────────
   MODAL
───────────────────────────────────────────────────────────── */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26,21,19,.55);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.overlay.open { display: flex; }
.modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 36px 36px;
  width: 100%;
  max-width: 460px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 4px;
}
.modal-close:hover { color: var(--text); background: var(--border); }
.modal-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.modal-tab {
  flex: 1;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 4px;
  cursor: pointer;
  transition: all .15s;
  margin-bottom: -1px;
  white-space: nowrap;
}
.modal-tab:hover { color: var(--text); }
.modal-tab.active { color: var(--text); border-bottom-color: var(--red); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }
.modal-title { font-size: 21px; font-weight: 900; margin-bottom: 4px; }
.modal-desc { font-size: 13px; color: var(--muted); line-height: 1.5; margin-bottom: 22px; }
.field { margin-bottom: 14px; }
.lbl {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 5px;
}
input.inp,
textarea.inp {
  width: 100%;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text);
  font-size: 14px;
  padding: 10px 13px;
  outline: none;
  transition: border-color .2s;
  font-family: inherit;
}
textarea.inp { min-height: 70px; resize: vertical; }
input.inp:focus,
textarea.inp:focus { border-color: var(--red); }
input.inp.valid { border-color: var(--green); }
input.inp.invalid { border-color: #c5372b; }
input#admin-key-inp {
  font-family: 'Courier New', monospace;
  font-size: 17px;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-align: center;
}
.key-hint, .hint { font-size: 11px; color: var(--muted); margin-top: 4px; }
.key-status { font-size: 12px; margin-top: 4px; min-height: 16px; }
.key-status.ok { color: var(--green); }
.key-status.err { color: #c5372b; }
.btn-full {
  width: 100%;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 7px;
  font-size: 15px;
  font-weight: 800;
  padding: 12px;
  cursor: pointer;
  margin-top: 6px;
  transition: opacity .2s;
}
.btn-full:hover { opacity: .88; }
.btn-full:disabled { opacity: .4; cursor: not-allowed; }
.alert {
  border-radius: 7px;
  padding: 10px 13px;
  font-size: 13px;
  margin-bottom: 14px;
  display: none;
}
.alert.err { background: #fbebeb; border: 1px solid #e6b9b4; color: #c5372b; }
.alert.ok { background: #e5f4e4; border: 1px solid #b5d9b3; color: var(--green); }
.step-dots { display: flex; gap: 6px; margin-bottom: 20px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); transition: background .3s; }
.dot.active { background: var(--red); }
.dot.done { background: var(--green); }
.small-link { font-size: 12px; color: var(--muted); text-align: center; margin-top: 14px; }
.small-link a { color: var(--red); text-decoration: none; }
.small-link a:hover { text-decoration: underline; }

/* ─────────────────────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .plans { grid-template-columns: 1fr; }
  .compare-wrap { overflow-x: auto; }
  .compare-table { min-width: 680px; }
}
@media (max-width: 780px) {
  nav { padding: 0 20px; }
  .nav-left { gap: 16px; }
  .nav-links { display: none; }
}
@media (max-width: 560px) {
  h1 { font-size: 48px; letter-spacing: -2px; }
  .hero { padding-left: 22px; padding-right: 22px; }
  .nav-guest { gap: 6px; }
  .btn-ghost, .btn-red { padding-left: 12px; padding-right: 12px; }
  .features-grid { grid-template-columns: 1fr; }
  .modal { padding: 28px 22px 30px; }
}
