/* ==========================================================================
   TechLoom – identitate vizuală
   Concept: războiul de țesut. Urzeala (indigo) e structura, bătătura colorată
   sunt cele trei servicii: web (roșu ie), automatizare (șofran), AI (in).
   ========================================================================== */

:root {
	--tl-indigo: #1E2A5A;
	--tl-indigo-deep: #141C40;
	--tl-ink: #161B33;
	--tl-text: #3D4361;
	--tl-muted: #646A85;
	--tl-red: #B8322A;
	--tl-red-dark: #962820;
	--tl-saffron: #E0A526;
	--tl-linen: #EDEEE9;
	--tl-paper: #F7F7F4;
	--tl-line: #D9DBD3;

	--tl-font-display: "Bricolage Grotesque", system-ui, sans-serif;
	--tl-font-body: "Instrument Sans", system-ui, sans-serif;

	/* Scară tipografică (raport ~1.25, fluidă pe ecrane mari) */
	--tl-step--1: 0.875rem;
	--tl-step-0: 1.0625rem;
	--tl-step-1: 1.3rem;
	--tl-step-2: clamp(1.5rem, 1.3rem + 0.8vw, 1.9rem);
	--tl-step-3: clamp(1.9rem, 1.5rem + 1.6vw, 2.8rem);
	--tl-step-4: clamp(2.5rem, 1.8rem + 3vw, 4.4rem);

	--tl-radius: 6px;
	--tl-measure: 66ch;
}

/* ---------- Bază ---------- */

body {
	background: var(--tl-paper);
	color: var(--tl-text);
	font-family: var(--tl-font-body);
	font-size: var(--tl-step-0);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
	font-family: var(--tl-font-display);
	color: var(--tl-ink);
	line-height: 1.08;
	letter-spacing: -0.02em;
	text-wrap: balance;
}
h1 { font-size: var(--tl-step-4); font-weight: 800; }
h2 { font-size: var(--tl-step-3); font-weight: 800; }
h3 { font-size: var(--tl-step-2); font-weight: 700; }
h4 { font-size: var(--tl-step-1); font-weight: 700; }

p { max-width: var(--tl-measure); }

a { color: var(--tl-red); text-underline-offset: 0.18em; }
a:hover { color: var(--tl-red-dark); }

:focus-visible {
	outline: 3px solid var(--tl-saffron);
	outline-offset: 3px;
	border-radius: 2px;
}

::selection { background: var(--tl-saffron); color: var(--tl-ink); }

/* Butoanele Elementor primesc aceeași formă peste tot */
.elementor-button {
	border-radius: var(--tl-radius);
	transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

/* Variantă de buton cu contur: clasa CSS „tl-btn-ghost” pe widget-ul Button */
.tl-btn-ghost .elementor-button {
	background: transparent;
	color: currentColor;
	box-shadow: inset 0 0 0 2px currentColor;
}
.tl-btn-ghost .elementor-button:hover { background: rgba(255, 255, 255, 0.08); }

/* ---------- Secțiunea întunecată (indigo) ---------- */
/* Clasa CSS „tl-dark” pe un container Elementor */

.tl-dark {
	--tl-ink: #F7F7F4;
	--tl-text: #C9CCDA;
	--tl-muted: #9EA3BD;
	background-color: var(--tl-indigo);
	color: var(--tl-text);
}
.tl-dark h1, .tl-dark h2, .tl-dark h3, .tl-dark h4,
.tl-dark .elementor-heading-title { color: var(--tl-ink); }
.tl-dark a:not(.elementor-button) { color: var(--tl-saffron); }
.tl-dark .elementor-widget-text-editor { color: var(--tl-text); }

/* ---------- Țesătura din hero: [tl_weave] ---------- */

.tl-weave {
	display: block;
	width: 100%;
	height: auto;
	overflow: visible;
}
.tl-weave__warp {
	stroke: #5D6799;
	stroke-width: 3;
	stroke-linecap: round;
}
.tl-weave__gap {
	stroke: var(--tl-indigo);
	stroke-width: 7;
}
.tl-weave__weft {
	stroke-width: 14;
	stroke-dasharray: 1;
	stroke-dashoffset: 0;
}
.tl-weave__weft--base { stroke: #2A3870; }
.tl-weave__weft--web  { stroke: var(--tl-red); }
.tl-weave__weft--rpa  { stroke: var(--tl-saffron); }
.tl-weave__weft--ai   { stroke: var(--tl-linen); }

@media (prefers-reduced-motion: no-preference) {
	.tl-weave__weft:not(.tl-weave__weft--base) {
		stroke-dashoffset: 1;
		animation: tl-weave 1.6s cubic-bezier(0.65, 0, 0.35, 1) forwards;
		animation-delay: calc(300ms + var(--tl-delay, 0ms));
	}
}
@keyframes tl-weave { to { stroke-dashoffset: 0; } }

/* ---------- Servicii ca fire: clasa „tl-thread” pe containerul fiecărui serviciu ---------- */
/* Adaugă și „tl-thread--web”, „tl-thread--rpa” sau „tl-thread--ai” pentru culoare. */

.tl-thread {
	--tl-thread: var(--tl-indigo);
	position: relative;
	border-top: 1px solid var(--tl-line);
}
.tl-thread::before {
	content: "";
	position: absolute;
	top: -1px;
	left: 0;
	width: 72px;
	height: 5px;
	background: var(--tl-thread);
}
.tl-thread--web { --tl-thread: var(--tl-red); }
.tl-thread--rpa { --tl-thread: var(--tl-saffron); }
.tl-thread--ai  { --tl-thread: var(--tl-indigo); }

/* ---------- Pași de lucru: „tl-steps” pe containerul părinte ---------- */

.tl-steps { counter-reset: tl-step; }
.tl-step { counter-increment: tl-step; }
.tl-step .elementor-heading-title::before {
	content: counter(tl-step);
	display: block;
	margin-bottom: 0.4em;
	font-size: var(--tl-step--1);
	font-family: var(--tl-font-body);
	font-weight: 600;
	color: var(--tl-red);
	letter-spacing: 0;
}

/* ---------- Pachete de preț: „tl-plan” pe fiecare container, „tl-plan--featured” pe cel recomandat ---------- */

.tl-plan {
	border: 1px solid var(--tl-line);
	border-radius: var(--tl-radius);
	background: #fff;
}
.tl-plan--featured {
	border-color: var(--tl-indigo);
	box-shadow: inset 0 5px 0 var(--tl-red);
}
.tl-plan ul {
	list-style: none;
	margin: 0;
	padding: 0;
}
.tl-plan li {
	padding: 0.45em 0 0.45em 1.4em;
	position: relative;
	border-bottom: 1px solid var(--tl-linen);
}
.tl-plan li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 1.05em;
	width: 0.7em;
	height: 2px;
	background: var(--tl-red);
}

/* ---------- Portofoliu: [tl_projects] ---------- */

.tl-projects {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
	gap: 3rem 2rem;
}
.tl-project { display: flex; flex-direction: column; }
.tl-project__media {
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	border-radius: var(--tl-radius);
	background: var(--tl-linen);
	margin-bottom: 1rem;
}
.tl-project__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}
.tl-project:hover .tl-project__media img { transform: scale(1.03); }
.tl-project__placeholder {
	display: block;
	height: 100%;
	background:
		repeating-linear-gradient(90deg, transparent 0 28px, rgba(30, 42, 90, 0.12) 28px 30px),
		var(--tl-linen);
}
.tl-project__service {
	margin: 0 0 0.3rem;
	font-size: var(--tl-step--1);
	font-weight: 600;
	color: var(--tl-red);
}
.tl-project__title {
	margin: 0 0 0.3rem;
	font-size: var(--tl-step-1);
}
.tl-project__title a { color: inherit; text-decoration: none; }
.tl-project__title a:hover { text-decoration: underline; }
.tl-project__meta { margin: 0; color: var(--tl-muted); font-size: var(--tl-step--1); }
.tl-project__result { margin: 0.6rem 0 0; color: var(--tl-ink); font-weight: 500; }
.tl-project__stack {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin: 0.9rem 0 0;
	padding: 0;
	list-style: none;
}
.tl-project__stack li {
	padding: 0.15rem 0.6rem;
	border: 1px solid var(--tl-line);
	border-radius: 99px;
	font-size: 0.8125rem;
	color: var(--tl-text);
}

/* ---------- Testimoniale: [tl_testimonials] ---------- */

.tl-quotes {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
	gap: 2.5rem;
}
.tl-quote { margin: 0; padding-left: 1.25rem; border-left: 3px solid var(--tl-saffron); }
.tl-quote blockquote { margin: 0 0 1rem; font-size: var(--tl-step-1); line-height: 1.45; color: var(--tl-ink); }
.tl-quote blockquote p { margin: 0 0 0.6em; }
.tl-quote figcaption strong { display: block; color: var(--tl-ink); }
.tl-quote figcaption span { color: var(--tl-muted); font-size: var(--tl-step--1); }

/* ---------- Comutator de limbă: [tl_lang] ---------- */

.tl-lang { display: inline-flex; gap: 0.25rem; }
.tl-lang a {
	padding: 0.2rem 0.45rem;
	border-radius: 4px;
	font-size: var(--tl-step--1);
	font-weight: 600;
	color: var(--tl-muted);
	text-decoration: none;
}
.tl-lang a[aria-current] { color: var(--tl-ink); background: var(--tl-linen); }
.tl-dark .tl-lang a[aria-current] { background: rgba(255, 255, 255, 0.12); }

/* ---------- Formular (widget Form din PRO Elements) ---------- */

.elementor-form .elementor-field-textual {
	border: 1px solid var(--tl-line);
	border-radius: var(--tl-radius);
	background: #fff;
	color: var(--tl-ink);
}
.elementor-form .elementor-field-textual:focus {
	border-color: var(--tl-indigo);
	box-shadow: 0 0 0 3px rgba(30, 42, 90, 0.15);
	outline: none;
}

.tl-empty {
	padding: 1rem 1.25rem;
	border: 1px dashed var(--tl-line);
	border-radius: var(--tl-radius);
	color: var(--tl-muted);
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ---------- Logo ---------- */

.tl-logo {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	color: var(--tl-indigo);
	font-family: var(--tl-font-display);
	font-size: 1.45rem;
	font-weight: 800;
	letter-spacing: -0.03em;
	text-decoration: none;
}
.tl-logo:hover { color: var(--tl-indigo); }
.tl-dark a.tl-logo,
.tl-dark a.tl-logo:hover { color: var(--tl-paper); }
.tl-logo__mark { flex: none; }

/* ---------- Legenda țesăturii ---------- */

.tl-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 1.4rem;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: var(--tl-step--1);
	color: var(--tl-muted);
}
.tl-legend li::before {
	content: "";
	display: inline-block;
	width: 1.6em;
	height: 0.45em;
	margin-right: 0.5em;
	vertical-align: middle;
	border-radius: 1px;
}
.tl-legend__web::before { background: var(--tl-red); }
.tl-legend__rpa::before { background: var(--tl-saffron); }
.tl-legend__ai::before  { background: var(--tl-linen); }

/* ---------- Liste ---------- */

.tl-list {
	margin: 0;
	padding: 0;
	list-style: none;
}
.tl-list li {
	padding: 0.35em 0;
	border-bottom: 1px solid var(--tl-line);
	color: var(--tl-ink);
	font-weight: 500;
}
.tl-list li:last-child { border-bottom: 0; }

/* ---------- Footer ---------- */

.tl-footer-links {
	margin: 0;
	padding: 0;
	list-style: none;
}
.tl-footer-links li { padding: 0.2em 0; }
.tl-footer .elementor-widget-text-editor p { margin-bottom: 0; }
.tl-dark .tl-footer-links a { color: var(--tl-text); text-decoration: none; }
.tl-dark .tl-footer-links a:hover { color: var(--tl-paper); text-decoration: underline; }

/* ---------- Header ---------- */

.tl-header .elementor-nav-menu--main .elementor-item { padding-top: 10px; padding-bottom: 10px; }

/* ---------- Conținut provizoriu, de înlocuit ---------- */

.tl-todo {
	padding: 0.05em 0.35em;
	border-radius: 3px;
	background: var(--tl-saffron);
	color: var(--tl-ink);
	font-size: 0.9em;
}
