/* Shared design tokens and site chrome (nav, footer, legal-page shell).
   Page-specific layout stays in each page's own <style> block. */

* { box-sizing: border-box; }
body { margin: 0; background: #0b0e13; color: #e8ecf1; font-family: 'Space Grotesk', sans-serif; }
a { color: #4d9de0; text-decoration: none; }
a:hover { color: #7db8e8; }
::selection { background: rgba(77, 157, 224, .3); }
.mono { font-family: 'JetBrains Mono', monospace; }
.kicker { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: #4d9de0; margin-bottom: 14px; }

/* --- Nav ----------------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 56px; height: 76px;
  border-bottom: 1px solid #1c222c;
  background: rgba(11, 14, 19, .85); backdrop-filter: blur(12px);
}
.nav-logo { font-weight: 600; font-size: 20px; letter-spacing: -0.3px; color: #e8ecf1; }
.nav-logo:hover { color: #e8ecf1; }
.nav-logo .accent { color: #4d9de0; }
.nav-logo .muted { color: #5b6675; }
.nav-links { display: flex; align-items: center; gap: 32px; font-size: 14px; color: #9aa5b3; }
.nav-links a { color: #9aa5b3; }
.nav-links a:hover { color: #e8ecf1; }
.nav-here { color: #e8ecf1; border-bottom: 2px solid #4d9de0; padding-bottom: 2px; }
.nav-lang { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: #5b6675; }

/* Language options render inside .lang-toggle containers (nav and footer).
   Padding keeps each option a comfortably sized target rather than two
   characters; the negative margin stops it from growing the nav row. */
.lang-opt {
  font: inherit; color: #5b6675; background: none; border: 0;
  padding: 6px 8px; margin: -6px 0; cursor: pointer;
}
.lang-opt:hover { color: #9aa5b3; }
.lang-opt.is-active { color: #4d9de0; }
.lang-opt.is-active:hover { color: #7db8e8; }
.nav-cta {
  border: 1px solid #2c3542; border-radius: 8px; padding: 10px 20px;
  font-size: 13px; font-weight: 500; color: #e8ecf1 !important;
}
.nav-cta:hover { border-color: #4d9de0; }
.nav-cta-here { border-color: #4d9de0; color: #4d9de0 !important; }

.nav-burger {
  display: none; width: 44px; height: 44px; padding: 0;
  align-items: center; justify-content: center;
  background: transparent; border: 1px solid #2c3542; border-radius: 8px;
  color: #e8ecf1; cursor: pointer;
}
.nav-burger:hover { border-color: #4d9de0; }
.nav-burger svg { width: 20px; height: 20px; }

/* --- Footer -------------------------------------------------------------- */
.footer {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; padding: 24px 56px;
  border-top: 1px solid #1c222c;
  color: #5b6675; font-family: 'JetBrains Mono', monospace; font-size: 12px;
}
.footer a { color: #5b6675; }
.footer a:hover { color: #9aa5b3; }
.footer-cookies {
  font: inherit; color: #5b6675; background: none; border: 0;
  padding: 0; cursor: pointer;
}
.footer-cookies:hover { color: #9aa5b3; }

/* --- Cookie consent ------------------------------------------------------ */
.consent {
  position: fixed; z-index: 20; left: 24px; right: 24px; bottom: 24px;
  max-width: 640px; margin: 0 auto;
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
  border: 1px solid #22303f; border-radius: 14px; padding: 20px 24px;
  background: rgba(15, 23, 34, .97); backdrop-filter: blur(12px);
  box-shadow: 0 18px 40px -18px rgba(0,0,0,.85);
}
.consent[hidden] { display: none; }
.consent-text { flex: 1 1 280px; }
.consent-title { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.consent p { margin: 0; font-size: 13.5px; line-height: 1.6; color: #9aa5b3; }
.consent p a { color: #4d9de0; }
.consent-actions { display: flex; gap: 10px; flex: 0 0 auto; }
/* Both choices carry the same visual weight — a reject that is harder to find
   than accept is not freely given consent. */
.consent-btn {
  font-family: inherit; font-size: 13px; font-weight: 500;
  border: 1px solid #2c3542; border-radius: 8px; padding: 11px 20px;
  background: transparent; color: #e8ecf1; cursor: pointer;
}
.consent-btn:hover { border-color: #4d9de0; }

/* --- Page header shared by /services, /privacy, /terms -------------------- */
.header { position: relative; overflow: hidden; border-bottom: 1px solid #1c222c; }
.header canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; opacity: .4; }
.header-inner { position: relative; padding: 88px 56px 80px; max-width: 820px; }
.header-lede { font-size: 17px; line-height: 1.65; color: #9aa5b3; max-width: 560px; margin: 20px 0 0; }

/* --- Primary button ------------------------------------------------------ */
.btn-primary {
  display: inline-block; background: #4d9de0; color: #0b0e13 !important;
  border-radius: 10px; padding: 16px 32px; font-size: 15px; font-weight: 600;
}
.btn-primary:hover { background: #7db8e8; transform: translateY(-1px); box-shadow: 0 8px 22px -8px rgba(77,157,224,.5); }

/* --- Legal pages (/privacy, /terms) -------------------------------------- */
.legal-doc { padding: 80px 56px; max-width: 900px; }
.legal-updated { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: #5b6675; margin-top: 26px; }

.legal-summary {
  border: 1px solid #22303f; border-radius: 16px; padding: 32px 36px;
  background: linear-gradient(180deg, #0f1722, #0b0e13); margin-bottom: 64px;
}
.legal-summary .label {
  font-family: 'JetBrains Mono', monospace; font-size: 11px; color: #5b6675;
  letter-spacing: 1px; margin-bottom: 16px;
}
.legal-summary .body { font-size: 16px; line-height: 1.7; color: #c8d1dc; }

.legal-section { margin-bottom: 52px; }
.legal-section .num { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: #5b6675; margin-bottom: 12px; }
.legal-section h2 { font-size: 24px; font-weight: 600; letter-spacing: -0.6px; margin: 0 0 16px; }
.legal-section .body { font-size: 15px; line-height: 1.75; color: #9aa5b3; }
.legal-section .body p { margin: 0 0 14px; }
.legal-section .body p:last-child { margin-bottom: 0; }
.legal-section .body ul { margin: 0 0 14px; padding-left: 20px; }
.legal-section .body li { margin-bottom: 8px; }
.legal-section .body strong { color: #e8ecf1; font-weight: 600; }
.legal-section .body code {
  font-family: 'JetBrains Mono', monospace; font-size: 13px;
  color: #4d9de0; background: #10141b; border: 1px solid #1c222c;
  border-radius: 5px; padding: 1px 6px;
}

/* --- Interaction & motion polish ----------------------------------------- */
a, .card, .tile, .mode, .chip, .mail-card, .tips-card,
.btn-ghost, .btn-primary, .nav-cta, .nav-links a, .nav-here, .lang-opt,
.nav-burger, .consent-btn, .footer-cookies {
  transition: color .16s ease, border-color .16s ease, background-color .16s ease,
              transform .16s ease, box-shadow .16s ease;
}
:focus-visible { outline: 2px solid #4d9de0; outline-offset: 3px; }

.js-reveal { opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .55s ease; }
.js-reveal.in { opacity: 1; transform: none; }

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

@media (max-width: 900px) {
  .nav { padding: 0 24px; }
  .nav-burger { display: inline-flex; }
  .nav-links {
    position: absolute; top: 76px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 24px 16px;
    background: rgba(11, 14, 19, .97); backdrop-filter: blur(12px);
    border-bottom: 1px solid #1c222c;
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
  }
  /* Keyboard and screen-reader users are kept out of the collapsed menu by the
     `inert` attribute ui.js sets — opacity alone would leave it reachable. */
  .nav.open .nav-links { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links a, .nav-here, .nav-lang { display: block; padding: 13px 4px; font-size: 15px; }
  .nav-links .lang-opt { padding: 10px 12px; margin: 0; }
  .nav-here { border-bottom: none; color: #4d9de0; }
  .nav-links .nav-cta {
    border: none; border-radius: 0; padding: 13px 4px; color: #4d9de0 !important;
  }
  .header-inner { padding: 64px 24px; }
  .legal-doc { padding: 56px 24px; }
  .legal-summary { padding: 24px 26px; margin-bottom: 48px; }
  .legal-section h2 { font-size: 21px; }
  .footer { padding: 24px; flex-direction: column; gap: 6px; }
}
