/* =========================================================
   BUBS MEDIA · stylesheet
   Cinematic editorial — onyx canvas, cream type, warm gold.
   ========================================================= */

:root {
  /* palette: onyx (default) */
  --bg: #0a0908;
  --bg-2: #131210;
  --bg-elev: #1a1814;
  --rule: #2a2722;
  --cream: #ede4d3;
  --cream-2: #cbc1ad;
  --dim: #7a7468;
  --dim-2: #4a463e;
  --accent: oklch(0.78 0.10 75);
  --accent-2: oklch(0.55 0.08 75);

  --maxw: 1440px;
  --pad-x: clamp(20px, 4vw, 64px);
  --pad-y: clamp(80px, 9vw, 160px);
  --section-gap: clamp(120px, 14vw, 220px);

  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Geist", ui-sans-serif, system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "JetBrains Mono", monospace;
}

/* Tighten everything for tweaks=tight */
body[data-density="tight"] {
  --pad-y: clamp(56px, 6vw, 96px);
  --section-gap: clamp(64px, 8vw, 120px);
}

/* alt palette: bone (light) */
body[data-palette="bone"] {
  --bg: #ebe6dc;
  --bg-2: #e2dccf;
  --bg-elev: #d9d2c2;
  --rule: #c2b9a4;
  --cream: #1c1a16;
  --cream-2: #3a3730;
  --dim: #6e6757;
  --dim-2: #a39c8a;
  --accent: oklch(0.55 0.12 50);
  --accent-2: oklch(0.40 0.10 50);
}

/* alt palette: ink (deep blue) */
body[data-palette="ink"] {
  --bg: #060a14;
  --bg-2: #0c1220;
  --bg-elev: #121b30;
  --rule: #1f2a44;
  --cream: #dde3ef;
  --cream-2: #a8b1c4;
  --dim: #6d7793;
  --dim-2: #3d4661;
  --accent: oklch(0.78 0.10 240);
  --accent-2: oklch(0.55 0.08 240);
}

/* alt palette: rust */
body[data-palette="rust"] {
  --bg: #0d0907;
  --bg-2: #14100c;
  --bg-elev: #1c1612;
  --rule: #2e251f;
  --cream: #f1e6d6;
  --cream-2: #c9bba6;
  --dim: #7d6f5d;
  --dim-2: #4a4036;
  --accent: oklch(0.62 0.16 40);
  --accent-2: oklch(0.45 0.12 40);
}

/* ---------- reset / base ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--cream);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  letter-spacing: -0.005em;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img, svg { display: block; max-width: 100%; }
.mono { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.dim { color: var(--dim); }
em { font-family: var(--serif); font-style: italic; font-weight: 400; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 18px var(--pad-x);
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--cream);
  font-family: var(--serif);
  font-size: 21px;
  letter-spacing: -0.01em;
}
.brand__mark { color: var(--accent); }
.topnav {
  display: flex;
  gap: 28px;
  justify-self: center;
}
.topnav a {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cream-2);
  transition: color 120ms ease;
}
.topbar__meta {
  display: flex;
  gap: 18px;
  justify-self: end;
  align-items: center;
}

/* ---------- layout helpers ---------- */
main {
  max-width: 100%;
}
section {
  padding: var(--pad-y) var(--pad-x);
  border-bottom: 1px solid var(--rule);
}
.section-head {
  display: grid;
  gap: 32px;
  max-width: 920px;
  margin: 0 0 clamp(48px, 6vw, 88px);
}
.section-head--center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
.section-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 5.6vw, 84px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: pretty;
  padding-bottom: 0.08em;
}
.section-lede {
  margin: 0;
  max-width: 56ch;
  color: var(--cream-2);
  font-size: clamp(16px, 1.2vw, 19px);
  line-height: 1.6;
}
.section-banner {
  margin: 6px 0 0;
  font-family: var(--serif);
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--cream);
  text-wrap: balance;
  max-width: 24ch;
}
.section-banner em {
  color: var(--accent);
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: calc(100vh - 60px);
  padding-top: clamp(60px, 8vw, 120px);
  padding-bottom: clamp(40px, 5vw, 80px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(40px, 5vw, 80px);
  overflow: hidden;
  isolation: isolate;
}
.hero > * { position: relative; z-index: 1; }
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  color: var(--cream);
  pointer-events: none;
}
.hero__bg-svg {
  width: 100%;
  height: 100%;
  display: block;
}
.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 80% at 50% 50%, transparent 0%, var(--bg) 95%),
    linear-gradient(180deg, var(--bg) 0%, transparent 18%, transparent 82%, var(--bg) 100%);
  pointer-events: none;
}
.hero__corners {
  display: flex;
  justify-content: space-between;
}
.hero__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 8vw, 96px);
  line-height: 1.0;
  letter-spacing: -0.025em;
  text-wrap: balance;
  padding-bottom: 0.06em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}
@media (max-width: 720px) {
  .hero__title { white-space: normal; }
}
.hero__title em {
  color: var(--accent);
  display: inline-block;
}
.hero__sub {
  max-width: 56ch;
  margin-left: auto;
}
.hero__sub p {
  margin: 0;
  color: var(--cream-2);
  font-size: clamp(17px, 1.4vw, 22px);
  line-height: 1.5;
}
.hero__sub em { color: var(--cream); }

/* ticker — recent releases */
.hero__ticker {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 18px 0;
  margin: 0 calc(-1 * var(--pad-x));
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.ticker__row {
  display: flex;
  align-items: center;
  gap: 32px;
  white-space: nowrap;
  animation: ticker 90s linear infinite;
  width: max-content;
  padding: 0 24px;
}
@keyframes ticker {
  to { transform: translateX(-50%); }
}
.ticker__sep {
  width: 1px;
  height: 32px;
  background: var(--rule);
  flex-shrink: 0;
}
.ticker__card {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.ticker__thumb {
  width: 64px;
  height: 36px;
  flex-shrink: 0;
  background-color: var(--bg-elev);
  background-size: 6px 6px;
  background-position: 0 0;
  border: 1px solid var(--rule);
  position: relative;
  overflow: hidden;
}
.ticker__thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 60%, color-mix(in oklab, var(--accent) 18%, transparent));
}
.ticker__thumb--finance {
  background-image:
    repeating-linear-gradient(-45deg, color-mix(in oklab, var(--cream) 12%, transparent) 0 1px, transparent 1px 8px);
}
.ticker__thumb--tech {
  background-image:
    radial-gradient(color-mix(in oklab, var(--cream) 22%, transparent) 1px, transparent 1px);
  background-size: 5px 5px;
}
.ticker__thumb--history {
  background-image:
    repeating-linear-gradient(35deg, color-mix(in oklab, var(--cream) 14%, transparent) 0 0.8px, transparent 0.8px 6px);
}
.ticker__meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.ticker__handle {
  color: var(--accent);
  font-size: 10px;
}
.ticker__title {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--cream);
  max-width: 340px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ticker__when {
  margin-left: 4px;
  font-size: 10px;
  align-self: center;
}

@media (max-width: 720px) {
  .ticker__row { animation-duration: 60s; }
  .ticker__title { font-size: 15px; max-width: 220px; }
}

.hero__foot {
  display: flex;
  justify-content: flex-start;
  align-items: end;
  gap: 24px;
  flex-wrap: wrap;
}
.hero__scroll {
  display: inline-flex;
  align-items: baseline;
  gap: 14px;
  color: var(--cream);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color 200ms ease, border-color 200ms ease;
}
.hero__scroll:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.hero__scroll-num {
  font-size: 11px;
  letter-spacing: 0.08em;
}
.hero__scroll-label {
  font-family: var(--serif);
  font-size: clamp(22px, 2.2vw, 32px);
  letter-spacing: -0.01em;
  text-transform: none;
}
.hero__scroll-label em {
  color: var(--accent);
}
.hero__scroll-arrow {
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0;
  transition: transform 240ms ease;
}
.hero__scroll:hover .hero__scroll-arrow {
  transform: translateY(3px);
}
.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, auto));
  gap: 48px;
}
.hero__stats > div {
  display: grid;
  gap: 4px;
}
.hero__stats .num {
  font-family: var(--serif);
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1;
  letter-spacing: -0.02em;
}

/* ---------- CHANNELS ---------- */
.channels {
  background: var(--bg-2);
}
.channel-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
@media (max-width: 1000px) {
  .channel-grid { grid-template-columns: 1fr; }
}
.channel {
  display: grid;
  gap: 24px;
  padding: 24px;
  border: 1px solid var(--rule);
  background: var(--bg);
  transition: border-color 200ms ease, transform 400ms ease;
}
.channel:hover {
  border-color: var(--accent-2);
}
.channel__thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--bg-elev);
  color: var(--cream-2);
  overflow: hidden;
  border: 1px solid var(--rule);
}
.channel__art {
  width: 100%;
  height: 100%;
  color: var(--cream-2);
}
.channel__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 8px;
  background: var(--bg);
  border: 1px solid var(--rule);
  color: var(--accent);
}
.channel__meta { display: grid; gap: 12px; }
.channel__handle { color: var(--accent); }
.channel__name {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 2.3vw, 36px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.channel__desc {
  margin: 0;
  color: var(--cream-2);
  font-size: 15px;
  line-height: 1.55;
}
.channel__tags {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.channel__tags li {
  padding: 4px 10px;
  border: 1px solid var(--rule);
  color: var(--dim);
}
.channels__note {
  margin-top: clamp(48px, 5vw, 88px);
  padding: 18px 20px;
  border-left: 2px solid var(--accent);
  max-width: 72ch;
  color: var(--cream-2);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: none;
  line-height: 1.7;
}

/* Currently shipping feed */
.shipping {
  margin-top: clamp(40px, 5vw, 64px);
  border-top: 1px solid var(--rule);
  padding-top: 28px;
}
.shipping__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.shipping__pulse {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
}
.pulse {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 60%, transparent);
  animation: pulse 1.8s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 60%, transparent); }
  100% { box-shadow: 0 0 0 12px transparent; }
}
.shipping__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.shipping__list li {
  display: grid;
  grid-template-columns: 200px 1fr 140px;
  gap: 24px;
  align-items: baseline;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
}
.shipping__handle {
  color: var(--accent);
}
.shipping__title {
  font-family: var(--serif);
  font-size: clamp(20px, 1.8vw, 26px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--cream);
}
.shipping__when { justify-self: end; }

@media (max-width: 800px) {
  .shipping__list li { grid-template-columns: 1fr; gap: 4px; }
  .shipping__when { justify-self: start; }
}

/* ---------- PIPELINE ---------- */
.pipeline {}
.pipeline__diagram {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 48px;
}
.pipeline__track {
  position: absolute;
  left: 0; right: 0;
  top: 28px;
  height: 1px;
  background: var(--rule);
}
.stage {
  position: relative;
  background: transparent;
  border: 0;
  padding: 16px 12px 22px;
  text-align: left;
  color: inherit;
  cursor: pointer;
  font: inherit;
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--rule);
  transition: background 200ms ease;
}
.stage::before {
  content: "";
  position: absolute;
  top: 23px;
  left: 12px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--dim);
  transition: all 200ms ease;
}
.stage--active::before,
.stage:hover::before {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 25%, transparent);
}
.stage__num {
  color: var(--dim);
  padding-left: 22px;
  padding-top: 4px;
}
.stage--active .stage__num,
.stage:hover .stage__num { color: var(--accent); }

.stage__name {
  font-family: var(--serif);
  font-size: clamp(20px, 1.8vw, 26px);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.stage__hint {
  font-size: 10px;
}

.pipeline__detail {
  position: relative;
  border: 1px solid var(--rule);
  background: var(--bg-2);
  padding: clamp(28px, 3.5vw, 56px);
  min-height: 280px;
}
.detail {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(28px, 4vw, 80px);
  opacity: 0;
  position: absolute;
  inset: clamp(28px, 3.5vw, 56px);
  pointer-events: none;
  transition: opacity 250ms ease;
}
.detail--active {
  opacity: 1;
  position: relative;
  inset: auto;
  pointer-events: auto;
}
.detail__col { display: grid; gap: 14px; align-content: start; }
.detail h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(32px, 3.2vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.detail p {
  margin: 0;
  color: var(--cream-2);
  font-size: clamp(15px, 1.1vw, 18px);
  line-height: 1.6;
}
.detail__col--list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--rule);
  align-content: start;
}
.detail__col--list > div {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 16px;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
}
.detail__col--list span:last-child {
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: -0.01em;
}

@media (max-width: 900px) {
  .pipeline__diagram { grid-template-columns: repeat(2, 1fr); }
  .pipeline__track { display: none; }
  .stage::before { display: none; }
  .stage__num { padding-left: 0; }
  .detail { grid-template-columns: 1fr; }
}

/* ---------- MANIFESTO ---------- */
.manifesto {
  background: var(--bg-2);
}
.tenets {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 1100px;
  margin-inline: auto;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--rule);
}
.tenets li {
  display: grid;
  grid-template-columns: 80px 1fr 2fr;
  gap: 32px;
  align-items: baseline;
  padding: 32px 0;
  border-bottom: 1px solid var(--rule);
}
.tenet__num {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--accent);
  font-style: italic;
}
.tenets h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(24px, 2.2vw, 32px);
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.tenets p {
  margin: 0;
  color: var(--cream-2);
  font-size: clamp(15px, 1.1vw, 18px);
  line-height: 1.55;
  max-width: 56ch;
}
@media (max-width: 800px) {
  .tenets li { grid-template-columns: 1fr; gap: 12px; }
}

/* ---------- CONTACT ---------- */
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: start;
}
.contact__lead h2 {
  margin: 18px 0 24px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(48px, 6vw, 96px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  padding-bottom: 0.08em;
}
.contact__lead p {
  margin: 0;
  max-width: 50ch;
  color: var(--cream-2);
  font-size: clamp(16px, 1.2vw, 19px);
  line-height: 1.55;
}
.contact__lines {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  border-top: 1px solid var(--rule);
}
.contact__lines li {
  display: grid;
  grid-template-columns: 200px 1fr;
  align-items: baseline;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
}
.contact__lines a {
  font-family: var(--serif);
  font-size: clamp(22px, 2vw, 32px);
  letter-spacing: -0.01em;
}
.contact__lines a:hover { color: var(--accent); }
.contact__lines li > span:last-child {
  font-family: var(--serif);
  font-size: clamp(22px, 2vw, 32px);
  letter-spacing: -0.01em;
}
@media (max-width: 900px) {
  .contact__grid { grid-template-columns: 1fr; }
  .contact__lines li { grid-template-columns: 1fr; gap: 4px; }
}

/* ---------- FOUNDER (hidden) ---------- */
.is-hidden { display: none; }

/* ---------- FOOTER ---------- */
.foot {
  padding: 40px var(--pad-x);
  background: var(--bg);
}
.foot__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}
.foot__badge {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  opacity: 0.92;
  transition: opacity 200ms ease;
}
.foot__badge:hover { opacity: 1; }
.foot__badge img {
  height: 64px;
  width: auto;
  display: block;
}

/* ---------- responsive nav ---------- */
@media (max-width: 720px) {
  .topbar { grid-template-columns: 1fr auto; }
  .topnav { display: none; }
  .topbar__meta { display: none; }
  .hero__corners { flex-direction: column; gap: 6px; }
  .hero__stats { grid-template-columns: 1fr 1fr; gap: 20px; }
  .channel-grid { grid-template-columns: 1fr; }
}
