/* ============================================================
   ZMS — base
   Tokens, reset, typography, chrome.
   ============================================================ */

:root {
  --ink: #0b0b0b;
  --ink-soft: #171716;
  --ink-2: #222220;
  --paper: #f2f0ec;
  --paper-2: #e7e4de;
  --paper-3: #dcd8d0;
  --white: #ffffff;
  --muted: #5d5a54;
  --muted-2: #7a766f;
  --muted-dark: #a5a29b;
  --line: rgba(11, 11, 11, 0.14);
  --line-strong: rgba(11, 11, 11, 0.3);
  --line-light: rgba(255, 255, 255, 0.18);
  --line-light-strong: rgba(255, 255, 255, 0.34);

  --font-sans: "Helvetica Neue", Helvetica, Arial, "Segoe UI", sans-serif;
  --font-serif: Georgia, "Times New Roman", Times, serif;
  --font-mono: "SFMono-Regular", "Cascadia Mono", "Segoe UI Mono", Consolas, "Liberation Mono", monospace;

  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 48px;
  --s8: 64px;
  --s9: 96px;
  --s10: 128px;
  --s11: 192px;

  --gutter: clamp(20px, 4.2vw, 64px);
  --header-h: 76px;
  --max: 1680px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-color: var(--ink) var(--paper-2);
  scrollbar-width: thin;
}

html,
body {
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0.045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection {
  background: var(--ink);
  color: var(--paper);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--paper-2);
}

::-webkit-scrollbar-thumb {
  background: var(--ink);
  border: 2px solid var(--paper-2);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--ink-2);
}

h1,
h2,
h3,
h4,
h5,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

address {
  font-style: normal;
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10001;
  padding: 12px 18px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease);
}

.skip:focus {
  transform: none;
}

/* ---------- type ---------- */

.display {
  font-family: var(--font-sans);
  font-weight: 400;
  letter-spacing: -0.05em;
  line-height: 0.9;
}

.serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.025em;
}

.mono {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  flex: none;
}

.section--dark .eyebrow,
.hero .eyebrow,
.error-page .eyebrow {
  color: var(--muted-dark);
}

/* ---------- buttons & links ---------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 52px;
  padding: 0 26px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease),
    border-color 0.35s var(--ease);
}

.btn:hover {
  background: var(--ink);
  color: var(--paper);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.35;
  pointer-events: none;
}

.btn--solid {
  background: var(--ink);
  color: var(--paper);
}

.btn--solid:hover {
  background: transparent;
  color: var(--ink);
}

.btn--light {
  border-color: var(--paper);
  color: var(--paper);
}

.btn--light:hover {
  background: var(--paper);
  color: var(--ink);
}

.btn--block {
  width: 100%;
}

.btn__arrow {
  width: 14px;
  height: 14px;
  flex: none;
  transition: transform 0.35s var(--ease);
}

.btn:hover .btn__arrow,
.link-arrow:hover .btn__arrow {
  transform: translateX(4px);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 5px;
  border-bottom: 1px solid currentColor;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: inherit;
  width: fit-content;
}

.link-arrow .btn__arrow {
  width: 13px;
  height: 13px;
}

.link {
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 1px;
  padding-bottom: 1px;
  transition: background-size 0.35s var(--ease);
}

.link:hover {
  background-size: 0 1px;
  background-position: 100% 100%;
}

/* ---------- header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 500;
  height: var(--header-h);
  color: var(--ink);
  border-bottom: 1px solid transparent;
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease),
    border-color 0.35s var(--ease);
}

.site-header__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 100%;
  padding: 0 var(--gutter);
}

body[data-header="dark"] .site-header,
body[data-header="over-hero"] .site-header:not(.is-solid) {
  color: var(--paper);
}

.site-header.is-solid,
body[data-header="solid"] .site-header {
  background: var(--paper);
  color: var(--ink);
  border-bottom-color: var(--line);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.24em;
  line-height: 1;
  text-transform: uppercase;
  width: fit-content;
}

.wordmark__mark {
  display: block;
  width: 58px;
  height: 14px;
  flex: none;
  background-color: currentColor;
  -webkit-mask: url("../assets/zms-logo.png") center / contain no-repeat;
  mask: url("../assets/zms-logo.png") center / contain no-repeat;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.6vw, 40px);
}

.site-nav a {
  position: relative;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 6px 0;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease);
}

.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: left;
}

.site-header__actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: clamp(14px, 2vw, 26px);
}

.icon-btn,
.cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: inherit;
}

.icon-btn svg {
  width: 16px;
  height: 16px;
}

.icon-btn:hover,
.cart-btn:hover {
  opacity: 0.6;
}

.cart-btn__count {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border: 1px solid currentColor;
  font-size: 13px;
  letter-spacing: 0;
  line-height: 1;
}

.menu-btn {
  display: none;
  position: relative;
  width: 28px;
  height: 40px;
  color: inherit;
}

.menu-btn span {
  position: absolute;
  left: 4px;
  width: 20px;
  height: 1px;
  background: currentColor;
  transition: transform 0.3s var(--ease), top 0.3s var(--ease);
}

.menu-btn span:first-child {
  top: 16px;
}

.menu-btn span:last-child {
  top: 23px;
}

.menu-btn[aria-expanded="true"] span:first-child {
  top: 20px;
  transform: rotate(45deg);
}

.menu-btn[aria-expanded="true"] span:last-child {
  top: 20px;
  transform: rotate(-45deg);
}

/* ---------- page shell ---------- */

.page {
  padding-top: var(--header-h);
}

main {
  display: block;
}

.section {
  position: relative;
  padding: clamp(72px, 9vw, 144px) var(--gutter);
}

.section--dark {
  background: var(--ink);
  color: var(--paper);
}

.section--tight {
  padding-top: clamp(48px, 6vw, 88px);
  padding-bottom: clamp(48px, 6vw, 88px);
}

.section__head {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: end;
  gap: var(--s7);
  padding-top: var(--s5);
  border-top: 1px solid var(--line);
  margin-bottom: clamp(40px, 6vw, 80px);
}

.section--dark .section__head {
  border-top-color: var(--line-light);
}

.section__title {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: clamp(2.4rem, 5.2vw, 5.4rem);
  line-height: 0.94;
  letter-spacing: -0.05em;
  max-width: 15ch;
}

.section__title em {
  font-family: var(--font-serif);
  font-style: italic;
  letter-spacing: -0.03em;
}

.section__aside {
  justify-self: end;
  max-width: 40ch;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

.section--dark .section__aside {
  color: var(--muted-dark);
}

.section__aside .link-arrow {
  margin-top: var(--s5);
}

.section--dark .section__aside .link-arrow {
  color: var(--paper);
}

/* ---------- footer ---------- */

.site-footer {
  position: relative;
  background: var(--ink);
  color: var(--paper);
  padding: clamp(64px, 8vw, 112px) var(--gutter) 28px;
  overflow: hidden;
}

.site-footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) repeat(3, minmax(0, 1fr));
  gap: clamp(32px, 5vw, 72px);
}

.site-footer__brand p {
  max-width: 32ch;
  margin-top: var(--s5);
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted-dark);
}

.site-footer__brand .link-arrow {
  margin-top: var(--s6);
  color: var(--paper);
}

.footer-col h3 {
  margin-bottom: var(--s5);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-dark);
}

.footer-col a,
.footer-col p {
  display: block;
  padding: 5px 0;
  font-size: 14px;
  color: var(--paper);
  width: fit-content;
}

.footer-col a {
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0 1px;
  transition: background-size 0.35s var(--ease);
}

.footer-col a:hover {
  background-size: 100% 1px;
}

.site-footer__word {
  width: min(100%, 1400px);
  aspect-ratio: 1154 / 272;
  margin-top: clamp(56px, 8vw, 112px);
  background-color: var(--paper);
  -webkit-mask: url("../assets/zms-logo.png") left center / contain no-repeat;
  mask: url("../assets/zms-logo.png") left center / contain no-repeat;
  user-select: none;
}

.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s4) var(--s6);
  margin-top: var(--s7);
  padding-top: var(--s5);
  border-top: 1px solid var(--line-light);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  line-height: 1.7;
  text-transform: uppercase;
  color: var(--muted-dark);
}

.site-footer__legal a {
  color: var(--muted-dark);
  border-bottom: 1px solid transparent;
}

.site-footer__legal a:hover {
  color: var(--paper);
  border-bottom-color: currentColor;
}

.site-footer__note {
  color: #6f6c66;
}

.site-footer__credit {
  flex-basis: 100%;
  color: #6f6c66;
  letter-spacing: 0.08em;
}

/* ---------- responsive chrome ---------- */

@media (max-width: 1000px) {
  .site-nav {
    display: none;
  }

  .menu-btn {
    display: block;
  }

  .site-header__inner {
    grid-template-columns: 1fr auto;
  }

  .site-footer__top {
    grid-template-columns: 1fr 1fr;
  }

  .site-footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  :root {
    --header-h: 62px;
  }

  .icon-btn__label {
    display: none;
  }

  .cart-btn__label {
    display: none;
  }

  .section__head {
    grid-template-columns: 1fr;
    gap: var(--s5);
  }

  .section__aside {
    justify-self: start;
  }

  .site-footer__top {
    grid-template-columns: 1fr;
  }

  .site-footer__legal {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
