/* ===== FONT ===== */
@font-face {
  font-family: "Tilda Sans";
  src: url("/assets/fonts/tildasans/TildaSans-VF.woff2") format("woff2"),
    url("/assets/fonts/tildasans/TildaSans-VF.woff") format("woff");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ===== DESIGN TOKENS ===== */
:root {
  --clr-primary: #7b5b3a;
  --clr-primary-hover: #936b45;
  --clr-primary-light: rgba(123, 91, 58, 0.07);

  --clr-text: #1c1917;
  --clr-text-secondary: #57534e;
  --clr-text-muted: #a8a29e;

  --clr-bg: #ffffff;
  --clr-bg-warm: #fbf8f4;
  --clr-bg-card: #ffffff;
  --clr-bg-overlay: rgba(255, 255, 255, 0.97);
  --clr-bg-glass: rgba(255, 255, 255, 0.92);

  --clr-border: #e7e5e4;
  --clr-border-light: #f0eeec;

  --clr-phone: #16a34a;
  --clr-phone-hover: #15803d;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-primary: 0 8px 24px rgba(123, 91, 58, 0.2);
  --shadow-phone: 0 8px 24px rgba(22, 163, 74, 0.3);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 999px;

  --hero-blob-1: rgba(200, 160, 100, 0.25);
  --hero-blob-2: rgba(180, 140, 90, 0.2);
  --hero-outline: rgba(123, 91, 58, 0.08);

  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --section-padding-y: 72px;
  --container: min(1140px, 100% - 2rem);
}

/* ===== RESET ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
  background: var(--clr-bg);
  color: var(--clr-text);
  font-family: "Tilda Sans", "Segoe UI", system-ui, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

button {
  border: none;
  background: none;
  cursor: pointer;
  font: inherit;
}

/* Visible keyboard focus */
a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--clr-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ===== LAYOUT ===== */
.container {
  width: var(--container);
  margin-inline: auto;
}

section {
  position: relative;
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  flex-direction: column;
  justify-content: flex-start;
  padding: var(--section-padding-y) 0;
}

.section-header {
  margin-bottom: 3rem;
  text-align: center;
}

.section-header .section-subtitle {
  margin-top: 0.35rem;
  margin-inline: auto;
}

/* ===== TYPOGRAPHY ===== */
h1 {
  color: var(--clr-text);
  font-size: clamp(2.6rem, 8vw, 5.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

h2 {
  margin-bottom: 1rem;
  font-size: clamp(1.8rem, 4.5vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h3 {
  margin-bottom: 0.75rem;
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  font-weight: 600;
  line-height: 1.3;
}

.section-subtitle {
  max-width: min(760px, 100%);
  color: var(--clr-text-secondary);
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  line-height: 1.75;
  text-wrap: pretty;
}

/* ===== HEADER / NAV ===== */
.site-header {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 40;
}

.nav-bar {
  display: flex;
  height: 56px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  color: var(--clr-text);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: opacity var(--transition);
}

.logo:hover {
  opacity: 0.7;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  position: relative;
  color: var(--clr-text-secondary);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color var(--transition);
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  border-radius: 1px;
  background: var(--clr-primary);
  transition: width var(--transition);
}

.nav-links a:hover {
  color: var(--clr-text);
}

.nav-links a:hover::after {
  width: 100%;
}

/* Burger */
.burger {
  z-index: 1100;
  display: none;
  width: 28px;
  height: 20px;
  flex-direction: column;
  justify-content: space-between;
}

.burger span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--clr-text);
  transition: transform var(--transition), opacity var(--transition);
}

.burger.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.burger.active span:nth-child(2) {
  opacity: 0;
}

.burger.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* Mobile menu overlay */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  opacity: 0;
  background: var(--clr-bg-overlay);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: opacity var(--transition);
}

.mobile-nav.open {
  display: flex;
  opacity: 1;
}

.mobile-nav a {
  color: var(--clr-text);
  font-size: 1.5rem;
  font-weight: 600;
  transition: color var(--transition);
}

.mobile-nav a:hover {
  color: var(--clr-primary);
}

.menu-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  padding: 0.5rem;
  color: var(--clr-text);
  font-size: 2.5rem;
  line-height: 1;
  transition: color var(--transition);
}

.menu-close:hover {
  color: var(--clr-primary);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 2px solid transparent;
  border-radius: var(--radius-full);
  padding: 0.9rem 2rem;
  white-space: nowrap;
  font-size: 1rem;
  font-weight: 600;
  transition: all var(--transition);
}

.btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

:is(.btn-instagram, .btn-facebook) {
  border: 1px solid var(--clr-primary);
  background: var(--clr-primary);
  color: var(--clr-bg);
}

:is(.btn-instagram, .btn-facebook):hover {
  transform: translateY(-2px);
  border-color: var(--clr-primary-hover);
  background: var(--clr-primary-hover);
  box-shadow: var(--shadow-primary);
  color: var(--clr-bg);
}

.btn-outline {
  border-color: var(--clr-border);
  background: transparent;
  color: var(--clr-text);
}

.btn-outline:hover {
  transform: translateY(-2px);
  border-color: var(--clr-primary);
  color: var(--clr-primary);
}

.btn-phone {
  background: var(--clr-phone);
  color: var(--clr-bg);
}

.btn-phone:hover {
  transform: translateY(-2px);
  background: var(--clr-phone-hover);
  box-shadow: var(--shadow-phone);
}

.btn-sm {
  padding: 0.6rem 1.4rem;
  font-size: 0.9rem;
}

.to-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1000;
  width: 44px;
  height: 44px;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-full);
  background: var(--clr-bg-glass);
  box-shadow: var(--shadow-md);
  color: var(--clr-primary);
  font-size: 1.3rem;
  line-height: 1;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition), border-color var(--transition);
}

.to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.to-top:hover {
  border-color: var(--clr-primary);
}

/* ===== HERO ===== */
.hero {
  position: relative;
  display: flex;
  height: 100vh;
  height: 100dvh;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0;
  background: linear-gradient(160deg, #fdf9f3 0%, #f7f0e6 35%, #fbf6f0 65%, #fefcfa 100%);
}

/* Decorative blobs */
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  pointer-events: none;
}

.hero::before {
  top: -150px;
  right: -150px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--hero-blob-1) 0%, transparent 70%);
  animation: hero-blob-1 25s ease-in-out infinite;
}

.hero::after {
  bottom: -100px;
  left: -100px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--hero-blob-2) 0%, transparent 70%);
  animation: hero-blob-2 30s ease-in-out infinite;
}

@keyframes hero-blob-1 {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(-40px, 30px) scale(1.1);
  }

  66% {
    transform: translate(20px, -20px) scale(0.95);
  }
}

@keyframes hero-blob-2 {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(30px, -25px) scale(1.05);
  }

  66% {
    transform: translate(-20px, 40px) scale(0.9);
  }
}

/* Subtle decorative circles */
.hero-decor {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-decor span {
  position: absolute;
  border: 1px solid var(--hero-outline);
  border-radius: 50%;
}

.hero-decor span:nth-child(1) {
  top: 10%;
  left: 5%;
  width: 300px;
  height: 300px;
  animation: decor-float 18s ease-in-out infinite;
}

.hero-decor span:nth-child(2) {
  right: 10%;
  bottom: 15%;
  width: 200px;
  height: 200px;
  animation: decor-float 22s ease-in-out infinite reverse;
}

.hero-decor span:nth-child(3) {
  top: 60%;
  left: 60%;
  width: 150px;
  height: 150px;
  animation: decor-float 15s ease-in-out infinite 3s;
}

@keyframes decor-float {
  0%,
  100% {
    transform: translateY(0) rotate(0);
  }

  50% {
    transform: translateY(-20px) rotate(5deg);
  }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 4.5rem 1rem 2rem;
  text-align: center;
}

.hero-content h1 {
  margin-bottom: 1rem;
  animation: hero-fade-up 1s ease-out;
}

.hero-subtitle {
  margin-bottom: 0.5rem;
  color: var(--clr-text-secondary);
  font-size: clamp(1.1rem, 2.8vw, 1.45rem);
  font-weight: 400;
  animation: hero-fade-up 1s ease-out 0.15s both;
}

.hero-tagline {
  margin-bottom: 2.5rem;
  color: var(--clr-text-muted);
  font-size: clamp(0.9rem, 2vw, 1.05rem);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: hero-fade-up 1s ease-out 0.3s both;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  animation: hero-fade-up 1s ease-out 0.45s both;
}

@keyframes hero-fade-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll indicator */
.scroll-hint {
  position: absolute;
  right: 0;
  bottom: 2rem;
  left: 0;
  z-index: 2;
  display: flex;
  width: max-content;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-inline: auto;
  animation: scroll-hint-fade-up 1s ease-out 0.8s both;
}

@keyframes scroll-hint-fade-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.scroll-hint span {
  color: var(--clr-text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.scroll-hint-line {
  position: relative;
  width: 1px;
  height: 40px;
  overflow: hidden;
  background: var(--clr-border);
}

.scroll-hint-line::after {
  content: "";
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--clr-primary);
  animation: scroll-line 2s ease-in-out infinite;
}

@keyframes scroll-line {
  0% {
    top: -100%;
  }

  50%,
  100% {
    top: 100%;
  }
}

/* ===== ABOUT ===== */
.about {
  background: var(--clr-bg);
}

/* ===== ADVANTAGES GRID ===== */
.advantages-heading {
  margin-top: 2rem;
  margin-bottom: 1.5rem;
}

.advantages-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 4rem;
}

.advantage-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  border: 1px solid var(--clr-border-light);
  border-radius: var(--radius-md);
  background: var(--clr-bg-warm);
  padding: 1.5rem;
  transition: all var(--transition);
}

.advantage-card:hover {
  transform: translateY(-4px);
  border-color: var(--clr-border);
  box-shadow: var(--shadow-md);
}

.advantage-icon {
  display: flex;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--clr-border-light);
  border-radius: var(--radius-sm);
  background: var(--clr-bg);
  color: var(--clr-primary);
}

.advantage-icon svg {
  width: 24px;
  height: 24px;
}

.advantage-card h4 {
  margin-bottom: 0.15rem;
  color: var(--clr-text);
  font-size: 0.95rem;
  font-weight: 600;
}

.advantage-card p {
  color: var(--clr-text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

/* ===== BRANDS ===== */
.brands-section {
  margin-top: 4rem;
}

.brands-heading {
  margin-bottom: 0.5rem;
}

.brands-carousel {
  position: relative;
  overflow: hidden;
  padding: 0.25rem 0 0.75rem;
  -webkit-mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
}

.brands-track {
  display: flex;
  width: max-content;
  gap: 0.65rem;
}

.brands-track.is-loop-ready {
  animation: brands-scroll 38s linear infinite;
}

.brands-carousel:hover .brands-track.is-loop-ready {
  animation-play-state: paused;
}

.brand-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-full);
  background: var(--clr-bg-warm);
  padding: 0.55rem 1rem;
  white-space: nowrap;
  color: var(--clr-text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: all var(--transition);
}

.brand-pill:hover {
  transform: translateY(-1px);
  border-color: var(--clr-primary);
  box-shadow: var(--shadow-sm);
  color: var(--clr-primary);
}

@keyframes brands-scroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* ===== STORES ===== */
.stores {
  min-height: 100vh;
  background: var(--clr-bg-warm);
}

.stores-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-rows: 1fr;
  align-items: stretch;
  gap: 1.25rem;
}

.store-card {
  display: grid;
  height: 100%;
  min-height: 300px;
  grid-template-rows: auto auto 1fr auto;
  gap: 0.6rem;
  border: 1px solid var(--clr-border-light);
  border-radius: var(--radius-lg);
  background: var(--clr-bg-card);
  padding: 2rem;
  transition: all var(--transition);
}

.store-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.store-card .store-icon {
  display: flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--clr-primary-light);
  color: var(--clr-primary);
}

.store-card .store-icon svg {
  width: 22px;
  height: 22px;
}

.store-card h3 {
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

.store-card p {
  min-height: 3.1em;
  margin: 0;
  color: var(--clr-text-secondary);
  font-size: 0.92rem;
  line-height: 1.55;
}

.store-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-self: end;
  align-items: center;
  gap: 0.6rem;
}

.store-actions .btn {
  align-self: flex-start;
}

.social-actions {
  flex-wrap: nowrap;
}

.social-actions .btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  padding: 0;
}

.map-wrapper {
  margin-top: 1rem;
  overflow: hidden;
  border: 1px solid var(--clr-border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.map-wrapper #map {
  width: 100%;
  height: 220px;
}

.map-fallback {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  color: var(--clr-text-secondary);
  font-size: 0.9rem;
  text-align: center;
}

.leaflet-popup-content-wrapper {
  border-radius: var(--radius-md) !important;
}

.leaflet-popup-content {
  margin: 0 !important;
  padding: 0.85rem 1rem !important;
  font-family: "Tilda Sans", sans-serif !important;
  line-height: 1.5 !important;
}

.leaflet-popup-content p {
  margin: 0.35rem 0;
}

.leaflet-popup-content a {
  color: var(--clr-primary);
  font-weight: 600;
}

/* ===== CONTACTS ===== */
.contacts {
  display: flex;
  background: var(--clr-bg);
}

.contacts .container {
  display: grid;
  width: var(--container);
  min-height: calc(100vh - 144px);
  min-height: calc(100dvh - 144px);
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.contacts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.contacts-grid > * {
  min-width: 0;
}

.contact-info-block {
  border: 1px solid var(--clr-border-light);
  border-radius: var(--radius-lg);
  background: var(--clr-bg-warm);
  padding: 2rem;
}

.contact-info-block address {
  font-style: normal;
}

.contact-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  border-bottom: 1px solid var(--clr-border-light);
  padding: 0.6rem 0;
}

.contact-row:last-child {
  border-bottom: none;
}

.contact-row .contact-label {
  min-width: 100px;
  flex-shrink: 0;
  color: var(--clr-text-muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.contact-row .contact-value {
  color: var(--clr-text);
  font-size: 0.95rem;
}

.contact-row .contact-value a {
  color: var(--clr-primary);
  font-weight: 600;
  transition: color var(--transition);
}

.contact-row .contact-value a:hover {
  color: var(--clr-primary-hover);
}

.contact-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* ===== FOOTER ===== */
.site-footer {
  grid-row: 4;
  border-top: 1px solid var(--clr-border-light);
  padding: 1.5rem 0 max(1rem, env(safe-area-inset-bottom));
  color: var(--clr-text-muted);
  font-size: 0.9rem;
  text-align: center;
}

/* ===== REVEAL ANIMATIONS ===== */
.reveal {
  opacity: 1;
  transform: none;
}

.js .reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.js .reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 {
  transition-delay: 0.1s;
}

.reveal-delay-2 {
  transition-delay: 0.2s;
}

.reveal-delay-3 {
  transition-delay: 0.3s;
}

.reveal-delay-4 {
  transition-delay: 0.4s;
}

.reveal-delay-5 {
  transition-delay: 0.5s;
}

.reveal-delay-6 {
  transition-delay: 0.6s;
}

/* ===== RESPONSIVE ===== */
@media (min-width: 640px) {
  .advantages-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stores-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contacts-grid {
    grid-template-columns: 1.2fr 1fr;
  }
}

@media (min-width: 900px) {
  .stores-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .advantages-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .store-card {
    min-height: 320px;
  }

  .hero-cta .btn {
    padding: 1rem 2.5rem;
    font-size: 1.05rem;
  }
}

/* Mobile nav breakpoint */
@media (max-width: 767px) {
  .nav-links {
    display: none;
  }

  .burger {
    display: flex;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .hero-cta .btn {
    width: 100%;
    max-width: 320px;
  }

  .contact-row {
    flex-direction: column;
    gap: 0.25rem;
  }

  .contact-row .contact-label {
    min-width: auto;
  }
}

@media (min-width: 768px) {
  .mobile-nav {
    display: none !important;
  }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .brands-track {
    animation: none;
  }
}
