:root {
  --ink: #3a2f2a;
  --ink-soft: #6a5750;
  --muted: #8a766d;
  --paper: #f3e8dc;
  --accent: #c28b6a;
  --accent-deep: #a56d52;
  --blush: #e8b7a4;
  --cream: #fff8f1;
  --glass: rgba(255, 248, 241, 0.82);
  --glass-border: rgba(255, 255, 255, 0.75);
  --shadow: 0 12px 30px rgba(90, 58, 42, 0.1);
  --radius: 20px;
  --max: 1100px;
  --header-h: 72px;
  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body: "Space Grotesk", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  background: transparent;
}

.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-color: var(--paper);
  background-image:
    radial-gradient(800px 420px at 10% 0%, rgba(232, 183, 164, 0.35), transparent 60%),
    radial-gradient(700px 400px at 100% 10%, rgba(194, 139, 106, 0.18), transparent 55%),
    linear-gradient(180deg, rgba(243, 232, 220, 0.45), rgba(243, 232, 220, 0.55)),
    url("../assets/bg-tile.jpg");
  background-size: auto, auto, auto, 520px;
  background-repeat: no-repeat, no-repeat, no-repeat, repeat;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(100% - 1.5rem, var(--max));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream);
}

.skip-link:focus {
  top: 1rem;
}

/* ===== HEADER: отдельный fixed овал ===== */

.site-header {
  position: fixed;
  top: 14px;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  padding: 0 0.75rem;
}

.nav-pill {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.4rem 0.4rem 0.4rem 1.1rem;
  border-radius: 999px;
  background: rgba(255, 248, 241, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 10px 28px rgba(58, 36, 28, 0.14);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.nav-pill a {
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
}

.nav-pill a:hover {
  color: var(--accent-deep);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff !important;
  font-weight: 600;
}

.nav-toggle {
  pointer-events: auto;
  display: none;
  width: 44px;
  height: 44px;
  margin-left: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  background: rgba(255, 248, 241, 0.85);
  box-shadow: var(--shadow);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 15px;
  height: 2px;
  margin: 3px auto;
  background: var(--ink);
}

/* ===== BUTTONS ===== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.65rem 1.2rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-display);
  font-weight: 600;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff;
  box-shadow: 0 8px 18px rgba(165, 109, 82, 0.25);
}

.btn-secondary {
  background: rgba(255, 248, 241, 0.92);
  border-color: rgba(255, 255, 255, 0.7);
  color: var(--ink);
}

.btn-cream {
  background: var(--cream);
  color: var(--ink);
}

.btn-outline-light {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.75);
  color: #fff;
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.14);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.btn-row-center {
  justify-content: center;
}

/* ===== HERO ===== */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  padding: calc(var(--header-h) + 1rem) 0 3.5rem;
  color: #fff;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(30, 18, 12, 0.62) 0%, rgba(30, 18, 12, 0.2) 55%, rgba(30, 18, 12, 0.35) 100%),
    linear-gradient(180deg, rgba(30, 18, 12, 0.25) 0%, rgba(30, 18, 12, 0.55) 100%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 680px;
}

.hero-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0 0 1.35rem;
  color: #fff;
}

.hero-brand-mark {
  flex: 0 0 auto;
  width: clamp(64px, 9vw, 92px);
  height: auto;
  color: #fff;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.28));
}

.hero-brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.hero-brand-name {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.04em;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.3);
}

.hero-brand-tag {
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 2.2vw, 1.2rem);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0.01em;
  color: rgba(255, 248, 241, 0.9);
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.hero-kicker {
  margin: 0 0 0.7rem;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.85;
}

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4.4vw, 2.85rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.hero h1 span {
  color: var(--blush);
}

.hero-lead {
  margin: 1rem 0 1.35rem;
  font-size: 1.1rem;
  opacity: 0.92;
}

/* ===== SECTIONS ===== */

.section {
  padding: 2.75rem 0;
}

.section-intro {
  max-width: 40rem;
  margin: 0 auto 1.25rem;
  text-align: left;
}

.section-intro-center {
  text-align: center;
  max-width: 36rem;
}

.eyebrow {
  margin: 0 0 0.55rem;
  color: var(--accent-deep);
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.section-intro h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.section-intro-center h2 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
}

.section-intro p:not(.eyebrow) {
  margin: 0;
  color: var(--ink-soft);
}

.section-lead {
  font-size: clamp(1.05rem, 2.2vw, 1.25rem) !important;
  line-height: 1.45;
  color: var(--ink-soft);
}

/* ===== EQUAL CARDS GRID ===== */

.cards {
  display: grid;
  gap: 0.9rem;
  align-items: stretch;
}

.cards-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cards-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cards-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 160px;
  padding: 1.15rem 1.1rem;
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.card h3 {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  line-height: 1.25;
}

.card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.card-wide {
  grid-column: 1 / -1;
  min-height: auto;
  text-align: center;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1.25rem;
}

.card-wide h3 {
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  max-width: 100%;
}

.card-wide p:not(.eyebrow) {
  max-width: 40rem;
}

/* plastics — hover без сдвига соседних блоков */

.plastic-card {
  position: relative;
  overflow: visible;
  text-align: center;
  align-items: center;
  min-height: 0;
  padding: 0.85rem;
  cursor: pointer;
  isolation: isolate;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.plastic-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: 0 0 0 rgba(90, 58, 42, 0);
  transition: box-shadow 0.25s ease;
  z-index: 2;
}

.plastic-card:hover,
.plastic-card:focus-within {
  border-color: rgba(194, 139, 106, 0.55);
  z-index: 3;
}

.plastic-card:hover::after,
.plastic-card:focus-within::after {
  box-shadow: 0 16px 34px rgba(90, 58, 42, 0.18);
}

.plastic-face {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  transition: transform 0.28s ease;
  transform-origin: center center;
  will-change: transform;
}

.plastic-card:hover .plastic-face,
.plastic-card:focus-within .plastic-face {
  transform: translateY(-4px) scale(1.03);
}

.plastic-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 14px;
}

.plastic-card h3 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--accent-deep);
}

.plastic-meta {
  position: relative;
  z-index: 1;
  width: 100%;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(90, 64, 52, 0.12);
  text-align: left;
}

.plastic-meta p {
  margin: 0 0 0.4rem;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--ink-soft);
}

.plastic-meta p:last-child {
  margin-bottom: 0;
}

.plastic-meta strong {
  color: var(--ink);
}

/* process horizontal */

.process-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
  align-items: stretch;
}

.process-copy {
  justify-content: center;
  min-height: 220px;
}

.process-copy h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  line-height: 1.2;
}

.process-visual {
  min-height: 220px;
  padding: 1rem;
  justify-content: center;
}

.printer-frame {
  position: relative;
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  aspect-ratio: 1.2 / 1;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(90, 64, 52, 0.1);
  overflow: hidden;
}

.printer-rail {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 12%;
  height: 20%;
}

.printer-head {
  position: absolute;
  top: 0;
  left: 0;
  width: 46px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(180deg, #5a4a42, #3a2f2a);
  animation: head-move 2.6s ease-in-out infinite;
}

.nozzle {
  position: absolute;
  left: 50%;
  bottom: -10px;
  width: 8px;
  height: 12px;
  transform: translateX(-50%);
  border-radius: 2px;
  background: var(--accent);
}

.filament {
  position: absolute;
  left: 50%;
  top: -22px;
  width: 3px;
  height: 22px;
  transform: translateX(-50%);
  background: var(--blush);
  border-radius: 999px;
}

.printer-bed {
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 10%;
  height: 44%;
  border-radius: 10px;
  background: rgba(58, 47, 42, 0.06);
  display: grid;
  align-items: end;
  justify-items: center;
  padding: 0.6rem;
  overflow: hidden;
}

.print-part {
  width: 44%;
  height: 10%;
  border-radius: 5px;
  background: repeating-linear-gradient(180deg, #f4ebe3 0 3px, #e7d3bf 3px 4px);
  transform-origin: bottom center;
  animation: part-grow 5s ease-in-out infinite;
}

@keyframes head-move {
  0%, 100% { left: 2%; }
  50% { left: calc(100% - 48px); }
}

@keyframes part-grow {
  0% { height: 10%; }
  70% { height: 78%; }
  85% { height: 78%; }
  100% { height: 10%; }
}

/* catalog */

.catalog-box {
  min-height: auto;
}

.catalog-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.product {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.55);
}

.product-media {
  aspect-ratio: 1;
  background: #ead9c8;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.85rem;
  flex: 1;
}

.product-body h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
}

.product-price {
  margin: 0;
  color: var(--accent-deep);
  font-weight: 600;
}

.product-body .btn {
  margin-top: auto;
}

.catalog-empty {
  text-align: center;
  padding: 0.5rem 0;
}

.catalog-empty h3 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
}

.catalog-empty p {
  margin: 0 0 1rem;
  color: var(--ink-soft);
}

.catalog-status {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.catalog-status[hidden] {
  display: none;
}

/* contacts */

.contact-list {
  list-style: none;
  margin: 0;
  padding: 1.15rem 1.1rem;
  min-height: 100%;
}

.contact-list li {
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(90, 64, 52, 0.12);
}

.contact-list li:first-child {
  padding-top: 0;
}

.contact-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.contact-list strong {
  display: block;
  margin-bottom: 0.15rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
}

.contact-list a {
  color: var(--accent-deep);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.contact-aside {
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 240px;
  background: linear-gradient(145deg, #d4a28a 0%, #c28b6a 48%, #b57a5d 100%);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

.contact-aside-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  max-width: 24rem;
  margin: 0 auto;
}

.contact-aside h3 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2rem);
  line-height: 1.15;
}

.contact-aside p {
  margin: 0;
  color: rgba(255, 255, 255, 0.94);
  font-size: 1rem;
}

.contact-aside .btn-row {
  width: 100%;
  justify-content: center;
}

/* footer — без лого */

.site-footer {
  padding: 1rem 0 2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1.1rem;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
}

.footer-inner a {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.page-hero {
  padding: calc(var(--header-h) + 2rem) 0 1rem;
}

.page-hero h1 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
}

.prose {
  max-width: 42rem;
  margin-bottom: 2rem;
  padding: 1.2rem;
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
  color: var(--ink-soft);
}

.prose h2 {
  margin: 1.2rem 0 0.4rem;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.prose ul {
  margin: 0.4rem 0 1rem;
  padding-left: 1.2rem;
}

.prose li {
  margin: 0.25rem 0;
}

.prose a {
  color: var(--accent-deep);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

/* reveal */

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.32s ease, transform 0.32s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .printer-head,
  .print-part {
    animation: none;
  }

  .print-part {
    height: 70%;
  }

  .plastic-card,
  .plastic-face {
    transition: none;
  }

  .plastic-card:hover .plastic-face,
  .plastic-card:focus-within .plastic-face {
    transform: none;
  }
}

/* ===== RESPONSIVE ===== */

@media (max-width: 980px) {
  .cards-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav-pill {
    gap: 0.55rem;
    padding-left: 0.85rem;
  }

  .nav-pill a:not(.nav-cta) {
    font-size: 0.82rem;
  }
}

@media (max-width: 820px) {
  .site-header {
    justify-content: flex-end;
  }

  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .nav-pill {
    position: absolute;
    top: calc(100% + 8px);
    right: 0.75rem;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    min-width: 230px;
    padding: 0.9rem;
    border-radius: 18px;
  }

  .nav-pill.is-open {
    display: flex;
  }

  .cards-2,
  .cards-3,
  .process-row {
    grid-template-columns: 1fr;
  }

  .card-wide {
    grid-column: auto;
  }

  .hero {
    min-height: 85vh;
    padding-bottom: 2.25rem;
  }

  .btn-row .btn {
    flex: 1 1 auto;
  }
}

@media (max-width: 520px) {
  .cards-4 {
    grid-template-columns: 1fr 1fr;
  }

  .hero-inner .btn-row {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-inner .btn {
    width: 100%;
  }

  .footer-inner {
    border-radius: 18px;
  }
}
