/* TENNET Clean Telecom v1.1: design system (tokens, base, components) for the Blade views.
   Brand board: docs/design/ghid-identitate-vizuala.png. Page layout and sections live in site.css.
   Fonts ship STATIC weights only: Manrope 600/700/800 (display), DM Sans 400/500/700 (text).
   The logo is always the client's original PNG. */
:root {
  /* Brand */
  --tn-red: #e90f18;          /* accent only (75% white / 15% grey / 8% graphite / 2% red) */
  --tn-red-dark: #c00b13;     /* hover; red text on #F6F7F9 */
  --tn-red-tint: #fff1f1;
  --tn-red-tint-2: #fce2e3;
  --tn-ink: #231f1d;
  --tn-text: #3c424b;
  --tn-muted: #69717d;
  --tn-white: #fff;
  --tn-graphite: #231f1d;     /* dark bands: topbar, footer */
  --tn-surface: #fff;         /* card / panel background (dark theme overrides it) */
  --tn-soft: #f6f7f9;
  --tn-soft-2: #eef0f3;       /* tertiary button */
  --tn-soft-3: #e3e6ea;       /* tertiary hover */
  --tn-border: #e5e7eb;
  --tn-border-strong: #868e99; /* inputs and checkboxes (3:1 on white) */
  /* Status (board "Culori de stare") */
  --tn-success: #22c55e;
  --tn-success-text: #15803d;
  --tn-info: #3b82f6;
  --tn-warning: #f59e0b;
  --tn-danger: #ef4444;
  --tn-danger-text: #b91c1c;
  /* Shape and depth */
  --tn-radius: 16px;          /* cards */
  --tn-radius-md: 12px;       /* menus, alerts, tables */
  --tn-radius-sm: 10px;       /* controls */
  --tn-shadow-sm: 0 4px 14px rgba(35, 31, 29, .05);
  --tn-shadow: 0 10px 30px rgba(35, 31, 29, .07);
  --tn-shadow-lg: 0 18px 40px rgba(35, 31, 29, .12);
  --tn-ring: 0 0 0 4px rgba(233, 15, 24, .18);
  /* Layout and type */
  --tn-container: 1200px;
  --tn-font: "DM Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --tn-font-display: "Manrope", "DM Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --tn-h1: clamp(2.25rem, 1.2rem + 3vw, 3.5rem);           /* 48-56px desktop */
  --tn-h2: clamp(1.75rem, 1rem + 2.2vw, 2.5rem);           /* 32-40px desktop */
  --tn-h3: clamp(1.25rem, 1rem + .6vw, 1.5rem);            /* 20-24px */
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--tn-header-h, 84px) + 12px); }
body { margin: 0; font-family: var(--tn-font); font-size: 1rem; color: var(--tn-text); background: var(--tn-white); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; }
img { display: block; height: auto; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--tn-red); }
:focus-visible { outline: 3px solid var(--tn-red); outline-offset: 3px; }
::selection { background: var(--tn-red-tint-2); color: var(--tn-ink); }
h1, h2, h3, h4 { font-family: var(--tn-font-display); color: var(--tn-ink); }
.tn-icon { flex: 0 0 auto; vertical-align: middle; }
.tn-container { width: min(calc(100% - 48px), var(--tn-container)); margin-inline: auto; }
.tn-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; }

/* ---------- Type helpers ---------- */
.tn-h2, .tn-section-heading h2 { margin: 0 0 12px; color: var(--tn-ink); font-family: var(--tn-font-display); font-size: var(--tn-h2); font-weight: 800; line-height: 1.15; letter-spacing: -.02em; }
.tn-h3 { margin: 0 0 14px; color: var(--tn-ink); font-family: var(--tn-font-display); font-size: var(--tn-h3); font-weight: 800; line-height: 1.25; letter-spacing: -.015em; }
.tn-h2--bar { margin-bottom: 20px; }
.tn-h2--bar::after, .tn-section-heading--bar h2::after { content: ""; display: block; width: 60px; height: 5px; margin-top: 12px; border-radius: 3px; background: var(--tn-red); }
.tn-lead { margin: 0 0 24px; color: var(--tn-text); font-size: 1.125rem; line-height: 1.6; }
.tn-eyebrow { display: inline-block; margin-bottom: 16px; color: var(--tn-red-dark); font-family: var(--tn-font-display); font-size: .875rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.tn-accent-bar { display: block; width: 76px; height: 5px; margin: 0 0 24px; border-radius: 3px; background: var(--tn-red); }
.tn-link { color: var(--tn-red-dark); font-weight: 700; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.tn-link:hover { color: var(--tn-red-dark); text-decoration-thickness: 2px; }
.tn-link-arrow { display: inline-flex; align-items: center; gap: 6px; color: var(--tn-red); font-family: var(--tn-font-display); font-weight: 700; }
.tn-link-arrow:hover { color: var(--tn-red-dark); }
.tn-link-arrow .tn-icon { transition: transform .18s; }
.tn-link-arrow:hover .tn-icon { transform: translateX(3px); }
.tn-link-arrow--back:hover .tn-icon { transform: translateX(-3px); }
.tn-empty { color: var(--tn-muted); }

/* ---------- Buttons (board: principal / secundar / terțiar) ---------- */
.tn-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 11px 22px; border: 1.5px solid transparent; border-radius: var(--tn-radius-sm); font-family: var(--tn-font-display); font-size: .95rem; font-weight: 700; line-height: 1.2; letter-spacing: -.005em; text-align: center; transition: background-color .18s, border-color .18s, color .18s, transform .18s, box-shadow .18s; }
.tn-btn:hover { transform: translateY(-1px); }
.tn-btn .tn-icon { margin-inline: -2px; }
.tn-btn:disabled, .tn-btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }
.tn-btn.is-loading { opacity: .75; cursor: progress; transform: none; }
.tn-btn--block { width: 100%; }
.tn-btn--primary { background: var(--tn-red); color: #fff; border-color: var(--tn-red); }
.tn-btn--primary:hover { background: var(--tn-red-dark); border-color: var(--tn-red-dark); color: #fff; }
.tn-btn--outline { background: var(--tn-surface); border-color: var(--tn-red); color: var(--tn-red); }
.tn-btn--outline:hover { background: var(--tn-red-tint); border-color: var(--tn-red-dark); color: var(--tn-red-dark); }
.tn-btn--ghost, .tn-btn--tertiary { background: var(--tn-soft-2); border-color: var(--tn-soft-2); color: var(--tn-ink); }
.tn-btn--ghost:hover, .tn-btn--tertiary:hover { background: var(--tn-soft-3); border-color: var(--tn-soft-3); color: var(--tn-ink); }
.tn-btn--sm { min-height: 40px; padding: 8px 16px; font-size: .875rem; }
.tn-section--soft .tn-btn--outline { color: var(--tn-red-dark); border-color: var(--tn-red-dark); }

/* Chip buttons (404 quick links, filters) */
.tn-chip-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 18px; border: 1px solid var(--tn-border); border-radius: 999px; background: var(--tn-surface); color: var(--tn-ink); font-family: var(--tn-font-display); font-size: .9375rem; font-weight: 700; transition: border-color .18s, color .18s, background-color .18s; }
.tn-chip-link:hover { border-color: var(--tn-red); background: var(--tn-red-tint); color: var(--tn-red-dark); }
.tn-chip { display: inline-flex; gap: 8px; align-items: center; padding: 8px 14px; border-radius: 999px; background: var(--tn-red-tint); color: var(--tn-ink); }
.tn-chip .tn-icon { color: var(--tn-red); }

/* ---------- Badges (board: Popular / Nou / Promoție) ---------- */
.tn-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 14px; border-radius: 999px; background: var(--tn-red); color: #fff; font-family: var(--tn-font-display); font-size: .875rem; font-weight: 700; line-height: 1.4; white-space: nowrap; }
.tn-badge--popular { background: var(--tn-red); color: #fff; }
.tn-badge--new { background: var(--tn-success-text); color: #fff; }
.tn-badge--promo { background: var(--tn-border); color: var(--tn-ink); }
a.tn-badge:hover { color: #fff; filter: brightness(.94); }
a.tn-badge--promo:hover { color: var(--tn-ink); background: var(--tn-soft-3); filter: none; }

/* ---------- Alerts (board: tinted background, coloured icon, ink text) ---------- */
.tn-alert { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 20px; padding: 14px 16px; border: 1px solid; border-radius: var(--tn-radius-md); color: var(--tn-ink); }
.tn-alert > .tn-icon { margin-top: 1px; }
.tn-alert p { margin: 0; }
.tn-alert__title { font-family: var(--tn-font-display); font-weight: 700; }
.tn-alert--success { background: #f0fdf4; border-color: #bbf7d0; }
.tn-alert--success > .tn-icon { color: var(--tn-success); }
.tn-alert--error { background: #fef2f2; border-color: #fecaca; }
.tn-alert--error > .tn-icon { color: var(--tn-danger); }
.tn-alert--info { background: #eff6ff; border-color: #bfdbfe; }
.tn-alert--info > .tn-icon { color: var(--tn-info); }
.tn-alert--warning { background: #fffbeb; border-color: #fde68a; }
.tn-alert--warning > .tn-icon { color: var(--tn-warning); }
.tn-alert:focus { outline: none; }
.tn-alert:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(35, 31, 29, .1); }

/* ---------- Forms ---------- */
.tn-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.tn-fieldset { margin: 0 0 24px; padding: 0; border: 0; min-width: 0; }
.tn-fieldset legend { margin-bottom: 12px; padding: 0; color: var(--tn-ink); font-family: var(--tn-font-display); font-size: 1.0625rem; font-weight: 700; }
.tn-field { display: flex; flex-direction: column; gap: 6px; }
.tn-field--full { grid-column: 1 / -1; }
.tn-field label { color: var(--tn-ink); font-size: .9375rem; font-weight: 700; }
.tn-req { color: var(--tn-red-dark); }
.tn-optional { color: var(--tn-muted); font-size: .875rem; font-weight: 500; }
.tn-input { width: 100%; min-height: 48px; padding: 11px 14px; border: 1px solid var(--tn-border-strong); border-radius: var(--tn-radius-sm); background: var(--tn-surface); color: var(--tn-ink); transition: border-color .15s, box-shadow .15s; }
.tn-input::placeholder { color: var(--tn-muted); }
.tn-input:focus, .tn-input:focus-visible { border-color: var(--tn-red); outline: none; box-shadow: var(--tn-ring); }
textarea.tn-input { min-height: 96px; resize: vertical; }
.tn-input-wrap { position: relative; display: block; }
.tn-input-wrap > .tn-icon { position: absolute; left: 14px; top: 14px; color: var(--tn-muted); pointer-events: none; transition: color .15s; }
.tn-input-wrap > .tn-input { padding-left: 42px; }
.tn-input-wrap:focus-within > .tn-icon { color: var(--tn-red); }
.tn-help { color: var(--tn-muted); font-size: .875rem; }
.tn-field__error { display: inline-flex; gap: 6px; align-items: flex-start; color: var(--tn-danger-text); font-size: .875rem; font-weight: 500; }
.tn-field__error .tn-icon { margin-top: 3px; color: var(--tn-danger); }
.tn-field--invalid .tn-input { border-color: var(--tn-danger); }
.tn-field--invalid .tn-input:focus { box-shadow: 0 0 0 4px rgba(239, 68, 68, .2); }
.tn-field--invalid .tn-input-wrap > .tn-icon { color: var(--tn-danger); }

/* Checkbox (board: 20px, radius 5, red when checked) */
.tn-check__row { display: flex; gap: 12px; align-items: flex-start; }
.tn-check input[type="checkbox"] { -webkit-appearance: none; appearance: none; flex: 0 0 20px; width: 20px; height: 20px; margin: 2px 0 0; border: 1.5px solid var(--tn-border-strong); border-radius: 5px; background: var(--tn-surface) center / 14px 14px no-repeat; cursor: pointer; transition: background-color .15s, border-color .15s, box-shadow .15s; }
.tn-check input[type="checkbox"]:checked { background-color: var(--tn-red); border-color: var(--tn-red); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); }
.tn-check input[type="checkbox"]:hover { border-color: var(--tn-red); }
.tn-check input[type="checkbox"]:focus-visible { outline: none; box-shadow: var(--tn-ring); }
.tn-check label { color: var(--tn-text); font-size: .9375rem; font-weight: 500; line-height: 1.5; cursor: pointer; }
.tn-check label a { color: var(--tn-red-dark); text-decoration: underline; text-underline-offset: 3px; }
.tn-field--invalid.tn-check input[type="checkbox"] { border-color: var(--tn-danger); box-shadow: 0 0 0 3px rgba(239, 68, 68, .25); }
.tn-hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Cards ---------- */
.tn-card { padding: 32px; background: var(--tn-surface); border: 1px solid var(--tn-border); border-radius: var(--tn-radius); box-shadow: var(--tn-shadow); }

/* Service card (board "Card serviciu") */
.tn-service-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.tn-service-card { position: relative; display: flex; flex-direction: column; overflow: hidden; padding: 32px; border: 1px solid var(--tn-border); border-radius: var(--tn-radius); background: radial-gradient(130% 100% at 100% 0%, var(--tn-red-tint-2) 0%, var(--tn-red-tint) 30%, var(--tn-surface) 62%); box-shadow: var(--tn-shadow-sm); transition: transform .18s, box-shadow .18s, border-color .18s; }
.tn-service-card:hover { transform: translateY(-2px); border-color: var(--tn-red-tint-2); box-shadow: var(--tn-shadow-lg); }
.tn-service-card__icon { display: inline-flex; margin-bottom: 20px; color: var(--tn-red); }
.tn-service-card h3 { margin: 0 0 10px; color: var(--tn-ink); font-family: var(--tn-font-display); font-size: var(--tn-h3); font-weight: 800; line-height: 1.25; letter-spacing: -.015em; }
.tn-service-card p { flex: 1 1 auto; margin: 0 0 20px; color: var(--tn-text); }
.tn-service-card a { display: inline-flex; align-items: center; gap: 6px; color: var(--tn-red); font-family: var(--tn-font-display); font-weight: 700; }
.tn-service-card a::before { content: ""; position: absolute; inset: 0; }
.tn-service-card a:hover { color: var(--tn-red-dark); }
.tn-service-card a .tn-icon { transition: transform .18s; }
.tn-service-card:hover a .tn-icon { transform: translateX(3px); }

/* ---------- Plans (board "Card abonament") ---------- */
.tn-plans { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; align-items: stretch; padding-top: 16px; }
.tn-plans--count-1 { grid-template-columns: minmax(0, 1fr); max-width: 360px; margin-inline: auto; }
.tn-plans--count-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 760px; margin-inline: auto; }
.tn-plans--count-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 1000px; margin-inline: auto; }
.tn-plans--count-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tn-plan { position: relative; display: flex; flex-direction: column; align-items: center; min-width: 0; padding: 28px 18px 22px; background: var(--tn-surface); border: 1px solid var(--tn-border); border-radius: var(--tn-radius); box-shadow: var(--tn-shadow); text-align: center; }
.tn-plan h3, .tn-plan .tn-plan__name { margin: 0 0 14px; color: var(--tn-ink); font-family: var(--tn-font-display); font-size: 1.25rem; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; }
.tn-plan__speedrow { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 0 4px; }
.tn-plan__gauge { width: 40px; height: 40px; color: var(--tn-red); }
.tn-plan__speed { margin: 0; color: var(--tn-ink); font-family: var(--tn-font-display); font-size: clamp(1.75rem, 2.3vw, 2rem); font-weight: 800; line-height: 1.15; letter-spacing: -.03em; white-space: nowrap; }
.tn-plan__speed small { font-size: .55em; font-weight: 600; letter-spacing: 0; }
.tn-plan__meta { margin: 0 0 16px; color: var(--tn-muted); font-size: .875rem; line-height: 1.4; text-align: center; }
.tn-plan__desc { margin: 0 0 12px; color: var(--tn-muted); font-size: .9375rem; line-height: 1.45; }
.tn-plan__features { width: 100%; margin: 0 0 16px; padding: 0; list-style: none; color: var(--tn-text); font-size: .875rem; text-align: left; }
.tn-plan__features li { display: flex; gap: 8px; align-items: flex-start; padding: 3px 0; }
.tn-plan__features .tn-icon { margin-top: 3px; color: var(--tn-red); }
.tn-plan-price { margin: auto 0 0; color: var(--tn-red); font-family: var(--tn-font-display); font-size: clamp(2.1rem, 2.8vw, 2.4rem); font-weight: 800; line-height: 1.15; letter-spacing: -.03em; }
.tn-plan-price small { color: var(--tn-ink); font-size: 1.05rem; font-weight: 600; letter-spacing: 0; }
.tn-plan-price__ask { color: var(--tn-ink); font-size: 1.25rem; }
.tn-plan__fee { margin: 4px 0 0; color: var(--tn-muted); font-size: .875rem; }
.tn-plan .tn-btn { width: 100%; margin-top: 16px; padding-inline: 8px; }
.tn-plan__badge { position: absolute; top: -15px; left: 50%; transform: translateX(-50%); border: 2px solid #fff; }
.tn-plan--featured { background: var(--tn-red); border-color: var(--tn-red); box-shadow: 0 18px 40px rgba(233, 15, 24, .28); }
.tn-plan--featured .tn-plan__name, .tn-plan--featured .tn-plan__speed, .tn-plan--featured .tn-plan__meta, .tn-plan--featured .tn-plan__gauge,
.tn-plan--featured .tn-plan__desc, .tn-plan--featured .tn-plan__features, .tn-plan--featured .tn-plan__features .tn-icon,
.tn-plan--featured .tn-plan-price, .tn-plan--featured .tn-plan-price small, .tn-plan--featured .tn-plan-price__ask, .tn-plan--featured .tn-plan__fee { color: #fff; }
.tn-plan--featured .tn-btn { background: #fff; border-color: #fff; color: var(--tn-red); }
.tn-plan--featured .tn-btn:hover { background: var(--tn-red-tint); border-color: var(--tn-red-tint); color: var(--tn-red-dark); }
.tn-plan--featured .tn-btn:focus-visible { outline-color: #fff; }
.tn-price-note { margin-top: 24px; color: var(--tn-muted); font-size: .875rem; text-align: center; }
.tn-price-note p { margin: 0 0 4px; }

/* ---------- Notice / empty-state card ---------- */
.tn-notice-card { display: flex; gap: 20px; align-items: flex-start; max-width: 820px; margin-inline: auto; padding: 32px; background: var(--tn-surface); border: 1px solid var(--tn-border); border-left: 5px solid var(--tn-red); border-radius: var(--tn-radius); box-shadow: var(--tn-shadow); }
.tn-notice-card__icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 52px; width: 52px; height: 52px; border-radius: var(--tn-radius-md); background: var(--tn-red-tint); color: var(--tn-red); }
.tn-notice-card__title { margin: 0 0 6px; color: var(--tn-ink); font-family: var(--tn-font-display); font-size: 1.25rem; font-weight: 800; letter-spacing: -.015em; }
.tn-notice-card p { margin: 0 0 8px; }
.tn-notice-card__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }

/* ---------- Responsive (components) ---------- */
@media (min-width: 1200px) {
  /* Five across: the meta line ("Download / 1.000 Mbps Upload") stays on one line */
  .tn-plans--count-5 { gap: 12px; }
  .tn-plans--count-5 .tn-plan { padding-inline: 12px; }
  .tn-plans--count-5 .tn-plan__meta { white-space: nowrap; }
}
@media (min-width: 768px) and (max-width: 1199px) {
  .tn-plans--count-5 { display: flex; flex-wrap: wrap; justify-content: center; }
  .tn-plans--count-5 .tn-plan { flex: 0 1 calc((100% - 32px) / 3); }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .tn-plans--count-3, .tn-plans--count-4, .tn-plans--count-5 { display: flex; flex-wrap: wrap; justify-content: center; max-width: none; }
  .tn-plans--count-3 .tn-plan, .tn-plans--count-4 .tn-plan, .tn-plans--count-5 .tn-plan { flex: 0 1 calc((100% - 16px) / 2); }
  .tn-service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .tn-container { width: min(calc(100% - 32px), var(--tn-container)); }
  .tn-plans, .tn-plans--count-2, .tn-plans--count-3, .tn-plans--count-4 { grid-template-columns: 1fr; gap: 24px; }
  .tn-plan { padding: 28px 24px 24px; }
  .tn-service-grid { grid-template-columns: 1fr; gap: 16px; }
  .tn-service-card, .tn-card { padding: 24px; }
}
@media (max-width: 479px) {
  .tn-form-grid { grid-template-columns: 1fr; }
  .tn-field--full { grid-column: auto; }
  .tn-notice-card { flex-direction: column; padding: 24px; }
  .tn-notice-card__actions .tn-btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
