/* ==========================================================================
   Refine — Волшебные фото для каждого
   Тёплый, дружелюбный, эмоциональный
   ========================================================================== */

:root {
  /* Тёплая палитра */
  --color-bg: #fefbf8;
  --color-bg-card: #ffffff;
  --color-bg-soft: #fdf8f3;
  
  --color-text: #2d2a26;
  --color-text-muted: #6b6560;
  --color-text-soft: #9a938c;
  
  /* Акцентные цвета — мягкие, не кислотные */
  --color-accent: #c9a86c;
  --color-accent-light: #e8d5b7;
  --color-accent-soft: rgba(201, 168, 108, 0.2);
  
  --color-rose: #e8b4b8;
  --color-rose-soft: rgba(232, 180, 184, 0.25);
  
  --color-lavender: #c5b8d4;
  --color-lavender-soft: rgba(197, 184, 212, 0.2);
  
  --color-border: rgba(45, 42, 38, 0.08);
  
  /* Градиенты — магия и тепло */
  --gradient-hero: linear-gradient(180deg, #fefbf8 0%, #fdf8f3 40%, #fef9f5 100%);
  --gradient-glow: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(232, 213, 183, 0.4) 0%, transparent 70%);
  --gradient-card: linear-gradient(135deg, #ffffff 0%, #fefcf9 100%);
  --gradient-cta: linear-gradient(135deg, #c9a86c 0%, #b8955a 100%);
  
  /* Тени — мягкие */
  --shadow-soft: 0 4px 24px rgba(45, 42, 38, 0.06);
  --shadow-card: 0 8px 32px rgba(45, 42, 38, 0.08);
  --shadow-card-hover: 0 12px 40px rgba(45, 42, 38, 0.1);
  --shadow-glow: 0 0 60px rgba(201, 168, 108, 0.15);
  
  /* Типографика — дружелюбная */
  --font-display: 'Comfortaa', 'Nunito', sans-serif;
  --font-body: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
  
  --text-hero: clamp(2.25rem, 6vw, 3.5rem);
  --text-section: clamp(1.75rem, 4vw, 2.5rem);
  --text-card: clamp(1.125rem, 1.5vw, 1.25rem);
  --text-body: clamp(1rem, 1.2vw, 1.0625rem);
  
  /* Layout */
  --container-max: 1100px;
  --section-padding: clamp(3rem, 8vw, 5rem);
  --gap: clamp(1.25rem, 2.5vw, 1.75rem);
  
  /* Motion */
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --duration: 0.4s;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
  overflow-x: hidden;
}

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

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

.page-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   Header
   ========================================================================== */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 1rem 1.5rem;
  background: rgba(254, 251, 248, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.header__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--color-accent);
  line-height: 32px;
}

.logo span {
  transform: translateY(2px);
}

.logo__img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
  align-self: center;
}

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

.nav a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color var(--duration) var(--ease-soft);
}

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

.cta-header {
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.6rem 1.25rem;
  background: var(--gradient-cta);
  color: white;
  border-radius: 50px;
  box-shadow: var(--shadow-soft);
  transition: transform var(--duration) var(--ease-soft), box-shadow var(--duration) var(--ease-soft);
}

.cta-header:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201, 168, 108, 0.35);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  padding: clamp(3rem, 8vw, 5rem) 1.5rem;
  overflow: hidden;
}

.hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  pointer-events: none;
}

.hero__glow--1 {
  width: 400px;
  height: 400px;
  background: var(--color-accent-soft);
  top: -100px;
  right: -100px;
}

.hero__glow--2 {
  width: 300px;
  height: 300px;
  background: var(--color-rose-soft);
  bottom: -50px;
  left: -50px;
}

.hero__inner {
  position: relative;
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero__content {
  max-width: 480px;
}

.hero__title {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text);
  margin-bottom: 1rem;
}

.hero__subtitle {
  font-size: clamp(1.0625rem, 1.3vw, 1.25rem);
  color: var(--color-text-muted);
  margin-bottom: 2rem;
  line-height: 1.5;
}

.hero__cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero__visual {
  position: relative;
}

.hero__frame {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-card), var(--shadow-glow);
  background: var(--color-bg-card);
}

.hero__frame::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  padding: 2px;
  background: linear-gradient(135deg, rgba(201, 168, 108, 0.3) 0%, rgba(232, 180, 184, 0.2) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.hero__img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 18px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.75rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  border-radius: 50px;
  transition: all var(--duration) var(--ease-soft);
  cursor: pointer;
}

.btn--primary {
  background: var(--gradient-cta);
  color: white;
  border: none;
  box-shadow: var(--shadow-soft);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(201, 168, 108, 0.4);
}

.btn--secondary {
  background: white;
  color: var(--color-text);
  border: 2px solid var(--color-border);
}

.btn--secondary:hover {
  border-color: var(--color-accent-light);
  background: var(--color-accent-soft);
}

.btn--large {
  padding: 1rem 2.5rem;
  font-size: 1.125rem;
}

/* ==========================================================================
   Section titles
   ========================================================================== */

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-section);
  font-weight: 700;
  color: var(--color-text);
  text-align: center;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  font-size: 1.0625rem;
  color: var(--color-text-muted);
  text-align: center;
  margin-bottom: 2rem;
}

/* ==========================================================================
   Examples — Before/After Slider
   ========================================================================== */

.counter-block {
  padding: 2rem 1.5rem;
  background: var(--color-bg);
  text-align: center;
}

.counter-block__inner {
  max-width: 600px;
  margin: 0 auto;
}

.counter-block__text {
  margin: 0;
  font-size: 1.5rem;
  color: var(--color-text);
}

.counter-block__num {
  color: var(--color-accent);
  font-weight: 700;
  font-size: 2rem;
}

.examples {
  padding: var(--section-padding) 1.5rem;
  background: var(--color-bg-soft);
}

.examples__inner {
  max-width: 1400px;
  margin: 0 auto;
}

.examples__sliders {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.slider-block {
  margin-top: 0;
}

.slider-block__title {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text);
}

.slider__container {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: var(--color-bg-card);
  box-shadow: var(--shadow-card);
}

.slider__image {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.slider__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slider__image--before {
  position: absolute;
  inset: 0;
  clip-path: inset(0 0 0 0);
  animation: slider-reveal 10s ease-in-out infinite;
}

.slider__image--after {
  width: 100%;
}

@keyframes slider-reveal {
  0% {
    clip-path: inset(0 100% 0 0);
  }
  35% {
    clip-path: inset(0 0 0 0);
  }
  50% {
    clip-path: inset(0 0 0 0);
  }
  65% {
    clip-path: inset(0 100% 0 0);
  }
  100% {
    clip-path: inset(0 100% 0 0);
  }
}

/* ==========================================================================
   Features
   ========================================================================== */

.features {
  padding: var(--section-padding) 1.5rem;
}

.features__inner {
  max-width: var(--container-max);
  margin: 0 auto;
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  padding: 1.75rem;
  background: var(--gradient-card);
  border-radius: 20px;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-soft);
  transition: transform var(--duration) var(--ease-soft), box-shadow var(--duration) var(--ease-soft);
}

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

.feature-card__icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.feature-card__title {
  font-family: var(--font-display);
  font-size: var(--text-card);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.feature-card__desc {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* ==========================================================================
   How it works
   ========================================================================== */

.how {
  padding: var(--section-padding) 1.5rem;
  background: var(--color-bg-soft);
}

.how__inner {
  max-width: var(--container-max);
  margin: 0 auto;
}

.how__steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.how__step {
  flex: 1;
  min-width: 180px;
  max-width: 280px;
  text-align: center;
  padding: 2rem 1.5rem;
  background: white;
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--color-border);
}

.how__number {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  background: var(--gradient-cta);
  color: white;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.how__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.how__desc {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.how__arrow {
  font-size: 1.5rem;
  color: var(--color-accent-light);
  align-self: center;
}

@media (max-width: 768px) {
  .how__arrow {
    transform: rotate(90deg);
    width: 100%;
    text-align: center;
  }
}

/* ==========================================================================
   Gallery
   ========================================================================== */

.gallery {
  padding: var(--section-padding) 1.5rem;
}

.gallery__inner {
  max-width: var(--container-max);
  margin: 0 auto;
}

.gallery__grid {
  column-count: 4;
  column-gap: 1rem;
}

.gallery__item {
  break-inside: avoid;
  margin-bottom: 1rem;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform var(--duration) var(--ease-soft);
}

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

.gallery__item[data-ratio="3:4"] {
  aspect-ratio: 3 / 4;
}

.gallery__item[data-ratio="4:3"] {
  aspect-ratio: 4 / 3;
}

.gallery__item[data-ratio="16:9"] {
  aspect-ratio: 16 / 9;
}

.gallery__item[data-ratio="1:1"] {
  aspect-ratio: 1 / 1;
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: var(--color-bg-soft);
}

@media (max-width: 900px) {
  .gallery__grid {
    column-count: 3;
  }
}

@media (max-width: 600px) {
  .gallery__grid {
    column-count: 2;
  }
}

/* ==========================================================================
   Final CTA
   ========================================================================== */

.final-cta {
  position: relative;
  padding: var(--section-padding) 1.5rem;
  text-align: center;
  overflow: hidden;
}

.final-cta__glow {
  position: absolute;
  inset: 0;
  background: var(--gradient-glow);
  pointer-events: none;
}

.final-cta__inner {
  position: relative;
  max-width: 500px;
  margin: 0 auto;
}

.final-cta__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.final-cta__subtitle {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  padding: 2rem 1.5rem;
  background: var(--color-bg-soft);
  border-top: 1px solid var(--color-border);
  margin-top: auto;
}

.footer__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  text-align: center;
}

.footer__logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-accent);
  display: block;
  margin-bottom: 0.25rem;
}

.footer__tagline {
  font-size: 0.875rem;
  color: var(--color-text-soft);
  margin-bottom: 1rem;
}

.footer__links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.footer__links a {
  font-size: 0.8125rem;
  color: var(--color-text-soft);
  transition: color var(--duration) var(--ease-soft);
}

.footer__links a:hover {
  color: var(--color-text-muted);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 900px) {
  .hero__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .hero__content {
    max-width: none;
  }
  
  .hero__cta {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .nav {
    display: none;
  }
  
  .hero {
    padding: 2rem 1rem 3rem;
  }
  
  .hero__cta {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
  }
  
  .how__steps {
    flex-direction: column;
    align-items: center;
  }
  
  .how__arrow {
    transform: rotate(90deg);
  }
}
