/* ─────────────────────────────────────────────────────────────
   Wolfie Spaces · sistemul "liquid glass" în alb
   Tokenuri, fundal, sticlă, butoane, câmpuri. Folosit de toate paginile.
   ───────────────────────────────────────────────────────────── */

@font-face {
  font-family: 'Jakarta';
  src: url('/fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2') format('woff2-variations');
  font-weight: 200 800;
  font-display: swap;
  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: 'Jakarta';
  src: url('/fonts/plus-jakarta-sans-latin-wght-normal.woff2') format('woff2-variations');
  font-weight: 200 800;
  font-display: swap;
  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;
}

:root {
  color-scheme: light;
  --font: 'Jakarta', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* cerneală (text) */
  --ink: #0e1a2b;
  --ink-2: #344256;
  --muted: #5a6577;
  --faint: #8b95a5;

  /* brand */
  --navy: #0b1d3a;
  --navy-2: #16305a;
  --gold: #f2b705;
  --gold-soft: #ffe69a;
  --gold-ink: #7a5300;

  /* stări */
  --ok: #0f8a5f;
  --ok-bg: #dff7ec;
  --warn: #8a5a00;
  --warn-bg: #fff2cc;
  --bad: #c0362c;
  --bad-bg: #fde4e1;
  --info: #1d5fd1;
  --info-bg: #e3edff;

  /* fundal și sticlă */
  --bg: #f4f6fb;
  --glass-top: rgba(255, 255, 255, 0.74);
  --glass-bottom: rgba(255, 255, 255, 0.42);
  --glass-solid: rgba(255, 255, 255, 0.94);
  --glass-line: rgba(255, 255, 255, 0.8);
  --hair: rgba(14, 26, 43, 0.08);
  --hair-2: rgba(14, 26, 43, 0.14);
  --blur: 26px;

  --r-sm: 10px;
  --r: 14px;
  --r-lg: 22px;
  --r-xl: 30px;

  --shadow-sm: 0 1px 2px rgba(16, 32, 64, 0.06), 0 6px 18px -10px rgba(16, 32, 64, 0.22);
  --shadow: 0 1px 2px rgba(16, 32, 64, 0.06), 0 22px 50px -24px rgba(16, 32, 64, 0.32);
  --shadow-lg: 0 2px 4px rgba(16, 32, 64, 0.05), 0 40px 90px -36px rgba(16, 32, 64, 0.42);
  --ring: 0 0 0 3px rgba(242, 183, 5, 0.45);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
/* Ca o aplicație: fără zoom cu două degete sau dublu-tap și fără alunecare stânga-dreapta.
   (pe iPhone, zoomul cu două degete îl oprește și assets/js/native.js) */
html {
  -webkit-text-size-adjust: 100%;
  touch-action: pan-x pan-y;
  overflow-x: hidden;
}
body {
  overflow-x: hidden;
  overflow-x: clip; /* clip nu strică position: sticky; hidden rămâne pentru Safari mai vechi de 16 */
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
img, svg, video { display: block; max-width: 100%; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
/* Pe telefon, iPhone mărește pagina când atingi un câmp cu scris sub 16px și nu o mai micșorează */
@media (pointer: coarse) {
  input, select, textarea { font-size: 16px !important; }
}
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; font-weight: 750; }
p { margin: 0; }
:focus-visible { outline: none; box-shadow: var(--ring); }
::selection { background: rgba(242, 183, 5, 0.35); }

/* ── Fundal: pete de culoare care se mișcă lent sub sticlă ── */
.ws-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(1200px 700px at 100% -10%, #e8efff 0%, transparent 60%),
    radial-gradient(900px 600px at -10% 110%, #fff4dc 0%, transparent 60%),
    var(--bg);
}
/* Pete de culoare moi, făcute din gradient (nu din filter: blur) și fără mișcare.
   Toată sticla de deasupra le estompează: dacă s-ar mișca, browserul ar reface
   blur-ul fiecărui card la fiecare cadru, iar pagina s-ar mișca greu. */
.ws-bg i {
  position: absolute;
  width: 46vmax;
  height: 46vmax;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--c) 40%, transparent);
  transform: scale(1.4);
  opacity: 0.75;
}
.ws-bg i:nth-child(1) { --c: #bcd4ff; top: -14vmax; left: -8vmax; }
.ws-bg i:nth-child(2) { --c: #ffe0a3; bottom: -18vmax; right: -6vmax; }
.ws-bg i:nth-child(3) { --c: #e2d6ff; top: 30%; left: 40%; width: 34vmax; height: 34vmax; }
.ws-bg i:nth-child(4) { --c: #c8f1e3; bottom: -10vmax; left: -12vmax; width: 30vmax; height: 30vmax; }
.ws-bg::after {
  /* granulație fină, ca sticla să nu pară plastic */
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* Pe telefon, un blur mai mic arată la fel pe ecranul mic și costă mult mai puțin */
@media (max-width: 720px) {
  :root { --blur: 18px; }
}

/* Animațiile care se repetă la nesfârșit stau pe loc cât secțiunea lor nu e pe ecran */
.offscreen, .offscreen * { animation-play-state: paused !important; }

/* ── Sticla ── */
.glass {
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(520px circle at var(--mx, 50%) var(--my, -40%), rgb(255 255 255 / calc(0.7 * var(--spec, 0))), transparent 55%),
    radial-gradient(120% 70% at 12% -20%, rgba(255, 255, 255, 0.85), transparent 60%),
    linear-gradient(160deg, var(--glass-top), var(--glass-bottom));
  transition: --spec 0.6s var(--ease);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(175%);
  backdrop-filter: blur(var(--blur)) saturate(175%);
  border-radius: var(--r-lg);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 1px rgba(255, 255, 255, 0.35),
    var(--shadow);
}
/* margine "lichidă": un contur care prinde lumina sus-stânga și jos-dreapta */
.glass::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0.25) 38%, rgba(14, 26, 43, 0.06) 62%, rgba(255, 255, 255, 0.85));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.glass-soft {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--r);
  box-shadow: inset 0 1px 0 #fff, var(--shadow-sm);
}
.glass-strong {
  --glass-top: rgba(255, 255, 255, 0.9);
  --glass-bottom: rgba(255, 255, 255, 0.72);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: var(--glass-solid); }
}

/* ── Butoane ── */
.btn {
  --h: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--h);
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  font-weight: 650;
  font-size: 14.5px;
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: transform 0.18s var(--ease), box-shadow 0.25s var(--ease), background-color 0.2s, opacity 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn[disabled], .btn.is-busy { opacity: 0.55; pointer-events: none; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-sm { --h: 34px; padding: 0 13px; font-size: 13.5px; }
.btn-lg { --h: 52px; padding: 0 26px; font-size: 16px; }
.btn-block { width: 100%; }

.btn-primary {
  color: #fff;
  background: linear-gradient(180deg, #1b3766, var(--navy));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 10px 24px -10px rgba(11, 29, 58, 0.65);
}
.btn-primary:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 14px 30px -10px rgba(11, 29, 58, 0.75); }

.btn-gold {
  color: var(--navy);
  background: linear-gradient(180deg, #ffd34d, var(--gold));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 10px 24px -10px rgba(194, 140, 0, 0.7);
}

.btn-ghost {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.6);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9), inset 0 1px 0 #fff, var(--shadow-sm);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.btn-ghost:hover { background-color: rgba(255, 255, 255, 0.85); }

.btn-quiet { color: var(--ink-2); background: transparent; }
.btn-quiet:hover { background: rgba(14, 26, 43, 0.06); }

.btn-danger { color: #fff; background: linear-gradient(180deg, #db4a3f, var(--bad)); box-shadow: 0 10px 24px -12px rgba(192, 54, 44, 0.7); }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, transform 0.15s var(--ease);
}
.icon-btn:hover { background: rgba(14, 26, 43, 0.06); color: var(--ink); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn svg { width: 19px; height: 19px; }

/* ── Câmpuri ── */
.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.input {
  width: 100%;
  height: 46px;
  padding: 0 15px;
  border: 0;
  border-radius: var(--r);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px var(--hair-2), inset 0 2px 4px rgba(14, 26, 43, 0.04);
  font-size: 16px; /* fără zoom pe iPhone */
  transition: box-shadow 0.2s, background-color 0.2s;
}
.input::placeholder { color: var(--faint); }
.input:focus { outline: none; background: #fff; box-shadow: inset 0 0 0 1.5px var(--navy-2), var(--ring); }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 20px, calc(100% - 15px) 20px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }

/* ── Mici utilitare ── */
.muted { color: var(--muted); }
.eyebrow { font-size: 12.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-ink); }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(14, 26, 43, 0.06);
  color: var(--ink-2);
  white-space: nowrap;
}
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.info { background: var(--info-bg); color: var(--info); }
.badge.gold { background: var(--gold-soft); color: var(--gold-ink); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.kbd { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: 0.92em; letter-spacing: 0.02em; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; letter-spacing: -0.03em; font-size: 17px; }
.brand img { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 6px 16px -8px rgba(11, 29, 58, 0.7); }
.brand b { font-weight: 800; color: var(--ink); }
.brand span { font-weight: 600; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* ─────────────────────────────────────────────────────────────
   Mișcare: lumină pe sticlă, butoane, apariții. Activă doar cu
   clasa .motion pe <html> (pusă din JS, nu și la „reduce motion").
   ───────────────────────────────────────────────────────────── */
@property --spec { syntax: '<number>'; inherits: false; initial-value: 0; }
@property --tx { syntax: '<length>'; inherits: false; initial-value: 0px; }
@property --ty { syntax: '<length>'; inherits: false; initial-value: 0px; }

/* lumina care urmărește cursorul pe cardurile mici și pe butoane */
.glass-soft, .btn-ghost {
  background-image: radial-gradient(260px circle at var(--mx, 50%) var(--my, -40%), rgb(255 255 255 / calc(0.85 * var(--spec, 0))), transparent 60%);
  transition: --spec 0.5s var(--ease), transform 0.2s var(--ease), box-shadow 0.25s var(--ease), background-color 0.2s;
}
.btn-primary {
  background:
    radial-gradient(160px circle at var(--mx, 50%) var(--my, -40%), rgb(255 255 255 / calc(0.22 * var(--spec, 0))), transparent 70%),
    linear-gradient(180deg, #1b3766, var(--navy));
}
.btn-gold {
  background:
    radial-gradient(160px circle at var(--mx, 50%) var(--my, -40%), rgb(255 255 255 / calc(0.5 * var(--spec, 0))), transparent 70%),
    linear-gradient(180deg, #ffd34d, var(--gold));
}
.btn { position: relative; overflow: hidden; transition: transform 0.18s var(--ease), box-shadow 0.25s var(--ease), background-color 0.2s, opacity 0.2s, --spec 0.5s var(--ease), --tx 0.5s var(--ease), --ty 0.5s var(--ease); }

/* reflex care trece peste butoanele principale la hover */
.btn-primary::after, .btn-gold::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.32) 50%, transparent 65%);
  transform: translateX(-130%);
  pointer-events: none;
}
.motion .btn-primary:hover::after, .motion .btn-gold:hover::after { transform: translateX(130%); transition: transform 0.9s var(--ease); }

/* butoane magnetice */
.btn.magnetic { transform: translate(var(--tx), var(--ty)); }
.btn.magnetic:active { transform: translate(var(--tx), var(--ty)) scale(0.97); }

/* indicator care alunecă (perioadă, tab-uri) */
.has-glider { position: relative; isolation: isolate; }
.has-glider > .glider {
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow-sm), inset 0 1px 0 #fff;
  transition: transform 0.5s var(--ease), width 0.5s var(--ease), height 0.5s var(--ease);
}
.has-glider > button[aria-checked='true'], .has-glider > button[aria-selected='true'] { background: transparent !important; box-shadow: none !important; }

/* apariție la scroll (animație, nu tranziție: hover-ul de după nu moștenește întârzierea) */
.motion [data-reveal]:not(.in), .motion [data-reveal-stagger]:not(.in) > * { opacity: 0; }
.motion [data-reveal].in { animation: reveal-in 1s var(--ease) backwards; }
.motion [data-reveal-stagger].in > * { animation: reveal-in 0.9s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 90ms); }
[data-reveal-stagger] > :nth-child(2) { --i: 1; }
[data-reveal-stagger] > :nth-child(3) { --i: 2; }
[data-reveal-stagger] > :nth-child(4) { --i: 3; }
[data-reveal-stagger] > :nth-child(5) { --i: 4; }
[data-reveal-stagger] > :nth-child(6) { --i: 5; }
[data-reveal-stagger] > :nth-child(n + 7) { --i: 6; }
@keyframes reveal-in { from { opacity: 0; transform: translateY(30px) scale(0.98); filter: blur(8px); } }

/* bandă care curge pe barele de progres */
.shimmer { position: relative; overflow: hidden; }
.shimmer::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.65) 50%, transparent 80%);
  transform: translateX(-100%);
  animation: sweep 1.6s ease-in-out infinite;
}

@keyframes sweep { to { transform: translateX(100%); } }
@keyframes rise-in { from { opacity: 0; transform: translateY(18px) scale(0.985); filter: blur(6px); } }
@keyframes pop-in { 0% { opacity: 0; transform: scale(0.86); } 60% { opacity: 1; transform: scale(1.03); } 100% { transform: none; } }
@keyframes float-y { 50% { transform: translateY(-6px); } }

/* ── Blur: intrări și ieșiri comune ── */
@keyframes blur-in { from { opacity: 0; filter: blur(10px); transform: translateY(10px) scale(0.98); } }
@keyframes blur-out { to { opacity: 0; filter: blur(10px); transform: translateY(-8px) scale(0.98); } }
@keyframes blur-word { from { opacity: 0; filter: blur(10px); transform: translateY(0.35em); } }
@keyframes backdrop-in { from { -webkit-backdrop-filter: blur(0); backdrop-filter: blur(0); background-color: rgba(14, 26, 43, 0); } }
@keyframes backdrop-out { to { -webkit-backdrop-filter: blur(0); backdrop-filter: blur(0); background-color: rgba(14, 26, 43, 0); opacity: 0; } }
.w { display: inline-block; }
