/* ==========================================================================
   v2 compatibility skin for the inner pages (EN + RO).
   Loaded after main.css (Tailwind) and w4f.css, before nothing else.
   The pages keep their markup; this moves them onto the v2 look:
   Inter Tight, medium-weight tight headlines, pill buttons, rounded cards.
   Only applies to body.w4.legacy, so the v2 header, CTA and footer are untouched.
   ========================================================================== */

body.w4.legacy {
    --w4-ink: #0b0b0c;
    --w4-ink-2: #161618;
    --w4-ink-3: #232326;
    --w4-paper: #f4f4f2;
    --w4-font: 'Inter Tight', 'Helvetica Neue', Arial, sans-serif;
    --w4-serif: var(--w4-font);
    --w4-wide: 100%;
    --w4-radius: 20px;
    --w4-radius-sm: 12px;
    font-family: var(--w4-font);
    font-size: 17px;
    background: #fff;
}
body.w4.legacy main { padding-top: 84px; overflow-x: clip; }

/* ---------- Headlines: medium weight, tight, no stretched width ---------- */
body.w4.legacy main h1,
body.w4.legacy main h2,
body.w4.legacy .w4-display,
body.w4.legacy .w4-h2,
body.w4.legacy .w4-cta-title { font-weight: 500; font-stretch: 100%; letter-spacing: -.035em; }
body.w4.legacy main h1 { line-height: 1.02; letter-spacing: -.04em; }
body.w4.legacy main h2 { line-height: 1.05; }
body.w4.legacy main h3, body.w4.legacy .w4-h3 { font-weight: 500; font-stretch: 100%; letter-spacing: -.02em; }
body.w4.legacy main h4 { font-weight: 600; }
body.w4.legacy .w4-hero h1 { font-weight: 500; letter-spacing: -.04em; }
body.w4.legacy .w4-h1-kicker, body.w4.legacy .w4-eyebrow {
    font-weight: 400; font-size: 12px; letter-spacing: .08em; color: var(--w4-ink);
}
body.w4.legacy .w4-dark .w4-eyebrow, body.w4.legacy .w4-mcp-hero .w4-eyebrow,
body.w4.legacy main .text-white .w4-eyebrow { color: #a3a5ab; }
body.w4.legacy .w4-lead { line-height: 1.45; letter-spacing: .003em; }
body.w4.legacy main .prose h2, body.w4.legacy main .prose h3 { font-stretch: 100%; }

/* ---------- Buttons: pills ---------- */
body.w4.legacy .w4-btn {
    border-radius: 999px; height: 56px; padding: 0 28px; font-weight: 500; font-size: 16px;
    background: var(--bg); transition: background-color .4s cubic-bezier(.22, 1, .36, 1), color .4s, border-color .4s, transform .4s cubic-bezier(.22, 1, .36, 1);
}
body.w4.legacy .w4-btn { --bg: var(--w4-ink); border-color: var(--bg); }
body.w4.legacy .w4-btn:hover { --bg: var(--w4-accent); }
body.w4.legacy .w4-dark .w4-btn, body.w4.legacy .w4-mcp-hero .w4-btn, body.w4.legacy main .text-white .w4-btn:not(.w4-btn-ghost) { --bg: #fff; --fg: var(--w4-ink); }
body.w4.legacy .w4-dark .w4-btn:hover, body.w4.legacy .w4-mcp-hero .w4-btn:hover { --bg: var(--w4-gold); --fg: var(--w4-ink); border-color: var(--w4-gold); }
body.w4.legacy .w4-btn-ghost { --bg: transparent; --fg: currentColor; border-color: rgba(11,11,12,.2); }
body.w4.legacy .w4-dark .w4-btn-ghost, body.w4.legacy .w4-mcp-hero .w4-btn-ghost { border-color: rgba(255,255,255,.35); }
body.w4.legacy .w4-btn-ghost:hover { --bg: var(--w4-ink); --fg: #fff; border-color: var(--w4-ink); }
body.w4.legacy .w4-btn-sm { height: 44px; padding: 0 20px; font-size: 15px; }
body.w4.legacy main a.rounded-lg[class*="px-"][class*="py-"],
body.w4.legacy main button.rounded-lg[class*="px-"][class*="py-"],
body.w4.legacy main a.rounded-xl[class*="px-"][class*="py-"],
body.w4.legacy main a.rounded-full[class*="px-"][class*="py-"],
body.w4.legacy main button.rounded-full[class*="px-"][class*="py-"],
body.w4.legacy main button[type="submit"][class*="px-"],
body.w4.legacy main a.inline-block[class*="px-"][class*="py-"][class*="bg-"] {
    border-radius: 999px; font-weight: 500;
}
body.w4.legacy .w4-link { font-weight: 500; text-underline-offset: 6px; }

/* ---------- Cards and panels: rounded, soft ---------- */
body.w4.legacy main .rounded-xl,
body.w4.legacy main .rounded-2xl,
body.w4.legacy main .rounded-3xl { border-radius: 20px; }
body.w4.legacy main .rounded-lg { border-radius: 14px; }
body.w4.legacy main .rounded-md { border-radius: 10px; }
body.w4.legacy main .bg-white.rounded-2xl, body.w4.legacy main .bg-white.rounded-xl, body.w4.legacy main .bg-white.rounded-lg { border-color: rgba(11,11,12,.1); }
body.w4.legacy .card-shadow { border-radius: 20px; border-color: rgba(11,11,12,.1); transition: border-color .4s, transform .5s cubic-bezier(.22, 1, .36, 1); }
body.w4.legacy .card-shadow:hover { border-color: rgba(11,11,12,.3); transform: translateY(-3px); }
body.w4.legacy main .bg-gray-50, body.w4.legacy main .bg-slate-50 { background: var(--w4-paper); }
body.w4.legacy .w4-tile, body.w4.legacy .w4-case-media, body.w4.legacy .w4-vcol, body.w4.legacy .w4-calc,
body.w4.legacy .w4-review, body.w4.legacy .w4-result, body.w4.legacy .w4-hero-card, body.w4.legacy .w4-pf-media,
body.w4.legacy .w4-chat, body.w4.legacy .w4-flow-box, body.w4.legacy .w4-rule { border-radius: 20px; }
body.w4.legacy .w4-bento { gap: 12px; background: none; border: 0; }
body.w4.legacy .w4-tile { background: var(--w4-paper); }
body.w4.legacy .w4-tile:hover { background: #ebebe7; }
body.w4.legacy .w4-tile.is-dark { background: var(--w4-ink); }
body.w4.legacy .w4-tile.is-accent { background: var(--w4-accent); }
body.w4.legacy .w4-case-media img { border-radius: inherit; }
body.w4.legacy .w4-step { border-radius: 0; }

/* ---------- Sections ---------- */
body.w4.legacy .w4-section { padding: clamp(80px, 10vw, 140px) 0; }
body.w4.legacy .w4-dark, body.w4.legacy main .bg-gray-900, body.w4.legacy main .bg-slate-900 { background: var(--w4-ink); }
body.w4.legacy main > section:first-child.w4-dark,
body.w4.legacy main > section:first-child.text-white { border-radius: 0 0 28px 28px; }
body.w4.legacy .w4-section-head { border-top-color: rgba(11,11,12,.1); }

/* ---------- Forms ---------- */
body.w4.legacy main input:not([type=range]):not([type=checkbox]):not([type=radio]),
body.w4.legacy main textarea,
body.w4.legacy main select { border-radius: 12px; border-color: rgba(11,11,12,.16); font-family: inherit; }
body.w4.legacy main input:focus, body.w4.legacy main textarea:focus, body.w4.legacy main select:focus {
    border-color: var(--w4-ink); box-shadow: 0 0 0 3px rgba(11, 11, 12, .08);
}

/* ---------- v2.css globals that leak into the Tailwind markup ----------
   Tailwind v4 utilities live in @layer, so v2.css's unlayered `a { color: inherit }` and
   `.grid { grid-template-columns: 3fr 7fr }` beat them regardless of specificity:
   button text went dark/white-on-white and 3-column grids became 2 columns.
   revert-layer hands these properties back to the Tailwind layers. */
body.w4.legacy main a { color: revert-layer; }
body.w4.legacy main .grid { gap: revert-layer; grid-template-columns: revert-layer; }
/* v2.css also resets h1-h3, p and ul to margin/padding 0 (unlayered), which wipes Tailwind spacing
   utilities (mb-6, mx-auto, px-4...). Give spacing back only where Tailwind classes ask for it,
   so the w4-* components keep their own margins. */
body.w4.legacy main :is(h1, h2, h3, h4, p, ul, figure, blockquote):is([class*="m-"], [class*="mb-"], [class*="mt-"], [class*="mx-"], [class*="my-"], [class*="ml-"], [class*="mr-"]),
body.w4.legacy main [class*="space-y-"] > :is(h2, h3, h4, p, ul) { margin: revert-layer; }
body.w4.legacy main :is(p, ul, figure, blockquote):is([class*="p-"], [class*="px-"], [class*="py-"], [class*="pl-"], [class*="pt-"], [class*="pb-"]) { padding: revert-layer; }

/* ---------- Old site chrome that no longer exists ---------- */
body.w4.legacy .w4-nav, body.w4.legacy .w4-mobile, body.w4.legacy .w4-footer, body.w4.legacy main > .w4-cta { display: none; }

/* ---------- Highlighter mark (same gold as ::selection) ---------- */
body.w4.legacy .w4-hl {
    background: var(--w4-gold); color: var(--w4-ink);
    padding: 0 .18em; border-radius: .12em;
    -webkit-box-decoration-break: clone; box-decoration-break: clone;
}

/* ---------- Hosting plans (/hosting, /ro/gazduire.htm) ---------- */
body.w4.legacy .hp-plans { gap: 20px; align-items: stretch; }
@media (min-width: 768px) { body.w4.legacy .hp-plans { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
body.w4.legacy .hp-plans > div {
    display: flex; flex-direction: column; transform: none;
    background: #fff; border: 1px solid rgba(11,11,12,.1); border-radius: 24px; box-shadow: none;
    transition: border-color .4s, transform .5s cubic-bezier(.22, 1, .36, 1);
}
body.w4.legacy .hp-plans > div:hover { border-color: rgba(11,11,12,.28); transform: translateY(-4px); box-shadow: none; }
/* header: drop the coloured gradient bars, keep name + audience as plain type */
body.w4.legacy .hp-plans > div > div:first-child {
    background: none; color: var(--w4-ink); text-align: left; padding: 32px 32px 0; position: relative;
}
body.w4.legacy .hp-plans > div > div:first-child h3 { font-size: 15px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; margin: 0 0 6px; }
body.w4.legacy .hp-plans > div > div:first-child p { color: #6b6d73; font-size: 15px; }
body.w4.legacy .hp-plans > div > div:first-child .absolute {
    top: 30px; right: 28px; border-radius: 999px; padding: 5px 12px; font-size: 11px; letter-spacing: .08em;
    background: var(--w4-gold); color: var(--w4-ink);
}
body.w4.legacy .hp-plans > div > .p-8 { display: flex; flex-direction: column; flex: 1; padding: 24px 32px 32px; }
body.w4.legacy .hp-plans .text-center.mb-6 { text-align: left; padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid rgba(11,11,12,.1); }
body.w4.legacy .hp-plans .text-center.mb-6 > .flex { justify-content: flex-start; }
body.w4.legacy .hp-plans .text-4xl { font-size: 52px; font-weight: 500; letter-spacing: -.04em; line-height: 1; }
body.w4.legacy .hp-plans .text-lg.font-semibold { font-size: 16px; font-weight: 500; color: var(--w4-ink); margin-top: 16px; }
body.w4.legacy .hp-plans ul { flex: 1; }
body.w4.legacy .hp-plans ul svg { color: var(--w4-accent); }
body.w4.legacy .hp-plans ul span { color: #3a3c41; }
body.w4.legacy .hp-plans a.block {
    background: var(--w4-ink); color: #fff; border-radius: 999px; padding: 16px 24px; font-weight: 500; box-shadow: none;
    transition: background-color .4s, color .4s;
}
body.w4.legacy .hp-plans a.block:hover { background: var(--w4-accent); color: #fff; transform: none; }
/* featured plan: dark card */
body.w4.legacy .hp-plans > .hp-featured { background: var(--w4-ink); border-color: var(--w4-ink); color: #fff; }
body.w4.legacy .hp-plans > .hp-featured > div:first-child,
body.w4.legacy .hp-plans > .hp-featured .text-gray-900,
body.w4.legacy .hp-plans > .hp-featured .text-gray-700,
body.w4.legacy .hp-plans > .hp-featured .text-lg.font-semibold,
body.w4.legacy .hp-plans > .hp-featured ul span { color: #fff; }
body.w4.legacy .hp-plans > .hp-featured > div:first-child p,
body.w4.legacy .hp-plans > .hp-featured .text-gray-500 { color: #a3a5ab; }
body.w4.legacy .hp-plans > .hp-featured .text-center.mb-6 { border-bottom-color: rgba(255,255,255,.14); }
body.w4.legacy .hp-plans > .hp-featured ul svg { color: var(--w4-gold); }
body.w4.legacy .hp-plans > .hp-featured a.block { background: #fff; color: var(--w4-ink); }
body.w4.legacy .hp-plans > .hp-featured a.block:hover { background: var(--w4-gold); color: var(--w4-ink); }

/* ---------- Contact page (/contact) ---------- */
body.w4.legacy .ct-layout { align-items: start; }
body.w4.legacy .ct-card { background: #fff; border: 1px solid rgba(11,11,12,.1); border-radius: 24px; padding: 32px; box-shadow: none; }
body.w4.legacy .ct-title { font-size: 28px; font-weight: 500; letter-spacing: -.03em; line-height: 1.1; color: var(--w4-ink); margin: 0 0 24px; }
body.w4.legacy .ct-form { padding: clamp(32px, 4vw, 48px); }
body.w4.legacy .ct-form .ct-title { font-size: clamp(28px, 3vw, 40px); margin-bottom: 8px; }
body.w4.legacy .ct-list { margin: 0; }
body.w4.legacy .ct-list > div { padding: 18px 0; border-top: 1px solid rgba(11,11,12,.1); }
body.w4.legacy .ct-list > div:last-child { padding-bottom: 0; }
body.w4.legacy .ct-list dt { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #6b6d73; margin-bottom: 6px; }
body.w4.legacy .ct-list dd { margin: 0; color: var(--w4-ink); line-height: 1.5; }
body.w4.legacy .ct-big { font-size: 22px; font-weight: 500; letter-spacing: -.02em; color: var(--w4-ink); text-decoration: underline; text-decoration-color: rgba(11,11,12,.2); text-underline-offset: 6px; transition: text-decoration-color .3s; }
body.w4.legacy .ct-big:hover { text-decoration-color: currentColor; }
body.w4.legacy .ct-muted { color: #6b6d73; }
body.w4.legacy .ct-map { padding: 0; overflow: hidden; }
body.w4.legacy .ct-map iframe { display: block; border-radius: 0; height: 300px; filter: grayscale(1) contrast(1.05); transition: filter .5s; }
body.w4.legacy .ct-map:hover iframe { filter: none; }
body.w4.legacy .ct-map-foot { padding: 16px 24px; border-top: 1px solid rgba(11,11,12,.1); }
body.w4.legacy .ct-map-foot a { color: var(--w4-ink); font-weight: 500; font-size: 15px; }
body.w4.legacy .ct-map-foot a:hover { color: var(--w4-accent); }
body.w4.legacy .ct-form label { font-weight: 500; font-size: 14px; }
body.w4.legacy .ct-form button[type="submit"] { background: var(--w4-ink); box-shadow: none; transform: none; height: 60px; font-weight: 500; }
body.w4.legacy .ct-form button[type="submit"]:hover { background: var(--w4-accent); }
body.w4.legacy .ct-facts { display: grid; grid-template-columns: repeat(3, 1fr); margin: 20px 0 0; border: 1px solid rgba(11,11,12,.1); border-radius: 24px; background: #fff; }
body.w4.legacy .ct-facts > div { padding: 24px 28px; }
body.w4.legacy .ct-facts > div + div { border-left: 1px solid rgba(11,11,12,.1); }
body.w4.legacy .ct-facts dt { font-size: 32px; font-weight: 500; letter-spacing: -.04em; line-height: 1; color: var(--w4-ink); }
body.w4.legacy .ct-facts dd { margin: 8px 0 0; font-size: 14px; color: #6b6d73; }
@media (max-width: 640px) {
    body.w4.legacy .ct-facts { grid-template-columns: 1fr; }
    body.w4.legacy .ct-facts > div + div { border-left: 0; border-top: 1px solid rgba(11,11,12,.1); }
}

/* ---------- Services pages (/services, /ro/servicii.htm) ---------- */
body.w4.legacy .svc-index { background: #fff; border-bottom: 1px solid rgba(11,11,12,.08); }
body.w4.legacy .svc-index-in { display: flex; gap: 8px; overflow-x: auto; padding: 14px 0; scrollbar-width: none; }
body.w4.legacy .svc-index-in::-webkit-scrollbar { display: none; }
@media (min-width: 900px) { body.w4.legacy .svc-index-in { flex-wrap: wrap; justify-content: center; overflow: visible; padding: 18px 0; } }
body.w4.legacy .svc-index a { flex: none; padding: 8px 16px; border-radius: 999px; border: 1px solid rgba(11,11,12,.12); font-size: 14px; color: var(--w4-ink); white-space: nowrap; transition: background .3s, color .3s, border-color .3s; }
body.w4.legacy .svc-index a:hover { background: var(--w4-ink); border-color: var(--w4-ink); color: #fff; }
body.w4.legacy main [id] { scroll-margin-top: 150px; }
body.w4.legacy .svc-card { display: flex; flex-direction: column; border: 1px solid rgba(11,11,12,.08); box-shadow: none; transition: border-color .4s, transform .5s cubic-bezier(.22, 1, .36, 1); }
body.w4.legacy .svc-card:hover { border-color: rgba(11,11,12,.28); transform: translateY(-3px); box-shadow: none; }
body.w4.legacy .svc-card:target { border-color: var(--w4-accent); box-shadow: 0 0 0 3px rgba(22,99,199,.15); }
body.w4.legacy .svc-card ul { flex: 1; }
body.w4.legacy .svc-badge { display: inline-block; vertical-align: 5px; margin-left: 6px; padding: 3px 9px; border-radius: 999px; background: var(--w4-gold); color: var(--w4-ink); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
body.w4.legacy .svc-more { align-self: flex-start; margin-top: 20px; padding: 12px 20px; border-radius: 999px; background: var(--w4-ink); color: #fff; font-weight: 500; font-size: 15px; transition: background .4s; }
body.w4.legacy .svc-more:hover { background: var(--w4-accent); color: #fff; }

/* ---------- Contact hero with photo (/contact, /ro/contact.htm) ---------- */
body.w4.legacy main > section.ct-hero { padding: clamp(48px, 6vw, 80px) 0 clamp(56px, 7vw, 96px); text-align: left; }
body.w4.legacy .ct-hero-in { display: grid; gap: 40px; align-items: center; max-width: 1180px; margin: 0 auto; }
@media (min-width: 1024px) { body.w4.legacy .ct-hero-in { grid-template-columns: minmax(0, 1fr) 440px; gap: 72px; } }
body.w4.legacy .ct-hero-txt h1 { max-width: 11em; }
body.w4.legacy .ct-hero-txt p { max-width: 30em; }
body.w4.legacy .ct-hero-call { display: inline-flex; flex-direction: column; gap: 4px; margin-top: 36px; padding-left: 18px; border-left: 2px solid var(--w4-gold); color: #fff !important; font-size: clamp(24px, 2.4vw, 32px); font-weight: 500; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; transition: color .3s; }
body.w4.legacy .ct-hero-call span { font-size: 13px; font-weight: 400; letter-spacing: .08em; text-transform: uppercase; color: #a3a5ab; }
body.w4.legacy .ct-hero-call:hover { color: var(--w4-gold) !important; }
body.w4.legacy .ct-hero-photo { position: relative; margin: 0; }
body.w4.legacy .ct-hero-photo picture { display: block; aspect-ratio: 4 / 5; border-radius: 28px; overflow: hidden; box-shadow: 0 50px 90px -40px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .08); transform: rotate(1.5deg); transition: transform 1s cubic-bezier(.22, 1, .36, 1); }
body.w4.legacy .ct-hero-photo:hover picture { transform: rotate(0deg) scale(1.01); }
body.w4.legacy .ct-hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 30%; }
body.w4.legacy .ct-hero-chip { position: absolute; left: -24px; bottom: 32px; display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 999px; background: #fff; color: var(--w4-ink); font-size: 14px; font-weight: 500; box-shadow: 0 20px 40px -16px rgba(0, 0, 0, .5); }
body.w4.legacy .ct-hero-chip i { width: 8px; height: 8px; border-radius: 50%; background: #23a55a; box-shadow: 0 0 0 4px rgba(35, 165, 90, .18); }
@media (max-width: 1023px) {
    body.w4.legacy .ct-hero-photo { max-width: 520px; }
    body.w4.legacy .ct-hero-photo picture { aspect-ratio: 4 / 3.4; transform: none; border-radius: 22px; }
    body.w4.legacy .ct-hero-chip { left: 16px; bottom: 16px; }
}
