/*
  base.css — Trelleborg Cowork pilot site.

  Every layout primitive subpages will reuse: resets, body type, headings,
  the signature overlapping-headline technique, eyebrow labels, cards,
  tables, navigation, footer. Page-local <style> blocks should only add
  layout genuinely unique to one page.

  Pairs with tokens.css. Reads no values it does not derive from there.
*/

* { box-sizing: border-box; }

html {
  background: var(--bg);
  color: var(--ink);
}

body {
  font: var(--tb-book) 16.5px/1.55 var(--tb-font);
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); }
a:hover { color: var(--tb-gold); }

/* ──────────────────────────────────────────────────────────────────── */
/* LAYOUT                                                               */
/* ──────────────────────────────────────────────────────────────────── */

.wrap {
  max-width: var(--wrap-max);
  margin: 0 auto;
  padding: 0 var(--s-6) var(--s-10);
}

/* ──────────────────────────────────────────────────────────────────── */
/* NAVIGATION — copied verbatim into every page                         */
/* ──────────────────────────────────────────────────────────────────── */

nav.site {
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}
nav.site .nav-inner {
  max-width: var(--wrap-max);
  margin: 0 auto;
  padding: var(--s-4) var(--s-6);
  display: flex;
  align-items: center;
  gap: var(--s-6);
}
nav.site .brand {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  text-decoration: none;
}
nav.site .brand img {
  height: 26px;
  width: auto;
  display: block;
}
nav.site .brand .brand-label {
  font: var(--tb-demi) 11px/1 var(--tb-font);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink);
}
nav.site .brand .brand-label .sep {
  color: var(--tb-gold);
  margin: 0 0.4em;
}
nav.site ul {
  list-style: none;
  display: flex;
  gap: var(--s-5);
  padding: 0;
  margin: 0 0 0 auto;
  flex-wrap: wrap;
}
nav.site ul a {
  font: var(--tb-demi) 12px/1 var(--tb-font);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  color: var(--ink-soft);
  padding: var(--s-2) 0;
  border-bottom: 1.5px solid transparent;
}
nav.site ul a:hover,
nav.site ul a.is-active {
  color: var(--ink);
  border-bottom-color: var(--tb-gold);
}

@media (max-width: 720px) {
  nav.site .nav-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s-3);
  }
  nav.site ul {
    margin-left: 0;
    gap: var(--s-4);
  }
}

/* ──────────────────────────────────────────────────────────────────── */
/* HERO + OVERLAPPING HEADLINE — signature Trelleborg                   */
/* ──────────────────────────────────────────────────────────────────── */

header.hero {
  padding: var(--s-9) 0 var(--s-7);
  border-bottom: 1px solid var(--rule);
}

header.hero h1 {
  font: var(--tb-demi) clamp(36px, 4.8vw, 56px) / 1.1 var(--tb-font);
  letter-spacing: -0.018em;
  margin: var(--s-4) 0 var(--s-5);
  color: var(--ink);
  max-width: 22ch;
}

.lede {
  font: var(--tb-book) 18px/1.5 var(--tb-font);
  color: var(--ink-soft);
  max-width: 62ch;
  margin: var(--s-5) 0 0;
}

/* ──────────────────────────────────────────────────────────────────── */
/* EYEBROW — UPPERCASE Libre Franklin Bold + gold ::before rule         */
/* ──────────────────────────────────────────────────────────────────── */

.eyebrow {
  font: var(--tb-demi) 11px/1 var(--tb-font);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--tb-gold);
  padding-left: 14px;
  position: relative;
  display: inline-block;
}
.eyebrow::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 8px;
  height: 1.5px;
  background: var(--tb-gold);
}

/* ──────────────────────────────────────────────────────────────────── */
/* SECTIONS + TYPE                                                      */
/* ──────────────────────────────────────────────────────────────────── */

section {
  padding: var(--s-8) 0;
  border-bottom: 1px solid var(--rule);
}
section:last-of-type { border-bottom: none; }

h2 {
  font: var(--tb-demi) clamp(22px, 2.4vw, 28px) / 1.2 var(--tb-font);
  letter-spacing: -0.01em;
  margin: var(--s-3) 0 var(--s-5);
}
h3 {
  font: var(--tb-demi) 15px/1.3 var(--tb-font);
  margin: 1.6em 0 0.4em;
}
p { max-width: 64ch; margin: 0 0 1em; }
.gold { color: var(--tb-gold); }

/* ──────────────────────────────────────────────────────────────────── */
/* CARDS — 1.5px solid border, NOT shadows. 14px radius.                */
/* ──────────────────────────────────────────────────────────────────── */

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-3);
  align-items: stretch;
  margin-top: var(--s-5);
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-3);
  align-items: stretch;
  margin-top: var(--s-5);
}
@media (max-width: 880px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

.card {
  background: var(--bg);
  border: var(--border-card) solid var(--rule);
  border-radius: var(--radius-card);
  padding: var(--s-5);
}
.card h3 { margin-top: 0; }
.card p {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 15px;
}
.card .tag {
  display: inline-block;
  font: var(--tb-demi) 10px/1 var(--tb-font);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--tb-gold);
  margin-bottom: 10px;
}

/* ──────────────────────────────────────────────────────────────────── */
/* TABLES                                                               */
/* ──────────────────────────────────────────────────────────────────── */

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14.5px;
  margin-top: var(--s-3);
}
th, td {
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}
th {
  font: var(--tb-demi) 11px/1 var(--tb-font);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

/* ──────────────────────────────────────────────────────────────────── */
/* INLINE CODE + PREFORMATTED                                           */
/* ──────────────────────────────────────────────────────────────────── */

code {
  font: 0.92em var(--tb-mono);
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  padding: 1px 5px;
  border-radius: var(--radius-inline);
}
pre.tree {
  background: var(--bg-soft);
  border: var(--border-card) solid var(--rule);
  border-radius: var(--radius-card);
  padding: 22px 24px;
  font: 13.5px/1.55 var(--tb-mono);
  color: var(--ink);
  overflow-x: auto;
  margin: var(--s-5) 0 0;
}
pre.tree .c { color: var(--ink-soft); }
pre.tree .g { color: var(--tb-gold); font-weight: 700; }

/* ──────────────────────────────────────────────────────────────────── */
/* CALLOUTS                                                             */
/* ──────────────────────────────────────────────────────────────────── */

.callout {
  border-left: 3px solid var(--tb-gold);
  padding: 8px 0 8px 18px;
  margin: 28px 0;
  max-width: 64ch;
  color: var(--ink);
}
.callout--warn { border-left-color: var(--tb-burgundy); }
.callout strong { font-weight: 700; }

/* ──────────────────────────────────────────────────────────────────── */
/* LISTS                                                                */
/* ──────────────────────────────────────────────────────────────────── */

ul.checks {
  list-style: none;
  padding: 0;
  margin: var(--s-4) 0 0;
  max-width: 64ch;
}
ul.checks li {
  padding: 10px 0 10px 28px;
  border-bottom: 1px solid var(--rule);
  position: relative;
  font-size: 15px;
}
ul.checks li:last-child { border-bottom: none; }
ul.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  width: 14px;
  height: 1.5px;
  background: var(--tb-gold);
}

ul.minus {
  list-style: none;
  padding: 0;
  margin: var(--s-4) 0 0;
  max-width: 64ch;
  color: var(--ink-soft);
}
ul.minus li {
  padding: 6px 0 6px 22px;
  position: relative;
  font-size: 15px;
}
ul.minus li::before {
  content: "—";
  position: absolute;
  left: 0;
  top: 6px;
  color: var(--tb-gold);
  font-weight: 700;
}

ol.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: var(--s-5) 0 0;
  max-width: 64ch;
}
ol.steps li {
  counter-increment: step;
  position: relative;
  padding: 14px 0 14px 56px;
  border-bottom: 1px solid var(--rule);
}
ol.steps li:last-child { border-bottom: none; }
ol.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 14px;
  font: var(--tb-demi) 13px/1 var(--tb-font);
  letter-spacing: 0.08em;
  color: var(--tb-gold);
}

/* ──────────────────────────────────────────────────────────────────── */
/* VIDEO GALLERY — thumbnails-with-link, no iframes                     */
/* ──────────────────────────────────────────────────────────────────── */

.videos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-3);
  margin-top: var(--s-5);
}
@media (max-width: 880px) {
  .videos { grid-template-columns: 1fr; }
}
.video {
  display: block;
  text-decoration: none;
  color: var(--ink);
  border: var(--border-card) solid var(--rule);
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--bg);
  transition: border-color 0.12s ease;
}
.video:hover {
  border-color: var(--tb-gold);
  color: var(--ink);
}
.video .thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--tb-black);
  position: relative;
}
.video .thumb::after {
  content: "▶";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 36px;
  color: var(--tb-gold);
  opacity: 0.9;
}
.video .meta {
  padding: var(--s-4) var(--s-5);
}
.video .meta .tag {
  display: inline-block;
  font: var(--tb-demi) 10px/1 var(--tb-font);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--tb-gold);
  margin-bottom: 8px;
}
.video .meta h3 {
  font: var(--tb-demi) 15px/1.3 var(--tb-font);
  margin: 0 0 6px;
}
.video .meta p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.45;
}

/* ──────────────────────────────────────────────────────────────────── */
/* CTA BUTTONS                                                          */
/* ──────────────────────────────────────────────────────────────────── */

.cta-row {
  display: flex;
  gap: var(--s-3);
  margin-top: var(--s-5);
  flex-wrap: wrap;
}
.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  font: var(--tb-demi) 13px/1 var(--tb-font);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-decoration: none;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  color: var(--ink);
  background: var(--bg);
  transition:
    background 0.12s ease,
    color 0.12s ease,
    border-color 0.12s ease;
}
.cta:hover {
  background: var(--ink);
  color: var(--bg);
}
.cta--primary {
  background: var(--ink);
  color: var(--bg);
}
.cta--primary:hover {
  background: var(--tb-gold);
  border-color: var(--tb-gold);
  color: var(--bg);
}
.cta .arrow { color: var(--tb-gold); }
.cta--primary:hover .arrow { color: var(--bg); }

/* ──────────────────────────────────────────────────────────────────── */
/* FOOTER                                                               */
/* ──────────────────────────────────────────────────────────────────── */

footer.site {
  background: var(--tb-black);
  color: var(--bg);
  padding: var(--s-7) 0;
  margin-top: var(--s-8);
}
footer.site .foot-inner {
  max-width: var(--wrap-max);
  margin: 0 auto;
  padding: 0 var(--s-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
  flex-wrap: wrap;
}
footer.site .foot-brand {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}
footer.site .foot-brand img {
  height: 28px;
  width: auto;
  display: block;
}
footer.site .foot-brand .label {
  font: var(--tb-demi) 11px/1 var(--tb-font);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--bg);
}
footer.site .foot-meta {
  font: var(--tb-book) 12px/1.5 var(--tb-font);
  color: #b3b3b3;
}
footer.site .foot-meta a {
  color: var(--bg);
  text-decoration: underline;
  text-decoration-color: var(--tb-gold);
  text-underline-offset: 3px;
}
