/* ============================================================
   FrontPage base styles for subpages (privacy, terms, insights, 404).
   Tokens mirror the inline styles in the site's index.html — keep aligned.
   ============================================================ */
:root {
  --night:       #071420;
  --night-2:     #09273b;
  --night-3:     #050f18;
  --ink:         #102234;
  --muted:       #5b7282;
  --soft:        #94a3ad;
  --text:        #f0f9ff;
  --text-muted:  rgba(240, 249, 255, 0.7);
  --text-faint:  rgba(240, 249, 255, 0.5);
  --line:        rgba(16, 54, 78, 0.13);
  --line-invert: rgba(240, 249, 255, 0.14);
  --surface:     #f7f4ed;
  --bone:        #efeae0;
  --paper:       #ffffff;
  --accent:      #1db6f2;
  --accent-2:    #67c0e0;
  --teal:        #0e7490;
  --success:     #1f8a5b;
  --success-2:   #38c88c;
  --whatsapp:    #25D366;
  --whatsapp-ink:#073018;

  --radius:        3px;
  --radius-action: 2px;
  --container:     1160px;
  --section:       clamp(3.75rem, 8vw, 6.5rem);

  --serif: "DM Serif Display", Georgia, "Times New Roman", serif;
  --sans:  Poppins, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); line-height: 1.1; text-wrap: balance; }
h1, h2, .serif { font-family: var(--serif); font-weight: 400; letter-spacing: -0.005em; }
p { margin: 0; }
a { color: inherit; }

:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 3px; border-radius: var(--radius-action); }

.skip-link { position: absolute; top: -10rem; left: 1rem; z-index: 1000; padding: 0.75rem 1rem; background: var(--accent); color: var(--night); font-weight: 900; text-decoration: none; border-radius: 0 0 var(--radius) var(--radius); }
.skip-link:focus { top: 0; }

.container { width: min(var(--container), 100% - 2rem); margin-inline: auto; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3rem;
  padding: 0.8rem 1.1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-action);
  font-family: inherit;
  font-size: 0.94rem;
  font-weight: 850;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(0.985); }
.btn--primary {
  background: linear-gradient(135deg, #1295d8 0%, #0e86a7 54%, #16c7ff 100%);
  color: #fff;
  border-color: rgba(255,255,255,0.14);
  box-shadow: 0 8px 20px rgba(29,182,242,0.24), inset 0 1px 0 rgba(255,255,255,0.2);
}
.btn--primary:hover { box-shadow: 0 12px 28px rgba(29,182,242,0.32), inset 0 1px 0 rgba(255,255,255,0.24); }
.btn--outline {
  background: var(--paper);
  color: var(--ink);
  border-color: rgba(16,54,78,0.18);
}
.btn--outline:hover { border-color: rgba(29,182,242,0.42); background: rgba(29,182,242,0.04); }
.btn--ghost-invert {
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border-color: rgba(240,249,255,0.18);
}
.btn--ghost-invert:hover { background: rgba(29,182,242,0.12); border-color: rgba(29,182,242,0.42); }
.btn--whatsapp {
  background: var(--whatsapp);
  color: var(--whatsapp-ink);
  border-color: rgba(7,48,24,0.18);
  box-shadow: 0 8px 20px rgba(37,211,102,0.22), inset 0 1px 0 rgba(255,255,255,0.32);
}

/* Header / nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.72);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid rgba(16,34,52,0.1);
  color: var(--ink);
  box-shadow: 0 1px 24px rgba(16,34,52,0.06);
}
.site-header::before {
  position: absolute; inset: 0 0 auto; height: 1px; content: "";
  background: linear-gradient(90deg, transparent, rgba(29,182,242,0.55), transparent);
  pointer-events: none;
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 0.75rem; color: var(--ink); text-decoration: none; font-weight: 800; }
.brand img { height: 38px; width: auto; }

.nav__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  min-width: 2.75rem;
  justify-content: center;
  padding: 0.5rem;
  background: transparent;
  border: none;
  cursor: pointer;
}
.nav__toggle i { font-size: 1.3rem; color: var(--accent); }

.nav__menu {
  position: fixed;
  inset: 64px 0 auto 0;
  background: rgba(255,255,255,0.93);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  backdrop-filter: blur(28px) saturate(180%);
  border-bottom: 1px solid rgba(16,34,52,0.1);
  box-shadow: 0 24px 48px rgba(16,34,52,0.14);
  padding: 1rem;
  display: none;
  z-index: 99;
}
.nav.is-open .nav__menu {
  display: grid;
  gap: 0.5rem;
  animation: navMenuIn 340ms cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes navMenuIn {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.nav__links { display: grid; gap: 0.25rem; padding: 0; list-style: none; margin: 0; }
.nav__links a {
  display: block;
  padding: 0.75rem 0.75rem;
  border-radius: var(--radius-action);
  color: rgba(16,34,52,0.72);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
}
.nav__links a:hover { background: rgba(16,34,52,0.06); color: var(--ink); }
.nav__links a[aria-current="page"] { color: var(--ink); background: rgba(29,182,242,0.1); }
.nav__cta { display: flex; }
.nav__cta .btn { width: 100%; }

/* Page hero band */
.page-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(155deg, #09273b 0%, #071420 58%, #050f18 100%);
  color: var(--text);
  padding: clamp(2.75rem, 7vw, 4.5rem) 0;
  isolation: isolate;
}
.page-hero::before {
  position: absolute; right: -180px; top: -160px;
  width: 520px; height: 520px; border-radius: 50%; content: "";
  background: radial-gradient(circle, rgba(29,182,242,0.16) 0%, rgba(29,182,242,0) 60%);
  pointer-events: none;
  z-index: -1;
}
.page-hero h1 { color: var(--text); font-size: clamp(2.1rem, 7vw, 3.4rem); max-width: 22ch; margin-bottom: 0.85rem; }
.page-hero p { color: var(--text-muted); font-size: clamp(0.95rem, 2.4vw, 1.05rem); line-height: 1.65; max-width: 58ch; }

.breadcrumbs { margin: 0 0 1.25rem; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 0.45rem; font-size: 0.8rem; color: var(--text-faint); }
.breadcrumbs a { color: var(--accent-2); text-decoration: none; font-weight: 600; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs li + li::before { content: "/"; margin-right: 0.45rem; color: var(--text-faint); }
.breadcrumbs [aria-current="page"] { color: var(--text-muted); }

/* Sections */
.section { padding: var(--section) 0; background: var(--surface); }
.section--bone { background: var(--bone); }

/* Long-form content (legal pages + articles) */
.prose { max-width: 46rem; }
.prose > * + * { margin-top: 1rem; }
.prose h2 { font-size: clamp(1.55rem, 4vw, 2rem); margin-top: 2.75rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-family: var(--sans); font-weight: 800; font-size: 1.05rem; margin-top: 2rem; }
.prose p { color: var(--muted); line-height: 1.75; }
.prose strong { color: var(--ink); }
.prose ul, .prose ol { margin: 1rem 0 0; padding-left: 1.25rem; display: grid; gap: 0.55rem; color: var(--muted); line-height: 1.65; }
.prose li::marker { color: var(--teal); font-weight: 700; }
.prose a { color: var(--teal); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.prose a:hover { color: var(--accent); }
.prose .note {
  padding: 0.9rem 1.1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  font-size: 0.88rem;
  color: var(--muted);
}
.prose table { width: 100%; border-collapse: collapse; margin-top: 1rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); font-size: 0.88rem; }
.prose th, .prose td { padding: 0.7rem 0.85rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; color: var(--muted); }
.prose th { color: var(--ink); font-weight: 800; font-size: 0.8rem; background: rgba(29,182,242,0.05); }
.prose tr:last-child td { border-bottom: 0; }
.table-scroll { overflow-x: auto; }

.article-meta { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; font-size: 0.8rem; color: var(--text-faint); }
.article-meta strong { color: var(--text-muted); font-weight: 700; }

/* Insights cards */
.insight-grid { display: grid; gap: 1rem; }
.insight-card {
  display: flex; flex-direction: column; gap: 0.6rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 1.6rem);
  text-decoration: none;
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}
.insight-card:hover { border-color: rgba(29,182,242,0.5); transform: translateY(-2px); box-shadow: 0 14px 34px rgba(16,34,52,0.1); }
.insight-card h3 { font-family: var(--serif); font-weight: 400; font-size: 1.35rem; }
.insight-card p { color: var(--muted); font-size: 0.88rem; line-height: 1.65; }
.insight-card .insight-card__meta { font-size: 0.75rem; color: var(--soft); font-weight: 600; }
.insight-card .insight-card__more { margin-top: auto; padding-top: 0.5rem; color: var(--teal); font-weight: 800; font-size: 0.85rem; }

/* Footer */
.site-footer {
  background: var(--night-3); color: var(--text-muted);
  padding: 3rem 0 1.5rem;
  position: relative;
}
.site-footer::before {
  position: absolute; inset: 0 0 auto; height: 1px; content: "";
  background: linear-gradient(90deg, transparent, rgba(29,182,242,0.4), transparent);
}
.site-footer__grid { display: grid; gap: 2rem; padding-bottom: 2rem; border-bottom: 1px solid rgba(240,249,255,0.1); }
.site-footer__brand img { height: 40px; width: auto; margin-bottom: 1rem; }
.site-footer__brand p { font-size: 0.85rem; line-height: 1.7; color: rgba(240,249,255,0.62); max-width: 36ch; }
.site-footer__col h4 {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text-faint); margin-bottom: 0.9rem;
}
.site-footer ul { padding: 0; margin: 0; list-style: none; display: grid; gap: 0.55rem; font-size: 0.86rem; }
.site-footer a { color: rgba(240,249,255,0.72); text-decoration: none; }
.site-footer a:hover { color: var(--accent-2); }
.site-footer__bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
  padding-top: 1.25rem;
  font-size: 0.75rem; color: var(--text-faint);
}
.site-footer__bottom .built-by a { color: var(--accent-2); font-weight: 700; }

/* Sticky mobile CTA (hidden on desktop; docks away when the footer is on screen) */
.sticky-cta {
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 90;
  padding: 0.6rem 0.75rem calc(0.6rem + env(safe-area-inset-bottom));
  background: rgba(7,20,32,0.96);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-top: 1px solid rgba(29,182,242,0.22);
  transition: transform 340ms cubic-bezier(0.16, 1, 0.3, 1), opacity 280ms ease;
}
.sticky-cta::before {
  position: absolute; inset: 0 0 auto; height: 1px; content: "";
  background: linear-gradient(90deg, transparent, rgba(29,182,242,0.5), transparent);
}
.sticky-cta.is-docked {
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
}
.sticky-cta__row { display: flex; gap: 0.5rem; }
.sticky-cta__row > a { flex: 1; min-height: 2.85rem; padding: 0.7rem 0.6rem; font-size: 0.86rem; }
.sticky-cta__spacer { height: calc(4.5rem + env(safe-area-inset-bottom)); }

/* 404 */
.nf { min-height: 100dvh; display: grid; place-items: center; background: linear-gradient(155deg, #09273b 0%, #071420 58%, #050f18 100%); color: var(--text); text-align: center; padding: 2rem 1rem; position: relative; overflow: hidden; }
.nf::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 50% 55% at 50% 30%, rgba(29,182,242,0.22), transparent 65%); pointer-events: none; }
.nf__inner { position: relative; z-index: 1; max-width: 34rem; }
.nf__logo { height: 40px; margin: 0 auto 2rem; }
.nf__code { font-family: var(--serif); font-size: clamp(4.5rem, 18vw, 8.5rem); line-height: 0.9; color: var(--text); }
.nf__code span { color: var(--accent-2); font-style: italic; }
.nf h1 { color: var(--text); font-size: clamp(1.5rem, 5vw, 2.1rem); margin-top: 1.25rem; }
.nf p { color: var(--text-muted); margin-top: 0.85rem; }
.nf__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; margin-top: 2rem; }

@media (min-width: 40em) {
  .insight-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 62em) {
  .brand img { height: 52px; }
  .nav { min-height: 72px; }
  .nav__toggle { display: none; }
  .nav__menu {
    position: static;
    display: flex; align-items: center; gap: clamp(0.75rem, 1.6vw, 1.25rem);
    padding: 0;
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border: 0;
  }
  .nav__links { display: flex; gap: 0.1rem; padding: 0.25rem; border: 1px solid rgba(16,34,52,0.1); border-radius: calc(var(--radius-action) + 3px); background: rgba(16,34,52,0.035); }
  .nav__links a { padding: 0.55rem 0.85rem; font-size: 0.85rem; }
  .nav__cta .btn { padding: 0.65rem 1rem; min-height: 2.6rem; font-size: 0.85rem; }
  .insight-grid { grid-template-columns: repeat(3, 1fr); }
  .site-footer__grid { grid-template-columns: 1.5fr 1fr 1fr; }

  .sticky-cta { display: none; }
  .sticky-cta__spacer { display: none; }
}

/* Smooth cross-page navigation: browsers that support cross-document view
   transitions get a brief crossfade; everyone else navigates as normal. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
