/* =========================================================================
   САМУРАЙСКИЕ НИТИ — чёрно-красный плакат, Япония.
   Палитра согласована с аудитом контраста:
   — #c8102e (глубокий красный) только для крупного текста и заливок;
   — #ff2e4c для мелкого красного текста, ссылок и фокуса (5.4:1 на фоне);
   — #f2e9e4 основной текст (16.5:1).
   ========================================================================= */

:root {
  --bg: #0c0a0a;
  --panel: #141010;
  --panel-2: #1a1414;
  --line: #2a1f1f;
  --line-strong: #3a2a2a;
  --red: #c8102e;
  --red-bright: #e2153a;
  --red-text: #ff2e4c;
  --ink: #f2e9e4;
  --muted: #b7a9a3;
  --gold: #c9a227;
  --white: #ffffff;
  --font-display: 'Oswald', 'Arial Narrow', sans-serif;
  --font-body: 'Golos Text', -apple-system, 'Segoe UI', sans-serif;
  /* минчо-стек для иероглифов — кистевые засечки вместо гротеска */
  --font-kanji: 'Hiragino Mincho ProN', 'Yu Mincho', 'Noto Serif JP', 'MS PMincho', serif;
  --header-h: 64px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* бумажное зерно поверх фона — чтобы чёрный не был «пластиковым» */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.6'/%3E%3C/svg%3E");
}

img { max-width: 100%; display: block; }

a { color: var(--red-text); }

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

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

.skip-link {
  position: absolute;
  left: 12px; top: -60px;
  z-index: 100;
  background: var(--red);
  color: var(--white);
  padding: 10px 18px;
  font-family: var(--font-display);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .06em;
  text-decoration: none;
  transition: top .15s;
}
.skip-link:focus { top: 12px; }

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(12, 10, 10, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* логотип — чистый текст, без плашек и подписей */
.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: .12em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
}
.brand-red { color: var(--red-text); }

.site-nav ul {
  display: flex;
  gap: 4px;
  list-style: none;
}
.site-nav a {
  display: block;
  padding: 9px 14px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid transparent;
}
.site-nav a:hover { color: var(--red-text); }
.site-nav a[aria-current="page"] {
  color: var(--red-text);
  border-color: var(--red-bright);
}

/* ------------------------------------------------------------------ hero */

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  align-items: center;
  gap: 40px;
  padding-top: 64px;
  padding-bottom: 72px;
}

.hero-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--red-text);
  margin-bottom: 18px;
}
.hero-kicker::before {
  content: "";
  width: 42px; height: 2px;
  background: var(--red-bright);
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(48px, 7.2vw, 92px);
  line-height: .96;
  letter-spacing: .015em;
  text-transform: uppercase;
  margin-bottom: 22px;
}
.hero h1 .h1-red { color: var(--red-bright); display: block; }

.hero-lead {
  max-width: 46ch;
  color: var(--muted);
  font-size: 17px;
  margin-bottom: 30px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* правая часть: красное солнце + шлем эпохи Эдо */
.hero-art {
  position: relative;
  justify-self: center;
  width: min(430px, 100%);
}
.hero-sun {
  position: relative;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--red);
  overflow: hidden;
}
.hero-sun img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.08) brightness(1.02);
  mix-blend-mode: multiply;
}
.hero-caption {
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .04em;
  text-align: right;
}
/* вертикальная колонка иероглифов у солнца */
.hero-vertical {
  position: absolute;
  top: -4px;
  right: -64px;
  writing-mode: vertical-rl;
  font-size: 38px;
  letter-spacing: .4em;
  color: var(--red);
  font-family: var(--font-kanji);
  user-select: none;
}

/* красная нить: тонкая линия, сшивающая хиро с каталогом */
.thread-divider {
  display: block;
  width: 100%;
  height: 70px;
  color: var(--red-bright);
}

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-red {
  background: var(--red);
  color: var(--white);
}
.btn-red:hover { background: var(--red-bright); }
/* заглушка до партнёрских ссылок: выглядит как макет, но не «живая» */
.btn.is-disabled { cursor: default; }
.btn-red.is-disabled:hover { background: var(--red); }
.btn-ghost {
  border-color: var(--red-bright);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--red-text); color: var(--red-text); }

/* ----------------------------------------------------------- trust strip */

.trust {
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.trust ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.trust li {
  padding: 18px 16px;
  font-size: 13.5px;
  color: var(--muted);
  border-left: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
}
.trust li:first-child { border-left: 0; }
.trust b {
  color: var(--ink);
  font-weight: 500;
}
.trust .tick {
  color: var(--red-text);
  font-family: var(--font-display);
  flex: none;
}

/* -------------------------------------------------------------- sections */

.section { padding: 72px 0 26px; }

.section-head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 10px;
}
/* иероглиф раздела — просто крупный знак, без плашек */
.section-kanji {
  font-size: 38px;
  line-height: 1;
  color: var(--red);
  font-family: var(--font-kanji);
  flex: none;
}
.section h2, .page-hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(30px, 4vw, 44px);
  letter-spacing: .02em;
  text-transform: uppercase;
  line-height: 1.05;
}
.section-desc {
  color: var(--muted);
  max-width: 62ch;
  margin-bottom: 34px;
}

/* ----------------------------------------------------------------- cards */

.cards {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding-bottom: 46px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 20px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  transition: border-color .18s, transform .18s;
}
.card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}
/* красная нить прошивает верх карточки при ховере */
.card::before {
  content: "";
  position: absolute;
  top: -1px; left: 0;
  width: 0; height: 2px;
  background: var(--red-bright);
  transition: width .25s;
}
.card:hover::before { width: 100%; }

.card-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.card-logo {
  width: 52px; height: 52px;
  background: var(--white);
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex: none;
  overflow: hidden;
}
.card-logo img {
  max-width: 46px;
  max-height: 46px;
  object-fit: contain;
}
.card-logo .mono {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--red);
  font-size: 18px;
}
.card-brand {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: .04em;
}
.card h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 19px;
  letter-spacing: .02em;
  line-height: 1.2;
  text-transform: none;
}

.card-chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}
/* фичи — просто текст, без рамок-пилюль: меньше «блоков» на карточке */
.card-chips {
  gap: 5px 16px;
}
.card-chips li {
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
}

/* кнопки в карточках спокойные: контур, заливка только на ховере —
   иначе 12 красных плашек подряд бьют по глазам */
.card .btn {
  width: 100%;
  padding: 11px 16px;
  font-size: 14px;
  background: transparent;
  border-color: var(--red-bright);
  color: var(--red-text);
}
.card .btn:hover {
  background: var(--red);
  color: var(--white);
}

/* --------------------------------------------------------- category tiles */

.cat-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding-bottom: 46px;
}
.cat-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 300px;
  padding: 26px;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--red);
}
.cat-tile img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.1);
  mix-blend-mode: multiply;
  transition: transform .4s;
}
.cat-tile:hover img { transform: scale(1.04); }
/* фото шлема темнее гравюр — вытягиваем яркость, чтобы плитка читалась */
.cat-tile img[src*="kabuto"] { filter: grayscale(1) contrast(1.02) brightness(1.8); }
.cat-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12,10,10,0) 30%, rgba(12,10,10,.88) 82%);
}
.cat-tile > * { position: relative; z-index: 2; }
.cat-tile .tile-kanji {
  position: absolute;
  top: 10px; right: 20px;
  font-size: 96px;
  color: rgba(255,255,255,.55);
  font-family: var(--font-kanji);
  z-index: 2;
}
.cat-tile strong {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  letter-spacing: .03em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 6px;
}
.cat-tile span.tile-more {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--red-text);
}
.cat-tile p {
  color: var(--muted);
  font-size: 14px;
  max-width: 48ch;
  margin-bottom: 10px;
}

/* ------------------------------------------------------------ red thread */

.about {
  border-top: 1px solid var(--line);
  background-color: var(--panel);
  /* сэйгайха — японские волны, едва заметные */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='28' viewBox='0 0 56 28'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.045' stroke-width='1'%3E%3Ccircle cx='14' cy='28' r='26'/%3E%3Ccircle cx='14' cy='28' r='18'/%3E%3Ccircle cx='14' cy='28' r='10'/%3E%3Ccircle cx='42' cy='28' r='26'/%3E%3Ccircle cx='42' cy='28' r='18'/%3E%3Ccircle cx='42' cy='28' r='10'/%3E%3Ccircle cx='0' cy='14' r='26'/%3E%3Ccircle cx='0' cy='14' r='18'/%3E%3Ccircle cx='0' cy='14' r='10'/%3E%3Ccircle cx='28' cy='14' r='26'/%3E%3Ccircle cx='28' cy='14' r='18'/%3E%3Ccircle cx='28' cy='14' r='10'/%3E%3Ccircle cx='56' cy='14' r='26'/%3E%3Ccircle cx='56' cy='14' r='18'/%3E%3Ccircle cx='56' cy='14' r='10'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 56px 28px;
}
.about .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 48px;
  padding-top: 72px;
  padding-bottom: 72px;
}
.about-art {
  position: relative;
  background: var(--red);
  overflow: hidden;
  min-height: 320px;
}
.about-art img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  mix-blend-mode: multiply;
}
.about-art figcaption {
  position: absolute;
  left: 12px; bottom: 10px;
  z-index: 2;
  font-size: 11px;
  letter-spacing: .05em;
  color: rgba(255,255,255,.9);
  background: rgba(12,10,10,.6);
  padding: 3px 8px;
}

.about h2 { margin-bottom: 14px; }
.about-lead {
  color: var(--muted);
  margin-bottom: 30px;
  max-width: 56ch;
}
.about-lead em {
  font-style: normal;
  color: var(--ink);
}

.steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 0;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding: 18px 0 18px 66px;
  border-top: 1px solid var(--line);
}
/* номера шагов — печати с японскими числами 一 二 三 */
.steps li::before {
  content: "0" counter(step);
  position: absolute;
  left: 0; top: 16px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  color: var(--red-bright);
}
.steps b {
  display: block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 17px;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 3px;
}
.steps p { color: var(--muted); font-size: 14.5px; }

/* -------------------------------------------------------------- page hero */

.page-hero {
  position: relative;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.page-hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
  align-items: center;
  gap: 40px;
  padding-top: 48px;
  padding-bottom: 48px;
  position: relative;
}
.page-hero .hero-kicker { margin-bottom: 12px; }
.page-hero h1 { font-size: clamp(38px, 5.5vw, 64px); margin-bottom: 14px; }
.page-hero .section-desc { margin-bottom: 0; }
.page-hero .hero-art { width: min(300px, 100%); }
.page-hero .seal-hero {
  width: 52px; height: 52px;
  font-size: 28px;
}
.page-hero .page-kanji {
  position: absolute;
  top: 2px;
  right: -58px;
  writing-mode: vertical-rl;
  font-size: 34px;
  color: var(--red);
  letter-spacing: .4em;
  font-family: var(--font-kanji);
  user-select: none;
}

/* ---------------------------------------------------------------- footer */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--panel);
  padding: 40px 0 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 32px;
  margin-bottom: 26px;
}
.footer-note {
  font-size: 13px;
  color: var(--muted);
  max-width: 68ch;
}
.footer-nav ul { list-style: none; display: grid; gap: 8px; justify-content: end; }
.footer-nav a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 14px;
}
.footer-nav a:hover { color: var(--red-text); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--muted);
}

/* --------------------------------------------------------------- reveal */

@media (prefers-reduced-motion: no-preference) {
  html.js .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .5s ease, transform .5s ease;
  }
  html.js .reveal.is-visible,
  html.js .reveal:focus-within {
    opacity: 1;
    transform: none;
  }
  /* фокус внутри секции мгновенно её показывает — без окна невидимого фокуса */
  html.js .reveal:focus-within { transition: none; }
}

/* -------------------------------------------------------------- adaptive */

@media (max-width: 980px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .trust ul { grid-template-columns: 1fr 1fr; }
  .trust li:nth-child(3) { border-left: 0; }
  .trust li { border-top: 1px solid var(--line); }
  .trust li:nth-child(-n+2) { border-top: 0; }
  .hero-vertical, .page-kanji { display: none; }
}

@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 44px; padding-bottom: 52px; }
  .hero-art { order: -1; width: min(300px, 70vw); }
  .page-hero .wrap { grid-template-columns: 1fr; }
  .page-hero .hero-art { order: -1; width: min(220px, 60vw); }
  .hero-caption { text-align: left; }
  .about .wrap { grid-template-columns: 1fr; }
  .about-art { min-height: 240px; }
  .cat-tiles { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-nav ul { justify-content: start; }
}

@media (max-width: 640px) {
  .cards { grid-template-columns: 1fr; }
  .trust ul { grid-template-columns: 1fr 1fr; }
  .site-header .wrap { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; }
  :root { --header-h: 96px; }
  .site-nav a { padding: 7px 10px; font-size: 13px; }
  .brand-name { font-size: 15px; }
  .section { padding-top: 52px; }
}
