/* REEMAX landing — tokens first, everything else references them. */
:root {
  --red: #a8282a;
  --red-deep: #7c1a1c;
  --rose-1: #f7e6e6;
  --rose-2: #ebbdbe;
  --rose-3: #b8474a;
  --ground: #ffffff;
  --ground-2: #f3f1f0;
  --ink: #1b1414;
  --ink-soft: #5e5454;
  --on-red: #ffffff;

  --font-display: "Montserrat", system-ui, sans-serif;
  --font-text: "Montserrat", system-ui, sans-serif;

  /* five steps */
  --s-small: 15px;
  --s-text: 17px;
  --s-head: clamp(28px, 3.4vw, 48px);
  --s-big: clamp(40px, 6vw, 88px);
  --s-monument: clamp(120px, 21vw, 360px);

  --gap: 8px;
  --margin: clamp(16px, 2.2vw, 32px);
  --section: clamp(96px, 14vw, 200px);
  --radius: 0;

  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--s-text);
  line-height: 1.5;
  font-kerning: normal;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
::selection { background: var(--red); color: var(--on-red); }
.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;
}
.wrap { padding-inline: var(--margin); }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 24px;
  background: var(--red); color: var(--on-red);
  font: 600 var(--s-text)/1 var(--font-text);
  text-decoration: none; border: 0; border-radius: var(--radius);
  cursor: pointer;
  transition: transform .2s var(--ease), background-color .2s var(--ease);
}
.btn:hover { background: var(--red-deep); }
.btn:active { transform: scale(.97); }
.arrow { transition: transform .25s var(--ease); display: inline-block; }
a:hover .arrow, button:hover .arrow { transform: translateX(4px); }

/* ---------- Hero: name band and rails ---------- */
.hero {
  min-height: 100svh;
  padding: var(--gap);
  display: grid;
  gap: var(--gap);
  grid-template-rows: auto 64px 1fr;
  background: var(--ground-2);
}
.band {
  background: var(--red);
  color: var(--on-red);
  height: clamp(150px, 19vw, 300px);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.band h1 {
  font: 800 var(--s-monument)/0.8 var(--font-display);
  letter-spacing: -0.045em;
  white-space: nowrap;
  transform: translateY(0.04em);
}
.links { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
.links a {
  background: var(--ground);
  padding: 14px 16px;
  font-size: 16px; font-weight: 600;
  text-decoration: none;
  display: flex; justify-content: space-between; align-items: flex-start;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.links a:hover { background: var(--ink); color: var(--ground); }
.rails {
  display: grid; gap: var(--gap);
  grid-template-columns: repeat(12, 1fr);
  min-height: 0;
}
.rail-left { grid-column: 1 / 3; display: grid; gap: var(--gap); grid-template-rows: 1fr auto; min-height: 0; }
.rail-left .pic { background: var(--ground); display: grid; place-items: center; padding: 16px; min-height: 0; overflow: hidden; }
.rail-left .pic img { max-height: 100%; width: auto; object-fit: contain; }
.facts { background: var(--ground); padding: 16px; font-size: 16px; line-height: 1.35; }
.facts li + li { margin-top: 10px; }
.facts b { display: block; font-size: var(--s-text); }
.stage {
  grid-column: 3 / 11;
  position: relative;
  background: var(--ink);
  overflow: hidden;
  min-height: 420px;
}
.stage-gloves {
  position: absolute; inset: 0 0 34% 0;
  display: flex; align-items: flex-end; justify-content: space-evenly;
  padding: 28px 24px 0;
}
.stage-gloves img { height: 100%; width: 30%; object-fit: contain; object-position: bottom; animation: drift 9s var(--ease) infinite alternate; }
.stage-gloves img:nth-child(2) { animation-delay: -3s; }
.stage-gloves img:nth-child(3) { animation-delay: -6s; }
@keyframes drift { from { transform: translateY(0); } to { transform: translateY(-14px); } }
.statement .btn { align-self: flex-start; }
.statement {
  position: absolute; left: 0; right: 0; bottom: 0;
  min-height: 34%;
  background: var(--ground);
  padding: 24px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 16px;
}
.statement p { font-size: clamp(22px, 2.2vw, 34px); line-height: 1.2; font-weight: 500; max-width: 26em; letter-spacing: -0.01em; }
.rail-right { grid-column: 11 / 13; display: grid; gap: var(--gap); grid-template-rows: repeat(4, 1fr) 1.4fr; }
.rail-right > * { padding: 14px 16px; font-size: var(--s-small); line-height: 1.3; }
.rail-right b { display: block; font-size: clamp(18px, 1.6vw, 26px); line-height: 1.1; letter-spacing: -0.02em; margin-bottom: 4px; }
.t1 { background: var(--ground); }
.t2 { background: var(--rose-1); }
.t3 { background: var(--rose-2); }
.t4 { background: var(--rose-3); color: var(--on-red); }
.t-action {
  background: var(--red); color: var(--on-red);
  text-decoration: none; font-weight: 600;
  display: flex; flex-direction: column; justify-content: space-between;
  transition: background-color .2s var(--ease);
}
.t-action:hover { background: var(--red-deep); }
.t-action .big { font-size: clamp(16px, 1.25vw, 20px); white-space: nowrap; line-height: 1.1; letter-spacing: -0.02em; }

/* ---------- Intro: heading captions a panorama ---------- */
.intro { padding-top: var(--section); }
.intro .wrap { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; }
.intro h2 {
  font: 800 var(--s-big)/0.95 var(--font-display);
  letter-spacing: -0.035em;
}
.captions { display: flex; gap: 48px; margin-top: 0; font-size: var(--s-small); line-height: 1.4; color: var(--ink-soft); }
.captions p { max-width: 260px; }
.panel {
  margin: 40px var(--margin) 0;
  background: var(--red);
  height: clamp(260px, 27vw, 420px);
  overflow: hidden;
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: 0 2vw;
  gap: 1vw;
}
.panel img { width: 16%; height: auto; max-height: 92%; object-fit: contain; transform: translateY(4%); transition: transform .6s var(--ease); }
.panel img:nth-child(even) { transform: translateY(16%); }
.panel:hover img { transform: translateY(2%); }
.about {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px var(--gap);
  padding: 72px var(--margin) 0;
}
.about .lead { grid-column: 1 / 7; font-size: clamp(20px, 1.9vw, 28px); line-height: 1.3; font-weight: 500; letter-spacing: -0.01em; }
.about .lead + p { grid-column: 1 / 7; }
.about dl { grid-column: 8 / 13; grid-row: 1 / 3; display: grid; gap: 28px; align-content: start; }
.about dt { font-weight: 700; font-size: var(--s-text); }
.about dd { color: var(--ink); }
.values { display: flex; flex-wrap: wrap; gap: 6px 18px; font-weight: 600; }

/* ---------- Catalog: statement, table pushed right ---------- */
.catalog { padding-top: var(--section); }
.catalog h2 {
  font: 800 var(--s-big)/0.98 var(--font-display);
  letter-spacing: -0.035em;
  max-width: 16ch;
}
.catalog h2 .indent { padding-left: 3vw; }
.picker {
  margin-top: 56px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
.picker p { font-weight: 600; margin-right: 12px; }
.chip {
  font: 600 var(--s-small)/1 var(--font-text);
  padding: 13px 18px;
  border: 0; border-radius: var(--radius);
  background: var(--ground-2); color: var(--ink);
  cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), transform .15s var(--ease);
}
.chip:hover { background: var(--rose-1); }
.chip:active { transform: scale(.96); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--ground); }
.count { margin-left: auto; color: var(--ink-soft); font-size: var(--s-small); }
.cat-grid {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap);
  margin-top: 48px;
}
.preview {
  grid-column: 1 / 5;
  position: sticky; top: 24px; align-self: start;
  background: var(--ground-2);
  aspect-ratio: 4 / 5;
  display: grid; grid-template-rows: 1fr auto;
  padding: 24px;
}
.preview img { width: 100%; height: 100%; object-fit: contain; min-height: 0; transition: opacity .25s var(--ease), transform .35s var(--ease); }
.preview img.swap { opacity: 0; transform: scale(.97); }
.preview p { font: 800 var(--s-head)/1 var(--font-display); letter-spacing: -0.03em; margin-top: 12px; }
.models { grid-column: 6 / 13; }
.model {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 4px 24px;
  align-items: center;
  padding: 18px 0;
}
.model:nth-child(4n+1):not(:first-child) { margin-top: 20px; }
.model[hidden] { display: none; }
.model .thumb { grid-row: 1 / 3; width: 88px; height: 88px; object-fit: contain; background: var(--ground-2); padding: 6px; transition: background-color .2s var(--ease); }
.model:hover .thumb, .model:focus-within .thumb { background: var(--rose-1); }
.model h3 { font-size: var(--s-text); line-height: 1.3; font-weight: 600; }
.model h3 span { font-family: var(--font-display); font-weight: 700; margin-right: 10px; }
.model .spec { font-size: 16px; color: var(--ink-soft); grid-column: 2 / 3; line-height: 1.4; }
.model .desc { grid-column: 2 / 4; font-size: 16px; line-height: 1.45; }
.model .ask {
  grid-column: 3; grid-row: 1 / 3;
  font-weight: 600; font-size: var(--s-small);
  text-decoration: none; white-space: nowrap;
  color: var(--red);
  padding: 10px 0;
}
.model .ask:hover { color: var(--red-deep); }
.empty { padding: 24px 0; color: var(--ink-soft); }
.std { margin-top: 32px; font-size: var(--s-small); color: var(--ink-soft); }

/* ---------- Features: one-size name columns ---------- */
.index { padding: 20vh var(--margin); }
.index h2 { font-size: 28px; font-weight: 700; letter-spacing: -0.01em; }
.index-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); margin-top: 72px; }
.index-col { font-size: 17px; line-height: 1.3; }
.index-col:nth-child(1) { grid-column: 1 / 4; }
.index-col:nth-child(2) { grid-column: 4 / 7; }
.index-col:nth-child(3) { grid-column: 7 / 10; }
.index-col h3 { font-size: 17px; font-weight: 700; margin-bottom: 20px; }
.index-col li { color: var(--ink-soft); padding: 3px 0; cursor: default; transition: color .2s var(--ease); }
.index-col li:hover, .index-col li:focus { color: var(--ink); outline: none; }
.index-col .sum { display: none; }
.note { grid-column: 10 / 13; grid-row: 1; font-size: 17px; line-height: 1.4; min-height: 6em; }

/* ---------- Proof: names running off the edges ---------- */
.proof h2 { padding: 0 var(--margin) 32px; }
.marquee {
  background: var(--red); color: var(--on-red);
  height: 34vh; min-height: 200px;
  overflow: hidden;
  display: flex; align-items: center;
}
.track { display: flex; white-space: nowrap; animation: run 45s linear infinite; will-change: transform; }
.marquee:hover .track { animation-play-state: paused; }
.track span { font: 800 8vw/1 var(--font-display); letter-spacing: -0.035em; padding-right: 0.5em; display: inline-flex; align-items: center; gap: 0.5em; }
.track span::after { content: ""; width: 0.24em; height: 0.24em; border-radius: 50%; background: currentColor; display: inline-block; }
@keyframes run { to { transform: translateX(-50%); } }
.proof .under { padding: 20px var(--margin) 0; font-size: 18px; max-width: 46em; }
.certs {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--gap);
  padding: 72px var(--margin) 0;
  align-items: start;
}
.certs a { display: block; background: var(--ground-2); padding: 14px; text-decoration: none; transition: background-color .2s var(--ease); }
.certs a:hover { background: var(--rose-1); }
.certs img { width: 100%; height: auto; transition: transform .35s var(--ease); }
.certs a:hover img { transform: translateY(-4px); }
.certs figcaption { font-size: var(--s-small); margin-top: 12px; line-height: 1.35; }

/* ---------- Contact: address in display rows ---------- */
.contact { padding-top: var(--section); }
.contact h2 { padding: 0 var(--margin) 32px; }
.rows a, .rows p {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  min-height: clamp(84px, 10vw, 150px);
  padding: 0 var(--margin) 18px;
  font: 500 clamp(30px, 5.4vw, 80px)/1 var(--font-text);
  letter-spacing: -0.03em;
  text-decoration: none;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.rows > :nth-child(odd) { background: var(--ground-2); }
.rows > :nth-child(even) { background: var(--ground); }
.rows a:hover { background: var(--ink); color: var(--ground); }
.rows .addr { font-size: clamp(22px, 3.2vw, 48px); line-height: 1.1; }
.rows .greet { background: var(--red); color: var(--on-red); }
.rows .greet:hover { background: var(--red-deep); color: var(--on-red); }
.dot {
  flex: none;
  width: 0.9em; height: 0.9em; border-radius: 50%;
  background: var(--on-red); color: var(--red);
  display: inline-grid; place-items: center;
  font-size: 0.9em;
  transition: transform .25s var(--ease);
}
.dot svg { width: 45%; height: 45%; }
.rows .greet:hover .dot { transform: translateX(6px); }
.h-mid { font: 800 var(--s-head)/1.05 var(--font-display); letter-spacing: -0.03em; }

/* ---------- Footer: columns above, wordmark below ---------- */
.footer {
  margin-top: var(--section);
  min-height: 80svh;
  background: var(--red); color: var(--on-red);
  display: grid; grid-template-rows: auto 1fr auto;
  padding: 40px var(--margin) 20px;
}
.f-cols { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px var(--gap); font-size: 16px; line-height: 1.5; }
.f-cols > div { grid-column: span 3; }
.f-cols b { display: block; }
.f-cols span, .f-cols a { color: rgba(255, 255, 255, .78); text-decoration: none; display: block; }
.f-cols a:hover { color: #fff; text-decoration: underline; }
.wordmark { align-self: end; }
.wordmark svg { width: 100%; height: auto; display: block; }
.legal { font-size: 13px; color: rgba(255, 255, 255, .78); margin-top: 20px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- Entrances (only when JS is running) ---------- */
@media (min-width: 641px) {
  .js .rise { opacity: 0; transform: translateY(24px); transition: opacity .5s var(--ease), transform .6s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
  .js .rise.in { opacity: 1; transform: none; }
}

/* ---------- Tablet ---------- */
@media (max-width: 1080px) {
  .rails { grid-template-columns: repeat(6, 1fr); }
  .stage { grid-column: 1 / 7; min-height: 480px; }
  .rail-left { grid-column: 1 / 4; grid-row: 2; grid-template-rows: 220px auto; }
  .rail-right { grid-column: 4 / 7; grid-row: 2; grid-template-rows: auto; }
  .about .lead, .about .lead + p { grid-column: 1 / 13; }
  .about dl { grid-column: 1 / 13; grid-row: auto; grid-template-columns: 1fr 1fr; }
  .preview { grid-column: 1 / 13; position: static; display: none; }
  .models { grid-column: 1 / 13; }
  .index-col:nth-child(1) { grid-column: 1 / 5; }
  .index-col:nth-child(2) { grid-column: 5 / 9; }
  .index-col:nth-child(3) { grid-column: 9 / 13; }
  .note { grid-column: 1 / 13; grid-row: auto; min-height: 3em; }
  .certs { grid-template-columns: repeat(3, 1fr); }
  .f-cols > div { grid-column: span 6; }
}

/* ---------- Phone ---------- */
@media (max-width: 640px) {
  :root { --gap: 6px; --s-text: 16px; }
  .hero { grid-template-rows: auto auto auto; min-height: auto; }
  .band { height: 110px; }
  .band h1 { font-size: 30vw; }
  .links { grid-template-columns: 1fr 1fr; }
  .links a { min-height: 56px; }
  .rails { grid-template-columns: 1fr 1fr; }
  .stage { grid-column: 1 / 3; min-height: 0; aspect-ratio: auto; display: flex; flex-direction: column; }
  .stage-gloves { position: relative; inset: auto; height: 62vw; padding: 20px 16px 0; }
  .statement { position: relative; min-height: 0; padding: 18px; }
  .statement p { font-size: 22px; }
  .rail-left { grid-column: 1 / 3; grid-row: auto; grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .rail-left .pic { aspect-ratio: 1; }
  .rail-right { grid-column: 1 / 3; grid-row: auto; grid-template-columns: 1fr 1fr; }
  .rail-right .t-action { grid-column: 1 / 3; min-height: 96px; }
  .intro h2 { font-size: 12vw; }
  .intro .wrap { display: block; }
  .captions { margin-top: 24px; }
  .t-action .big { font-size: 20px; }
  .captions { flex-direction: column; gap: 8px; font-size: 14px; }
  .captions p { max-width: none; }
  .panel { height: 92vw; margin-inline: 0; }
  .panel img { width: 30%; }
  .panel img:nth-child(n+4) { display: none; }
  .about { padding-top: 48px; }
  .about dl { grid-template-columns: 1fr; }
  .catalog h2 { font-size: 10vw; max-width: none; }
  .catalog h2 .indent { padding-left: 0; }
  .picker { margin-top: 36px; }
  .picker p { width: 100%; }
  .count { margin-left: 0; width: 100%; margin-top: 8px; }
  .model { grid-template-columns: 72px 1fr; gap: 4px 14px; }
  .model .thumb { width: 72px; height: 72px; grid-row: 1 / 4; }
  .model .ask { grid-column: 2; grid-row: auto; padding: 6px 0 0; }
  .model .desc { grid-column: 2; }
  .index { padding: 96px var(--margin); }
  .index h2 { font-size: 24px; }
  .index-grid { margin-top: 48px; gap: 40px; grid-template-columns: 1fr; }
  .index-col { grid-column: 1 / -1 !important; font-size: 18px; line-height: 1.4; }
  .index-col .sum { display: block; color: var(--ink-soft); margin-top: 12px; font-size: 16px; }
  .note { display: none; }
  .marquee { height: 22vh; min-height: 150px; }
  .track span { font-size: 15vw; }
  .proof .under { font-size: 16px; }
  .certs { grid-template-columns: 1fr 1fr; padding-top: 48px; }
  .certs figure:last-child { grid-column: 1 / 3; width: calc(50% - var(--gap) / 2); }
  .rows a, .rows p { font-size: 9.6vw; min-height: 84px; padding-bottom: 14px; }
  .rows .addr { font-size: 5.6vw; }
  .rows .greet { font-size: 9.6vw; }
  .dot { width: 56px; height: 56px; font-size: 1rem; }
  .f-cols > div { grid-column: span 6; }
  .footer { grid-template-rows: auto 12svh auto; min-height: auto; }
  .legal { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .track { animation: none; }
  .stage-gloves img { animation: none; }
  .js .rise { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

/* readable measure for running text */
.std, .proof .under, .about p:not(.lead) { max-width: 62ch; }
.about .lead { max-width: 46ch; }
@media (max-width: 640px) {
  .stage { order: 1; }
  .rail-right { order: 2; }
  .rail-left { order: 3; }
}
@media (max-width: 640px) {
  .index { padding: 72px var(--margin); }
  .index-col ul { display: none; }
  .index-col h3 { margin-bottom: 8px; }
  .index-col .sum { margin-top: 0; color: var(--ink); }
  .index-grid { gap: 28px; }
  .model { padding: 14px 0; }
  .model:nth-child(4n+1):not(:first-child) { margin-top: 8px; }
  .panel { height: 72vw; }
}
