/* ============================================================
   MAISON FOLKARD V5 — prototype styles
   Tokens per spec §2. No colors outside these tokens,
   except lining colors that exist only inside flip-card backs.
   ============================================================ */

/* ---------- self-hosted fonts (latin subsets) ---------- */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900; /* variable file */
  font-display: swap;
  src: url('../fonts/Inter-var.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/IBMPlexMono-400.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/IBMPlexMono-500.woff2') format('woff2');
}
/* metric-compatible fallback to keep CLS ≈ 0 while Inter loads */
@font-face {
  font-family: 'Inter-fallback';
  src: local('Arial');
  ascent-override: 96.9%;
  descent-override: 24.1%;
  line-gap-override: 0%;
  size-adjust: 107%;
}

:root {
  /* brand palette is the design — opt out of forced/auto dark modes */
  color-scheme: light only;
  --paper: #f7f4ef;
  --ink: #1c1917;
  --vermilion: #CC4400;      /* thread, outlines, underlines — non-text only */
  --vermilion-text: #B03A00; /* vermilion as TEXT — passes WCAG AA on paper & halftone-light */
  --halftone-light: #e8e3db;
  --halftone-mid: #66615a;   /* darkened from #7a756e to pass WCAG AA on paper & halftone-light (§12) */
  --wool: #c9baa0;           /* image placeholders only, never UI */

  /* lining colors — live ONLY inside flip-card backs (§6) */
  --lining-001: #1F3A93;
  --lining-002: #D98E32;
  --lining-003: #2E5339;

  --fs-hero: clamp(3.5rem, 11vw, 10rem); /* masthead scale — the Are.na shot */
  --fs-h2: clamp(1.6rem, 3vw, 2.4rem);
  --fs-body: 1rem;
  --fs-mono: 0.8rem;

  --header-h: 64px;
  --space-section: clamp(120px, 18vh, 280px);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --thread-len: 9999;
}

@media (max-width: 767px) {
  :root { --fs-body: 0.95rem; }
}

/* ---------- base ---------- */

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

html {
  scroll-padding-top: calc(var(--header-h) + 32px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  /* cross-page fade — progressive enhancement (Chrome, Safari 18+) */
  @view-transition { navigation: auto; }
  ::view-transition-old(root),
  ::view-transition-new(root) { animation-duration: 0.3s; }
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', 'Inter-fallback', sans-serif;
  font-weight: 400;
  font-size: var(--fs-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-weight: 400; letter-spacing: -0.01em; }

.mono {
  font-family: 'IBM Plex Mono', monospace;
  font-size: var(--fs-mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.dim { color: var(--halftone-mid); }

/* off-screen but readable by screen readers — section outline (§12) */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.container {
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 96px);
}

.prose { max-width: 38rem; }
.prose p + p { margin-top: 1.6rem; }

/* the brand's voice cannot be caption-sized: lead layer for manifestos */
.prose--lead { max-width: 32ch; }
.prose--lead p {
  font-size: clamp(1.375rem, 1.1vw + 1rem, 1.75rem);
  line-height: 1.45;
  letter-spacing: -0.015em;
}

:focus-visible { outline: 1px solid var(--vermilion); outline-offset: 2px; }

::selection { background: var(--vermilion); color: var(--paper); }
.inverse ::selection,
.site-footer ::selection,
.menu ::selection,
.pause--ink ::selection { background: var(--paper); color: var(--ink); }

a, button, summary, .flip-card, input, select { -webkit-tap-highlight-color: transparent; }
a, button, summary, .flip-card { touch-action: manipulation; }

.skip-link {
  position: fixed;
  top: -100%;
  left: clamp(20px, 5vw, 96px);
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 0.75rem 1.25rem;
  text-decoration: none;
}
.skip-link:focus-visible { top: 8px; }

/* underline that grows left → right (§11) */
.u-line { position: relative; text-decoration: none; color: inherit; }
.u-line::after {
  content: "";
  position: absolute;
  left: 0; bottom: -3px;
  width: 100%; height: 1px;
  background: var(--vermilion);
  transform: scaleX(0);
  transform-origin: left;
  /* hover must answer at 0.2–0.25s; 0.4s+ is for entrances, not responses */
  transition: transform 0.25s var(--ease);
}
.u-line:hover::after,
.u-line:focus-visible::after,
.u-line.is-active::after { transform: scaleX(1); }

/* ---------- red thread (§5) ---------- */

.thread {
  position: fixed;
  top: 0; left: 0;
  z-index: 40; /* above content, below header/menu */
  pointer-events: none;
}
.thread path {
  stroke: var(--vermilion);
  fill: none;
  stroke-linecap: round;
  stroke-dasharray: var(--thread-len);
  stroke-dashoffset: var(--thread-len);
}
.thread circle { fill: var(--vermilion); }

/* finishing knot — "the red thread is the last stitch" */
.thread .thread-end {
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}
.thread .thread-end.is-in { opacity: 1; }

@supports (animation-timeline: scroll()) {
  .thread--css path {
    animation: thread-draw linear both;
    animation-timeline: scroll(root);
  }
  .thread--css .thread-end {
    animation: knot-in linear both;
    animation-timeline: scroll(root);
  }
}
@keyframes thread-draw {
  from { stroke-dashoffset: var(--thread-len); }
  to   { stroke-dashoffset: 0; }
}
@keyframes knot-in {
  0%, 97% { opacity: 0; }
  100%    { opacity: 1; }
}

/* no-JS: thread shown statically stitched */
html:not(.js) .thread path { stroke-dasharray: none; stroke-dashoffset: 0; }
html:not(.js) .thread .thread-end { opacity: 1; }

/* ---------- header (§8.1) ---------- */
/* FOLKARD:HEADER styles — markup duplicated across all 5 pages, keep in sync */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: clamp(20px, 5vw, 96px);
  color: var(--ink);
  transition: color 0.4s var(--ease), background 0.25s var(--ease);
}
/* scrolled over light content the band goes solid — the logo must never
   collide with running text; over dark sections the section itself carries it */
.site-header.is-scrolled { background: var(--paper); }
.site-header.on-dark,
body.menu-open .site-header { color: var(--paper); background: transparent; }

.logo {
  font-weight: 500;
  letter-spacing: 0.2em;
  text-decoration: none;
  color: inherit;
}

.site-nav { display: flex; gap: 2.5rem; }
.site-nav a { color: inherit; }

.burger {
  display: none;
  background: none;
  border: 0;
  width: 44px; height: 44px;
  cursor: pointer;
  color: inherit;
}
.burger span {
  display: block;
  width: 20px; height: 1px;
  background: currentColor;
  margin: 3px auto;
  transition: transform 0.4s var(--ease);
}
body.menu-open .burger span:first-child { transform: translateY(2px) rotate(45deg); }
body.menu-open .burger span:last-child  { transform: translateY(-2px) rotate(-45deg); }

@media (max-width: 767px) {
  .site-nav { display: none; }
  .burger { display: block; }
}

/* fullscreen ink menu */
.menu {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: var(--ink);
  display: flex;
  align-items: center;
  padding-inline: clamp(20px, 5vw, 96px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease), visibility 0s 0.4s;
}
body.menu-open .menu {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s var(--ease);
}
body.menu-open { overflow: hidden; }
.menu a {
  display: block;
  color: var(--paper);
  font-size: var(--fs-h2);
  text-decoration: none;
  margin-block: 1.2rem;
  letter-spacing: -0.01em;
}

/* ---------- sections, pauses, inverse (§4) ---------- */

.section { margin-block: var(--space-section); }

.pause {
  height: 70vh;
  height: 70svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-inline: clamp(20px, 5vw, 96px);
}
/* критика 11.07: на мобиле паузы 70vh листаются слишком долго */
@media (max-width: 767px) {
  .pause { height: 45vh; height: 45svh; }
}

.pause p {
  font-size: var(--fs-h2);
  /* silence comes from the space around the words, not from graying them out —
     gray display text reads as disabled (The Row: ink, white, nothing between) */
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.3; /* body leading on display sizes reads amateur */
  max-width: 24ch;
  text-wrap: balance;
}
.pause--ink { background: var(--ink); }
.pause--ink p { color: var(--halftone-light); }

.inverse {
  background: var(--ink);
  color: var(--paper);
  padding-block: clamp(96px, 14vh, 200px);
}
.inverse__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.inverse__grid .prose p + p { margin-top: 1rem; }
.inverse__grid .mono { margin-top: 2.5rem; }
@media (max-width: 767px) {
  .inverse__grid { grid-template-columns: 1fr; }
}

/* ---------- placeholders (§9) ---------- */

.ph {
  background: var(--wool);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
}
.ph span {
  font-family: 'IBM Plex Mono', monospace;
  font-size: var(--fs-mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink);
  max-width: 85%;
}
.ph--ink { background: var(--ink); }
.ph--ink span { color: var(--halftone-light); }
/* real photo layered over its placeholder; if the file is missing,
   onerror removes the img and the caption stays visible */
.ph { position: relative; overflow: hidden; }
.ph__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ph--169 { aspect-ratio: 16 / 9; }
.ph--34  { aspect-ratio: 3 / 4; }
.ph--11  { aspect-ratio: 1 / 1; }
.ph--43  { aspect-ratio: 4 / 3; }

/* ---------- hero (§8.2) ---------- */

.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
}
.hero .ph--fill { position: absolute; inset: 0; }
.hero__content {
  position: absolute;
  left: 0; right: 0;
  /* raised above the crane zone of the photo — type stays on dark ground */
  bottom: clamp(96px, 18vh, 200px);
  color: var(--paper);
  animation: rise-in 0.6s var(--ease) 0.15s both;
}
.hero__title { font-size: var(--fs-hero); line-height: 0.95; margin-left: -0.04em; }
.hero__status { margin-top: 1.5rem; }
.hero__tag { margin-top: 1rem; color: var(--paper); text-wrap: balance; }

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

/* ---------- pre-order button (§2) ---------- */

.btn-preorder {
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  border: none;
  border-radius: 0;
  font-family: 'IBM Plex Mono', monospace;
  font-size: var(--fs-mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 1.1rem 2.75rem;
  cursor: pointer;
  outline: 1px solid var(--vermilion); /* the thread */
  outline-offset: 3px;
  transition: outline-offset 0.25s var(--ease);
}
.btn-preorder:hover,
.btn-preorder:focus-visible { outline-offset: 1px; }
.btn-preorder:active { outline-offset: 0; }

/* trust strip — three promises + a press slot, ledger-like */
.trust__points {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 3rem);
  border-top: 1px solid var(--ink);
  padding-top: 1.5rem;
}
.trust__points li { text-transform: none; letter-spacing: 0.02em; line-height: 1.5; }
.trust__k {
  display: block;
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--vermilion-text);
}
.trust__press { margin-top: clamp(2rem, 5vh, 3.5rem); text-align: center; }
@media (max-width: 767px) {
  .trust__points { grid-template-columns: 1fr; gap: 1.75rem; }
}

.cta { text-align: center; }
.cta .mono { margin-top: 1.75rem; color: var(--halftone-mid); }

/* ---------- collection grid + flip cards (§6) ---------- */

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}
/* staggered 12-col grid: equal cards in a row read as mass retail;
   offset columns read as editorial (Lemaire / Auralee) */
@media (min-width: 768px) {
  .grid-3 { grid-template-columns: repeat(12, 1fr); gap: 0 clamp(2rem, 3vw, 4rem); }
  .grid-3 > .flip-wrap:nth-child(3n + 1) { grid-column: 1 / span 4; }
  .grid-3 > .flip-wrap:nth-child(3n + 2) { grid-column: 6 / span 3; margin-top: clamp(4rem, 14vh, 10rem); }
  .grid-3 > .flip-wrap:nth-child(3n)     { grid-column: 10 / span 3; margin-top: clamp(2rem, 7vh, 5rem); }
  .grid-3--two > .flip-wrap:nth-child(1) { grid-column: 1 / span 4; margin-top: 0; }
  .grid-3--two > .flip-wrap:nth-child(2) { grid-column: 7 / span 4; margin-top: clamp(3rem, 10vh, 7rem); }
}

.view-all { margin-top: 4rem; }

.flip-card { perspective: 1200px; cursor: pointer; }
.flip-card__inner {
  position: relative;
  transform-style: preserve-3d;
  /* delayed un-flip: gives time to read the lining passport */
  transition: transform 0.5s var(--ease) 0.15s;
}
.flip-card__front {
  position: relative;
  transform: rotateY(0deg); /* Safari backface hardening */
}
.flip-card__front,
.flip-card__back {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.flip-card__back {
  position: absolute;
  inset: 0;
  transform: rotateY(180deg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.flip-card.is-flipped .flip-card__inner {
  transform: rotateY(180deg);
  transition-delay: 0s;
}
@media (hover: hover) {
  .flip-card:hover .flip-card__inner {
    transform: rotateY(180deg);
    transition-delay: 0s;
  }
}

/* lining colors exist only here, as inside the coat */
.flip-card--001 .flip-card__back { background: var(--lining-001); color: var(--paper); }
.flip-card--002 .flip-card__back { background: var(--lining-002); color: var(--ink); }
.flip-card--003 .flip-card__back { background: var(--lining-003); color: var(--paper); }

.flip-card__back dl div {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0.5rem;
  padding-block: 0.25rem;
}
.flip-card__open { margin-top: 1rem; }

.flip-hint {
  position: absolute;
  top: 0.75rem; right: 0.75rem;
  display: none;
}
@media (hover: none) { .flip-hint { display: block; } }

.card-caption {
  margin-top: 1rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.card-caption .dim { color: var(--halftone-mid); }

/* indexed captions under frames — every image is a catalogue record (CFCL) */
.shot { margin: 0; }
.shot__cap {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.6rem;
  color: var(--halftone-mid);
}
.inverse .shot__cap,
.inverse .shot__cap .dim { color: var(--halftone-light); }
@media (min-width: 768px) {
  /* frames of equal width read as a feed; varied widths read as an editorial */
  .product__gallery .shot:nth-child(2) { width: 72%; align-self: flex-end; }
  .product__gallery .shot:nth-child(4) { width: 84%; }
}

/* ---------- material passport (§7) ---------- */

.passport {
  background: var(--halftone-light);
  border: 1px solid var(--ink);
  border-radius: 0;
  padding: 1.5rem;
  max-width: 38rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: var(--fs-mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.passport > div {
  display: grid;
  grid-template-columns: minmax(6.5rem, 9rem) 1fr;
  gap: 1rem;
  padding-block: 0.45rem;
}
.passport dt { color: var(--halftone-mid); }
/* ruled rows + a stitched number: a document, not a bordered div */
.passport > div:not(:first-child) { border-top: 1px dashed var(--halftone-mid); }
.passport .edition { color: var(--vermilion-text); font-weight: 500; }
.passport dd.edition { position: relative; display: inline-block; justify-self: start; }
.passport dd.edition::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--vermilion);
}

/* measurements — an extension drawer of the passport */
.passport-details {
  background: var(--halftone-light);
  border: 1px solid var(--ink);
  border-top: 0;
  max-width: 38rem;
}
.passport-details summary {
  list-style: none;
  cursor: pointer;
  padding: 0.9rem 1.5rem;
  color: var(--halftone-mid);
}
.passport-details summary::-webkit-details-marker { display: none; }
.passport-details summary::after { content: "+"; float: right; }
.passport-details[open] summary::after { content: "−"; }
.passport-details table {
  width: calc(100% - 3rem);
  margin: 0 1.5rem 1.25rem;
  border-collapse: collapse;
}
.passport-details th,
.passport-details td {
  text-align: left;
  font-weight: 400;
  padding: 0.35rem 0;
}
.passport-details thead th,
.passport-details tbody th { color: var(--halftone-mid); }

/* standalone policy drawer (shipping / returns / payment) */
.passport-details--solo { border-top: 1px solid var(--ink); margin-top: 1.5rem; }
.preorder-policies { margin: 0 0 2.5rem; }
.policies { padding: 0 1.5rem 1.25rem; }
.policies > div {
  display: grid;
  grid-template-columns: minmax(6.5rem, 9rem) 1fr;
  gap: 1rem;
  padding-block: 0.35rem;
}
.policies dt { color: var(--halftone-mid); }

/* ---------- generic page scaffold ---------- */

.page { padding-top: calc(var(--header-h) + clamp(60px, 10vh, 140px)); }
.page-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: var(--fs-mono);
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--halftone-mid);
  margin-bottom: clamp(3rem, 8vh, 6rem);
}
/* a page may not open with a grey label alone — give it a voice */
.page-lede { margin-bottom: clamp(4rem, 10vh, 8rem); }
.section-label {
  color: var(--halftone-mid);
  font-weight: 400;
  margin-bottom: 3rem;
}

/* ---------- product (§8.4) ---------- */

.product {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 4rem;
  align-items: start;
}
.product__gallery { display: flex; flex-direction: column; gap: 4rem; }
.product__info { position: sticky; top: calc(var(--header-h) + 32px); }
.product__back { margin-bottom: 1.5rem; color: var(--halftone-mid); }
/* mono is the data layer; the coat's name is display — Inter (CFCL contrast) */
.product__title {
  font-family: 'Inter', 'Inter-fallback', sans-serif;
  font-size: clamp(1.6rem, 2.2vw, 2.1rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.product__price { margin-bottom: 2rem; }
.product__info .prose { margin-bottom: 2.5rem; }
.product__info .passport { margin-bottom: 0; }
.product__info .passport-details { margin-bottom: 2.5rem; }
.product__ship { margin-top: 1.5rem; color: var(--halftone-mid); }
.product__note { margin-top: 0.75rem; color: var(--halftone-mid); }
@media (max-width: 767px) {
  .product { grid-template-columns: 1fr; }
  .product__info { position: static; display: flex; flex-direction: column; }
  /* measurements rise above size choice: picking a size blind trades
     confidence for speed — top-1 PDPs put the table before the buttons */
  .product__info .sizes--season { order: 1; }
  .product__info .passport-details--measure { order: 2; border-top: 1px solid var(--ink); margin-bottom: 2.5rem; }
  .product__info .sizes { order: 3; }
  .product__info .size-note { order: 4; }
  .product__info .product__fit { order: 4; }
  .product__info .product__fitting { order: 4; }
  .product__info .btn-preorder {
    order: 5;
    align-self: flex-start;
    /* long page: the CTA must not scroll away */
    position: sticky;
    bottom: 16px;
    z-index: 30;
  }
  .product__info .product__ship { order: 6; }
  .product__info .product__note { order: 6; margin-bottom: 2.5rem; }
  .product__info .product__policies { order: 7; margin-bottom: 2.5rem; }
  .product__info .product__truecost { order: 7; margin-bottom: 2.5rem; }
  .product__info .passport { order: 8; border-bottom: 1px solid var(--ink); }
}

.sizes { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 2.5rem; }
.sizes__label { color: var(--halftone-mid); margin-right: 0.5rem; }
.size-btn {
  min-width: 48px; min-height: 48px;
  background: transparent;
  border: 1px solid var(--ink);
  border-radius: 0;
  font-family: 'IBM Plex Mono', monospace;
  font-size: var(--fs-mono);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.size-btn:active { background: var(--halftone-light); }
.size-btn.is-active { background: var(--ink); color: var(--paper); }

/* objects: plain cards (no flip — objects have no hidden lining to reveal);
   a compact passport sits under the caption */
.obj-passport { margin-top: 1rem; max-width: none; }

/* season toggle: same chip as size, but text labels need breathing room */
.sizes--season { margin-bottom: 1.5rem; flex-wrap: wrap; }
.season-btn { padding-inline: 1rem; letter-spacing: 0.05em; }

/* size guard: pre-order without a size is a silent default — block it */
.sizes.is-error { outline: 1px solid var(--vermilion); outline-offset: 8px; }
.size-note { color: var(--vermilion-text); margin: -1.75rem 0 2.5rem; }
.product__fit { margin: -1.75rem 0 2.5rem; }

/* ---------- process (§8.5) ---------- */

.journey { list-style: none; }
/* five identical image-left rows read as a metronome; alternating
   asymmetric columns + offset text keep a hard grid under tension */
.entry {
  display: grid;
  grid-template-columns: 7fr 4fr;
  column-gap: clamp(3rem, 7vw, 7rem);
  align-items: start;
  margin-block: var(--space-section);
}
.entry__text { padding-top: clamp(2rem, 12vh, 8rem); }
.entry:nth-child(even) { grid-template-columns: 4fr 7fr; }
.entry:nth-child(even) .shot { order: 2; }
.entry__label { color: var(--halftone-mid); margin-bottom: 1.25rem; }
.entry__text p:not(.entry__label) { max-width: 38rem; }

/* the road Istanbul → Tbilisi: the one horizontal story gets the one full-bleed */
.entry--bleed { display: block; margin-inline: calc(50% - 50vw); }
.entry--bleed .ph { aspect-ratio: 21 / 9; }
.entry--bleed .entry__text {
  max-width: 1440px;
  margin-inline: auto;
  padding: 1.25rem clamp(20px, 5vw, 96px) 0;
}
@media (max-width: 767px) {
  .entry, .entry:nth-child(even) { grid-template-columns: 1fr; gap: 2rem; }
  .entry:nth-child(even) .shot { order: 0; }
  .entry__text { padding-top: 0; }
}

/* ---------- about + pre-order form (§8.6) ---------- */

/* text opens the page; the portrait hangs lower and to the right —
   one deliberate off-beat instead of a wireframe split */
.about-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0 clamp(2rem, 4vw, 5rem);
  align-items: start;
}
.about-grid .prose { grid-column: 1 / span 5; }
.about-portrait { grid-column: 7 / span 6; margin-top: clamp(4rem, 16vh, 11rem); }
.about-credit { margin-top: 2.5rem; color: var(--vermilion-text); }

/* brand words (shu, ma) carry the vermilion instead of italics —
   Inter's synthesised italic reads cheap; colour reads intentional */
.about-story em { font-style: normal; color: var(--vermilion-text); }
.about-story + .about-story { margin-top: calc(var(--space-section) * -0.4); }
@media (max-width: 767px) {
  .about-grid { grid-template-columns: 1fr; gap: 3rem; }
  .about-grid .prose, .about-portrait { grid-column: auto; }
  .about-portrait { margin-top: 0; }
}

.preorder-form { max-width: 38rem; }
.field { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1.75rem; }
.field label { color: var(--halftone-mid); }
.field input,
.field select {
  background: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 0;
  padding: 0.75rem 1rem;
  min-height: 48px;
  font: inherit;
  font-size: max(16px, var(--fs-body)); /* <16px would trigger iOS auto-zoom */
  color: var(--ink);
}
.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--vermilion);
}
.field input:user-invalid,
.field select:user-invalid { border-color: var(--vermilion); }
.form-confirm { margin-top: 2rem; }
/* error must be words, not only a colored border (WCAG 1.4.1) */
.form-error { color: var(--vermilion-text); margin-top: 1.25rem; }
.form-note { margin-top: 1.25rem; color: var(--halftone-mid); }
/* monogram hint sits under its input, quiet */
.form-hint { margin-top: 0.5rem; color: var(--halftone-mid); }
.field--initials input { text-transform: uppercase; letter-spacing: 0.15em; max-width: 8rem; }
.preorder-form .btn-preorder:disabled { cursor: default; }

/* ---------- gallery lightbox (zoom) ---------- */

.ph--zoom { cursor: zoom-in; }
.lightbox {
  border: 0;
  padding: 0;
  width: 100vw;
  height: 100vh; /* fallback for Safari < 15.4 */
  height: 100dvh;
  max-width: none;
  max-height: none;
  background: var(--ink);
}
.lightbox::backdrop { background: var(--ink); }
.lightbox__img {
  position: absolute;
  inset: 0;
  margin: auto;
  max-width: min(92vw, 1400px);
  max-height: 86vh; /* fallback for Safari < 15.4 */
  max-height: 86dvh;
  object-fit: contain;
  cursor: zoom-out;
}
.lightbox__close {
  position: absolute;
  top: 12px;
  right: clamp(20px, 5vw, 96px);
  z-index: 2;
  background: none;
  border: 0;
  color: var(--paper);
  font-family: 'IBM Plex Mono', monospace;
  font-size: var(--fs-mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  min-height: 48px;
  cursor: pointer;
}
.lightbox__cap {
  position: absolute;
  left: clamp(20px, 5vw, 96px);
  bottom: 16px;
  color: var(--halftone-light);
}

/* ---------- footer (§8.1) ---------- */
/* FOLKARD:FOOTER styles — markup duplicated across all 5 pages, keep in sync */

.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(60px, 8vh, 120px) clamp(20px, 5vw, 96px) 32px;
  margin-top: var(--space-section);
}
.footer__cols {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 2rem;
  align-items: start;
}
.footer__line {
  text-align: center;
  text-wrap: balance;
  /* the closing line is the payoff of the whole scroll — display size */
  font-size: var(--fs-h2);
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.footer__links { display: flex; gap: 2rem; justify-self: end; }
.footer__links a { color: inherit; white-space: nowrap; }
.footer__links span { color: var(--halftone-light); }
.footer__bottom {
  margin-top: clamp(3rem, 8vh, 6rem);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
}
.footer__legal { color: var(--halftone-light); }

/* footer services index — material / care / stockists */
.footer__index {
  margin-top: clamp(2rem, 5vh, 3.5rem);
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}
.footer__index a { color: var(--halftone-light); }

/* language switcher — static per page (EN ↔ /ru/) */
.footer__lang {
  margin-top: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.footer__lang .dim { color: var(--halftone-mid); }
.footer__lang a { color: var(--halftone-light); }
.footer__lang .lang-cur {
  color: var(--paper);
  position: relative;
}
.footer__lang .lang-cur::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 1px;
  background: var(--vermilion);
}

/* currency switcher — injected into the footer by JS */
.footer__currency {
  margin-top: clamp(2rem, 5vh, 3.5rem);
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer__currency .dim { color: var(--halftone-mid); }
.footer__currency-note {
  flex-basis: 100%;
  margin: 0.25rem 0 0;
  font-family: 'IBM Plex Mono', monospace;
  font-size: var(--fs-mono);
  letter-spacing: 0.03em;
  color: var(--halftone-mid);
}

/* ---- waitlist form (footer) ---- */
.footer__waitlist {
  margin-top: clamp(1.75rem, 4vh, 2.75rem);
  max-width: 24rem;
}
.waitlist__label { color: var(--halftone-light); margin: 0; }
.waitlist__lede {
  color: var(--halftone-mid);
  margin: 0.5rem 0 1.1rem;
  line-height: 1.45;
  text-wrap: balance;
}
.waitlist__row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid var(--halftone-mid);
  transition: border-color 0.25s var(--ease);
}
.waitlist__row:focus-within { border-bottom-color: var(--vermilion); }
.waitlist__input {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  padding: 0.55rem 0;
  color: var(--paper);
  font-family: 'IBM Plex Mono', monospace;
  font-size: var(--fs-mono);
  letter-spacing: 0.02em;
}
.waitlist__input::placeholder { color: var(--halftone-mid); }
.waitlist__input:focus { outline: none; }
.waitlist__submit {
  flex-shrink: 0;
  background: none;
  border: 0;
  padding: 0.25rem 0.15rem;
  color: var(--paper);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s var(--ease), transform 0.2s var(--ease);
}
.waitlist__submit:hover,
.waitlist__submit:focus-visible { color: var(--vermilion); transform: translateX(3px); }
.waitlist__consent {
  display: flex;
  gap: 0.55rem;
  margin-top: 0.9rem;
  cursor: pointer;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  line-height: 1.5;
  color: var(--halftone-mid);
}
.waitlist__consent input {
  margin-top: 0.15rem;
  flex-shrink: 0;
  accent-color: var(--vermilion);
}
.waitlist__consent a { color: var(--halftone-light); }
.waitlist__confirm {
  color: var(--paper);
  margin: 0.9rem 0 0;
  line-height: 1.5;
}
.cur-btn {
  background: none;
  border: 0;
  padding: 0.4rem 0;
  color: var(--halftone-light);
  font-family: 'IBM Plex Mono', monospace;
  font-size: var(--fs-mono);
  letter-spacing: 0.05em;
  cursor: pointer;
  position: relative;
}
.cur-btn::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 1px;
  background: var(--vermilion);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}
.cur-btn:hover::after,
.cur-btn:focus-visible::after,
.cur-btn.is-active::after { transform: scaleX(1); }
.cur-btn.is-active { color: var(--paper); }
.crane { color: var(--vermilion); } /* the one vermilion crane on the site */
/* the mark draws itself — one thread folding into a crane */
.js .crane path {
  stroke-dasharray: var(--crane-len, 320);
  stroke-dashoffset: var(--crane-len, 320);
}
.js .crane circle { opacity: 0; }
.js .crane.is-drawn path {
  transition: stroke-dashoffset 1.2s var(--ease) 0.2s;
  stroke-dashoffset: 0;
}
.js .crane.is-drawn circle {
  transition: opacity 0.3s var(--ease) 1.3s;
  opacity: 1;
}
@media (max-width: 767px) {
  .footer__cols { grid-template-columns: 1fr; }
  .footer__line { text-align: left; }
  .footer__links { justify-self: start; }
}

/* ---------- reveal on scroll (§11) ---------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
/* motion hierarchy: large masses travel further and slower than text */
.js .ph[data-reveal],
.js .shot[data-reveal],
.js .flip-wrap[data-reveal] {
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- print ---------- */

@media print {
  .thread, .site-header, .menu, .flip-hint, .skip-link { display: none; }
  .crane path { stroke-dasharray: none !important; stroke-dashoffset: 0 !important; }
  .crane circle { opacity: 1 !important; }
  .site-footer, .inverse, .pause--ink { background: none; color: var(--ink); }
  .js [data-reveal] { opacity: 1 !important; transform: none !important; }
}

/* ---------- reduced motion: kill everything (§11) ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .thread path { animation: none !important; stroke-dashoffset: 0 !important; }
  .thread .thread-end { animation: none !important; opacity: 1 !important; }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .hero__content { animation: none; }

  /* flip becomes a 0.3s crossfade (§6) */
  .flip-card__inner,
  .flip-card.is-flipped .flip-card__inner { transform: none; transition: none; }
  .flip-card__front,
  .flip-card__back {
    -webkit-backface-visibility: visible;
    backface-visibility: visible;
    transition: opacity 0.3s var(--ease) !important;
    transition-duration: 0.3s !important;
  }
  .flip-card__front { transform: none; }
  .flip-card__back { opacity: 0; transform: none; }
  .flip-card.is-flipped .flip-card__back { opacity: 1; }
  .flip-card.is-flipped .flip-card__front { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) and (hover: hover) {
  .flip-card:hover .flip-card__inner { transform: none; }
  .flip-card:hover .flip-card__back { opacity: 1; }
  .flip-card:hover .flip-card__front { opacity: 0; }
}

/* WCAG AA: лейблы LANGUAGE/CURRENCY на чернильном футере — 2.85:1 у mid, нужен light */
.site-footer .footer__lang .dim,
.site-footer .footer__currency .dim { color: var(--halftone-light); }

/* .entry--bleed использует 50vw — на десктопах со скроллбаром даёт 15px горизонтального скролла */
body { overflow-x: clip; }

/* строка примерок в кластере покупки: воздух до CTA */
.product__fitting { margin-bottom: 1.5rem; }


/* honeypot: людям поле не видно и недоступно, боты его заполняют */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
