/* АВРОРА — ООО «КОСМОС» */

:root {
  --c-primary: #49A294; --c-primary-light: #64BBAD;
  --c-primary-lighter: #E1F7ED; --c-primary-dark: #358072;
  --c-accent: #CFA5C7; --c-accent-light: #F5C3CB; --c-accent-lighter: #FEFAD6;
  --c-bg: #fff; --c-bg-alt: #E6F2D1;
  --c-text: #1A1A1A; --c-text-light: #4A4A4A; --c-text-muted: #7A7A7A;
  --c-white: #fff; --c-border: #DFE2D8;
  --ff: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --fs-xs: clamp(.7rem, .65rem + .25vw, .8rem); --fs-sm: clamp(.8rem, .75rem + .25vw, .9rem);
  --fs-base: clamp(.9rem, .85rem + .25vw, 1rem); --fs-md: clamp(1rem, .9rem + .5vw, 1.15rem);
  --fs-lg: clamp(1.15rem, 1rem + .75vw, 1.5rem); --fs-xl: clamp(1.5rem, 1.2rem + 1.5vw, 2.25rem);
  --fs-2xl: clamp(2rem, 1.5rem + 2.5vw, 3.25rem);
  --r-sm: .375rem; --r-md: .625rem; --r-lg: 1rem; --r-xl: 1.5rem;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06); --shadow-md: 0 4px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,.1);
  --tr: .3s cubic-bezier(.4,0,.2,1); --mw: 1200px; --hh: 72px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--hh); }
body { font-family: var(--ff); font-size: var(--fs-base); line-height: 1.6; color: var(--c-text); background: var(--c-bg); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }
input, textarea { font: inherit; border: none; outline: none; }
h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; }

/* --- Shared --- */
.container { width: min(var(--mw), 100% - 2rem); margin-inline: auto; }
.section {
  padding: clamp(3rem, 5vw, 6rem) 0;
  &.alt {
    border-radius: var(--r-xl);
    width: min(calc(var(--mw) + 4rem), calc(100% - 2rem));
    margin: clamp(1rem, 2vw, 2rem) auto;
  }
}

.intro {
  text-align: center; margin-bottom: clamp(2rem, 4vw, 3.5rem);
  h2 { font-size: var(--fs-xl); margin-bottom: .5rem; }
  p { font-size: var(--fs-md); color: var(--c-text-light); max-width: 600px; margin-inline: auto; }
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .75rem 1.75rem; border-radius: var(--r-md);
  font-size: var(--fs-sm); font-weight: 600; transition: var(--tr); white-space: nowrap;
  &.primary { background: var(--c-primary); color: var(--c-white); &:hover { background: var(--c-primary-dark); } }
  &.outline { border: 1.5px solid var(--c-primary); color: var(--c-primary); &:hover { background: var(--c-primary); color: var(--c-white); } }
  &.sm { padding: .5rem 1.25rem; font-size: var(--fs-xs); }
  &.lg { padding: 1rem 2.25rem; font-size: var(--fs-base); }
}

.badge {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .3rem .75rem; border-radius: 50px;
  font-size: var(--fs-xs); font-weight: 600;
  background: var(--c-accent-lighter); color: var(--c-accent);
  &.green { background: rgba(73,162,148,.12); color: var(--c-primary-dark); }
  svg { width: 14px; height: 14px; }
}

.icon-box {
  --sz: 44px; --rd: var(--r-md);
  width: var(--sz); height: var(--sz); border-radius: var(--rd); flex-shrink: 0;
  display: grid; place-items: center; background: rgba(73,162,148,.1);
  svg { width: calc(var(--sz) * .5); height: calc(var(--sz) * .5); color: var(--c-primary); }
}

/* --- Header --- */
.header {
  position: fixed; inset: 0 0 auto; z-index: 100; height: var(--hh);
  background: rgba(255,255,255,.85); backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent; transition: var(--tr);
  &.scrolled { border-bottom-color: var(--c-border); box-shadow: var(--shadow-sm); }
  .container { display: flex; align-items: center; justify-content: space-between; height: 100%; gap: 1.5rem; }
  .logo {
    display: flex; align-items: center; gap: .625rem; flex-shrink: 0;
    img { width: 40px; height: 40px; filter: hue-rotate(82deg) saturate(1.2); }
    span { font-size: var(--fs-lg); font-weight: 700; color: var(--c-primary); letter-spacing: .08em; }
  }
  nav {
    display: flex; gap: 1.5rem;
    a { font-size: var(--fs-sm); color: var(--c-text-light); font-weight: 500; transition: var(--tr); &:hover { color: var(--c-primary); } }
  }
  .actions { display: flex; align-items: center; gap: 1rem; flex-shrink: 0; }
  .phone { font-size: var(--fs-sm); font-weight: 600; }
  .burger {
    display: none; width: 28px; height: 20px; flex-direction: column; justify-content: space-between;
    span { display: block; width: 100%; height: 2px; background: var(--c-text); border-radius: 2px; transition: var(--tr); }
    &.active span:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
    &.active span:nth-child(2) { opacity: 0; }
    &.active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }
  }
}

.mobile-nav {
  position: fixed; top: var(--hh); inset-inline: 0; bottom: 0;
  background: var(--c-bg); z-index: 99; padding: 2rem;
  display: flex; flex-direction: column; gap: 1.5rem;
  transform: translateX(100%); transition: var(--tr);
  &.active { transform: translateX(0); }
  a { font-size: var(--fs-lg); font-weight: 500; padding: .5rem 0; border-bottom: 1px solid var(--c-border); &:hover { color: var(--c-primary); } }
}

/* --- Hero --- */
.hero {
  padding: clamp(3rem, 6vw, 5rem) 0;
  margin: calc(var(--hh) + clamp(.5rem, 1vw, 1rem)) auto clamp(1rem, 2vw, 2rem);
  width: min(calc(var(--mw) + 4rem), calc(100% - 2rem));
  border-radius: var(--r-xl);
  overflow: hidden; position: relative;
  background: var(--c-accent-lighter);
  .container { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
  h1 { font-size: var(--fs-2xl); margin-bottom: 1rem; span { color: var(--c-primary); } }
  .desc { font-size: var(--fs-md); color: var(--c-text-light); margin-bottom: 2rem; line-height: 1.7; }
  .actions { display: flex; gap: 1rem; flex-wrap: wrap; }
  .visual { display: flex; justify-content: center; align-items: center; position: relative; }
  .logo-bg { width: clamp(250px, 30vw, 400px); aspect-ratio: 1; opacity: .8; filter: hue-rotate(82deg) saturate(1.2); }
  .stickers { position: absolute; inset: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1rem; pointer-events: none; }
}

.sticker {
  display: grid; place-items: center; width: 90px; height: 90px; border-radius: 50%;
  font-size: .65rem; font-weight: 700; text-align: center; line-height: 1.2;
  box-shadow: var(--shadow-md); pointer-events: auto; position: absolute;
  &.quality { background: var(--c-primary); color: var(--c-white); top: 5%; right: 5%; }
  &.eco { background: var(--c-white); color: var(--c-primary-dark); bottom: 10%; left: 0; }
  &.gost { background: var(--c-accent); color: var(--c-white); top: 55%; right: 0; }
}


/* --- Advantages --- */
.advantages {
  padding: clamp(2rem, 4vw, 3rem) 0; background: var(--c-primary-lighter);
  border-radius: var(--r-xl); width: min(calc(var(--mw) + 4rem), calc(100% - 2rem));
  margin: clamp(1rem, 2vw, 2rem) auto;
  .grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
  .item {
    display: flex; flex-direction: column; align-items: center; text-align: center;
    padding: 1.5rem 1rem; border-radius: var(--r-lg);
    .icon-box { --sz: 56px; --rd: 50%; margin-bottom: .75rem; background: var(--c-white); }
    h4 { font-size: var(--fs-sm); margin-bottom: .25rem; }
    p { font-size: var(--fs-xs); color: var(--c-text-muted); }
  }
}

/* --- About --- */
.about { background: var(--c-accent-light);
  .grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 4vw, 4rem); align-items: start; }
  .text {
    h3 { font-size: var(--fs-lg); margin-bottom: 1rem; color: var(--c-primary-dark); }
    p { color: var(--c-text-light); margin-bottom: 1rem; line-height: 1.8; }
  }
  .principles { display: flex; flex-direction: column; gap: .75rem; margin-top: 1.5rem; }
  .principle {
    display: flex; align-items: flex-start; gap: .75rem; padding: .75rem 1rem;
    background: var(--c-white); border-radius: var(--r-md); border-left: 3px solid var(--c-primary);
    svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--c-primary); margin-top: 2px; }
    span { font-size: var(--fs-sm); color: var(--c-text-light); }
  }
  .gallery {
    display: grid; grid-template-columns: 1fr 1fr; gap: .75rem;
    img { width: 100%; border-radius: var(--r-md); aspect-ratio: 4/3; object-fit: cover; background: var(--c-bg-alt); }
    img:last-child { grid-column: 1 / -1; aspect-ratio: 21/9; }
  }
  .stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; margin-top: clamp(1.5rem, 3vw, 2.5rem); }
  .stat {
    background: var(--c-white); padding: 1rem; border-radius: var(--r-md); text-align: center; box-shadow: var(--shadow-md);
    strong { display: block; font-size: var(--fs-lg); color: var(--c-primary); }
    span { font-size: var(--fs-xs); color: var(--c-text-muted); }
  }
}

/* --- Products --- */
.products {
  .tabs { display: flex; justify-content: center; gap: .5rem; margin-bottom: 2rem; }
  [data-tab] {
    padding: .625rem 1.5rem; border-radius: 50px; font-size: var(--fs-sm);
    font-weight: 600; color: var(--c-text-light); background: var(--c-white);
    border: 1.5px solid var(--c-border); transition: var(--tr);
    &:hover { border-color: var(--c-primary-light); color: var(--c-primary); }
    &.active { background: var(--c-primary); color: var(--c-white); border-color: var(--c-primary); }
  }
  [data-content] { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.5rem; &[hidden] { display: none; } }
  .marketplaces {
    margin-top: 2.5rem; text-align: center; padding: 1.5rem;
    background: var(--c-white); border-radius: var(--r-lg); border: 1px solid var(--c-border);
    p { font-size: var(--fs-sm); color: var(--c-text-light); margin-bottom: 1rem; }
    .links { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }
    a {
      display: inline-flex; align-items: center; gap: .5rem; padding: .5rem 1.25rem;
      border-radius: var(--r-md); font-size: var(--fs-sm); font-weight: 600;
      border: 1.5px solid var(--c-border); transition: var(--tr);
      &:hover { border-color: var(--c-primary); color: var(--c-primary); }
      svg { width: 20px; height: 20px; }
    }
  }
}

.product-card {
  container-type: inline-size;
  background: var(--c-white); border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow-sm); border: 1px solid var(--c-border); transition: var(--tr);
  &:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--c-primary-light); }
  .image {
    aspect-ratio: 4/5; overflow: hidden; position: relative;
    background: linear-gradient(135deg, var(--c-accent-lighter), var(--c-accent-light));
    img { width: 100%; height: 100%; object-fit: cover; }
    .badge { position: absolute; top: .75rem; left: .75rem; }
  }
  .placeholder {
    display: flex; align-items: center; justify-content: center; flex-direction: column;
    gap: .5rem; padding: 1.5rem;
    svg { width: 48px; height: 48px; opacity: .3; }
    span { font-size: var(--fs-xs); color: var(--c-text-muted); }
  }
  .body { padding: 1rem 1.25rem 1.25rem; }
  .category { font-size: var(--fs-xs); color: var(--c-primary); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; margin-bottom: .25rem; }
  h3 { font-size: var(--fs-sm); margin-bottom: .375rem; line-height: 1.3; }
  .desc { font-size: var(--fs-xs); color: var(--c-text-muted); line-height: 1.5; margin-bottom: .75rem; }
  .meta { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
  .volume { font-size: var(--fs-xs); color: var(--c-text-light); font-weight: 600; padding: .2rem .5rem; background: var(--c-bg-alt); border-radius: var(--r-sm); }
  .gost { font-size: .65rem; color: var(--c-text-muted); }
  @container (max-width: 280px) { .body { padding: .75rem 1rem 1rem; } .desc { display: none; } }
}

/* --- Wholesale --- */
.wholesale { background: var(--c-bg-alt);
  .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
  .benefits { display: flex; flex-direction: column; gap: 1rem; }
  .benefit {
    display: flex; gap: 1rem; align-items: flex-start;
    padding: 1.25rem; background: var(--c-white); border-radius: var(--r-md);
    border: 1px solid var(--c-border); transition: var(--tr);
    &:hover { border-color: var(--c-primary-light); box-shadow: var(--shadow-sm); }
    h4 { font-size: var(--fs-sm); margin-bottom: .25rem; }
    p { font-size: var(--fs-xs); color: var(--c-text-muted); line-height: 1.5; }
  }
  .cta {
    padding: 2rem; background: linear-gradient(135deg, var(--c-primary), var(--c-primary-dark));
    border-radius: var(--r-xl); color: var(--c-white); text-align: center;
    h3 { font-size: var(--fs-lg); margin-bottom: .75rem; }
    p { font-size: var(--fs-sm); opacity: .9; margin-bottom: 1.5rem; line-height: 1.6; }
    .btn { background: var(--c-white); color: var(--c-primary); &:hover { background: var(--c-accent-lighter); } }
  }
}

/* --- STM --- */
.stm {
  .content { display: grid; grid-template-columns: 2fr 1fr; gap: 3rem; align-items: start; }
  .text p { color: var(--c-text-light); line-height: 1.8; margin-bottom: 1rem; }
  .steps { display: flex; flex-direction: column; gap: 1.25rem; margin-top: 1.5rem; }
  .step {
    display: flex; gap: 1rem; align-items: flex-start;
    .num { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; background: var(--c-primary); color: var(--c-white); font-size: var(--fs-sm); font-weight: 700; }
    h4 { font-size: var(--fs-sm); margin-bottom: .125rem; }
    p { font-size: var(--fs-xs); color: var(--c-text-muted); }
  }
  .sidebar {
    padding: 1.5rem; background: var(--c-accent-lighter); border-radius: var(--r-xl);
    h4 { font-size: var(--fs-base); margin-bottom: 1rem; color: var(--c-accent); }
    ul { display: flex; flex-direction: column; gap: .5rem; }
    li {
      display: flex; align-items: center; gap: .5rem; font-size: var(--fs-sm); color: var(--c-text-light);
      &::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--c-accent); flex-shrink: 0; }
    }
  }
}

/* --- News & Reviews --- */
.news { background: var(--c-accent-light); }
:is(.news, .reviews) .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }

.news-card {
  background: var(--c-white); border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--c-border); transition: var(--tr);
  &:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
  .image { aspect-ratio: 16/9; background: linear-gradient(135deg, var(--c-primary-lighter), var(--c-accent-light)); display: grid; place-items: center; svg { width: 40px; height: 40px; opacity: .3; } }
  .body { padding: 1.25rem; }
  .date { font-size: var(--fs-xs); color: var(--c-text-muted); margin-bottom: .5rem; }
  h3 { font-size: var(--fs-base); margin-bottom: .5rem; line-height: 1.4; }
  p { font-size: var(--fs-sm); color: var(--c-text-light); line-height: 1.6; margin-bottom: .75rem; }
  .link { font-size: var(--fs-sm); color: var(--c-primary); font-weight: 600; }
}

.review-card {
  background: var(--c-white); padding: 1.5rem; border-radius: var(--r-lg);
  border: 1px solid var(--c-border); transition: var(--tr);
  &:hover { box-shadow: var(--shadow-md); }
  .stars { display: flex; gap: 2px; margin-bottom: .75rem; svg { width: 16px; height: 16px; color: #f0b429; } }
  p { font-size: var(--fs-sm); color: var(--c-text-light); line-height: 1.7; margin-bottom: 1rem; font-style: italic; }
  .author {
    display: flex; align-items: center; gap: .75rem;
    .avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--c-bg-alt); flex-shrink: 0; }
    strong { font-size: var(--fs-sm); display: block; }
    span { font-size: var(--fs-xs); color: var(--c-text-muted); }
  }
}

/* --- Contacts --- */
.contacts { background: var(--c-primary-lighter);
  .grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 1.5rem; align-items: start; }
  .info {
    display: flex; flex-direction: column; gap: 1.5rem;
    align-self: center; justify-self: center;
    .messengers {
      margin-top: .5rem; padding-top: 1.25rem; border-top: 1px solid var(--c-border);
      h4 { font-size: var(--fs-sm); margin-bottom: .75rem; }
      .links { display: flex; gap: .5rem; }
    }
    .response-time { font-size: var(--fs-xs); color: var(--c-text-muted); }
  }
  .item {
    display: flex; gap: .75rem; align-items: flex-start;
    .icon-box { --sz: 40px; }
    h4 { font-size: var(--fs-sm); margin-bottom: .125rem; }
    p, a { font-size: var(--fs-sm); color: var(--c-text-light); }
    a:hover { color: var(--c-primary); }
  }
}

.contact-form {
  background: var(--c-white); padding: 2rem; border-radius: var(--r-xl); border: 1px solid var(--c-border);
  h3 { font-size: var(--fs-lg); margin-bottom: .5rem; }
  & > p { font-size: var(--fs-sm); color: var(--c-text-muted); margin-bottom: 1.5rem; }
  .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
  .group { margin-bottom: 1rem; }
  label { display: block; font-size: var(--fs-xs); font-weight: 600; margin-bottom: .375rem; color: var(--c-text-light); }
  input, textarea {
    width: 100%; padding: .75rem 1rem; border-radius: var(--r-md);
    border: 1.5px solid var(--c-border); background: var(--c-bg);
    font-size: var(--fs-sm); transition: var(--tr);
    &:focus { border-color: var(--c-primary); background: var(--c-white); box-shadow: 0 0 0 3px rgba(73,162,148,.15); }
  }
  textarea { resize: vertical; min-height: 100px; }
}

/* --- Footer --- */
.footer {
  background: var(--c-text); color: rgba(255,255,255,.7);
  margin-top: clamp(1rem, 2vw, 2rem); padding: clamp(2.5rem, 4vw, 4rem) 0 1.5rem;
  .grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 2.5rem; }
  .brand {
    p { font-size: var(--fs-sm); line-height: 1.7; margin-top: .75rem; max-width: 280px; }
    .logo span { color: var(--c-primary-light); }
  }
  .col {
    h4 { font-size: var(--fs-sm); color: var(--c-white); margin-bottom: .75rem; }
    a { display: block; font-size: var(--fs-sm); margin-bottom: .375rem; transition: var(--tr); &:hover { color: var(--c-primary-light); } }
  }
  .bottom { padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.1); display: flex; justify-content: space-between; align-items: center; font-size: var(--fs-xs); }
}

/* --- Animations --- */
.fade-up {
  opacity: 0; transform: translateY(30px);
  transition: opacity .6s cubic-bezier(.4,0,.2,1), transform .6s cubic-bezier(.4,0,.2,1);
  &.visible { opacity: 1; transform: translateY(0); }
  &:nth-child(2) { transition-delay: .1s; }
  &:nth-child(3) { transition-delay: .2s; }
  &:nth-child(4) { transition-delay: .3s; }
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .header { nav, .phone { display: none; } .burger { display: flex; } .actions .btn { display: none; } }
  .hero { .container { grid-template-columns: 1fr; text-align: center; } .actions { justify-content: center; } .visual { order: -1; } .logo-bg { width: 200px; height: 200px; } }
  .advantages .grid { grid-template-columns: repeat(2, 1fr); }
  .about { .grid { grid-template-columns: 1fr; } .visual { order: -1; } .stats { grid-template-columns: 1fr 1fr; } }
  .wholesale .grid, .stm .content, .contacts .grid { grid-template-columns: 1fr; }
  .footer .grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  :root { --hh: 60px; --r-xl: 1rem; }
  .hero, .section.alt, .advantages { width: calc(100% - 1rem); }
  .advantages { .grid { grid-template-columns: 1fr 1fr; gap: .75rem; } .item { padding: 1rem .75rem; } }
  .products [data-content] { grid-template-columns: 1fr 1fr; gap: 1rem; }
  :is(.news, .reviews) .grid { grid-template-columns: 1fr; }
  .contact-form .row { grid-template-columns: 1fr; }
  .footer { .grid { grid-template-columns: 1fr; gap: 1.5rem; } .bottom { flex-direction: column; gap: .5rem; text-align: center; } }
  .hero .actions .btn { width: 100%; }
  .sticker { width: 70px; height: 70px; font-size: .55rem; }
}

@media (max-width: 400px) { .products [data-content] { grid-template-columns: 1fr; } }

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