/* ==========================================================================
   Relay — dark SaaS theme
   ========================================================================== */

:root {
  --bg: #0b0b16;
  --bg-alt: #10101f;
  --bg-card: rgba(255, 255, 255, 0.045);
  --border: rgba(255, 255, 255, 0.09);
  --text: #f3f3fb;
  --text-dim: #a8a8c4;
  --text-dimmer: #6c6c8a;
  --accent: #7c5cff;
  --accent-2: #22d3ee;
  --accent-text: #ffffff;

  --container-width: 1160px;
  --radius: 12px;
  --radius-lg: 20px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
h1, h2, h3 { line-height: 1.2; font-weight: 800; letter-spacing: -0.02em; }

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

.section { padding: 100px 0; position: relative; z-index: 1; }
.section-alt { background: linear-gradient(180deg, transparent, rgba(124, 92, 255, 0.04), transparent); }

.section-head { text-align: center; max-width: 620px; margin: 0 auto 56px; }
.section-head .eyebrow { display: block; margin-bottom: 12px; }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 14px; }
.section-head p { color: var(--text-dim); font-size: 17px; }

.eyebrow {
  display: inline-block;
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Background orbs
   ========================================================================== */

.bg-orbs {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
  animation: float 18s ease-in-out infinite;
}

.orb-1 { width: 480px; height: 480px; background: var(--accent); top: -120px; left: -100px; animation-duration: 22s; }
.orb-2 { width: 420px; height: 420px; background: var(--accent-2); top: 20%; right: -140px; animation-duration: 26s; animation-delay: -6s; }
.orb-3 { width: 360px; height: 360px; background: #ff5cad; top: 65%; left: 30%; opacity: 0.28; animation-duration: 30s; animation-delay: -12s; }

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, -30px) scale(1.08); }
  66% { transform: translate(-30px, 20px) scale(0.95); }
}

/* Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.btn-primary { background: linear-gradient(135deg, var(--accent), #9a7dff); color: var(--accent-text); }
.btn-primary:hover { transform: translateY(-2px); }

.btn-glow { box-shadow: 0 0 0 0 rgba(124, 92, 255, 0.6); }
.btn-glow:hover { box-shadow: 0 8px 32px -6px rgba(124, 92, 255, 0.75); }

.btn-ghost { background: rgba(255, 255, 255, 0.03); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent-2); color: var(--accent-2); }

.btn-lg { padding: 16px 32px; font-size: 16px; }
.btn-block { width: 100%; }

/* Header / Nav
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 20px 0;
  background: rgba(11, 11, 22, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.logo { font-size: 21px; font-weight: 800; color: var(--text); }
.logo span { color: var(--accent-2); }

.main-nav ul { display: flex; gap: 32px; }
.main-nav a { font-size: 15px; font-weight: 500; color: var(--text-dim); transition: color 0.15s ease; }
.main-nav a:hover { color: var(--text); }

.header-actions { display: flex; align-items: center; gap: 12px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
}
.nav-toggle span { display: block; width: 16px; height: 2px; margin: 0 auto; background: var(--text); }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hero
   ========================================================================== */

.hero { padding: 130px 0 90px; text-align: center; position: relative; z-index: 1; }
.hero-inner { max-width: 780px; margin: 0 auto; }
.hero .eyebrow { margin-bottom: 22px; }
.hero h1 { font-size: clamp(36px, 6vw, 60px); margin-bottom: 22px; }
.hero p.lead { font-size: 19px; color: var(--text-dim); max-width: 600px; margin: 0 auto 36px; }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 56px; }

.hero-proof { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.hero-proof span { font-size: 13px; color: var(--text-dimmer); text-transform: uppercase; letter-spacing: 0.06em; }
.proof-logos { display: flex; gap: 32px; flex-wrap: wrap; justify-content: center; font-weight: 700; color: var(--text-dimmer); font-size: 16px; }

.hero-product-shot {
  max-width: 720px;
  margin: 40px auto 0;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: 0 30px 80px -30px rgba(124, 92, 255, 0.4);
}

/* Glass cards
   ========================================================================== */

.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  backdrop-filter: blur(10px);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.glass-card:hover { transform: translateY(-4px); border-color: rgba(124, 92, 255, 0.4); background: rgba(255, 255, 255, 0.06); }

.card-icon { font-size: 26px; margin-bottom: 16px; }
.glass-card h3 { font-size: 17px; margin-bottom: 8px; }
.glass-card p { color: var(--text-dim); font-size: 14px; }

/* Steps
   ========================================================================== */

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.step { text-align: center; padding: 0 12px; }
.step-number {
  display: inline-block;
  font-size: 14px;
  font-weight: 800;
  color: var(--accent-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 16px;
  margin-bottom: 18px;
}
.step h3 { font-size: 19px; margin-bottom: 10px; }
.step p { color: var(--text-dim); font-size: 15px; }

.demo-video { max-width: 780px; margin: 56px auto 0; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); }

/* Stats band
   ========================================================================== */

.stats-band { padding: 64px 0; background: linear-gradient(135deg, rgba(124, 92, 255, 0.1), rgba(34, 211, 238, 0.06)); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat-value { display: block; font-size: 40px; font-weight: 800; background: linear-gradient(135deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-label { font-size: 13px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; }

/* Pricing
   ========================================================================== */

.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: start; }

.price-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.price-card:hover { transform: translateY(-4px); }

.price-card.is-featured {
  border-color: var(--accent);
  background: linear-gradient(160deg, rgba(124, 92, 255, 0.14), rgba(34, 211, 238, 0.06));
  box-shadow: 0 20px 60px -20px rgba(124, 92, 255, 0.5);
}

.price-badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 999px;
}

.price-card h3 { font-size: 18px; margin-bottom: 10px; }
.price { font-size: 38px; font-weight: 800; margin-bottom: 6px; }
.price span { font-size: 15px; color: var(--text-dimmer); font-weight: 500; }
.price-desc { color: var(--text-dim); font-size: 14px; margin-bottom: 20px; }
.price-features { margin-bottom: 26px; }
.price-features li { padding: 8px 0; font-size: 14px; color: var(--text-dim); border-top: 1px solid var(--border); }
.price-features li:first-child { border-top: none; }
.price-features li::before { content: "✓ "; color: var(--accent-2); font-weight: 700; }

/* CTA banner
   ========================================================================== */

.cta-banner { text-align: center; max-width: 640px; margin: 0 auto; }
.cta-banner h2 { font-size: clamp(28px, 4vw, 38px); margin-bottom: 14px; }
.cta-banner p { color: var(--text-dim); font-size: 17px; margin-bottom: 32px; }

/* Footer
   ========================================================================== */

.site-footer { border-top: 1px solid var(--border); padding: 32px 0; text-align: center; position: relative; z-index: 1; }
.footer-bottom p { color: var(--text-dimmer); font-size: 13px; }
.footer-admin-link { margin-top: 4px; }
.footer-admin-link a { text-decoration: underline; opacity: 0.7; }
.footer-admin-link a:hover { opacity: 1; }

/* Scroll reveal
   ========================================================================== */

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* Responsive video/embed utility — used anywhere a cms_video() field renders */

.media-embed-16x9 { position: relative; padding-top: 56.25%; background: #000; }
.media-embed-16x9 iframe,
.media-embed-16x9 video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

/* Responsive
   ========================================================================== */

@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: rgba(11, 11, 22, 0.98);
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .main-nav.is-open { max-height: 320px; }
  .main-nav ul { flex-direction: column; padding: 8px 24px 20px; gap: 4px; }
  .main-nav a { display: block; padding: 12px 0; border-bottom: 1px solid var(--border); }
  .header-actions .btn { display: none; }
  .nav-toggle { display: flex; }
  .steps { grid-template-columns: 1fr; gap: 40px; }
  .stats-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ==========================================================================
   Admin / install / auth — shared across every Deadmojo CMS-driven template.
   Uses var() fallbacks so it works whether or not the theme above defines
   --bg-card / --radius-lg.
   ========================================================================== */

.flash {
  margin: 16px auto 0;
  padding: 12px 18px;
  border-radius: var(--radius, 8px);
  font-size: 14px;
}
.flash-success { background: rgba(80, 200, 120, 0.12); border: 1px solid rgba(80, 200, 120, 0.35); color: #4fbd7a; }
.flash-error { background: rgba(220, 80, 70, 0.12); border: 1px solid rgba(220, 80, 70, 0.35); color: #e2685c; }

.demo-banner {
  background: var(--accent);
  color: var(--accent-text, #fff);
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 16px;
  position: relative;
  z-index: 200;
}
.demo-banner a { text-decoration: underline; }

.auth-section { padding: 64px 0 80px; display: flex; justify-content: center; }

.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--bg-card, var(--bg-alt));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, var(--radius, 12px));
  padding: 36px 32px;
}

.auth-card h1 { font-size: 24px; margin-bottom: 6px; text-align: center; }
.auth-subtext { color: var(--text-dim); font-size: 13px; text-align: center; margin-bottom: 24px; }
.demo-login-hint { font-size: 13px; color: var(--text-dim); background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius, 8px); padding: 10px 14px; margin-bottom: 20px; }

.form-errors { background: rgba(220, 80, 70, 0.1); border: 1px solid rgba(220, 80, 70, 0.3); border-radius: var(--radius, 8px); padding: 14px 18px; margin-bottom: 20px; font-size: 14px; color: #e2685c; }
.form-errors ul { list-style: disc; padding-left: 18px; }

.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; color: var(--text-dim); }
.field-help { font-size: 12px; color: var(--text-dimmer); margin: -2px 0 8px; }

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="url"],
.form-group input[type="file"],
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius, 8px);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
}
.form-group textarea { resize: vertical; }
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { outline: none; border-color: var(--accent); }

.admin-video-url { margin-top: 8px; }

.admin-checkbox { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-dim); margin: 8px 0; }
.admin-checkbox input { width: auto; }

.admin-media-preview { margin-bottom: 10px; }
.admin-media-preview img { max-width: 220px; max-height: 140px; object-fit: cover; border-radius: var(--radius, 8px); border: 1px solid var(--border); }
.admin-media-preview video { max-width: 320px; border-radius: var(--radius, 8px); border: 1px solid var(--border); }

.admin-body { background: var(--bg); }
.admin-shell { display: flex; min-height: 100vh; align-items: flex-start; }

.admin-sidebar {
  width: 220px;
  flex-shrink: 0;
  min-height: 100vh;
  background: var(--bg-card, var(--bg-alt));
  border-right: 1px solid var(--border);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
}
.admin-sidebar .logo { margin-bottom: 28px; font-size: 18px; display: block; }

.admin-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.admin-nav a {
  padding: 10px 12px;
  border-radius: var(--radius, 8px);
  font-size: 14px;
  color: var(--text-dim);
}
.admin-nav a:hover { background: var(--bg-alt); text-decoration: none; }
.admin-nav a.is-active { background: rgba(255, 255, 255, 0.06); color: var(--accent); }

.admin-sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 13px;
}
.admin-sidebar-footer a { color: var(--text-dim); }
.admin-sidebar-footer a:hover { color: var(--accent); }

.admin-main { flex: 1; padding: 40px; max-width: 900px; }
.admin-main h1 { font-size: 26px; margin-bottom: 6px; }
.admin-subtext { color: var(--text-dim); margin-bottom: 28px; }

.admin-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 32px; }
.admin-stat { background: var(--bg-card, var(--bg-alt)); border: 1px solid var(--border); border-radius: var(--radius-lg, var(--radius, 12px)); padding: 20px; }
.admin-stat-value { display: block; font-size: 28px; font-weight: 800; margin-bottom: 4px; color: var(--accent); }
.admin-stat-label { font-size: 12px; color: var(--text-dim); }

.admin-quicklinks { display: flex; gap: 10px; flex-wrap: wrap; }

.admin-form { max-width: 640px; }
.admin-form-wide { max-width: 720px; }

.admin-fieldset { border: 1px solid var(--border); border-radius: var(--radius-lg, var(--radius, 12px)); padding: 24px; margin-bottom: 24px; }
.admin-fieldset legend { padding: 0 8px; font-size: 15px; font-weight: 700; color: var(--accent); }

.install-body { display: flex; align-items: flex-start; justify-content: center; padding: 60px 20px; background: var(--bg); }
.install-card {
  width: 100%;
  max-width: 480px;
  background: var(--bg-card, var(--bg-alt));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, var(--radius, 12px));
  padding: 36px 32px;
}
.install-card h1 { font-size: 24px; margin-bottom: 24px; }
.install-card h2 { font-size: 16px; margin: 24px 0 12px; }
.install-card p { margin-bottom: 12px; font-size: 14px; color: var(--text-dim); }

.install-checklist { list-style: none; font-size: 14px; }
.install-checklist li { padding: 6px 0; }
.install-checklist .is-ok { color: #4fbd7a; }
.install-checklist .is-fail { color: #e2685c; font-weight: 600; }

.install-error { background: rgba(220, 80, 70, 0.1); border: 1px solid rgba(220, 80, 70, 0.3); border-radius: var(--radius, 8px); padding: 14px 18px; margin: 14px 0; font-size: 14px; }
.install-error ul { list-style: disc; padding-left: 18px; margin: 0; }
.install-success { color: #4fbd7a; font-weight: 600; font-size: 15px; }
.install-hint { font-size: 12px; color: var(--text-dimmer); }

@media (max-width: 768px) {
  .admin-shell { flex-direction: column; }
  .admin-sidebar { width: 100%; min-height: auto; position: static; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 16px; }
  .admin-nav { flex-direction: row; flex-wrap: wrap; }
  .admin-sidebar-footer { flex-direction: row; border-top: none; padding-top: 0; margin-left: auto; }
  .admin-main { padding: 24px; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
}
