/* ==========================================================================
   KOWALSKI — base styles
   ========================================================================== */

/* 1. Reset & tokens */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --black: #0a0a0a;
  --white: #fafafa;
  --gray-light: #f2f2f0;
  --gray: #6b6b6b;
  --line: #e5e5e2;

  --ink: #16233f;
  --ink-soft: #3a4766;
  --muted: #6b7280;

  --accent: #16233f;
  --accent-hover: #0d1830;
  --red: #d32f2f;

  --radius: 2px;
  --ease: cubic-bezier(.2,.7,.2,1);
  --container: 1400px;
  --gutter: clamp(1.25rem, 4vw, 4rem);
}

html { 
  scroll-behavior: smooth; 
  overflow-x: hidden;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--white);
  color: var(--ink);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* Плавающая точка */
.floating-dot {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 12px; 
  height: 12px;
  background-color: var(--ink); 
  border-radius: 50%;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
  transform: translate(-50%, -50%);
}

/* 2. Typography helpers */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-size: .72rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: clamp(1rem, 3vw, 1.75rem);
}
.eyebrow::before { content: ""; width: 34px; height: 1px; background: var(--ink); opacity: .35; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1.5px solid var(--ink);
  background: var(--ink);
  color: var(--white);
  transition: background .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--white); }

/* 3. Nav + mobile menu */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem var(--gutter);
  background: rgba(250,250,250,.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.logo {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: .32em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
}

.nav__links { display: flex; gap: clamp(1.25rem, 3vw, 2.5rem); list-style: none; }
.nav__links a { text-decoration: none; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink); opacity: .8; transition: opacity .25s var(--ease); }
.nav__links a:hover { opacity: 1; }

.burger {
  display: none;
  width: 40px; height: 40px;
  background: none; border: 0; cursor: pointer;
  align-items: center; justify-content: center;
  flex-direction: column; gap: 5px;
}
.burger span { width: 22px; height: 1.5px; background: var(--ink); transition: transform .3s var(--ease), opacity .3s var(--ease); }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 999;
  background: var(--white);
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 2rem;
  transform: translateY(-100%); transition: transform .5s var(--ease);
}
.mobile-menu.open { transform: translateY(0); }
.mobile-menu a { font-size: 1.6rem; letter-spacing: .06em; text-decoration: none; font-weight: 600; color: var(--ink); }

/* 4. Hero */
.hero {
  min-height: 100svh;
  padding: clamp(6rem, 12vh, 9rem) var(--gutter) 2rem;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  position: relative;
  background: radial-gradient(circle at 70% 50%, #ffffff 0%, var(--gray-light) 70%, #ececea 100%);
  max-width: var(--container);
  margin: 0 auto;
  width: 100%;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .035;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
}

.hero__copy { position: relative; z-index: 1; }

.hero__brand { display: flex; flex-direction: column; align-items: flex-start; gap: .25em; margin-bottom: 1.5rem; color: var(--ink); animation: rise 1s var(--ease) both; }
.hero__top { display: inline-flex; align-items: center; gap: 0; font-size: clamp(1.1rem, 2.2vw, 1.6rem); font-weight: 300; letter-spacing: .28em; text-transform: lowercase; color: var(--ink); }
.hero__i, .hero__love { font-weight: 300; }
.hero__dot { width: .55em; height: .55em; border-radius: 50%; background: var(--ink); display: inline-block; transform: translateY(.08em); margin: 0 .35em; }
.hero__name { font-size: clamp(3.2rem, 11vw, 8.5rem); font-weight: 900; line-height: .9; letter-spacing: .04em; text-transform: uppercase; color: var(--ink); position: relative; padding-bottom: .35em; }
.hero__name::after { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px; background: var(--ink); opacity: .25; }

.hero__lead { max-width: 100%; font-size: clamp(1rem, 1.5vw, 1.15rem); color: var(--ink-soft); margin-bottom: 2.25rem; animation: rise 1s var(--ease) .15s both; line-height: 1.7; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .9rem; animation: rise 1s var(--ease) .3s both; }

.hero__media { position: relative; z-index: 1; animation: rise 1.1s var(--ease) .2s both; display: flex; flex-direction: column; align-items: flex-end; }
.hero__frame {
  position: relative;
  aspect-ratio: 4 / 5;
  background: #e9e9e6;
  overflow: hidden;
  border-radius: var(--radius);
  width: 100%;
  border: 1px solid var(--line);
  transition: border-color .4s var(--ease), box-shadow .4s var(--ease);
  box-shadow: 0 10px 30px rgba(22, 35, 63, 0.06);
}
.hero__frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 30%;
  transform: scale(1.05) translateY(0);
  transition: transform 0.8s var(--ease);
}
.hero__media:hover .hero__frame {
  border-color: var(--ink);
  box-shadow: 0 15px 40px rgba(22, 35, 63, 0.12);
}
.hero__media:hover .hero__frame img {
  transform: scale(1.12) translateY(-1%);
}
.hero__caption { display: block; margin-top: .9rem; font-size: .68rem; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); text-align: right; }

.badge {
  position: absolute; top: 1rem; right: 1rem; z-index: 2;
  width: 72px; height: 72px; border-radius: 50%; background: var(--ink); color: var(--white);
  display: grid; place-items: center; text-align: center; font-size: 0.5rem; letter-spacing: 0.12em; text-transform: uppercase; line-height: 1.3;
  transform: rotate(8deg); box-shadow: 0 6px 20px rgba(22,35,63,.15);
}

.scroll-cue { position: absolute; left: 50%; bottom: 1.25rem; transform: translateX(-50%); font-size: .65rem; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: .6rem; }
.scroll-cue::after { content: ""; width: 1px; height: 34px; background: linear-gradient(var(--ink), transparent); animation: cue 2s var(--ease) infinite; transform-origin: top; }

@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: translateY(0); } }
@keyframes cue { 0%,100% { transform: scaleY(.4); opacity: .4; } 50% { transform: scaleY(1); opacity: 1; } }

/* 5. Sections */
section { padding: clamp(4rem, 9vw, 8rem) var(--gutter); }

.section-head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem;
  max-width: var(--container); margin: 0 auto 3rem; flex-wrap: wrap;
}
.section-head h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--ink); }
.section-head p { color: var(--muted); font-size: .9rem; max-width: 38ch; line-height: 1.6; }

/* Categories */
.categories { background: var(--gray-light); }
.category-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem; max-width: var(--container); margin: 0 auto;
}

.category-card {
  position: relative; aspect-ratio: 4 / 5; background: var(--white);
  border: 1px solid var(--line); overflow: hidden; cursor: pointer;
  display: flex; flex-direction: column; transition: border-color .3s var(--ease);
}
.category-card:hover { border-color: var(--ink); }

.category-poster {
  position: absolute; inset: 0; padding: 2rem;
  display: flex; flex-direction: column; justify-content: space-between; align-items: center; text-align: center;
  transition: background .35s var(--ease);
}
.category-poster__brand { font-size: 0.65rem; letter-spacing: 0.25em; font-weight: 800; color: var(--muted); transition: color .35s var(--ease); }
.category-poster__title { font-size: clamp(2rem, 3.5vw, 2.8rem); font-weight: 900; letter-spacing: -0.02em; line-height: 1.1; color: var(--ink); transition: color .35s var(--ease), transform .35s var(--ease); }
.category-poster__meta { font-size: 0.7rem; letter-spacing: 0.15em; color: var(--muted); transition: color .35s var(--ease); }

.category-card:hover .category-poster { background: var(--ink); }
.category-card:hover .category-poster__title { color: var(--white); transform: scale(1.05); }
.category-card:hover .category-poster__brand,
.category-card:hover .category-poster__meta { color: rgba(255, 255, 255, 0.6); }

.category-info {
  position: absolute; inset: auto 0 0 0; padding: 1.5rem;
  background: linear-gradient(to top, rgba(10,10,10,.85), transparent);
  color: var(--white); transform: translateY(10px); opacity: 0;
  transition: opacity .35s var(--ease), transform .35s var(--ease); pointer-events: none;
}
.category-card:hover .category-info { opacity: 1; transform: translateY(0); }
.category-info h3 { font-size: 1.1rem; letter-spacing: .05em; margin-bottom: .3rem; }
.category-info span { font-size: .8rem; opacity: .85; line-height: 1.4; }

/* Collection */
.collection { background: var(--white); }
.product-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem; max-width: var(--container); margin: 0 auto;
}
.product-item {
  position: relative; aspect-ratio: 3 / 4; background: var(--gray-light);
  overflow: hidden; cursor: pointer; display: flex; flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Карточки с реальными фото (БЕЛЫЙ ФОН) */
.product-item--image {
  background: #ffffff; 
}
.product-item--image img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* Фото вписывается целиком */
  transform: scale(1); /* Без начального увеличения */
  transition: transform 0.6s var(--ease);
}
.product-item--image:hover img {
  transform: scale(1.08); /* Увеличение при наведении */
}

/* Типографические постеры (для остальных карточек) */
.product-poster {
  position: absolute; inset: 0; padding: 2rem;
  display: flex; flex-direction: column; justify-content: space-between; align-items: center; text-align: center;
  transition: background .35s var(--ease);
}
.product-poster__brand { font-size: 0.65rem; letter-spacing: 0.25em; font-weight: 800; color: var(--muted); transition: color .35s var(--ease); }
.product-poster__title { font-size: clamp(1.8rem, 4vw, 2.4rem); font-weight: 900; letter-spacing: -0.02em; line-height: 1.1; color: var(--ink); transition: color .35s var(--ease), transform .35s var(--ease); }
.product-poster__meta { font-size: 0.7rem; letter-spacing: 0.15em; color: var(--muted); transition: color .35s var(--ease); }

.product-item:hover .product-poster { background: var(--ink); }
.product-item:hover .product-poster__title { color: var(--white); transform: scale(1.05); }
.product-item:hover .product-poster__brand,
.product-item:hover .product-poster__meta { color: rgba(255, 255, 255, 0.6); }

.product-info {
  position: absolute; inset: auto 0 0 0; padding: 1.5rem;
  background: linear-gradient(to top, rgba(10,10,10,.85), transparent); color: var(--white);
  transform: translateY(10px); opacity: 0; transition: opacity .35s var(--ease), transform .35s var(--ease); pointer-events: none;
}
.product-item:hover .product-info { opacity: 1; transform: translateY(0); }
.product-info h4 { font-size: 1rem; letter-spacing: .05em; margin-bottom: .2rem; }
.product-info span { font-size: .8rem; opacity: .8; }

/* =========================================
   МАНИФЕСТ (Карточка-анаграмма на зимнем фоне)
   ========================================= */
.manifesto {
  background-image: 
    linear-gradient(to bottom, rgba(22, 35, 63, 0.4), rgba(22, 35, 63, 0.5)),
    url('../assets/images/winter-bg.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  
  padding: clamp(4rem, 9vw, 8rem) var(--gutter) 0;
  
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
  text-align: center;
  position: relative;
}

.manifesto__card {
  width: clamp(260px, 28vw, 340px);
  aspect-ratio: 85 / 55;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.manifesto .grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1em;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.1em;
  color: var(--ink);
  transition: opacity 0.4s ease;
}

.manifesto .row { display: flex; gap: 0.1em; }
.manifesto .letter { display: inline-block; transition: color 0.15s ease; }
.manifesto .letter.active { color: var(--red); }
.manifesto .grid.hidden { opacity: 0; }

.manifesto .result-word {
  position: absolute;
  font-size: clamp(1.4rem, 2.8vw, 2.2rem);
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}

.manifesto .result-word.show { opacity: 1; transform: scale(1); }

.manifesto .dot {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 8px;
  height: 8px;
  background: var(--ink);
  border-radius: 50%;
}

.manifesto__text {
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  color: var(--white);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.95;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  margin-bottom: 0;
  padding-bottom: 2rem;
}

/* =========================================
   БЕГУЩАЯ СТРОКА
   ========================================= */
.marquee {
  background: var(--ink);
  color: var(--white);
  padding: 1rem 0;
  overflow: hidden;
  white-space: nowrap;
  display: flex;
  align-items: center;
  font-size: clamp(0.9rem, 2vw, 1.3rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  width: 100%;
}

.marquee__content {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  animation: scrollMarquee 25s linear infinite;
}

.marquee__content span { display: inline-block; }
.marquee__content .dot-sep { color: rgba(255, 255, 255, 0.3); font-size: 0.7em; transform: translateY(-0.1em); }

@keyframes scrollMarquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-33.333%); }
}

/* Philosophy */
.philosophy { 
  background-image: 
    linear-gradient(to bottom, rgba(22, 35, 63, 0.85), rgba(22, 35, 63, 0.95)),
    url('../assets/images/winter-bg.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  
  color: var(--white); 
  text-align: center; 
  padding-top: 2rem; 
  padding-bottom: clamp(4rem, 9vw, 8rem);
  position: relative;
}

.philosophy::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: var(--ink);
  z-index: -1;
}

.philosophy h2 { 
  font-size: clamp(1.6rem, 3.2vw, 2.4rem); 
  letter-spacing: .06em; 
  text-transform: uppercase; 
  margin-bottom: 2rem; 
  position: relative;
  z-index: 1;
}

.philosophy__content p {
  max-width: 800px;
  margin: 0 auto 1.5rem;
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.8;
  opacity: .95;
  position: relative;
  z-index: 1;
}

/* CTA */
.cta { text-align: center; }
.cta h2 { font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 900; letter-spacing: .02em; text-transform: uppercase; margin-bottom: .75rem; color: var(--ink); }
.cta p { color: var(--muted); margin-bottom: 2rem; line-height: 1.7; }
.cta .hero__actions { justify-content: center; }

/* Footer */
.footer { padding: 3rem var(--gutter); background: var(--gray-light); text-align: center; border-top: 1px solid var(--line); }
.footer__logo { font-size: 1rem; font-weight: 800; letter-spacing: .32em; margin-bottom: 1.5rem; color: var(--ink); }
.footer__social { display: flex; justify-content: center; gap: 1.75rem; margin-bottom: 1.5rem; }
.footer__social a { text-decoration: none; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); opacity: .8; transition: opacity .25s; }
.footer__social a:hover { opacity: 1; }
.footer p { color: var(--muted); font-size: .8rem; }

/* 6. Responsive */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 2rem; padding-top: clamp(6rem, 14vh, 8rem); min-height: auto; }
  .hero__media { order: -1; align-items: center; }
  .hero__frame { aspect-ratio: 4 / 5; max-height: 62vh; }
  .hero__top { letter-spacing: .22em; }
  .scroll-cue { display: none; }
}

@media (max-width: 768px) {
  .nav__links { display: none; }
  .burger { display: inline-flex; }
  .badge { width: 60px; height: 60px; font-size: .42rem; } 
  .section-head { margin-bottom: 2rem; }
  
  .product-item:hover .product-info,
  .product-item:hover .product-poster,
  .category-card:hover .category-info,
  .category-card:hover .category-poster { background: transparent; }
  
  .product-item:hover .product-poster__title,
  .category-card:hover .category-poster__title { color: var(--ink); transform: none; }
  
  .product-item:hover .product-poster__brand,
  .product-item:hover .product-poster__meta,
  .category-card:hover .category-poster__brand,
  .category-card:hover .category-poster__meta { color: var(--muted); }
  
  .product-info, .category-info { display: none; }
  .section-head p { max-width: 100%; }

  .philosophy { padding-top: 1.5rem; }

  .hero__lead br,
  .philosophy__content p br {
    display: none;
  }
  .hero__lead,
  .philosophy__content p {
    text-wrap: pretty;
  }
}

@media (max-width: 600px) {
  .philosophy__content p {
    font-size: 1rem;
  }
}

/* 7. Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .marquee__content { animation: none; justify-content: center; }
  .floating-dot { display: none; }
}