@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700;800&display=swap');

/* ===== VARIABLES ===== */
:root {
  --note-op: 0.0;

  --white: #FFFFFF;
  --bg:    #F8F5FB;
  --fg:    #291F42;

  /* Purple — primary (swatch 1) */
  --primary:      #7D70BF;
  --primary-dark: #5E548F;
  --primary-fg:   #F7F6FC;
  --primary-rgb:     125, 112, 191;
  --primary-fg-rgb:  247, 246, 252;

  /* Pink / magenta — secondary (swatch 6) */
  --secondary:    #E5609F;
  --secondary-fg: #FDF0F6;
  --secondary-rgb: 229, 96, 159;

  /* Periwinkle blue — accent (swatch 2) */
  --accent-blue:     #8DA2E3;
  --accent-blue-rgb: 141, 162, 227;

  /* Mint — accent (swatch 3) */
  --accent-mint:     #B3DFE8;
  --accent-mint-rgb: 179, 223, 232;

  /* Peach / dusty coral — warm accent (swatch 5) */
  --accent-yellow: #e4e09b;
  --accent-yellow-dark: #A65A58;
  --accent-yellow-rgb:  228, 157, 155;

  --card:     var(--white);
  --border:   #E4DEF3;
  --muted:    #F1ECF9;
  --muted-fg: #6B6380;
  --accent:   #F6E6CC;
  --tinted:   rgba(125, 112, 191, 0.05);

  /* Reusable gradients / tints, so they're defined once */
  --gradient-accent: linear-gradient(135deg, rgba(var(--primary-rgb), .14), rgba(var(--secondary-rgb), .14));
  --tint-blue:   rgba(var(--accent-blue-rgb), .22);

  --radius: 1rem;
  --font:   'Manrope', sans-serif;
  --focus-ring: 0 0 0 3px rgba(var(--primary-rgb), .35);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  height: 100%;
}
body {
  font-family: var(--font);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1 0 auto;
}

#footer {
  flex-shrink: 0;
}

img { max-width: 100%; display: block; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }

/* ===== TYPOGRAPHY ===== */
h1 { color: var(--fg); font-size: 4rem;    font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; }
h2 { color: var(--fg); font-size: 2.25rem; font-weight: 700; line-height: 1.2; }
h3 { color: var(--fg); font-size: 1.5rem;  line-height: 1.3; }
h4 { color: var(--fg); font-size: 1.25rem; }
p  { color: var(--fg); font-weight: 400; }
small { font-size: 0.75rem; font-weight: 400; }
strong { font-weight: 700; }

/* ===== LAYOUT ===== */
.container  { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.section    { padding: 5rem 0; }
.section--tinted { background: var(--tinted); }
.section--dark   { background: var(--primary); color: var(--primary-fg); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 1.5rem; }

/* ===== NAV ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  backdrop-filter: blur(0px);
  border-bottom: 1px solid transparent;
  box-shadow: none;
  transition: background 0.4s ease, backdrop-filter 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.nav--scrolled {
  background: var(--muted);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.5rem;
  transition: height 0.3s ease;
}

.nav--scrolled .nav__inner {
  height: 3.8rem;
}

.nav__brand {
  font-weight: 700;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--fg);
  line-height: 1.2;
}

.nav__brand img {
  width: 50px;
  height: 50px;
  transition: width 0.3s ease, height 0.3s ease;
}

.nav--scrolled .nav__brand img {
  width: 40px !important;
  height: 40px !important;
}

.nav__brand span {
  display: block;
  font-size: .7rem;
  font-weight: 400;
  letter-spacing: .08em;
  text-transform: none;
  color: var(--muted-fg);
}

.nav__links {
  display: flex;
  gap: .25rem;
  align-items: center;
}

.nav__links a {
  padding: .45rem .8rem;
  border-radius: 3rem;
  font-size: .875rem;
  font-weight: 500;
  color: var(--muted-fg);
  transition: all .2s;
}

.nav__links a:hover,
.nav__links a.active {
  color: var(--primary);
  background: var(--tint-blue);
  font-weight: 600;
}

.nav__cta {
  padding: .6rem 1.4rem;
  border-radius: 2rem;
  background: var(--primary);
  color: var(--primary-fg);
  font-weight: 600;
  font-size: .875rem;
  transition: all .2s;
}

.nav__cta:hover {
  opacity: .88;
  transform: translateY(-1px);
}

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: .5rem;
  background: none;
  border: none;
}

.nav__burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--fg);
  border-radius: 2px;
  transition: all .3s;
}

.nav__mobile {
  display: none;
  flex-direction: column;
  text-align: center;
  padding: 1rem 1.5rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--card);
}

.nav__mobile a {
  padding: .65rem 0;
  font-weight: 500;
  font-size: .95rem;
  border-bottom: 1px solid var(--border);
}

.nav__mobile a:last-child {
  border: none;
}

.nav__mobile.open {
  display: flex;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .85rem 2rem; border-radius: 2rem;
  font-family: var(--font); font-weight: 600; font-size: 1rem;
  cursor: pointer; border: none; transition: all .2s; text-decoration: none;
}
.btn--primary { background: var(--primary); color: var(--primary-fg); }
.btn--primary:hover { opacity: .9; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(var(--primary-rgb),.3); }
.btn--secondary { background: var(--secondary); color: var(--secondary-fg); }
.btn--secondary:hover { opacity: .9; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(var(--secondary-rgb),.3); }
.btn--outline { background: transparent; color: var(--secondary); border: 2px solid var(--secondary); }
.btn--outline:hover { background: rgba(var(--secondary-rgb), 0.08); }
.btn--ghost-white { background: var(--white); color: var(--primary); font-weight: 700; }
.btn--ghost-white:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.15); }
.btn--border-white { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,.6); font-weight: 700; }
.btn--border-white:hover { background: rgba(255,255,255,.1); }
.btn--sm { padding: .5rem 1.1rem; font-size: .85rem; }

/* ===== CARD ===== */
.card {
  display: flex; flex-direction: column; height: 100%;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 2px 8px rgba(var(--primary-rgb),.05);
  transition: all .25s;
}
.card:hover { box-shadow: 0 8px 24px rgba(var(--primary-rgb),.12); transform: translateY(-3px); }
.card__body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.75rem;
}
.card__img { width: 100%; height: 180px; object-fit: cover; }
.card__img-placeholder {
  width: 100%; height: 180px;
  background: var(--gradient-accent);
  display: flex; align-items: center; justify-content: center;
  color: var(--secondary);
}
.card__img-placeholder svg {
  width: 40px; height: 40px;
}
.card__tag {
  display: inline-block; width: fit-content; padding: .2rem .7rem; border-radius: 2rem;
  font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
  background: rgba(var(--primary-rgb),.1); color: var(--primary); transition: transform .25s;
}
.card__text {
  font-size: 0.9rem;
  color: var(--muted-fg);
  line-height: 1.5;
  flex-grow: 1;
  text-align: justify;
}
.card__text--clamp {
  display: -webkit-box;
  -webkit-line-clamp: 7;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 9em;
}
.card__meta { font-size: .78rem; color: var(--muted-fg); margin-bottom: .5rem; }
.card__link { font-size: .875rem; font-weight: 600; color: var(--primary); display: inline-flex; align-items: center; gap: .25rem; }
.card:hover .card__link::after { content: ''; }
.card__footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.product-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--secondary);
}

/* ===== SECTION HEADER ===== */
.section-label {
  font-size: 1rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .12em; color: var(--primary);
}
.section-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 2.5rem; flex-wrap: wrap; gap: 1rem;
}
.section-header h2 { margin-bottom: 0; }
.section-header a { font-size: .875rem; font-weight: 600; color: var(--secondary); }

/* ===== HERO ===== */
.hero { min-height: 90vh; display: flex; align-items: center; padding: 5rem 0; }
.hero__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; position: relative; z-index: 1; }
.hero__badge {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem 1rem; border-radius: 2rem;
  background: var(--tint-blue); color: var(--primary);
  font-size: 1rem; font-weight: 600; margin-bottom: 1.5rem;
}
.hero h1 { margin-bottom: 1.5rem; }
.hero h1 em { font-style: italic; color: var(--secondary);}
.hero__desc { font-size: 1.1rem; color: var(--muted-fg); margin-bottom: 2rem; max-width: 500px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; }
.hero__photo-wrap { display: flex; justify-content: center; position: relative; }
.hero__photo-glow {
  position: absolute; inset: -1.5rem;
  background: radial-gradient(ellipse, var(--accent-blue) 0%, var(--secondary) 30%, transparent 75%);
  border-radius: 30% 70% 50% 50% / 50% 40% 60% 50%;
  z-index: 0;
}
.hero__photo {
  position: relative; z-index: 1;
  width: 420px; height: 520px; object-fit: cover;
  border-radius: 30% 70% 50% 50% / 50% 40% 60% 50%;
  border: 4px solid rgba(255,255,255,0.85);
  box-shadow: 0 20px 60px rgba(var(--primary-rgb),.25);
}

/* ===== WAVE DIVIDER ===== */
.wave-divider { display: block; width: 100%; line-height: 0; margin-top: -1px; }
.wave-divider svg { width: 100%; height: 48px; display: block; }

/* ===== STATS BAR ===== */
.stats-bar { background: var(--primary); padding: 3.5rem 0; }
.stats-bar__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; text-align: center; }
.stats-bar__val { font-size: 3rem; font-weight: 700; color: var(--primary-fg); line-height: 1; margin-bottom: .5rem; }
.stats-bar__lbl { font-size: .875rem; color: rgba(var(--primary-fg-rgb), .75); }
.stats-bar__link {
  display: inline-block; margin-top: .5rem; font-size: .78rem; font-weight: 600;
  color: var(--primary-fg); opacity: .8; border-bottom: 1px solid rgba(var(--primary-fg-rgb), .4);
  transition: opacity .2s;
}
.stats-bar__link:hover { opacity: 1; }

/* ===== FOUNDER ===== */
.founder { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.founder__img-wrap {
  display: flex;
  justify-content: center;
  position: relative;
}
.founder__glow {
  position: absolute;
  inset: -1.5rem;
  background: radial-gradient(ellipse, var(--accent-blue) 0%, var(--secondary) 30%, transparent 75%);
  border-radius: 14% 30% 36% 15% / 58% 40% 76% 58%;
  z-index: 0;
}
.founder__img {
  position: relative;
  z-index: 1;
  width: 400px;
  height: 400px;
  object-fit: cover;
  border-radius: 41% 57% 47% 57% / 45% 40% 60% 55%;
  border: 4px solid rgba(255,255,255,0.85);
  box-shadow: 0 20px 60px rgba(var(--primary-rgb),.25);
}
.founder__name { font-weight: 700; font-size: 1.1rem; }
.founder__role { font-size: .875rem; color: var(--muted-fg); }
blockquote {
  font-style: italic; font-size: 1.05rem; color: var(--muted-fg); line-height: 1.7;
  border-left: 4px solid var(--primary); padding-left: 1.5rem; margin: 1.5rem 0;
}

/* ===== SERVICES ===== */
.service-card {
  display: flex; flex-direction: column; gap: 0.5rem; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 2rem; transition: all .25s;
}
.service-card:hover { box-shadow: 0 8px 24px rgba(var(--primary-rgb),.1); border-color: rgba(var(--primary-rgb),.3); transform: translateY(-3px);}
.service-card__icon {
  width: 3rem; height: 3rem; border-radius: .75rem;
  background: rgba(var(--primary-rgb),.1); display: flex; align-items: center; justify-content: center; color: var(--primary);
}
.service-card p  { font-size: .875rem; color: var(--muted-fg); }

/* ===== REVIEWS ===== */
.review-card { padding: 1.5rem; display: flex; flex-direction: column; }
.review-card__stars { color: var(--accent-yellow-dark); }
.review-card blockquote { border: none; padding: 0; margin: 0 0 1rem; font-size: .925rem; flex: 1; text-align: justify; }
.review-card__author { border-top: 1px solid var(--border); padding-top: 1rem; margin-top: auto; }
.review-card__name { font-weight: 600; font-size: .875rem; }
.review-card__role { font-size: .75rem; color: var(--muted-fg); }

/* ===== CASES ===== */
.case-tags { display: flex; gap: .5rem; flex-wrap: wrap; }
.tag { padding: .2rem .75rem; border-radius: 2rem; font-size: .72rem; font-weight: 600; background: var(--accent); color: var(--primary); }
.tag--accent { background: rgba(var(--accent-yellow-rgb), .18); color: var(--accent-yellow-dark); }
.case-result { border-top: 1px solid var(--border); padding-top: 1rem; margin-top: 1rem; }
.case-result__lbl { font-size: .7rem; color: var(--muted-fg); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .25rem; }
.case-result__val { font-size: .875rem; font-weight: 600; }

/* ===== FAQ ===== */
.faq-filters { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 2rem; }
.faq-btn, .prod-filter {
  padding: .45rem 1.1rem; border-radius: 2rem;
  font-family: var(--font); font-size: .875rem; font-weight: 500;
  cursor: pointer; border: 1px solid var(--border);
  background: var(--card); color: var(--muted-fg); transition: all .2s;
}
.faq-btn.active, .faq-btn:hover { background: var(--secondary); color: var(--secondary-fg); border-color: var(--secondary); }
.faq-item {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: .75rem; overflow: hidden;
  transition: border-color 0.3s ease;
}
.faq-item.hidden { display: none; }
.faq-q {
  width: 100%; text-align: left; background: none; border: none;
  font-family: var(--font); font-size: 1rem; font-weight: 600; color: var(--fg);
  padding: 1.25rem 1.5rem; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  transition: background 0.2s ease;
}
.faq-q:hover {
  background: rgba(var(--primary-rgb), 0.04);
}
.faq-q__icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  transition: transform 0.4s ease;
  line-height: 1;
  color: var(--secondary);
}
.faq-item.open .faq-q__icon {
  transform: rotate(45deg);
}

/* ===== ПЛАВНОЕ ОТКРЫТИЕ/ЗАКРЫТИЕ ===== */
.faq-a {
  display: block;
  max-height: 0;
  overflow: hidden;
  padding: 0 1.5rem;
  font-size: .9rem;
  color: var(--muted-fg);
  line-height: 1.6;
  opacity: 0;
  transform: translateY(-10px);
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
  opacity 0.4s ease,
  padding 0.3s ease,
  transform 0.4s ease;
}

.faq-item.open .faq-a {
  max-height: 500px;
  padding: 0 1.5rem 1.25rem;
  opacity: 1;
  transform: translateY(0);
}

/* ===== CONTACT FORM ===== */
.contact-form  { display: flex; flex-direction: column; gap: 1rem; }
.form-row      { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group    { display: flex; flex-direction: column; gap: .4rem; }
.form-group label { font-size: .875rem; font-weight: 500; }
.form-group input, .form-group select, .form-group textarea {
  font-family: var(--font); font-size: .95rem; font-weight: 400;
  padding: .75rem 1rem; border: 1px solid var(--border);
  border-radius: .75rem; background: var(--card); color: var(--fg);
  transition: border-color .2s, box-shadow .2s; outline: none;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb),.15);
}
.form-group textarea { resize: vertical; min-height: 120px; }

/* ===== CONTACT INFO ===== */
.contact-info      { display: flex; flex-direction: column; gap: 1.5rem; }
.contact-info__item { display: flex; align-items: flex-start; gap: 1rem; }
.contact-info__icon {
  width: 3rem; height: 3rem; border-radius: .75rem; flex-shrink: 0;
  background: rgba(var(--primary-rgb),.1); display: flex; align-items: center; justify-content: center;
  color: var(--primary);
}
.contact-info__icon svg {
  width: 20px; height: 20px;
}
.contact-info__lbl {
  font-size: .78rem; color: var(--muted-fg); margin-bottom: .2rem;
  font-weight: 500; text-transform: uppercase; letter-spacing: .06em;
}
.contact-info__val { font-weight: 600; }

.required {
  color: var(--accent-yellow-dark);
  font-size: 1.1em;
  margin-left: 2px;
}

.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 500;
}

.contact-form .errorlist {
  color: var(--accent-yellow-dark);
  font-size: 0.85rem;
  margin-top: 0.3rem;
  list-style: none;
  padding: 0;
}

.contact-form .errorlist li {
  margin-bottom: 0.2rem;
}

/* ===== PRODUCT FILTER ===== */
.prod-filters { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 2rem; }
.prod-filter.active { background: var(--secondary); color: var(--secondary-fg); border-color: var(--secondary); }
.product-price    { font-size: 1.1rem; font-weight: 700; margin-bottom: .5rem; }
.product-audience {
  font-size: 0.9rem;
  color: var(--muted-fg);
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  font-weight: 500;
}

/* ===== PRODUCT DETAIL ===== */
.product-hero {
  padding: 6rem 0 4rem;
  color: var(--fg);
  position: relative;
  overflow: hidden;
}

.product-hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.product-hero__info h2 {
  font-size: 2.8rem;
  line-height: 1.1;
}
.product-hero__info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.product-status {
  color: var(--accent-yellow-dark);
  font-weight: 600;
  font-size: 0.9rem;
}

.product-status-big {
  color: var(--accent-yellow-dark);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1rem 0;
  padding: 0.5rem 1rem;
  background: rgba(var(--accent-yellow-rgb), 0.15);
  border-radius: 6px;
  display: inline-block;
}

.product-price-info {
  padding: 1.5rem;
  background: var(--gradient-accent);
  border-radius: var(--radius);
  border-left: 5px solid var(--secondary);
}

.product-price-info p {
  margin-bottom: 1rem;
  font-weight: 500;
}

.product-price-info ul, .product-content ul {
  margin: 0.75rem 0 1.25rem 1.2rem;
}

.product-price-info li, .product-content li {
  margin-bottom: 0.5rem;
  position: relative;
}

.product-content li::before {
  content: "♪";
  position: absolute;
  left: -1rem;
  color: var(--primary);
  font-size: 1rem;
}

.product-price-info strong {
  color: var(--secondary);
  font-weight: 700;
}

.product-content {
  max-width: 720px;
  text-align: justify;
  font-size: 1.05rem;
  line-height: 1.8;
}

.product-content p {
  margin-bottom: 1.25rem;
}

.product-content strong {
  color: var(--primary);
}

.product-actions {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ===== PAGE HERO ===== */
.page-hero { padding: 4rem 0 3rem; text-align: center; }
.page-hero p { font-size: 1.1rem; color: var(--muted-fg); max-width: 600px; margin: 1rem auto 0; }

/* ===== CTA BANNER ===== */
.cta-banner { text-align: center; padding: 5rem 0; position: relative; overflow: hidden; margin-top: auto; }
.cta-banner h2 { color: var(--primary-fg); margin-bottom: 1.5rem; font-size: 2.5rem; }
.cta-banner p  { color: rgba(var(--primary-fg-rgb), 0.8); font-size: 1.1rem; margin-bottom: 2.5rem; }
.btn-row { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.cta-banner__notes {
  position: absolute; inset: 0; pointer-events: none;
  display: flex; align-items: center; justify-content: space-around;
  font-size: 5rem; opacity: .07; color: var(--white); overflow: hidden;
}

/* ===== ARTICLE PAGE ===== */
.article-content { font-size: 1.05rem; line-height: 1.8; text-align: justify; }
.article-content p { margin-bottom: 1.2rem; }
.article-content h3 { margin: 2rem 0 1.2rem; }
.back-link {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .875rem; font-weight: 600; color: var(--secondary); margin-bottom: 2rem;
}
.article-content ol, .article-content ul {
  margin: 0.75rem 0 1.25rem 2rem;
}
.article-content li  {
  margin-bottom: 0.5rem;
  position: relative;
}
.article-content ol li {
  padding-left: 1.5rem;
  text-indent: -1.5rem;
  list-style-position: inside;
}
.article-content ol li::marker {
  color: var(--primary);
  font-size: 1rem;
}
.article-content ul li::before {
  content: "♪";
  position: absolute;
  left: -1.5rem;
  color: var(--primary);
  font-size: 1rem;
}
.article-content img {
  max-width:100%;
  height:auto;
  border-radius:8px;
  margin: 2rem 0 0.5rem;
}
.article-content .image-caption {
  font-size: 0.9rem;
  color: var(--muted-fg);
  font-style: italic;
  margin: 0 0 2rem 0;
}

/* ===== TOAST ===== */
.toast {
  display: none;
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  background: var(--primary);
  color: var(--primary-fg);
  padding: 1rem 1.8rem;
  border-radius: var(--radius);
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.toast.show {display: block;opacity: 1;transform: translateY(0);}
.toast.hide {opacity: 0;transform: translateY(20px);}

/* ===== MUSIC NOTES BG ===== */
.notes-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.note {
  position: absolute;
  opacity: 0;
  animation: note-rise linear infinite;
  will-change: transform, opacity;
}

@keyframes note-rise {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(0.7);
    opacity: 0;
  }
  8% {
    opacity: var(--note-op, 0.2);
    transform: translate(6px, -5vh) rotate(5deg) scale(1);
  }
  30% {
    transform: translate(-10px, -28vh) rotate(-4deg) scale(1.02);
  }
  45% {
    opacity: var(--note-op, 0.2);
    transform: translate(8px, -45vh) rotate(12deg) scale(1.05);
  }
  65% {
    transform: translate(-12px, -65vh) rotate(2deg) scale(1.03);
  }
  85% {
    opacity: var(--note-op, 0.2);
    transform: translate(10px, -85vh) rotate(-5deg) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(0, -110vh) rotate(0deg) scale(0.8);
  }
}

/* ===== FOOTER ===== */
.footer { background: var(--fg); color: var(--primary-fg); padding: 3.5rem 0 2rem; }
.footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 3rem; margin-bottom: 2.5rem; }
.footer__brand {
  font-weight: 700;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  line-height: 1.2;
}

.footer__brand img {
  width: 50px;
  height: 50px;
  transition: width 0.3s ease, height 0.3s ease;
}

.footer__brand span {
  display: block;
  font-size: .7rem;
  font-weight: 400;
  letter-spacing: .08em;
  text-transform: none;
}
.footer__desc  { margin-top: .75rem; font-size: .875rem; opacity: .65; line-height: 1.5; }
.footer__title { font-weight: 600; font-size: .875rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 1rem; opacity: .7; }
.footer__links a { display: block; font-size: .875rem; opacity: .65; padding: .25rem 0; transition: opacity .2s; }
.footer__links a:hover { opacity: 1; }
.footer__bottom { text-align: center; border-top: 1px solid rgba(255,255,255,.1); padding-top: 1.5rem; font-size: .8rem; opacity: .5; }

/* ===== Masonry Gallery ===== */
.gallery.masonry {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.gallery__item {
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease;
  position: relative;
}

.gallery__item:hover {
  transform: scale(1.03);
}

.gallery__item img {
  width: 220px;
  height: 200px;
  object-fit: cover;
  display: block;
}

.gallery__empty {
  grid-column: 1 / -1; text-align: center; padding: 3rem;
  background: linear-gradient(135deg, rgba(var(--accent-blue-rgb), .18), rgba(var(--accent-mint-rgb), .22));
  border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--muted-fg);
}
.gallery__empty svg {
  width: 40px; height: 40px;
}

/* ===== Lightbox ===== */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,0.95);
  align-items: center;
  justify-content: center;
}

.lightbox__content {
  position: relative;
  max-width: 95%;
  max-height: 95vh;
}

.lightbox img {
  max-width: 100%;
  max-height: 95vh;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.8);
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 3rem;
  pointer-events: none;
}

.lightbox-btn {
  background: rgba(255,255,255,0.15);
  color: var(--white);
  border: none;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  font-size: 1.8rem;
  cursor: pointer;
  pointer-events: auto;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-btn:hover {
  background: rgba(255,255,255,0.3);
  transform: scale(1.1);
}

.lightbox__close {
  position: absolute;
  top: 15px;
  right: 15px;
  color: var(--white);
  font-size: 2.5rem;
  cursor: pointer;
}

/* ===== VIDEO EMBED (responsive iframes, e.g. VK video) ===== */
.video-responsive {
  position: relative;
  width: 100%;
  aspect-ratio: 853 / 480;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  margin: 1.5rem 0;
}
.video-responsive iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ===== RESPONSIVE ===== */
/* All max-width:900px rules consolidated here (previously duplicated across
   three separate blocks near .hero, .founder and .product-hero) */
@media (max-width: 1023px) {
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.75rem; }

  .hero { min-height: 75vh; }
  .hero__grid, .founder, .product-hero__grid { grid-template-columns: 1fr; }
  .product-hero__grid { text-align: center; }

  .hero__photo-wrap { order: -1; }
  .hero__photo, .hero__photo-glow { border-radius: 35% 65% 45% 55% / 55% 40% 60% 45%; }
  .hero__photo  { width: 300px; height: 280px; }
  .hero__photo-glow, .founder__glow {inset: -1rem;}
  .hero__actions { justify-content: center }

  .founder__img, .founder__glow { border-radius: 38% 62% 55% 45% / 50% 45% 55% 50%;}

  .stats-bar__grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
  }
  .stats-bar__grid > * { flex: 0 1 180px; }
  .form-row     { grid-template-columns: 1fr; }
  .nav__links, .nav__cta { display: none; }
  .nav__burger  { display: flex; }
  .contact-layout { grid-template-columns: 1fr !important; }
  .gallery__item img { height: 150px; }
}
@media (max-width: 560px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .stats-bar__val  { font-size: 2rem; }
  .stats-bar__val  { font-size: 2rem; }

  .hero__photo-glow, .founder__glow {inset: -0.8rem;}
  .hero__photo {width: 220px;height: 220px;}

  .cta-banner h2   { font-size: 1.75rem; }
  .footer__grid { grid-template-columns: 1fr; gap: 2rem; text-align: center; }

  .gallery.masonry { grid-template-columns: repeat(2, 1fr); gap: .6rem; }
  .gallery__item img { height: 130px; }
}