/* SUBJMP — Swiss-style site. One grid, one accent, no decoration. */

:root {
  --paper: #f2f0ea;
  --ink: #11110f;
  --muted: #6b6961;
  --line: #d4d1c8;
  --line-strong: #11110f;
  --accent: #d01e17;
  --max: 1440px;
  --gutter: clamp(20px, 4vw, 56px);
  --sans: "Helvetica Neue", Helvetica, "Nimbus Sans", Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --paper: #11110f;
  --ink: #f2f0ea;
  --muted: #a19e95;
  --line: #2f2e29;
  --line-strong: #f2f0ea;
  --accent: #ff4438;
  color-scheme: dark;
}

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

[hidden] { display: none !important; }

html {
  background: var(--paper);
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  flex: 1;
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
}

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

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

a:hover { color: var(--accent); }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 100;
}

.skip:focus {
  left: var(--gutter);
  top: 12px;
  background: var(--accent);
  color: #fff;
  padding: 8px 12px;
  font-size: 12px;
  text-decoration: none;
}

/* --- Header ------------------------------------------------------------ */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: clamp(16px, 3vw, 40px);
  width: min(100% - 2 * var(--gutter), var(--max));
  min-height: 72px;
  margin-inline: auto;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-self: start;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.brand .logo {
  display: block;
  width: 20px;
  height: 20px;
  image-rendering: pixelated;
}

.brand .logo-light { display: none; }
:root[data-theme="dark"] .brand .logo-dark { display: none; }
:root[data-theme="dark"] .brand .logo-light { display: block; }

.links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.2vw, 32px);
}

.links a,
.links button {
  position: relative;
  padding: 6px 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
}

.links a::after,
.links button::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.2s var(--ease);
}

.links a:hover::after,
.links button:hover::after,
.links .is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.links .is-active { color: var(--accent); }

.theme-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-strong);
  font-size: 16px;
  line-height: 1;
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease);
}

.theme-btn:hover {
  background: var(--ink);
  color: var(--paper);
}

/* --- Shared type ------------------------------------------------------- */

.eyebrow {
  margin: 0;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.accent { color: var(--accent); }
.muted { color: var(--muted); }

.lede {
  max-width: 36ch;
  margin: 0 0 24px;
  font-size: clamp(1rem, 1.25vw, 1.2rem);
  line-height: 1.45;
}

.arrow-link {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35em;
  padding-bottom: 2px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
}

.arrow-link:hover { border-color: var(--accent); }

.display,
.display-sm {
  margin: 0;
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.06em;
  text-wrap: balance;
}

.display { font-size: clamp(3rem, 8.5vw, 8.5rem); }
.display-sm { font-size: clamp(2.6rem, 7vw, 6.5rem); }

/* --- Hero -------------------------------------------------------------- */

.hero { padding-block: clamp(48px, 8vw, 112px) clamp(32px, 5vw, 64px); }

.hero-eyebrow {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-strong);
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 32px);
  padding-block: clamp(40px, 6vw, 88px) clamp(40px, 6vw, 80px);
}

.hero-grid .display { grid-column: span 9; }

.hero-aside {
  grid-column: span 3 / -1;
  align-self: end;
  padding-bottom: 0.4em;
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 32px);
  margin: 0;
  padding-top: 16px;
  border-top: 1px solid var(--line-strong);
}

.facts div {
  display: grid;
  gap: 4px;
}

.facts dt {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.facts dd {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
}

/* --- Sections ---------------------------------------------------------- */

.section {
  padding-block: clamp(40px, 6vw, 80px);
  border-top: 1px solid var(--line-strong);
}

.section-head,
.contact-grid {
  display: grid;
  grid-template-columns: 3fr 9fr;
  gap: clamp(16px, 2vw, 32px);
  align-items: start;
  margin-bottom: clamp(28px, 4vw, 56px);
}

.section-head > .eyebrow { padding-top: 0.45em; }
.section-head h2,
.contact-grid h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 4rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.section-intro {
  max-width: 48ch;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.statement {
  max-width: 46ch;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(1.15rem, 1.8vw, 1.5rem);
  line-height: 1.35;
  letter-spacing: -0.02em;
}

/* --- Product index ----------------------------------------------------- */

.product-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.product {
  display: grid;
  grid-template-columns: 3.5rem minmax(10rem, 1.1fr) minmax(0, 2fr) minmax(6rem, 0.6fr);
  gap: clamp(12px, 2vw, 32px);
  align-items: baseline;
  padding-block: 18px;
  border-bottom: 1px solid var(--line);
}

.product-index {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.product-name {
  margin: 0;
  font-size: clamp(1.15rem, 1.8vw, 1.55rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.product-desc {
  max-width: 56ch;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.product-cat {
  justify-self: end;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-align: right;
  text-transform: uppercase;
}

/* --- Principles -------------------------------------------------------- */

.principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 48px);
}

.principle {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.principle .num {
  display: block;
  margin-bottom: 12px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.principle h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.principle p {
  max-width: 36ch;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

/* --- Contact ----------------------------------------------------------- */

.contact-grid { margin-bottom: 0; }
.contact-grid .eyebrow { padding-top: 0.45em; }

.contact-section .mail,
.contact-route .mail {
  display: inline-block;
  margin-top: 24px;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--accent);
  font-size: clamp(1.5rem, 3.6vw, 3.2rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.045em;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.contact-section .mail:hover,
.contact-route .mail:hover { color: var(--accent); }

.contact-route {
  display: grid;
  gap: 24px;
  max-width: 1000px;
  padding-block: clamp(56px, 9vw, 128px);
}

.contact-route .mail {
  justify-self: start;
  margin-top: 8px;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.contact-links a {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
}

/* --- Footer ------------------------------------------------------------ */

.footer {
  margin-top: clamp(40px, 6vw, 80px);
  border-top: 1px solid var(--line-strong);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
  padding-block: 20px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footer-grid p { margin: 0; }
.footer-note { text-align: center; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-self: end;
}

.footer-links a { text-decoration: none; }

/* --- Legal / prose pages ----------------------------------------------- */

main.prose {
  width: min(100% - 2 * var(--gutter), 760px);
  padding-block: clamp(48px, 7vw, 96px);
}

.prose h1 {
  max-width: 18ch;
  margin: 0 0 28px;
  font-size: clamp(2.6rem, 6vw, 4.5rem);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.05em;
  text-wrap: balance;
}

.prose h2 {
  margin: 2.2em 0 0.6em;
  padding-top: 0.7em;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.prose p,
.prose li {
  max-width: 68ch;
  font-size: 1.02rem;
  line-height: 1.65;
}

.prose p:first-of-type {
  color: var(--muted);
  font-size: 0.9rem;
}

.prose ul {
  padding-left: 1.1em;
}

.prose li { margin-bottom: 0.5em; }
.prose li::marker { color: var(--accent); }

.prose a {
  color: var(--ink);
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
}

.prose code {
  padding: 0.15em 0.35em;
  background: var(--line);
  font: 0.88em/1 var(--mono);
}

/* --- Error ------------------------------------------------------------- */

.error {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin: 16px auto 0;
  padding: 12px 16px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 13px;
}

/* --- Responsive -------------------------------------------------------- */

@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-grid .display,
  .hero-aside { grid-column: 1 / -1; }
  .hero-aside { max-width: 48ch; padding-top: 8px; }

  .section-head,
  .contact-grid { grid-template-columns: 1fr; }

  .product {
    grid-template-columns: 2.5rem 1fr auto;
  }
  .product-desc { grid-column: 2 / -1; }
  .product-cat { grid-column: 3; grid-row: 1; }
}

@media (max-width: 760px) {
  .facts {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .facts div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-block: 10px;
    border-bottom: 1px solid var(--line);
  }
  .facts div:last-child { border-bottom: 0; }

  .principles { grid-template-columns: 1fr; gap: 24px; }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    align-items: start;
  }
  .footer-note { text-align: left; }
  .footer-links { justify-self: start; }
}

@media (max-width: 560px) {
  .nav {
    grid-template-columns: 1fr auto auto;
    gap: 14px;
    min-height: 60px;
  }
  .brand { gap: 8px; font-size: 16px; }
  .brand .logo { width: 17px; height: 17px; }
  .links { gap: 14px; }
  .links a,
  .links button { font-size: 9px; letter-spacing: 0.1em; }
  .theme-btn { width: 32px; height: 32px; font-size: 14px; }

  .hero { padding-top: 36px; }
  .display { font-size: clamp(2.7rem, 13vw, 4.6rem); }

  .product { grid-template-columns: 2rem 1fr; }
  .product-desc { grid-column: 2; }
  .product-cat {
    grid-column: 2;
    grid-row: 3;
    justify-self: start;
    margin-top: 6px;
    text-align: left;
  }

  .contact-section .mail,
  .contact-route .mail { font-size: clamp(1.3rem, 7vw, 2rem); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .nav,
  .footer,
  .theme-btn,
  .skip { display: none !important; }

  body,
  html {
    background: #fff;
    color: #000;
  }
}
