/* ============================================
   BEARING STUDIO — design system
   Dark editorial · warm-black palette
   Fonts: Lastik (display) + Inter (body) + JetBrains Mono
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

@font-face {
  font-family: 'Lastik';
  src: url('Lastik.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ── Tokens ─────────────────────────────────── */
:root {
  --bg:           oklch(0.18 0.005 60);
  --bg-2:         oklch(0.21 0.005 60);
  --surface:      oklch(0.24 0.005 60);
  --line:         oklch(0.30 0.005 60);
  --text:         oklch(0.96 0.005 80);
  --text-muted:   oklch(0.72 0.005 80);
  --text-dim:     oklch(0.50 0.005 80);
  --accent:       oklch(0.88 0.06 70);

  --font-display: 'Lastik', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, Menlo, monospace;
}

/* ── Reset ──────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { background: var(--bg); color: var(--text); }

/* ── A11y overrides ─────────────────────────── */
html.bs-a11y-large-text { font-size: 118%; }
body.bs-a11y-high-contrast {
  --bg: #000; --bg-2: #0a0a0a; --surface: #111;
  --line: #fff; --text: #fff; --text-muted: #ddd; --text-dim: #aaa;
}

/* ── Base body ──────────────────────────────── */
body {
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ── Layout helpers ─────────────────────────── */
.bs-container-wide {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}
.bs-hr { border: none; border-top: 0.5px solid var(--line); }

/* ── Type scale ─────────────────────────────── */
.t-display {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--text);
}
.t-lede {
  font-family: var(--font-body);
  font-weight: 300;
  letter-spacing: -0.015em;
  line-height: 1.35;
  color: var(--text);
}
.t-body {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.65;
  letter-spacing: -0.005em;
  color: var(--text-muted);
}
.t-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}
.t-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.bs-link {
  color: var(--text);
  text-decoration: none;
  border-bottom: 0.5px solid var(--text-dim);
  padding-bottom: 1px;
  transition: border-color 0.2s ease;
}
.bs-link:hover { border-bottom-color: var(--text); }

/* ── Tag pill ───────────────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  background-color: rgba(20, 20, 20, 0.62);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border: 0.5px solid rgba(255, 255, 255, 0.18);
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.30), 0 8px 28px rgba(0,0,0,0.22);
}
.tag::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #fff;
  flex-shrink: 0;
}
.tag[data-kind="editorial"]         { border-color: rgba(255,255,255,0.55); }
.tag[data-kind="editorial"]::before { background: #fff; box-shadow: 0 0 6px rgba(255,255,255,0.55); }
.tag[data-kind="design"]            { border-color: rgba(31,111,235,0.65); }
.tag[data-kind="design"]::before    { background: #1f6feb; box-shadow: 0 0 6px rgba(31,111,235,0.6); }
.tag[data-kind="new"]               { border-color: rgba(26,168,74,0.7); }
.tag[data-kind="new"]::before       { background: #1aa84a; box-shadow: 0 0 8px rgba(26,168,74,0.85); }

/* ── Placeholder ────────────────────────────── */
.bs-placeholder {
  background:
    repeating-linear-gradient(135deg,
      transparent 0 18px,
      rgba(255,255,255,0.018) 18px 19px);
  background-color: var(--bg-2);
  border: 0.5px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
}
.bs-placeholder-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--bg);
  border: 0.5px solid var(--line);
  padding: 0.3rem 0.6rem;
  border-radius: 2px;
}

/* ── Skip link ──────────────────────────────── */
.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 9999;
  background: #fff; color: #000; padding: 0.625rem 1rem;
  font: 500 0.875rem/1 system-ui;
  text-decoration: none; border: 2px solid #000;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 1rem; }

/* ── Nav ────────────────────────────────────── */
.bs-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: transparent;
  pointer-events: none;
}
.bs-nav-row {
  /* No max-width — pill stretches full viewport width with clamp padding */
  padding: 1rem clamp(1.25rem, 4vw, 2.5rem);
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Unified single island */
.bs-island {
  pointer-events: auto;
  background-color: rgba(20, 20, 20, 0.62);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.30), 0 8px 28px rgba(0,0,0,0.22);
}
.bs-nav-unified {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.55rem 0.55rem;
  gap: 0.5rem;
}

.bs-logo-island {
  display: inline-flex;
  align-items: center;
  padding: 0.05rem 0.75rem;
  text-decoration: none;
  color: var(--text);
  margin-right: auto;
  pointer-events: auto;
}
.bs-logo-island img { height: 42px; width: auto; display: block; }

/* Links pinned to absolute center of island */
.bs-nav-links {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.bs-nav-links a {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: -0.005em;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}
.bs-nav-links a[data-color="red"]:hover    { color: #fff; background: #ee2d3a; }
.bs-nav-links a[data-color="yellow"]:hover { color: #fff; background: #f5a623; }
.bs-nav-links a[data-color="blue"]:hover   { color: #fff; background: #1f6feb; }

/* A11y — icon-only button, uniform with the rest of the island */
.bs-a11y-wrap { position: relative; margin-left: auto; }
.bs-a11y-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}
.bs-a11y-btn:hover { color: #fff; background: rgba(255,255,255,0.1); }
.bs-a11y-btn[aria-expanded="true"] { color: #fff; }

.bs-a11y-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 220px;
  background: rgba(20, 20, 20, 0.96);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 0.5rem 0;
  box-shadow: 0 12px 36px rgba(0,0,0,0.4);
  z-index: 2000;
  display: none;
}
.bs-a11y-menu.is-open { display: block; }
.bs-a11y-menu p.label {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  padding: 0.35rem 1rem 0.5rem;
}
.bs-a11y-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.75);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 300;
  padding: 0.6rem 1rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}
.bs-a11y-option:hover { background: rgba(255,255,255,0.05); }
.bs-a11y-option[aria-pressed="true"] { background: rgba(255,255,255,0.08); color: #fff; }
.bs-a11y-option .icon  { width: 1.25rem; text-align: center; opacity: 0.6; font-size: 0.875rem; }
.bs-a11y-option .label { flex: 1; }
.bs-a11y-option .check { font-size: 0.75rem; opacity: 0.7; display: none; }
.bs-a11y-option[aria-pressed="true"] .check { display: inline; }

/* ── Nav mobile ─────────────────────────────── */
@media (max-width: 640px) {
  .bs-nav-links { display: none; }
  .bs-nav-unified { padding: 0.4rem; }
}

/* ── Hero ───────────────────────────────────── */
.bs-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 560px;
  overflow: hidden;
  background: #000;
}
.bs-hero-video {
  position: absolute;
  top: 40%; left: 50%;
  transform: translate(-50%, -40%);
  width: max(177.78vh, 100vw);
  height: max(56.25vw, 100vh);
  min-width: 100%; min-height: 100%;
}
.bs-hero-video iframe {
  width: 100%; height: 100%;
  border: none; pointer-events: none; display: block;
}
.bs-hero-overlay {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.55) 0%,
    rgba(0,0,0,0.05) 28%,
    rgba(0,0,0,0.05) 55%,
    rgba(0,0,0,0.85) 100%
  );
}
.bs-hero-top {
  position: absolute;
  top: calc(90px + 1.25rem);
  left: clamp(1.25rem, 4vw, 2.5rem);
  right: clamp(1.25rem, 4vw, 2.5rem);
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
/* "Issue 01 · April 2026" — plain text, no pill */
.bs-hero-meta {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.78);
}
.bs-hero-bottom {
  position: absolute;
  bottom: clamp(2rem, 5vw, 4rem);
  left: clamp(1.25rem, 4vw, 2.5rem);
  right: clamp(1.25rem, 4vw, 2.5rem);
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 2rem;
}
.bs-hero-title {
  font-size: clamp(3rem, 8vw, 4.375rem);
  color: #fff;
  line-height: 0.92;
}
.bs-hero-lede {
  color: rgba(255,255,255,0.95);
  margin-top: 1.25rem;
  max-width: 26ch;
  font-size: clamp(1.05rem, 1.7vw, 1.65rem);
}
.bs-hero-aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1.25rem;
}
.bs-hero-blurb {
  color: rgba(255,255,255,0.7);
  max-width: 32ch;
  text-align: right;
  line-height: 1.6;
}
.bs-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: #fff;
  color: #111;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
}
.bs-hero-link { display: block; text-decoration: none; color: inherit; position: relative; }

@media (max-width: 720px) {
  .bs-hero-bottom  { grid-template-columns: 1fr; gap: 1.5rem; }
  .bs-hero-aside   { align-items: flex-start; }
  .bs-hero-blurb   { text-align: left; max-width: 36ch; }
  .bs-hero-top     { top: calc(82px + 0.75rem); }
  .bs-hero-meta    { display: none; }
}

/* ── Studio intro ───────────────────────────── */
.bs-intro-section { padding: clamp(3.5rem, 8vw, 6rem) 0 clamp(3rem, 7vw, 5.5rem); }
.bs-intro-grid {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 3rem;
  align-items: start;
}
.bs-intro-meta { color: var(--text-dim); margin-top: 0.5rem; }
.bs-intro-lede { max-width: 32ch; font-size: clamp(1.25rem, 2.4vw, 2.1rem); }
@media (max-width: 720px) {
  .bs-intro-grid { grid-template-columns: 1fr; gap: 1.25rem; }
}

/* ── Work Index ─────────────────────────────── */
.bs-work-section { padding: clamp(3.5rem, 8vw, 6rem) 0 clamp(3rem, 7vw, 5rem); }
.bs-index-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  gap: 1.25rem;
}
.bs-index-title   { font-size: clamp(1.65rem, 3vw, 2.5rem); }
.bs-index-filters { display: flex; gap: 1.25rem; align-items: baseline; flex-wrap: wrap; }

.bs-filter {
  background: transparent;
  border: none;
  padding: 2px 0;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  border-bottom: 0.5px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.bs-filter:hover    { color: var(--text-muted); }
.bs-filter.is-active { color: var(--text); border-bottom-color: var(--text); }

.bs-index { list-style: none; border-top: 0.5px solid var(--line); }
.bs-index-row { border-bottom: 0.5px solid var(--line); }
.bs-index-row[data-hidden="true"] { display: none; }

.bs-index-link {
  display: grid;
  grid-template-columns: 48px 280px 1fr 32px;
  gap: clamp(1rem, 3vw, 2.5rem);
  align-items: start;
  padding: clamp(1.5rem, 3vw, 2.25rem) 0;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s ease;
}
a.bs-index-link:hover                  { background: rgba(255,255,255,0.015); }
a.bs-index-link:hover .bs-cardmedia    { transform: translate(-50%, -50%) scale(1.02); }
a.bs-index-link:hover .bs-index-arrow  { transform: translateX(4px); color: var(--text); }

.bs-index-num { color: var(--text-dim); padding-top: 0.4rem; }

.bs-index-media {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: #000;
  border: 0.5px solid var(--line);
}
.bs-cardmedia {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: max(100%, 177.78%);
  height: max(100%, 56.25%);
  min-width: 100%; min-height: 100%;
  transition: transform 0.6s ease;
}
.bs-cardmedia iframe {
  width: 100%; height: 100%;
  border: none; pointer-events: none; display: block;
}

.bs-index-body { min-width: 0; }
.bs-index-titleline {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.4rem;
}
.bs-index-projecttitle { font-size: clamp(1.75rem, 3.2vw, 2.5rem); }
.bs-index-status {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}
.bs-index-subtitle { font-size: clamp(1rem, 1.5vw, 1.2rem); color: var(--text); margin-bottom: 0.85rem; }
.bs-index-summary  { max-width: 62ch; margin-bottom: 1.5rem; font-size: 0.95rem; }

.bs-index-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1.25rem 2rem;
  border-top: 0.5px solid var(--line);
  padding-top: 1rem;
}
.bs-index-meta > div { display: flex; flex-direction: column; gap: 0.35rem; }
.bs-index-meta dt {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.bs-index-meta dd { font-family: var(--font-body); font-size: 0.875rem; color: var(--text); font-weight: 400; }
.bs-index-tags-cell dd { display: flex; flex-wrap: wrap; gap: 0.35rem; }

.bs-index-arrow { color: var(--text-dim); padding-top: 0.5rem; transition: transform 0.25s ease, color 0.25s ease; }

@media (max-width: 1024px) {
  .bs-index-link { grid-template-columns: 32px 220px 1fr 24px; gap: 1.25rem; }
  .bs-index-summary { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
}
@media (max-width: 720px) {
  .bs-index-link { grid-template-columns: 1fr; gap: 1rem; padding: 1.5rem 0; }
  .bs-index-num, .bs-index-arrow { display: none; }
  .bs-index-media { width: 100%; }
  .bs-index-projecttitle { font-size: 1.75rem; }
  .bs-index-summary { -webkit-line-clamp: unset; }
}

/* ── Footer ─────────────────────────────────── */
.bs-footer {
  border-top: 0.5px solid var(--line);
  padding: 3rem 0 2.5rem;
  margin-top: 6rem;
}
.bs-footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: end;
}
.bs-footer-right { text-align: right; }
@media (max-width: 600px) {
  .bs-footer-grid  { grid-template-columns: 1fr; gap: 1.5rem; }
  .bs-footer-right { text-align: left; }
}

/* ── Nav mobile ─────────────────────────────── */
@media (max-width: 640px) {
  .bs-nav-row    { grid-template-columns: auto auto !important; gap: 0.5rem !important; }
  .bs-nav-links  { display: none !important; }
}
