@font-face {
  font-family: 'Geologica';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/geologica-cyr.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Geologica';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/geologica-lat.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF;
}
@font-face {
  font-family: 'Plex Mono';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/plexmono-cyr.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Plex Mono';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/plexmono-lat.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF;
}

:root {
  color-scheme: dark;
  --bg: #0D0A08;
  --bg-deep: #070504;
  --panel: rgba(255, 245, 236, 0.055);
  --panel-hover: rgba(255, 246, 238, 0.095);
  --surface: rgba(255, 244, 234, 0.055);
  --sep: rgba(255, 242, 230, 0.14);
  --sep-strong: rgba(255, 244, 234, 0.28);
  --spec-top: rgba(255, 250, 245, 0.36);
  --spec-bot: rgba(242, 162, 82, 0.18);
  --rim-grad: linear-gradient(135deg, rgba(255, 252, 248, 0.50) 0%, rgba(255, 240, 224, 0.12) 30%, rgba(255, 240, 224, 0.04) 55%, rgba(242, 158, 76, 0.24) 85%, rgba(255, 250, 244, 0.34) 100%);
  --text: #F6EDE4;
  --text-2: #D9C9BA;
  --muted: #A99787;
  --accent: #F09348;
  --accent-dim: rgba(236, 134, 62, 0.18);
  --accent-border: rgba(246, 158, 88, 0.44);
  --green: #4ADE80;
  --red: #FF6B60;
  --sans: 'Geologica', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --mono: 'Plex Mono', ui-monospace, 'SF Mono', Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.55;
  overflow-x: hidden;
}

.glass-env {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: radial-gradient(120% 90% at 50% 0%, var(--bg) 0%, var(--bg-deep) 100%);
}
.glass-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(44px);
  will-change: transform;
}
.glass-orb-1 {
  width: 44vmax; height: 44vmax; top: -10vmax; left: 4vw;
  background: radial-gradient(circle, rgba(232, 108, 36, 0.50) 0%, rgba(178, 72, 20, 0.22) 44%, transparent 72%);
  animation: orbA 18s ease-in-out infinite alternate;
}
.glass-orb-2 {
  width: 42vmax; height: 42vmax; right: 2vw; bottom: -12vmax;
  background: radial-gradient(circle, rgba(246, 174, 72, 0.38) 0%, rgba(196, 118, 36, 0.14) 44%, transparent 72%);
  animation: orbB 22s ease-in-out infinite alternate;
}
.glass-orb-3 {
  width: 34vmax; height: 34vmax; top: 34vh; left: 40vw;
  background: radial-gradient(circle, rgba(124, 204, 224, 0.26) 0%, rgba(86, 154, 186, 0.09) 46%, transparent 72%);
  animation: orbC 24s ease-in-out infinite alternate;
}
@keyframes orbA { 0% { transform: translate3d(-3vw,-2vh,0) scale(1); } 100% { transform: translate3d(16vw,20vh,0) scale(1.08); } }
@keyframes orbB { 0% { transform: translate3d(3vw,3vh,0) scale(1); } 100% { transform: translate3d(-18vw,-20vh,0) scale(1.1); } }
@keyframes orbC { 0% { transform: translate3d(-4vw,4vh,0) scale(0.96); } 100% { transform: translate3d(12vw,-12vh,0) scale(1.1); } }

header.site-nav, main, footer.site-footer { position: relative; z-index: 1; }

header.site-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(26px) saturate(200%);
  -webkit-backdrop-filter: blur(26px) saturate(200%);
  background: rgba(255, 246, 238, 0.045);
  border-bottom: 1px solid var(--sep);
}
.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.nav-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.nav-brand img { height: 30px; width: auto; display: block; }
.nav-brand-sep { width: 1px; height: 20px; background: var(--sep-strong); }
.nav-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.nav-brand-text strong { font-size: 13.5px; font-weight: 600; }
.nav-brand-text span { font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.auth-wrap { max-width: 460px; margin: 64px auto 48px; padding: 0 20px; }
.legal-wrap { max-width: 820px; margin: 36px auto 64px; padding: 0 20px; }

.glass-card {
  position: relative;
  overflow: hidden;
  background: var(--panel);
  backdrop-filter: blur(28px) saturate(210%);
  -webkit-backdrop-filter: blur(28px) saturate(210%);
  border: 1px solid transparent;
  border-radius: 26px;
  padding: 28px 30px;
  box-shadow: 0 20px 54px -16px rgba(0, 0, 0, 0.66), inset 0 1.5px 0 var(--spec-top), inset 0 -14px 24px -16px var(--spec-bot);
}
.glass-card::after {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1.2px;
  border-radius: inherit;
  background: var(--rim-grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.glass-card > * { position: relative; z-index: 1; }

.kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
h1, h2, h3 { margin: 0 0 10px; font-weight: 500; letter-spacing: -0.025em; line-height: 1.15; }
.lead { color: var(--text-2); font-weight: 300; margin: 0 0 18px; }
.auth-logo { height: 52px; width: auto; margin: 0 auto 18px; display: block; }

.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.btn-primary, .btn-glass {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 20px;
  border-radius: 13px;
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}
.btn-primary {
  background: linear-gradient(180deg, rgba(238, 124, 48, 0.46) 0%, rgba(176, 76, 22, 0.36) 100%);
  backdrop-filter: blur(20px) saturate(210%);
  -webkit-backdrop-filter: blur(20px) saturate(210%);
  border: 1px solid rgba(255, 212, 174, 0.46);
  color: #FFF8F2;
  box-shadow: 0 10px 26px -8px rgba(196, 86, 24, 0.55), inset 0 1.5px 0 rgba(255, 250, 244, 0.58), inset 0 -10px 18px -8px rgba(255, 168, 86, 0.34);
}
.btn-primary:hover { transform: translateY(-1px); background: linear-gradient(180deg, rgba(248, 138, 62, 0.58) 0%, rgba(196, 88, 28, 0.48) 100%); }
.btn-glass {
  background: var(--surface);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid var(--sep);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 250, 245, 0.25);
}
.btn-glass:hover { background: var(--panel-hover); border-color: var(--sep-strong); }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; text-align: left; }
.field label { font-size: 12px; color: var(--muted); font-weight: 500; }
.field input, .field select {
  width: 100%;
  min-height: 42px;
  padding: 9px 13px;
  border-radius: 11px;
  border: 1px solid var(--sep);
  background: rgba(12, 9, 8, 0.52);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
}
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(240, 147, 72, 0.3);
}

.alert {
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 13px;
  margin-bottom: 16px;
  border: 1px solid var(--sep);
  background: var(--surface);
}
.alert.err { border-color: rgba(255, 107, 96, 0.45); background: rgba(255, 107, 96, 0.14); color: #FFD2CE; }
.alert.ok  { border-color: rgba(74, 222, 128, 0.45); background: rgba(74, 222, 128, 0.14); color: #D2FFE1; }

/* Landing sections */
.hero { padding: 54px 0 36px; text-align: center; }
.hero h1 { font-size: clamp(30px, 4.8vw, 52px); max-width: 780px; margin: 0 auto 14px; }
.hero .lead { font-size: clamp(15px, 1.5vw, 18px); max-width: 620px; margin: 0 auto 26px; }
.hero-logo { height: 64px; margin: 0 auto 16px; display: block; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 26px 0 54px;
}
.feat-card { padding: 20px; border-radius: 20px; }
.feat-num { font-family: var(--mono); font-size: 11px; color: var(--accent); margin-bottom: 8px; }
.feat-card h3 { font-size: 15.5px; margin-bottom: 6px; }
.feat-card p { margin: 0; font-size: 13px; color: var(--text-2); font-weight: 300; }

/* Pricing */
.pricing-sec { padding: 16px 0 64px; }
.pricing-head { text-align: center; margin-bottom: 24px; }
.pricing-head h2 { font-size: clamp(26px, 3.2vw, 36px); }

.period-switch {
  display: inline-flex;
  padding: 4px;
  border-radius: 15px;
  background: var(--surface);
  border: 1px solid var(--sep);
  box-shadow: inset 0 1px 0 rgba(255, 250, 245, 0.24);
  gap: 4px;
  margin-top: 14px;
}
.period-btn {
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-2);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 11px;
  cursor: pointer;
  transition: all 0.16s ease;
}
.period-btn.active {
  background: var(--accent-dim);
  border-color: var(--accent-border);
  color: var(--text);
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 250, 245, 0.3);
}
.save-tag {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--green);
  margin-left: 5px;
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  max-width: 920px;
  margin: 0 auto;
}
.plan-card { display: flex; flex-direction: column; gap: 14px; }
.plan-card.is-pro {
  box-shadow: 0 24px 64px -16px rgba(172, 75, 24, 0.38), inset 0 1.5px 0 rgba(255, 248, 238, 0.45), inset 0 -16px 26px -16px rgba(236, 134, 62, 0.28);
}
.plan-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.plan-badge {
  font-family: var(--mono);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  color: var(--accent);
}
.plan-price-row { display: flex; align-items: baseline; gap: 8px; }
.plan-price { font-family: var(--mono); font-size: 38px; font-weight: 700; letter-spacing: -0.03em; }
.plan-period-lbl { font-size: 13px; color: var(--muted); }
.plan-list { list-style: none; padding: 0; margin: 4px 0 10px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.plan-list li { display: flex; align-items: flex-start; gap: 9px; font-size: 13.5px; color: var(--text-2); }
.plan-list li::before { content: "✓"; color: var(--accent); font-weight: 700; flex-shrink: 0; }

/* Checkout modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(6, 4, 3, 0.72);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.modal-backdrop.open { display: flex; }
.modal-box { width: 100%; max-width: 460px; }

/* Admin tables */
.admin-wrap { max-width: 1180px; margin: 28px auto 64px; padding: 0 20px; display: flex; flex-direction: column; gap: 20px; }
table.studio-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.studio-table th, table.studio-table td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--sep); vertical-align: middle; }
table.studio-table th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.pill { display: inline-flex; padding: 2px 9px; border-radius: 999px; font-family: var(--mono); font-size: 11px; border: 1px solid var(--sep); }
.pill.pro { background: var(--accent-dim); border-color: var(--accent-border); color: var(--accent); }
.pill.ok  { background: rgba(74, 222, 128, 0.14); border-color: rgba(74, 222, 128, 0.35); color: var(--green); }
.pill.off { background: rgba(255, 107, 96, 0.12); border-color: rgba(255, 107, 96, 0.32); color: var(--red); }

footer.site-footer {
  border-top: 1px solid var(--sep);
  padding: 26px 20px 40px;
  color: var(--muted);
  font-size: 12.5px;
}
.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
}
footer a { color: var(--text-2); text-decoration: none; border-bottom: 1px solid var(--sep); }
footer a:hover { color: var(--accent); border-color: var(--accent); }

@media (max-width: 900px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .plans-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .features-grid { grid-template-columns: 1fr; }
  .glass-card { padding: 22px 18px; border-radius: 20px; }
  .glass-orb { animation: none !important; }
  .nav-brand-sep, .nav-brand-text span { display: none; }
}
