/* DuoLuz: baza și componentele comune. Mobil întâi; proprietăți logice (margin-inline, inset-inline ...), ca dreapta-stânga să meargă. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--white);
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; line-height: 1.1; font-weight: 600; }
p { margin: 0; }
a { color: var(--blue); }
em { font-style: italic; }

.serif { font-family: var(--font-serif); }
.muted { color: var(--muted); }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); position: relative; }
.narrow { max-width: 760px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; inset-inline-start: var(--space-3); top: -100px; z-index: 100;
  background: var(--white); color: var(--navy); padding: var(--space-3) var(--space-4); border-radius: 12px; font-weight: 700;
}
.skip-link:focus { top: var(--space-3); }

/* focus vizibil peste tot: auriu pe fundal închis, albastru pe fundal deschis */
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
.night :focus-visible, .site-header :focus-visible { outline-color: var(--gold-1); }

/* ---------- secțiuni ---------- */
.section { padding-block: var(--section-pad); background: var(--white); }
.section-tint { background: var(--tint); }
.night { position: relative; overflow: hidden; color: var(--white); background: linear-gradient(120deg, var(--night-0), var(--night-1) 60%, var(--night-2)); }
.night .wrap { z-index: 1; }
.sky { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; pointer-events: none; }

/* ---------- butoane ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 52px; padding: 0 26px; border-radius: var(--radius-btn); border: 0;
  font: inherit; font-size: 16px; font-weight: 700; text-decoration: none; cursor: pointer; text-align: center;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-gold { background: linear-gradient(180deg, var(--gold-1), var(--gold-2)); color: var(--navy); box-shadow: var(--shadow-gold); }
.btn-gold:hover { box-shadow: 0 8px 24px rgba(212, 169, 78, .5); }
.btn-ghost { background: rgba(255, 255, 255, .08); color: var(--white); border: 1px solid rgba(255, 255, 255, .35); }
.btn-ghost:hover { background: rgba(255, 255, 255, .16); }
.btn-blue { background: var(--blue); color: var(--white); box-shadow: 0 6px 18px rgba(35, 80, 200, .25); }
.btn-blue:hover { background: var(--night-1); }
.btn-outline { background: var(--white); color: var(--blue); border: 1px solid var(--border-chip); box-shadow: 0 4px 14px rgba(20, 40, 110, .06); }
.btn-outline:hover { border-color: var(--blue); }
.btn-lg { min-height: 58px; font-size: 18px; padding: 0 34px; }
.btn-row { display: flex; flex-direction: column; gap: 10px; }
@media (min-width: 600px) { .btn-row { flex-direction: row; flex-wrap: wrap; gap: 12px; } }

/* ---------- etichete, carduri, plăci ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 4px 12px;
  border-radius: var(--radius-chip); font-size: 13px; font-weight: 700; line-height: 1.3;
}
.chip-gold { background: rgba(243, 210, 122, .16); color: var(--gold-1); border: 1px solid rgba(243, 210, 122, .4); }
.chip-blue { background: var(--blue-mist); color: var(--blue); }
.chip-solid { background: var(--blue); color: var(--white); }
.chip-outline { background: var(--tint); color: var(--ink); border: 1px solid var(--border-chip); }

.card {
  position: relative; background: var(--white); border: 1px solid var(--border);
  border-radius: 20px; padding: 18px; box-shadow: var(--shadow-card);
}
@media (min-width: 900px) { .card { border-radius: var(--radius-card); padding: 26px; } }
.tile { display: flex; align-items: center; justify-content: center; border-radius: var(--radius-tile); flex-shrink: 0; }
.tile-gold { background: var(--tile-gold); }
.tile-blue { background: var(--tile-blue); }
.tile-lilac { background: var(--tile-lilac); }

/* ---------- antetul ---------- */
/* Antetul rămâne mereu sus pe ecran (și „Quick exit” cu el), pe orice pagină și la orice derulare.
   Implicit: lipit sus (sticky), în fluxul paginii, cu fundal de noapte plin, deci nu acoperă nimic.
   Pe paginile cu erou (.has-hero): fix peste erou; transparent doar cât stă peste cerul de noapte și doar cu JavaScript
   (app.js pune .js pe <html> și .is-scrolled când pagina coboară); fără JavaScript are mereu fundal plin, ca să se citească. */
.site-header {
  position: sticky; top: 0; z-index: 50; color: var(--white);
  background: linear-gradient(120deg, var(--night-0), var(--night-1) 60%, var(--night-2));
}
.has-hero .site-header {
  position: fixed; top: 0; inset-inline: 0;
  background: rgba(13, 22, 64, .94);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 6px 20px rgba(8, 14, 44, .28);
  transition: background-color .2s ease, box-shadow .2s ease;
}
.js .has-hero .site-header:not(.is-scrolled) { background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
html { scroll-padding-block-start: calc(var(--header-h) + 12px); }   /* ancorele (#why) nu ajung sub antet */
.header-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--tap); color: var(--white); text-decoration: none; flex-shrink: 0; }
.brand-mark { width: 34px; height: 24px; }
.brand-name { font-size: 22px; font-weight: 600; line-height: 1; }
.header-nav { display: none; }
.header-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.lang-switch { display: flex; gap: 6px; }
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: var(--tap); min-width: var(--tap); padding: 0 12px; border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .08);
  color: var(--white); font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.pill:hover { background: rgba(255, 255, 255, .18); }
.pill svg { width: 14px; height: 14px; }
@media (min-width: 900px) {
  .brand-mark { width: 40px; height: 28px; }
  .brand { gap: 10px; }
  .brand-name { font-size: 26px; }
  .header-actions { gap: 10px; }
  .pill { font-size: 14px; padding: 0 14px; }
}
@media (min-width: 1000px) {
  .header-nav { display: flex; gap: 30px; }
  .header-nav a { color: var(--blue-pale); text-decoration: none; font-weight: 600; font-size: 15px; min-height: var(--tap); display: inline-flex; align-items: center; }
  .header-nav a:hover, .header-nav a[aria-current] { color: var(--white); text-decoration: underline; text-underline-offset: 4px; }
  .header-nav a[aria-current] { text-decoration-color: var(--gold-1); }
}

/* ---------- paginile simple (informare, intrare, înscriere, erori): antet de noapte cu stele ---------- */
.page-hero { padding-block: calc(var(--header-h) + 24px) var(--section-pad); background: radial-gradient(900px 380px at 80% 0%, var(--night-glow) 0%, var(--night-1) 50%, var(--night-0) 100%); }
.page-hero h1 { font-size: 36px; margin-block-start: 14px; letter-spacing: -.5px; overflow-wrap: anywhere; }
.page-hero-lead { margin-block-start: 12px; max-width: 640px; color: var(--blue-pale); font-size: 17px; }
.sky-page { opacity: .9; }
@media (min-width: 900px) {
  .page-hero { padding-block: calc(var(--header-h) + 36px) var(--section-pad); }
  .page-hero h1 { font-size: 52px; margin-block-start: 18px; letter-spacing: -1px; }
  .page-hero-lead { font-size: 19px; }
}
.page-card { display: flex; flex-direction: column; gap: 20px; }
.page-card-head { display: flex; gap: 14px; align-items: center; }
.page-tile { width: 56px; height: 56px; font-size: 28px; }
.page-lead { font-size: 18px; }
.page-other a { display: inline-flex; align-items: center; min-height: var(--tap); font-weight: 700; }
.error-detail { margin: 0; padding: var(--space-4); background: var(--tint); border-radius: 12px; font-size: 12px; overflow-x: auto; white-space: pre-wrap; }

/* ---------- subsolul (conceptul A): linkurile în stânga, limbile în dreapta; pe telefon se așază pe rânduri ---------- */
.site-footer { background: var(--white); border-top: 1px solid var(--border); font-size: 14px; color: var(--muted); }
.footer-help {
  display: flex; flex-wrap: wrap; align-items: center; column-gap: 16px; padding-block: 10px 0;
}
.footer-help-link { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); font-weight: 700; color: var(--blue); }
.footer-helpline { display: inline-flex; flex-wrap: wrap; align-items: center; min-height: var(--tap); color: var(--ink); overflow-wrap: anywhere; }
.footer-helpline a { display: inline-flex; align-items: center; min-height: var(--tap); padding-inline-start: 4px; font-weight: 700; color: var(--blue); }
.footer-row { display: flex; flex-direction: column; gap: 4px; padding-block: 4px 20px; }
.footer-links, .footer-langs { display: flex; flex-wrap: wrap; column-gap: 20px; }
.footer-links a, .footer-langs a { display: inline-flex; align-items: center; min-height: var(--tap); color: var(--blue); }
.footer-langs a[aria-current] { color: var(--ink); text-decoration: none; }
.footer-end { display: flex; flex-wrap: wrap; align-items: center; column-gap: 20px; }
.footer-copy { display: inline-flex; align-items: center; min-height: var(--tap); }
@media (min-width: 900px) {
  .footer-row { flex-direction: row; align-items: center; justify-content: space-between; gap: 24px; padding-block: 18px; }
  .footer-links { column-gap: 22px; }
  .footer-langs { column-gap: 0; }
  .footer-langs a + a::before { content: "·"; display: inline-block; padding-inline: 6px; color: var(--muted); text-decoration: none; }
}

/* ---------- mișcare ---------- */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .btn:hover { transform: none; }
}
