/* comprobare.com shared styles: tokens, nav, buttons, footer, legal pages */

:root {
  --blue-primary: #0078d4;
  --blue-deep:    #0056a3;
  --blue-dark:    #003e7e;
  --blue-light:   #4fc3f7;
  --blue-glow:    rgba(79, 195, 247, 0.35);
  --neutral-950:  #08090b;
  --neutral-900:  #0c0d0f;
  --neutral-850:  #111214;
  --neutral-800:  #1a1c1f;
  --neutral-750:  #1f2125;
  --neutral-700:  #252729;
  --neutral-600:  #2e3135;
  --neutral-500:  #5a5f66;
  --neutral-400:  #8a9098;
  --neutral-300:  #b0b5bc;
  --neutral-200:  #d4d8dd;
  --neutral-100:  #f0f2f4;
  --white:        #ffffff;
  --line:         #22252a;
  --line-strong:  #2e3238;
  --orange-accent: #f59e0b;
  --green-accent:  #4ade80;
  --violet-accent: #c084fc;
  --red-accent:    #f87171;
  --font-main: 'DM Sans', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'DM Mono', 'Consolas', 'Courier New', monospace;
  --max-w: 1240px;
  --nav-h: 64px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  font-family: var(--font-main);
  background: var(--neutral-850);
  color: var(--white);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
::selection { background: rgba(0, 120, 212, 0.45); color: #fff; }
:focus-visible { outline: 2px solid var(--blue-light); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 32px; }
@media (max-width: 600px) { .wrap { padding: 0 20px; } }
.mono { font-family: var(--font-mono); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── NAV ─────────────────────────────────────────── */
.site-nav {
  position: sticky; top: 0; z-index: 60;
  background: rgba(17, 18, 20, 0.72);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s, box-shadow .3s;
}
.site-nav.scrolled { border-color: var(--line); background: rgba(14, 15, 17, 0.86); box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); gap: 24px; }
.nav-logo { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.nav-logo svg { width: 30px; height: 30px; }
.wordmark { font-size: 20px; font-weight: 300; letter-spacing: -0.4px; color: var(--white); }
.wordmark b { font-weight: 600; color: var(--blue-primary); }
.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links a:not(.btn) {
  font-size: 14px; color: var(--neutral-300); transition: color .15s; position: relative; padding: 6px 0;
}
.nav-links a:not(.btn)::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--blue-light); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease-out);
}
.nav-links a:not(.btn):hover { color: var(--white); }
.nav-links a:not(.btn):hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-links a.active { color: var(--white); }
.nav-new {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 1px; text-transform: uppercase;
  color: #0b0c0e; background: var(--blue-light); border-radius: 4px; padding: 1px 5px; margin-left: 6px; vertical-align: 2px;
}
.nav-burger {
  display: none; appearance: none; background: transparent; border: 1px solid var(--line-strong);
  border-radius: 9px; width: 42px; height: 42px; align-items: center; justify-content: center; cursor: pointer; color: var(--neutral-200);
}
.nav-burger svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2; fill: none; }
.nav-burger .icon-close { display: none; }
.nav-burger[aria-expanded="true"] .icon-open { display: none; }
.nav-burger[aria-expanded="true"] .icon-close { display: block; }
.nav-back { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--neutral-300); transition: color .15s; }
.nav-back:hover { color: var(--white); }
@media (max-width: 900px) {
  .nav-burger { display: inline-flex; }
  .nav-links {
    display: none; position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(14, 15, 17, 0.97); border-bottom: 1px solid var(--line); padding: 8px 20px 22px;
  }
  .nav-links.open { display: flex; animation: navDrop .3s var(--ease-out); }
  .nav-links a:not(.btn) { padding: 14px 4px; font-size: 16px; border-bottom: 1px solid var(--line); }
  .nav-links a:not(.btn)::after { display: none; }
  .nav-links .btn { margin-top: 16px; justify-content: center; }
}
@keyframes navDrop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ── TYPE ────────────────────────────────────────── */
.eyebrow {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 2.6px; text-transform: uppercase;
  color: var(--blue-light); display: inline-flex; align-items: center; gap: 12px;
}
.eyebrow::before { content: ''; width: 24px; height: 1px; background: currentColor; opacity: .6; }
h1, h2, h3 { font-weight: 300; letter-spacing: -0.5px; line-height: 1.1; }
.section-h2 { font-size: clamp(32px, 4.4vw, 52px); margin: 16px 0 18px; max-width: 780px; letter-spacing: -1px; text-wrap: balance; }
.section-h2 b { font-weight: 600; color: var(--blue-light); }
.section-sub { font-size: 17.5px; color: var(--neutral-300); max-width: 640px; line-height: 1.6; text-wrap: pretty; }

/* ── BUTTONS ─────────────────────────────────────── */
.btn {
  font-family: var(--font-main); font-size: 14.5px; font-weight: 500;
  padding: 13px 22px; border-radius: 9px; border: 1px solid transparent;
  cursor: pointer; transition: background .2s, border-color .2s, color .2s, transform .2s var(--ease-out), box-shadow .2s;
  display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; position: relative;
}
.btn svg { flex-shrink: 0; }
.btn-primary { background: var(--blue-primary); color: var(--white); box-shadow: 0 8px 24px rgba(0, 120, 212, 0.28), inset 0 1px 0 rgba(255,255,255,.14); }
.btn-primary:hover { background: #0a84e6; transform: translateY(-1px); box-shadow: 0 12px 30px rgba(0, 120, 212, 0.4), inset 0 1px 0 rgba(255,255,255,.18); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { background: rgba(255,255,255,0.02); color: var(--neutral-200); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--blue-light); color: var(--white); background: rgba(79,195,247,0.06); }
.btn-white { background: var(--white); color: var(--blue-dark); font-weight: 600; }
.btn-white:hover { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(0,0,0,.25); }
.btn-sm { padding: 9px 16px; font-size: 13.5px; }

/* ── REVEAL ──────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.reveal.visible { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; } .reveal.d4 { transition-delay: .32s; }
.no-js .reveal { opacity: 1; transform: none; }

/* ── FOOTER ──────────────────────────────────────── */
.site-foot { background: var(--neutral-950); border-top: 1px solid var(--line); padding: 64px 0 36px; position: relative; overflow: hidden; }
.foot-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
@media (max-width: 760px) { .foot-top { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }
.foot-brand p { margin-top: 16px; color: var(--neutral-400); font-size: 14px; max-width: 300px; }
.foot-col h4 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--neutral-500); font-weight: 400; margin-bottom: 16px; }
.foot-col a { display: block; font-size: 14px; color: var(--neutral-300); padding: 4px 0; transition: color .15s; }
.foot-col a:hover { color: var(--blue-light); }
.dim-line { position: relative; border-top: 1px dashed rgba(79, 195, 247, 0.35); margin: 44px 0 22px; }
.dim-line::before, .dim-line::after { content: ''; position: absolute; top: -5px; width: 1px; height: 9px; background: var(--blue-light); opacity: .7; }
.dim-line::before { left: 0; } .dim-line::after { right: 0; }
.foot-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-family: var(--font-mono); font-size: 11.5px; color: var(--neutral-500); }

/* ── COOKIE BAR ──────────────────────────────────── */
.cookie-bar {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 9999; display: none;
  max-width: 920px; margin: 0 auto;
  background: rgba(22, 24, 27, 0.94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.cookie-bar.show { display: block; animation: cookieIn .5s var(--ease-out); }
@keyframes cookieIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
.cookie-inner { padding: 16px 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; justify-content: space-between; }
.cookie-inner p { margin: 0; color: var(--neutral-200); font-size: 13.5px; line-height: 1.55; flex: 1 1 360px; }
.cookie-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.cookie-actions a { color: var(--blue-light); font-size: 13px; margin-right: 4px; }

/* ── LIGHTBOX ────────────────────────────────────── */
.lightbox {
  position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center;
  background: rgba(6, 7, 9, 0.9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  padding: 56px 24px 72px; cursor: zoom-out;
}
.lightbox.open { display: flex; animation: lbIn .3s ease; }
@keyframes lbIn { from { opacity: 0; } to { opacity: 1; } }
.lightbox-stage { position: relative; max-width: 100%; max-height: 100%; overflow: hidden; border-radius: 12px; box-shadow: 0 30px 90px rgba(0,0,0,.6); border: 1px solid var(--line-strong); cursor: zoom-in; }
.lightbox-stage.zoomed { cursor: move; }
.lightbox img { max-width: min(1600px, 92vw); max-height: calc(100vh - 140px); width: auto; height: auto; transition: transform .35s var(--ease-out); transform-origin: center; animation: lbImg .45s var(--ease-out); }
@keyframes lbImg { from { transform: scale(.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.lightbox-cap { position: absolute; left: 0; right: 0; bottom: 22px; text-align: center; color: var(--neutral-300); font-size: 13.5px; padding: 0 70px; }
.lb-btn {
  position: absolute; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line-strong);
  background: rgba(26,28,31,.9); color: var(--white); cursor: pointer; display: grid; place-items: center; transition: border-color .2s, background .2s;
}
.lb-btn:hover { border-color: var(--blue-light); background: rgba(0,120,212,.25); }
.lb-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }
.lb-close { top: 14px; right: 16px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
[data-lightbox] { cursor: zoom-in; }

/* ── CONFETTI ────────────────────────────────────── */
.confetti-canvas { position: fixed; inset: 0; pointer-events: none; z-index: 300; }

/* ── SIMPLE PAGE HEADER (order + legal) ──────────── */
.page-head { padding: 72px 0 12px; position: relative; overflow: hidden; }
.page-head::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(700px 300px at 85% -10%, rgba(0, 120, 212, 0.2), transparent 70%),
    linear-gradient(rgba(79,195,247,.05) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, rgba(79,195,247,.05) 1px, transparent 1px) 0 0 / 40px 40px;
  -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent);
  mask-image: linear-gradient(180deg, #000 30%, transparent);
}
.page-head .wrap { position: relative; }
.page-head h1 { font-size: clamp(34px, 5vw, 56px); letter-spacing: -1.2px; margin: 18px 0 14px; line-height: 1.05; }
.page-head h1 b { font-weight: 600; color: var(--blue-light); }
.page-head .lede { font-size: 17px; color: var(--neutral-300); max-width: 640px; }
.page-head .meta { font-family: var(--font-mono); font-size: 12px; color: var(--neutral-400); margin-top: 6px; }

/* ── LEGAL DOCS ──────────────────────────────────── */
.doc-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; padding: 40px 0 100px; }
@media (max-width: 900px) { .doc-layout { grid-template-columns: 1fr; gap: 0; } .doc-toc { display: none; } }
.doc-toc { position: sticky; top: calc(var(--nav-h) + 32px); align-self: start; max-height: calc(100vh - 120px); overflow: auto; }
.doc-toc h4 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--neutral-500); font-weight: 400; margin-bottom: 12px; }
.doc-toc a { display: block; font-size: 13px; color: var(--neutral-400); padding: 6px 0 6px 14px; border-left: 1px solid var(--line-strong); transition: color .15s, border-color .15s; }
.doc-toc a:hover { color: var(--white); }
.doc-toc a.active { color: var(--blue-light); border-left-color: var(--blue-light); }
.doc { max-width: 760px; font-size: 15.5px; color: var(--neutral-200); }
.doc p { margin: 0 0 16px; line-height: 1.75; }
.doc h2 { font-size: 24px; font-weight: 500; color: var(--white); margin: 48px 0 16px; display: flex; align-items: baseline; gap: 14px; letter-spacing: -0.3px; }
.doc h2 .num { font-family: var(--font-mono); font-size: 13px; color: var(--blue-light); font-weight: 400; }
.doc h3 { font-size: 18px; font-weight: 500; color: var(--white); margin: 28px 0 12px; }
.doc ul, .doc ol { margin: 0 0 18px 22px; }
.doc li { margin-bottom: 8px; line-height: 1.7; }
.doc strong { color: var(--white); font-weight: 600; }
.doc a { color: var(--blue-light); border-bottom: 1px solid rgba(79,195,247,.3); }
.doc a:hover { border-color: var(--blue-light); }
.doc table { width: 100%; border-collapse: collapse; margin: 0 0 20px; font-size: 14px; }
.doc th, .doc td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line-strong); vertical-align: top; }
.doc th { color: var(--neutral-400); font-weight: 500; font-family: var(--font-mono); font-size: 12px; letter-spacing: .5px; }
.doc .callout {
  background: linear-gradient(135deg, rgba(0,120,212,.12), rgba(79,195,247,.04));
  border: 1px solid rgba(79,195,247,.25); border-radius: 12px; padding: 18px 20px; margin: 0 0 28px; line-height: 1.7;
}

/* ── REDUCED MOTION ──────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
.lightbox-stage.no-zoom { cursor: default; }
.foot-bottom a { color: var(--neutral-400); transition: color .15s; }
.foot-bottom a:hover { color: var(--blue-light); }
.site-foot .foot-bottom:only-child { padding: 0; }
