/* ============================================================================
   Ratel design system — enterprise Micro-PaaS marketplace
   Dark "power" theme by default (Railway-inspired); clean light "enterprise"
   theme (Hostinger-inspired). Vibrant purple accent across both.
   ========================================================================== */

/* ---- Design tokens: DARK (default) ------------------------------------- */
:root {
  --bg:            #0B0B0C;
  --bg-elev:       #0E0E11;
  --surface:       #141417;
  --surface-2:     #1A1A20;
  --surface-3:     #202028;
  --text:          #FFFFFF;
  --text-dim:      #FFFFFF;
  --muted:         #EAEAEE;
  --border:        #232329;
  --border-strong: #313139;
  --card-border:   #3A3A46;   /* medium grey card outline (dark theme) */
  --primary:       #6D28D9;   /* dark purple */
  --primary-hover: #7C3AED;
  --primary-fg:    #FFFFFF;
  --primary-soft:  rgba(124, 58, 237, 0.16);
  --accent:        #A855F7;
  --accent-2:      #22D3EE;
  --success:       #34D399;
  --warning:       #FBBF24;
  --danger:        #F87171;
  --ring:          rgba(124, 58, 237, 0.55);

  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 8px 30px rgba(0,0,0,.45);
  --shadow-lg: 0 24px 70px rgba(0,0,0,.55);
  --glow:      0 0 0 1px rgba(124,92,255,.35), 0 18px 60px rgba(124,92,255,.22);

  --radius:    14px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --maxw: 1180px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
          'Helvetica Neue', Arial, sans-serif;

  --hero-glow-1: rgba(124,92,255,.30);
  --hero-glow-2: rgba(34,211,238,.14);
  --grid-line:   rgba(255,255,255,.035);
  color-scheme: dark;
}

/* ---- Design tokens: LIGHT ("clean enterprise") ------------------------- */
[data-theme="light"] {
  --bg:            #FFFFFF;
  --bg-elev:       #FAFAFD;
  --surface:       #FFFFFF;
  --surface-2:     #F4F4F8;
  --surface-3:     #ECECF3;
  --text:          #000000;
  --text-dim:      #000000;
  --muted:         #1A1A1F;
  --border:        #E7E7EE;
  --border-strong: #D6D6E0;
  --card-border:   #D8D8E2;   /* light card outline */
  --primary:       #6D28D9;   /* dark purple */
  --primary-hover: #5B21B6;
  --primary-fg:    #FFFFFF;
  --primary-soft:  rgba(109, 40, 217, 0.08);
  --accent:        #8B5CF6;
  --accent-2:      #0EA5E9;
  --success:       #16A34A;
  --warning:       #D97706;
  --danger:        #DC2626;
  --ring:          rgba(109, 40, 217, 0.45);

  --shadow-sm: 0 1px 2px rgba(16,16,40,.06);
  --shadow-md: 0 10px 34px rgba(16,16,40,.08);
  --shadow-lg: 0 28px 70px rgba(16,16,40,.12);
  --glow:      0 0 0 1px rgba(109,69,232,.18), 0 18px 50px rgba(109,69,232,.14);

  --hero-glow-1: rgba(109,69,232,.16);
  --hero-glow-2: rgba(14,165,233,.10);
  --grid-line:   rgba(16,16,40,.04);
  color-scheme: light;
}

/* ---- Reset / base ------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background .25s ease, color .25s ease;
}
h1, h2, h3, h4 { line-height: 1.1; letter-spacing: -0.02em; margin: 0; font-weight: 700; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 6px; }
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--primary); color: var(--primary-fg); padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---- Layout helpers ----------------------------------------------------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.section-tight { padding: 64px 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--primary); display: inline-block; }
.section-head { max-width: 680px; margin: 0 auto 52px; text-align: center; }
.section-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin: 14px 0 12px; font-weight: 800; }
.section-head p { color: var(--muted); font-size: 1.08rem; }
.text-grad {
  background: linear-gradient(110deg, var(--text) 0%, var(--text) 30%, var(--primary-hover) 75%, var(--accent) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  --pad-y: .72rem; --pad-x: 1.1rem;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: var(--pad-y) var(--pad-x); border-radius: 10px;
  font-weight: 600; font-size: .95rem; cursor: pointer; border: 1px solid transparent;
  transition: transform .12s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: var(--primary-fg); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--primary-hover); box-shadow: var(--glow); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--primary); }
.btn-soft { background: var(--primary-soft); color: var(--primary-hover); }
.btn-soft:hover { background: var(--primary); color: var(--primary-fg); }
.btn-lg { --pad-y: .95rem; --pad-x: 1.5rem; font-size: 1.02rem; border-radius: 12px; }
.btn-block { width: 100%; }

/* ---- Navigation --------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: saturate(160%) blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.18rem; letter-spacing: -.02em; }
.brand .badge-logo {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(150deg, var(--primary), var(--accent)); color: #fff; font-size: 1rem;
  box-shadow: var(--glow);
}
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.nav-item { position: relative; }
.nav-trigger {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 12px; border-radius: 9px;
  color: var(--text-dim); font-weight: 500; font-size: .95rem; background: none; border: 0; cursor: pointer;
  font-family: inherit;
}
.nav-trigger:hover, .nav-item:focus-within .nav-trigger { color: var(--text); background: var(--surface-2); }
.nav-trigger svg { width: 14px; height: 14px; opacity: .6; transition: transform .2s ease; }
.nav-item:hover .nav-trigger svg, .nav-item:focus-within .nav-trigger svg { transform: rotate(180deg); }
.nav-menu {
  position: absolute; top: calc(100% + 10px); left: 0; min-width: 300px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow-lg); padding: 8px; opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s; display: grid; gap: 2px;
}
.nav-item:hover .nav-menu, .nav-item:focus-within .nav-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-menu a { display: grid; gap: 2px; padding: 11px 12px; border-radius: 10px; }
.nav-menu a:hover { background: var(--surface-2); }
.nav-menu .mi-label { font-weight: 600; font-size: .92rem; }
.nav-menu .mi-desc { color: var(--muted); font-size: .82rem; }
.nav-spacer { flex: 1; }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.theme-toggle {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text); cursor: pointer;
}
.theme-toggle:hover { border-color: var(--primary); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .sun { display: none; }
[data-theme="light"] .theme-toggle .sun { display: block; }
[data-theme="light"] .theme-toggle .moon { display: none; }
.nav-burger { display: none; place-items: center; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); width: 40px; height: 40px; border-radius: 10px; cursor: pointer; }
.nav-burger:hover { border-color: var(--primary); }
.nav-burger svg { width: 20px; height: 20px; }
.nav-burger .b-close { display: none; }
.nav.open .nav-burger .b-open { display: none; }
.nav.open .nav-burger .b-close { display: block; }

/* ---- Banner ------------------------------------------------------------- */
.banner { padding: .7rem 1rem; text-align: center; font-weight: 600; color: #fff; font-size: .92rem; }
.banner-info { background: linear-gradient(90deg, var(--primary), var(--accent)); }
.banner-warning { background: var(--warning); color: #1a1205; }
.banner-critical { background: var(--danger); }

/* ---- Hero --------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; padding: 92px 0 72px; }
.hero-viz { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero-viz::before {
  content: ""; position: absolute; inset: -20% 0 auto 0; height: 680px;
  background:
    radial-gradient(700px 360px at 50% -8%, var(--hero-glow-1), transparent 70%),
    radial-gradient(560px 320px at 82% 8%, var(--hero-glow-2), transparent 70%);
}
.hero-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px),
                    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(900px 460px at 50% 12%, #000 30%, transparent 75%);
}
.hero-net { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .9; }
.hero-net .edge { stroke: var(--primary); stroke-width: 1; opacity: .22; }
.hero-net .node { fill: var(--primary); }
.hero-net .node.pulse { animation: nodePulse 3.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes nodePulse { 0%,100% { opacity: .35; } 50% { opacity: 1; } }
.hero-inner { position: relative; z-index: 1; text-align: center; max-width: 880px; margin: 0 auto; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); font-weight: 800; letter-spacing: -.035em; margin: 22px 0 18px; }
.hero h1 .accent { display: block; }
.hero-sub { color: var(--text-dim); font-size: clamp(1.05rem, 2vw, 1.25rem); max-width: 620px; margin: 0 auto; }
.hero-cta { display: flex; gap: 12px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border); font-size: .82rem; color: var(--text-dim);
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 25%, transparent); }

/* domain search */
.domain-search {
  display: flex; gap: 8px; max-width: 600px; margin: 34px auto 0; padding: 7px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 16px; box-shadow: var(--shadow-md);
}
.domain-search:focus-within { border-color: var(--primary); box-shadow: var(--glow); }
.domain-search .field { flex: 1; display: flex; align-items: center; gap: 10px; padding-left: 12px; }
.domain-search .field svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.domain-search input {
  flex: 1; border: 0; background: transparent; color: var(--text); font-size: 1rem; padding: 12px 0;
  font-family: inherit; min-width: 0;
}
.domain-search input::placeholder { color: var(--muted); }
.domain-search input:focus { outline: none; }
.domain-result { margin: 14px auto 0; max-width: 600px; font-size: .9rem; min-height: 1.2em; color: var(--muted); }
.domain-result.ok { color: var(--success); }
.domain-result.no { color: var(--danger); }

/* ---- Trust logos -------------------------------------------------------- */
.trust { padding: 40px 0 8px; }
.trust p { text-align: center; color: var(--muted); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 20px; }
.trust-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 44px; opacity: .82; }
.trust-logo { font-weight: 700; font-size: 1.05rem; letter-spacing: -.02em; color: var(--text-dim); filter: grayscale(1); opacity: .8; transition: opacity .2s, filter .2s; }
.trust-logo:hover { opacity: 1; filter: grayscale(0); }

/* ---- Stats -------------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat { text-align: center; padding: 26px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.stat .v { font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 800; letter-spacing: -.03em; background: linear-gradient(120deg, var(--primary-hover), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat .l { color: var(--muted); font-size: .9rem; margin-top: 4px; }

/* ---- Marketplace product cards ----------------------------------------- */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.card {
  position: relative; display: flex; flex-direction: column; padding: 24px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease;
  overflow: hidden;
}
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(140deg, var(--primary), transparent 45%); opacity: 0;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; transition: opacity .25s ease; pointer-events: none;
}
.card:hover { transform: translateY(-6px); border-color: var(--border-strong); box-shadow: var(--shadow-lg); }
.card:hover::after { opacity: .9; }
.card-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-hover); margin-bottom: 16px; }
.card-icon svg { width: 24px; height: 24px; }
.card-badge { position: absolute; top: 18px; right: 18px; font-size: .66rem; font-weight: 700; letter-spacing: .08em; padding: 4px 8px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-hover); }
.card h3 { font-size: 1.18rem; }
.card .tagline { color: var(--muted); font-size: .88rem; margin-top: 4px; }
.card .price { display: flex; align-items: baseline; gap: 6px; margin: 16px 0 6px; }
.card .price .amt { font-size: 1.9rem; font-weight: 800; letter-spacing: -.03em; }
.card .price .note { color: var(--muted); font-size: .82rem; }
.feat-list { list-style: none; padding: 0; margin: 14px 0 20px; display: grid; gap: 9px; }
.feat-list li { display: flex; align-items: flex-start; gap: 9px; font-size: .88rem; color: var(--text-dim); }
.feat-list li svg { width: 16px; height: 16px; color: var(--success); flex: none; margin-top: 2px; }
.card .btn { margin-top: auto; }

/* ---- Feature deep-dives ------------------------------------------------- */
.deep { display: grid; gap: 28px; }
.deep-row { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; padding: 36px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.deep-row:nth-child(even) .deep-media { order: -1; }
.deep-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(150deg, var(--primary), var(--accent)); color: #fff; box-shadow: var(--glow); margin-bottom: 18px; }
.deep-icon svg { width: 26px; height: 26px; }
.deep-row h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); font-weight: 800; margin-bottom: 12px; }
.deep-row p { color: var(--muted); font-size: 1.02rem; }
.spec-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.spec { font-size: .8rem; font-weight: 600; padding: 7px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-dim); }
.deep-media { aspect-ratio: 4 / 3; border-radius: var(--radius); border: 1px solid var(--border); background:
  radial-gradient(420px 240px at 70% 20%, var(--primary-soft), transparent 70%), var(--bg-elev); position: relative; overflow: hidden; }
.deep-media .glow-node { position: absolute; border-radius: 50%; background: var(--primary); filter: blur(1px); box-shadow: 0 0 24px 6px color-mix(in srgb, var(--primary) 60%, transparent); }

/* ---- Testimonials ------------------------------------------------------- */
.tgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tcard { padding: 26px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; gap: 18px; }
.tcard .stars { display: flex; gap: 3px; color: var(--warning); }
.tcard .stars svg { width: 16px; height: 16px; }
.tcard blockquote { margin: 0; font-size: 1rem; color: var(--text-dim); line-height: 1.6; }
.tcard .who { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: linear-gradient(150deg, var(--primary), var(--accent)); }
.who .nm { font-weight: 600; font-size: .92rem; }
.who .ti { color: var(--muted); font-size: .82rem; }

/* ---- Pricing ------------------------------------------------------------ */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.plan { display: flex; flex-direction: column; padding: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.plan.featured { border-color: var(--primary); box-shadow: var(--glow); position: relative; }
.plan.featured::before { content: "Most popular"; position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--primary); color: #fff; font-size: .72rem; font-weight: 700; padding: 5px 12px; border-radius: 999px; letter-spacing: .04em; }
.plan h3 { font-size: 1.12rem; }
.plan .blurb { color: var(--muted); font-size: .9rem; margin-top: 6px; min-height: 40px; }
.plan .pricing { display: flex; align-items: baseline; gap: 6px; margin: 18px 0; }
.plan .pricing .amt { font-size: 2.4rem; font-weight: 800; letter-spacing: -.03em; }
.plan .pricing .note { color: var(--muted); }

/* ---- Comparison matrix -------------------------------------------------- */
.compare-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
table.compare { width: 100%; border-collapse: collapse; min-width: 620px; }
table.compare th, table.compare td { padding: 15px 18px; text-align: left; border-bottom: 1px solid var(--border); }
table.compare thead th { font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); position: sticky; top: 0; background: var(--surface); }
table.compare thead th:not(:first-child), table.compare td:not(:first-child) { text-align: center; }
table.compare .grp td { background: var(--surface-2); font-weight: 700; font-size: .85rem; letter-spacing: .04em; text-transform: uppercase; color: var(--text-dim); }
table.compare td:first-child { color: var(--text-dim); font-size: .92rem; }
table.compare .yes { color: var(--success); }
table.compare .no { color: var(--muted); opacity: .55; }
table.compare .val { font-weight: 600; font-size: .9rem; }
table.compare .col-feat { background: color-mix(in srgb, var(--primary) 6%, transparent); }

/* ---- Final CTA ---------------------------------------------------------- */
.cta-band { position: relative; overflow: hidden; border-radius: var(--radius-lg); padding: 64px 32px; text-align: center;
  background: radial-gradient(700px 300px at 50% 0%, var(--primary-soft), transparent 70%), var(--surface); border: 1px solid var(--border); }
.cta-band h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); font-weight: 800; }
.cta-band p { color: var(--muted); margin: 12px auto 26px; max-width: 520px; }

/* ---- Footer ------------------------------------------------------------- */
.footer { border-top: 1px solid var(--border); padding: 56px 0 40px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(4, 1fr); gap: 32px; }
.footer h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 14px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer a { color: var(--text-dim); font-size: .92rem; }
.footer a:hover { color: var(--primary-hover); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); color: var(--muted); font-size: .85rem; flex-wrap: wrap; }
/* Social icon row — monochrome marks that invert with the colour theme:
   black on white (light), white on black (dark), and invert on hover. */
.footer-social { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.footer-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 10px;
  color: var(--text); border: 1px solid var(--card-border);
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}
.footer-social a, .footer-social a:hover, .footer-social a:focus-visible { text-decoration: none; opacity: 1; }
.footer-social a:hover { background: var(--text); color: var(--bg); border-color: var(--text); transform: translateY(-2px); }
.footer-social a:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.footer-social svg { width: 19px; height: 19px; display: block; }

/* ---- Auth split-panel --------------------------------------------------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-brand { position: relative; overflow: hidden; padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(600px 380px at 20% 10%, var(--primary-soft), transparent 70%), var(--bg-elev); border-right: 1px solid var(--border); }
.auth-brand .hero-grid { mask-image: radial-gradient(700px 500px at 30% 20%, #000 30%, transparent 80%); }
.auth-brand-content { position: relative; z-index: 1; max-width: 420px; margin: auto 0; }
.auth-brand h2 { font-size: 2rem; font-weight: 800; margin: 20px 0 14px; }
.auth-brand p { color: var(--muted); font-size: 1.05rem; }
.auth-points { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.auth-points li { display: flex; gap: 10px; align-items: center; color: var(--text-dim); }
.auth-points svg { width: 18px; height: 18px; color: var(--success); flex: none; }
.auth-form-wrap { display: grid; place-items: center; padding: 48px 24px; }
.auth-card { width: 100%; max-width: 410px; }
.auth-card h1 { font-size: 1.7rem; font-weight: 800; }
.auth-card .sub { color: var(--muted); margin: 8px 0 28px; }
.field-group { display: grid; gap: 7px; margin-bottom: 18px; }
.field-group label { font-size: .88rem; font-weight: 600; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > svg.lead { position: absolute; left: 13px; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.input {
  width: 100%; padding: 12px 14px 12px 40px; border-radius: 11px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font-size: .98rem; font-family: inherit; transition: border-color .16s, box-shadow .16s;
}
.input::placeholder { color: var(--muted); }
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.field-group .state-icon { position: absolute; right: 13px; width: 18px; height: 18px; display: none; }
.field-group.valid .input { border-color: var(--success); }
.field-group.valid .state-icon.ok { display: block; color: var(--success); }
.field-group.invalid .input { border-color: var(--danger); box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 14%, transparent); }
.field-group.invalid .state-icon.err { display: block; color: var(--danger); }
.helper { font-size: .8rem; color: var(--muted); }
/* Error helpers are hidden until their field-group is flagged invalid. */
.helper.error { display: none; color: var(--danger); }
.field-group.invalid .helper.error { display: block; }
.auth-alt { text-align: center; color: var(--muted); font-size: .9rem; margin-top: 22px; }
.auth-alt a { color: var(--primary-hover); font-weight: 600; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .8rem; margin: 22px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.back-home { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: .9rem; margin-bottom: 26px; }
.back-home:hover { color: var(--text); }

/* ---- Responsive --------------------------------------------------------- */
@media (max-width: 980px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .tgrid { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
  .deep-row { grid-template-columns: 1fr; }
  .deep-row:nth-child(even) .deep-media { order: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
}
@media (max-width: 720px) {
  .section { padding: 64px 0; }
  .cards { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ============================================================================
   Brand logo, contrast rules, card borders, copyright, cookie banner,
   scroll-to-top, toasts, and legal pages.
   ========================================================================== */

/* ---- Brand logo --------------------------------------------------------- */
.brand-logo { height: 34px; width: 34px; border-radius: 9px; object-fit: cover;
  box-shadow: 0 0 0 1px var(--border-strong), var(--glow); background: #0B0B0C; }
.brand { font-weight: 800; }

/* ---- Medium-grey card borders (esp. dark theme) ------------------------- */
.card, .stat, .tcard, .plan, .deep-row, .compare-wrap, .deep-media,
.cta-band { border-color: var(--card-border); }
.card:hover { border-color: var(--primary); }

/* ---- Contrast + bold-title rules ---------------------------------------- */
/* Dark bg -> white text + bold titles; light bg -> black text + bold titles. */
h1, h2, h3, h4, h5 { color: var(--text); font-weight: 800; }
.section-head h2, .deep-row h3, .cta-band h2, .auth-card h1, .legal h1, .legal h2 { font-weight: 800; }
body { color: var(--text); }

/* ---- Navbar: all links + actions on the right --------------------------- */
.nav-cluster { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.nav-cluster .nav-links { margin-left: 0; }

/* ---- Mobile nav: only the brand + burger stay in the bar; the links, the
   theme toggle, and the auth buttons all collapse into the burger menu.
   Placed after the .nav-cluster base rule so these overrides win the cascade. */
@media (max-width: 860px) {
  .nav-burger { display: grid; margin-left: auto; }
  .nav-cluster { display: none; }
  .nav.open .nav-cluster {
    display: flex; flex-direction: column; align-items: stretch; gap: 6px; margin: 0;
    position: absolute; top: 64px; left: 0; right: 0; z-index: 90;
    background: var(--surface); border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg); padding: 14px 16px 18px;
  }
  .nav.open .nav-links { flex-direction: column; align-items: stretch; gap: 2px; margin: 0; }
  .nav.open .nav-item { width: 100%; }
  .nav.open .nav-trigger { width: 100%; justify-content: space-between; font-size: 1rem; padding: 12px; }
  .nav.open .nav-menu {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0; min-width: 0; padding: 2px 6px 8px;
  }
  .nav.open .nav-actions {
    flex-direction: column; align-items: stretch; gap: 10px;
    margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--border);
  }
  .nav.open .nav-actions .btn { width: 100%; }
  .nav.open .theme-toggle {
    width: 100%; height: 44px; justify-content: flex-start; gap: 12px; padding: 0 14px;
  }
  .nav.open .theme-toggle::after {
    content: "Light / dark theme"; font-weight: 600; font-size: .95rem;
  }
}

/* ---- Footer copyright: centered, bold, theme-aware ---------------------- */
.copyright { text-align: center; padding: 22px 0 4px; border-top: 1px solid var(--border);
  margin-top: 8px; }
.copyright p { font-weight: 700; color: var(--text); font-size: .92rem; letter-spacing: .01em; }
.copyright a { color: var(--primary-hover); font-weight: 800; text-decoration: underline;
  text-underline-offset: 2px; }
.copyright a:hover { color: var(--primary); }

/* ---- Cookie consent banner ---------------------------------------------- */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 150;
  max-width: 940px; margin: 0 auto; display: flex; align-items: center; gap: 18px;
  padding: 18px 22px; background: var(--surface);
  /* Thin contrasting outline: white on the dark theme, black on the light theme. */
  border: 1px solid var(--text);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  transform: translateY(140%); transition: transform .35s cubic-bezier(.2,.8,.2,1);
}
.cookie-banner.show { transform: translateY(0); }
.cookie-banner .cc-text { flex: 1; font-size: .9rem; color: var(--text-dim); }
.cookie-banner .cc-text strong { color: var(--text); font-weight: 700; }
.cookie-banner .cc-text a { color: var(--primary-hover); font-weight: 600; }
.cookie-actions { display: flex; gap: 10px; flex: none; }
@media (max-width: 640px) { .cookie-banner { flex-direction: column; align-items: stretch; } .cookie-actions .btn { flex: 1; } }

/* ---- Scroll-to-top ------------------------------------------------------ */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 140;
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: var(--primary); color: var(--primary-fg); border: 0; cursor: pointer;
  box-shadow: var(--glow); opacity: 0; visibility: hidden; transform: translateY(12px) scale(.9);
  transition: opacity .25s, transform .25s, visibility .25s;
}
.to-top.show { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.to-top:hover { background: var(--primary-hover); }
.to-top svg { width: 20px; height: 20px; }

/* ---- Toast notifications ------------------------------------------------- */
.toast-stack { position: fixed; top: 18px; right: 18px; z-index: 300; display: grid; gap: 10px;
  width: min(360px, calc(100vw - 36px)); }
.toast {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--card-border); box-shadow: var(--shadow-lg);
  transform: translateX(120%); transition: transform .3s cubic-bezier(.2,.8,.2,1), opacity .3s;
  border-left-width: 4px;
}
.toast.show { transform: translateX(0); }
.toast.hide { transform: translateX(120%); opacity: 0; }
.toast.success { border-left-color: var(--success); }
.toast.error   { border-left-color: var(--danger); }
.toast.info    { border-left-color: var(--primary); }
.toast .t-icon { width: 22px; height: 22px; flex: none; display: grid; place-items: center; border-radius: 50%; }
.toast.success .t-icon { color: var(--success); }
.toast.error .t-icon { color: var(--danger); }
.toast.info .t-icon { color: var(--primary); }
.toast .t-icon svg { width: 18px; height: 18px; }
.toast .t-body { flex: 1; }
.toast .t-title { font-weight: 700; color: var(--text); font-size: .92rem; }
.toast .t-msg { color: var(--muted); font-size: .85rem; margin-top: 2px; }
.toast .t-close { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 1.1rem; line-height: 1; padding: 2px; }

/* ---- Legal / long-form pages -------------------------------------------- */
.legal { max-width: 860px; margin: 0 auto; padding: 56px 0 80px; }
.legal-hero { padding: 48px 0 8px; border-bottom: 1px solid var(--border); margin-bottom: 36px; }
.legal-hero h1 { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; }
.legal-hero .meta { color: var(--muted); margin-top: 10px; font-size: .92rem; }
.legal h2 { font-size: 1.35rem; font-weight: 800; margin: 38px 0 12px; scroll-margin-top: 90px; }
.legal h3 { font-size: 1.08rem; font-weight: 700; margin: 22px 0 8px; }
.legal p, .legal li { color: var(--text-dim); line-height: 1.7; font-size: 1rem; }
.legal p { margin: 0 0 14px; }
.legal ul, .legal ol { margin: 0 0 16px; padding-left: 22px; display: grid; gap: 8px; }
.legal strong { color: var(--text); font-weight: 700; }
.legal a { color: var(--primary-hover); text-decoration: underline; text-underline-offset: 2px; }
.legal .toc { background: var(--surface); border: 1px solid var(--card-border); border-radius: var(--radius);
  padding: 20px 24px; margin-bottom: 36px; }
.legal .toc h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 12px; }
.legal .toc ol { margin: 0; padding-left: 20px; }
.legal .toc a { text-decoration: none; }
.legal .toc a:hover { text-decoration: underline; }
.legal .callout { background: var(--primary-soft); border: 1px solid var(--card-border); border-left: 4px solid var(--primary);
  border-radius: 10px; padding: 16px 18px; margin: 0 0 18px; }
.legal table { width: 100%; border-collapse: collapse; margin: 0 0 20px; font-size: .92rem; }
.legal table th, .legal table td { border: 1px solid var(--card-border); padding: 10px 12px; text-align: left; }
.legal table th { background: var(--surface-2); font-weight: 700; color: var(--text); }

/* ============================================================================
   Application-wide: white/black text + links, dark-purple buttons, real imagery
   ========================================================================== */

/* Body + label text follows the theme text colour (white on dark, black on
   light). Muted is only a slightly softened version of the same. */
body, p, li, td, th, span, label, blockquote, figcaption, .tagline, .hero-sub,
.section-head p, .deep-row p, .card .tagline, .plan .blurb, .who .ti,
.mi-desc, .meta, .helper { color: var(--text); }
.muted, .nav-menu .mi-desc, .footer h4, .eyebrow, .trust p, .stat .l,
.card .price .note, .plan .pricing .note { color: var(--muted); }

/* Links: white on dark / black on light — never purple. Buttons are excluded. */
a:not(.btn) { color: var(--text); }
.footer a, .copyright a, .legal a, .legal .toc a, .cookie-banner .cc-text a,
.auth-alt a, .nav-menu .mi-label, .nav-trigger, table.compare a, .back-home {
  color: var(--text);
}
.footer a:hover, .copyright a:hover, .legal a:hover, .auth-alt a:hover,
.footer a:focus-visible { text-decoration: underline; opacity: .82; }
.copyright a, .legal a, .cookie-banner .cc-text a, .auth-alt a {
  text-decoration: underline; text-underline-offset: 2px;
}

/* Buttons: dark purple with white text, application-wide. */
.btn-primary, .btn-soft { background: var(--primary); color: var(--primary-fg); }
.btn-primary:hover, .btn-soft:hover { background: var(--primary-hover); color: var(--primary-fg); }
.btn-ghost { color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--primary); color: var(--text); }

/* Real Unsplash imagery replacing the abstract dots. */
.deep-media { padding: 0; background: var(--surface-2); }
.deep-media img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); display: block; }
.avatar-img {
  width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none;
  box-shadow: 0 0 0 2px var(--card-border);
}

/* ============================================================================
   FINAL OVERRIDES — links never purple (incl. hover), hero + stats white,
   centered consistent copyright. These win the cascade.
   ========================================================================== */

/* Every text link is the theme text colour — never purple, never on hover. */
a:not(.btn),
a:not(.btn):link,
a:not(.btn):visited,
a:not(.btn):hover,
a:not(.btn):active,
a:not(.btn):focus,
a:not(.btn):focus-visible { color: var(--text) !important; }
a:not(.btn):hover { text-decoration: underline; text-underline-offset: 2px; }

/* Hero headline accent + stat numbers: solid white/black, no purple gradient. */
.hero h1 .accent,
.text-grad,
.stat .v {
  background: none !important;
  -webkit-text-fill-color: var(--text) !important;
  color: var(--text) !important;
}

/* Badges/labels keep white text (on dark-purple where applicable). */
.card-badge { background: var(--primary); color: var(--primary-fg); }

/* Copyright: always centered, bold, identical on every page. */
.copyright { text-align: center !important; }
.copyright p { font-weight: 700; color: var(--text); }
.auth-copyright { margin-top: 28px; }

/* ============================================================================
   APP-WIDE DROPDOWNS — black surface, white text, on every <select> and its
   options, in both themes. (Wins over per-page transparent backgrounds.)
   ========================================================================== */
select,
.rs-select,
.ac-select {
  background-color: #0B0B0C !important;
  color: #FFFFFF !important;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 9px 12px;
  font: inherit;
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23ffffff' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 30px;
}
select option,
select optgroup {
  background-color: #0B0B0C !important;
  color: #FFFFFF !important;
}
select:focus { outline: none; box-shadow: 0 0 0 2px var(--card-border); }

/* ============================================================================
   PAGINATION — reusable control rendered by ratel.js after [data-paginate].
   ========================================================================== */
.pager { display: flex; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.pager-btn {
  background: #0B0B0C; color: #FFFFFF; border: 1px solid var(--card-border);
  border-radius: 8px; padding: 6px 12px; font: inherit; cursor: pointer; line-height: 1;
}
.pager-btn:hover:not(:disabled) { border-color: var(--primary); }
.pager-btn:disabled { opacity: .4; cursor: not-allowed; }
.pager-info { color: var(--muted); font-size: .82rem; font-variant-numeric: tabular-nums; }

/* ============================================================================
   SELECTABLE REPO PICKER (git-to-deploy).
   ========================================================================== */
.repo-pick {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--card-border); border-radius: 12px;
  padding: 12px 14px; margin-bottom: 8px; cursor: pointer;
}
.repo-pick:hover { border-color: var(--primary); }
.repo-pick input[type="radio"] { accent-color: var(--primary); width: 18px; height: 18px; flex: none; }
.repo-pick.selected { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset; }
.repo-pick .rp-name { font-weight: 700; word-break: break-all; }
.repo-pick .rp-sub { color: var(--muted); font-size: .8rem; margin-top: 2px; }
.deploy-bar {
  position: sticky; bottom: 0; margin-top: 16px; padding: 14px 0;
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  background: linear-gradient(to top, var(--bg) 70%, transparent);
}
.file-input {
  background: #0B0B0C; color: #FFFFFF; border: 1px solid var(--card-border);
  border-radius: 10px; padding: 8px 12px; font: inherit;
}
