:root {
  --bg: #f6f5f2;
  --bg-alt: #ecebe6;
  --card: #ffffff;
  --text: #1a2027;
  --muted: #5b646e;
  --line: #deddd6;
  --accent: #1d3557;
  --accent-text: #ffffff;
  --chip: #e8ecf2;
  --shadow: 0 1px 2px rgba(20, 30, 45, .05), 0 8px 28px rgba(20, 30, 45, .07);
  color-scheme: light;
}
/* Tema întunecată e aleasă din JS după oră (06:00–18:00 zi). */
:root[data-theme="dark"] {
  --bg: #12161b;
  --bg-alt: #171c22;
  --card: #1b2128;
  --text: #e8e6e1;
  --muted: #98a1ab;
  --line: #2a313a;
  --accent: #8fb0dc;
  --accent-text: #0f1418;
  --chip: #232b35;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 28px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Limba: ambele variante sunt în pagină, se vede doar cea activă. */
html[lang="en"] .ro,
html[lang="ro"] .en { display: none; }

.wrap { max-width: 68rem; margin: 0 auto; padding: 0 20px; }
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -.015em; }
p { margin: 0 0 12px; }
section[id], main { scroll-margin-top: 72px; }

/* Antet fix */
.site-head {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.bar { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { font-weight: 650; font-size: 1.05rem; letter-spacing: .01em; color: var(--text); text-decoration: none; }
.menu { display: flex; gap: 22px; margin-left: auto; }
.menu a { color: var(--muted); text-decoration: none; font-size: .95rem; padding: 6px 0; }
.menu a:hover { color: var(--text); }
.theme-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0;
  border: 1px solid var(--line); border-radius: 50%; background: var(--card); color: var(--text); cursor: pointer;
}
.theme-btn:hover { border-color: var(--accent); }
.theme-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.theme-btn .i-sun { display: none; }
:root[data-theme="dark"] .theme-btn .i-sun { display: block; }
:root[data-theme="dark"] .theme-btn .i-moon { display: none; }
.lang { display: flex; gap: 2px; }
.lang button {
  font: inherit; font-size: .8rem; color: var(--muted);
  background: none; border: 1px solid transparent; border-radius: 6px;
  padding: 3px 9px; cursor: pointer;
}
.lang button:hover { color: var(--text); }
html[lang="en"] .lang [data-set-lang="en"],
html[lang="ro"] .lang [data-set-lang="ro"] { color: var(--text); border-color: var(--line); }

/* Butoane */
.btn {
  display: inline-block; padding: 11px 20px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  font-size: .95rem; font-weight: 550; text-decoration: none;
  transition: transform .15s ease, border-color .15s ease;
}
.btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

/* Hero */
.hero { padding: 64px 0 28px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.eyebrow { font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
h1 { font-size: clamp(2.2rem, 4.6vw, 3.5rem); font-weight: 680; }
h1 .amp { color: var(--accent); }
.lead { margin-top: 22px; font-size: 1.06rem; line-height: 1.7; color: var(--text); }
.hero-shot { margin: 0; }

.frame {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow); overflow: hidden;
}
.frame .dots { display: block; height: 28px; background: var(--bg-alt); border-bottom: 1px solid var(--line); position: relative; }
.frame .dots::before {
  content: ""; position: absolute; left: 12px; top: 10px; width: 8px; height: 8px; border-radius: 50%;
  background: #ff5f57; box-shadow: 14px 0 0 #febc2e, 28px 0 0 #28c840;
}
.frame img { display: block; width: 100%; height: auto; }

.facts {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 48px 0 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.facts > div { padding: 22px 18px; border-left: 1px solid var(--line); }
.facts > div:first-child { border-left: 0; padding-left: 0; }
.facts dt { font-size: 1.9rem; font-weight: 680; letter-spacing: -.02em; color: var(--accent); line-height: 1.1; }
.facts dd { margin: 4px 0 0; color: var(--muted); font-size: .92rem; }

/* Secțiuni */
.block { padding: 84px 0; }
.block.alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.block > .wrap > h2 {
  font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 30px;
}

/* Carduri expertiză */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 24px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.ico { width: 28px; height: 28px; margin-bottom: 14px; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 1.08rem; font-weight: 620; margin-bottom: 8px; }
.card p { margin: 0; color: var(--muted); font-size: .96rem; line-height: 1.6; }

/* Sisteme */
.system {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 28px;
}
.system h3 { font-size: 1.5rem; font-weight: 650; margin-bottom: 12px; }
.system .tag {
  display: inline-block; margin-bottom: 10px; padding: 2px 10px; border-radius: 999px;
  background: var(--chip); color: var(--muted); font-size: .78rem; font-weight: 600; letter-spacing: .04em;
}
.system p { color: var(--text); }
.small { font-size: .92rem; color: var(--muted); }
.small.label { margin: 16px 0 8px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; }

.featured { display: grid; grid-template-columns: 1fr 1.25fr; gap: 36px; margin-bottom: 22px; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.chips li { padding: 4px 12px; border-radius: 999px; background: var(--chip); font-size: .85rem; color: var(--text); }

.flow { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 8px; }
.flow li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg);
  position: relative;
}
.flow li:not(:last-child)::after {
  content: "↓"; position: absolute; left: 50%; bottom: -15px; transform: translateX(-50%);
  font-size: .8rem; color: var(--muted); background: var(--card); line-height: 1; padding: 1px 4px; z-index: 1;
}
.flow b { font-weight: 600; }
.flow small { color: var(--muted); font-size: .82rem; text-align: right; }

/* Vizualizator capturi */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tabs button {
  font: inherit; font-size: .88rem; font-weight: 550; color: var(--muted);
  background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; cursor: pointer;
}
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.panel { margin: 0; }
.panel[hidden], .caption[hidden] { display: none; }
.zoom { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.zoom:focus-visible, .tabs button:focus-visible, .btn:focus-visible, .lang button:focus-visible, a:focus-visible, .theme-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.caption { margin: 14px 0 6px; font-size: .95rem; color: var(--text); }
.note { font-size: .82rem; color: var(--muted); margin: 0; }

/* Parcurs */
.path { list-style: none; margin: 0; padding: 0; position: relative; }
.path::before { content: ""; position: absolute; left: 167px; top: 8px; bottom: 8px; width: 1px; background: var(--line); }
.path > li { display: grid; grid-template-columns: 150px 1fr; gap: 36px; padding: 0 0 30px; position: relative; }
.path > li::before {
  content: ""; position: absolute; left: 162px; top: 7px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent);
}
.when { margin: 0; color: var(--muted); font-size: .95rem; font-variant-numeric: tabular-nums; padding-top: 2px; text-align: right; }
.what h3 { font-size: 1.15rem; font-weight: 620; margin-bottom: 6px; }
.what p { margin-bottom: 10px; }
.edu { margin: 10px 0 0; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: .95rem; }

/* Contact */
.contact { text-align: left; }
.who { margin-bottom: 6px; font-weight: 550; }
.links { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 0; font-size: .95rem; color: var(--muted); }

.site-foot { border-top: 1px solid var(--line); padding: 26px 0 40px; font-size: .85rem; color: var(--muted); }
.site-foot .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; }
.site-foot a { color: var(--muted); }

dialog { padding: 0; border: 0; background: transparent; max-width: 96vw; max-height: 96vh; }
dialog::backdrop { background: rgba(10, 12, 15, .82); }
dialog img { display: block; max-width: 96vw; max-height: 94vh; border-radius: 8px; cursor: zoom-out; }

/* Ecrane mici */
@media (max-width: 960px) {
  .hero-grid, .featured, .duo { grid-template-columns: 1fr; }
  .hero-grid { gap: 36px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .bar { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 8px; gap: 6px 16px; }
  .brand { order: 1; }
  .theme-btn { order: 2; margin-left: auto; }
  .lang { order: 2; margin-left: 0; }
  .menu { order: 3; width: 100%; margin-left: 0; gap: 18px; overflow-x: auto; padding-bottom: 2px; }
  .hero { padding-top: 40px; }
  .block { padding: 56px 0; }
  .cards { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
  .facts > div:nth-child(3) { border-left: 0; padding-left: 0; }
  .facts > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .system { padding: 20px; }
  .path::before { left: 5px; }
  .path li { grid-template-columns: 1fr; gap: 4px; padding-left: 28px; }
  .path > li::before { left: 0; }
  .when { text-align: left; }
}
