/* AutoSVF.ro — baza comuna: fonturi, culori, butoane, carduri, header, footer.
   Tema 2026 „Piatra Metin”: obsidian aproape negru, stralucire ember (piatra Metin crapata) si rosu Shinsoo. */
@font-face { font-family: 'Cinzel'; font-style: normal; font-weight: 400 900; font-display: swap; src: url(/fonts/cinzel-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Cinzel'; font-style: normal; font-weight: 400 900; font-display: swap; src: url(/fonts/cinzel-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Outfit'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/outfit-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Outfit'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/outfit-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 100 800; font-display: swap; src: url(/fonts/jetbrains-mono-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 100 800; font-display: swap; src: url(/fonts/jetbrains-mono-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
/* Fallback-uri cu metrici apropiate: textul nu sare cand se incarca fonturile (CLS mic) */
@font-face { font-family: 'Outfit Fallback'; src: local('Arial'), local('Helvetica'); size-adjust: 100%; ascent-override: 100%; descent-override: 26%; line-gap-override: 0%; }
@font-face { font-family: 'Cinzel Fallback'; src: local('Times New Roman'), local('Georgia'); size-adjust: 118%; ascent-override: 86%; descent-override: 30%; line-gap-override: 0%; }

:root {
  /* Obsidian */
  --ink-0: #07080b;       /* fundalul paginii */
  --ink-1: #0e0f13;       /* carduri */
  --ink-2: #15171d;       /* carduri ridicate, campuri */
  --ink-3: #1d2028;
  --edge: rgba(255,255,255,.08);   /* contur fin de sticla */
  --edge-hi: rgba(255,255,255,.16);
  --glass: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.012));
  /* Text */
  --text: #f3efe8;
  --soft: #c9c3ba;
  --muted: #9a938a;
  /* Ember (piatra Metin) */
  --ember: #ff6a2b;
  --ember-hi: #ff8a4c;
  --ember-soft: #ffb27a;
  --crimson: #e0334a;     /* rosu Shinsoo */
  --jinno: #6aa6f0;       /* albastru Jinno */
  --chunjo: #f2c14e;      /* galben Chunjo */
  --fire: linear-gradient(135deg, #ff8a4c, #e0334a);
  /* Stari */
  --jade: #46d39a;        /* reusit */
  --amber: #f5b14c;       /* atentie */
  --danger: #ff6b6b;      /* eroare */
  --r-sm: 6px; --r-md: 10px; --r-lg: 16px; --r-xl: 24px;
  --display: 'Cinzel', 'Cinzel Fallback', 'Trajan Pro', Georgia, serif;
  --body: 'Outfit', 'Outfit Fallback', 'Segoe UI', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);

  /* Numele vechi (folosite in panel.js / panel.css) mapate pe tema noua */
  --lacquer: var(--ink-0); --deep: #0b0c10; --wood: var(--ink-1); --wood-2: var(--ink-2);
  --line: #23262f; --line-hi: #343844;
  --parchment: var(--text);
  --gold: var(--ember-hi); --gold-hi: var(--ember-soft); --gold-ink: #1a0b03;
  --red: var(--crimson); --red-hi: #ff4d5e; --red-deep: #6d1222;
  --ink: var(--ink-0); --surface: var(--ink-1); --surface-2: var(--ink-2);
  --mint: var(--jade); --cinnabar: var(--danger);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
html, body { margin: 0; }
body { background: var(--ink-0); color: var(--text); font: 400 18px/1.6 var(--body); min-height: 100vh; display: flex; flex-direction: column;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  background-image: radial-gradient(1000px 640px at 50% -260px, rgba(255,106,43,.16), transparent 70%); background-repeat: no-repeat; }
body > main { flex: 1; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.1; margin: 0 0 .5em; letter-spacing: -.005em; text-wrap: balance; color: #fff; }
h3 { line-height: 1.2; }
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: var(--ember-soft); text-underline-offset: 3px; text-decoration-thickness: 1px; transition: color .15s; }
a:hover { color: #ffd9bd; }
b, strong { font-weight: 600; color: #fff; }
code { font-family: var(--mono); font-size: .82em; background: rgba(255,138,76,.1); color: #ffcfaa; padding: .12em .42em; border-radius: 5px; }
small { font-size: .84em; }
img, svg, video { max-width: 100%; }
[hidden] { display: none !important; }
::selection { background: rgba(255,106,43,.4); color: #fff; }
:focus-visible { outline: 2px solid var(--ember-soft); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: #fff; color: var(--ink-0); padding: 8px 14px; border-radius: var(--r-md); z-index: 100; font-weight: 700; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.nowrap { white-space: nowrap; }
.m0 { margin: 0; }
.kicker { display: inline-block; font: 500 .8rem/1.4 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--ember-hi); margin-bottom: 12px; }

/* Card de sticla (fostul „chenar de fereastra”) — acelasi nume de clase, ca sa mearga si in panel */
.frame { border: 1px solid var(--edge); border-radius: var(--r-xl); background: var(--glass), var(--ink-1); box-shadow: 0 40px 80px -50px rgba(0,0,0,.9); }
.frame-in { padding: 26px 28px 28px; }
.win-title { margin: -26px -28px 20px; padding: 14px 20px; display: flex; align-items: center; gap: 10px; font: 500 .82rem/1.3 var(--mono); letter-spacing: .08em; color: var(--soft);
  border-bottom: 1px solid var(--edge); background: rgba(255,255,255,.02); border-radius: var(--r-xl) var(--r-xl) 0 0; }
.win-title::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--jade); box-shadow: 0 0 10px var(--jade); flex: none; }

/* Numar de pas (secventa reala) */
.seal { display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; font: 600 .95rem/1 var(--mono); color: #fff;
  background: var(--fire); border-radius: 10px; box-shadow: 0 8px 20px -8px rgba(255,106,43,.7); }

/* Butoane. .btn-gold ramane numele actiunii principale (folosit si in panel.js). */
.btn { font: 600 1rem/1.2 var(--body); letter-spacing: .005em; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .82rem 1.35rem; min-height: 44px;
  border-radius: 12px; border: 1px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .18s var(--ease), box-shadow .2s var(--ease), background .2s, border-color .2s, color .2s, filter .2s; }
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-gold, .btn-primary { background: var(--fire); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 14px 34px -14px rgba(255,106,43,.75); }
.btn-gold:hover:not(:disabled), .btn-primary:hover:not(:disabled) { color: #fff; filter: brightness(1.08); box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 18px 40px -14px rgba(255,106,43,.9); }
.btn-line { background: rgba(255,255,255,.03); color: var(--text); border-color: var(--edge-hi); }
.btn-line:hover:not(:disabled) { border-color: rgba(255,178,122,.6); background: rgba(255,138,76,.08); color: #fff; }
.btn-light { background: var(--text); color: var(--ink-0); }
.btn-light:hover:not(:disabled) { background: #fff; color: var(--ink-0); }
.btn-danger { background: transparent; color: var(--danger); border-color: rgba(255,107,107,.45); }
.btn-danger:hover:not(:disabled) { background: rgba(255,107,107,.1); }
.btn-sm { padding: .45rem .9rem; font-size: .92rem; min-height: 36px; border-radius: 10px; }
.btn-lg { padding: 1rem 1.7rem; font-size: 1.08rem; border-radius: 14px; }

/* Formulare */
input:not([type=radio]):not([type=checkbox]):not([type=file]):not([type=range]), textarea, select { width: 100%; font: inherit; font-size: 1rem; color: var(--text); background: var(--deep);
  border: 1px solid var(--line-hi); border-radius: var(--r-md); padding: .72rem .9rem; outline: none; transition: border-color .15s, box-shadow .15s; }
textarea { font-family: var(--mono); font-size: .86rem; resize: vertical; }
input::placeholder, textarea::placeholder { color: #6f6a64; }
input:focus, textarea:focus, select:focus { border-color: var(--ember-hi); box-shadow: 0 0 0 3px rgba(255,106,43,.22); }
input[type=checkbox], input[type=radio] { accent-color: var(--ember); }
label { display: block; font-size: .98rem; font-weight: 500; color: var(--soft); }
label > input, label > textarea, label > select { margin-top: .35rem; }

/* Logo */
.brand { display: inline-flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; font: 700 1.2rem/1 var(--display); letter-spacing: .08em; text-transform: uppercase; }
.brand:hover { color: #fff; }
.brand svg { width: 30px; height: 30px; flex: none; filter: drop-shadow(0 0 10px rgba(255,106,43,.45)); }
.brand .tld { color: var(--ember-hi); }

/* Header */
.site-head { position: sticky; top: 0; z-index: 20; background: rgba(7,8,11,.72); backdrop-filter: saturate(140%) blur(14px); -webkit-backdrop-filter: saturate(140%) blur(14px); border-bottom: 1px solid var(--edge); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; height: 72px; }
.site-nav { display: flex; align-items: center; gap: .25rem; }
.site-nav a { color: var(--soft); text-decoration: none; font-weight: 500; font-size: .98rem; white-space: nowrap; padding: .5rem .85rem; border-radius: 999px; transition: color .15s, background .15s; }
.site-nav a:hover { color: #fff; background: rgba(255,255,255,.05); }
.site-nav a[aria-current="page"]:not(.btn) { color: #fff; background: rgba(255,255,255,.08); }
.site-nav .btn { margin-left: .5rem; padding: .55rem 1.1rem; border-radius: 999px; }
.site-nav .btn-gold, .site-nav .btn-primary { color: #fff; }
body:not(.panel) .site-nav .btn-primary { background: var(--text); color: var(--ink-0); box-shadow: none; }
body:not(.panel) .site-nav .btn-primary:hover { background: #fff; color: var(--ink-0); filter: none; }
.nav-toggle { display: none; background: rgba(255,255,255,.03); border: 1px solid var(--edge-hi); color: var(--text); border-radius: 12px; padding: .5rem .9rem; min-height: 44px; font: 500 1rem var(--body); cursor: pointer; }
.head-right { display: flex; align-items: center; gap: 10px; order: 3; }
.site-head .wrap > .site-nav { order: 2; margin-left: auto; }
.site-head .wrap > .brand { order: 1; }
.lang-switch { background: transparent; cursor: pointer; display: inline-grid; place-items: center; min-width: 44px; height: 38px; padding: 0 10px; border: 1px solid var(--edge-hi);
  border-radius: 10px; color: var(--soft); text-decoration: none; font: 500 .8rem var(--mono); letter-spacing: .08em; }
.lang-switch:hover { color: #fff; border-color: var(--ember-soft); }
@media (min-width: 1201px) {
  body:not(.panel) .site-nav { padding: 5px; border: 1px solid var(--edge); border-radius: 999px; background: rgba(255,255,255,.025); }
}

/* Footer */
.site-foot { margin-top: 120px; padding: 64px 0 40px; color: var(--muted); font-size: .98rem; position: relative; border-top: 1px solid var(--edge);
  background: radial-gradient(800px 260px at 50% 0%, rgba(255,106,43,.07), transparent 70%); }
.site-foot .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.site-foot h2 { font: 500 .78rem/1.4 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--ember-hi); margin: 0 0 1em; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.site-foot a { color: var(--soft); text-decoration: none; }
.site-foot a:hover { color: #fff; text-decoration: underline; }
.site-foot .legal { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--edge); font-size: .88rem; line-height: 1.7; }
.site-foot .about { max-width: 34ch; margin-top: 1rem; }

@media (max-width: 1200px) {
  .wrap { padding: 0 20px; }
  .nav-toggle { display: inline-flex; align-items: center; }
  .head-right { margin-left: auto; }
  .site-nav { display: none; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(10,11,15,.97); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--edge); padding: 8px 20px 20px; max-height: calc(100vh - 72px); overflow: auto; }
  .site-nav.open { display: flex; }
  .site-nav a { padding: .9rem .25rem; border-radius: 0; border-bottom: 1px solid var(--edge); }
  .site-nav a:hover { background: none; }
  .site-nav a[aria-current="page"]:not(.btn) { background: none; color: var(--ember-soft); }
  .site-nav .btn { margin: 16px 0 0; border-bottom: 0; padding: .9rem 1rem; border-radius: 12px; }
  .site-foot .cols { grid-template-columns: 1fr 1fr; }
  .site-foot .cols > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 600px) { .wrap { padding: 0 16px; } .site-foot .cols { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; } }

/* Bara de noutati */
.newsbar { background: linear-gradient(90deg, rgba(224,51,74,.28), rgba(255,106,43,.14) 55%, rgba(255,106,43,.04)); border-bottom: 1px solid var(--edge); color: var(--text); font-size: .96rem; }
.nb-inner { display: flex; align-items: center; gap: 12px; min-height: 42px; padding-top: 7px; padding-bottom: 7px; }
.nb-items { flex: 1; min-width: 0; }
.nb-item { margin: 0; line-height: 1.45; }
.nb-item::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ember-hi); box-shadow: 0 0 8px var(--ember); transform: translateY(-2px); margin-right: 10px; }
.nb-promo::before { background: var(--jade); box-shadow: 0 0 8px var(--jade); }
.nb-item a { font-weight: 600; white-space: nowrap; margin-left: 4px; }
.nb-next, .nb-close { background: none; border: 1px solid transparent; color: var(--soft); cursor: pointer; font: 500 .9rem var(--body); border-radius: var(--r-sm); padding: 3px 8px; flex: none; min-height: 32px; }
.nb-next:hover, .nb-close:hover { color: #fff; border-color: var(--edge-hi); }
.nb-close { font-size: 1.2rem; line-height: 1; padding: 2px 10px; }

/* Prezentare serverfile (dialog, site + panel) */
.pres-dlg { background: var(--glass), var(--ink-1); color: var(--text); border: 1px solid var(--edge-hi); border-radius: var(--r-xl);
  padding: 0; width: min(900px, calc(100vw - 20px)); max-height: calc(100vh - 32px); box-shadow: 0 50px 120px -40px rgba(0,0,0,.95); }
.pres-dlg::backdrop { background: rgba(4,5,7,.8); backdrop-filter: blur(6px); }
.pres-box { padding: 22px 24px 26px; }
.pres-box .ps-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.pres-box h2 { font-size: 1.8rem; margin: 0; }
.pres-video { position: relative; aspect-ratio: 16 / 9; background: #000; border: 1px solid var(--edge); border-radius: var(--r-lg); overflow: hidden; margin-bottom: 16px; }
.pres-video iframe, .pres-video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pres-text { color: var(--soft); max-width: 72ch; }
.pres-text ul { padding-left: 1.2em; display: grid; gap: .3em; margin: 0 0 1em; }
.pres-text li::marker { color: var(--ember-hi); }
.pres-empty { color: var(--muted); }

/* Galerie + imagine mare */
.pres-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 16px; }
.pres-thumb { padding: 0; border: 1px solid var(--edge-hi); border-radius: var(--r-md); overflow: hidden; aspect-ratio: 4 / 3; cursor: zoom-in; background: var(--deep); }
.pres-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s var(--ease); }
.pres-thumb:hover { border-color: var(--ember-hi); }
.pres-thumb:hover img { transform: scale(1.05); }
.lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(4,5,7,.95); display: grid; place-items: center; padding: 48px 56px; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 110px); border: 1px solid var(--edge-hi); border-radius: var(--r-md); box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.lightbox button { position: absolute; background: rgba(20,22,28,.92); color: var(--text); border: 1px solid var(--edge-hi); border-radius: 50%; width: 44px; height: 44px; font: 400 1.6rem/1 var(--body); cursor: pointer; }
.lightbox button:hover { border-color: var(--ember-soft); color: var(--ember-soft); }
.lb-close { top: 14px; right: 14px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); color: var(--soft); font-size: .95rem; }
@media (max-width: 600px) { .lightbox { padding: 56px 8px; } .lb-prev, .lb-next { top: auto; bottom: 8px; transform: none; } }
@media (max-width: 600px) { .frame-in { padding: 20px 18px 22px; } .win-title { margin: -20px -18px 16px; } .frame { border-radius: var(--r-lg); } .win-title { border-radius: var(--r-lg) var(--r-lg) 0 0; } }
