/* NetMesh Studio marketing home page. Shares the design tokens of the app
   (static/css/styles.css) so home -> studio feels like one product. */
:root {
  --bg: #0f1222;
  --bg-2: #161a30;
  --card: #1b2039;
  --card-2: #222850;
  --line: #2c335c;
  --text: #eef1ff;
  --muted: #9aa3cf;
  --primary: #6c8cff;
  --primary-2: #8a6cff;
  --good: #3ad29f;
  --warn: #ffb454;
  --bad: #ff6b81;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  /* Unified page rail shared with the app (styles.css): every bar and
     section aligns to the same max width and side gutters. */
  --page-max: 1440px;
  --gutter: clamp(1.1rem, 2.5vw, 2.2rem);
  /* Themable surfaces (light mode overrides these tokens only). */
  --on-primary: #f2f4ff;           /* text on primary gradients — never pure white */
  --page-bg:
    radial-gradient(1100px 520px at 85% -8%, #232a54 0%, rgba(15,18,34,0) 60%),
    radial-gradient(900px 480px at -10% 30%, #1c2246 0%, rgba(15,18,34,0) 55%),
    var(--bg);
  --surface-veil: rgba(15,18,34,.82);
  --chip-bg: rgba(27,32,57,.93);
  --mesh-shadow: drop-shadow(0 18px 40px rgba(0,0,0,.45));
  --line-strong: var(--line);
}

/* ---------- light theme (system preference or forced) ----------
   Off-whites and light grays only — never pure white. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #e7eaf2; --bg-2: #dde1ec; --card: #f5f6fa; --card-2: #e9ecf6;
    --line: #b0b6cb; --line-strong: #7f88a5; --text: #232840; --muted: #575f7e;
    --primary: #4a67d6; --primary-2: #7457d6;
    --good: #157a52; --warn: #8a5300; --bad: #bf3450;
    --shadow: 0 10px 30px rgba(45,55,100,.14);
    --on-primary: #f4f6fd;
    --page-bg:
      radial-gradient(1100px 520px at 85% -8%, #dde3f5 0%, rgba(238,240,246,0) 60%),
      radial-gradient(900px 480px at -10% 30%, #e3e7f6 0%, rgba(238,240,246,0) 55%),
      var(--bg);
    --surface-veil: rgba(238,240,246,.86);
    --chip-bg: rgba(245,246,250,.95);
    --mesh-shadow: drop-shadow(0 18px 40px rgba(60,70,120,.28));
  }
}
:root[data-theme="light"] {
  --bg: #e7eaf2; --bg-2: #dde1ec; --card: #f5f6fa; --card-2: #e9ecf6;
  --line: #b0b6cb; --line-strong: #7f88a5; --text: #232840; --muted: #575f7e;
  --primary: #4a67d6; --primary-2: #7457d6;
  --good: #157a52; --warn: #8a5300; --bad: #bf3450;
  --shadow: 0 10px 30px rgba(45,55,100,.14);
  --on-primary: #f4f6fd;
  --page-bg:
    radial-gradient(1100px 520px at 85% -8%, #dde3f5 0%, rgba(238,240,246,0) 60%),
    radial-gradient(900px 480px at -10% 30%, #e3e7f6 0%, rgba(238,240,246,0) 55%),
    var(--bg);
  --surface-veil: rgba(238,240,246,.86);
  --chip-bg: rgba(245,246,250,.95);
  --mesh-shadow: drop-shadow(0 18px 40px rgba(60,70,120,.28));
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--page-bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}
h1, h2, h3 { margin: 0 0 .45rem; font-weight: 800; letter-spacing: -.015em; }
p { margin: 0 0 .6rem; }
a { color: inherit; }
.svg-ic { width: 1em; height: 1em; display: inline-block; vertical-align: -.12em; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border: none; border-radius: var(--radius-sm); padding: .85rem 1.35rem;
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: filter .15s, border-color .15s, color .15s, background .15s;
  min-height: 44px;
}
.btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: var(--on-primary); box-shadow: 0 6px 20px rgba(108,140,255,.28);
}
.btn.primary:hover { filter: brightness(1.1); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--primary); }
.btn.lg { padding: 1rem 1.6rem; font-size: 1.02rem; }
.btn.block { width: 100%; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center;
  justify-content: space-between; gap: 1rem;
  /* Full-bleed bar whose content aligns to the shared page rail. */
  padding: .8rem max(var(--gutter), calc((100% - var(--page-max)) / 2));
  background: var(--surface-veil); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-brand { display: flex; align-items: center; gap: .55rem; font-weight: 800; text-decoration: none; font-size: 1.05rem; }
.brand-mark {
  width: 34px; height: 34px; display: grid; place-items: center; font-size: 1.1rem;
  border-radius: 10px; background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: var(--on-primary);
}
.brand-mark.sm { width: 26px; height: 26px; font-size: .9rem; border-radius: 8px; }
.nav-links { display: flex; align-items: center; gap: clamp(.4rem, 2vw, 1.3rem); }
.nav-links a { text-decoration: none; color: var(--muted); font-weight: 500; padding: .5rem .35rem; transition: color .15s; }
.nav-links a:hover { color: var(--text); }
.nav-links a.nav-cta { color: var(--on-primary); padding: .6rem 1.05rem; }
.nav-signin { white-space: nowrap; }
.theme-btn {
  width: 40px; height: 40px; flex: 0 0 auto; display: grid; place-items: center;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px;
  color: var(--muted); cursor: pointer; transition: color .15s, border-color .15s;
}
.theme-btn:hover { color: var(--text); border-color: var(--primary); }
.theme-btn svg { width: 18px; height: 18px; }
.theme-btn .t-ic { display: none; }
.theme-btn[data-mode="light"] .t-light,
.theme-btn[data-mode="dark"] .t-dark,
.theme-btn[data-mode="system"] .t-system { display: block; }
@media (max-width: 720px) {
  .nav-links a:not(.nav-cta):not(.nav-signin) { display: none; }
}

/* ---------- hero ---------- */
.hero {
  display: grid; grid-template-columns: 1fr; gap: 2.2rem; align-items: center;
  max-width: var(--page-max); margin: 0 auto;
  padding: clamp(2.4rem, 7vw, 5rem) var(--gutter) 2.5rem;
}
@media (min-width: 900px) { .hero { grid-template-columns: 6fr 5fr; } }
.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: var(--primary);
  background: rgba(108,140,255,.12); border: 1px solid rgba(108,140,255,.3);
  padding: .3rem .7rem; border-radius: 999px; margin-bottom: 1rem;
}
.hero h1 { font-size: clamp(1.9rem, 4.6vw, 3rem); line-height: 1.12; margin-bottom: .9rem; }
.lede { color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.12rem); max-width: 34rem; margin-bottom: 1.4rem; }
.cta-row { display: flex; gap: .7rem; flex-wrap: wrap; }
.cta-note { margin-top: .9rem; font-size: .88rem; color: var(--good); display: flex; align-items: center; gap: .45rem; }

.hero-visual { position: relative; justify-self: center; width: min(420px, 88vw); }
.hero-mesh { width: 100%; height: auto; display: block; filter: var(--mesh-shadow); }
.float-chip {
  position: absolute; display: flex; align-items: center; gap: .4rem;
  background: var(--chip-bg); border: 1px solid var(--line); border-radius: 999px;
  padding: .45rem .8rem; font-size: .82rem; font-weight: 600; box-shadow: var(--shadow);
}
.float-chip .svg-ic { color: var(--good); }
.chip-tl { top: 6%; left: -4%; }
.chip-br { bottom: 20%; right: -5%; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot.good { background: var(--good); }
.dot.p1 { background: var(--primary); }
.dot.p2 { background: var(--good); margin-left: -3px; }
.dot.p3 { background: var(--warn); margin-left: -3px; }
.float-card {
  position: absolute; left: 4%; bottom: -6%; width: 190px;
  background: var(--chip-bg); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: .7rem .8rem; box-shadow: var(--shadow);
  font-size: .8rem;
}
.fc-row { display: flex; justify-content: space-between; align-items: center; }
.fc-row .bad { color: var(--bad); } .fc-row .good { color: var(--good); }
.fc-bar { height: 6px; border-radius: 999px; background: rgba(255,107,129,.25); margin: .45rem 0; overflow: hidden; }
.fc-fill { width: 100%; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--good), #2bb98a); }

/* ---------- sections ---------- */
.section { max-width: var(--page-max); margin: 0 auto; padding: clamp(2.2rem, 6vw, 4rem) var(--gutter); }
.section-h { font-size: clamp(1.45rem, 3vw, 2rem); text-align: center; }
.section-sub { color: var(--muted); text-align: center; max-width: 40rem; margin: 0 auto 2rem; }
.grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }

.vcard, .fcard {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem; transition: border-color .2s, transform .2s;
}
.vcard:hover, .fcard:hover { border-color: var(--primary); }
.vic, .fic {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  background: var(--card-2); color: var(--primary); margin-bottom: .8rem;
}
.vic svg, .fic svg { width: 20px; height: 20px; }
.vcard h3 { font-size: 1.05rem; }
.vcard p { color: var(--muted); font-size: .92rem; margin: 0; }
.fcard h3 { font-size: .98rem; }
.fcard p { color: var(--muted); font-size: .85rem; margin: 0; }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: 1fr; gap: .8rem; align-items: stretch; }
@media (min-width: 900px) { .steps { grid-template-columns: 1fr auto 1fr auto 1fr; } }
.step {
  position: relative; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.4rem 1.25rem 1.2rem; text-align: center;
}
.step-n {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: var(--on-primary); font-weight: 800; font-size: .85rem; box-shadow: 0 4px 12px rgba(108,140,255,.4);
}
.step-ic {
  width: 46px; height: 46px; margin: .4rem auto .7rem; border-radius: 13px;
  display: grid; place-items: center; background: var(--card-2); color: var(--primary);
}
.step-ic svg { width: 22px; height: 22px; }
.step h3 { font-size: 1.02rem; }
.step p { color: var(--muted); font-size: .9rem; margin: 0; }
.step-arrow { display: none; color: var(--line); align-self: center; }
.step-arrow svg { width: 26px; height: 26px; }
@media (min-width: 900px) { .step-arrow { display: block; } }

/* ---------- trial band ---------- */
.band { padding: 0 var(--gutter); }
.band-inner {
  max-width: var(--page-max); margin: 0 auto; display: flex; align-items: center;
  justify-content: space-between; gap: 1.4rem; flex-wrap: wrap;
  background: linear-gradient(120deg, rgba(108,140,255,.16), rgba(138,108,255,.10));
  border: 1px solid rgba(108,140,255,.35); border-radius: var(--radius);
  padding: clamp(1.4rem, 4vw, 2.2rem);
}
.band-inner h2 { font-size: clamp(1.3rem, 2.6vw, 1.7rem); }
.band-inner p { color: var(--muted); margin: 0; max-width: 30rem; }
.band-cta { display: flex; flex-direction: column; gap: .55rem; align-items: flex-start; }
.band-note { font-size: .82rem; color: var(--muted); }

/* ---------- plans ---------- */
.plans { align-items: stretch; }
.pcard {
  position: relative; display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem 1.35rem;
}
.pcard.featured { border-color: rgba(108,140,255,.55); box-shadow: 0 0 0 1px rgba(108,140,255,.35), var(--shadow); }
.pcard-tag {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: var(--on-primary);
  padding: .25rem .7rem; border-radius: 999px; white-space: nowrap;
}
.pcard h3 { font-size: 1.05rem; color: var(--muted); font-weight: 600; }
.price { font-size: 1.35rem; font-weight: 800; margin: .15rem 0 .4rem; }
.pdesc { color: var(--muted); font-size: .9rem; }
.pcard ul { list-style: none; padding: 0; margin: .6rem 0 1.2rem; flex: 1; }
.pcard li { padding: .32rem 0 .32rem 1.5rem; position: relative; font-size: .92rem; color: var(--text); }
.pcard li::before {
  content: ""; position: absolute; left: 0; top: .62rem; width: 14px; height: 14px;
  background: rgba(58,210,159,.18); border-radius: 50%;
}
.pcard li::after {
  content: ""; position: absolute; left: 3.5px; top: .82rem; width: 7px; height: 4px;
  border-left: 2px solid var(--good); border-bottom: 2px solid var(--good); transform: rotate(-45deg);
}

/* ---------- final CTA ---------- */
.final { text-align: center; padding: clamp(2.5rem, 7vw, 4.5rem) var(--gutter); }
.final h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); margin-bottom: 1.2rem; }
.final-note { color: var(--muted); font-size: .92rem; margin-top: .9rem; }

/* ---------- footer ---------- */
.foot {
  display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap;
  max-width: var(--page-max); margin: 0 auto; padding: 1.6rem var(--gutter) 2.6rem;
  border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem;
}
.foot > span:first-child { display: flex; align-items: center; gap: .5rem; color: var(--text); font-weight: 700; }
.foot-links { display: flex; gap: 1.1rem; }
.foot-links a { color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--text); }

/* ---------- accessibility ---------- */
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
