:root {
  --bg-warm: #F3F1EC;
  --ink: #121212;
  --ink-soft: #3A3A38;
  --ink-mute: #8A8780;
  --snow: #FAFAF8;
  --cta: #1A1A1A;
  --cta-hover: #2E2E2C;
  --cta-active: #0E0E0E;
  --line: #E4E1DA;
  --resin-violet: #5B3A9E;
  --resin-green: #2F8F6B;
  --shadow: rgba(40, 36, 30, 0.18);
  --shadow-strong: rgba(40, 36, 30, 0.28);
  --radius-card: 22px;
  --header-h: 72px;
  --content: min(1240px, calc(100% - 48px));
  --ff: "LXGW Marker Gothic", system-ui, sans-serif;
  --hdr-bg: 250, 250, 248;
  --hdr-glass: rgba(var(--hdr-bg), 0.72);
  --hdr-glass-float: rgba(var(--hdr-bg), 0.42);
  --hdr-ink: #121212;
  --hdr-shadow: rgba(40, 36, 30, 0.14);
  --hdr-panel: #fafaf8;
  --hdr-scrim: rgba(18, 18, 18, 0.32);
  --hdr-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --hdr-z: 60;
  --bg-ink: #1c1b19;
  --bg-warm-deep: #e8e4dc;
}

*,
*::before,
*::after {
  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; }

  .site-header,
  .site-header::before,
  .nav {
    transition: none !important;
  }
}

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg-warm);
  color: var(--ink);
  font-family: var(--ff);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection {
  background: rgba(91, 58, 158, 0.22);
  color: var(--ink);
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

/* —— Header (плавающий остров, методичка) —— */
.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: var(--hdr-z);
  height: auto;
  min-height: var(--header-h);
  padding-top: max(10px, env(safe-area-inset-top));
  padding-bottom: 10px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  transition:
    top 0.5s var(--hdr-ease),
    left 0.5s var(--hdr-ease),
    right 0.5s var(--hdr-ease),
    padding 0.5s var(--hdr-ease),
    border-radius 0.5s var(--hdr-ease),
    box-shadow 0.5s var(--hdr-ease);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--hdr-glass);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  transition: background 0.5s var(--hdr-ease);
  pointer-events: none;
}

.site-header.is-float,
.site-header.is-scrolled {
  top: max(12px, env(safe-area-inset-top));
  left: 18px;
  right: 18px;
  padding-top: 8px;
  padding-bottom: 8px;
  min-height: 56px;
  border-radius: 36px;
  box-shadow:
    0 16px 48px var(--hdr-shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.site-header.is-float::before,
.site-header.is-scrolled::before {
  background: var(--hdr-glass-float);
}

.site-header-slot {
  height: var(--header-h);
  pointer-events: none;
}

.site-header__inner {
  position: relative;
  width: var(--content);
  margin: 0 auto;
  min-height: 52px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
}

.logo {
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1;
}

.nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(18px, 2.4vw, 36px);
}

.nav a {
  font-size: 0.92rem;
  font-weight: 500;
  color: rgba(18, 18, 18, 0.72);
  transition: color 0.2s ease, letter-spacing 0.2s ease;
}

.nav a:hover,
.nav a:focus-visible {
  color: color-mix(in srgb, var(--resin-violet) 55%, var(--ink));
  letter-spacing: 0.01em;
  outline: none;
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--snow);
  display: grid;
  place-items: center;
  transition: transform 0.35s var(--hdr-ease), background 0.25s ease;
}

.cart:hover {
  transform: scale(1.08) rotate(-6deg);
  background: #1f1f1f;
}

.cart svg {
  transition: transform 0.35s var(--hdr-ease);
}

.cart:hover svg {
  transform: translateY(-1px);
}

.cart:focus-visible {
  outline: 2px solid var(--resin-violet);
  outline-offset: 3px;
}

.burger {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  padding: 0;
  cursor: pointer;
  position: relative;
}

.burger span {
  position: absolute;
  left: 11px;
  right: 11px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.2s ease, top 0.2s ease, opacity 0.2s ease;
}

.burger span:first-child { top: 16px; }
.burger span:last-child { top: 24px; }

.burger[aria-expanded="true"] span:first-child {
  top: 20px;
  transform: rotate(45deg);
}

.burger[aria-expanded="true"] span:last-child {
  top: 20px;
  transform: rotate(-45deg);
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  background: var(--hdr-scrim);
  z-index: 65;
}

.nav-backdrop[hidden] {
  display: none;
}

/* —— Hero —— */
.hero {
  position: relative;
  width: 100%;
  min-height: calc(94vh - var(--header-h));
  padding: 8px 0 48px;
  isolation: isolate;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background: var(--bg-warm);
  z-index: 0;
}

.hero__brand,
.hero__product,
.hero__copy,
.hero__routes {
  position: relative;
  z-index: 1;
  width: var(--content);
  margin-left: auto;
  margin-right: auto;
}

.hero__brand {
  z-index: 4;
  padding-top: 4px;
  margin-bottom: 8px;
}

.hero__title {
  margin: 0;
  position: relative;
  display: inline-block;
  max-width: 100%;
  font-size: clamp(3.2rem, 9.2vw, 7.6rem);
  font-weight: 400;
  font-synthesis: none;
  line-height: 0.92;
  letter-spacing: -0.045em;
  color: var(--ink);
  text-transform: lowercase;
}

.hero__title::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.02em;
  height: clamp(3px, 0.055em, 7px);
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--resin-violet) 55%, transparent) 0%,
    color-mix(in srgb, var(--resin-violet) 22%, transparent) 72%,
    transparent 100%
  );
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  .hero__title::after {
    animation: hero-title-underline 1.15s cubic-bezier(0.22, 1, 0.36, 1) 0.45s forwards;
  }

  /* если модуль appear уже показал бренд - линия всё равно доигрывает */
  .hero__brand.ap-in .hero__title::after,
  .hero.is-in .hero__title::after {
    animation-delay: 0.2s;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__title::after {
    transform: scaleX(1);
  }
}

@keyframes hero-title-underline {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

.hero__tag {
  margin: 0.25em 0 0;
  padding-left: 58%;
  width: 100%;
  box-sizing: border-box;
  font-size: clamp(0.85rem, 1.1vw, 1.05rem);
  font-weight: 400;
  color: color-mix(in srgb, var(--resin-violet) 42%, var(--ink-soft));
  letter-spacing: 0.02em;
}

.hero__product {
  z-index: 3;
  margin-top: 12px;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.hero__product img {
  width: min(640px, 50vw);
  max-width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 22px 36px var(--shadow));
  user-select: none;
}

.hero__copy {
  z-index: 4;
  max-width: 300px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.hero__lead {
  margin: 0;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.hero__fact {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.4;
  color: var(--ink-mute);
  max-width: 260px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 28px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  border: 0;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.3s var(--hdr-ease), box-shadow 0.3s ease;
}

.btn--primary {
  background: var(--cta);
  color: var(--snow);
  box-shadow: 0 8px 20px var(--shadow);
}

.btn--primary:hover {
  background: var(--cta-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 26px var(--shadow-strong);
}

.btn--primary:active {
  background: var(--cta-active);
}

.btn--primary:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--resin-violet) 65%, transparent);
  outline-offset: 3px;
}

.btn--primary:disabled,
.btn--primary[aria-disabled="true"] {
  opacity: 0.4;
  box-shadow: none;
  pointer-events: none;
}

.hero__routes {
  z-index: 5;
  position: absolute;
  right: max(24px, calc((100% - min(1240px, calc(100% - 48px))) / 2));
  top: 34%;
  width: 210px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.route-card {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: 0 14px 28px var(--shadow);
  transition: transform 0.35s var(--hdr-ease), box-shadow 0.35s var(--hdr-ease);
}

.route-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--hdr-ease);
}

.route-card--ready img {
  object-position: 50% 45%;
  transform: scale(1.12);
  transform-origin: 50% 40%;
}

.route-card--custom img {
  object-position: 40% 55%;
}

.route-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 32px var(--shadow-strong);
}

.route-card:hover img {
  transform: scale(1.08);
}

.route-card--ready:hover img {
  transform: scale(1.18);
}

.route-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 48%;
  background: linear-gradient(to top, rgba(18, 18, 18, 0.82) 0%, rgba(18, 18, 18, 0.35) 55%, rgba(18, 18, 18, 0) 100%);
  pointer-events: none;
}

.route-card__label {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 1;
  color: var(--snow);
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.2;
}

.route-card:focus-visible {
  outline: 2px solid var(--resin-violet);
  outline-offset: 3px;
}

.anchor-stub {
  height: 1px;
  scroll-margin-top: calc(var(--header-h) + 12px);
}

/* Desktop: copy слева у «пола» стола, не поверх столешницы */
@media (min-width: 1025px) {
  .hero__copy {
    position: absolute;
    left: max(24px, calc((100% - min(1240px, calc(100% - 48px))) / 2));
    bottom: max(56px, 9vh);
    margin: 0;
    width: 300px;
  }

  .hero__product {
    margin-left: 4%;
    padding-bottom: 4vh;
  }
}

/* —— Tablet —— */
@media (max-width: 1024px) {
  :root {
    --content: min(920px, calc(100% - 40px));
    --header-h: 64px;
  }

  .hero {
    min-height: auto;
    padding-bottom: 40px;
  }

  .hero__tag {
    padding-left: 0;
  }

  .hero__product {
    margin-top: 8px;
  }

  .hero__product img {
    width: min(560px, 78vw);
  }

  .hero__copy {
    position: relative;
    left: auto;
    bottom: auto;
    margin-top: 20px;
    max-width: 420px;
    width: auto;
  }

  .hero__routes {
    position: relative;
    right: auto;
    top: auto;
    width: var(--content);
    margin: 28px auto 0;
    flex-direction: row;
    gap: 14px;
  }

  .route-card {
    flex: 1;
    aspect-ratio: 4 / 3;
  }

  .route-card--ready img {
    transform: scale(1.12);
  }
}

/* —— Tablet nav / бургер —— */
@media (max-width: 900px) {
  .site-header__inner {
    display: flex;
    align-items: center;
    gap: 10px;
    width: var(--content);
  }

  .site-header__actions {
    margin-left: auto;
  }

  .nav {
    position: fixed;
    top: 0;
    right: 0;
    width: min(280px, 82vw);
    height: 100vh;
    height: 100dvh;
    background: var(--hdr-panel);
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 0;
    padding: max(72px, calc(env(safe-area-inset-top) + 56px)) 28px 32px;
    transform: translateX(105%);
    transition: transform 0.28s var(--hdr-ease);
    z-index: 70;
    box-shadow: -12px 0 40px var(--shadow);
  }

  body.nav-open .nav {
    transform: translateX(0);
  }

  .nav a {
    width: 100%;
    padding: 14px 0;
    font-size: 1.05rem;
    color: var(--ink);
    border-bottom: 1px solid var(--line);
  }

  .burger {
    display: inline-grid;
    place-items: center;
    z-index: 80;
  }

  .site-header.is-float,
  .site-header.is-scrolled {
    left: 12px;
    right: 12px;
    border-radius: 28px;
  }
}

/* —— Mobile 390 —— */
@media (max-width: 720px) {
  :root {
    --content: calc(100% - 32px);
    --header-h: 60px;
  }

  .site-header.is-float,
  .site-header.is-scrolled {
    top: max(8px, env(safe-area-inset-top));
    left: 10px;
    right: 10px;
    border-radius: 24px;
  }

  .hero {
    min-height: auto;
    padding: 4px 0 36px;
  }

  .hero__title {
    font-size: clamp(2.6rem, 14vw, 3.4rem);
    letter-spacing: -0.04em;
  }

  .hero__tag {
    font-size: 0.88rem;
    margin-top: 0.5em;
    padding-left: 0;
  }

  .route-card--ready img {
    transform: scale(1.14);
  }

  .hero__product {
    margin-top: 12px;
  }

  .hero__product img {
    width: 100%;
    max-height: 52vh;
    object-fit: contain;
    object-position: center top;
  }

  .hero__copy {
    margin-top: 18px;
    max-width: none;
    gap: 14px;
  }

  .hero__lead {
    font-size: 0.98rem;
  }

  .btn--primary {
    width: 100%;
    max-width: 280px;
  }

  .hero__routes {
    width: var(--content);
    gap: 10px;
  }

  .route-card {
    aspect-ratio: 1;
    border-radius: 18px;
  }

  .route-card__label {
    font-size: 0.78rem;
    left: 10px;
    right: 10px;
    bottom: 10px;
  }
}

@media (min-width: 1280px) {
  .hero__product {
    margin-left: 3%;
  }

  .hero__product img {
    width: min(660px, 48vw);
  }
}

/* —— Appear (этап 7): тихий каскад, без библиотек —— */
/* скрытие только если JS успел повесить .js-appear - иначе контент виден */
@media (prefers-reduced-motion: no-preference) {
  html.js-appear .hero:not(.is-in) .hero__title,
  html.js-appear .hero:not(.is-in) .hero__tag,
  html.js-appear .hero:not(.is-in) .hero__product,
  html.js-appear .hero:not(.is-in) .hero__lead,
  html.js-appear .hero:not(.is-in) .hero__copy .btn,
  html.js-appear .hero:not(.is-in) .hero__fact,
  html.js-appear .hero:not(.is-in) .route-card {
    opacity: 0;
  }

  html.js-appear .hero:not(.is-in) .hero__title,
  html.js-appear .hero:not(.is-in) .hero__tag {
    transform: translate3d(0, 14px, 0);
  }

  html.js-appear .hero:not(.is-in) .hero__product {
    transform: translate3d(0, 22px, 0);
  }

  html.js-appear .hero:not(.is-in) .hero__product img {
    filter: drop-shadow(0 6px 10px rgba(40, 36, 30, 0));
  }

  html.js-appear .hero:not(.is-in) .hero__lead,
  html.js-appear .hero:not(.is-in) .hero__copy .btn,
  html.js-appear .hero:not(.is-in) .hero__fact {
    transform: translate3d(0, 12px, 0);
  }

  html.js-appear .hero:not(.is-in) .route-card {
    transform: translate3d(10px, 14px, 0);
  }

  html.js-appear .hero.is-in .hero__title,
  html.js-appear .hero.is-in .hero__tag,
  html.js-appear .hero.is-in .hero__product,
  html.js-appear .hero.is-in .hero__lead,
  html.js-appear .hero.is-in .hero__copy .btn,
  html.js-appear .hero.is-in .hero__fact,
  html.js-appear .hero.is-in .route-card {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }

  html.js-appear .hero.is-in .route-card:hover {
    transform: translate3d(0, -3px, 0);
  }

  html.js-appear .hero.is-in .hero__title {
    transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
      transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  }

  html.js-appear .hero.is-in .hero__tag {
    transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.08s,
      transform 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.08s;
  }

  html.js-appear .hero.is-in .hero__product {
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.18s,
      transform 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.18s;
  }

  html.js-appear .hero.is-in .hero__product img {
    transition: filter 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.22s;
    filter: drop-shadow(0 22px 36px var(--shadow));
  }

  html.js-appear .hero.is-in .hero__lead {
    transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.42s,
      transform 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.42s;
  }

  html.js-appear .hero.is-in .hero__copy .btn {
    transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.5s,
      transform 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.5s,
      background 0.2s ease;
  }

  html.js-appear .hero.is-in .hero__fact {
    transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.58s,
      transform 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.58s;
  }

  html.js-appear .hero.is-in .route-card:nth-child(1) {
    transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.62s,
      transform 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.62s,
      box-shadow 0.22s ease;
  }

  html.js-appear .hero.is-in .route-card:nth-child(2) {
    transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.74s,
      transform 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.74s,
      box-shadow 0.22s ease;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero .hero__title,
  .hero .hero__tag,
  .hero .hero__product,
  .hero .hero__lead,
  .hero .hero__copy .btn,
  .hero .hero__fact,
  .hero .route-card {
    opacity: 1 !important;
    transform: none !important;
  }
}

@media (max-width: 1024px) and (prefers-reduced-motion: no-preference) {
  html.js-appear .hero:not(.is-in) .route-card {
    transform: translate3d(0, 14px, 0);
  }
}

/* —— Shared —— */
.about,
.collection,
.resin,
.order {
  scroll-margin-top: calc(var(--header-h) + 12px);
}

.wrap {
  width: var(--content);
  margin-left: auto;
  margin-right: auto;
}

.text-link {
  display: inline-block;
  margin-top: 8px;
  font-weight: 500;
  color: var(--ink);
  border-bottom: 1px solid color-mix(in srgb, var(--resin-violet) 40%, rgba(18, 18, 18, 0.22));
  transition: border-color 0.2s ease, color 0.2s ease;
}

button.text-link {
  background: none;
  border-top: 0;
  border-left: 0;
  border-right: 0;
  border-radius: 0;
  padding: 0;
  cursor: pointer;
}

.text-link:hover {
  color: var(--resin-violet);
  border-bottom-color: var(--resin-violet);
}

.btn--on-ink {
  background: var(--snow);
  color: var(--ink);
  box-shadow: none;
}

.btn--on-ink:hover {
  background: #fff;
}

.btn--sm {
  min-height: 40px;
  padding: 0 18px;
  font-size: 0.88rem;
}

.price {
  margin: 0;
  font-weight: 400;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: color-mix(in srgb, var(--resin-violet) 28%, var(--ink));
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eceae4;
  color: var(--ink-mute);
  font-size: 0.72rem;
  font-weight: 500;
  white-space: nowrap;
}

.pill--violet {
  background: color-mix(in srgb, var(--resin-violet) 16%, var(--snow));
  color: color-mix(in srgb, var(--resin-violet) 72%, var(--ink));
}

.pill--green {
  background: color-mix(in srgb, var(--resin-green) 16%, var(--snow));
  color: color-mix(in srgb, var(--resin-green) 70%, var(--ink));
}

/* —— About —— */
.about {
  padding: 72px 0 96px;
  background: var(--bg-warm);
}

.about__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 36px;
}

.about__title {
  margin: 0;
  max-width: 16ch;
  font-size: clamp(1.6rem, 2.6vw, 2.35rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.about__aside {
  margin: 0;
  color: color-mix(in srgb, var(--resin-green) 45%, var(--ink-mute));
  font-size: 0.92rem;
  flex-shrink: 0;
}

.about__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 22px;
  align-items: start;
}

.about__photo {
  margin: 0;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 18px 40px var(--shadow);
  background: var(--bg-warm-deep);
}

.about__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s var(--hdr-ease);
}

.about__photo:hover img {
  transform: scale(1.04);
}

.about__photo--tall {
  min-height: 560px;
}

.about__photo--tall img {
  min-height: 560px;
}

.about__photo--wide {
  aspect-ratio: 16 / 10;
}

.about__side {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.about__text {
  padding-right: 8px;
}

.about__text p {
  margin: 0 0 14px;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.55;
}

/* —— Collection —— */
.collection {
  padding: 72px 0 88px;
  background: var(--bg-ink);
  color: var(--snow);
}

.collection__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 36px;
}

.collection__title {
  margin: 0;
  font-size: clamp(1.7rem, 2.8vw, 2.4rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--snow);
  position: relative;
  padding-bottom: 10px;
}

.collection__title::after {
  content: "";
  display: block;
  width: 48px;
  height: 2px;
  margin-top: 10px;
  border-radius: 2px;
  background: linear-gradient(
    90deg,
    var(--resin-violet) 0%,
    var(--resin-green) 100%
  );
}

.collection__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--snow);
  color: var(--ink);
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
  transition: transform 0.35s var(--hdr-ease), box-shadow 0.35s var(--hdr-ease);
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.36);
}

.product-card__top {
  padding: 20px 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
}

.product-card__row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.product-card__name {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.product-card__meta {
  margin: 0;
  font-size: 0.78rem;
  color: var(--ink-mute);
}

.product-card__desc {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.45;
}

.product-card__buy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 6px;
}

.product-card__media {
  margin: 0 14px 14px;
  border-radius: 18px;
  overflow: hidden;
  background: var(--bg-warm-deep);
  position: relative;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
}

.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform 0.55s var(--hdr-ease);
  transform-origin: center;
}

.product-card:hover .product-card__media img {
  transform: scale(1.045);
}

.product-card__tags {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  pointer-events: none;
}

.product-card__tags span {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(243, 241, 236, 0.92);
  color: var(--ink-mute);
  font-size: 0.68rem;
}

.product-card:nth-child(odd) .product-card__tags span:first-child {
  background: color-mix(in srgb, var(--resin-violet) 18%, rgba(243, 241, 236, 0.92));
  color: color-mix(in srgb, var(--resin-violet) 55%, var(--ink-soft));
}

.product-card:nth-child(even) .product-card__tags span:first-child {
  background: color-mix(in srgb, var(--resin-green) 18%, rgba(243, 241, 236, 0.92));
  color: color-mix(in srgb, var(--resin-green) 55%, var(--ink-soft));
}

/* —— Resin river —— */
.resin {
  padding: 80px 0;
  background: var(--bg-warm);
}

.resin__inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
}

.resin__title {
  margin: 0 0 16px;
  font-size: clamp(1.55rem, 2.5vw, 2.2rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  max-width: 16ch;
}

.resin__lead {
  margin: 0 0 28px;
  color: var(--ink-soft);
  font-size: 1.02rem;
  line-height: 1.55;
  max-width: 38ch;
}

.resin__flow {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  padding-left: 18px;
}

.resin__flow::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(
    180deg,
    var(--resin-violet) 0%,
    var(--resin-green) 100%
  );
}

.resin__flow p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.5;
}

.resin__flow strong {
  color: var(--ink);
  font-weight: 600;
}

.resin__flow p:nth-child(1) strong {
  color: color-mix(in srgb, var(--resin-violet) 55%, var(--ink));
}

.resin__flow p:nth-child(2) strong {
  color: color-mix(in srgb, var(--resin-green) 50%, var(--ink));
}

.resin__note {
  margin: 24px 0 0;
  font-size: 0.88rem;
  color: var(--ink-mute);
  max-width: 42ch;
  padding-left: 12px;
  border-left: 2px solid color-mix(in srgb, var(--resin-green) 40%, var(--line));
}

.resin__photo {
  margin: 0;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 18px 40px var(--shadow);
  aspect-ratio: 1;
}

.resin__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--hdr-ease);
}

.resin__photo:hover img {
  transform: scale(1.05);
}

/* —— Order —— */
.order {
  padding: 72px 0 88px;
  background: var(--bg-ink);
  color: var(--snow);
}

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

.order__title {
  margin: 0 0 12px;
  font-size: clamp(1.55rem, 2.4vw, 2.1rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--snow);
  position: relative;
  padding-bottom: 8px;
}

.order__title::after {
  content: "";
  display: block;
  width: 40px;
  height: 2px;
  margin-top: 10px;
  border-radius: 2px;
  background: linear-gradient(
    90deg,
    var(--resin-green) 0%,
    var(--resin-violet) 100%
  );
}

.order__lead {
  margin: 0;
  color: rgba(250, 250, 248, 0.72);
  line-height: 1.5;
  max-width: 34ch;
}

.order-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
  padding: 24px;
  background: var(--snow);
  border-radius: 26px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  color: var(--ink);
}

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

.field--full {
  grid-column: 1 / -1;
}

.field__label {
  font-size: 0.82rem;
  color: var(--ink-mute);
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: var(--bg-warm);
  color: var(--ink);
  font: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus,
.field textarea:focus {
  border-color: color-mix(in srgb, var(--resin-violet) 45%, var(--line));
  box-shadow: 0 0 0 3px rgba(91, 58, 158, 0.12);
}

.field input.is-error,
.field textarea.is-error {
  border-color: #a33;
}

.agree {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.4;
}

.agree input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--ink);
}

.order-form__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
}

.order-form__fact {
  margin: 0;
  font-size: 0.84rem;
  color: var(--ink-mute);
  max-width: 28ch;
}

.order-form__status {
  grid-column: 1 / -1;
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 0.92rem;
}

.order-form__status.is-success {
  background: color-mix(in srgb, var(--resin-green) 16%, var(--bg-warm));
  color: var(--ink);
}

.order-form__status.is-error {
  background: #f3e4e4;
  color: #5c1f1f;
}

.order-form.is-loading #order-submit {
  opacity: 0.65;
  pointer-events: none;
}

.order-panel {
  position: relative;
}

.order-form.is-sent {
  display: none;
}

.order-done {
  padding: 28px 24px;
  background: var(--snow);
  border-radius: 26px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
  color: var(--ink);
}

.order-done[hidden] {
  display: none;
}

.order-done__badge {
  display: inline-flex;
  margin: 0 0 12px;
  padding: 4px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--resin-green) 22%, var(--bg-warm));
  color: color-mix(in srgb, var(--resin-green) 65%, var(--ink));
  font-size: 0.78rem;
}

.order-done__title {
  margin: 0 0 10px;
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.order-done__text {
  margin: 0 0 18px;
  color: var(--ink-soft);
  line-height: 1.5;
}

.order-done__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
  box-shadow: none;
}

.btn--ghost:hover {
  background: var(--bg-warm);
}

/* —— Pay / ship stubs —— */
.pay-ship {
  padding: 72px 0 40px;
  background: var(--bg-warm);
  scroll-margin-top: calc(var(--header-h) + 12px);
}

.pay-ship__head {
  max-width: 52ch;
  margin-bottom: 28px;
}

.pay-ship__title {
  margin: 0 0 12px;
  font-size: clamp(1.55rem, 2.4vw, 2.1rem);
  font-weight: 400;
  letter-spacing: -0.02em;
}

.pay-ship__lead {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.5;
}

.pay-ship__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.pay-ship__col {
  padding: 22px;
  background: var(--snow);
  border-radius: 26px;
  box-shadow: 0 14px 32px var(--shadow);
}

.pay-ship__col-title {
  margin: 0 0 16px;
  font-size: 1.1rem;
  font-weight: 400;
}

.pay-ship__icons {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pay-ship__icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 72px;
  font-size: 0.72rem;
  color: var(--ink-mute);
  text-align: center;
}

.pay-ship__mark {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--bg-warm);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--ink);
  font-size: 0.7rem;
  font-weight: 400;
  transition: transform 0.35s var(--hdr-ease), border-color 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.pay-ship__col:first-child .pay-ship__icon:nth-child(odd) .pay-ship__mark {
  border-color: color-mix(in srgb, var(--resin-violet) 35%, var(--line));
  color: color-mix(in srgb, var(--resin-violet) 50%, var(--ink));
}

.pay-ship__col:last-child .pay-ship__icon:nth-child(odd) .pay-ship__mark {
  border-color: color-mix(in srgb, var(--resin-green) 35%, var(--line));
  color: color-mix(in srgb, var(--resin-green) 50%, var(--ink));
}

.pay-ship__icon:hover .pay-ship__mark {
  transform: translateY(-3px) scale(1.06);
  background: var(--snow);
}

/* —— Subpages —— */
.subpage {
  padding: 40px 0 80px;
  background: var(--bg-warm);
  min-height: 70vh;
}

.subpage__card {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 28px;
  background: var(--snow);
  border-radius: 26px;
  box-shadow: 0 16px 36px var(--shadow);
}

.subpage__card h1 {
  margin: 0 0 12px;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 400;
  letter-spacing: -0.02em;
}

.subpage__card p {
  margin: 0 0 14px;
  color: var(--ink-soft);
  line-height: 1.55;
}

.subpage__stub {
  margin: 18px 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--bg-warm);
  color: var(--ink-mute);
  font-size: 0.9rem;
}

.legal-doc {
  max-width: 760px;
}

.legal-doc__meta {
  margin: 0 0 22px;
  color: var(--ink-mute);
  font-size: 0.9rem;
}

.legal-doc h2 {
  margin: 28px 0 10px;
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.legal-doc p {
  margin: 0 0 12px;
}

.agree .text-link {
  margin-top: 0;
  font-weight: 500;
}

.subpage__icons {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* —— Footer —— */
.site-footer {
  background: var(--snow);
  color: var(--ink);
  padding: 56px 0 48px;
  border-top: 1px solid var(--line);
}

.site-footer__inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.site-footer .logo {
  color: #121212;
  display: inline-block;
  margin-bottom: 10px;
}

.site-footer__brand p {
  margin: 0;
  max-width: 28ch;
  line-height: 1.45;
  font-size: 0.92rem;
  color: #2e2e2c;
}

.site-footer__nav,
.site-footer__contacts {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.site-footer a {
  color: #121212;
  transition: color 0.2s ease;
}

.site-footer a:hover {
  color: #3a3a38;
}

.site-footer__legal {
  padding-top: 18px;
}

.site-footer__legal p {
  margin: 0;
  font-size: 0.78rem;
  color: #5c5a54;
}

/* —— To top —— */
.to-top {
  position: fixed;
  right: 20px;
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 30;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: var(--cta);
  color: var(--snow);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 10px 24px var(--shadow);
  transition: transform 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.to-top:hover {
  background: var(--cta-hover);
  transform: translateY(-4px) scale(1.05);
}

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

@media (hover: hover) and (pointer: fine) {
  .hero__product {
    pointer-events: auto;
  }

  .hero__product img {
    transition: transform 0.7s var(--hdr-ease);
  }

  .hero__product:hover img {
    transform: scale(1.03);
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-card:hover,
  .product-card:hover .product-card__media img,
  .route-card:hover,
  .route-card:hover img,
  .route-card--ready:hover img,
  .about__photo:hover img,
  .resin__photo:hover img,
  .pay-ship__icon:hover .pay-ship__mark,
  .cart:hover,
  .cart:hover svg,
  .btn--primary:hover,
  .to-top:hover,
  .hero__product:hover img {
    transform: none;
  }
}

/* —— Section reveal (не герой) —— */
@media (prefers-reduced-motion: no-preference) {
  html.js-home .about:not(.is-shown) .about__title,
  html.js-home .collection:not(.is-shown) .collection__title,
  html.js-home .resin:not(.is-shown) .resin__title,
  html.js-home .order:not(.is-shown) .order__title,
  html.js-home .pay-ship:not(.is-shown) .pay-ship__title,
  html.js-home .about:not(.is-shown) .about__photo,
  html.js-home .collection:not(.is-shown) .product-card,
  html.js-home .resin:not(.is-shown) .resin__photo,
  html.js-home .order:not(.is-shown) .order-panel,
  html.js-home .pay-ship:not(.is-shown) .pay-ship__col {
    opacity: 0;
    transform: translate3d(0, 16px, 0);
  }

  html.js-home .about.is-shown .about__title,
  html.js-home .collection.is-shown .collection__title,
  html.js-home .resin.is-shown .resin__title,
  html.js-home .order.is-shown .order__title,
  html.js-home .pay-ship.is-shown .pay-ship__title,
  html.js-home .about.is-shown .about__photo,
  html.js-home .collection.is-shown .product-card,
  html.js-home .resin.is-shown .resin__photo,
  html.js-home .order.is-shown .order-panel,
  html.js-home .pay-ship.is-shown .pay-ship__col {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
      transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  }

  html.js-home .collection.is-shown .product-card:hover {
    transform: translate3d(0, -4px, 0);
  }

  html.js-home .collection.is-shown .product-card:nth-child(2) { transition-delay: 0.08s; }
  html.js-home .collection.is-shown .product-card:nth-child(3) { transition-delay: 0.16s; }
  html.js-home .about.is-shown .about__photo--wide { transition-delay: 0.1s; }
}

@media (prefers-reduced-motion: reduce) {
  .about .about__title,
  .collection .collection__title,
  .resin .resin__title,
  .order .order__title,
  .about .about__photo,
  .collection .product-card,
  .resin .resin__photo,
  .order .order-form {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* —— Responsive home —— */
@media (max-width: 1024px) {
  .about__grid,
  .resin__inner,
  .order__inner,
  .site-footer__inner,
  .pay-ship__cols {
    grid-template-columns: 1fr;
  }

  .about__photo--tall,
  .about__photo--tall img {
    min-height: 380px;
  }

  .collection__grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: none;
  }

  .collection__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .pay-ship,
  .about,
  .collection,
  .resin,
  .order {
    padding-left: 0;
    padding-right: 0;
  }

  .order__intro {
    margin-bottom: 8px;
  }

  .subpage__card {
    padding: 28px 22px;
  }
}

@media (max-width: 720px) {
  .logo {
    font-size: 1.05rem;
  }

  .about,
  .collection,
  .resin,
  .order,
  .pay-ship {
    padding: 48px 0 56px;
  }

  .about__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .about__title,
  .collection__title,
  .resin__title,
  .pay-ship__title,
  .order__title {
    font-size: clamp(1.45rem, 6.5vw, 1.9rem);
  }

  .about__photo--tall,
  .about__photo--tall img {
    min-height: 280px;
  }

  .about__photo--wide {
    aspect-ratio: 5 / 4;
  }

  .collection__grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .product-card__top {
    padding: 16px 16px 12px;
  }

  .product-card__name {
    font-size: 1.05rem;
  }

  .product-card__buy {
    flex-wrap: wrap;
    gap: 10px;
  }

  .product-card__buy .btn {
    margin-left: auto;
  }

  .product-card__media {
    margin: 0 12px 12px;
    aspect-ratio: 5 / 4;
    border-radius: 14px;
  }

  .resin__flow p {
    font-size: 0.95rem;
  }

  .resin__photo {
    aspect-ratio: 4 / 3;
  }

  .pay-ship__col {
    padding: 18px;
  }

  .pay-ship__icons {
    gap: 8px;
  }

  .order-form {
    grid-template-columns: 1fr;
    padding: 16px;
    gap: 14px;
    border-radius: 20px;
  }

  .order-form__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .order-form__actions .btn {
    width: 100%;
    max-width: none;
  }

  .order-form__fact {
    max-width: none;
  }

  .order-done {
    padding: 22px 18px;
  }

  .order-done__links {
    flex-direction: column;
    align-items: stretch;
  }

  .order-done__links .btn {
    width: 100%;
  }

  .site-footer {
    padding: 40px 0 36px;
  }

  .site-footer__inner {
    gap: 22px;
    padding-bottom: 22px;
  }

  .site-footer__brand p {
    max-width: none;
  }

  .site-footer__legal p {
    font-size: 0.74rem;
    line-height: 1.45;
  }

  .subpage {
    padding: 24px 0 56px;
  }

  .subpage__card {
    padding: 22px 16px;
    border-radius: 20px;
  }

  .legal-doc h2 {
    font-size: 1.05rem;
  }

  .to-top {
    right: 14px;
    bottom: calc(18px + env(safe-area-inset-bottom));
    width: 44px;
    height: 44px;
  }

  .hero__routes {
    gap: 8px;
  }

  .hero__copy .btn--primary {
    width: 100%;
    max-width: none;
  }

  .hero__fact {
    max-width: none;
  }
}

@media (max-width: 480px) {
  :root {
    --content: calc(100% - 24px);
    --header-h: 56px;
  }

  .site-header.is-float,
  .site-header.is-scrolled {
    left: 8px;
    right: 8px;
    border-radius: 20px;
  }

  .hero__title {
    font-size: clamp(2.2rem, 12vw, 2.8rem);
  }

  .hero__product img {
    max-height: 44vh;
  }

  .route-card__label {
    font-size: 0.72rem;
  }

  .cart,
  .burger {
    width: 40px;
    height: 40px;
  }

  .product-card__row {
    flex-wrap: wrap;
  }

  .pill {
    font-size: 0.68rem;
  }
}

/* —— 404 page helpers —— */
.page-404 {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 20px 120px;
  background: var(--bg-warm);
  text-align: center;
}

.page-404 h1 {
  margin: 0 0 12px;
  font-size: clamp(3rem, 12vw, 6rem);
  letter-spacing: -0.04em;
  font-weight: 400;
  font-synthesis: none;
}

.page-404 p {
  margin: 0 0 24px;
  color: var(--ink-soft);
}
