:root{
  --bg: #f6f8fb;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --muted2: #64748b;
  --border: #e2e8f0;
  --brand: #2563eb;
  --brand2: #1d4ed8;
  --accent: #f59e0b;
  --good: #16a34a;
  --bad: #ef4444;
  --shadow: 0 10px 30px rgba(2,6,23,.08);
  --radius: 16px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }

html, body{
  max-width: 100%;
  overflow-x: hidden;
}

body{
  margin:0;
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  scroll-snap-type: y mandatory;
  overflow-y: scroll;
  position: relative;
}

a{ color: var(--brand); text-decoration:none; }
a:hover{ text-decoration: underline; }

/* Global subtle grid */
body::before{
  content:"";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(to right, rgba(15,23,42,.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15,23,42,.06) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: .55;
}

/* Soft gradients on top of the grid */
body::after{
  content:"";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1000px 600px at 15% 0%, rgba(37,99,235,.18), transparent 55%),
    radial-gradient(900px 550px at 90% 10%, rgba(245,158,11,.14), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,.95) 0%, rgba(246,248,251,.95) 70%);
}

header{
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: blur(10px);
  background: rgba(246,248,251,.82);
  border-bottom: 1px solid rgba(226,232,240,.9);
}

.container{
  width: min(1140px, calc(100% - 40px));
  margin: 0 auto;
}

.nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 14px 0;
  gap: 16px;
}

.brand{
  display:flex;
  align-items:center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: .2px;
}

.subbrand{
  font-size:14px;
  line-height:1;
  color: var(--muted2);
  font-family: var(--mono);
}

.brandname{
  font-weight:900;
  line-height:1.2;
}

.logo{
  width: 34px; height: 34px;
  display:grid; place-items:center;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(37,99,235,.18), rgba(245,158,11,.18));
  border: 1px solid rgba(226,232,240,.9);
}

/* Prevent any horizontal scroll behavior in the header */
header, .nav, .navlinks, .navDesktop{
  overflow-x: visible;
}

.navlinks{
  display:flex;
  align-items:center;
  gap: 10px;
  max-width: 100%;
}

.navDesktop{
  display:flex;
  align-items:center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content:flex-end;
}

.navDesktop a{
  color: var(--muted);
  font-weight: 700;
  padding: 8px 10px;
  border-radius: 10px;
  white-space: nowrap;
}

.navDesktop a:hover{
  background: rgba(37,99,235,.08);
  text-decoration: none;
  color: var(--text);
}

/* Active nav highlight */
.navDesktop a.active{
  background: rgba(37,99,235,.12);
  color: var(--brand2);
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(37,99,235,.10);
  border: 1px solid rgba(37,99,235,.18);
}

.lang{
  display:flex;
  gap: 6px;
  align-items:center;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.7);
}

.lang button{
  border: 0;
  background: transparent;
  padding: 8px 10px;
  border-radius: 10px;
  font-weight: 900;
  color: var(--muted);
  cursor: pointer;
}

.lang button.active{
  background: rgba(37,99,235,.12);
  color: var(--brand2);
}

/* Burger button hidden on desktop */
.burger{
  display:none;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.78);
  box-shadow: 0 10px 24px rgba(2,6,23,.10);
  cursor: pointer;
  position: relative;
}

.burgerLines{
  position:absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 2px;
  background: var(--text);
  transform: translate(-50%, -50%);
  border-radius: 2px;
}

.burgerLines::before,
.burgerLines::after{
  content:"";
  position:absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

.burgerLines::before{ top: -6px; }
.burgerLines::after{ top: 6px; }

/* Overlay */
.menuOverlay{
  position: fixed;
  inset: 0;
  background: rgba(2,6,23,.45);
  backdrop-filter: blur(6px);
  z-index: 80;
}

/* Drawer */
.mobileMenu{
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(360px, 86vw);
  background: rgba(255,255,255,.92);
  border-left: 1px solid rgba(226,232,240,.95);
  box-shadow: -20px 0 50px rgba(2,6,23,.20);
  z-index: 90;
  padding: 16px;
  display:flex;
  flex-direction: column;

  /* closed state */
  transform: translateX(110%);
  transition: transform .18s ease;
}

.mobileMenu.open{
  transform: translateX(0%);
}

.mobileMenuHeader{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.mobileMenuTitle{
  font-weight: 900;
  letter-spacing: -.2px;
}

.menuClose{
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.86);
  cursor: pointer;
  font-weight: 900;
  color: var(--muted);
}

.mobileMenuLinks{
  display:flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 0;
}

.mLink{
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding: 14px 14px;
  border-radius: 14px;
  border: 1px solid rgba(226,232,240,.9);
  background: rgba(255,255,255,.86);
  font-weight: 900;
  color: var(--text);
  text-decoration:none;
}

.mLink::after{
  content: "→";
  color: var(--muted2);
  font-family: var(--mono);
}

.mLink:hover{
  text-decoration:none;
  background: rgba(37,99,235,.08);
  border-color: rgba(37,99,235,.18);
}

.mobileMenuFooter{
  margin-top: auto;
  display:flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.mobileMenuHint{
  font-size: 12px;
  color: var(--muted2);
  line-height: 1.6;
}

/* Desktop rules */
@media (min-width: 761px){
  .navDesktop{ display:flex; }
  .burger{ display:none; }
  .menuOverlay{ display:none; }
  .mobileMenu{ display:none; }
}

/* Mobile breakpoint: replace desktop nav with burger */
@media (max-width: 760px){
  .container{
    width: min(1140px, calc(100% - 28px));
  }

  .nav{
    flex-direction: row;
    align-items:center;
  }

  .navDesktop{
    display:none !important;
  }

  .burger{
    display:inline-flex !important;
    align-items:center;
    justify-content:center;
    margin-left: auto;
  }
}

/* Prevent body scroll while menu open */
body.menuOpen{
  overflow: hidden;
}

/* Chapters */
section{ scroll-margin-top: 80px; }

.sectionSnap{
  min-height: 100vh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  align-items: center;
  padding: 88px 0;
}

.stage{
  width: min(1140px, calc(100% - 40px));
  margin: 0 auto;
}

.sectionSnap:nth-of-type(odd){
  background: rgba(255,255,255,.35);
}

/* Type */
.sectionTitle{
  font-size: clamp(28px, 3vw, 40px);
  margin: 0 0 12px;
  letter-spacing: -0.8px;
}

.sectionLead{
  font-size: 18px;
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 78ch;
}

h1{
  margin: 0 0 12px;
  font-size: clamp(34px, 4.2vw, 56px);
  line-height: 1.02;
  letter-spacing: -1px;
}

.heroLead{
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
  max-width: 62ch;
}

.h3{ margin: 0 0 10px; }

.p{
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.8;
}

.mt{ margin-top: 16px; }
.mt2{ margin-top: 14px; }

/* Hero splash */
.heroSplash{
  padding-top: 72px;
  position: relative;
}

.heroShell{
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 28px;
  align-items: center;
}

@media (max-width: 980px){
  .heroShell{ grid-template-columns: 1fr; }
}

.heroH1{
  margin: 0 0 14px;
  font-size: clamp(38px, 4.6vw, 64px);
  line-height: 1.02;
  letter-spacing: -1.2px;
}

.badge{
  display:inline-flex;
  align-items:center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--border);
  background: rgba(255,255,255,.75);
  border-radius: 999px;
  padding: 8px 12px;
  margin-bottom: 14px;
}

.badgeLive{
  background: rgba(255,255,255,.85);
  border: 1px solid rgba(226,232,240,.95);
  box-shadow: 0 8px 22px rgba(2,6,23,.06);
}

.dot{
  width: 8px; height: 8px;
  border-radius: 999px;
  background: var(--bad);
  box-shadow: 0 0 0 4px rgba(239,68,68,.12);
}

.dotLive{
  background: var(--good);
  box-shadow: 0 0 0 4px rgba(22,163,74,.14);
}

.ctaRow{
  display:flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items:center;
  margin-top: 18px;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-weight: 900;
  cursor:pointer;
  background: #fff;
  color: var(--text);
  box-shadow: 0 6px 16px rgba(2,6,23,.06);
}

.btnPrimary{
  background: linear-gradient(180deg, var(--brand) 0%, var(--brand2) 100%);
  color: #fff;
  border: 1px solid rgba(37,99,235,.35);
}

.btn:hover{ transform: translateY(-1px); }
.btn:active{ transform: translateY(0px); }

.note{
  font-size: 12px;
  color: var(--muted2);
  line-height: 1.6;
  max-width: 70ch;
}

.kbd{
  font-family: var(--mono);
  border: 1px solid var(--border);
  padding: 4px 8px;
  border-radius: 10px;
  background: rgba(255,255,255,.7);
}

/* Meta pills */
.heroMeta{
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.metaPill{
  display:inline-flex;
  align-items:center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.78);
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
}

.metaIcon{
  width: 26px;
  height: 26px;
  border-radius: 10px;
  display:grid;
  place-items:center;
  background: rgba(37,99,235,.10);
  border: 1px solid rgba(37,99,235,.18);
  color: var(--brand2);
  font-weight: 900;
}

.heroFine{
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted2);
  line-height: 1.7;
  max-width: 72ch;
}

/* Dashboard card */
.dashCard{
  background: rgba(255,255,255,.86);
  border: 1px solid rgba(226,232,240,.95);
  border-radius: 18px;
  box-shadow: 0 18px 44px rgba(2,6,23,.10);
  padding: 18px;
  position: relative;
  overflow: hidden;
}

.dashCard::before{
  content:"";
  position:absolute;
  inset:-40px -40px auto -40px;
  height: 220px;
  background:
    radial-gradient(circle at 20% 40%, rgba(37,99,235,.20), transparent 45%),
    radial-gradient(circle at 80% 30%, rgba(245,158,11,.16), transparent 45%);
  opacity: .9;
  pointer-events:none;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.95), transparent 90%);
}

.dashHeader, .dashStats, .dashList, .dashFoot{
  position: relative;
  z-index: 1;
}

.dashHeader{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.dashTitle{
  font-weight: 900;
  letter-spacing: -.2px;
}

.dashStatus{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.80);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted2);
}

.dashStatus.ok{
  border-color: rgba(22,163,74,.25);
}

.okDot{
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--good);
  box-shadow: 0 0 0 4px rgba(22,163,74,.14);
}

.dashStats{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}

.stat{
  border: 1px solid var(--border);
  background: rgba(255,255,255,.76);
  border-radius: 14px;
  padding: 12px;
}

.statK{
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted2);
  margin-bottom: 6px;
}

.statV{
  font-weight: 900;
  letter-spacing: -.2px;
}

.dashList{
  display:grid;
  gap: 8px;
  margin-top: 4px;
}

.dashItem{
  display:flex;
  gap: 10px;
  align-items:flex-start;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.76);
  color: var(--muted);
  line-height: 1.6;
  font-size: 13px;
}

.dashIcon{ flex: 0 0 auto; }

.dashFoot{
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted2);
  line-height: 1.6;
}

/* Cards */
.cards{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 1000px){
  .cards{ grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px){
  .cards{ grid-template-columns: 1fr; }
}

.card{
  background: rgba(255,255,255,.88);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 6px 18px rgba(2,6,23,.05);
  padding: 18px;
  min-height: 150px;
}

.cardIcon{
  width: 40px; height: 40px;
  border-radius: 14px;
  display:grid; place-items:center;
  background: rgba(37,99,235,.10);
  border: 1px solid rgba(37,99,235,.18);
  margin-bottom: 10px;
  font-size: 18px;
}

.card h3{
  margin: 0 0 6px;
  font-size: 16px;
  letter-spacing: -.2px;
}

.card p{
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
}

/* Two col */
.twoCol{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items:start;
}

@media (max-width: 900px){
  .twoCol{ grid-template-columns: 1fr; }
}

.panel{
  background: rgba(255,255,255,.90);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

.panelSoft{
  background: rgba(255,255,255,.80);
}

.panelAccent{
  background: rgba(37,99,235,.06);
  border-color: rgba(37,99,235,.18);
}

.tag{
  font-family: var(--mono);
  font-size: 12px;
  color: var(--brand2);
  font-weight: 900;
}

.quote{
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.8;
}

.list{
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.8;
}

.list li{ margin: 6px 0; }

.tech{
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.chip{
  font-family: var(--mono);
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.80);
  color: var(--muted);
}

/* Pricing tiers */
.tiers{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 900px){
  .tiers{ grid-template-columns: 1fr; }
}

.tier{
  background: rgba(255,255,255,.92);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  position:relative;
}

.tierFeatured{
  border-color: rgba(37,99,235,.35);
  box-shadow: 0 14px 34px rgba(37,99,235,.12);
}

.tierTag{
  position:absolute;
  top: 14px;
  right: 14px;
  font-family: var(--mono);
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(37,99,235,.10);
  border: 1px solid rgba(37,99,235,.18);
  color: var(--brand2);
  font-weight: 900;
}

.price{
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -0.5px;
  margin: 10px 0 8px;
}

.price small{
  font-size: 12px;
  color: var(--muted2);
  font-weight: 800;
  font-family: var(--mono);
}

.tierLead{
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}

/* Form */
form{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

@media (max-width: 900px){
  form{ grid-template-columns: 1fr; }
}

label{
  display:flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 800;
}

input, textarea, select{
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 12px;
  font-family: var(--sans);
  font-size: 14px;
  background: rgba(255,255,255,.95);
  outline: none;
}

textarea{ min-height: 120px; resize: vertical; }
.full{ grid-column: 1 / -1; }

.hp{
  position:absolute;
  left:-9999px;
  width:1px;
  height:1px;
  opacity:0;
}

.formActions{
  grid-column: 1 / -1;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.toast{
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.90);
  color: var(--muted);
  display:none;
}

.toast.ok{
  border-color: rgba(22,163,74,.35);
  background: rgba(22,163,74,.08);
  color: #14532d;
}

.toast.bad{
  border-color: rgba(239,68,68,.35);
  background: rgba(239,68,68,.08);
  color: #7f1d1d;
}

/* Mini scroll hint */
.scrollHint{
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  border: 1px solid rgba(226,232,240,.95);
  background: rgba(255,255,255,.82);
  border-radius: 999px;
  padding: 10px 14px;
  display:flex;
  align-items:center;
  gap: 10px;
  font-weight: 900;
  color: var(--muted);
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(2,6,23,.10);
}

.scrollHint:hover{
  transform: translateX(-50%) translateY(-1px);
}

.scrollHintText{ font-size: 12px; }

.scrollHintIcon{
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1;
  animation: bounce 1.6s infinite;
}

@keyframes bounce{
  0%, 100% { transform: translateY(0); opacity: .9; }
  50% { transform: translateY(4px); opacity: 1; }
}

/* Back to top */
.backToTop{
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(226,232,240,.95);
  background: rgba(255,255,255,.86);
  box-shadow: 0 14px 34px rgba(2,6,23,.14);
  cursor: pointer;
  font-weight: 900;
  color: var(--brand2);
  display:none;
  z-index: 70;
}

.backToTop.show{ display:block; }

.backToTop:hover{ transform: translateY(-1px); }

/* Footer */
footer{
  padding: 26px 0 40px;
  color: var(--muted2);
  font-size: 12px;
  background: rgba(255,255,255,.35);
}

.footerRow{
  display:flex;
  justify-content:space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.footGap{ margin-left: 8px; }

/* Touch devices: remove hover transforms */
@media (hover: none){
  .btn:hover,
  .navDesktop a:hover,
  .backToTop:hover,
  .scrollHint:hover{
    transform: none;
  }
}

/* Mobile layout improvements */
@media (max-width: 760px){
  .stage{
    width: min(1140px, calc(100% - 28px));
  }

  .sectionSnap{
    min-height: auto;
    padding: 68px 0;
  }

  .sectionLead{ font-size: 16px; }
  .heroLead{ font-size: 16px; }

  .heroH1{
    font-size: clamp(34px, 9vw, 52px);
    letter-spacing: -1px;
  }

  .ctaRow{
    flex-direction: column;
    align-items: stretch;
  }

  .btn{
    width: 100%;
    padding: 14px 16px;
  }

  .metaPill{
    width: 100%;
    justify-content: flex-start;
  }

  .dashStats{
    grid-template-columns: 1fr;
  }

  input, textarea, select{
    font-size: 16px;
    padding: 14px 14px;
  }

  .formActions{
    flex-direction: column;
    align-items: stretch;
  }

  .scrollHint{
    bottom: 12px;
    padding: 10px 12px;
  }

  .backToTop{
    right: 12px;
    bottom: 12px;
  }

  .footerRow{
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  .scrollHintIcon{ animation: none; }
}