/* BINDER Headless Lab — Theme (Phase A: Blocks + Container + Slider) */

:root {
  --bw-black: #1A171B;
  --bw-red: #E2001A;
  --bw-petrol: #185b6d;
  --bw-bg: #fafafa;
  --bw-text: #1A171B;
  --bw-text-muted: #555;
  --bw-border: #e5e5e5;
  --bw-radius: 4px;
  --bw-shadow: 0 2px 8px rgba(0,0,0,0.04);
  --bw-font: 'Inter', system-ui, -apple-system, sans-serif;
  --bw-max: 1200px;
  --t3lab-primary: var(--bw-red);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--bw-font);
  color: var(--bw-text);
  background: var(--bw-bg);
  font-size: 16px;
  line-height: 1.6;
}
a { color: var(--bw-red); text-decoration: none; }
a:hover { text-decoration: underline; }

.t3lab-container { max-width: var(--bw-max); margin: 0 auto; padding: 0 24px; }

/* === Backend Switcher Bar === */
.t3lab-backendbar {
  background: var(--bw-black); color: #fff; padding: 8px 0; font-size: 13px;
}
.t3lab-backendbar-inner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.t3lab-bb-label { opacity: 0.7; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; font-size: 11px; }
.t3lab-bb-btn {
  background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.3);
  padding: 4px 12px; border-radius: 4px; cursor: pointer; font-size: 12px;
  font-weight: 600; transition: all 0.15s;
}
.t3lab-bb-btn:hover { background: rgba(255,255,255,0.1); }
.t3lab-bb-btn.is-active { background: var(--bw-red); border-color: var(--bw-red); }
.t3lab-bb-info { margin-left: auto; opacity: 0.7; }
.t3lab-bb-info strong { color: var(--bw-red); }

/* === Header === */
.t3lab-header {
  background: #fff;
  border-bottom: 1px solid var(--bw-border);
  padding: 16px 0;
  position: sticky; top: 0; z-index: 50;
}
.t3lab-header-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.t3lab-brand { display: flex; align-items: center; }
.t3lab-brand img { height: 36px; display: block; }
.t3lab-brand-text { font-weight: 700; font-size: 18px; color: var(--bw-black); }
.t3lab-mainnav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.t3lab-navlink {
  display: inline-block; padding: 6px 14px; border-radius: var(--bw-radius);
  font-size: 14px; font-weight: 500; color: var(--bw-text);
}
.t3lab-navlink:hover { background: #f3f3f3; text-decoration: none; }
.t3lab-langnav { position: relative; padding-left: 12px; border-left: 1px solid var(--bw-border); }
.t3lab-langnav-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; border: 1px solid var(--bw-border);
  padding: 6px 10px; border-radius: var(--bw-radius);
  font-size: 13px; font-weight: 600; color: var(--bw-text);
  text-transform: uppercase; cursor: pointer;
}
.t3lab-langnav-toggle:hover { background: #f3f3f3; }
.t3lab-langnav-current { letter-spacing: 0.05em; }
.t3lab-langnav-menu {
  position: absolute; right: 0; top: calc(100% + 6px);
  margin: 0; padding: 4px; list-style: none;
  background: #fff; border: 1px solid var(--bw-border);
  border-radius: var(--bw-radius); box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  min-width: 160px; z-index: 60;
  display: none;
}
.t3lab-langnav-menu.is-open { display: block; }
.t3lab-langnav-menu li { margin: 0; }
.t3lab-langnav-menu a {
  display: block; padding: 8px 12px; color: var(--bw-text); font-size: 14px;
  border-radius: 3px; text-decoration: none;
}
.t3lab-langnav-menu a:hover { background: #f3f3f3; }
.t3lab-langnav-menu a.is-active { background: var(--bw-black); color: #fff; }
.t3lab-langlink {
  display: inline-block; padding: 6px 10px; border: 1px solid var(--bw-border);
  border-radius: var(--bw-radius); font-size: 12px; font-weight: 600;
  color: var(--bw-text-muted); text-transform: uppercase;
}
.t3lab-langlink.is-active { background: var(--bw-black); color: #fff; border-color: var(--bw-black); }

/* === Main === */
.t3lab-main { min-height: calc(100vh - 200px); }
.t3lab-block + .t3lab-block { margin-top: 4px; }
.t3lab-block { padding: 64px 0; }

/* === Hero === */
.t3lab-hero { position: relative; padding: 0; min-height: 420px; overflow: hidden; color: #fff; background: var(--bw-black); }
.t3lab-hero-image { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0.6; }
.t3lab-hero-content { position: relative; padding: 120px 24px; }
.t3lab-hero h1 { font-size: clamp(36px, 5vw, 64px); line-height: 1.05; margin: 0; font-weight: 800; }
.t3lab-hero-lead { font-size: clamp(18px, 2vw, 22px); margin-top: 16px; max-width: 720px; opacity: 0.95; }

/* === Text === */
.t3lab-text { background: #fff; }
.t3lab-prose { max-width: 760px; }
.t3lab-prose h2 { font-size: 32px; margin: 0 0 24px; }
.t3lab-prose h3 { font-size: 22px; margin: 32px 0 12px; }
.t3lab-prose p { margin: 0 0 16px; }
.t3lab-prose ul, .t3lab-prose ol { padding-left: 24px; margin: 0 0 16px; }
.t3lab-prose blockquote { border-left: 6px solid var(--bw-red); padding: 16px 24px; background: #fafafa; font-size: 20px; margin: 32px 0; }
.t3lab-prose blockquote footer { margin-top: 12px; font-size: 14px; color: var(--bw-text-muted); }
.t3lab-prose a { color: var(--bw-red); border-bottom: 1px solid; }

/* === Cards === */
.t3lab-cards { background: var(--bw-bg); }
.t3lab-cards-title { font-size: 32px; margin: 0 0 32px; }
.t3lab-cards-grid {
  display: grid; gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.t3lab-card {
  background: #fff; border: 1px solid var(--bw-border); border-radius: 8px;
  overflow: hidden; box-shadow: var(--bw-shadow); display: flex; flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}
.t3lab-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
.t3lab-card-image { aspect-ratio: 16/10; background-size: cover; background-position: center; }
.t3lab-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.t3lab-card h3 { margin: 0 0 8px; font-size: 18px; }
.t3lab-card p { margin: 0 0 12px; color: var(--bw-text-muted); flex: 1; }
.t3lab-card-link { font-weight: 600; color: var(--bw-red); margin-top: auto; }

/* === Slider === */
.t3lab-slider { padding: 0; background: var(--bw-black); }
.t3lab-splide { --t3-slider-h: 520px; }
.t3lab-slide {
  position: relative; height: var(--t3-slider-h);
  background-size: cover; background-position: center; color: #fff;
}
.t3lab-slide-overlay {
  position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.2) 60%);
  display: flex; align-items: flex-end; padding-bottom: 48px;
}
.t3lab-slide h2 { font-size: clamp(28px, 4vw, 48px); margin: 0; line-height: 1.1; font-weight: 800; }
.t3lab-slide p { font-size: 18px; max-width: 600px; margin: 12px 0 0; }
.t3lab-btn {
  display: inline-block; margin-top: 24px;
  background: var(--bw-red); color: #fff;
  padding: 14px 28px; border-radius: var(--bw-radius); font-weight: 600;
}
.t3lab-btn:hover { background: #b30015; text-decoration: none; }
.splide__pagination__page.is-active { background: var(--bw-red); }
.splide__arrow { background: rgba(0,0,0,0.6); }
.splide__arrow svg { fill: #fff; }

/* === Image === */
.t3lab-image { background: #fff; }
.t3lab-image figure { margin: 0; }
.t3lab-image img { display: block; width: 100%; height: auto; border-radius: 8px; }
.t3lab-image figcaption { margin-top: 12px; font-size: 14px; color: var(--bw-text-muted); text-align: center; }
.t3lab-image--wide img { border-radius: 0; }
.t3lab-image--right { padding: 32px 0; }
.t3lab-image--right figure { max-width: 60%; margin-left: auto; }

/* === Container / Grid === */
.t3lab-container-block { background: #fff; }
.t3lab-container-title { font-size: 28px; margin: 0 0 32px; }
.t3lab-grid { display: grid; gap: 32px; align-items: start; }
.t3lab-grid--cols_2 { grid-template-columns: 1fr 1fr; }
.t3lab-grid--cols_3 { grid-template-columns: repeat(3, 1fr); }
.t3lab-grid--cols_4 { grid-template-columns: repeat(4, 1fr); }
.t3lab-grid--sidebar_left { grid-template-columns: 1fr 2fr; }
.t3lab-grid--sidebar_right { grid-template-columns: 2fr 1fr; }
.t3lab-col > .t3lab-block { padding: 0; }
.t3lab-col > .t3lab-block + .t3lab-block { margin-top: 24px; }
@media (max-width: 800px) {
  .t3lab-grid--cols_2, .t3lab-grid--cols_3, .t3lab-grid--cols_4,
  .t3lab-grid--sidebar_left, .t3lab-grid--sidebar_right { grid-template-columns: 1fr; }
}

/* === Footer === */
.t3lab-footer { background: var(--bw-black); color: #fff; padding: 48px 0 24px; margin-top: 80px; }
.t3lab-footer-grid {
  display: grid; gap: 32px;
  grid-template-columns: 2fr 1fr 1fr;
  align-items: start;
}
.t3lab-footer-brand strong { color: var(--bw-red); font-size: 18px; }
.t3lab-footer-tagline { opacity: 0.7; margin: 4px 0 12px; }
.t3lab-footer-brand p { margin: 0 0 8px; opacity: 0.85; }
.t3lab-footernav { display: flex; flex-direction: column; gap: 8px; }
.t3lab-footernav a { color: #fff; opacity: 0.85; }
.t3lab-footernav a:hover { opacity: 1; }
.t3lab-footer-meta { font-size: 13px; opacity: 0.7; }
.t3lab-meta-line strong { color: var(--bw-red); }
@media (max-width: 800px) { .t3lab-footer-grid { grid-template-columns: 1fr; } }

/* === Error === */
.t3lab-error {
  background: #ffeaea; border: 1px solid var(--bw-red); border-left: 6px solid var(--bw-red);
  padding: 24px 32px; border-radius: var(--bw-radius); margin: 64px 0;
}
.t3lab-error h2 { margin-top: 0; color: var(--bw-red); }

/* === Unknown === */
.t3lab-unknown {
  background: #fff8e1; border: 1px dashed #d4b000; padding: 16px;
  border-radius: var(--bw-radius); font-size: 14px;
}
