/* ===========================================================
   Radar Hub — shared theme + base styles (PT + EN)
   Dark theme = the original verified design (unchanged hexes).
   Light theme = airy variant (inverted sections become light).
   =========================================================== */

:root {
  /* --- brand / stable (same in both themes) --- */
  --accent:        #B8443C;
  --accent-hover:  #9c352e;
  --rose:          #E0A39E;
  --ink:           #17130F;   /* always-dark small elements (avatar chip) */
  --paper:         #F6F4EF;   /* always-light (text on red/accent) */
  --green:         #1F7A4D;
  --sand-dot:      #D8C9A8;

  /* --- light-section base (same in both themes) --- */
  --bg:            #F6F4EF;   /* app base */
  --sand:          #EFEBE2;   /* alternating light section */
  --fg:            #211D18;
  --fg2:           #33302A;
  --fg-muted:      #524C43;
  --fg-soft:       #8A8377;
  --fg-soft2:      #6B655B;

  /* --- INVERTED surfaces (full dark sections + dark accent cards) --- */
  /* DARK THEME (default) = original values */
  --bg-body:       #17130F;
  --inv-bg:        #17130F;
  --inv-fg:        #F6F4EF;
  --inv-muted:     #C9C2B6;
  --inv-eyebrow:   #E0A39E;
  --inv-soft:      #8A8377;
  --inv-line:      rgba(246,244,239,.14);
  --inv-line-2:    rgba(246,244,239,.16);
  --inv-fill:      rgba(246,244,239,.03);
  --inv-fill-2:    rgba(246,244,239,.06);
  --inv-fill-3:    rgba(246,244,239,.10);
  --inv-motif:     rgba(246,244,239,.11);
  --inv-motif-faint: rgba(246,244,239,.06);
  --inv-card:      #F6F4EF;   /* solid light card sitting on an inverted section */
  --inv-card-fg:   #211D18;
  --inv-grad-a:    #17130F;
  --inv-grad-b:    rgba(23,19,15,.55);
  --inv-grad-c:    rgba(23,19,15,0);
  --inv-stamp-bg:  rgba(23,19,15,.7);
  /* sticky header (adapts to theme, not section) */
  --header-bg:     rgba(23,19,15,.82);
  --header-fg:     #F6F4EF;
  --header-border: rgba(246,244,239,.12);
  --field-bg:      rgba(246,244,239,.04);
  --field-border:  rgba(33,29,24,.18);
}

/* LIGHT THEME — stamped on <html data-theme="light"> by the no-flash script */
:root[data-theme="light"] {
  --bg-body:       #EDE7DB;
  --inv-bg:        #EDE7DB;
  --inv-fg:        #211D18;
  --inv-muted:     #524C43;
  --inv-eyebrow:   #B8443C;
  --inv-soft:      #8A8377;
  --inv-line:      rgba(33,29,24,.14);
  --inv-line-2:    rgba(33,29,24,.18);
  --inv-fill:      rgba(33,29,24,.035);
  --inv-fill-2:    rgba(33,29,24,.05);
  --inv-fill-3:    rgba(33,29,24,.08);
  --inv-motif:     rgba(33,29,24,.10);
  --inv-motif-faint: rgba(33,29,24,.05);
  --inv-card:      #FFFFFF;
  --inv-card-fg:   #211D18;
  --inv-grad-a:    #EDE7DB;
  --inv-grad-b:    rgba(237,231,219,.6);
  --inv-grad-c:    rgba(237,231,219,0);
  --inv-stamp-bg:  rgba(237,231,219,.88);
  --header-bg:     rgba(246,244,239,.85);
  --header-fg:     #211D18;
  --header-border: rgba(33,29,24,.10);
  --field-bg:      rgba(255,255,255,.7);
  --field-border:  rgba(33,29,24,.18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg-body); }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
::selection { background: var(--accent); color: var(--paper); }

@keyframes radar-spin { to { transform: rotate(360deg); } }
@keyframes radar-ping { 0% { transform: scale(.35); opacity: .85; } 100% { transform: scale(2.6); opacity: 0; } }
@keyframes cue { 0%,100% { transform: translateY(0); opacity: .35; } 50% { transform: translateY(9px); opacity: 1; } }
@keyframes flyspin { to { transform: rotate(360deg); } }
@keyframes spinner { to { transform: rotate(360deg); } }
@keyframes livedot { 0% { transform: scale(.4); opacity: .9; } 100% { transform: scale(2.4); opacity: 0; } }
@keyframes stampin { 0% { transform: rotate(-9deg) scale(1.4); opacity: 0; } 60% { transform: rotate(-9deg) scale(.94); opacity: 1; } 100% { transform: rotate(-9deg) scale(1); opacity: 1; } }

/* CTA hover */
.cta-primary { transition: background .2s, transform .2s; }
.cta-primary:hover { background: var(--accent-hover); color: var(--paper); transform: translateY(-1px); }
.cta-ghost { transition: border-color .2s, color .2s; }

/* ===== Sticky header ===== */
.site-header { position: sticky; top: 0; z-index: 80; background: var(--header-bg);
  -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--header-border); color: var(--header-fg); }
.hdr-inner { max-width: 1240px; margin: 0 auto; display: flex; align-items: center; gap: 18px;
  padding: 12px clamp(18px,4vw,40px); }
.hdr-logo { display: inline-flex; align-items: center; gap: 9px; color: var(--header-fg);
  font-size: .82rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; }
.hdr-logo:hover { color: var(--header-fg); }
.hdr-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(184,68,60,.22); }
.hdr-nav { display: flex; gap: clamp(14px,2vw,26px); margin-left: auto; }
.hdr-nav a { color: var(--header-fg); opacity: .82; font-size: .82rem; font-weight: 600; transition: opacity .2s, color .2s; }
.hdr-nav a:hover { opacity: 1; color: var(--accent); }
.hdr-actions { display: flex; align-items: center; gap: 12px; margin-left: 18px; }
.hdr-lang, .hdr-theme { all: unset; cursor: pointer; color: var(--header-fg); opacity: .8;
  font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  display: inline-flex; align-items: center; justify-content: center; transition: opacity .2s; }
.hdr-lang:hover, .hdr-theme:hover { opacity: 1; }
.hdr-theme { width: 30px; height: 30px; border: 1px solid var(--header-border); border-radius: 50%; font-size: .95rem; letter-spacing: 0; }
.hdr-lang { border: 1px solid var(--header-border); border-radius: 20px; padding: 5px 10px; }
.hdr-cta { background: var(--accent); color: var(--paper); font-weight: 700; font-size: .82rem;
  padding: 9px 16px; border-radius: 7px; transition: background .2s, transform .2s; white-space: nowrap; }
.hdr-cta:hover { background: var(--accent-hover); color: var(--paper); transform: translateY(-1px); }

section[id] { scroll-margin-top: 76px; }

/* ===== Lead form ===== */
.lead-form { display: grid; gap: 14px; }
.lf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lead-form label { display: block; font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-soft); margin-bottom: 6px; }
.lead-form input, .lead-form textarea { width: 100%; font: inherit; color: var(--fg); background: var(--field-bg);
  border: 1px solid var(--field-border); border-radius: 8px; padding: 12px 14px; transition: border-color .2s, box-shadow .2s; }
.lead-form input:focus, .lead-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(184,68,60,.15); }
.lead-form textarea { min-height: 92px; resize: vertical; }
.lf-consent { display: flex; align-items: flex-start; gap: 10px; font-size: .9rem; color: var(--fg-muted); line-height: 1.45; }
.lf-consent input { width: auto; margin-top: 3px; accent-color: var(--accent); flex: none; }
.lf-submit { all: unset; cursor: pointer; text-align: center; background: var(--accent); color: var(--paper);
  font-weight: 700; font-size: 1rem; padding: 15px 26px; border-radius: 8px; transition: background .2s, transform .2s; }
.lf-submit:hover { background: var(--accent-hover); transform: translateY(-1px); }
.lf-submit[disabled] { opacity: .6; cursor: default; transform: none; }
.lf-success { display: none; border: 1px solid var(--accent); background: rgba(184,68,60,.08); border-radius: 10px; padding: 24px; }
.lf-error { display: none; color: var(--accent); font-size: .9rem; font-weight: 600; }

/* ===== Mobile ===== */
@media (max-width: 860px) {
  .hdr-nav { display: none; }
  .diag-morph { grid-template-columns: 1fr !important; }
  .diag-arrow { transform: rotate(90deg); margin: 4px 0; }
}
@media (max-width: 560px) {
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta a { justify-content: center; }
  .hdr-actions { gap: 9px; margin-left: 12px; }
  .hdr-cta { padding: 8px 12px; font-size: .76rem; }
  .lf-row { grid-template-columns: 1fr; }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
