/* Landing page: hero collage, coverflow, steps, features, reveals. */

.site-header {
  transition: background 0.35s ease, box-shadow 0.35s ease;
}

.site-header.scrolled {
  background: rgba(17, 17, 17, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

/* ---------- Buttons ---------- */
.cta-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 15px 34px;
  border-radius: 999px;
  overflow: hidden;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 14px 30px rgba(210, 75, 58, 0.32);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  animation: ctaPulse 2.8s ease-out infinite;
}

.cta-btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-20deg);
  animation: ctaShine 3.6s ease-in-out infinite;
}

.cta-btn:hover {
  transform: translateY(-3px);
  background: var(--accent-dark);
  box-shadow: 0 18px 36px rgba(210, 75, 58, 0.4);
}

.cta-btn.light {
  color: var(--accent);
  background: #fff;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
  animation: none;
}

.cta-btn.light:hover {
  background: #fff6f4;
}

.cta-ghost {
  display: inline-flex;
  align-items: center;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 700;
  color: var(--ink);
  border: 1.5px solid rgba(43, 43, 43, 0.2);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(6px);
  transition: border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.cta-ghost:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-3px);
}

@keyframes ctaPulse {
  0% { box-shadow: 0 14px 30px rgba(210, 75, 58, 0.32), 0 0 0 0 rgba(210, 75, 58, 0.45); }
  70% { box-shadow: 0 14px 30px rgba(210, 75, 58, 0.32), 0 0 0 14px rgba(210, 75, 58, 0); }
  100% { box-shadow: 0 14px 30px rgba(210, 75, 58, 0.32), 0 0 0 0 rgba(210, 75, 58, 0); }
}

@keyframes ctaShine {
  0%, 55% { left: -60%; }
  100% { left: 130%; }
}

/* ---------- Hero ---------- */
.home-hero {
  position: relative;
  min-height: calc(100vh - 62px);
  min-height: calc(100svh - 62px);
  display: grid;
  align-items: center;
  overflow: hidden;
  background: #f6f1eb;
}

.hero-collage {
  position: absolute;
  inset: -10% -4%;
  display: grid;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  gap: 18px;
  transform: rotate(-6deg) scale(1.08);
  opacity: 0.5;
  filter: saturate(0.85);
}

.collage-col {
  overflow: hidden;
}

.collage-track {
  display: grid;
  gap: 18px;
  animation: driftUp var(--speed, 50s) linear infinite;
}

.collage-col.down .collage-track {
  animation-name: driftDown;
}

.template-preview.collage-card {
  height: 250px;
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(60, 40, 30, 0.14);
  overflow: hidden;
}

@keyframes driftUp {
  from { transform: translateY(0); }
  to { transform: translateY(calc(-50% - 9px)); }
}

@keyframes driftDown {
  from { transform: translateY(calc(-50% - 9px)); }
  to { transform: translateY(0); }
}

.hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(246, 241, 235, 0.97) 0%, rgba(246, 241, 235, 0.9) 38%, rgba(246, 241, 235, 0.45) 70%, rgba(246, 241, 235, 0.25) 100%),
    radial-gradient(circle at 75% 50%, rgba(210, 75, 58, 0.1), transparent 45%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 56px 24px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 32px;
}

.hero-copy {
  max-width: 560px;
}

.hero-brand {
  margin: 0 0 14px;
  font-family: "Playfair Display", serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
}

.hero-brand span {
  font-style: italic;
  color: var(--accent);
}

.home-hero .hero-title {
  margin: 0 0 18px;
  max-width: none;
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  font-weight: 800;
  line-height: 1.12;
  text-align: left;
}

.hero-lead {
  margin: 0 0 14px;
  font-size: 1.08rem;
  line-height: 1.6;
  color: #555;
}

.hero-tags {
  margin: 0 0 30px;
  font-size: 0.86rem;
  font-weight: 600;
  color: #8a8a8a;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.intro {
  opacity: 0;
  transform: translateY(24px);
  animation: introUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) var(--d, 0s) forwards;
}

@keyframes introUp {
  to { opacity: 1; transform: none; }
}

/* ---------- Phone mockups ---------- */
.hero-devices {
  position: relative;
  height: 560px;
}

.device {
  position: absolute;
  width: 250px;
  height: 510px;
  padding: 10px;
  border-radius: 40px;
  background: linear-gradient(145deg, #2a2a2a, #0d0d0d);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.08),
    0 30px 60px rgba(40, 25, 20, 0.28),
    0 8px 18px rgba(40, 25, 20, 0.18);
}

.device::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 50%;
  z-index: 3;
  width: 74px;
  height: 20px;
  border-radius: 999px;
  background: #0d0d0d;
  transform: translateX(-50%);
}

.device-screen {
  position: relative;
  height: 100%;
  border-radius: 31px;
  overflow: hidden;
  background: #f6f1eb;
}

.template-preview.phone-fill {
  position: absolute;
  inset: 0;
  height: auto;
}

.device-back {
  top: 0;
  left: 6%;
  --rot: -8deg;
}

.device-front {
  top: 50px;
  right: 4%;
  --rot: 7deg;
}

.intro-device {
  opacity: 0;
  transform: translateY(60px) rotate(var(--rot));
  animation:
    deviceIn 1.1s cubic-bezier(0.22, 1, 0.36, 1) var(--d, 0s) forwards,
    deviceFloat 6s ease-in-out calc(var(--d, 0s) + 1.1s) infinite;
}

.device-front.intro-device {
  animation-duration: 1.1s, 7s;
}

@keyframes deviceIn {
  to { opacity: 1; transform: translateY(0) rotate(var(--rot)); }
}

@keyframes deviceFloat {
  0%, 100% { opacity: 1; transform: translateY(0) rotate(var(--rot)); }
  50% { opacity: 1; transform: translateY(-16px) rotate(var(--rot)); }
}

/* ---------- Sections ---------- */
.home-section {
  position: relative;
  padding: 90px 20px;
  overflow: hidden;
}

.section-head {
  max-width: 760px;
  margin: 0 auto 44px;
  text-align: center;
}

.section-head h2 {
  margin: 0 0 10px;
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  font-weight: 800;
  line-height: 1.2;
}

.section-head em {
  font-family: "Playfair Display", "Noto Sans Armenian", serif;
  font-style: italic;
  color: var(--accent);
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.section-cta {
  margin-top: 40px;
  text-align: center;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(34px);
  transition:
    opacity 0.9s ease var(--d, 0s),
    transform 0.9s cubic-bezier(0.22, 1, 0.36, 1) var(--d, 0s);
}

[data-reveal].in {
  opacity: 1;
  transform: none;
}

/* ---------- Coverflow ---------- */
#templates {
  background: linear-gradient(180deg, #fff, #faf6f2);
}

.flow {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
}

.flow-stage {
  position: relative;
  height: 470px;
  perspective: 1400px;
  touch-action: pan-y;
  user-select: none;
}

.flow-card {
  position: absolute;
  top: 0;
  left: 50%;
  width: 260px;
  border-radius: 22px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 22px 48px rgba(60, 40, 30, 0.18);
  transform-style: preserve-3d;
  transition: transform 0.75s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.6s ease, box-shadow 0.4s ease;
  -webkit-user-drag: none;
}

.flow-card .template-preview {
  height: 380px;
  pointer-events: none;
}

.flow-card.is-active {
  box-shadow: 0 30px 70px rgba(210, 75, 58, 0.25);
}

.flow-meta {
  display: grid;
  gap: 2px;
  padding: 14px 16px 16px;
  text-align: center;
}

.flow-meta strong {
  font-size: 1rem;
}

.flow-meta span {
  font-size: 0.78rem;
  color: var(--muted);
}

.flow-arrow {
  position: absolute;
  top: 190px;
  z-index: 200;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s ease, color 0.2s ease;
}

.flow-arrow:hover {
  color: var(--accent);
  transform: scale(1.08);
}

.flow-arrow.prev { left: 0; }
.flow-arrow.next { right: 0; }

.flow-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 18px;
}

.flow-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #d9d0c8;
  transition: width 0.35s ease, background 0.35s ease;
}

.flow-dot.is-active {
  width: 28px;
  background: var(--accent);
}

/* ---------- How it works ---------- */
.how {
  background: #fff;
}

.how-grid {
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 40px;
}

.steps {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 64px;
}

.steps-line {
  position: absolute;
  top: 24px;
  bottom: 24px;
  left: 23px;
  width: 2px;
  background: #eee5df;
}

.steps-fill {
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
}

.step {
  position: relative;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 18px;
  align-items: start;
  opacity: 0.45;
  transform: translateX(-10px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.step.lit {
  opacity: 1;
  transform: none;
}

.step-icon {
  position: relative;
  z-index: 1;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #f3ebe6;
  color: var(--muted);
  transition: background 0.5s ease, color 0.5s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.step.lit .step-icon {
  background: var(--accent);
  color: #fff;
  transform: scale(1.08);
  box-shadow: 0 10px 22px rgba(210, 75, 58, 0.32);
}

.step-icon svg,
.feature-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.step small {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
}

.step h3 {
  margin: 2px 0 4px;
  font-size: 1.2rem;
}

.step p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.how-device {
  position: relative;
  height: 540px;
  display: grid;
  place-items: center;
}

.how-device .device {
  position: relative;
  z-index: 1;
}

.how-glow {
  position: absolute;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(210, 75, 58, 0.22), transparent 65%);
  animation: glowPulse 5s ease-in-out infinite;
}

.float-slow {
  animation: floatY 6s ease-in-out infinite;
}

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

@keyframes glowPulse {
  0%, 100% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.1); opacity: 1; }
}

.cycle-slide {
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 0.8s ease, transform 1.2s ease;
}

.cycle-slide.is-active {
  opacity: 1;
  transform: none;
}

/* ---------- Features ---------- */
.features {
  background: #faf6f2;
}

.feature-grid {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.feature {
  padding: 28px 24px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(60, 40, 30, 0.06);
  transition:
    opacity 0.9s ease var(--d, 0s),
    transform 0.9s cubic-bezier(0.22, 1, 0.36, 1) var(--d, 0s),
    box-shadow 0.3s ease;
}

.feature.in:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(60, 40, 30, 0.12);
  transition-delay: 0s;
}

.feature-icon {
  width: 52px;
  height: 52px;
  margin-bottom: 16px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: rgba(210, 75, 58, 0.1);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.feature:hover .feature-icon {
  transform: rotate(-8deg) scale(1.1);
}

.feature h3 {
  margin: 0 0 6px;
  font-size: 1.08rem;
}

.feature p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

/* ---------- Categories ---------- */
.cat-head {
  margin-top: 90px;
  padding: 0 20px;
}

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

.category-card {
  min-height: 480px;
  transition:
    opacity 0.9s ease var(--d, 0s),
    transform 0.9s cubic-bezier(0.22, 1, 0.36, 1) var(--d, 0s),
    box-shadow 0.3s ease;
}

.category-card .phone {
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.category-card:hover .tilt-left {
  transform: rotate(-10deg) translate(-8px, -6px);
}

.category-card:hover .tilt-right {
  transform: rotate(10deg) translate(8px, -6px);
}

/* ---------- CTA band ---------- */
.cta-band {
  padding: 20px 20px 70px;
}

.cta-band-inner {
  position: relative;
  max-width: 1060px;
  margin: 0 auto;
  padding: 60px 24px;
  border-radius: 32px;
  overflow: hidden;
  text-align: center;
  color: #fff;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.18), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(0, 0, 0, 0.18), transparent 45%),
    linear-gradient(135deg, #e0604e, #b63b2c);
  background-size: 160% 160%;
  animation: bandShift 12s ease-in-out infinite;
}

.cta-band h2 {
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 3.2vw, 2.2rem);
}

.cta-band p {
  margin: 0 0 26px;
  opacity: 0.9;
}

@keyframes bandShift {
  0%, 100% { background-position: 0% 0%; }
  50% { background-position: 100% 100%; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 40px;
  }

  .hero-copy {
    margin: 0 auto;
  }

  .home-hero .hero-title {
    text-align: center;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-veil {
    background: linear-gradient(180deg, rgba(246, 241, 235, 0.95) 0%, rgba(246, 241, 235, 0.86) 55%, rgba(246, 241, 235, 0.55) 100%);
  }

  .hero-devices {
    width: min(440px, 100%);
    height: 470px;
    margin: 0 auto;
  }

  .device {
    width: 200px;
    height: 410px;
    border-radius: 34px;
  }

  .device-screen {
    border-radius: 26px;
  }

  .how-grid,
  .categories {
    grid-template-columns: 1fr;
  }

  .how-device {
    height: 480px;
  }

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

@media (max-width: 600px) {
  .hero-collage {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
  }

  .hero-collage .collage-col:nth-child(n + 4) {
    display: none;
  }

  .template-preview.collage-card {
    height: 200px;
  }

  .hero-devices {
    height: 400px;
  }

  .device {
    width: 170px;
    height: 350px;
    padding: 8px;
  }

  .device-back { left: 2%; }
  .device-front { right: 2%; top: 40px; }

  .flow-stage {
    height: 430px;
  }

  .flow-card {
    width: 230px;
  }

  .flow-card .template-preview {
    height: 340px;
  }

  .flow-arrow {
    display: none;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .home-section {
    padding: 70px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .intro,
  .intro-device,
  [data-reveal] {
    opacity: 1;
    transform: none;
    animation: none;
    transition: none;
  }

  .intro-device {
    transform: rotate(var(--rot));
  }

  .collage-track,
  .float-slow,
  .how-glow,
  .cta-btn,
  .cta-btn::after,
  .cta-band-inner {
    animation: none;
  }
}
