/* Zugzwang Studios — stylesheet */

/* ---------- Fonts (self-hosted) ---------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter Tight";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/inter-tight-latin-wght-normal.woff2") format("woff2");
}

/* ---------- Tokens ---------- */
:root {
  --bg: #f6f5f2;
  --paper: #fff;
  --ink: #111214;
  --ink-2: #2b2d31;
  --muted: #595b61;
  --line: #dcdad4;
  --accent: #c8401c;
  --accent-dark: #a5330f;

  --on-dark: #f6f5f2;
  --on-dark-muted: #a3a5ab;
  --line-dark: #2e3035;

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Inter Tight", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --maxw: 76rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --space-section: clamp(4.5rem, 11vw, 9rem);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body, h1, h2, h3, p, dl, dd, figure, address { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
svg { display: block; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
}
main { flex: 1 0 auto; }

@media (min-width: 60rem) {
  body { font-size: 1.0625rem; }
}

::selection { background: var(--accent-dark); color: #fff; }

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

:focus-visible {
  outline: 2px solid var(--accent-dark);
  outline-offset: 3px;
  border-radius: 2px;
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.nowrap { white-space: nowrap; }

.skip {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--on-dark);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 4px;
}
.skip:focus { top: 1rem; outline-color: var(--accent); }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--line); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  text-decoration: none;
}
.brand svg { width: 28px; height: 28px; flex: none; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.header-right { display: flex; align-items: center; gap: 2.25rem; }

.nav { display: none; }
@media (min-width: 48rem) {
  .nav { display: block; }
}
.nav ul { display: flex; gap: 1.75rem; }
.nav a {
  display: inline-block;
  padding-block: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
}
.nav a:hover { color: var(--ink); }

.lang ul {
  display: flex;
  align-items: center;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}
.lang li + li {
  margin-left: 0.6rem;
  padding-left: 0.6rem;
  border-left: 1px solid var(--line);
}
.lang a, .lang-current {
  display: inline-block;
  padding: 0.5rem 0.2rem;
  line-height: 1;
}
.lang-current { color: var(--ink); }
.lang a { color: var(--muted); text-decoration: none; }
.lang a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Eyebrow ---------- */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow--mark::before {
  content: "";
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  background: var(--accent);
}

/* ---------- Hero ---------- */
.hero { padding-block: clamp(4rem, 12vw, 9.5rem) clamp(4rem, 10vw, 8rem); }

.hero-grid {
  --h1: clamp(2.125rem, 1.3rem + 5vw, 5.75rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--h1);
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--ink);
  max-width: 15ch;
  text-wrap: balance;
  overflow-wrap: break-word;
  hyphens: auto;
}

.definition {
  display: grid;
  gap: 0.3rem;
  max-width: 34rem;
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--muted);
}
.definition dfn {
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.board-wrap { display: none; }

.board {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
}

@media (min-width: 60rem) {
  .hero-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 2rem;
  }
  .hero-eyebrow { grid-column: 1 / -1; grid-row: 1; }
  .hero h1 { grid-column: 1 / span 8; grid-row: 2; }
  .definition { grid-column: 1 / span 7; grid-row: 3; }
  .board-wrap {
    display: block;
    grid-column: 10 / span 3;
    grid-row: 2;
    align-self: start;
    /* align the board's top edge with the cap height of the first headline line */
    margin-top: calc(var(--h1) * 0.147);
    border: 1px solid var(--line);
    background: var(--bg);
  }
}

/* ---------- Sections ---------- */
.section { padding-bottom: var(--space-section); }

.section-grid {
  display: grid;
  gap: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.section-head {
  display: grid;
  grid-template-columns: 3rem 1fr;
  align-items: baseline;
  align-content: start;
  row-gap: 0.6rem;
}
.section-num {
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--ink);
}
.section-intro {
  grid-column: 2;
  max-width: 26ch;
  font-size: 0.9375rem;
  color: var(--muted);
}

@media (min-width: 60rem) {
  .section-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 2rem;
  }
  .section-head { grid-column: 1 / span 4; position: sticky; top: 2rem; align-self: start; }
  .section-body { grid-column: 5 / span 8; min-width: 0; }
}

/* ---------- Products ---------- */
.products { margin-top: -1.75rem; }

.product {
  position: relative;
  isolation: isolate;
  display: grid;
  gap: 0.75rem;
  padding-block: 1.75rem 2rem;
  border-top: 1px solid var(--line);
}
.product:first-child { border-top: 0; }

/* hover / focus surface, slightly wider than the text column */
.product::before {
  content: "";
  position: absolute;
  inset: 0 -1rem;
  z-index: -1;
  background: var(--paper);
  opacity: 0;
}

.product-tag {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.product-name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.875rem, 1.2rem + 2.6vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.product-name a { text-decoration: none; }
/* stretched link: the whole row is the target */
.product-name a::after {
  content: "";
  position: absolute;
  inset: 0 -1rem;
  z-index: 1;
}
.product-name a:focus-visible { outline: none; }
.product-name a:focus-visible::after {
  outline: 2px solid var(--accent-dark);
  outline-offset: 0;
  border-radius: 2px;
}

.product-text { max-width: 38ch; color: var(--ink-2); }

.product-domain {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 0.4rem;
  font-size: 0.875rem;
  color: var(--muted);
}
.product-domain span {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}
.product-domain .arrow { width: 0.875rem; height: 0.875rem; flex: none; }

/* focus state (keyboard) */
.product:has(a:focus-visible)::before { opacity: 1; }
.product:has(a:focus-visible) .product-name a { color: var(--accent-dark); }
.product:has(a:focus-visible) .product-domain { color: var(--ink); }
.product:has(a:focus-visible) .product-domain span { text-decoration-color: currentColor; }

/* hover state (pointer) */
@media (hover: hover) {
  .product:hover::before { opacity: 1; }
  .product:hover .product-name a { color: var(--accent-dark); }
  .product:hover .product-domain { color: var(--ink); }
  .product:hover .product-domain span { text-decoration-color: currentColor; }
}

@media (min-width: 48rem) {
  .product {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "tag tag"
      "name text"
      "name domain";
    column-gap: 2rem;
    row-gap: 0.75rem;
  }
  .product-tag { grid-area: tag; }
  .product-name { grid-area: name; }
  .product-text { grid-area: text; }
  .product-domain { grid-area: domain; align-self: start; }
}

@media (min-width: 60rem) {
  .products { margin-top: -1.25rem; }
}

/* ---------- Studio ---------- */
.studio-lead {
  max-width: 26ch;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
}

.facts {
  margin-top: clamp(2rem, 5vw, 3rem);
  border-top: 1px solid var(--line);
}
.facts div {
  display: grid;
  grid-template-columns: minmax(7rem, 1fr) 2fr;
  gap: 1rem;
  padding-block: 0.95rem;
  border-bottom: 1px solid var(--line);
}
.facts dt { font-size: 0.875rem; color: var(--muted); padding-top: 0.1rem; }
.facts dd { color: var(--ink); }

/* ---------- Dark (contact) ---------- */
.section--dark {
  padding-block: clamp(4rem, 9vw, 7rem);
  background: var(--ink);
  color: var(--on-dark);
}
.section--dark .section-grid { border-top: 0; padding-top: 0; }
.section--dark .section-num { color: var(--on-dark-muted); }
.section--dark .section-head h2 { color: var(--on-dark); }
.section--dark .section-head { position: static; }
.section--dark :focus-visible,
.site-footer :focus-visible { outline-color: var(--on-dark); }

.contact-lead { color: var(--on-dark-muted); }

/* The address scales with its column (container query units) so it never breaks. */
.email-wrap {
  margin-top: 1rem;
  container-type: inline-size;
}
.email {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.125rem, 7cqi, 3.5rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  white-space: nowrap;
  color: var(--on-dark);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.16em;
}
.email:hover { text-decoration-color: var(--on-dark); }

@supports not (container-type: inline-size) {
  .email { font-size: clamp(1.125rem, 5.4vw, 2.25rem); }
}

/* last resort on very narrow screens only */
@media (max-width: 22.49rem) {
  .email { white-space: normal; overflow-wrap: anywhere; }
}

.contact-note {
  margin-top: 1.75rem;
  font-size: 0.875rem;
  color: var(--on-dark-muted);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--on-dark-muted);
  font-size: 0.875rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-block: 2rem;
  border-top: 1px solid var(--line-dark);
}
.footer-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.footer-links a {
  display: inline-block;
  padding-block: 0.35rem;
  color: var(--on-dark-muted);
  text-decoration: none;
}
.footer-links a:hover { color: var(--on-dark); text-decoration: underline; }
.footer-links a[aria-current="page"] { color: var(--on-dark); }

/* ---------- Legal pages ---------- */
.legal { padding-block: clamp(2.5rem, 7vw, 5rem) var(--space-section); }

.back {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: clamp(2.5rem, 7vw, 4.5rem);
  padding-block: 0.35rem;
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
}
.back:hover { color: var(--ink); }
.back .arrow { width: 0.875rem; height: 0.875rem; }

.page-head { margin-bottom: clamp(3rem, 7vw, 5rem); }
.page-head h1 {
  max-width: 18ch;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.25rem, 1.4rem + 3.6vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-wrap: balance;
  overflow-wrap: break-word;
  hyphens: auto;
}
.page-intro {
  max-width: 48ch;
  margin-top: 1.5rem;
  color: var(--ink-2);
}
.updated {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.legal-blocks { border-bottom: 1px solid var(--line); }

.legal-block {
  display: grid;
  gap: 0.6rem;
  padding-block: 1.5rem;
  border-top: 1px solid var(--line);
}
.legal-block h2 {
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink);
}
.legal-content { max-width: 60ch; }
.legal-content p + p,
.legal-content address + p { margin-top: 0.75rem; }
.legal-content address { font-style: normal; }
.legal-content a { overflow-wrap: anywhere; }
.legal-content a:hover { color: var(--accent-dark); }

@media (min-width: 48rem) {
  .legal-block {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 2rem;
  }
  .legal-block h2 { grid-column: 1 / span 4; }
  .legal-content { grid-column: 5 / -1; }
}

/* ---------- 404 ---------- */
.notfound { padding-block: clamp(4rem, 12vw, 9rem); }
.notfound-code {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(5rem, 3rem + 10vw, 11rem);
  line-height: 0.9;
  letter-spacing: -0.05em;
  color: var(--ink);
  margin-bottom: clamp(2rem, 6vw, 4rem);
}
.notfound-grid {
  display: grid;
  gap: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
.notfound h1, .notfound h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.notfound p + p { margin-top: 0.75rem; }
.text-link { color: var(--ink); }
.text-link:hover { color: var(--accent-dark); }
@media (min-width: 48rem) {
  .notfound-grid { grid-template-columns: 1fr 1fr; column-gap: 2rem; }
}

/* ---------- Motion (opt-in) ---------- */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .product-name a,
  .product-domain,
  .nav a,
  .lang a,
  .back,
  .footer-links a { transition: color 0.2s ease; }
  .product::before { transition: opacity 0.2s ease; }
  .product-domain span { transition: text-decoration-color 0.2s ease; }
  .product-domain .arrow { transition: transform 0.2s ease; }
  .email { transition: text-decoration-color 0.2s ease; }

  .product:has(a:focus-visible) .product-domain .arrow { transform: translate(2px, -2px); }
  @media (hover: hover) {
    .product:hover .product-domain .arrow { transform: translate(2px, -2px); }
  }
}

/* ---------- Print ---------- */
@media print {
  .skip, .nav, .lang, .board-wrap, .back { display: none !important; }
  body { background: #fff; color: #000; }
  .section--dark, .site-footer { background: #fff; color: #000; }
  .section--dark .section-head h2, .email, .footer-links a { color: #000; }
  .product::before { display: none; }
}

/* Product legal document links */
.legal-content .doc-product { font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; margin-top: 1.25rem; }
.legal-content p + .doc-product { margin-top: 1.25rem; }
.doc-links { list-style: none; margin: 0.5rem 0 0; padding: 0; border-top: 1px solid var(--line, #dedad1); }
.legal-block > .legal-content > .doc-links:first-child { margin-top: 0; }
.doc-links li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.7rem 0; border-bottom: 1px solid var(--line, #dedad1); }
.doc-links a { color: var(--ink); text-decoration: none; }
.doc-links a:hover { color: var(--accent-dark); text-decoration: underline; }
.doc-links .arrow { flex: none; color: var(--muted, #6b6a66); }
.legal-content > .doc-links:first-child { border-top: 0; }
.legal-content > .doc-links:first-child li:first-child { padding-top: 0; }

/* Country sites of a product (above the stretched link) */
.product-sites { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 0.25rem; list-style: none; margin: 0.25rem 0 0; padding: 0; }
.product-sites a { display: inline-grid; place-items: center; min-width: 44px; min-height: 36px; padding: 0 0.5rem; border: 1px solid var(--line); border-radius: 999px; font-size: 0.8125rem; font-weight: 500; letter-spacing: 0.04em; color: var(--ink-2); text-decoration: none; background: var(--bg, #fff); }
.product-sites a:hover { color: var(--accent-dark); border-color: currentColor; }
.product-sites a:focus-visible { outline: 2px solid var(--accent-dark); outline-offset: 2px; }
