/* ============================================================
   Case study + work pages — DARK sheet
   Built on the redesign token layer (../styles.redesign.css).
   Matches the new dark homepage: deep-navy surfaces, hairline
   borders, inset sheen, cyan/blue accents, teal = live.
   ============================================================ */

/* ---------- compatibility aliases ------------------------------------
   The case pages (and a few inline styles) still reference the OLD
   light-theme variable names. Map them onto dark values here so nothing
   renders as light. --radius* already exist in the redesign layer.      */
:root {
  --gray-1: var(--text-2);
  --gray-2: var(--text-3);
  --gray-3: var(--text-2);
  --bg-2:   var(--border);
  --white:  var(--surface-1);
  --slate:  var(--text);
  --grad-blue: var(--grad-brand);
  /* dark, restrained elevation — no heavy white drop-shadows */
  --shadow-1: 0 1px 0 rgba(255,255,255,.02) inset, 0 10px 24px rgba(0,0,0,.35);
  --shadow-2: 0 1px 0 rgba(255,255,255,.03) inset, 0 18px 40px rgba(0,0,0,.45);
  --shadow-3: 0 1px 0 rgba(255,255,255,.04) inset, 0 26px 60px rgba(0,0,0,.5);
}

/* page surface */
html, body { background: var(--bg-base); }

/* ---------- bilingual toggle: show one language at a time ---------- */
[data-lang="en"] [lang="ro"] { display: none !important; }
[data-lang="ro"] [lang="en"] { display: none !important; }

/* ---------- language switch (dark, matches homepage) ---------- */
.lang-switch {
  display: inline-flex;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  overflow: hidden;
  background: rgba(255,255,255,.03);
}
.lang-switch button {
  background: transparent;
  border: 0;
  color: var(--text-2);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: .74rem;
  letter-spacing: .08em;
  padding: 7px 13px;
  transition: background .2s ease, color .2s ease;
}
.lang-switch button[aria-pressed="true"] {
  background: var(--grad-brand);
  color: #fff;
}
.lang-switch button:focus-visible { box-shadow: var(--ring); border-radius: var(--radius-pill); }

/* ---------- breadcrumb ---------- */
.breadcrumb {
  font-size: .82rem;
  color: var(--text-3);
  letter-spacing: .02em;
  margin-bottom: 18px;
}
.breadcrumb a { color: var(--text-2); }
.breadcrumb a:hover { color: var(--cyan); }
.breadcrumb span { opacity: .5; margin: 0 8px; }

/* ---------- case hero ---------- */
.case-hero {
  position: relative;
  background:
    radial-gradient(ellipse at top left, rgba(34,211,238,.1), transparent 52%),
    radial-gradient(ellipse at top right, rgba(22,119,255,.1), transparent 55%),
    linear-gradient(180deg, var(--bg-base) 0%, var(--bg) 100%);
  color: var(--text);
  padding: calc(84px + 46px) 0 64px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.case-hero::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -10%;
  width: 60%;
  height: 120%;
  background: radial-gradient(closest-side, rgba(34, 211, 238, .16), transparent 70%);
  pointer-events: none;
}
.case-hero .container { position: relative; z-index: 1; }
.case-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: .76rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--kicker-color);
  margin-bottom: 16px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(34,211,238,.06);
  border: 1px solid rgba(34,211,238,.2);
}
.case-hero h1 {
  color: var(--text);
  max-width: 16ch;
  margin-bottom: 18px;
}
.case-lede {
  color: var(--text-2);
  font-size: clamp(1.02rem, 1.6vw, 1.22rem);
  line-height: 1.6;
  max-width: 62ch;
}
.case-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
}
.case-meta .m-label {
  font-family: var(--font-mono);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-3);
  margin-bottom: 6px;
}
.case-meta .m-value { font-weight: 600; color: var(--text); font-size: .96rem; }
.badge-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--success);
}
.badge-live::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(20,184,166,.18), 0 0 8px rgba(20,184,166,.6);
}
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .04em;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  color: var(--text-2);
}
.case-hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* ---------- content sections ---------- */
.case-section { padding: 68px 0; position: relative; }
.case-section.alt { background: var(--bg-alt); }
.case-section h2 { margin-bottom: 18px; }
.section-eyebrow {
  font-family: var(--font-mono);
  font-size: .76rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--kicker-color);
  margin-bottom: 12px;
}
.prose { max-width: 70ch; }
.prose p { color: var(--text-2); font-size: 1.05rem; line-height: 1.7; margin-bottom: 14px; }
.prose strong { color: var(--text); }
.prose a { color: var(--cyan); text-underline-offset: 2px; }
.lead-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}
@media (max-width: 820px) { .lead-grid { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- outcome cards ---------- */
.outcomes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 8px;
}
.outcome {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-1);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.outcome::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--grad-surface);
  pointer-events: none;
}
.outcome:hover { transform: translateY(-3px); border-color: var(--border-accent); box-shadow: var(--glow-cyan); }
.outcome > * { position: relative; }
.outcome .o-icon {
  width: 42px; height: 42px;
  border-radius: 11px;
  display: grid; place-items: center;
  background: var(--grad-brand);
  color: #fff;
  margin-bottom: 14px;
  box-shadow: 0 8px 22px rgba(22,119,255,.32);
}
.outcome .o-icon svg { width: 22px; height: 22px; }
.outcome h3 { color: var(--text); margin-bottom: 7px; }
.outcome p { font-size: .95rem; line-height: 1.6; color: var(--text-2); }

/* ---------- stat strip ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.stat { background: var(--surface-1); padding: 26px 22px; text-align: center; }
.stat .s-num {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  line-height: 1;
}
.stat .s-label { font-size: .84rem; color: var(--text-2); margin-top: 8px; }
.stat .s-note { font-size: .7rem; color: var(--text-3); margin-top: 4px; }

/* ---------- gallery ---------- */
.gallery-group { margin-top: 38px; }
.gallery-group:first-of-type { margin-top: 10px; }
.gallery-group > h3 {
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 4px;
}
.gallery-group > .g-sub { font-size: .9rem; color: var(--text-2); margin-bottom: 16px; }
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
figure.shot {
  margin: 0;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-1);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
figure.shot:hover { transform: translateY(-3px); border-color: var(--border-accent); box-shadow: var(--glow-cyan); }
figure.shot button.shot-open {
  display: block; width: 100%; padding: 0; border: 0; background: var(--bg-base);
  cursor: zoom-in; line-height: 0;
}
figure.shot img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
figure.shot figcaption {
  padding: 13px 16px 15px;
  font-size: .86rem;
  color: var(--text-2);
  line-height: 1.45;
}
figure.shot figcaption b { color: var(--text); font-weight: 600; display: block; margin-bottom: 2px; font-size: .9rem; }
.shot.span-2 { grid-column: span 2; }
@media (max-width: 680px) { .shot.span-2 { grid-column: span 1; } }

.tag-real {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .64rem; font-weight: 500; letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--success); background: rgba(20,184,166,.12);
  border: 1px solid rgba(20,184,166,.3);
  padding: 2px 8px; border-radius: var(--radius-pill); margin-left: 6px;
  vertical-align: middle;
}

/* ---------- transparency / honesty callout ---------- */
.callout {
  border: 1px solid var(--border);
  border-left: 3px solid var(--cyan);
  background: linear-gradient(90deg, rgba(34,211,238,.06), rgba(34,211,238,.01)), var(--surface-1);
  border-radius: var(--radius);
  padding: 24px 26px;
  box-shadow: var(--shadow-1);
}
.callout h3 { color: var(--text); margin-bottom: 10px; display: flex; align-items: center; gap: 9px; }
.callout h3 svg { width: 20px; height: 20px; color: var(--teal); }
.callout p { font-size: .96rem; line-height: 1.65; margin-bottom: 10px; color: var(--text-2); }
.callout p:last-child { margin-bottom: 0; }
.callout strong { color: var(--text); }

/* ---------- integrations list ---------- */
.integrations { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 10px; }
.integration {
  display: flex; gap: 13px; align-items: flex-start;
  padding: 18px; background: var(--surface-1); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color .2s ease;
}
.integration:hover { border-color: var(--border-accent); }
.integration .i-dot {
  width: 34px; height: 34px; border-radius: 9px;
  background: rgba(34,211,238,.1); border: 1px solid rgba(34,211,238,.2);
  display: grid; place-items: center; flex-shrink: 0; color: var(--cyan);
}
.integration .i-dot svg { width: 18px; height: 18px; }
.integration b { color: var(--text); font-size: .93rem; }
.integration p { font-size: .85rem; color: var(--text-2); margin-top: 2px; line-height: 1.45; }

/* ---------- next / back nav ---------- */
.case-footer-nav { padding: 40px 0; border-top: 1px solid var(--border); background: var(--bg-base); }
.case-footer-nav .container { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.back-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--cyan); }
.back-link:hover { color: var(--text); }
.back-link svg { width: 16px; height: 16px; }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(3, 8, 18, .92);
  display: none; align-items: center; justify-content: center;
  padding: 24px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 95vw; max-height: 90vh; width: auto; height: auto; border-radius: 10px; box-shadow: 0 30px 80px rgba(0,0,0,.6); border: 1px solid var(--border-strong); }
.lightbox .lb-close {
  position: absolute; top: 20px; right: 24px;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,.08); border: 1px solid var(--border-strong);
  color: #fff; font-size: 1.4rem; line-height: 1;
  transition: background .2s ease, border-color .2s ease;
}
.lightbox .lb-close:hover { background: rgba(34,211,238,.14); border-color: var(--border-accent); }
.lightbox .lb-cap {
  position: absolute; bottom: 22px; left: 0; right: 0; text-align: center;
  color: var(--text-2); font-size: .9rem; padding: 0 24px;
}

@media (max-width: 640px) {
  .case-section { padding: 48px 0; }
  .case-hero { padding: calc(74px + 36px) 0 48px; }
  .case-meta { gap: 20px; }
}

/* ---------- work index (portfolio) ---------- */
.work-head {
  background:
    radial-gradient(ellipse at top left, rgba(34,211,238,.1), transparent 52%),
    radial-gradient(ellipse at top right, rgba(22,119,255,.1), transparent 55%),
    linear-gradient(180deg, var(--bg-base) 0%, var(--bg) 100%);
  color: var(--text);
  padding: calc(84px + 46px) 0 56px;
  position: relative; overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.work-head::before { content:''; position:absolute; top:-30%; right:-10%; width:55%; height:120%; background:radial-gradient(closest-side, rgba(34,211,238,.15), transparent 70%); pointer-events: none; }
.work-head .container { position: relative; z-index: 1; }
.work-head .case-eyebrow { } /* inherits dark eyebrow above */
.work-head h1 { color: var(--text); max-width: 18ch; }
.work-head p { color: var(--text-2); max-width: 60ch; margin-top: 14px; font-size: 1.1rem; }

.work-grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 22px; }
.work-card {
  display:flex; flex-direction:column;
  background: var(--surface-1); border:1px solid var(--border);
  border-radius: var(--radius-lg); overflow:hidden;
  position: relative;
  box-shadow: var(--shadow-1);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.work-card:hover { transform: translateY(-4px); border-color: var(--border-accent); box-shadow: var(--glow-cyan); }
/* ---------- uniform generated covers (one coherent system) ----------
   Every card gets the SAME layered cover: dark brand-gradient panel +
   a soft accent glow top-left + a faint masked grid + a large line
   domain icon + a small mono tag + a thin accent top-hairline.
   Projects differ ONLY by icon and --cover-accent (cyan default;
   amber reserved for pre-launch status). No raster images.          */
.work-card .wc-cover {
  --cover-accent: var(--cyan);
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  display: grid;
  place-items: center;
  isolation: isolate;
  background:
    radial-gradient(130% 105% at 16% 4%,
      color-mix(in srgb, var(--cover-accent) 24%, transparent), transparent 56%),
    linear-gradient(158deg, var(--surface-2) 0%, var(--bg-base) 100%);
  border-bottom: 1px solid var(--border);
}
/* faint 1px grid mesh, masked so it fades out toward the edges */
.work-card .wc-cover::before {
  content: '';
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse 85% 85% at 22% 16%, #000 6%, transparent 76%);
  mask-image: radial-gradient(ellipse 85% 85% at 22% 16%, #000 6%, transparent 76%);
}
/* thin accent top-hairline ties the cover into the card system */
.work-card .wc-cover::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px; z-index: 3;
  background: linear-gradient(90deg, transparent, var(--cover-accent) 50%, transparent);
  opacity: .55;
}
/* large soft domain icon — line art in the accent colour */
.work-card .wc-cover .wc-icon {
  position: relative; z-index: 1;
  width: 36%; height: auto; max-width: 128px;
  color: var(--cover-accent);
  opacity: .9;
  filter: drop-shadow(0 0 20px color-mix(in srgb, var(--cover-accent) 40%, transparent));
  transition: opacity .25s ease;
}
.work-card:hover .wc-cover .wc-icon { opacity: 1; }
/* small mono category tag, bottom-left corner */
.work-card .wc-cover .wc-tag {
  position: absolute; left: 14px; bottom: 13px; z-index: 3;
  font-family: var(--font-mono);
  font-size: .63rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-2);
  background: rgba(6,14,31,.6);
  border: 1px solid var(--border);
  padding: 4px 10px; border-radius: var(--radius-pill);
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
}
.work-card .wc-body { padding: 22px 22px 24px; display:flex; flex-direction:column; flex:1; position: relative; z-index: 1; }
.wc-badges { display:flex; gap:8px; margin-bottom:12px; flex-wrap:wrap; align-items:center; }
.wc-badge {
  font-family: var(--font-mono);
  font-size:.64rem; font-weight:500; letter-spacing:.06em;
  padding:4px 10px; border-radius:var(--radius-pill); text-transform:uppercase;
  border: 1px solid var(--border);
}
.wc-badge.live { color: var(--success); border-color: rgba(20,184,166,.3); background: rgba(20,184,166,.08); }
.wc-badge.build { color:#fbbf24; border-color: rgba(245,158,11,.3); background: rgba(245,158,11,.08); }
.wc-badge.domain { color: var(--text-3); background: rgba(255,255,255,.03); }
.work-card h3 { font-size:1.25rem; color:var(--text); margin-bottom:8px; }
.work-card p { font-size:.95rem; line-height:1.6; color:var(--text-2); flex:1; }
.work-card .wc-link { margin-top:16px; display:inline-flex; align-items:center; gap:8px; font-weight:600; color: var(--cyan); font-size:.92rem; }
.work-card .wc-link svg { width:16px; height:16px; transition: transform .2s ease; }
.work-card:hover .wc-link svg { transform: translateX(3px); }

/* ---- footer social icons ---- */
.footer-social{display:flex;gap:10px;align-items:center}
.footer-social a{display:grid;place-items:center;width:34px;height:34px;border-radius:9px;border:1px solid var(--border);color:var(--text-2);background:var(--surface-1);transition:color .2s ease,border-color .2s ease,background .2s ease}
.footer-social a:hover{color:var(--cyan);border-color:var(--border-accent);background:var(--surface-2)}
.footer-social svg{width:17px;height:17px}
