/* 369 OnSite landing — tokens mirror apps/mobile/src/theme.ts so the hand-off into the app
   feels like one product. Light theme only; the app is light too. */

:root {
  --brand: #1f6feb;
  --brand-dark: #0d4bbd;
  --brand-deep: #083a8f;
  --brand-tint: #eaf2ff;
  --ink: #16202e;
  --ink-2: #5a6472;          /* ≥ 4.5:1 on every light surface used here */
  --line: #e8ecf3;
  --bg: #f5f7fb;
  --card: #ffffff;
  --green: #1f9d57;
  --green-bg: #e7f7ee;
  --amber: #f0a020;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 10px 30px rgba(20, 40, 79, 0.10), 0 2px 6px rgba(20, 40, 79, 0.06);
  --shadow-lg: 0 30px 60px rgba(20, 40, 79, 0.18), 0 8px 16px rgba(20, 40, 79, 0.08);
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --container: 1160px;
  --gutter: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--card);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; line-height: 1.1; letter-spacing: -0.02em; font-weight: 800; }
h2 { font-size: clamp(28px, 4vw, 40px); }
h3 { font-size: 20px; letter-spacing: -0.01em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
b { font-weight: 800; }

:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  padding: 10px 14px; background: var(--ink); color: #fff; border-radius: 10px; font-weight: 600;
}
.skip:focus { top: 12px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.container.narrow { max-width: 760px; text-align: center; }
.container.narrow .lede { margin-top: 14px; }

/* ───── Buttons ───── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: 12px;
  font-weight: 700; font-size: 15px; line-height: 1.2; white-space: nowrap;
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform .12s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-lg { min-height: 52px; padding: 14px 24px; font-size: 16px; border-radius: 14px; }
.btn-sm { min-height: 38px; padding: 8px 14px; font-size: 14px; border-radius: 10px; }
.btn-block { width: 100%; margin-top: 14px; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(31, 111, 235, 0.28); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { color: var(--ink); }
.btn-ghost:hover { background: var(--bg); }
.btn-outline { color: var(--ink); border-color: #cfd6e2; background: #fff; }
.btn-outline:hover { border-color: var(--ink); }
.btn-white { background: #fff; color: var(--brand-dark); }
.btn-white:hover { background: var(--brand-tint); }

/* ───── Nav ───── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; margin-right: auto; }
.brand-glyph { width: 32px; height: 32px; border-radius: 9px; }
.brand-word { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); white-space: nowrap; }
.brand-word b { color: var(--brand); }
.brand-word sup { font-size: 10px; font-weight: 500; margin-left: 2px; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links > a:not(.btn) {
  padding: 8px 12px; border-radius: 10px; font-weight: 600; font-size: 15px; color: var(--ink-2);
}
.nav-links > a:not(.btn):hover { color: var(--ink); background: var(--bg); }
.nav-links .btn { margin-left: 6px; }
.lang {
  font: inherit; font-weight: 700; font-size: 13px; letter-spacing: .04em;
  min-width: 44px; min-height: 36px; padding: 6px 10px; margin-left: 6px;
  border: 1.5px solid #cfd6e2; border-radius: 10px; background: #fff; color: var(--ink); cursor: pointer;
}
.lang:hover { border-color: var(--ink); }
.menu-btn {
  display: none; align-items: center; gap: 10px; font: inherit; font-weight: 700; font-size: 15px;
  min-height: 44px; padding: 8px 12px; border: 1.5px solid #cfd6e2; border-radius: 12px; background: #fff; color: var(--ink); cursor: pointer;
}
.menu-bar { width: 18px; height: 2px; background: currentColor; position: relative; border-radius: 2px; }
.menu-bar::before, .menu-bar::after { content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: currentColor; border-radius: 2px; }
.menu-bar::before { top: -6px; } .menu-bar::after { top: 6px; }

/* ───── Hero ───── */
.hero {
  position: relative; overflow: hidden;
  padding: 72px 0 88px;
  background:
    radial-gradient(900px 520px at 85% -10%, rgba(31, 111, 235, 0.14), transparent 60%),
    radial-gradient(600px 400px at -10% 110%, rgba(31, 111, 235, 0.08), transparent 60%),
    #fff;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 600; color: var(--ink-2); margin-bottom: 22px;
}
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px rgba(31, 111, 235, 0.15); flex: none; }
.dot-green { background: var(--green); box-shadow: 0 0 0 4px rgba(31, 157, 87, 0.18); }
h1 {
  font-size: clamp(42px, 6.2vw, 68px);
  letter-spacing: -0.035em; line-height: 1.02; max-width: 12ch;
}
h1 em { font-style: normal; color: var(--brand); }
.lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-2); line-height: 1.55; max-width: 54ch; }
.hero .lede { margin-top: 22px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.trust-line { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 26px; font-size: 14.5px; font-weight: 600; color: var(--ink-2); }
.trust-line li { display: inline-flex; align-items: center; gap: 7px; }
.trust-line svg { width: 18px; height: 18px; color: var(--green); flex: none; }

/* The map card */
.hero-visual { position: relative; }
.map {
  position: relative; aspect-ratio: 560 / 460; width: 100%;
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-lg); border: 1px solid rgba(20, 40, 79, 0.08);
  background: #e9eff8;
}
.map-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.chip {
  position: absolute; display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 999px; background: #fff; box-shadow: var(--shadow);
  font-size: 13px; font-weight: 700; color: var(--ink);
}
.chip-live { top: 16px; left: 16px; }
.pro-card {
  position: absolute; left: 16px; right: 16px; bottom: 16px;
  background: #fff; border-radius: 18px; padding: 14px 16px; box-shadow: var(--shadow-lg);
}
.pro-head { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 44px; height: 44px; border-radius: 50%; background: var(--brand); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 15px; flex: none;
}
.pro-id { min-width: 0; margin-right: auto; }
.pro-name { font-weight: 800; font-size: 16px; }
.pro-trade { font-size: 13px; color: var(--ink-2); }
.pro-rating { font-size: 13.5px; font-weight: 700; white-space: nowrap; }
.star { color: var(--amber); }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.badge {
  font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 999px;
  background: var(--bg); color: var(--ink-2); border: 1px solid var(--line);
}
.badge-green { background: var(--green-bg); color: #166a3c; border-color: #cbe6d3; }
.pro-foot { display: flex; align-items: flex-end; gap: 18px; margin-top: 14px; }
.stat { display: flex; flex-direction: column; }
.stat-k { font-size: 11.5px; font-weight: 600; color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; }
.stat-v { font-size: 18px; font-weight: 800; letter-spacing: -0.01em; }
.pro-foot .btn { margin-left: auto; }

/* ───── Sections ───── */
.section { padding: 96px 0; }
.section-tint { background: var(--bg); }
.section-deep { background: linear-gradient(135deg, var(--brand-dark), var(--brand-deep)); color: #fff; }
.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head p { margin-top: 12px; font-size: 18px; color: var(--ink-2); }
.kicker {
  display: inline-block; font-size: 12.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: var(--brand); margin-bottom: 12px;
}
.kicker-light { color: #bcd3ff; }
.fine { margin-top: 20px; font-size: 14px; color: var(--ink-2); }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
.step { position: relative; padding: 28px 26px 30px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; }
.step-n {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  background: var(--brand-tint); color: var(--brand); font-weight: 800; font-size: 16px; margin-bottom: 18px;
}
.step h3 { margin-bottom: 8px; }
.step p { color: var(--ink-2); font-size: 16px; }

/* Services */
.svc-groups { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.svc-group { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px 22px 14px; }
.svc-group h3 { font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 10px; }
.svc-group h3 + ul + h3 { margin-top: 18px; }
.svc-group li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-weight: 600; font-size: 15.5px; }
.svc-group li:first-child { border-top: 0; }
.from { color: var(--ink-2); font-weight: 600; font-size: 14px; white-space: nowrap; }
.from > span { margin-right: 4px; }

/* Cards */
.cards { display: grid; gap: 20px; }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.cards-2 { grid-template-columns: repeat(2, 1fr); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--ink-2); font-size: 16px; }
.card-big { padding: 34px; }
.card-big h3 { font-size: 26px; margin-bottom: 12px; }
.card-big p { font-size: 17px; }
.ico { width: 32px; height: 32px; margin-bottom: 16px; color: var(--brand); fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Split sections */
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.split-copy .lede { margin-top: 18px; }
.split-copy .btn { margin-top: 28px; }
.checks { margin-top: 24px; display: grid; gap: 12px; }
.checks li { position: relative; padding-left: 32px; font-size: 16.5px; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--green-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3.2L15 7' fill='none' stroke='%231f9d57' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/13px no-repeat;
}
.checks-light li::before { background-color: rgba(255, 255, 255, 0.16); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3.2L15 7' fill='none' stroke='%23ffffff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.section-deep .lede { color: #d9e6ff; }
.section-deep h2 { color: #fff; }

.split-visual { display: grid; gap: 20px; }
.offer { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow); }
.offer-top { display: flex; justify-content: space-between; align-items: center; }
.offer-top .kicker { margin: 0; }
.timer { font-variant-numeric: tabular-nums; font-weight: 800; color: var(--amber); font-size: 15px; }
.offer-title { font-size: 22px; font-weight: 800; margin-top: 10px; letter-spacing: -0.01em; }
.offer-meta { color: var(--ink-2); margin-top: 4px; font-size: 15px; }
.unique { background: var(--ink); color: #fff; border-radius: var(--radius-lg); padding: 26px; }
.unique h3 { font-size: 22px; margin-bottom: 8px; }
.unique p { color: #c7d0dd; font-size: 15.5px; }

/* Helper ladder */
.ladder { gap: 12px; }
.rung {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  border-radius: 16px; padding: 18px 20px; font-weight: 800; font-size: 18px;
  background: rgba(255, 255, 255, 0.10); border: 1px solid rgba(255, 255, 255, 0.18);
}
.rung small { font-size: 13.5px; font-weight: 600; color: #cbdcff; text-align: right; }
.rung-2 { margin-left: 24px; }
.rung-3 { margin-left: 48px; background: #fff; color: var(--brand-dark); border-color: #fff; }
.rung-3 small { color: var(--ink-2); }
.ladder-note { color: #cbdcff; font-size: 14px; margin-top: 4px; }

/* CTA band + footer */
.cta-band { background: var(--ink); color: #fff; padding: 64px 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { font-size: clamp(28px, 4vw, 40px); }
.cta-band p { margin-top: 6px; color: #b9c3d1; font-size: 18px; }
.footer { padding: 44px 0 36px; border-top: 1px solid var(--line); }
.foot-grid { display: grid; grid-template-columns: 1fr auto; gap: 16px 40px; align-items: start; }
.foot-brand p { color: var(--ink-2); font-size: 14.5px; margin-top: 4px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.foot-links a { padding: 8px 10px; font-weight: 600; font-size: 14.5px; color: var(--ink-2); border-radius: 8px; }
.foot-links a:hover { color: var(--ink); background: var(--bg); }
.foot-note { grid-column: 1 / -1; font-size: 13.5px; color: var(--ink-2); max-width: 820px; margin-top: 12px; }
.foot-legal { grid-column: 1 / -1; font-size: 13px; color: var(--ink-2); }

/* ───── Motion (only when welcome) ───── */
@media (prefers-reduced-motion: no-preference) {
  .pin { animation: bob 3.2s ease-in-out infinite; }
  .pin-2 { animation-delay: -0.7s; } .pin-3 { animation-delay: -1.4s; } .pin-4 { animation-delay: -2.1s; } .pin-5 { animation-delay: -2.8s; }
  .halo { animation: pulse 2.4s ease-out infinite; transform-origin: center; transform-box: fill-box; }
  .route { animation: dash 1.6s linear infinite; }
  .btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(31, 111, 235, 0.32); }
}
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -4px; } }
@keyframes pulse { 0% { transform: scale(.6); opacity: .35; } 100% { transform: scale(1.5); opacity: 0; } }
@keyframes dash { to { stroke-dashoffset: -36; } }

/* ───── Responsive ───── */
@media (max-width: 1024px) {
  .svc-groups { grid-template-columns: repeat(2, 1fr); }
  .cards-3 { grid-template-columns: repeat(2, 1fr); }
  .hero-grid, .split { gap: 40px; }
}
@media (max-width: 860px) {
  :root { --gutter: 16px; }
  .section { padding: 64px 0; }
  .hero { padding: 40px 0 56px; }
  .hero-grid, .split { grid-template-columns: 1fr; }
  .hero-visual { order: 2; }
  .steps, .cards-3, .cards-2 { grid-template-columns: 1fr; }
  .svc-groups { grid-template-columns: 1fr; }
  .section-head { margin-bottom: 28px; }
  .foot-grid { grid-template-columns: 1fr; }
  .rung-2 { margin-left: 12px; } .rung-3 { margin-left: 24px; }
  .cta-inner { justify-content: flex-start; }

  .menu-btn { display: inline-flex; }
  .nav-links {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 6px;
    padding: 12px var(--gutter) 16px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  }
  .menu-open .nav-links { display: flex; }
  .nav-links > a:not(.btn) { padding: 12px; font-size: 16px; }
  .nav-links .btn, .nav-links .lang { margin-left: 0; width: 100%; }
}
@media (max-width: 420px) {
  .cta-row .btn { width: 100%; }
  .pro-foot { flex-wrap: wrap; }
  .pro-foot .btn { margin-left: 0; width: 100%; }
  .pro-rating { display: none; }
}

/* ───── Legal pages (terms.html, privacy.html) ───── */
.legal { max-width: 760px; padding-top: 48px; padding-bottom: 96px; }
.legal h1 { font-size: clamp(30px, 4vw, 40px); letter-spacing: -0.02em; margin-top: 8px; }
.legal h2 { font-size: 20px; margin-top: 40px; margin-bottom: 10px; }
.legal p, .legal li { font-size: 16px; line-height: 1.65; color: var(--ink-2); }
.legal p { margin-top: 12px; }
.legal ul { margin-top: 10px; padding-left: 22px; }
.legal li { margin-top: 6px; }
.legal strong { color: var(--ink); }
.legal .meta { font-size: 14px; color: var(--ink-2); }
.legal mark { background: #fff2c2; color: var(--ink); padding: 0 4px; border-radius: 4px; }
.draft {
  display: flex; gap: 12px; align-items: flex-start; margin: 20px 0 8px;
  background: #fff7e6; border: 1px solid #f0d18a; color: #8a5a12; border-radius: 12px; padding: 14px 16px; font-size: 14.5px; line-height: 1.5;
}
.draft b { color: #6b4400; }
html[lang="es"] [data-lang="en"] { display: none; }
html:not([lang="es"]) [data-lang="es"] { display: none; }
