@charset "UTF-8";

:root {
  --cream: #f1ece1;
  --cream-2: #e8e1d2;
  --cream-3: #d9d0bc;
  --ink: #1b1915;
  --ink-2: #2c2823;
  --mute: #6b6558;
  --rule: #c7bda6;
  --accent: #8c3a1f; /* oxide red */
  --accent-hero: #d9a27f; /* warm highlight on dark hero bg */
  --status: #3b6b3b; /* operational green on light bg */
  --status-bg: #7aa27a; /* operational green on dark bg */
  --grid-gap: 24px;
  --pad: 40px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* Screen-reader only utility */
.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 link — visible only on focus */
.skip-link {
  position: fixed;
  top: -80px; left: var(--pad);
  z-index: 10000;
  background: var(--accent);
  color: var(--cream);
  padding: 10px 18px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--accent);
  transition: top 140ms ease;
}
.skip-link:focus-visible {
  top: 14px;
  outline: 2px solid var(--cream);
  outline-offset: 3px;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden; /* on html, not body — avoids body becoming a scroll container that breaks position:fixed */
}

html, body {
  background: var(--cream);
  color: var(--ink);
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 17px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'kern','liga','onum';
}

body {
  cursor: none;
}

/* Focus: keyboard only, mouse/touch suppressed */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
a:focus-visible, button:focus-visible { border-radius: 1px; }
/* programmatic focus for SPA navigation — no visual ring */
main:focus { outline: none; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: none; }

.mono {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}

.rule {
  height: 1px;
  background: var(--rule);
  width: 100%;
}

/* ---------- CURSOR ---------- */
#cursor {
  position: fixed;
  top: 0; left: 0;
  width: 24px; height: 24px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
}
#cursor::before, #cursor::after {
  content: '';
  position: absolute;
  background: var(--cream);
}
#cursor::before { left: 50%; top: 0; width: 1px; height: 100%; transform: translateX(-50%); }
#cursor::after  { top: 50%; left: 0; height: 1px; width: 100%; transform: translateY(-50%); }
#cursor .ring {
  position: absolute;
  inset: 0;
  border: 1px solid var(--cream);
  border-radius: 50%;
  transition: transform 160ms ease, opacity 160ms ease;
}
#cursor.hover .ring { transform: scale(1.6); }
#cursor .label {
  position: absolute;
  left: 20px; top: 18px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cream);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 140ms ease;
}
#cursor.labeled .label { opacity: 1; }
#cursor .coord {
  position: absolute;
  left: -120px; top: 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--cream);
  opacity: 0.7;
  white-space: nowrap;
  text-align: right;
  width: 110px;
}

/* ---------- LAYOUT ---------- */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--cream);
  border-bottom: 1px solid var(--rule);
  padding: 14px var(--pad);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: center;
}
.topbar .brand {
  display: flex; align-items: center; gap: 12px;
  transition: opacity 120ms ease;
}
.topbar .brand:hover { opacity: 0.72; }
.topbar .brand .mark {
  width: 42px; height: 42px;
  border: 1px solid var(--ink);
  position: relative;
  flex: none;
}
.topbar .brand .mark::before {
  content: ''; position: absolute; inset: 6px;
  background: var(--ink);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.topbar .brand .wordmark {
  font-family: 'EB Garamond', serif;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  line-height: 1.15;
  display: flex;
  flex-direction: column;
}
.topbar .brand .wordmark .w1,
.topbar .brand .wordmark .w2 { display: block; white-space: nowrap; }
.topbar .brand .wordmark .w2 { color: var(--mute); }
.topbar nav {
  display: flex; gap: 28px;
  justify-content: center;
}
.topbar nav a {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mute);
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color 120ms, border-color 120ms;
  white-space: nowrap;
}
.topbar nav a:hover, .topbar nav a.active {
  color: var(--ink);
  border-color: var(--ink);
}
.topbar .meta {
  justify-self: end;
  display: flex; gap: 20px;
  align-items: center;
}
.topbar .meta .dot {
  display: inline-block; width: 6px; height: 6px;
  background: var(--status); border-radius: 50%;
  margin-right: 8px;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ---------- HERO (cinematic, restrained) ---------- */
.hero-combined {
  position: relative;
  width: 100%;
  min-height: 92vh;
  background: #0a0907;
  overflow: hidden;
  border-bottom: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  isolation: isolate;
}
.hero-combined__media {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(0.15) contrast(1.02) brightness(0.82);
  z-index: 0;
  border: 0;
  pointer-events: none;
}
.hero-combined__overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(10,9,7,0.55) 0%, rgba(10,9,7,0.15) 28%, rgba(10,9,7,0.25) 62%, rgba(10,9,7,0.82) 100%);
  pointer-events: none;
  z-index: 1;
}
.hero-combined__frame {
  position: absolute;
  top: 18px; left: var(--pad); right: var(--pad);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 3;
  color: color-mix(in srgb, var(--cream) 75%, transparent);
}
.hero-combined__eyebrow {
  letter-spacing: 0.14em;
}
.hero-combined__status {
  display: inline-flex;
  align-items: center;
}
.hero-combined__status .dot {
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--status-bg);
  border-radius: 50%;
  margin-right: 10px;
  animation: pulse 2s infinite;
}
.hero-combined__content {
  position: relative;
  z-index: 2;
  padding: 0 var(--pad) 48px;
  color: var(--cream);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--grid-gap);
}
.hero-combined__content h1 {
  grid-column: 1 / span 11;
  font-family: 'EB Garamond', serif;
  font-weight: 400;
  font-size: clamp(56px, 8.4vw, 132px);
  line-height: 0.92;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.hero-combined__content h1 em { font-style: italic; color: var(--accent-hero); }
.hero-combined__content .sub {
  grid-column: 7 / span 5;
  margin-top: 32px;
  font-size: 19px;
  line-height: 1.55;
  color: color-mix(in srgb, var(--cream) 78%, transparent);
  max-width: 44ch;
}
.hero-combined__specs {
  position: relative;
  z-index: 2;
  padding: 28px var(--pad) 36px;
  border-top: 1px solid color-mix(in srgb, var(--cream) 22%, transparent);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--grid-gap);
  color: var(--cream);
}
.hero-combined__specs .cell {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hero-combined__specs .cell .k {
  color: color-mix(in srgb, var(--cream) 55%, transparent);
  letter-spacing: 0.12em;
}
.hero-combined__specs .cell .v {
  font-family: 'EB Garamond', serif;
  font-size: 30px;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--cream);
}
.hero-combined__specs .cell .v small {
  font-size: 14px;
  color: color-mix(in srgb, var(--cream) 55%, transparent);
  margin-left: 4px;
}

/* project group heads */
.proj-group-head {
  display: grid;
  grid-template-columns: 60px 1.6fr 2fr 40px;
  gap: var(--grid-gap);
  padding: 40px var(--pad) 14px;
  border-top: 1px solid var(--rule);
  align-items: baseline;
}
.proj-group-head:first-of-type { border-top: 1px solid var(--rule); }
.proj-group-head .gh-num { color: var(--mute); }
.proj-group-head .gh-name {
  font-family: 'EB Garamond', serif;
  font-size: 22px;
  font-style: italic;
  letter-spacing: -0.005em;
}
.proj-group-head .gh-desc { color: var(--mute); }

/* four-column comp grid variant -> 2x2 square (desktop only) */
@media (min-width: 769px) {
  .comp-grid.comp-grid--four {
    grid-template-columns: repeat(2, 1fr);
  }
  .comp-grid.comp-grid--four .cell { grid-column: span 1; min-height: 240px; }
}

/* ---------- SECTIONS ---------- */
section.slab {
  padding: 80px var(--pad);
  border-bottom: 1px solid var(--rule);
}
.section-head {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: var(--grid-gap);
  margin-bottom: 56px;
  align-items: baseline;
}
.section-head .num {
  color: var(--mute);
}
.section-head h2 {
  font-family: 'EB Garamond', serif;
  font-weight: 400;
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  max-width: 20ch;
  text-wrap: balance;
}

/* ---------- COMPETENCIES GRID ---------- */
.comp-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}
.comp-grid .cell {
  grid-column: span 4;
  padding: 28px 28px 32px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  min-height: 220px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  background: var(--cream);
  transition: background 200ms;
}
.comp-grid .cell:hover { background: var(--cream-2); }
.comp-grid .cell .idx { color: var(--mute); }
.comp-grid .cell h3 {
  font-family: 'EB Garamond', serif;
  font-weight: 500;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.005em;
  margin-top: 4px;
}
.comp-grid .cell p {
  color: var(--ink-2);
  font-size: 15.5px;
  line-height: 1.5;
  margin-top: auto;
}
.comp-grid .cell .cell-link {
  display: inline-block;
  margin-top: 16px;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--accent);
  text-decoration: none;
  transition: opacity 150ms, transform 150ms;
}
.comp-grid .cell .cell-link:hover { opacity: 0.7; transform: translateX(3px); }

/* ---------- PROJECTS INDEX ---------- */
.projects {
  position: relative;
}
.proj-list {
  border-top: 1px solid var(--rule);
}
.proj-row {
  display: grid;
  grid-template-columns: 60px 1.6fr 1fr 1fr 0.6fr 40px;
  gap: var(--grid-gap);
  padding: 26px var(--pad);
  border-bottom: 1px solid var(--rule);
  align-items: center;
  cursor: none;
  position: relative;
  transition: background 220ms, color 220ms;
}
.proj-row:hover { background: var(--ink); color: var(--cream); }
.proj-row:hover .proj-arrow { transform: translateX(4px); }
.proj-row .idx { color: var(--mute); }
.proj-row:hover .idx { color: var(--cream-3); }
.proj-row .name {
  font-family: 'EB Garamond', serif;
  font-size: 30px;
  line-height: 1;
  letter-spacing: -0.01em;
}
.proj-row .name em { font-style: italic; color: var(--accent); }
.proj-row:hover .name em { color: var(--accent-hero); }
.proj-row .cat, .proj-row .status, .proj-row .year {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
}
.proj-row:hover .cat,
.proj-row:hover .status,
.proj-row:hover .year { color: var(--cream-3); }
.proj-row .proj-arrow {
  justify-self: end;
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  transition: transform 220ms;
}

/* project row thumbnail (mobile only) */
.proj-thumb { display: none; }

/* hover preview */
.hover-preview {
  position: fixed;
  pointer-events: none;
  width: 320px;
  height: 220px;
  background: var(--ink);
  z-index: 50;
  overflow: hidden;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.96);
  transition: opacity 160ms ease, transform 220ms cubic-bezier(.2,.7,.2,1);
  border: 1px solid var(--cream-3);
  will-change: opacity, transform;
}
.hover-preview.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.hover-preview .art { width: 100%; height: 100%; }
.hover-preview__img { width: 100%; height: 100%; object-fit: contain; display: block; }
.hover-preview__code {
  position: absolute; top: 10px; right: 12px;
  font-size: 10px; letter-spacing: 0.12em;
  color: var(--ink);
  background: color-mix(in srgb, var(--cream) 92%, transparent);
  padding: 2px 5px;
}
.hover-preview__label {
  position: absolute; bottom: 16px; left: 12px;
  font-size: 10px; letter-spacing: 0.12em;
  color: var(--ink);
  background: color-mix(in srgb, var(--cream) 92%, transparent);
  padding: 2px 5px;
}
.hover-preview .corner {
  position: absolute; width: 10px; height: 10px;
  border: 1px solid var(--cream);
}
.hover-preview--photo { background: var(--cream); padding: 14px; }
.hover-preview--photo .corner { border-color: var(--ink); }
.hover-preview .c-tl { top: 6px; left: 6px; border-right: 0; border-bottom: 0; }
.hover-preview .c-tr { top: 6px; right: 6px; border-left: 0; border-bottom: 0; }
.hover-preview .c-bl { bottom: 6px; left: 6px; border-right: 0; border-top: 0; }
.hover-preview .c-br { bottom: 6px; right: 6px; border-left: 0; border-top: 0; }

/* ---------- PROJECT DETAIL ---------- */
.detail-hero {
  padding: 40px var(--pad) 0;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--grid-gap);
  border-bottom: 1px solid var(--rule);
}
.detail-hero .back {
  grid-column: 1 / -1;
  margin-bottom: 40px;
  color: var(--mute);
  transition: color 120ms ease;
}
.detail-hero .back:hover { color: var(--ink); }
.detail-hero .meta-col {
  grid-column: 1 / span 3;
}
.detail-hero .title-col {
  grid-column: 4 / span 9;
}
.detail-hero h1 {
  font-family: 'EB Garamond', serif;
  font-weight: 400;
  font-size: clamp(56px, 8vw, 120px);
  line-height: 0.92;
  letter-spacing: -0.015em;
  margin-bottom: 20px;
  text-wrap: balance;
}
.detail-hero h1 em { font-style: italic; color: var(--accent); }
.detail-hero .lede {
  font-size: 20px;
  max-width: 56ch;
  color: var(--ink-2);
  margin-bottom: 24px;
}
.order-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 28px;
  border: 1px solid var(--ink);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  margin-bottom: 48px;
  transition: background 160ms ease, color 160ms ease;
}
.order-btn::after {
  content: '\2192';
  font-family: 'EB Garamond', serif;
  font-size: 18px;
  letter-spacing: 0;
  line-height: 1;
  transition: transform 200ms ease;
}
.order-btn:hover {
  background: var(--ink);
  color: var(--cream);
}
.order-btn:hover::after { transform: translateX(4px); }

.cta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}
.cta-row .order-btn { margin-bottom: 0; }

.tg-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border: 1px solid var(--rule);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
  text-decoration: none;
  transition: border-color 160ms ease, color 160ms ease;
  white-space: nowrap;
}
.tg-btn::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M21.8 2.6 1.5 10.4c-1.3.5-1.3 1.3-.2 1.6l5.2 1.6 12-7.6c.6-.4 1.1-.2.7.2L8.6 16.3l-.2 5.5c.5 0 .7-.2 1-.5l2.4-2.3 5 3.7c.9.5 1.6.2 1.8-.8l3.2-15.1c.4-1.4-.5-2-1-1.2z' fill='%236b7280'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  flex-shrink: 0;
}
.tg-btn:hover {
  border-color: var(--ink-2);
  color: var(--ink);
}

.meta-col .block .v.price-val {
  font-family: 'EB Garamond', serif;
  font-size: 22px;
  color: var(--accent);
  letter-spacing: -0.01em;
}
.detail-hero .image {
  grid-column: 1 / -1;
  margin: 0 calc(var(--pad) * -1);
  height: 100vh;
  background: var(--ink);
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--rule);
}

.meta-col .block {
  padding: 14px 0;
  border-top: 1px solid var(--rule);
}
.meta-col .block:last-child { border-bottom: 1px solid var(--rule); }
.meta-col .block .k { color: var(--mute); display: block; margin-bottom: 6px; }
.meta-col .block .v { font-size: 15px; }

/* specs table */
.specs-table {
  padding: 80px var(--pad);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--grid-gap);
  border-bottom: 1px solid var(--rule);
}
.specs-table .label {
  grid-column: 1 / span 3;
  color: var(--mute);
}
.specs-table .content {
  grid-column: 4 / span 9;
}
.specs-table .content h2 {
  font-family: 'EB Garamond', serif;
  font-weight: 400;
  font-size: 32px;
  letter-spacing: -0.01em;
  margin-bottom: 32px;
  max-width: 22ch;
}
.specs-table .rows {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--rule);
}
.specs-table .row {
  display: grid;
  grid-template-columns: 1fr auto;
  padding: 16px 20px 16px 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.specs-table .row:nth-child(odd) { border-right: 1px solid var(--rule); padding-right: 20px; }
.specs-table .row:nth-child(even) { padding-left: 20px; }
.specs-table .row .k { color: var(--mute); }
.specs-table .row .v {
  font-family: 'EB Garamond', serif;
  font-size: 20px;
}

/* narrative */
.narrative {
  padding: 80px var(--pad);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--grid-gap);
  border-bottom: 1px solid var(--rule);
}
.narrative .label { grid-column: 1 / span 3; color: var(--mute); }
.narrative .body { grid-column: 4 / span 7; }
.narrative .body p {
  font-size: 20px;
  line-height: 1.55;
  margin-bottom: 24px;
  max-width: 60ch;
}
.narrative .body p.pull {
  font-size: 32px;
  line-height: 1.25;
  font-style: italic;
  color: var(--ink);
  margin: 40px 0;
  max-width: 22ch;
  text-wrap: balance;
}

/* image grid */
.img-grid {
  padding: 0 var(--pad) 80px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--grid-gap);
  border-bottom: 1px solid var(--rule);
}
.img-grid .big { grid-column: 1 / span 8; aspect-ratio: 4/3; overflow: hidden; }
.img-grid .sm  { grid-column: 9 / span 4; aspect-ratio: 3/4; overflow: hidden; }

.detail-photo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: var(--cream-2);
}
.detail-hero .image .detail-photo {
  aspect-ratio: auto;
  object-fit: contain;
  max-height: 100vh;
  margin: 0 auto;
}

/* photo carousel */
.carousel {
  position: relative;
  width: 100%;
  height: 100vh;
  background: var(--cream-2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.carousel .detail-photo {
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  margin: 0;
  background: transparent;
  aspect-ratio: auto;
}
.carousel__video-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  background: #0a0907;
}
.carousel__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #0a0907;
}
.carousel__video--local {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0a0907;
  display: block;
}
.carousel__video-fallback {
  position: absolute;
  bottom: 14px; right: 14px;
  z-index: 1;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--cream);
  background: rgba(20, 18, 14, 0.62);
  border: 1px solid color-mix(in srgb, var(--cream) 32%, transparent);
  padding: 8px 12px;
  text-decoration: none;
  backdrop-filter: blur(2px);
}
.carousel__video-fallback:hover {
  background: var(--accent);
  color: var(--cream);
  border-color: var(--accent);
}
.carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px; height: 48px;
  background: color-mix(in srgb, var(--cream) 92%, transparent);
  border: 1px solid var(--rule);
  font-family: 'EB Garamond', serif;
  font-size: 22px;
  color: var(--ink);
  cursor: pointer;
  transition: background 120ms;
  z-index: 2;
}
.carousel__btn:hover { background: var(--cream); }
.carousel__btn--prev { left: 16px; }
.carousel__btn--next { right: 16px; }
.carousel__counter {
  position: absolute;
  bottom: 16px; right: 16px;
  background: color-mix(in srgb, var(--cream) 92%, transparent);
  padding: 6px 10px;
  border: 1px solid var(--rule);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink);
  z-index: 2;
}

/* ---------- PLACEHOLDER ART ---------- */
.art {
  background:
    repeating-linear-gradient(135deg,
      rgba(255,255,255,0.03) 0 2px,
      transparent 2px 6px),
    linear-gradient(180deg, #2a2620 0%, #13110e 100%);
  position: relative;
  overflow: hidden;
}
.art.cream {
  background:
    repeating-linear-gradient(135deg,
      rgba(0,0,0,0.035) 0 2px,
      transparent 2px 6px),
    var(--cream-2);
}
.art .crosshairs {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.art .crosshairs::before, .art .crosshairs::after {
  content: '';
  position: absolute;
  background: color-mix(in srgb, var(--cream) 20%, transparent);
}
.art .crosshairs::before { left: 50%; top: 0; width: 1px; height: 100%; }
.art .crosshairs::after  { top: 50%; left: 0; height: 1px; width: 100%; }
.art .label {
  position: absolute;
  bottom: 16px; left: 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--cream) 70%, transparent);
}
.art.cream .label { color: var(--mute); }
.art .code {
  position: absolute;
  top: 16px; right: 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: color-mix(in srgb, var(--cream) 50%, transparent);
}
.art.cream .code { color: var(--mute); }

/* silhouette placeholders */
.sil {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.sil svg { width: 62%; height: 62%; opacity: 0.7; }
.sil svg .body { fill: none; stroke: color-mix(in srgb, var(--cream) 60%, transparent); stroke-width: 1; }
.art.cream .sil svg .body { stroke: color-mix(in srgb, var(--ink) 55%, transparent); }

/* ---------- FOOTER ---------- */
footer.foot {
  padding: 80px var(--pad) 40px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--grid-gap);
  border-top: 1px solid var(--rule);
}
footer.foot .big {
  grid-column: 1 / span 12;
  font-family: 'EB Garamond', serif;
  font-size: clamp(48px, 7vw, 104px);
  line-height: 0.95;
  letter-spacing: -0.015em;
  margin-bottom: 60px;
  font-weight: 400;
  text-wrap: balance;
}
footer.foot .big em { font-style: italic; color: var(--accent); }
footer.foot .foot-about {
  grid-column: 1 / span 5;
  color: var(--mute);
  font-size: 15px;
  line-height: 1.6;
  max-width: 52ch;
  align-self: start;
}
footer.foot .foot-contacts {
  grid-column: 7 / span 6;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px var(--grid-gap);
  align-self: start;
}
footer.foot .col .k { color: var(--mute); margin-bottom: 12px; display: block; }
footer.foot .col .v { font-size: 17px; }
footer.foot .col .v a { transition: color 120ms ease; }
footer.foot .col .v a:hover { color: var(--accent); }
footer.foot .bar {
  grid-column: 1 / span 12;
  margin-top: 72px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  color: var(--mute);
}

/* ---------- TWEAKS PANEL ---------- */

/* Toggle button: opens/closes the panel */
.tweaks-toggle {
  position: fixed;
  right: 24px; bottom: 24px;
  z-index: 502;
  width: 32px; height: 32px;
  background: var(--ink);
  color: var(--cream);
  border: 1px solid color-mix(in srgb, var(--cream) 28%, transparent);
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  cursor: none;
  transition: border-color 120ms ease, background 120ms ease;
}
.tweaks-toggle:hover { border-color: color-mix(in srgb, var(--cream) 60%, transparent); }
.tweaks-toggle[aria-expanded="true"] { background: var(--ink-2); }

.tweaks {
  position: fixed;
  right: 24px; bottom: 66px; /* 24px margin + 32px button + 10px gap */
  z-index: 500;
  background: var(--ink);
  color: var(--cream);
  padding: 18px;
  width: 280px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  display: none;
}
.tweaks.open { display: block; }
.tweaks h4 {
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--cream-3);
  margin-bottom: 12px;
  font-weight: 500;
  font-family: 'JetBrains Mono', monospace;
}
.tweaks .group { margin-bottom: 14px; }
.tweaks .opts { display: flex; gap: 6px; flex-wrap: wrap; }
.tweaks .opt {
  padding: 6px 10px;
  border: 1px solid color-mix(in srgb, var(--cream) 25%, transparent);
  text-transform: uppercase;
  font-size: 10px;
  cursor: none;
  background: transparent;
  color: var(--cream);
}
.tweaks .opt.active { background: var(--cream); color: var(--ink); }

/* ---------- Tweak variants via [data-*] ----------- */

/* variant B: paper white + ink */
body[data-variant="B"] {
  --cream: #f6f3ec;
  --cream-2: #ece8de;
  --cream-3: #d0c8b4;
  --accent: #1b1915;
}

/* variant C: high-contrast cream + field green */
body[data-variant="C"] {
  --accent: #3b5a2f;
}

/* variant D: dusk - darker cream, amber */
body[data-variant="D"] {
  --cream: #e8e1d2;
  --cream-2: #ddd4c0;
  --cream-3: #c7bda6;
  --rule: #a89e87;
  --accent: #9c5a22;
  --ink: #19160f;
  --mute: #685d4c;
}

/* density */
body[data-density="loose"] { --pad: 56px; --grid-gap: 32px; }
body[data-density="tight"] { --pad: 28px; --grid-gap: 16px; }

/* type */
body[data-type="sans"] {
  font-family: system-ui, -apple-system, 'Helvetica Neue', sans-serif;
}
body[data-type="sans"] h1,
body[data-type="sans"] h2,
body[data-type="sans"] h3,
body[data-type="sans"] .detail-hero h1,
body[data-type="sans"] footer.foot .big {
  font-family: system-ui, -apple-system, 'Helvetica Neue', sans-serif;
  letter-spacing: -0.025em;
  font-weight: 400;
}
body[data-type="sans"] em { font-style: normal; font-weight: 500; }

/* ---------- CONTACT PAGE ---------- */
.contact-hero {
  padding: 40px var(--pad) 80px;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--grid-gap);
  align-content: start;
}
.contact-hero .back {
  grid-column: 1 / -1;
  margin-bottom: 40px;
  color: var(--mute);
  transition: color 120ms ease;
}
.contact-hero .back:hover { color: var(--ink); }
.contact-head__label {
  grid-column: 1 / span 3;
  color: var(--mute);
}
.contact-head__content {
  grid-column: 4 / span 8;
}
.contact-head__content h1 {
  font-family: 'EB Garamond', serif;
  font-weight: 400;
  font-size: clamp(52px, 7.5vw, 112px);
  line-height: 0.93;
  letter-spacing: -0.015em;
  margin-bottom: 28px;
  text-wrap: balance;
}
.contact-head__content h1 em { font-style: italic; color: var(--accent); }
.contact-head__content .sub {
  font-size: 19px;
  color: var(--ink-2);
  max-width: 50ch;
  line-height: 1.5;
}

.contact-channels {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border-bottom: 1px solid var(--rule);
}
.contact-channel {
  padding: 64px var(--pad);
  border-right: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--ink);
  transition: background 200ms;
  min-height: 320px;
}
/* button reset для третьего канала (форма) */
button.contact-channel {
  background: none;
  border: none;
  border-right: 1px solid var(--rule);
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  width: 100%;
}
.contact-channel:last-child { border-right: none; }
.contact-channel:hover { background: var(--cream-2); }
.contact-channel__num { color: var(--mute); margin-bottom: 24px; }
.contact-channel__type { color: var(--mute); margin-bottom: 20px; }
.contact-channel__val {
  font-family: 'EB Garamond', serif;
  font-size: clamp(26px, 3vw, 44px);
  letter-spacing: -0.01em;
  line-height: 1.2;
  flex-grow: 1;
  margin-bottom: 40px;
  word-break: break-all;
}
.contact-channel__cta {
  color: var(--accent);
  letter-spacing: 0.12em;
  transition: opacity 140ms, transform 200ms ease;
}
.contact-channel:hover .contact-channel__cta { opacity: 0.65; transform: translateX(4px); }

/* ======================================================
   RESPONSIVE
   ====================================================== */

/* Touch: скрыть кастомный курсор */
@media (hover: none), (pointer: coarse) {
  body { cursor: auto; }
  button { cursor: pointer; }
  a { cursor: pointer; }
  #cursor { display: none; }
}

/* ---- Планшет (≤ 1024px) ---- */
@media (max-width: 1024px) {
  :root { --pad: 28px; }

  .hero-combined__content h1 { font-size: clamp(48px, 7vw, 96px); }

  .proj-row {
    grid-template-columns: 48px 1.4fr 1fr 0.8fr 40px;
  }
  .proj-row .year { display: none; }

  .detail-hero h1 { font-size: clamp(48px, 7.5vw, 96px); }

  footer.foot .big { font-size: clamp(40px, 6vw, 80px); }

  /* Carousel height: 70vw keeps it proportional, avoids full-screen on landscape tablet */
  .carousel,
  .detail-hero .image { height: 70vw; min-height: 380px; }
}

/* ---- Мобильный (≤ 768px) ---- */
@media (max-width: 768px) {
  :root {
    --pad: 20px;
    --grid-gap: 14px;
  }

  /* Topbar */
  .topbar {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 12px var(--pad);
  }
  .topbar .brand { margin-bottom: 10px; }
  .topbar nav {
    grid-column: 1;
    justify-content: flex-start;
    gap: 18px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
    border-top: 1px solid var(--rule);
    padding-top: 10px;
    /* Subtle right-edge fade — signals overflow when items don't fit */
    -webkit-mask-image: linear-gradient(to right, black 93%, transparent 100%);
    mask-image: linear-gradient(to right, black 93%, transparent 100%);
  }
  .topbar nav::-webkit-scrollbar { display: none; }
  .topbar .meta { display: none; }

  /* Hero */
  .hero-combined { min-height: 80vh; }
  /* Оверлей «А–00 · Основательные технологии» скрываем на мобильном:
     он абсолютный top:18px и налезает на h1 при маленькой высоте экрана */
  .hero-combined__frame { display: none; }
  .hero-combined__content {
    grid-template-columns: 1fr;
    padding: 0 var(--pad) 32px;
  }
  .hero-combined__content h1 {
    grid-column: 1;
    font-size: clamp(34px, 11vw, 56px);
  }
  .hero-combined__content .sub {
    grid-column: 1;
    margin-top: 18px;
    font-size: 17px;
  }
  .hero-combined { padding-bottom: 56px; }
  .hero-combined__specs {
    grid-template-columns: repeat(2, 1fr);
    padding: 20px var(--pad) 24px;
    gap: 14px;
  }
  .hero-combined__specs .cell .v { font-size: 24px; }

  /* Sections */
  section.slab { padding: 44px var(--pad); }
  .section-head {
    grid-template-columns: 1fr;
    margin-bottom: 28px;
    gap: 8px;
  }
  .section-head h2 { font-size: clamp(22px, 5.5vw, 32px); }

  /* Competencies */
  .comp-grid {
    grid-template-columns: repeat(2, 1fr);
    border-left: none;
  }
  .comp-grid .cell {
    grid-column: span 1;
    min-height: 160px;
    padding: 20px;
  }
  .comp-grid--four .cell { min-height: 140px; }

  /* Project group head */
  .proj-group-head {
    grid-template-columns: auto 1fr;
    padding: 20px var(--pad) 8px;
    gap: 12px;
    align-items: center;
  }
  .proj-group-head .gh-desc { display: none; }

  /* Project rows */
  .proj-row {
    grid-template-columns: 28px 56px 1fr auto;
    padding: 14px var(--pad);
    gap: 10px;
    align-items: center;
  }
  .proj-row .cat,
  .proj-row .status,
  .proj-row .year { display: none; }
  .proj-row .name { font-size: 22px; }

  /* Project row thumbnail */
  .proj-thumb {
    display: block;
    width: 56px;
    height: 42px;
    overflow: hidden;
    background: var(--ink);
    flex: none;
    position: relative;
  }
  .proj-thumb__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  .proj-thumb__sil {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .proj-thumb__sil svg {
    width: 90%;
    height: 90%;
    opacity: 0.7;
  }
  .proj-thumb__sil svg .body {
    fill: none;
    stroke: color-mix(in srgb, var(--cream) 55%, transparent);
    stroke-width: 1.5;
  }
  .proj-row:hover .proj-thumb { background: var(--ink-2); }
  .proj-thumb--photo { background: var(--cream); padding: 4px; }
  .proj-row:hover .proj-thumb--photo { background: var(--cream-2); }

  /* thumb overlays */
  .proj-thumb__code {
    position: absolute; top: 4px; right: 4px;
    font-size: 7.5px; letter-spacing: 0.1em;
    padding: 1px 3px; line-height: 1.3;
    background: color-mix(in srgb, var(--cream) 88%, transparent);
    color: var(--ink);
  }
  .proj-thumb:not(.proj-thumb--photo) .proj-thumb__code {
    background: color-mix(in srgb, var(--ink) 70%, transparent);
    color: color-mix(in srgb, var(--cream) 85%, transparent);
  }
  .proj-thumb__c {
    position: absolute; width: 6px; height: 6px; border: 1px solid;
  }
  .proj-thumb--photo .proj-thumb__c { border-color: var(--ink); }
  .proj-thumb:not(.proj-thumb--photo) .proj-thumb__c { border-color: color-mix(in srgb, var(--cream) 50%, transparent); }
  .proj-thumb__c.c-tl { top: 3px; left: 3px; border-right: 0; border-bottom: 0; }
  .proj-thumb__c.c-tr { top: 3px; right: 3px; border-left: 0; border-bottom: 0; }
  .proj-thumb__c.c-bl { bottom: 3px; left: 3px; border-right: 0; border-top: 0; }
  .proj-thumb__c.c-br { bottom: 3px; right: 3px; border-left: 0; border-top: 0; }

  /* Hover preview — не нужен на тач */
  .hover-preview { display: none; }

  /* Detail hero */
  .detail-hero {
    display: flex;
    flex-direction: column;
    padding: 20px var(--pad) 0;
    gap: 0;
  }
  .detail-hero .back { margin-bottom: 20px; }
  .detail-hero .title-col { order: 1; }
  /* На мобильном: фото идёт перед мета-блоком — первый экран показывает
     заголовок + CTA + изображение, а не заголовок + сухой список полей */
  .detail-hero .image {
    order: 2;
    height: 56vw;
    min-height: 240px;
    margin-top: 16px;
    margin-left: calc(var(--pad) * -1);
    margin-right: calc(var(--pad) * -1);
    width: calc(100% + var(--pad) * 2);
  }
  .detail-hero .meta-col {
    order: 3;
    display: flex;
    flex-wrap: wrap;
    margin-top: 0;
    border-top: 1px solid var(--rule);
  }
  .detail-hero .meta-col .block {
    flex: 1 1 50%;
    padding: 12px 0;
    border-top: 1px solid var(--rule);
    border-bottom: none;
  }
  .detail-hero .meta-col .block:last-child { border-bottom: none; }
  .detail-hero h1 { font-size: clamp(38px, 12vw, 64px); margin-bottom: 14px; }
  .detail-hero .lede { font-size: 17px; margin-bottom: 16px; }
  .cta-row { flex-direction: column; align-items: stretch; margin-bottom: 20px; gap: 10px; }
  .order-btn { display: flex; justify-content: center; margin-bottom: 0; }
  .tg-btn { justify-content: center; }

  /* Carousel */
  .carousel {
    height: 56vw;
    min-height: 240px;
  }
  .carousel__btn { width: 38px; height: 38px; font-size: 18px; }
  .carousel__btn--prev { left: 8px; }
  .carousel__btn--next { right: 8px; }

  /* Specs table */
  .carousel__counter { right: 60px; }

  .specs-table {
    display: block;
    padding: 40px var(--pad);
  }
  .specs-table .label { display: block; margin-bottom: 16px; }
  .specs-table .content h2 { font-size: 22px; margin-bottom: 20px; }
  .specs-table .rows { grid-template-columns: 1fr; }
  .specs-table .row:nth-child(odd),
  .specs-table .row:nth-child(even) {
    border-right: none;
    padding-left: 0;
    padding-right: 0;
  }

  /* Narrative */
  .narrative {
    display: block;
    padding: 40px var(--pad);
  }
  .narrative .label { display: block; margin-bottom: 16px; }
  .narrative .body p { font-size: 17px; }
  .narrative .body p.pull { font-size: 22px; margin: 28px 0; }

  /* Img grid */
  .img-grid {
    display: block;
    padding: 0 var(--pad) 40px;
  }
  .img-grid .big, .img-grid .sm {
    width: 100%;
    aspect-ratio: 4/3;
    margin-bottom: var(--grid-gap);
  }

  /* Contact page */
  .contact-hero {
    display: flex;
    flex-direction: column;
    padding: 20px var(--pad) 48px;
  }
  .contact-head__label { margin-bottom: 20px; }
  .contact-head__content h1 { font-size: clamp(38px, 12vw, 60px); margin-bottom: 20px; }
  .contact-head__content .sub { font-size: 17px; }
  .contact-channels { grid-template-columns: 1fr; }
  .contact-channel {
    border-right: none;
    border-bottom: 1px solid var(--rule);
    padding: 40px var(--pad);
    min-height: auto;
  }
  button.contact-channel { border-right: none; }
  .contact-channel:last-child { border-bottom: none; }

  /* Safe area: фиксированная ⚙ кнопка 44px + 24px отступ = 68px от низа.
     Добавляем запас на страницах с длинным контентом. */
  main#main-content { padding-bottom: 80px; }

  /* Footer */
  footer.foot {
    grid-template-columns: 1fr;
    padding: 44px var(--pad) 24px;
    gap: 32px;
  }
  footer.foot .big {
    grid-column: 1 / -1;
    font-size: clamp(28px, 9vw, 48px);
    margin-bottom: 8px;
  }
  footer.foot .foot-about {
    grid-column: 1 / -1;
    max-width: 100%;
  }
  footer.foot .foot-contacts {
    grid-column: 1 / -1;
    grid-template-columns: 1fr 1fr;
    gap: 24px 16px;
  }
  footer.foot .col { grid-column: span 1; }
  footer.foot .bar {
    grid-column: 1 / -1;
    flex-direction: column;
    gap: 6px;
    margin-top: 32px;
    padding-top: 16px;
    padding-bottom: 56px;
    white-space: normal;
    word-break: break-word;
  }
}

/* ---- Очень маленький экран (≤ 480px) ---- */
@media (max-width: 480px) {
  .comp-grid { grid-template-columns: 1fr; }
  .comp-grid .cell { grid-column: 1; }

  footer.foot .col { grid-column: 1 / -1; }

  .detail-hero .meta-col .block { flex: 1 1 100%; }
}

/* ---- Touch targets: минимум 44×44px ---- */
@media (pointer: coarse) {
  /* Навигационные ссылки */
  .topbar nav a {
    padding: 14px 2px;
    display: inline-flex;
    align-items: center;
  }

  /* Карусель */
  .carousel__btn { width: 44px; height: 44px; font-size: 20px; }
  .carousel__btn--prev { left: 8px; }
  .carousel__btn--next { right: 8px; }

  /* Кнопка назад в досье */
  .detail-hero .back { padding: 12px 0; display: inline-block; }

  /* Tweaks toggle */
  .tweaks-toggle { width: 44px; height: 44px; }
  .tweaks { bottom: 80px; } /* 24 gap + 44 button + 12 gap */

  /* Проектные строки уже достаточно высокие */
}

/* ---- prefers-reduced-motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  #cursor { display: none; }
  html { scroll-behavior: auto; }
}

/* ---- Планшет-портрет (641–768px): detail-hero — сетка вместо flex-колонки ----
   На max-width:768px включается мобильный flex-column, из-за чего на iPad-portrait
   заголовок занимает ~50% ширины, а остальное — пустота.
   Этот блок идёт ПОСЛЕ max-width:768px и переопределяет только detail-hero. */
@media (min-width: 641px) and (max-width: 768px) {
  .detail-hero {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--grid-gap);
    padding: 32px var(--pad) 0;
    flex-direction: unset;
  }
  .detail-hero .back   { grid-column: 1 / -1; margin-bottom: 28px; }
  .detail-hero .title-col {
    grid-column: 5 / -1;
    order: unset;
  }
  .detail-hero .meta-col {
    grid-column: 1 / span 4;
    order: unset;
    display: block;
    margin-top: 0;
    border-top: none;
    flex-wrap: unset;
  }
  .detail-hero .meta-col .block { flex: unset; }
  .detail-hero .image {
    grid-column: 1 / -1;
    order: unset;
    height: 60vw;
    min-height: 340px;
    margin-top: 0;
    margin-left: calc(var(--pad) * -1);
    margin-right: calc(var(--pad) * -1);
    width: calc(100% + var(--pad) * 2);
  }
  .detail-hero h1 { font-size: clamp(38px, 5.5vw, 60px); }
  .order-btn { display: inline-flex; justify-content: unset; margin-bottom: 48px; }
}

/* ---- Узкий экран: tweaks-панель не вылезает за край ---- */
@media (max-width: 340px) {
  .tweaks { left: 8px; right: 8px; width: auto; }
}

/* ---- Ультраширокий (≥ 1600px) ---- */
@media (min-width: 1600px) {
  /* Constrain all content to a readable max-width.
     width: 100% is needed because main is a flex child — without it,
     the element shrinks to intrinsic content width instead of filling
     the available space up to max-width. */
  main#main-content {
    width: 100%;
    max-width: 1680px;
    margin-left: auto;
    margin-right: auto;
  }

  /* Hero breaks out of max-width to remain full viewport width.
     Math: margin-left pulls left by (viewportWidth/2 - parentWidth/2),
     so the hero's left edge aligns with viewport left. */
  .hero-combined {
    width: 100vw;
    margin-left: calc(50% - 50vw);
  }
}

/* ================================================================
   ORDER MODAL
   ================================================================ */

.order-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.order-modal[hidden] { display: none; }

.order-modal__bg {
  position: absolute;
  inset: 0;
  background: oklch(15% 0.01 60 / 0.72);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.order-modal__panel {
  position: relative;
  z-index: 1;
  background: var(--cream);
  border: 1px solid var(--rule);
  width: 100%;
  max-width: 460px;
  padding: 36px 40px 40px;
  animation: modal-in 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* header */
.order-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}
.order-modal__eyebrow {
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--mute);
  margin-bottom: 6px;
  text-transform: uppercase;
}
.order-modal__product-name {
  font-family: 'EB Garamond', serif;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.order-modal__close {
  background: none;
  border: 1px solid var(--rule);
  color: var(--ink-2);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  flex-shrink: 0;
  transition: background 120ms, color 120ms;
}
.order-modal__close:hover { background: var(--cream-2); color: var(--ink); }

/* fields */
.order-modal__field { margin-bottom: 18px; }
.order-modal__label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--mute);
  text-transform: uppercase;
  margin-bottom: 7px;
}
.order-modal__input {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 0;
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.3;
  padding: 10px 14px;
  outline: none;
  transition: border-color 150ms;
}
.order-modal__input:focus { border-color: var(--ink-2); }
.order-modal__input::placeholder { color: var(--mute); opacity: 0.55; }
.order-modal__input.invalid { border-color: var(--accent); }
textarea.order-modal__input { resize: none; min-height: 88px; line-height: 1.5; }

/* tab toggle email / phone */
.order-modal__tabs {
  display: flex;
  gap: 0;
  margin-bottom: 18px;
  border: 1px solid var(--rule);
  width: fit-content;
}
.order-modal__tab {
  background: none;
  border: none;
  color: var(--ink-2);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 7px 18px;
  cursor: pointer;
  transition: background 120ms, color 120ms;
  border-right: 1px solid var(--rule);
}
.order-modal__tab:last-child { border-right: none; }
.order-modal__tab.active {
  background: var(--ink);
  color: var(--cream);
}
.order-modal__tab:not(.active):hover { background: var(--cream-2); }

/* bottom row */
.order-modal__row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.order-modal__submit {
  background: var(--ink);
  color: var(--cream);
  border: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.05em;
  padding: 12px 24px;
  cursor: pointer;
  transition: opacity 150ms;
}
.order-modal__submit:hover { opacity: 0.82; }
.order-modal__submit:disabled { opacity: 0.38; cursor: not-allowed; }
.order-modal__hint {
  font-size: 10px;
  letter-spacing: 0.03em;
  color: var(--mute);
}
.order-modal__err {
  margin-top: 14px;
  font-size: 13px;
  color: var(--accent);
  line-height: 1.45;
}
.order-modal__err[hidden] { display: none; }

/* consent checkbox */
.order-modal__consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 18px;
  font-size: 11px;
  letter-spacing: .03em;
  color: var(--mute);
  line-height: 1.55;
  cursor: pointer;
  user-select: none;
}
.order-modal__consent input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  margin-top: 1px;
  border: 1px solid var(--rule);
  background: transparent;
  cursor: pointer;
  background-size: 10px;
  background-position: center;
  background-repeat: no-repeat;
  transition: background-color 100ms ease, border-color 100ms ease;
}
.order-modal__consent input[type="checkbox"]:checked {
  background-color: var(--ink);
  border-color: var(--ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M1.5 5l2.5 2.5 4.5-4.5' stroke='%23f1ece1' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.order-modal__consent input[type="checkbox"].invalid { border-color: var(--accent); }
.order-modal__consent a { color: inherit; text-decoration: underline; }

/* success state */
.order-modal__ok {
  text-align: center;
  padding: 12px 0 4px;
}
.order-modal__ok[hidden] { display: none; }
.order-modal__ok-mark {
  display: block;
  font-size: 28px;
  color: var(--accent);
  margin-bottom: 14px;
}
.order-modal__ok-title {
  display: block;
  font-family: 'EB Garamond', serif;
  font-size: 24px;
  font-weight: 500;
  margin-bottom: 8px;
}
.order-modal__ok-text {
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: 24px;
}
.order-modal__ok-close {
  background: none;
  border: 1px solid var(--rule);
  color: var(--ink);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 9px 22px;
  cursor: pointer;
  transition: background 120ms;
}
.order-modal__ok-close:hover { background: var(--cream-2); }

@media (max-width: 540px) {
  .order-modal { padding: 12px; align-items: flex-end; }
  .order-modal__panel {
    padding: 28px 24px 32px;
    animation: modal-in-mobile 240ms cubic-bezier(0.22, 1, 0.36, 1);
  }
  @keyframes modal-in-mobile {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  .order-modal__product-name { font-size: 20px; }
  .order-modal__row { gap: 12px; }
  .order-modal__submit { width: 100%; justify-content: center; text-align: center; }
}

/* ─── About page ──────────────────────────────────────────────────────────── */

.about-hero {
  padding: 40px var(--pad) 0;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--grid-gap);
  align-content: start;
}
.about-hero .back {
  grid-column: 1 / -1;
  margin-bottom: 40px;
  color: var(--mute);
  transition: color 120ms ease;
}
.about-hero .back:hover { color: var(--ink); }
.about-hero__label {
  grid-column: 1 / span 3;
  color: var(--mute);
}
.about-hero__content {
  grid-column: 4 / span 8;
  padding-bottom: 72px;
}
.about-hero__content h1 {
  font-family: 'EB Garamond', serif;
  font-weight: 400;
  font-size: clamp(52px, 7.5vw, 112px);
  line-height: 0.93;
  letter-spacing: -0.015em;
  margin-bottom: 28px;
  text-wrap: balance;
}
.about-hero__content h1 em { font-style: italic; color: var(--accent); }
.about-hero__content .sub {
  font-size: 19px;
  color: var(--ink-2);
  max-width: 50ch;
  line-height: 1.5;
}
.about-metrics {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--rule);
}
.about-metrics__cell {
  padding: 28px 0;
  border-right: 1px solid var(--rule);
}
.about-metrics__cell:last-child { border-right: none; }
.about-metrics__k {
  font-size: 10px;
  letter-spacing: .08em;
  color: var(--mute);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.about-metrics__v {
  font-family: 'EB Garamond', serif;
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 500;
  letter-spacing: -.01em;
  line-height: 1;
}
.about-metrics__v small { font-size: 0.55em; opacity: 0.65; }

@media (max-width: 1024px) {
  .about-hero__label  { grid-column: 1 / span 3; }
  .about-hero__content { grid-column: 4 / span 9; }
}

@media (max-width: 768px) {
  .about-hero {
    display: flex;
    flex-direction: column;
    padding: 28px var(--pad) 0;
  }
  .about-hero .back    { margin-bottom: 24px; }
  .about-hero__label   { margin-bottom: 14px; }
  .about-hero__content { padding-bottom: 40px; }
  .about-hero__content h1 { font-size: clamp(42px, 12vw, 68px); }
  .about-metrics { grid-template-columns: 1fr 1fr; }
  .about-metrics__cell:nth-child(2) { border-right: none; }
  .about-metrics__cell:nth-child(3),
  .about-metrics__cell:nth-child(4) { border-top: 1px solid var(--rule); }
  .about-metrics__cell:nth-child(4) { border-right: none; }
}

/* ─── Privacy page ─────────────────────────────────────────────────────────── */

.privacy-hero {
  padding: 40px var(--pad) 72px;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--grid-gap);
  align-content: start;
}
.privacy-hero .back {
  grid-column: 1 / -1;
  margin-bottom: 40px;
  color: var(--mute);
  transition: color 120ms ease;
}
.privacy-hero .back:hover { color: var(--ink); }
.privacy-hero__label {
  grid-column: 1 / span 3;
  color: var(--mute);
}
.privacy-hero__content {
  grid-column: 4 / span 8;
}
.privacy-hero__content h1 {
  font-family: 'EB Garamond', serif;
  font-weight: 400;
  font-size: clamp(42px, 6vw, 88px);
  line-height: 0.95;
  letter-spacing: -0.015em;
  margin-bottom: 20px;
  text-wrap: balance;
}
.privacy-hero__content h1 em { font-style: italic; color: var(--accent); }
.privacy-hero__content .sub {
  font-size: 17px;
  color: var(--ink-2);
  max-width: 52ch;
  line-height: 1.5;
}

.privacy-body {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--grid-gap);
  padding: 72px var(--pad) 120px;
}
.privacy-section {
  grid-column: 4 / span 7;
  margin-bottom: 44px;
  padding-bottom: 44px;
  border-bottom: 1px solid var(--rule);
}
.privacy-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.privacy-section__num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: .08em;
  color: var(--mute);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.privacy-section h2 {
  font-family: 'EB Garamond', serif;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -.01em;
  margin-bottom: 16px;
}
.privacy-section p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-2);
  margin-bottom: 10px;
}
.privacy-section p:last-child { margin-bottom: 0; }
.privacy-section ul {
  margin: 8px 0 12px 18px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-2);
}
.privacy-section a { color: var(--ink); text-decoration: underline; }

@media (max-width: 1024px) {
  .privacy-hero__label { grid-column: 1 / span 4; }
  .privacy-hero__content { grid-column: 5 / span 8; }
  .privacy-section { grid-column: 5 / span 8; }
}

@media (max-width: 768px) {
  .privacy-hero {
    display: flex;
    flex-direction: column;
    padding: 28px var(--pad) 48px;
  }
  .privacy-hero .back { margin-bottom: 24px; }
  .privacy-hero__label { margin-bottom: 14px; }
  .privacy-hero__content h1 {
    font-size: clamp(26px, 7vw, 40px);
    overflow-wrap: break-word;
  }
  .privacy-body {
    display: block;
    padding: 40px var(--pad) 80px;
  }
  .privacy-section { grid-column: unset; }
}

/* ─── Scroll animations ────────────────────────────────────────────────────── */
/* JS adds .js-animate to <html>; skipped when prefers-reduced-motion: reduce  */

.js-animate .slab,
.js-animate .specs-table,
.js-animate .narrative,
.js-animate .contact-channels,
.js-animate .contact-hero,
.js-animate .privacy-section {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 500ms ease-out, transform 500ms ease-out;
}
.js-animate .in-view {
  opacity: 1;
  transform: none;
}
/* stagger for grid cells inside animated parents */
.js-animate .in-view .cell:nth-child(2) { transition-delay: 60ms; }
.js-animate .in-view .cell:nth-child(3) { transition-delay: 120ms; }
.js-animate .in-view .cell:nth-child(4) { transition-delay: 180ms; }

/* ============================================================
   Press / СМИ block (product detail)
   ============================================================ */
.press-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--grid-gap);
}
.press-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 28px 30px 26px;
  border: 1px solid var(--rule);
  background: var(--cream);
  text-decoration: none;
  color: var(--ink);
  transition: background 200ms ease, border-color 200ms ease, transform 200ms cubic-bezier(.2,.7,.2,1);
}
.press-card:hover {
  background: var(--cream-2);
  border-color: var(--ink);
  transform: translateY(-2px);
}
.press-card__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rule);
}
.press-card__logo {
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
}
.press-card__logo--izvestia {
  font-family: 'EB Garamond', serif;
  font-size: 27px;
  letter-spacing: 0.02em;
}
.press-card__logo--lenta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 23px;
  letter-spacing: -0.03em;
}
.press-card__logo--lenta .press-card__logo-ru { color: var(--accent); }
.press-card__date {
  color: var(--mute);
  font-size: 11px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.press-card__title {
  font-family: 'EB Garamond', serif;
  font-weight: 500;
  font-size: 21px;
  line-height: 1.25;
  letter-spacing: -0.005em;
  color: var(--ink);
}
.press-card__cta {
  margin-top: auto;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.press-card__arrow {
  transition: transform 200ms cubic-bezier(.2,.7,.2,1);
}
.press-card:hover .press-card__arrow {
  transform: translate(3px, -3px);
}
@media (max-width: 760px) {
  .press-grid { grid-template-columns: 1fr; }
  .press-card { padding: 22px 22px 22px; }
}
