/* ==========================================================================
   Personal Data Training — base: tokens, fonturi, reset, tipografie, layout,
   butoane, atmosferă, reveal-uri scroll-driven, view transitions.
   ========================================================================== */

@font-face { font-family: "Bricolage"; src: url("../fonts/bricolage-latin.woff2") format("woff2"); 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+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Bricolage"; src: url("../fonts/bricolage-latin-ext.woff2") format("woff2"); font-weight: 200 800; font-display: swap; unicode-range: U+0100-02AF, U+0218-021B, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-ext.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0100-02AF, U+0218-021B, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

@property --shine { syntax: "<percentage>"; inherits: false; initial-value: -60%; }

:root {
	/* Paletă — derivată din logo: albastru #4154F1, bleumarin #012970, oranj. */
	--blue: #4154f1;
	--blue-600: #2f40d6;
	--blue-100: #e7eafe;
	--navy: #012970;
	--navy-900: #06143d;
	--ink: #0b1640;
	--ink-2: #45507a;
	--ink-3: #6b7499;
	--orange: #e25a2c;
	--orange-700: #a63d14;
	--orange-100: #fdebe3;
	--green: #0f8a4a;
	--bg: #f6f7fb;
	--surface: #ffffff;
	--surface-2: #fbfbfe;
	--line: rgb(1 41 112 / 0.1);
	--line-strong: rgb(1 41 112 / 0.18);
	--focus: #ff7a3d;

	/* Degradé doar pentru linii fine (2px); textele folosesc culori solide. */
	--grad-brand: linear-gradient(90deg, var(--orange), var(--blue));

	/* Tipografie */
	--font-display: "Bricolage", "Inter", ui-sans-serif, system-ui, sans-serif;
	--font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
	--text-sm: 0.9375rem;
	--text-base: clamp(1.0625rem, 1rem + 0.2vw, 1.125rem);
	--text-lg: clamp(1.15rem, 1.05rem + 0.4vw, 1.3rem);
	/* Scara titlurilor — singurele mărimi permise: h1 pagină, h2 secțiune, h2s subsecțiune, h3 card. */
	--h3: clamp(1.2rem, 1.1rem + 0.45vw, 1.45rem);
	--h2s: clamp(1.5rem, 1.25rem + 1vw, 2rem);
	--h2: clamp(1.9rem, 1.35rem + 2.2vw, 3.1rem);
	--h1: clamp(2.5rem, 1.5rem + 4.4vw, 5rem);
	/* Telefon: vezi regula de mai jos (max-width: 660px). */

	/* Spațiere & formă */
	--container: 1280px;
	--gutter: clamp(1.1rem, 0.6rem + 2.4vw, 2.5rem);
	--section: clamp(3.5rem, 2.5rem + 3.5vw, 6rem);
	/* Raza maximă pe tot site-ul este 18px (butoane, carduri, câmpuri, imagini). Singura formă rotundă rămasă este portretul din inelul animat. */
	--r-sm: 10px;
	--r-md: 18px;
	--r-lg: 18px;
	--r-xl: 18px;
	--shadow-sm: 0 1px 2px rgb(6 20 61 / 0.06), 0 2px 8px rgb(6 20 61 / 0.04);
	--shadow-md: 0 2px 4px rgb(6 20 61 / 0.04), 0 12px 32px -8px rgb(6 20 61 / 0.12);
	--shadow-lg: 0 18px 48px -18px rgb(1 41 112 / 0.22);

	/* Mișcare */
	--ease-out: cubic-bezier(0.16, 1, 0.3, 1);
	--ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
	--fast: 160ms;
	--normal: 320ms;

	color-scheme: light;
	accent-color: var(--blue);
	interpolate-size: allow-keywords;
}
/* Pe telefon, titlul de pagină e mai mic: un titlu scurt încape pe un rând în loc să se rupă în două. */
@media (max-width: 660px) { :root { --h1: clamp(2rem, 9vw, 2.25rem); } }

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 6rem; overflow-x: clip; }
body {
	margin: 0;
	min-height: 100dvh;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: var(--text-base);
	line-height: 1.65;
	font-feature-settings: "cv11", "ss01";
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-x: clip;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--blue-600); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--navy); }
/* Fără text-wrap: balance / pretty: textul umple rândul și se rupe doar când nu mai încape. */
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--navy); line-height: 1.05; letter-spacing: -0.025em; font-weight: 700; margin: 0 0 0.5em; }
p { margin: 0 0 1em; }
/* Un cuvânt cu cratimă („AI-ul”) nu se rupe la capăt de rând. */
.nb { white-space: nowrap; }
ul, ol { padding-left: 1.2em; }
::selection { background: var(--blue); color: #fff; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.site-main:focus { outline: none; }

.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: fixed; top: 0.75rem; left: 0.75rem; z-index: 1000; padding: 0.75rem 1.1rem; background: var(--navy); color: #fff; border-radius: var(--r-sm); transform: translateY(-160%); transition: transform var(--normal) var(--ease-out); }
.skip-link:focus { transform: none; color: #fff; }

/* ---------- Layout ---------- */
.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.container--narrow { width: min(100% - 2 * var(--gutter), 760px); }
.section { padding-block: var(--section); position: relative; }
.section--tight { padding-block: clamp(2.5rem, 2rem + 3vw, 5rem); }

/* ---------- Tipografie utilitară ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 0.6rem; margin: 0 0 1.1rem; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--blue-600); }
.eyebrow__dot { width: 28px; height: 2px; background: var(--orange); }
.eyebrow--light { color: #c9d0ff; }
/* Titlurile și textele introductive nu au lățime maximă artificială: se rup doar când nu încap pe un rând. */
.section-title { font-size: var(--h2); }
.section-title em { font-style: normal; color: var(--blue); }
.section-intro { font-size: var(--text-lg); color: var(--ink-2); }
.section-head { margin-bottom: clamp(1.75rem, 1.4rem + 1.4vw, 2.75rem); }
.section-head > :last-child { margin-bottom: 0; }
.page-title { font-size: var(--h1); letter-spacing: -0.04em; }
.page-lead { font-size: var(--text-lg); color: var(--ink-2); }
.page-lead p:last-child { margin-bottom: 0; }

/* ---------- Butoane ---------- */
.btn {
	--btn-bg: var(--surface);
	--btn-fg: var(--navy);
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	min-height: 48px;
	padding: 0.75rem 1.4rem;
	border: 1px solid transparent;
	border-radius: var(--r-md);
	background: var(--btn-bg);
	color: var(--btn-fg);
	font-weight: 600;
	font-size: 1rem;
	line-height: 1.2;
	text-decoration: none;
	isolation: isolate;
	overflow: hidden;
	transition: transform var(--normal) var(--ease-spring), box-shadow var(--normal) var(--ease-out), background-color var(--fast);
	transform: translate(var(--mx-btn, 0), var(--my-btn, 0));
}
.btn:hover { color: var(--btn-fg); }
.btn:active { transform: translate(var(--mx-btn, 0), var(--my-btn, 0)) scale(0.97); }
.btn__icon { display: inline-flex; transition: transform var(--normal) var(--ease-spring); }
.btn:hover .btn__icon { transform: translateX(4px); }
.btn--primary { --btn-bg: var(--blue); --btn-fg: #fff; box-shadow: 0 6px 16px -8px rgb(65 84 241 / 0.55); }
.btn--primary:hover { --btn-bg: var(--blue-600); box-shadow: 0 10px 22px -10px rgb(65 84 241 / 0.6); }
.btn--ghost { --btn-bg: rgb(255 255 255 / 0.6); border-color: var(--line-strong); backdrop-filter: blur(10px); }
.btn--ghost:hover { --btn-bg: #fff; border-color: var(--blue); }
.btn--sm { min-height: 40px; padding: 0.5rem 1rem; font-size: 0.9375rem; }
.btn--lg { min-height: 56px; padding: 0.9rem 1.7rem; font-size: 1.05rem; }
.btn--block { width: 100%; }
/* Pe telefon, butoanele din conținut ocupă toată lățimea: aceeași lățime și aceeași margine peste tot. */
@media (max-width: 660px) { .btn:not(.btn--sm) { width: 100%; } }
.btn--shine::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(105deg, transparent 35%, rgb(255 255 255 / 0.45) 50%, transparent 65%);
	transform: translateX(var(--shine));
	transition: --shine 700ms var(--ease-out);
}
.btn--shine:hover::after { --shine: 60%; }
.btn[disabled], .is-loading .pform__submit { opacity: 0.7; pointer-events: none; }

.icon-btn { display: grid; place-items: center; width: 48px; height: 48px; border-radius: var(--r-md); border: 1px solid var(--line-strong); background: var(--surface); color: var(--navy); transition: transform var(--normal) var(--ease-spring), background var(--fast), color var(--fast); }
.icon-btn:hover { background: var(--navy); color: #fff; transform: scale(1.06); }
.icon-btn[data-dir="-1"] svg { transform: scaleX(-1); }

.link-arrow { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 600; color: var(--navy); text-decoration: none; }
.link-arrow svg { transition: transform var(--normal) var(--ease-spring); }
.link-arrow:hover svg { transform: translateX(5px); }

/* ---------- Etichetă de metadate: același stil peste tot ---------- */
.label, .course-card__meta dt, .facts dt, .summary__list dt, .info-card__title, .contact-card__label, .stat__label, .method__n {
	font-family: var(--font-body);
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ink-3);
	line-height: 1.4;
}

/* ---------- Kicker & semnal (metadate tipografice, fără badge-uri) ---------- */
.kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.6rem; margin: 0; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--blue-600); }
/* Separatorul este un punct: bara „/” rămâne doar a navigării ierarhice de deasupra. */
.kicker > * + *::before { content: "·"; margin-right: 0.6rem; opacity: 0.55; font-weight: 700; }
.kicker a { color: inherit; text-decoration: none; transition: color var(--fast); }
.kicker a:hover { color: var(--blue); }
.kicker--lg { font-size: 0.75rem; margin-bottom: 1.25rem; color: var(--ink-3); }
/* Telefon: aria și limba pe un rând, starea înscrierilor pe rândul ei, la orice curs. */
@media (max-width: 660px) { .kicker--lg .signal { flex-basis: 100%; } }

.signal { display: inline-flex; align-items: center; gap: 0.6rem; font-size: 0.8125rem; font-weight: 600; color: var(--ink-3); }
.signal::before { content: ""; flex-shrink: 0; width: 26px; height: 2px; background: currentColor; opacity: 0.45; }
.kicker > .signal::before { margin-right: 0; }
.signal--open, .signal--anytime { color: var(--green); }
.signal--open::before, .signal--anytime::before { opacity: 1; background: linear-gradient(90deg, transparent 0 20%, #16b364 50%, transparent 80% 100%) 0 0 / 200% 100%, rgb(22 179 100 / 0.25); animation: signal-scan 1.8s linear infinite; }
.signal--full, .signal--closed { color: var(--orange-700); }
@keyframes signal-scan { to { background-position: -200% 0, 0 0; } }

/* ---------- Atmosferă: rețea fină de puncte doar în zona de sus a paginii ---------- */
.atmosphere { position: absolute; inset: 0 0 auto; height: min(100vh, 900px); z-index: -1; pointer-events: none; overflow: hidden; mask-image: linear-gradient(#000 55%, transparent); }
.atmosphere::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgb(1 41 112 / 0.06) 1px, transparent 1px); background-size: 28px 28px; mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, #000 0%, transparent 75%); }

/* ---------- Fundal animat: inelele din logo ---------- */
/* Două inele uriașe, parțial ieșite din ecran, fixe în spatele conținutului. Se rotesc lent în sensuri
   opuse și, unde browserul permite, puțin în plus odată cu derularea. Doar transform/rotate, fără blur. */
.bg-rings { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-rings__item { position: absolute; width: var(--ring-size); aspect-ratio: 1; opacity: 0.03; }
.bg-rings__item--a { --ring-size: 125vmin; left: 0; bottom: 0; translate: -40% 44%; }
.bg-rings__item--b { --ring-size: 95vmin; right: 0; top: 50%; translate: 54% -22%; }
.bg-rings__svg { display: block; width: 100%; height: 100%; }
/* Segmentele nu pulsează aici (pulsul e doar al inelului din hero). */
.bg-rings .data-ring .seg { animation: none; }
@media (prefers-reduced-motion: no-preference) {
	.bg-rings__svg { will-change: transform; animation: spin 260s linear infinite; }
	.bg-rings__item--b .bg-rings__svg { animation-duration: 320s; animation-direction: reverse; }
	@supports (animation-timeline: scroll()) {
		.bg-rings__item { animation: bg-rings-scroll linear both; animation-timeline: scroll(root); }
		.bg-rings__item--b { animation-direction: reverse; }
	}
}
@keyframes bg-rings-scroll { to { rotate: 150deg; } }
@media (max-width: 660px) {
	.bg-rings__item--a { --ring-size: 150vmin; translate: -45% 40%; }
	.bg-rings__item--b { display: none; }
}
@media print { .bg-rings { display: none; } }

/* ---------- Suprafețe ---------- */
.surface { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(1.4rem, 1rem + 2vw, 2.5rem); }

/* ---------- Reveal la scroll (CSS scroll-driven, fără JS) ---------- */
@media (prefers-reduced-motion: no-preference) {
	@supports (animation-timeline: view()) {
		[data-reveal] {
			animation: reveal linear both;
			animation-timeline: view();
			animation-range: entry 0% cover 20%;
		}
	}
	/* Fallback JS (Firefox): main.js adaugă .is-in prin IntersectionObserver. */
	@supports not (animation-timeline: view()) {
		.js [data-reveal]:not(.is-in) { opacity: 0; transform: translateY(20px); }
		.js [data-reveal] { transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-out); }
	}

	@view-transition { navigation: auto; }
}
::view-transition-old(root) { animation: 260ms var(--ease-out) both vt-out; }
::view-transition-new(root) { animation: 520ms var(--ease-out) both vt-in; }
::view-transition-group(*) { animation-duration: 560ms; animation-timing-function: var(--ease-out); }

/* ---------- Keyframes ---------- */
@keyframes reveal { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes ping { 0% { transform: scale(0.6); opacity: 1; } 80%, 100% { transform: scale(1.8); opacity: 0; } }
@keyframes vt-out { to { opacity: 0; transform: translateY(-8px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(14px); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Mișcare redusă: fără animații decorative ---------- */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
