/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, h3, p, ul, figure { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ---------- Tokens: "Midnight Code" ---------- */
:root {
  --bg: #12172B;
  --surface: #182035;
  --surface-2: #1F2942;
  --ink: #F0F4FF;
  --ink-soft: #AAB8D4;
  --ink-faint: #6B7A9B;
  --teal: #5DCAA5;
  --amber: #EF9F27;
  --line: rgba(255,255,255,0.08);

  /* Fixed brand colors, not theme-adaptive — these are the badge's dominant
     ridge/ring colors, used for primary UI so the site actually reads as
     the logo's palette instead of only showing blue inside the tiny badge */
  --brand-navy: #0C447C;
  --brand-ocean: #378ADD;
  --brand-sky: #85B7EB;

  --font-display: "JetBrains Mono", "Courier New", monospace;
  --font-body: "IBM Plex Sans", sans-serif;

  --container: 1120px;
  --radius: 14px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #F4F6FA;
    --surface: #FFFFFF;
    --surface-2: #EEF2F8;
    --ink: #0C2340;
    --ink-soft: #45557A;
    --ink-faint: #7E8CA8;
    --teal: #0F6E56;
    --amber: #BA7517;
    --line: rgba(12,35,64,0.1);
  }
}

html { color-scheme: dark light; position: relative; }

body {
  position: relative;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
}

::selection { background: var(--teal); color: #0C2340; }

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Altitude spine: the badge's ridgeline as page structure ---------- */
.spine-rail {
  position: absolute;
  top: 0;
  left: 24px;
  width: 40px;
  z-index: 1;
  pointer-events: none;
}
.spine-rail svg { width: 40px; height: 100%; display: block; overflow: visible; }
.spine-path { fill: none; stroke: var(--teal); stroke-width: 1.5; opacity: 0.28; }
.spine-sun { fill: var(--amber); filter: drop-shadow(0 0 4px color-mix(in srgb, var(--amber) 70%, transparent)); }

@media (max-width: 1360px) {
  .spine-rail { display: none; }
}

/* ---------- Wordmark ---------- */
.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
}
.wordmark svg { flex-shrink: 0; }
.wordmark-text {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.wordmark-text .k { color: var(--ink); }
.wordmark-text .brace { color: color-mix(in srgb, var(--teal) 35%, transparent); }
.wordmark-text .l { color: var(--teal); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

nav.primary-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

nav.primary-nav a:not(.btn) {
  font-size: 0.92rem;
  color: var(--ink-soft);
  transition: color 0.15s ease;
}
nav.primary-nav a:not(.btn):hover { color: var(--ink); }

.nav-links { display: flex; align-items: center; gap: 28px; }

.lang-switch {
  font-family: var(--font-display);
  font-size: 0.78rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
}
.lang-switch:hover { border-color: var(--ink-faint); color: var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 500;
  font-family: var(--font-display);
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn-primary {
  /* Fixed navy bg + fixed light text: unlike a theme-adaptive color, this
     never flips into a dark-on-dark or light-on-light pairing. Previously
     this used var(--teal), whose lightness inverts between modes while the
     text color stayed hardcoded — dark-on-dark in light mode, unreadable. */
  background: var(--brand-navy);
  color: #F4F6FA;
}
.btn-primary:hover { transform: translateY(-1px); background: #0F5A9C; box-shadow: 0 10px 26px -8px color-mix(in srgb, var(--brand-navy) 70%, transparent); }
.btn-ghost {
  border: 1.5px solid var(--ink-faint);
  color: var(--ink);
  background: color-mix(in srgb, var(--surface) 55%, transparent);
}
.btn-ghost:hover { border-color: var(--brand-ocean); color: var(--brand-ocean); transform: translateY(-1px); }
.btn-whatsapp {
  background: var(--brand-ocean);
  color: #fff;
}
.btn-whatsapp:hover { transform: translateY(-1px); box-shadow: 0 10px 26px -8px color-mix(in srgb, var(--brand-ocean) 60%, transparent); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 76px 0 88px; }

.hero-glow {
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--brand-ocean) 16%, transparent), transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.hero-ridges {
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  width: 100%;
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}

.hero .container {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: var(--teal);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
}
/* Hero eyebrow gets the amber sun-dot treatment specifically — kept rare
   so it stays tied to the badge's one warm accent, not used everywhere */
.hero .eyebrow::before {
  background: var(--amber);
  box-shadow: 0 0 10px color-mix(in srgb, var(--amber) 70%, transparent);
}

h1.headline {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.4rem, 5.5vw, 4.4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
  max-width: 13ch;
  /* Dark-mode-only gradient polish. Light mode falls back to solid --ink
     below: off-white-to-sky-blue reads fine on the dark bg, but sky-blue
     text on a light background dips under comfortable contrast. */
  background: linear-gradient(180deg, var(--ink) 0%, var(--brand-sky) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@media (prefers-color-scheme: light) {
  h1.headline { background: none; -webkit-text-fill-color: unset; color: var(--ink); }
}

.hero .lede {
  margin-top: 24px;
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 50ch;
}

.hero .actions {
  margin-top: 34px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-badge { justify-self: center; }
.hero-badge svg, .hero-badge img { width: 220px; height: 220px; }
.hero-badge img { clip-path: circle(50%); border-radius: 50%; }

/* Badge ridgeline draw-in (dasharray sized for the 500x500 icon viewBox) */
.ridge { stroke-dasharray: 800; stroke-dashoffset: 800; animation: draw 1.1s ease forwards; }
.ridge.r1 { animation-delay: 0.05s; }
.ridge.r2 { animation-delay: 0.25s; }
.ridge.r3 { animation-delay: 0.45s; }
.ground { stroke-dasharray: 400; stroke-dashoffset: 400; animation: draw 0.7s ease forwards; animation-delay: 0.65s; }
.sun { opacity: 0; animation: fadein 0.5s ease forwards; animation-delay: 0.9s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadein { to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .ridge, .ground { stroke-dashoffset: 0; animation: none; }
  .sun { opacity: 1; animation: none; }
}

/* ---------- Sections ---------- */
section { padding: 84px 0; }
section.alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head .eyebrow { color: var(--ink-faint); }
.section-head .eyebrow::before { background: var(--ink-faint); }

h2.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}

.section-head p { color: var(--ink-soft); font-size: 1.02rem; }

/* ---------- Band lists (services, pillars) — sparse, no boxes ---------- */
.band-list { display: flex; flex-direction: column; }

.band {
  display: flex;
  gap: 40px;
  align-items: baseline;
  padding: 40px 0;
  border-top: 1px solid var(--line);
}
.band-list .band:last-child { border-bottom: 1px solid var(--line); }

.band-num {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.2vw, 3.4rem);
  font-weight: 600;
  color: color-mix(in srgb, var(--brand-ocean) 55%, transparent);
  flex-shrink: 0;
  width: 130px;
  line-height: 1;
}

.band-body h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.3rem;
  margin-bottom: 10px;
}
.band-body p { color: var(--ink-soft); font-size: 1rem; max-width: 62ch; }

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
.pillar-band {
  /* Color-coded top rule per principle, echoing the badge's four ridge/sun
     colors — no box fill, just a rule, so it stays in the "no cards" spirit */
  border-top: 2px solid var(--brand-ocean);
  padding-top: 20px;
}
.pillar-band:nth-child(2) { border-top-color: var(--brand-sky); }
.pillar-band:nth-child(3) { border-top-color: var(--teal); }
.pillar-band:nth-child(4) { border-top-color: var(--amber); }
.pillar-band h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--teal);
  margin-bottom: 8px;
}
.pillar-band h3::before { content: "{ "; color: color-mix(in srgb, var(--teal) 45%, transparent); }
.pillar-band h3::after { content: " }"; color: color-mix(in srgb, var(--teal) 45%, transparent); }
.pillar-band p { color: var(--ink-soft); font-size: 0.98rem; max-width: 62ch; }

/* ---------- Product spotlight ---------- */
.product-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 48px;
  background: var(--surface);
}

.product-kicker {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.product-kicker .bang { color: var(--amber); }

.product-panel p.desc { color: var(--ink-soft); margin: 14px 0 22px; max-width: 44ch; }

.feature-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 26px; }
.feature-list li { display: flex; align-items: baseline; gap: 10px; font-size: 0.95rem; color: var(--ink); }
.feature-list li::before { content: "→"; font-family: var(--font-display); color: var(--teal); }

/* Template card */
.template-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.template-card .tc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.tc-label { font-family: var(--font-display); font-size: 0.74rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.06em; }
.tc-channel { font-family: var(--font-display); font-size: 0.7rem; color: var(--teal); border: 1px solid var(--teal); border-radius: 999px; padding: 3px 10px; }
.tc-bubble { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; font-size: 0.95rem; color: var(--ink); line-height: 1.5; }
.tc-bubble .tok { font-family: var(--font-display); color: var(--amber); background: color-mix(in srgb, var(--amber) 16%, transparent); padding: 1px 5px; border-radius: 5px; font-size: 0.9em; }
.tc-status { margin-top: 14px; display: flex; gap: 18px; font-family: var(--font-display); font-size: 0.76rem; color: var(--ink-faint); flex-wrap: wrap; }
.tc-status span { display: flex; align-items: center; gap: 6px; }
.tc-status .ok { color: var(--teal); }
.tc-status .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; }
.contact-list { display: flex; flex-direction: column; gap: 22px; margin-top: 28px; }
.contact-item .label { font-family: var(--font-display); font-size: 0.75rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
.contact-item .value { font-size: 1.02rem; }
.contact-item a.value:hover { color: var(--teal); }

.contact-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; background: var(--surface); }
.contact-card h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.1rem; margin-bottom: 10px; }
.contact-card p { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 20px; }

/* ---------- Footer ---------- */
footer.site-footer { border-top: 1px solid var(--line); padding: 40px 0; position: relative; }
.footer-grid { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 24px; }
.footer-brand { display: flex; flex-direction: column; gap: 12px; }
.legal-block { font-family: var(--font-display); font-size: 0.78rem; color: var(--ink-faint); line-height: 1.7; }
.locale-tag { font-family: var(--font-display); font-size: 0.72rem; color: var(--ink-faint); letter-spacing: 0.15em; display: flex; flex-direction: column; gap: 4px; width: fit-content; }
.flag-stripe { display: flex; gap: 3px; }
.flag-stripe span { width: 24px; height: 3px; border-radius: 1px; }
.flag-stripe .r { background: #D52B1E; }
.flag-stripe .y { background: #F4E400; }
.flag-stripe .g { background: #007A3D; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 0.88rem; color: var(--ink-soft); }
.footer-links a:hover { color: var(--ink); }

/* ---------- Legal pages ---------- */
.legal-doc { padding: 60px 0 100px; }
.legal-doc .container { max-width: 760px; }
.legal-doc h1 { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: 8px; }
.legal-doc .updated { font-family: var(--font-display); font-size: 0.8rem; color: var(--ink-faint); margin-bottom: 40px; }
.legal-doc h2 { font-family: var(--font-display); font-weight: 500; font-size: 1.1rem; margin: 36px 0 12px; }
.legal-doc p, .legal-doc li { color: var(--ink-soft); font-size: 0.98rem; margin-bottom: 12px; }
.legal-doc ul { padding-left: 20px; list-style: disc; }
.legal-doc strong { color: var(--ink); }
.legal-doc a { color: var(--teal); text-decoration: underline; }

/* ---------- Reveal (hero load sequence only) ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero .container { grid-template-columns: 1fr; text-align: center; }
  .hero .lede { margin-left: auto; margin-right: auto; }
  .hero .actions { justify-content: center; }
  h1.headline { max-width: none; }
  .hero-badge { order: -1; }
  .hero-badge svg, .hero-badge img { width: 160px; height: 160px; }
  .band { flex-direction: column; gap: 10px; }
  .band-num { width: auto; }
  .pillars-grid { grid-template-columns: repeat(2, 1fr); }
  .product-panel { grid-template-columns: 1fr; padding: 30px; }
  .contact-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .footer-grid { align-items: flex-start; }
}
