/* ============================================================
   SitesAI — marketing site design system
   Brand: navy #173054 + electric yellow #f8f829 + white.
   Shared across all pages (index, sitesai-app, 3dx, pricing, contact).
   Fonts: Sora (display) + Public Sans (body), loaded via <link> in each
   page; degrades to system fonts offline.
   ============================================================ */

:root {
  --navy:      #173054;
  --navy-2:    #1d3d6b;
  --navy-deep: #0f2342;
  --yellow:    #f8f829;
  --yellow-dk: #e2e218;

  --ink:    #173054;   /* headings */
  --text:   #3f4a5b;   /* body copy on light */
  --muted:  #6b7789;
  --white:  #ffffff;
  --bg:     #ffffff;
  --bg-soft:#f4f6fb;
  --bg-soft2:#eef2f9;
  --line:   #e3e9f2;
  --line-2: #d3dceb;

  --font-display: "Sora", "Segoe UI Semibold", "Segoe UI", system-ui, sans-serif;
  --font-body: "Public Sans", "Segoe UI", system-ui, -apple-system, sans-serif;

  --maxw: 1180px;
  --radius: 16px;
  --radius-sm: 11px;
  --shadow: 0 18px 50px -24px rgba(23, 48, 84, 0.35);
  --shadow-sm: 0 8px 24px -14px rgba(23, 48, 84, 0.28);
  --ease: cubic-bezier(0.16, 0.84, 0.34, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink); line-height: 1.08; font-weight: 700; letter-spacing: -0.015em; }

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

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body);
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--navy);
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--yellow-dk); }
.eyebrow--light { color: var(--yellow); }
.eyebrow--light::before { background: var(--yellow); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-body); font-weight: 700; font-size: 0.95rem; letter-spacing: 0.005em;
  padding: 13px 24px; border-radius: 10px; border: 2px solid transparent; cursor: pointer;
  transition: transform 0.16s var(--ease), box-shadow 0.25s var(--ease), background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.btn .arr { transition: transform 0.2s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
.btn--primary { background: var(--yellow); color: var(--navy); box-shadow: 0 10px 26px -12px rgba(23,48,84,0.5); }
.btn--primary:hover { transform: translateY(-2px); background: var(--yellow-dk); box-shadow: 0 16px 32px -14px rgba(23,48,84,0.55); }
.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { transform: translateY(-2px); background: var(--navy-2); }
.btn--ghost { background: transparent; color: var(--navy); border-color: var(--line-2); }
.btn--ghost:hover { border-color: var(--navy); }
.btn--ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,0.35); }
.btn--ghost-light:hover { border-color: var(--yellow); color: var(--yellow); }
.btn--lg { padding: 16px 30px; font-size: 1.02rem; }
.btn--block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 18px; }
.logo { display: flex; align-items: center; height: 100%; }
.logo img { height: 34px; width: auto; }
.nav-menu { display: flex; align-items: center; gap: 34px; }
.nav-links { display: flex; align-items: center; gap: 30px; list-style: none; }
.nav-links a {
  font-weight: 600; font-size: 0.94rem; color: var(--ink); position: relative; padding: 6px 0;
  transition: color 0.18s;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0; background: var(--yellow-dk);
  transition: width 0.25s var(--ease);
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--navy); }
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { width: 100%; }

/* CSS-only mobile menu */
.nav-toggle, .nav-toggle-label { display: none; }
@media (max-width: 900px) {
  .nav-menu {
    position: fixed; inset: 76px 0 auto 0;
    flex-direction: column; gap: 0; align-items: stretch;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 10px 26px 22px;
    transform: translateY(-130%); transition: transform 0.32s var(--ease);
    box-shadow: var(--shadow); max-height: calc(100vh - 76px); overflow:auto;
  }
  .nav-links { flex-direction: column; align-items: stretch; gap: 0; width: 100%; }
  .nav-links li { border-bottom: 1px solid var(--line); }
  .nav-links a { display: block; padding: 15px 0; font-size: 1.05rem; }
  .nav-menu .btn { margin-top: 16px; }
  .nav-toggle:checked ~ .nav-menu { transform: translateY(0); }
  .nav-toggle-label {
    display: flex; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; margin: -8px;
  }
  .nav-toggle-label span { width: 26px; height: 2.5px; background: var(--navy); border-radius: 2px; transition: 0.25s var(--ease); }
  .nav-toggle:checked ~ .nav-toggle-label span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .nav-toggle:checked ~ .nav-toggle-label span:nth-child(2) { opacity: 0; }
  .nav-toggle:checked ~ .nav-toggle-label span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
}

/* ---------- Sections ---------- */
.section { padding: 92px 0; position: relative; }
.section--soft { background: var(--bg-soft); }
.section--navy { background: var(--navy); color: #e9eef6; }
.section--navy h1, .section--navy h2, .section--navy h3 { color: #fff; }
.section-head { max-width: 720px; margin-bottom: 52px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(1.9rem, 4.2vw, 3rem); margin-top: 16px; }
.section-head p { font-size: 1.12rem; color: var(--muted); margin-top: 16px; }
.section--navy .section-head p { color: #aebdd2; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--bg); }
.hero::before {
  /* blueprint grid + circuit glow */
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    radial-gradient(60% 60% at 88% 8%, rgba(248,248,41,0.18), transparent 60%),
    radial-gradient(50% 50% at 6% 90%, rgba(23,48,84,0.06), transparent 60%),
    repeating-linear-gradient(0deg, transparent 0 33px, rgba(23,48,84,0.035) 33px 34px),
    repeating-linear-gradient(90deg, transparent 0 33px, rgba(23,48,84,0.035) 33px 34px);
  mask-image: radial-gradient(120% 100% at 70% 20%, #000 25%, transparent 85%);
}
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; padding: 84px 0 92px; }
.hero h1 { font-size: clamp(2.6rem, 5.6vw, 4.3rem); letter-spacing: -0.03em; }
.hero h1 .mark { position: relative; white-space: nowrap; }
.hero h1 .mark::after {
  content: ""; position: absolute; left: -2px; right: -2px; bottom: 0.08em; height: 0.32em; z-index: -1;
  background: var(--yellow); border-radius: 3px; transform: rotate(-1.2deg);
}
.hero p.lede { font-size: 1.22rem; color: var(--text); margin-top: 24px; max-width: 50ch; }
.hero .cta-row { margin-top: 36px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero .trust { margin-top: 30px; display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 0.9rem; }
.hero .trust b { color: var(--navy); }

/* hero visual: stacked product chips */
.hero-visual { position: relative; }
.hero-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px; display: flex; gap: 16px; align-items: flex-start;
}
.hero-card + .hero-card { margin-top: 18px; }
.hero-card .ic { width: 52px; height: 52px; border-radius: 13px; flex: none; display: grid; place-items: center; }
.hero-card .ic svg { width: 28px; height: 28px; }
.hero-card.app .ic { background: var(--navy); color: var(--yellow); }
.hero-card.x3 .ic { background: var(--yellow); color: var(--navy); }
.hero-card h3 { font-size: 1.22rem; }
.hero-card .tag { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.hero-card p { font-size: 0.95rem; color: var(--text); margin-top: 5px; }
.hero-card .go { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font-weight: 700; font-size: 0.9rem; color: var(--navy); }
.hero-card .go .arr { transition: transform 0.2s var(--ease); }
.hero-card:hover .go .arr { transform: translateX(4px); }
.hero-deco { position: absolute; right: -40px; top: -38px; width: 120px; height: 120px; z-index: -1; color: var(--yellow); opacity: 0.9; }

/* ---------- Product split rows ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split.rev .split-media { order: 2; }
.split-media {
  border-radius: var(--radius); padding: 40px; min-height: 320px;
  display: grid; place-items: center; position: relative; overflow: hidden;
}
.split-media.navy { background: linear-gradient(150deg, var(--navy), var(--navy-deep)); }
.split-media.yellow { background: linear-gradient(150deg, #fff7b0, var(--yellow)); }
.split-media .big-glyph { width: 120px; height: 120px; }
.split-media.navy .big-glyph { color: var(--yellow); }
.split-media.yellow .big-glyph { color: var(--navy); }
.split-media .grid-tex { position: absolute; inset: 0; opacity: 0.5;
  background-image: repeating-linear-gradient(0deg, transparent 0 27px, rgba(255,255,255,0.06) 27px 28px),
                    repeating-linear-gradient(90deg, transparent 0 27px, rgba(255,255,255,0.06) 27px 28px); }
.split-media.yellow .grid-tex { background-image: repeating-linear-gradient(0deg, transparent 0 27px, rgba(23,48,84,0.06) 27px 28px),
                    repeating-linear-gradient(90deg, transparent 0 27px, rgba(23,48,84,0.06) 27px 28px); }
.split-body .tag-pill {
  display: inline-flex; align-items: center; gap: 7px; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.07em;
  text-transform: uppercase; padding: 6px 12px; border-radius: 30px; margin-bottom: 16px;
}
.tag-pill.app { background: var(--navy); color: var(--yellow); }
.tag-pill.x3 { background: var(--yellow); color: var(--navy); }
.split-body h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.split-body p { color: var(--text); font-size: 1.06rem; margin-top: 16px; }
.split-body .actions { margin-top: 26px; display: flex; gap: 13px; flex-wrap: wrap; align-items: center; }

/* ---------- Feature grid ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.feature {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 28px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s;
}
.feature:hover { transform: translateY(-5px); box-shadow: var(--shadow-sm); border-color: var(--line-2); }
.feature .fic { width: 50px; height: 50px; border-radius: 13px; display: grid; place-items: center; background: var(--bg-soft2); color: var(--navy); margin-bottom: 18px; }
.feature .fic svg { width: 26px; height: 26px; }
.feature h3 { font-size: 1.2rem; }
.feature p { margin-top: 9px; font-size: 0.97rem; color: var(--muted); }
.section--soft .feature { background: #fff; }

/* checklist */
.checklist { list-style: none; display: grid; gap: 13px; margin-top: 8px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; font-size: 1rem; color: var(--text); }
.checklist li svg { width: 22px; height: 22px; flex: none; margin-top: 2px; color: var(--navy); }
.section--navy .checklist li { color: #cdd8e8; }
.section--navy .checklist li svg { color: var(--yellow); }

/* ---------- Stats strip ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat { text-align: center; }
.stat .k { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.9rem, 4vw, 2.7rem); color: #fff; }
.stat .k em { color: var(--yellow); font-style: normal; }
.stat .v { font-size: 0.86rem; letter-spacing: 0.04em; color: #aebdd2; margin-top: 4px; text-transform: uppercase; }

/* ---------- Pricing ---------- */
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: stretch; }
.price-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 34px 30px;
  display: flex; flex-direction: column; position: relative;
}
.price-card.featured { border: 2px solid var(--navy); box-shadow: var(--shadow); }
.price-card .ribbon {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--yellow); color: var(--navy); font-weight: 800; font-size: 0.72rem; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 6px 16px; border-radius: 30px;
}
.price-card .plan { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; color: var(--navy); }
.price-card .desc { color: var(--muted); font-size: 0.92rem; margin-top: 6px; min-height: 42px; }
.price-card .price { margin: 20px 0 4px; }
.price-card .price .amt { font-family: var(--font-display); font-weight: 800; font-size: 3rem; color: var(--ink); letter-spacing: -0.02em; }
.price-card .price .per { color: var(--muted); font-weight: 600; }
.price-card .checklist { margin: 22px 0 28px; }
.price-card .checklist li { font-size: 0.95rem; }
.price-card .btn { margin-top: auto; }

/* ---------- Testimonials ---------- */
.quote {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 28px;
}
.quote .stars { color: var(--yellow-dk); font-size: 1.05rem; letter-spacing: 2px; }
.quote p { font-size: 1.05rem; color: var(--ink); margin: 14px 0 18px; font-weight: 500; }
.quote .who { display: flex; align-items: center; gap: 12px; }
.quote .who .av { width: 42px; height: 42px; border-radius: 50%; background: var(--navy); color: var(--yellow); display: grid; place-items: center; font-weight: 800; font-family: var(--font-display); }
.quote .who b { color: var(--navy); display: block; font-size: 0.95rem; }
.quote .who span { color: var(--muted); font-size: 0.85rem; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--yellow); border-radius: 22px; padding: 56px; text-align: center; position: relative; overflow: hidden; }
.cta-band h2 { color: var(--navy); font-size: clamp(1.8rem, 4vw, 2.8rem); }
.cta-band p { color: #4a4a13; max-width: 52ch; margin: 14px auto 28px; font-size: 1.1rem; font-weight: 500; }
.cta-band .cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.cta-band .deco { position: absolute; inset: 0; opacity: 0.18; color: var(--navy);
  background-image: repeating-linear-gradient(45deg, currentColor 0 1px, transparent 1px 13px); pointer-events: none; }

/* ---------- App store badges ---------- */
.stores { display: flex; gap: 12px; flex-wrap: wrap; }
.store {
  display: inline-flex; align-items: center; gap: 10px; background: var(--navy); color: #fff;
  border-radius: 11px; padding: 10px 16px; transition: transform 0.18s var(--ease), background 0.2s;
}
.store:hover { transform: translateY(-2px); background: var(--navy-2); }
.store svg { width: 22px; height: 22px; }
.store small { display: block; font-size: 0.6rem; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.8; }
.store b { font-size: 0.98rem; font-weight: 700; }

/* ---------- Forms (contact) ---------- */
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 38px; box-shadow: var(--shadow-sm); }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: 0.9rem; color: var(--navy); margin-bottom: 7px; }
.field input, .field textarea, .field select {
  width: 100%; font-family: var(--font-body); font-size: 1rem; color: var(--ink);
  padding: 13px 15px; border: 1.5px solid var(--line-2); border-radius: 10px; background: var(--bg-soft); transition: border-color 0.2s, background 0.2s;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--navy); background: #fff; }
.field textarea { min-height: 130px; resize: vertical; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.contact-info .ci { display: flex; gap: 15px; align-items: flex-start; margin-bottom: 26px; }
.contact-info .ci .ic { width: 46px; height: 46px; border-radius: 12px; background: var(--navy); color: var(--yellow); display: grid; place-items: center; flex: none; }
.contact-info .ci .ic svg { width: 22px; height: 22px; }
.contact-info .ci b { color: var(--navy); display: block; font-size: 1.02rem; }
.contact-info .ci a, .contact-info .ci span { color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: #aebdd2; padding: 64px 0 30px; }
.footer-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 36px; }
.footer-brand img { height: 32px; filter: brightness(0) invert(1); opacity: 0.95; }
.footer-brand p { margin-top: 16px; font-size: 0.95rem; max-width: 32ch; color: #97a7bf; }
.footer-col h4 { color: #fff; font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 16px; font-family: var(--font-body); font-weight: 700; }
.footer-col a { display: block; padding: 6px 0; font-size: 0.95rem; color: #aebdd2; transition: color 0.18s; }
.footer-col a:hover { color: var(--yellow); }
.footer-bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.1);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 0.86rem; color: #8194ad; }
.footer-bottom .socials { display: flex; gap: 14px; }
.footer-bottom .socials a { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: rgba(255,255,255,0.06); transition: background 0.2s, color 0.2s; }
.footer-bottom .socials a:hover { background: var(--yellow); color: var(--navy); }
.footer-bottom .socials svg { width: 17px; height: 17px; }

/* ---------- Page hero (interior pages) ---------- */
.page-hero { background: var(--navy); color: #fff; padding: 70px 0 78px; position: relative; overflow: hidden; }
.page-hero::after { content: ""; position: absolute; inset: 0; opacity: 0.5; pointer-events: none;
  background: radial-gradient(50% 80% at 92% 0%, rgba(248,248,41,0.16), transparent 60%); }
.page-hero .inner { position: relative; z-index: 1; max-width: 760px; }
.page-hero h1, .page-hero h2, .page-hero h3 { color: #fff; }
.page-hero h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); margin-top: 16px; }
.page-hero p { font-size: 1.15rem; color: #b9c6db; margin-top: 18px; max-width: 58ch; }
.page-hero .cta-row { margin-top: 30px; display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Reveal animation ---------- */
[data-rise] { opacity: 0; transform: translateY(24px); animation: rise 0.8s var(--ease) forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }
.d1{animation-delay:.08s}.d2{animation-delay:.18s}.d3{animation-delay:.28s}.d4{animation-delay:.38s}.d5{animation-delay:.48s}.d6{animation-delay:.58s}
@media (prefers-reduced-motion: reduce) { [data-rise]{animation:none;opacity:1;transform:none} html{scroll-behavior:auto} }

/* ---------- Utilities ---------- */
.center { text-align: center; }
.mt-sm { margin-top: 14px; } .mt-md { margin-top: 26px; } .mt-lg { margin-top: 44px; }
.lead-light { color: #b9c6db; }

/* ============================================================
   Dynamic background + app mockups (visual showcase)
   ============================================================ */

/* ---- Animated aurora background ---- */
.aurora { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.aurora span { position: absolute; display: block; border-radius: 50%; filter: blur(70px); opacity: 0.55; will-change: transform; }
.aurora span:nth-child(1) { width: 460px; height: 460px; top: -120px; right: -60px; background: var(--yellow); opacity: 0.4; animation: drift1 19s ease-in-out infinite; }
.aurora span:nth-child(2) { width: 380px; height: 380px; bottom: -140px; left: -80px; background: #3f7fe6; opacity: 0.28; animation: drift2 23s ease-in-out infinite; }
.aurora span:nth-child(3) { width: 280px; height: 280px; top: 40%; left: 45%; background: var(--yellow); opacity: 0.16; animation: drift3 27s ease-in-out infinite; }
.page-hero .aurora span:nth-child(2) { background: #6ea8ff; opacity: 0.22; }
@keyframes drift1 { 0%,100%{ transform: translate(0,0) scale(1); } 50%{ transform: translate(-50px,40px) scale(1.12); } }
@keyframes drift2 { 0%,100%{ transform: translate(0,0) scale(1); } 50%{ transform: translate(60px,-30px) scale(1.15); } }
@keyframes drift3 { 0%,100%{ transform: translate(0,0) scale(1); } 50%{ transform: translate(-40px,-50px) scale(0.9); } }
.hero > .container, .page-hero > .container { position: relative; z-index: 2; }

/* ---- Device: phone (SitesAI app screen) ---- */
.mock-phone {
  width: 270px; max-width: 78vw; aspect-ratio: 9 / 18.6; margin: 0 auto;
  background: #0c1c33; border-radius: 34px; padding: 11px;
  box-shadow: 0 40px 80px -30px rgba(15,35,66,0.6), 0 0 0 2px rgba(255,255,255,0.04) inset;
  position: relative;
}
.mock-phone::before { content: ""; position: absolute; top: 14px; left: 50%; transform: translateX(-50%); width: 78px; height: 6px; border-radius: 6px; background: rgba(255,255,255,0.18); z-index: 3; }
.mock-phone .screen { background: #f4f6fb; border-radius: 24px; height: 100%; overflow: hidden; display: flex; flex-direction: column; }
.app-top { background: var(--navy); color: #fff; padding: 26px 16px 14px; }
.app-top .row { display: flex; align-items: center; justify-content: space-between; }
.app-top .brandmark { display: flex; align-items: center; gap: 7px; font-family: var(--font-display); font-weight: 700; font-size: 0.95rem; }
.app-top .brandmark i { width: 18px; height: 18px; border-radius: 5px; background: var(--yellow); display: inline-block; }
.app-top .bell { width: 26px; height: 26px; border-radius: 8px; background: rgba(255,255,255,0.12); }
.app-top h4 { color: #fff; font-family: var(--font-body); font-weight: 600; font-size: 0.82rem; margin-top: 14px; opacity: 0.85; }
.app-top .big { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; margin-top: 2px; }
.app-body { padding: 14px; display: grid; gap: 11px; }
.app-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.app-tile { background: #fff; border-radius: 13px; padding: 11px; box-shadow: 0 6px 16px -12px rgba(15,35,66,0.4); }
.app-tile .n { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; color: var(--navy); }
.app-tile .l { font-size: 0.6rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.app-tile.hl { background: var(--yellow); }
.app-tile.hl .n, .app-tile.hl .l { color: var(--navy); }
.app-rows { background: #fff; border-radius: 13px; padding: 6px 12px; box-shadow: 0 6px 16px -12px rgba(15,35,66,0.4); }
.app-rows .ar { display: flex; align-items: center; gap: 9px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.app-rows .ar:last-child { border-bottom: 0; }
.app-rows .av { width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: var(--yellow); display: grid; place-items: center; font-size: 0.6rem; font-weight: 800; flex: none; }
.app-rows .t { flex: 1; }
.app-rows .t b { display: block; font-size: 0.72rem; color: var(--ink); }
.app-rows .t span { font-size: 0.62rem; color: var(--muted); }
.app-rows .pill { font-size: 0.55rem; font-weight: 700; padding: 3px 7px; border-radius: 20px; background: #e7f6ee; color: #1f8a5b; }
.app-rows .pill.amber { background: #fdf2dc; color: #b9791f; }
.app-fab { margin: 2px 14px 16px; background: var(--navy); color: #fff; text-align: center; padding: 11px; border-radius: 12px; font-weight: 700; font-size: 0.78rem; }

/* ---- Device: browser (3DX 3D terrain) ---- */
.mock-browser {
  width: 100%; max-width: 540px; margin: 0 auto; background: #0c1c33; border-radius: 16px; padding: 0;
  box-shadow: 0 40px 80px -34px rgba(15,35,66,0.6); overflow: hidden;
}
.mock-browser .bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; }
.mock-browser .bar i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.25); display: inline-block; }
.mock-browser .bar i:nth-child(1) { background: #ff5f57; } .mock-browser .bar i:nth-child(2) { background: #febc2e; } .mock-browser .bar i:nth-child(3) { background: #28c840; }
.mock-browser .bar .url { margin-left: 10px; flex: 1; background: rgba(255,255,255,0.1); border-radius: 7px; padding: 5px 11px; font-family: var(--font-mono, monospace); font-size: 0.68rem; color: #b9c6db; }
.mock-browser .viewport { position: relative; aspect-ratio: 16 / 10.5; background: radial-gradient(120% 100% at 50% 0%, #16335c, #0a1626); overflow: hidden; }
.terrain-3d { position: absolute; inset: -20% -10% -30%; transform: perspective(700px) rotateX(58deg) rotateZ(-6deg); transform-origin: center 40%;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.10) 0 1px, transparent 1px 30px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.10) 0 1px, transparent 1px 30px),
    linear-gradient(120deg, #2b5fb0 0%, #2f8f7a 28%, #5fb84a 46%, #f8f829 62%, #e0913f 80%, #d8493f 100%);
  box-shadow: 0 0 80px rgba(0,0,0,0.4) inset;
}
.terrain-3d::after { content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(120deg, rgba(12,28,51,0.35) 0 1px, transparent 1px 22px); mix-blend-mode: multiply; }
.mock-browser .hud { position: absolute; left: 14px; bottom: 14px; background: rgba(12,28,51,0.78); backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,0.12); border-radius: 11px; padding: 10px 13px; display: flex; gap: 16px; }
.mock-browser .hud .m .n { font-family: var(--font-display); font-weight: 800; color: #fff; font-size: 1rem; }
.mock-browser .hud .m .n em { font-style: normal; color: var(--yellow); }
.mock-browser .hud .m .l { font-size: 0.58rem; letter-spacing: 0.06em; text-transform: uppercase; color: #9fb0c8; }
.mock-browser .legend { position: absolute; right: 14px; top: 14px; width: 9px; height: 92px; border-radius: 5px; background: linear-gradient(#d8493f, #e0913f, #f8f829, #5fb84a, #2f8f7a, #2b5fb0); box-shadow: 0 4px 14px -4px rgba(0,0,0,0.5); }

/* Home hero showcase stage (phone + floating browser) */
.hero-stage { position: relative; min-height: 440px; display: flex; align-items: center; justify-content: center; }
.hero-stage .mock-phone { position: relative; z-index: 2; }
.hero-stage .mock-browser { position: absolute; right: -8px; bottom: 6px; width: 300px; z-index: 1; transform: rotate(2deg); }
.hero-stage .float-badge { position: absolute; top: 6px; left: -6px; z-index: 3; background: #fff; border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow); padding: 11px 14px; display: flex; align-items: center; gap: 10px; }
.hero-stage .float-badge .d { width: 34px; height: 34px; border-radius: 9px; background: var(--yellow); color: var(--navy); display: grid; place-items: center; }
.hero-stage .float-badge .d svg { width: 19px; height: 19px; }
.hero-stage .float-badge b { display: block; font-size: 0.82rem; color: var(--ink); font-family: var(--font-display); }
.hero-stage .float-badge span { font-size: 0.66rem; color: var(--muted); }

/* mockups sit above the panel grid texture; tame phone size inside splits */
.split-media .mock-phone, .split-media .mock-browser { position: relative; z-index: 1; }
.split-media .mock-phone { width: 224px; }
.split-media .mock-browser { max-width: 460px; }

@media (prefers-reduced-motion: reduce) { .aurora span { animation: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: 30px; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; padding: 60px 0 70px; }
  .hero-visual { max-width: 460px; margin: 0 auto; }
  .hero-stage { min-height: 400px; }
  .hero-stage .mock-browser { right: 0; bottom: 0; width: 240px; }
  .split { grid-template-columns: 1fr; gap: 34px; }
  .split.rev .split-media { order: 0; }
  .grid-3, .pricing { grid-template-columns: 1fr; }
  .grid-2, .contact-grid { grid-template-columns: 1fr; gap: 30px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 30px 16px; }
  .section { padding: 66px 0; }
  .cta-band { padding: 42px 26px; }
}
@media (max-width: 540px) {
  .hero-stage .mock-browser, .hero-stage .float-badge { display: none; }
}
@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .form-card { padding: 26px 20px; }
  .hero p.lede { font-size: 1.1rem; }
}

/* ============================================================
   TOPO-DRIFT — animated topographic contour background.
   Decorative only; sits BEHIND content (content is z-index:2 via the
   existing `.hero > .container, .page-hero > .container{z-index:2}`).
   ============================================================ */
.topo {
  position: absolute;
  inset: 0;
  z-index: 0;                 /* behind .container (z-index:2) */
  pointer-events: none;
  overflow: hidden;
  /* themable tokens (overridden per context below) */
  --topo-stroke: rgba(23, 48, 84, 0.15);   /* navy contours on light  */
  --topo-index:  rgba(23, 48, 84, 0.30);   /* stronger index line     */
  --topo-glow:   rgba(248, 248, 41, 0.55); /* electric-yellow band    */
  --topo-node:   rgba(23, 48, 84, 0.55);
  --topo-op: 0.7;             /* master intensity dial (see integration) */
  /* mask anchor: keep the field densest on the RIGHT (light hero copy
     lives on the left). Per-context override below for navy. */
  --topo-mask: radial-gradient(125% 105% at 78% 20%, #000 26%, transparent 86%);
  opacity: var(--topo-op);
  -webkit-mask-image: var(--topo-mask);
          mask-image: var(--topo-mask);
}

/* Navy hero variant: faint light-blue contours; push density to the
   RIGHT and DOWN, away from the top-left .inner copy column. */
.page-hero .topo,
.section--navy .topo {
  --topo-stroke: rgba(150, 190, 255, 0.16);
  --topo-index:  rgba(180, 210, 255, 0.30);
  --topo-glow:   rgba(248, 248, 41, 0.40);
  --topo-node:   rgba(248, 248, 41, 0.80);
  --topo-mask: radial-gradient(120% 120% at 86% 84%, #000 22%, transparent 82%);
}

/* Yellow surfaces (e.g. .cta-band): navy contours, no yellow glow. */
.cta-band .topo,
.section--yellow .topo {
  --topo-stroke: rgba(23, 48, 84, 0.20);
  --topo-index:  rgba(23, 48, 84, 0.38);
  --topo-glow:   rgba(23, 48, 84, 0.16);
  --topo-node:   rgba(23, 48, 84, 0.55);
}

/* ---- LAYERING FIX: when a .topo is present, retire the OLD decorative
   pseudo-layer so we never stack grid + topo + glow behind copy. ---- */
.hero:has(.topo)::before { opacity: 0.35; }   /* keep a faint blueprint grid only */
.page-hero:has(.topo)::after { display: none; } /* topo carries its own yellow glow */

.topo svg {
  position: absolute;
  top: 50%; left: 50%;
  /* modest oversize so drift never reveals an edge, but small enough to
     keep the composited layer cheap on phones. */
  width: 120%; height: 120%;
  transform: translate(-50%, -50%);
  overflow: visible;
}

.topo .topo-lines path,
.topo .topo-index path {
  fill: none;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;  /* constant line weight despite upscale */
}
.topo .topo-lines path { stroke: var(--topo-stroke); stroke-width: 1.4; }
.topo .topo-index path { stroke: var(--topo-index);  stroke-width: 1.8; }

/* soft yellow "index contour" glow (the only rasterizing element). */
.topo .topo-index {
  filter: drop-shadow(0 0 var(--topo-glow-r, 7px) var(--topo-glow))
          drop-shadow(0 0 2px var(--topo-glow));
}

.topo .topo-nodes circle {
  fill: var(--topo-node);
  animation: topoNodePulse 4.5s ease-in-out infinite;
}
.topo .topo-nodes circle:nth-child(2) { animation-delay: 1.1s; }
.topo .topo-nodes circle:nth-child(3) { animation-delay: 2.2s; }
.topo .topo-nodes circle:nth-child(4) { animation-delay: 3.0s; }
@keyframes topoNodePulse {
  0%, 100% { opacity: 0.35; }
  50%      { opacity: 0.9; }
}

/* CSS-only baseline drift (enough on low-power devices / if JS is off).
   bg.js layers the real per-line undulation on top of this. */
.topo .topo-lines { animation: topoDrift 30s ease-in-out infinite; will-change: transform; }
.topo .topo-index { animation: topoDrift 38s ease-in-out infinite reverse; will-change: transform; }
@keyframes topoDrift {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50%      { transform: translate3d(-1.6%, 1.2%, 0); }
}

/* INTENSITY: stronger hero treatment. Light hero can run at full strength. */
.hero .topo { --topo-op: 0.9; }
/* navy page-hero stays calmer for contrast (default 0.7 already applied). */

/* SUBTLE site-wide layer: drop a .topo into a section wrapper at low op. */
.section .topo { --topo-op: 0.3; }
.section .topo .topo-index { filter: none; }   /* kill glow for calm texture */

/* ---- prefers-reduced-motion: freeze all motion; keep static map ---- */
@media (prefers-reduced-motion: reduce) {
  .topo .topo-lines,
  .topo .topo-index,
  .topo .topo-nodes circle { animation: none; }
  .topo .topo-index { filter: none; } /* drop the GPU glow when frozen */
}

/* ---- Mobile: ease intensity AND drop the rasterizing glow ---- */
@media (max-width: 700px) {
  .topo { --topo-op: 0.55; }
  .topo .topo-index { filter: none; }
  .topo svg { width: 140%; height: 140%; } /* a touch larger to cover 1-col stack */
}

/* ============================================================
   Real app screenshots framed inside the device mockups
   ============================================================ */
.mock-browser .shot-img { display: block; width: 100%; height: auto; }

.mock-phone.is-shot { aspect-ratio: auto; }
.mock-phone.is-shot::before { display: none; }   /* hide notch over the real app header */
.mock-phone.is-shot .screen { height: auto; background: #0c1c33; }
.mock-phone.is-shot .shot-img { display: block; width: 100%; height: auto; }

/* keep the hero phone's footprint so the hero composition holds */
.hero-stage .mock-phone.is-shot { aspect-ratio: 9 / 18.6; }
.hero-stage .mock-phone.is-shot .screen { height: 100%; }
.hero-stage .mock-phone.is-shot .shot-img { height: 100%; object-fit: cover; object-position: top center; }

/* ---------- Contact form status message ---------- */
.form-status { margin-top: 14px; font-size: 0.95rem; font-weight: 600; min-height: 1.2em; }
.form-status--ok { color: #1f8a5b; }
.form-status--err { color: #c0392b; }

/* ---------- Money-back guarantee panel (pricing) ---------- */
.guarantee-panel {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 26px 30px;
  border: 1px solid rgba(23, 48, 84, 0.14);
  border-radius: 18px;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(248, 248, 41, 0.10), transparent 60%),
    #fff;
  box-shadow: 0 10px 30px rgba(23, 48, 84, 0.07);
}
.guarantee-badge {
  flex: 0 0 auto;
  width: 60px; height: 60px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--navy);
  color: var(--yellow);
}
.guarantee-badge svg { width: 30px; height: 30px; }
.guarantee-copy h2 { font-size: 1.4rem; margin: 0 0 4px; }
.guarantee-copy p { margin: 0; color: var(--muted); }
@media (max-width: 640px) {
  .guarantee-panel { flex-direction: column; text-align: center; gap: 14px; padding: 24px 20px; }
}

/* ---------- Pricing polish ---------- */
.price-card { transition: transform 0.25s ease, box-shadow 0.25s ease; }
.price-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
/* numbered "how licensing works" steps */
.how-licence { counter-reset: sai-step; }
.how-licence .feature { counter-increment: sai-step; position: relative; padding-top: 54px; }
.how-licence .feature::before {
  content: "0" counter(sai-step);
  position: absolute; top: 16px; left: 22px;
  font-family: var(--font-display);
  font-weight: 800; font-size: 1.5rem; letter-spacing: -0.02em;
  color: var(--navy);
  background: linear-gradient(180deg, var(--yellow) 55%, transparent 55%);
  padding: 0 6px;
}

/* ============================================================
   SITESAI CHAT WIDGET (.sai-chat*) — see assets/chat.js.
   Browser talks only to the n8n webhook; brand navy/yellow.
   ============================================================ */
.sai-chat { position: fixed; right: 20px; bottom: 20px; z-index: 999; font-family: var(--font-body); }
.sai-chat-fab {
  position: relative;
  width: 58px; height: 58px; border: 0; border-radius: 50%;
  background: var(--navy); color: var(--yellow);
  display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 10px 28px rgba(23, 48, 84, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.sai-chat-fab:hover { transform: translateY(-3px); box-shadow: 0 14px 32px rgba(23, 48, 84, 0.4); }
.sai-chat-fab svg { width: 26px; height: 26px; }
.sai-chat-fab-dot {
  position: absolute; top: 6px; right: 6px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--yellow);
  animation: saiChatPulse 2.6s ease-in-out infinite;
}
@keyframes saiChatPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.55; }
}
@media (prefers-reduced-motion: reduce) {
  .sai-chat-fab, .sai-chat-fab:hover { transition: none; transform: none; }
  .sai-chat-fab-dot { animation: none; }
}

.sai-chat-panel[hidden] { display: none; } /* explicit display beats the hidden attr — keep this */
.sai-chat-panel {
  position: absolute; right: 0; bottom: 72px;
  width: min(370px, calc(100vw - 32px));
  height: min(540px, calc(100vh - 120px));
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line-2, rgba(23,48,84,0.16));
  border-radius: 18px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(23, 48, 84, 0.28);
}
.sai-chat-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: var(--navy); color: #fff;
}
.sai-chat-title { display: flex; flex-direction: column; line-height: 1.25; }
.sai-chat-title b { font-family: var(--font-display); font-size: 1rem; }
.sai-chat-title span { font-size: 0.78rem; opacity: 0.75; }
.sai-chat-close {
  border: 0; background: transparent; color: #fff; font-size: 1.6rem;
  line-height: 1; cursor: pointer; padding: 2px 6px; border-radius: 8px;
}
.sai-chat-close:hover { background: rgba(255, 255, 255, 0.12); }

.sai-chat-log { flex: 1; overflow-y: auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 10px; background: #f7f9fc; }
.sai-chat-msg {
  max-width: 85%; padding: 10px 13px; border-radius: 14px;
  font-size: 0.92rem; line-height: 1.45; overflow-wrap: break-word;
}
.sai-chat-msg--bot { align-self: flex-start; background: #fff; border: 1px solid rgba(23,48,84,0.10); border-bottom-left-radius: 4px; color: var(--ink); }
.sai-chat-msg--me { align-self: flex-end; background: var(--navy); color: #fff; border-bottom-right-radius: 4px; }
.sai-chat-msg--typing { color: var(--muted); letter-spacing: 3px; }

.sai-chat-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px 10px; background: #f7f9fc; }
.sai-chat-chip {
  border: 1px solid rgba(23,48,84,0.22); background: #fff; color: var(--navy);
  border-radius: 999px; padding: 7px 12px; font-size: 0.82rem; font-weight: 600; cursor: pointer;
}
.sai-chat-chip:hover { background: var(--yellow); border-color: var(--yellow); }

.sai-chat-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid rgba(23,48,84,0.10); background: #fff; }
.sai-chat-form input {
  flex: 1; border: 1px solid rgba(23,48,84,0.18); border-radius: 12px;
  padding: 10px 12px; font-size: 0.92rem; font-family: inherit; outline: none;
}
.sai-chat-form input:focus { border-color: var(--navy); }
.sai-chat-form button {
  width: 42px; border: 0; border-radius: 12px; background: var(--navy);
  color: var(--yellow); display: grid; place-items: center; cursor: pointer;
}
.sai-chat-form button:disabled { opacity: 0.5; cursor: default; }
.sai-chat-form button svg { width: 18px; height: 18px; }
.sai-chat-foot { padding: 6px 12px 10px; font-size: 0.72rem; color: var(--muted); text-align: center; background: #fff; }
.sai-chat-foot a { color: var(--muted); }

@media (max-width: 640px) {
  .sai-chat { right: 14px; bottom: 14px; }
  .sai-chat-panel { position: fixed; inset: auto 8px 80px 8px; width: auto; height: min(70vh, 560px); }
}
