:root {
  --color-bg: #f0f0e4;
  --color-bg-soft: #e4e4de;
  --color-ink: #111111;
  --color-muted: #3a3a3a;
  --color-line: #c6c6c0;
  --color-accent: #111111;
  --color-accent-hover: #2a2a2a;
  --color-paper: #ffffff;
  --color-danger: #8e2f2f;
  --color-action: #111111;
  --color-on-action: #ffffff;
  --color-action-hover: #2a2a2a;
  --color-wash: rgba(0, 0, 0, 0.06);
  --font: "Funnel Sans", sans-serif;
  --radius-card: 0px;
  --radius-control: 0px;
  --radius-pill: 0px;
  --header: 72px;
  --header-open: 110px;
  --header-h: var(--header-open);
  --logo-size: 110px;
  --logo-offset: 0px;
  --header-line: 0;
  --max: 1260px;
  --ease: cubic-bezier(0, 0, 0.2, 1);
  color-scheme: light;
}

html[data-theme="dark"] {
  --color-bg: #141413;
  --color-bg-soft: #1e1e1c;
  --color-ink: #f3f3ea;
  --color-muted: #b7b7ae;
  --color-line: #3a3a36;
  --color-accent: #f3f3ea;
  --color-accent-hover: #ffffff;
  --color-paper: #222220;
  --color-danger: #e08b8b;
  --color-action: #f0f0e4;
  --color-on-action: #111111;
  --color-action-hover: #ffffff;
  --color-wash: rgba(243, 243, 234, 0.08);
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; background: var(--color-bg); }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

body.sheet-open { overflow: hidden; }

img { max-width: 100%; display: block; background: var(--color-line); }

button, input, textarea { font: inherit; color: inherit; }

button { cursor: pointer; }

button:active:not(:disabled) { transform: scale(0.97); }

button:disabled { cursor: progress; }

p { text-wrap: pretty; }

h1, h2, h3 {
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1.02;
  text-wrap: balance;
  margin: 0;
}

h1 { font-size: clamp(56px, 7vw, 104px); }

h2 { font-size: clamp(40px, 4.6vw, 64px); }

h3 { font-size: clamp(26px, 2vw, 32px); letter-spacing: -0.03em; }

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 180ms var(--ease), background-color 180ms var(--ease);
}

.nums { font-variant-numeric: tabular-nums; }

.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: absolute;
  left: 12px;
  top: -48px;
  z-index: 100;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: var(--color-ink);
  color: var(--color-bg);
  text-decoration: none;
}

.skip:focus { top: 12px; }

.wrap {
  width: min(var(--max), calc(100% - 64px));
  margin-inline: auto;
}

.icon { width: 16px; height: 16px; flex: 0 0 auto; }

.icon-swap {
  position: relative;
  width: 20px;
  height: 20px;
  display: block;
}

.icon-swap .icon {
  width: 20px;
  height: 20px;
  transition: opacity 160ms var(--ease), transform 160ms var(--ease), filter 160ms var(--ease);
}

.icon-b {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(0.85);
  filter: blur(4px);
}

[aria-expanded="true"] .icon-a {
  opacity: 0;
  transform: scale(0.85);
  filter: blur(4px);
}

[aria-expanded="true"] .icon-b {
  opacity: 1;
  transform: none;
  filter: none;
}

:focus-visible {
  outline: 2px solid var(--color-ink);
  outline-offset: 3px;
}

.sample :focus-visible,
.footer :focus-visible { outline-color: var(--color-bg); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-ink);
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  transition: background-color 180ms var(--ease), color 180ms var(--ease), border-color 180ms var(--ease), transform 120ms var(--ease);
}

.btn-primary { background: var(--color-action); color: var(--color-on-action); }
.btn-primary:hover { background: var(--color-action-hover); color: var(--color-on-action); }
.btn-outline { border-color: var(--color-ink); }
.btn-outline:hover { background: var(--color-wash); color: var(--color-ink); }
.btn-on-dark { border-color: var(--color-bg); color: var(--color-bg); }
.btn-on-dark:hover { background: rgba(240, 240, 228, 0.16); color: var(--color-bg); }
.line-link {
  color: var(--color-ink);
  font-size: 16px;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 1px;
  transition: text-decoration-thickness 180ms var(--ease);
}
.line-link:hover { color: var(--color-ink); text-decoration-thickness: 2px; }
.btn-block { width: 100%; }
.btn .spinner { display: none; }

.btn[aria-busy="true"] .spinner {
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.75px solid color-mix(in srgb, var(--color-on-action) 40%, transparent);
  border-top-color: var(--color-on-action);
  animation: spin 700ms linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-ink);
  transition: background-color 180ms var(--ease), transform 120ms var(--ease);
}

.icon-btn:hover { background: var(--color-bg-soft); }

.text-btn {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--color-ink);
  font-weight: 500;
  font-size: 15px;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 180ms var(--ease), transform 120ms var(--ease);
}

.kicker {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--color-muted);
}

.header {
  position: sticky;
  top: 0;
  z-index: 80;
  height: var(--header-h);
  background: var(--color-bg);
  box-shadow: inset 0 calc(var(--header-line) * -1px) 0 var(--color-line);
}

.header-bar {
  height: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
}

.logo {
  grid-column: 1;
  justify-self: start;
  align-self: start;
  display: flex;
  margin-top: var(--logo-offset);
  border-radius: 0;
}

.logo img {
  width: var(--logo-size);
  height: var(--logo-size);
  object-fit: cover;
  border-radius: 0;
  background: #111111;
}

.nav {
  position: relative;
  grid-column: 2;
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 0;
}

.nav-link {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-ink);
  font-size: 16px;
  text-decoration: none;
  transition: transform 120ms var(--ease);
}

.nav-knob {
  position: absolute;
  z-index: 0;
  top: 0;
  left: 0;
  background: var(--color-bg-soft);
  pointer-events: none;
  opacity: 0;
  transform-origin: center center;
  transition: transform 200ms var(--ease), width 200ms var(--ease), height 200ms var(--ease), opacity 160ms var(--ease);
}

.nav-knob[data-open="true"] { opacity: 1; }

.nav-home {
  position: relative;
  justify-content: center;
  width: 40px;
  padding: 0;
}

.nav-home .icon { width: 20px; height: 20px; }

.nav .nav-home-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sheet-links .nav-home {
  justify-content: space-between;
  width: auto;
  padding: 0 12px;
  gap: 12px;
}

.nav-link .icon { transition: transform 180ms var(--ease); }
.nav-link[aria-expanded="true"] .icon { transform: rotate(180deg); }

.nav-mega { position: relative; display: flex; align-items: center; }

.nav-mega::after { content: none; }

.nav-mega:hover::after,
.nav-mega:focus-within::after {
  content: "";
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  top: 100%;
  height: 36px;
}

.mega {
  position: fixed;
  z-index: 2;
  left: max(32px, calc((100% - var(--max)) / 2));
  right: max(32px, calc((100% - var(--max)) / 2));
  top: var(--header-h);
  max-height: calc(100dvh - var(--header-h) - 16px);
  padding: 20px 20px 24px;
  overflow: auto;
  background: var(--color-bg);
  border: 1px solid var(--color-line);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
  transform: translateY(-8px);
  opacity: 0;
  transition: transform 160ms var(--ease), opacity 160ms var(--ease);
}

.mega[hidden] { display: none; }

.mega[data-open="true"] {
  transform: none;
  opacity: 1;
  transition-duration: 200ms;
}

.mega-layout {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.mega-banner {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 100%;
  overflow: hidden;
  color: #f0f0e4;
  text-decoration: none;
}

.mega-banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center 32%;
}

.mega-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(17, 17, 17, 0.82) 0%, rgba(17, 17, 17, 0.28) 46%, rgba(17, 17, 17, 0.04) 100%);
  transition: background 200ms var(--ease);
}

.mega-banner:hover::after {
  background: linear-gradient(to top, rgba(17, 17, 17, 0.9) 0%, rgba(17, 17, 17, 0.42) 52%, rgba(17, 17, 17, 0.12) 100%);
}

.mega-banner-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  padding: 22px;
}

.mega-banner-title {
  font-size: 28px;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-wrap: balance;
}

.mega-banner-lead {
  color: rgba(240, 240, 228, 0.86);
  font-size: 15px;
  line-height: 1.4;
  text-wrap: pretty;
}

.mega-banner-link {
  justify-self: start;
  margin-top: 4px;
  color: #f0f0e4;
  font-size: 16px;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 1px;
  transition: text-decoration-thickness 180ms var(--ease);
}

.mega-banner:hover .mega-banner-link { text-decoration-thickness: 2px; }

.mega-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 12px;
  align-content: start;
}

.mega-card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 8px;
  color: inherit;
  text-decoration: none;
  background: transparent;
}

.mega-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.mega-copy { display: grid; gap: 4px; }

.mega-name {
  font-size: 22px;
  letter-spacing: -0.03em;
}

.mega-use,
.mega-sum,
.mega-count {
  color: var(--color-muted);
  font-size: 14px;
  line-height: 1.35;
}

.mega-sum {
  display: -webkit-box;
  min-height: 2.7em;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mega-card[aria-current="page"] .mega-name { text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 1200px) {
  .mega-layout { grid-template-columns: 220px minmax(0, 1fr); gap: 12px; }
  .mega-banner-title { font-size: 24px; }
  .mega-banner-copy { padding: 18px; }
}

.header-tools {
  position: relative;
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 4px;
}

.header-tools .menu-toggle { width: 48px; height: 48px; }

.header-tools .lang-trigger,
.header-tools .theme-toggle,
.header-tools .cart-link {
  position: relative;
  z-index: 1;
}

.tool-knob {
  position: absolute;
  z-index: 0;
  top: 0;
  left: 0;
  background: var(--color-bg-soft);
  pointer-events: none;
  opacity: 0;
  transform-origin: center center;
  transition: transform 160ms var(--ease), width 160ms var(--ease), height 160ms var(--ease), opacity 160ms var(--ease);
}

.tool-knob[data-open="true"] {
  opacity: 1;
  transition-duration: 200ms;
}

.lang-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-ink);
  transition: background-color 180ms var(--ease);
}

.header-tools .lang-trigger:hover,
.header-tools .lang-trigger[aria-expanded="true"],
.header-tools .theme-toggle:hover,
.header-tools .cart-link:hover,
.header-tools .cart-link[aria-expanded="true"] { background: transparent; }

.lang-trigger .icon { width: 20px; height: 20px; }

.lang-check {
  opacity: 0;
  transform: scale(0.85);
  filter: blur(4px);
  transition: opacity 180ms var(--ease), transform 180ms var(--ease), filter 180ms var(--ease);
}

.lang-menu [aria-selected="true"] .lang-check {
  opacity: 1;
  transform: none;
  filter: none;
}

.theme-toggle {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 0;
}

.header-tools .menu-toggle:hover { background: var(--color-wash); }

.menu-toggle { display: none; }

html[data-theme="dark"] .theme-toggle .icon-a {
  opacity: 0;
  transform: scale(0.85);
  filter: blur(4px);
}

html[data-theme="dark"] .theme-toggle .icon-b {
  opacity: 1;
  transform: none;
  filter: none;
}

html[data-vt="theme"]::view-transition-old(root),
html[data-vt="theme"]::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

html[data-vt="theme"]::view-transition-old(root) { z-index: 1; }
html[data-vt="theme"]::view-transition-new(root) { z-index: 2; }

html[data-vt="lang"]::view-transition-group(root) {
  animation-duration: 400ms;
  animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
}

html[data-vt="lang"]::view-transition-old(root) {
  mix-blend-mode: normal;
  animation: lang-out 320ms var(--ease) both;
}

html[data-vt="lang"]::view-transition-new(root) {
  mix-blend-mode: normal;
  animation: lang-in 400ms var(--ease) both;
}

html[data-vt="layout"]::view-transition-group(root),
html[data-vt="layout"]::view-transition-old(root),
html[data-vt="layout"]::view-transition-new(root) {
  animation: none;
}

html[data-vt="layout"]::view-transition-group(catalog-products) {
  animation-duration: 400ms;
  animation-timing-function: var(--ease);
}

html[data-vt="layout"]::view-transition-image-pair(catalog-products) {
  mix-blend-mode: normal;
}

html[data-vt="layout"]::view-transition-old(catalog-products) {
  mix-blend-mode: normal;
  animation: lang-out 320ms var(--ease) both;
}

html[data-vt="layout"]::view-transition-new(catalog-products) {
  mix-blend-mode: normal;
  animation: lang-in 400ms var(--ease) both;
}

@view-transition {
  navigation: auto;
}

::view-transition-image-pair(root) {
  mix-blend-mode: normal;
}

::view-transition-old(root) {
  animation: lang-out 320ms var(--ease) both;
}

::view-transition-new(root) {
  animation: lang-in 400ms var(--ease) both;
}

@keyframes lang-out {
  to { opacity: 0; filter: blur(6px); }
}

@keyframes lang-in {
  from { opacity: 0; filter: blur(6px); }
}

.dropdown { position: relative; }

.menu {
  --outer: 0px;
  --pad: 4px;
  position: absolute;
  z-index: 50;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  padding: var(--pad);
  background: var(--color-paper);
  border: 1px solid var(--color-line);
  border-radius: var(--outer);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
  transform-origin: top left;
  transform: scale(0.95);
  opacity: 0;
  transition: transform 160ms var(--ease), opacity 160ms var(--ease);
}

.menu[data-open="true"] {
  transform: scale(1);
  opacity: 1;
  transition-duration: 200ms;
}

.menu.lang-menu {
  right: 0;
  left: auto;
  min-width: 168px;
  transform-origin: top right;
}

.lang-menu [role="option"] { justify-content: space-between; letter-spacing: 0; font-weight: 400; }

.menu-knob {
  position: absolute;
  z-index: 0;
  top: 0;
  left: 0;
  background: var(--color-bg-soft);
  pointer-events: none;
  opacity: 0;
  transform-origin: center center;
  transition: transform 160ms var(--ease), width 160ms var(--ease), height 160ms var(--ease), opacity 160ms var(--ease);
}

.menu-knob[data-open="true"] {
  opacity: 1;
  transition-duration: 200ms, 200ms, 200ms, 200ms;
}

.menu a,
.menu [role="option"] {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 6px;
  border: 0;
  border-radius: calc(var(--outer) - var(--pad));
  background: transparent;
  color: var(--color-ink);
  text-align: left;
  text-decoration: none;
  font-size: 16px;
  animation: row-in 200ms var(--ease) both;
  animation-delay: calc(var(--i, 0) * 30ms);
  transition: transform 120ms var(--ease);
}

.menu[data-open="true"] a:nth-of-type(1),
.menu[data-open="true"] [role="option"]:nth-of-type(1) { --i: 0; }
.menu[data-open="true"] a:nth-of-type(2),
.menu[data-open="true"] [role="option"]:nth-of-type(2) { --i: 1; }
.menu[data-open="true"] a:nth-of-type(3),
.menu[data-open="true"] [role="option"]:nth-of-type(3) { --i: 2; }
.menu[data-open="true"] a:nth-of-type(4),
.menu[data-open="true"] [role="option"]:nth-of-type(4) { --i: 3; }
.menu[data-open="true"] a:nth-of-type(5),
.menu[data-open="true"] [role="option"]:nth-of-type(5) { --i: 4; }
.menu[data-open="true"] a:nth-of-type(6),
.menu[data-open="true"] [role="option"]:nth-of-type(6) { --i: 5; }
.menu[data-open="true"] [role="option"]:nth-of-type(7) { --i: 6; }

.menu img {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 0;
}

.backdrop,
.sheet {
  transform-origin: top right;
  transform: scale(0.98) translateX(8px);
  opacity: 0;
  transition: transform 160ms var(--ease), opacity 160ms var(--ease);
}

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(0, 0, 0, 0.46);
  transform: none;
}

.sheet {
  position: fixed;
  z-index: 60;
  top: calc(var(--header-h) + 8px);
  transition: transform 160ms var(--ease), opacity 160ms var(--ease);
  right: 8px;
  width: min(320px, calc(100% - 16px));
  max-height: calc(100dvh - var(--header-h) - 16px);
  overflow: auto;
  padding: 8px;
  background: var(--color-paper);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-card);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16);
}

.backdrop[data-open="true"],
.sheet[data-open="true"] {
  transform: none;
  opacity: 1;
  transition-duration: 200ms;
}

.sheet-links { position: relative; display: grid; }

.sheet-links a {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 0;
  background: transparent;
  text-decoration: none;
  animation: row-in 200ms var(--ease) both;
  transition: transform 120ms var(--ease);
}

.sheet[data-open="true"] .sheet-links a:nth-child(1) { animation-delay: 0ms; }
.sheet[data-open="true"] .sheet-links a:nth-child(2) { animation-delay: 30ms; }
.sheet[data-open="true"] .sheet-links a:nth-child(3) { animation-delay: 60ms; }
.sheet[data-open="true"] .sheet-links a:nth-child(4) { animation-delay: 90ms; }
.sheet[data-open="true"] .sheet-links a:nth-child(5) { animation-delay: 120ms; }
.sheet[data-open="true"] .sheet-links a:nth-child(6) { animation-delay: 150ms; }
.sheet[data-open="true"] .sheet-links a:nth-child(7) { animation-delay: 180ms; }
.sheet[data-open="true"] .sheet-links a:nth-child(8) { animation-delay: 210ms; }
.sheet[data-open="true"] .sheet-links a:nth-child(9) { animation-delay: 240ms; }
.sheet[data-open="true"] .sheet-links a:nth-child(10) { animation-delay: 270ms; }
.sheet[data-open="true"] .sheet-links a:nth-child(11) { animation-delay: 300ms; }
.sheet[data-open="true"] .sheet-links a:nth-child(12) { animation-delay: 330ms; }
.sheet[data-open="true"] .sheet-links a:nth-child(13) { animation-delay: 360ms; }

.sheet-links .sheet-cat {
  min-height: 36px;
  padding-left: 28px;
  color: var(--color-muted);
  font-size: 15px;
}

.sheet-links .sheet-cat[aria-current="page"] { color: var(--color-ink); }

.sheet-links .nav-knob { background: var(--color-bg-soft); }

html[data-theme="dark"] .nav-knob,
html[data-theme="dark"] .sheet-links .nav-knob,
html[data-theme="dark"] .menu-knob,
html[data-theme="dark"] .tool-knob {
  background: var(--color-wash);
}

@keyframes row-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

.hero { padding: 100px 0 8px; }

.hero h1 {
  max-width: 11em;
  font-size: clamp(52px, 6.2vw, 92px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.96;
}

.hero-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin-top: 28px;
}

.hero-row p {
  max-width: 36ch;
  margin: 0;
  font-size: 17px;
  line-height: 1.45;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  flex: 0 0 auto;
}

.hero-photo {
  width: 100%;
  height: clamp(320px, 58vh, 680px);
  margin-top: 36px;
  object-fit: cover;
  object-position: center 38%;
  border-radius: 0;
}

.lead {
  max-width: 34em;
  margin: 18px 0 0;
  font-size: 20px;
  line-height: 1.45;
}

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

.section { padding: 96px 0; scroll-margin-top: calc(var(--header) + 12px); }

.section-head {
  display: grid;
  gap: 12px;
  max-width: 740px;
  margin-bottom: 40px;
}

.section-head p { margin: 0; color: var(--color-muted); font-size: 18px; }

.about { padding: 72px 0 16px; }

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 20px 48px;
  align-items: center;
}

.about-grid .kicker { grid-column: 1 / -1; }

.about-grid p:not(.kicker) {
  margin: 0;
  color: var(--color-muted);
  font-size: 18px;
  line-height: 1.5;
}

.tech-grid,
.work-grid {
  display: grid;
  gap: 16px;
}

.tech-grid { grid-template-columns: repeat(3, 1fr); }

.tech-card,
.work-card {
  display: flex;
  flex-direction: column;
  background: var(--color-bg-soft);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.tech-card img,
.work-card img { width: 100%; object-fit: cover; flex: 0 0 auto; }

.tech-card img { height: 260px; }
.work-card img { height: 240px; }
.work-card-lead img { height: 100%; min-height: 420px; }

.tech-card > div,
.work-card > div {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 20px;
}

.tech-card p,
.work-card p { margin: 0; color: var(--color-muted); }

.work-card .btn { margin-top: 8px; justify-self: start; }
.work-card-lead > div { align-content: end; padding: 32px; }

#project { background: var(--color-bg-soft); }
#project .work-card { background: var(--color-paper); }

.work-grid { grid-template-columns: repeat(3, 1fr); }
.work-card-lead {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
}

.rows { border-bottom: 1px solid var(--color-line); }

.row { border-top: 1px solid var(--color-line); scroll-margin-top: calc(var(--header) + 12px); }

.row-toggle {
  display: grid;
  grid-template-columns: 72px minmax(180px, 0.8fr) minmax(0, 1.4fr) 24px;
  gap: 20px;
  align-items: center;
  width: 100%;
  padding: 18px 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.row-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: var(--radius-control);
}

.row-name { display: grid; gap: 2px; }
.row-title { font-size: clamp(26px, 2vw, 32px); letter-spacing: -0.03em; line-height: 1.1; }
.row-summary { color: var(--color-muted); }

.row-panel {
  display: grid;
  grid-template-rows: 0fr;
  visibility: hidden;
  transition: grid-template-rows 200ms var(--ease), visibility 0s linear 200ms;
}

.row.is-open .row-panel {
  grid-template-rows: 1fr;
  visibility: visible;
  transition: grid-template-rows 200ms var(--ease), visibility 0s;
}

.row-panel-inner {
  display: grid;
  grid-template-columns: 1.45fr 0.7fr;
  gap: 28px;
  align-items: end;
  min-height: 0;
  overflow: hidden;
  padding-bottom: 28px;
}

.row-panel-inner img {
  width: 100%;
  height: 440px;
  object-fit: cover;
  border-radius: var(--radius-card);
}

.row-panel-inner p { margin: 0 0 16px; color: var(--color-muted); font-size: 18px; }

.colour-figure { margin: 0; }
.colour-figure img {
  width: 100%;
  height: min(640px, 68vh);
  object-fit: cover;
  border-radius: var(--radius-card);
}
.colour-figure figcaption {
  max-width: 62ch;
  margin: 14px 0 0;
  color: var(--color-muted);
}

.wood-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.wood-list img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius-card);
}

.wood-list h3 { margin-top: 12px; font-size: 22px; }
.wood-list p { margin: 6px 0 0; color: var(--color-muted); font-size: 15px; }

.sample {
  background: #111111;
  color: #f0f0e4;
}

.sample-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: start;
}

.sample-copy { display: grid; gap: 16px; position: sticky; top: calc(var(--header) + 24px); }
.sample-copy p { margin: 0; color: #d2d2cc; font-size: 18px; }
.kicker-light { color: #c8c8c2; }

.facts { display: grid; gap: 6px; margin: 8px 0 0; }
.facts div { margin: 0; }
.facts dd { margin: 0; }
.facts a { color: #f0f0e4; text-decoration: none; }
.facts a:hover { color: #ffffff; }

.form {
  display: grid;
  gap: 16px;
  padding: 28px;
  border-radius: var(--radius-card);
  background: var(--color-paper);
  color: var(--color-ink);
}

.field { display: grid; gap: 6px; position: relative; }

.field label { font-size: 15px; font-weight: 500; }

.field-control {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-control);
  background: var(--color-bg);
  color: var(--color-ink);
  font-size: 16px;
  transition: border-color 180ms var(--ease), background-color 180ms var(--ease), transform 120ms var(--ease);
}

textarea.field-control { resize: vertical; min-height: 120px; line-height: 1.5; }

.field-control:hover { border-color: var(--color-ink); }

.field-control:focus {
  outline: 2px solid var(--color-ink);
  outline-offset: 2px;
  border-color: var(--color-ink);
}

.select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  cursor: pointer;
}

[data-empty="true"] { color: var(--color-muted); }

.field.is-invalid .field-control { border-color: var(--color-danger); }
.field-error { display: none; margin: 0; color: var(--color-danger); font-size: 14px; }
.field.is-invalid .field-error { display: block; }

.select-menu { width: 100%; min-width: 0; }

.calendar {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  left: 0;
  width: min(320px, 100%);
  padding: 8px;
  background: var(--color-paper);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-card);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.14);
  transform-origin: top left;
  transform: scale(0.95);
  opacity: 0;
  transition: transform 160ms var(--ease), opacity 160ms var(--ease);
}

.calendar[data-open="true"] {
  transform: scale(1);
  opacity: 1;
  transition-duration: 200ms;
}

.calendar-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.calendar-label { margin: 0; font-size: 16px; font-weight: 500; }

.calendar-week,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-top: 8px;
}

.calendar-week span,
.date-day,
.date-empty {
  height: 36px;
  display: grid;
  place-items: center;
  font-size: 14px;
}

.calendar-week span { color: var(--color-muted); }

.date-day {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--color-ink);
  transition: background-color 180ms var(--ease), color 180ms var(--ease), transform 120ms var(--ease);
  animation: row-in 180ms var(--ease) both;
  animation-delay: calc(var(--i, 0) * 30ms);
}

.date-day:hover:not(:disabled) { background: var(--color-bg-soft); }
.date-day[aria-selected="true"] { background: var(--color-ink); color: var(--color-bg); }
.date-day[data-today="true"]:not([aria-selected="true"]) { font-weight: 600; }
.date-day:disabled { color: #8a8a8a; cursor: not-allowed; transform: none; }

.calendar .text-btn { margin-top: 8px; }
.calendar-grid { animation: reveal 200ms var(--ease); }

@keyframes reveal {
  from { clip-path: inset(0 0 100% 0); }
  to { clip-path: inset(0 0 0 0); }
}

.form-actions { position: relative; display: flex; }

.contact { padding: 100px 0 72px; }

.contact h1 {
  max-width: 12em;
  font-size: clamp(44px, 5vw, 72px);
  font-weight: 600;
  letter-spacing: -0.045em;
}

.contact-lead {
  max-width: 38ch;
  margin: 18px 0 40px;
  color: var(--color-muted);
  font-size: 18px;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: 20px;
  align-items: start;
}

.contact-card {
  display: grid;
  gap: 22px;
  padding: 28px;
  background: var(--color-paper);
}

.contact-card h2 { font-size: 28px; }

.contact-card p,
.contact-card a { margin: 0; color: var(--color-ink); text-decoration: none; }

.contact-card a:hover { text-decoration: underline; text-underline-offset: 3px; }

.contact-label {
  margin: 0 0 6px;
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-note { margin: 0; color: var(--color-muted); font-size: 14px; }

.contact-map { margin-top: 20px; }

.contact-map iframe {
  display: block;
  width: 100%;
  height: clamp(320px, 52vh, 560px);
  border: 1px solid var(--color-line);
  filter: grayscale(1) contrast(1.05);
}

.contact-map .line-link { display: inline-block; margin-top: 12px; }

.toast {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  width: min(340px, 100%);
  padding: 14px 16px;
  background: var(--color-paper);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-card);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.14);
  transform-origin: bottom left;
  animation: toast-in 200ms var(--ease), pulse 600ms var(--ease);
}

.toast.is-leaving { animation: toast-out 160ms var(--ease) forwards; }
.toast-title { margin: 0; font-size: 16px; font-weight: 500; }
.toast p { margin: 4px 0 0; color: var(--color-muted); font-size: 14px; }

@keyframes toast-in {
  0% { opacity: 0; transform: translate(14px, 12px) scale(0.95); }
  55% { opacity: 1; transform: translate(3px, -4px) scale(1); }
  100% { opacity: 1; transform: none; }
}

@keyframes toast-out {
  to { opacity: 0; transform: translate(10px, 12px) scale(0.95); }
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(17, 17, 17, 0.28); }
  100% { box-shadow: 0 0 0 12px rgba(17, 17, 17, 0); }
}

.footer {
  padding: 72px 0 24px;
  background: #000000;
  color: #f0f0e4;
}

@media (max-width: 1400px) {
  .footer { padding-bottom: 76px; }
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr 1fr;
  gap: 48px 32px;
  align-items: start;
}

.footer-logo {
  width: 48px;
  height: 48px;
  margin-bottom: 18px;
  border-radius: 0;
  object-fit: cover;
  background: #000;
}

.footer-name {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 16px;
  font-weight: 500;
}

.footer-brand p {
  margin: 0 0 12px;
  color: #d2d2cc;
  font-size: 15px;
  line-height: 1.45;
}

.footer-label {
  margin: 0 0 16px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-grid a {
  display: block;
  margin: 0 0 10px;
  color: #d2d2cc;
  font-size: 15px;
  text-decoration: none;
  transition: color 180ms var(--ease);
}

.footer-grid a:hover { color: #ffffff; }

.footer-base {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid rgba(240, 240, 228, 0.2);
}

.footer-base p { margin: 0; color: #d2d2cc; font-size: 14px; }
.footer-legal { display: flex; justify-content: center; gap: 16px; }
.footer-legal a { color: #d2d2cc; text-decoration: none; }
.footer-legal a:hover { color: #ffffff; }

.footer-dev-credit {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #d2d2cc;
  font-size: 14px;
  line-height: 1;
  text-decoration: none;
  transition: color 180ms var(--ease);
}

.footer-dev-credit:hover { color: #ffffff; }

.footer-dev-credit img {
  display: block;
  width: 125px;
  height: auto;
  background: none;
}

.to-top {
  position: fixed;
  z-index: 50;
  right: 16px;
  bottom: 16px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--color-line);
  background: var(--color-bg);
  color: var(--color-ink);
  text-decoration: none;
  transform: translateY(8px) scale(0.95);
  opacity: 0;
  pointer-events: none;
  transition: transform 160ms var(--ease), opacity 160ms var(--ease), background-color 180ms var(--ease);
}

.to-top[data-open="true"] {
  transform: none;
  opacity: 1;
  pointer-events: auto;
  transition-duration: 200ms, 200ms, 180ms;
}

.to-top[hidden] { display: none; }

.to-top:hover { background: var(--color-paper); }

.to-top:active { transform: scale(0.97); }

@media (min-width: 961px) {
  body:has(.cookie:not([hidden])) .to-top { bottom: 108px; }
}

.cookie[hidden] { display: none; }

.cookie {
  position: fixed;
  z-index: 70;
  right: 16px;
  bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: min(420px, calc(100% - 32px));
  padding: 12px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-card);
  background: var(--color-bg);
  color: var(--color-ink);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16);
  transform-origin: right bottom;
  transform: translateY(8px) scale(0.98);
  opacity: 0;
  transition: transform 160ms var(--ease), opacity 160ms var(--ease);
}

.cookie[data-open="true"] {
  transform: none;
  opacity: 1;
  transition-duration: 200ms;
}

.cookie p { margin: 0; max-width: 24ch; font-size: 14px; color: var(--color-muted); }
.cookie a { color: var(--color-ink); }
.cookie-actions { display: flex; gap: 8px; }

.system { padding: 48px 0 96px; }
.system-label { grid-column: 2; justify-self: center; margin: 0; font-size: 16px; }
.system h2 { margin-bottom: 20px; }
.system-block { display: grid; gap: 20px; margin-top: 56px; }
.system-block > p { margin: -8px 0 0; max-width: 62ch; color: var(--color-muted); }
.lead-muted { color: var(--color-muted); margin-top: 16px; }
.type-display {
  margin: 0;
  font-size: clamp(56px, 7vw, 104px);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1.02;
  text-wrap: balance;
}
.specimen-dark { padding: 20px; background: #111111; border: 1px solid var(--color-line); }
.form-narrow { max-width: 480px; }

.swatches {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.swatch {
  display: flex;
  align-items: flex-end;
  min-height: 112px;
  padding: 12px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-card);
  font-size: 14px;
}

.swatch span { display: grid; }
.swatch small { color: var(--color-muted); font-size: 12px; }
.hex-dark { display: none; }
html[data-theme="dark"] .hex-light { display: none; }
html[data-theme="dark"] .hex-dark { display: inline; }
.swatch-ink { background: var(--color-ink); color: var(--color-bg); }
.swatch-ink small { color: #d2d2cc; }
.swatch-accent { background: var(--color-accent); }
.swatch-paper { background: var(--color-paper); }
.swatch-soft { background: var(--color-bg-soft); }
.swatch-line { background: var(--color-line); }
.swatch-danger { background: var(--color-danger); color: var(--color-bg); }
.swatch-danger small { color: #f3d6d6; }
.swatch-muted { background: var(--color-muted); color: var(--color-bg); }
.swatch-muted small { color: #d2d2cc; }

.type-stack { display: grid; gap: 16px; }
.type-stack p { margin: 0; color: var(--color-muted); }

.specimen {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.system-card {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 16px;
  align-items: center;
  max-width: 520px;
  padding: 8px;
  border-radius: var(--radius-card);
  background: var(--color-paper);
}

.system-card img {
  width: 160px;
  height: 120px;
  object-fit: cover;
  border-radius: 0;
}

.system-card p { margin: 4px 0 0; color: var(--color-muted); font-size: 14px; }

@media (max-width: 960px) {
  .nav { display: none; }
  .header:has(.nav) .btn { display: none; }
  .menu-toggle { display: inline-flex; }
  .header-bar { grid-template-columns: auto 1fr; }
  .header-tools { grid-column: 2; }
  .about-grid,
  .sample-grid,
  .contact-grid,
  .tech-grid,
  .row-panel-inner,
  .work-card-lead { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: 1fr; }
  .work-card-lead img,
  .work-card img,
  .row-panel-inner img { height: 280px; min-height: 0; }
  .wood-list { grid-template-columns: repeat(2, 1fr); }
  .sample-copy { position: static; }
  .swatches { grid-template-columns: 1fr 1fr; }
  .cookie {
    top: calc(var(--header-h) + 12px);
    right: 12px;
    bottom: auto;
    left: 12px;
    width: auto;
    transform-origin: top right;
    transition: transform 160ms var(--ease), opacity 160ms var(--ease);
  }
  .cookie p { max-width: none; flex: 1 1 100%; }
  .cookie-actions { width: 100%; }
  .cookie-actions .btn { flex: 1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 960px) {
  body:has(.cookie:not([hidden])) .hero,
  body:has(.cookie:not([hidden])) .contact,
  body:has(.cookie:not([hidden])) .catalog { padding-top: 156px; }
  .hero-row { align-items: flex-start; flex-direction: column; gap: 22px; }
}

@media (max-width: 720px) {
  .wrap { width: min(var(--max), calc(100% - 32px)); }
  .section { padding: 72px 0; }
  .hero,
  .contact { padding-top: 100px; }
  .contact .btn { width: 100%; }
  .hero-actions { align-items: stretch; flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; }
  .actions .btn { width: 100%; }
  .row-toggle {
    grid-template-columns: 64px 1fr 24px;
    gap: 8px 14px;
  }
  .row-thumb { width: 64px; height: 64px; grid-row: 1 / span 2; }
  .row-summary { grid-column: 2; }
  .row-toggle .icon-swap { grid-column: 3; grid-row: 1 / span 2; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand { grid-column: auto; }
  .footer-base { grid-template-columns: 1fr; justify-items: start; }
  .footer-legal { justify-content: flex-start; }
  .footer-dev-credit { justify-self: end; }
  .system-card { grid-template-columns: 1fr; }
  .system-card img { width: 100%; height: 180px; }
}

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

html.is-leaving body {
  opacity: 0;
  filter: blur(6px);
  transition: opacity 320ms var(--ease), filter 320ms var(--ease);
}

html.is-entering body {
  animation: lang-in 400ms var(--ease) both;
}

.catalog { padding: 50px 0 72px; }

.catalog h1 {
  max-width: 14em;
  font-size: clamp(44px, 5vw, 72px);
  font-weight: 600;
  letter-spacing: -0.045em;
}

.catalog-lead {
  max-width: 42rem;
  margin: 18px 0 0;
  color: var(--color-muted);
  font-size: 18px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 48px 0 0;
  padding: 0;
  list-style: none;
}

.category-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background: var(--color-paper);
  color: inherit;
  text-decoration: none;
  border: 1px solid var(--color-line);
  overflow: hidden;
}

.category-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 200ms var(--ease);
}

.category-card:hover img { transform: scale(1.03); }

.category-card div {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 18px 18px 20px;
}

.category-card h2 {
  font-size: 28px;
  font-weight: 400;
}

.category-card p {
  color: var(--color-muted);
}

.category-card .nums { margin-top: auto; }

.catalog-shop {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.catalog-side {
  position: sticky;
  top: calc(var(--header-h) + 16px);
}

.catalog-label {
  margin: 0 0 8px;
  color: var(--color-muted);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.catalog-cats {
  position: relative;
  display: flex;
  flex-direction: column;
}

.catalog-knob {
  position: absolute;
  z-index: 0;
  top: 0;
  left: 0;
  background: var(--color-bg-soft);
  pointer-events: none;
  opacity: 0;
  transform-origin: center center;
  transition: transform 160ms var(--ease), width 160ms var(--ease), height 160ms var(--ease), opacity 160ms var(--ease);
}

.catalog-knob[data-open="true"] {
  opacity: 1;
  transition-duration: 200ms, 200ms, 200ms, 200ms;
}

.catalog-cats a {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  color: inherit;
  text-decoration: none;
}

.catalog-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 28px 0 16px;
}

.catalog-bar p { margin: 0; color: var(--color-muted); }

.view-toggle {
  position: relative;
  display: flex;
  border: 1px solid var(--color-ink);
}

.view-toggle button {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: color 200ms var(--ease);
}

.view-toggle button[aria-pressed="true"] {
  color: var(--color-on-action);
}

.view-toggle button:active { scale: 0.97; }

.product-grid {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  align-items: stretch;
}

.product-grid[data-layout="grid"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.product-grid[data-layout="grid"] > li { display: flex; }

.product-grid[data-layout="list"] { grid-template-columns: 1fr; }

.product {
  display: grid;
  overflow: hidden;
  background: var(--color-paper);
  border: 1px solid var(--color-line);
  color: inherit;
  text-decoration: none;
  transition: border-color 180ms var(--ease);
}

.product:hover { border-color: var(--color-ink); }

.product-grid[data-layout="grid"] .product {
  width: 100%;
  height: 100%;
  grid-template-rows: auto 1fr;
}

.product-grid[data-layout="list"] .product { grid-template-columns: 200px minmax(0, 1fr); }

.product img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.product-grid[data-layout="grid"] .product img {
  height: auto;
  transition: transform 200ms var(--ease);
}

.product-grid[data-layout="grid"] .product:hover img { transform: scale(1.03); }

.product-grid[data-layout="list"] .product img { aspect-ratio: 1; }

.product div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 16px 18px 18px;
}

.product h2 {
  font-size: 26px;
  font-weight: 400;
}

.product-grid[data-layout="grid"] .product h2 {
  font-size: 22px;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.product p { margin: 0; color: var(--color-muted); }

.product-grid[data-layout="grid"] .product-sum {
  display: -webkit-box;
  overflow: hidden;
  min-height: 2.8em;
  font-size: 15px;
  line-height: 1.4;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.product .product-price {
  margin-top: auto;
  color: var(--color-ink);
}

.product-grid[data-layout="grid"] .product-price {
  width: 100%;
  padding-top: 12px;
  border-top: 1px solid var(--color-line);
  font-size: 16px;
  font-weight: 500;
}

.crumbs { margin: 0 0 24px; }

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--color-muted);
  font-size: 14px;
  line-height: 1;
}

.crumbs li,
.crumbs a {
  display: flex;
  align-items: center;
}

.crumbs a {
  color: inherit;
  text-decoration: none;
  transition: color 180ms var(--ease);
}

.crumbs a:hover { color: var(--color-ink); }

.crumbs [aria-current="page"] { color: var(--color-ink); }

.crumbs .icon { width: 16px; height: 16px; }

.crumb-sep { color: var(--color-muted); }

.product-detail {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: 32px;
  align-items: start;
}

.product-photo {
  position: sticky;
  top: calc(var(--header-h) + 16px);
}

.product-photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--color-line);
}

.product-selected {
  margin: 20px 0 0;
  font-size: 32px;
  letter-spacing: -0.04em;
}

.attr-list {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.attr-options {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.attr-options button {
  position: relative;
  z-index: 1;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--color-ink);
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: color 200ms var(--ease);
}

.attr-options button[aria-pressed="true"] {
  color: var(--color-on-action);
}

.select-knob {
  position: absolute;
  z-index: 0;
  top: 0;
  left: 0;
  background: var(--color-action);
  pointer-events: none;
  transform-origin: center center;
  transition: transform 200ms var(--ease), width 200ms var(--ease), height 200ms var(--ease);
}

.attr-options button:active { scale: 0.97; }

.calc {
  --calc-pad: 24px;
  margin-top: 32px;
  padding: var(--calc-pad) var(--calc-pad) 0;
  background: var(--color-paper);
  border: 1px solid var(--color-line);
}

.calc h2 {
  font-size: 28px;
  font-weight: 400;
}

.calc-lead {
  max-width: 36rem;
  margin: 8px 0 0;
  color: var(--color-muted);
}

.calc .catalog-label { margin: 22px 0 0; }

.calc-size {
  margin: 6px 0 0;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.calc-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 20px;
  margin-top: 22px;
}

.calc-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calc-field .catalog-label { margin: 0; }

.calc-field .field-control { min-height: 48px; }

.calc-field[data-source="true"] .field-control { border-color: var(--color-ink); }

.calc-rate {
  margin: 0;
  color: var(--color-muted);
  font-size: 14px;
}

.calc-result {
  margin: 24px calc(var(--calc-pad) * -1) 0;
  padding: 18px var(--calc-pad) 20px;
  border-top: 1px solid var(--color-line);
  background: var(--color-bg);
}

.calc-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
  font-size: 15px;
}

.calc-total [data-total] {
  font-size: 32px;
  letter-spacing: -0.04em;
}

.calc-note { margin: 8px 0 0; color: var(--color-muted); font-size: 14px; }

.product-buy {
  position: relative;
  display: flex;
  margin-top: 20px;
}

.product-buy .toast { width: min(340px, calc(100vw - 64px)); }

.cart-link {
  position: relative;
  width: 48px;
  height: 48px;
  border: 0;
}

.cart-link .icon { width: 20px; height: 20px; }

.cart-link:active { transform: scale(0.97); }

.cart-count {
  position: absolute;
  top: 5px;
  right: 5px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--color-action);
  color: var(--color-on-action);
  font-size: 10px;
  line-height: 16px;
  text-align: center;
}

.cart-count[hidden] { display: none; }

html.cart-open { overflow: hidden; }

html.cart-open .header { z-index: 96; }

.cart-backdrop {
  position: fixed;
  z-index: 90;
  top: var(--header-h);
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.46);
  opacity: 0;
  transition: opacity 160ms var(--ease);
}

.cart-backdrop[data-open="true"] {
  opacity: 1;
  transition-duration: 200ms;
}

.cart-backdrop[hidden],
.sidecart[hidden] { display: none; }

.sidecart {
  position: fixed;
  z-index: 95;
  top: var(--header-h);
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: min(440px, 100%);
  background: var(--color-bg);
  border-left: 1px solid var(--color-line);
  transform: translateX(100%);
  transition: transform 160ms var(--ease);
}

.sidecart[data-open="true"] {
  transform: none;
  transition-duration: 200ms;
}

.sidecart-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 72px;
  padding: 12px 12px 12px 20px;
  border-bottom: 1px solid var(--color-line);
}

.sidecart-bar h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 400;
  letter-spacing: -0.03em;
}

.sidecart-bar .icon { width: 20px; height: 20px; }

.sidecart-body {
  flex: 1;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 8px 20px 20px;
}

.sidecart-body:has(.sidecart-empty) {
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidecart-empty {
  margin: 0;
  color: var(--color-muted);
  text-align: center;
}

.sidecart-foot {
  padding: 16px 20px 20px;
  border-top: 1px solid var(--color-line);
  background: var(--color-bg);
}

.sidecart-foot .btn { width: 100%; margin-top: 16px; }
.sidecart-foot .btn:only-child { margin-top: 0; }

.sidecart .cart-line {
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 12px;
  padding: 16px 0;
}

.sidecart .cart-name { font-size: 18px; }
.sidecart .cart-line-total { font-size: 16px; }
.sidecart .cart-line-actions { flex-wrap: wrap; }

@media (max-width: 480px) {
  .sidecart { width: 100%; border-left: 0; }
}

.cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.7fr);
  gap: 32px;
  align-items: start;
  margin-top: 28px;
}

.cart-lines { display: flex; flex-direction: column; }

.cart-line {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 16px;
  padding: 20px 0;
  border-top: 1px solid var(--color-line);
}

.cart-line:first-child { border-top: 0; padding-top: 0; }

.cart-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--color-line);
}

.cart-line-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.cart-name {
  color: inherit;
  font-size: 22px;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.cart-name:hover { text-decoration: underline; text-underline-offset: 4px; }

.cart-size,
.cart-unit { margin: 4px 0 0; color: var(--color-muted); }

.cart-line-total { margin: 0; font-size: 20px; letter-spacing: -0.03em; }

.cart-line-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
}

.stepper {
  display: inline-flex;
  border: 1px solid var(--color-ink);
}

.stepper button,
.stepper input {
  height: 44px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
}

.stepper button {
  width: 44px;
  cursor: pointer;
}

.stepper button:hover { background: var(--color-wash); }

.stepper input {
  width: 4.75rem;
  border-inline: 1px solid var(--color-line);
  text-align: center;
}

.stepper input:focus {
  outline: 2px solid var(--color-ink);
  outline-offset: -2px;
}

.cart-lines .line-link { margin-top: 8px; }

.cart-empty-action { margin: 24px 0 0; }

.cart-summary {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  padding: 24px;
  background: var(--color-paper);
  border: 1px solid var(--color-line);
}

.cart-summary h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 400;
}

.cart-sub {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 18px 0 0;
  font-size: 15px;
}

.cart-sub [data-subtotal] {
  font-size: 32px;
  letter-spacing: -0.04em;
}

.cart-note { margin: 12px 0 0; color: var(--color-muted); font-size: 14px; }

.cart-summary .btn { width: 100%; margin-top: 20px; }

.check-lines { display: grid; gap: 14px; margin-top: 18px; }

.check-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.check-name { margin: 0; }

.check-line .nums { margin: 0; }

@media (max-width: 960px) {
  .catalog-shop,
  .product-detail,
  .cart-layout { grid-template-columns: 1fr; gap: 28px; }
  .cart-summary { position: static; }
  .product-photo { position: static; }
  .catalog-side { position: static; }
  .category-grid,
  .product-grid[data-layout="grid"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .catalog { padding-top: 50px; }
  .category-grid,
  .product-grid[data-layout="grid"] { grid-template-columns: 1fr; }
  .product-grid[data-layout="list"] .product { grid-template-columns: 112px minmax(0, 1fr); }
  .view-toggle { width: 100%; }
  .view-toggle button { flex: 1; justify-content: center; }
  .catalog-bar { align-items: stretch; flex-direction: column; }
  .calc { --calc-pad: 16px; }
  .calc-fields { grid-template-columns: 1fr; }
  .product-buy,
  .product-buy .btn { width: 100%; }
}
