/* OpenJug landing — light-only theme. Teal = browser-side, coral = server-side. */

:root {
  --paper: #fbfaf7;
  --surface: #ffffff;
  --surface-sunk: #f4f2ec;
  --ink: #1b1c1f;
  --ink-soft: #484c53;
  --muted: #6c7078;
  --line: #e8e5dd;
  --line-strong: #d6d2c6;
  --browser: #0e94a4;
  --browser-soft: #e0f2f4;
  --server: #f4623a;
  --server-soft: #fdeae4;
  --server-ink: #c8451f;
  --sun-soft: #fff6e2;
  --shadow: 0 1px 2px rgba(27, 28, 31, 0.04), 0 14px 34px -18px rgba(27, 28, 31, 0.22);
  --meta: #0866ff;
  --google: #4285f4;
  --tiktok: #111114;
  --pinterest: #e60023;
  --linkedin: #0a66c2;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: "Schibsted Grotesk", ui-sans-serif, system-ui, sans-serif;
  text-wrap: balance;
  margin: 0;
  letter-spacing: -0.02em;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid var(--server);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  background: var(--server);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

/* ---------- sticky nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 250, 247, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: "Schibsted Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.12rem;
  line-height: 1;
  letter-spacing: -0.02em;
  text-decoration: none;
  flex: none;
}

.jug {
  width: 1em;
  height: 1em;
  display: block;
  flex: none;
  color: var(--server);
  overflow: visible;
}

.brand .jug {
  width: 1.2em;
  height: 1.2em;
  /* Cap-height optical align: jug silhouette reads high in its box */
  translate: 0 0.06em;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  margin-left: auto;
}

.nav-links a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.2rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.12s, border-color 0.12s;
}

.nav-links a:hover {
  color: var(--server-ink);
  border-bottom-color: var(--server);
}

.site-header .btn {
  padding: 0.55rem 1.15rem;
  font-size: 0.9rem;
  flex: none;
}

@media (max-width: 820px) {
  .nav-links {
    display: none;
  }

  .site-header .btn {
    margin-left: auto;
  }
}

.band {
  padding: 5.5rem 1.5rem;
  scroll-margin-top: 72px;
}

.band + .band {
  border-top: 1px solid var(--line);
}

.inner {
  max-width: 1060px;
  margin: 0 auto;
}

.narrow {
  max-width: 680px;
}

.eyebrow {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--server-ink);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1.1rem;
}

.eyebrow::before {
  content: "";
  width: 20px;
  height: 3px;
  border-radius: 2px;
  background: var(--server);
  flex: none;
}

h2.sec {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  line-height: 1.1;
  font-weight: 700;
  margin-bottom: 1rem;
}

.lede {
  font-size: 1.06rem;
  color: var(--ink-soft);
  max-width: 62ch;
  margin: 0;
}

.lede-follow {
  margin-top: 2rem;
}

/* ---------- hero ---------- */
.hero {
  padding: 4rem 1.5rem;
  scroll-margin-top: 72px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-grid > * {
  min-width: 0;
}

@media (max-width: 940px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

.hero-grid figure {
  margin: 0;
}

.hero h1 {
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  line-height: 1.06;
  font-weight: 700;
}

.hero .h-weak {
  color: var(--muted);
  font-weight: 500;
}

.hero .h-weak em {
  font-style: normal;
  color: var(--browser);
}

.hero .h-strong {
  color: var(--ink);
}

.hero .h-strong em {
  font-style: normal;
  color: var(--server);
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 1.6rem 0 0;
}

.cta-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.hero .cta-row {
  margin-top: 2.2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1.7rem;
  border-radius: 999px;
  font-family: "Schibsted Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  background: var(--server);
  color: #fff;
  border: 2px solid var(--server);
  transition: transform 0.12s;
  box-shadow: 0 6px 16px -8px var(--server);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
  box-shadow: none;
}

/* ---------- figures ---------- */
figure {
  margin: 2.8rem 0 0;
}

figure svg {
  width: 100%;
  height: auto;
  display: block;
}

figcaption {
  font-size: 0.84rem;
  color: var(--muted);
  margin-top: 1.1rem;
  max-width: 62ch;
}

.diagram-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.4rem;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.diagram-wrap svg {
  width: 100%;
  height: auto;
  display: block;
  min-width: 0;
}

.diagram-wrap.compact {
  padding: 1.1rem;
}

/* Desktop: keep wide SVGs comfortably readable via light scroll only if needed */
@media (min-width: 761px) {
  .diagram-wrap:not(.diagram-wrap--fluid) {
    overflow-x: auto;
  }

  .diagram-wrap:not(.diagram-wrap--fluid) svg {
    min-width: 620px;
  }

  .diagram-wrap.compact:not(.diagram-wrap--fluid) svg {
    min-width: 430px;
  }
}

.diagram-desktop {
  display: none;
}

.timeline-mobile {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.15rem 1.15rem 1.25rem;
  box-shadow: var(--shadow);
}

.tl-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.tl-step {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 0.85rem;
  position: relative;
  padding-bottom: 1.25rem;
}

.tl-step:last-child {
  padding-bottom: 0;
}

.tl-rail {
  position: relative;
  display: flex;
  justify-content: center;
}

.tl-rail::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: -1.25rem;
  width: 2px;
  background: var(--line-strong);
}

.tl-step:last-child .tl-rail::before {
  display: none;
}

.tl-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--server);
  margin-top: 4px;
  position: relative;
  z-index: 1;
  flex: none;
}

.tl-time {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.2rem;
}

.tl-name {
  font-family: "Schibsted Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  margin: 0 0 0.15rem;
}

.tl-copy {
  margin: 0 0 0.7rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.tl-cov {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tl-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  color: var(--muted);
  background: var(--surface-sunk);
}

.tl-chip::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line-strong);
  flex: none;
}

.tl-chip.is-on {
  color: var(--ink);
  background: var(--surface);
}

.tl-chip.is-on.tl-chip--browser::before {
  background: var(--browser);
}

.tl-chip.is-on.tl-chip--server::before {
  background: var(--server);
}

.tl-chip.is-off {
  opacity: 0.72;
}

.tl-summary {
  margin: 1.15rem 0 0;
  padding-top: 0.95rem;
  border-top: 1px solid var(--line);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.tl-summary strong {
  color: var(--ink);
  font-weight: 600;
}

@media (min-width: 761px) {
  .diagram-desktop {
    display: block;
  }

  .timeline-mobile {
    display: none;
  }
}

.node-box {
  fill: var(--surface);
  stroke: var(--line-strong);
  stroke-width: 1.5;
}

.node-faint {
  fill: var(--surface);
  stroke: var(--line-strong);
  stroke-width: 1.5;
  stroke-dasharray: 5 4;
}

.node-name {
  fill: var(--ink);
  font-family: "Schibsted Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-weight: 600;
  font-size: 15px;
}

.node-sm {
  fill: var(--ink);
  font-family: "Schibsted Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-weight: 600;
  font-size: 13.5px;
}

.node-label {
  fill: var(--muted);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 1.4px;
}

.hub-circle {
  fill: var(--server);
}

.hub-text {
  fill: #fff;
  font-family: "Schibsted Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-weight: 700;
  font-size: 14px;
}

.spoke {
  stroke: var(--server);
  stroke-width: 2.2;
  fill: none;
}

.feed {
  stroke: var(--line-strong);
  stroke-width: 2.2;
  fill: none;
}

.arrow-server {
  fill: var(--server);
}

.arrow-neutral {
  fill: var(--line-strong);
}

.logo-tile {
  rx: 6;
}

.axis {
  stroke: var(--line-strong);
  stroke-width: 2;
}

.guide {
  stroke: var(--line);
  stroke-width: 1.5;
  stroke-dasharray: 3 5;
}

.dot-server {
  fill: var(--server);
}

.dot-browser {
  fill: var(--browser);
}

.dot-empty {
  fill: var(--surface);
  stroke: var(--line-strong);
  stroke-width: 1.8;
}

.row-label {
  fill: var(--ink-soft);
  font-family: "Schibsted Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-weight: 600;
  font-size: 12.5px;
}

.tl-time {
  fill: var(--muted);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.8px;
}

.tl-name {
  fill: var(--ink);
  font-family: "Schibsted Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-weight: 700;
  font-size: 15px;
}

.tl-desc {
  fill: var(--ink-soft);
  font-family: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  font-size: 11.5px;
}

.path-browser {
  stroke: var(--browser);
  stroke-width: 2.4;
  fill: none;
  stroke-dasharray: 2 5;
  stroke-linecap: round;
}

.path-browser-faded {
  stroke: var(--browser);
  stroke-width: 2.4;
  fill: none;
  stroke-dasharray: 2 5;
  stroke-linecap: round;
  opacity: 0.35;
}

.path-server {
  stroke: var(--server);
  stroke-width: 2.6;
  fill: none;
}

.break-x {
  stroke: var(--server-ink);
  stroke-width: 2.6;
  stroke-linecap: round;
}

.lane-label {
  fill: var(--muted);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: 1.3px;
}

/* ---------- bar chart ---------- */
.fig-row {
  margin-bottom: 1.7rem;
}

.fig-row:last-of-type {
  margin-bottom: 0;
}

.fig-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.55rem;
  flex-wrap: wrap;
}

.fig-label {
  font-family: "Schibsted Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.98rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.swatch {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  flex: none;
}

.sw-browser {
  background: var(--browser);
}

.sw-server {
  background: var(--server);
}

.fig-value {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.82rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.bar {
  display: flex;
  height: 50px;
  gap: 2px;
}

.seg {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  transition: filter 0.15s;
}

.seg:first-child {
  border-radius: 10px 0 0 10px;
}

.seg:last-child {
  border-radius: 0 10px 10px 0;
}

.seg-filled {
  background: var(--browser);
}

.seg-server {
  background: var(--server);
  border-radius: 10px;
}

.seg-lost {
  background: repeating-linear-gradient(
    135deg,
    var(--line-strong) 0 1px,
    transparent 1px 7px
  );
  border: 1.5px dashed var(--line-strong);
}

.seg-num {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.seg-lost .seg-num {
  color: var(--ink-soft);
  background: var(--paper);
  padding: 0.1rem 0.32rem;
  border-radius: 5px;
}

.bar:hover .seg {
  filter: saturate(0.65);
}

.bar .seg:hover {
  filter: none;
}

.seg[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  color: var(--ink);
  border: 1.5px solid var(--line-strong);
  font-family: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  white-space: nowrap;
  z-index: 5;
  pointer-events: none;
  box-shadow: var(--shadow);
}

.lost-legend {
  display: flex;
  gap: 1.1rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* ---------- compare / coverage ---------- */
.compare,
.coverage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
  margin-top: 2.6rem;
}

@media (max-width: 720px) {
  .compare,
  .coverage {
    grid-template-columns: 1fr;
  }
}

.col,
.cov-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.5rem;
}

.col.is-server,
.cov-card.is-server {
  border-color: var(--server);
  border-width: 2px;
  box-shadow: var(--shadow);
}

.col-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--line);
}

.col-title {
  font-family: "Schibsted Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.02rem;
}

.fields {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.fields li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.fields li.absent {
  color: var(--muted);
}

.tick {
  width: 16px;
  flex: none;
  text-align: center;
  font-weight: 700;
  color: var(--server);
}

.cross {
  width: 16px;
  flex: none;
  text-align: center;
  color: var(--muted);
}

.cov-label {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.9rem;
}

.cov-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.plat {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.95rem 0.5rem 0.5rem;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  font-family: "Schibsted Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
}

.plat-icon {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.plat-icon svg,
.plat-icon img {
  width: 14px;
  height: 14px;
  display: block;
  color: inherit;
  fill: currentColor;
}

.plat-icon--google {
  background: #fff;
  border: 1px solid var(--line);
}

.plat-icon--google svg,
.plat-icon--google img {
  width: 15px;
  height: 15px;
}

.i-meta {
  background: var(--meta);
}

.i-google {
  background: var(--google);
}

.i-tiktok {
  background: var(--tiktok);
}

.i-pinterest {
  background: var(--pinterest);
}

.i-linkedin {
  background: var(--linkedin);
}

.cov-foot {
  font-size: 0.86rem;
  color: var(--muted);
  margin: 1.1rem 0 0;
}

/* ---------- points ---------- */
.points {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.7rem;
  margin-top: 2.4rem;
}

@media (max-width: 760px) {
  .points {
    grid-template-columns: 1fr;
  }
}

.point h3 {
  font-family: "Schibsted Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.08rem;
  margin-bottom: 0.4rem;
}

.point p {
  margin: 0;
  font-size: 0.94rem;
  color: var(--ink-soft);
}

.point-rule {
  width: 28px;
  height: 3px;
  border-radius: 2px;
  background: var(--server);
  margin-bottom: 0.85rem;
}

/* ---------- partner ---------- */
.partner {
  background: var(--sun-soft);
}

.partner .inner {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 800px) {
  .partner .inner {
    grid-template-columns: 1fr;
  }
}

.partner-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.partner-list li {
  display: flex;
  gap: 0.7rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.close h2 {
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  line-height: 1.08;
  font-weight: 700;
  max-width: 24ch;
}

.close .lede {
  margin-top: 1.2rem;
}

.site-footer {
  padding: 2.5rem 1.5rem 3.5rem;
  border-top: 1px solid var(--line);
}

.foot-inner {
  max-width: 1060px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.legal {
  font-size: 0.76rem;
  color: var(--muted);
  max-width: 62ch;
  line-height: 1.5;
  margin: 0;
}
