/* ============================================
   LANDING PAGE STYLES — autokost homepage only
   ============================================ */

/* ============================================
   KEYFRAMES
============================================ */
@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes hero-text-in {
  from { opacity: 0; transform: translateY(50px) rotateX(-20deg); filter: blur(10px); }
  to   { opacity: 1; transform: translateY(0) rotateX(0); filter: blur(0); }
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(1.8); }
}
@keyframes cdrift-1 {
  0%   { left: -5%; }
  50%  { left: -3%; }
  100% { left: 0%; }
}
@keyframes cdrift-2 {
  0%   { top: -32%; left: -26%; }
  50%  { top: -30%; left: -29%; }
  100% { top: -33%; left: -25%; }
}
@keyframes cdrift-3 {
  0%   { top: -92%; left: 26%; }
  50%  { top: -90%; left: 29%; }
  100% { top: -93%; left: 25%; }
}
@keyframes cdrift-4 {
  0%   { top: -32%; right: -6%; }
  50%  { top: -30%; right: -9%; }
  100% { top: -33%; right: -5%; }
}
@keyframes cdrift-5 {
  0%   { right: 17%; }
  50%  { right: 22%; }
  100% { right: 19%; }
}
@keyframes cdrift-6 {
  0%   { right: -33%; }
  50%  { right: -30%; }
  100% { right: -31%; }
}

/* ============================================
   HERO
============================================ */
.hero {
  position: relative;
  min-height: 110vh;
  margin-top: -2px;
  padding-top: 2px;
  display: flex; align-items: flex-start; justify-content: center;
  background: var(--bg-0);
  overflow: hidden;
}
/* Fallback image always present behind everything */
.hero__fallback-bg {
  position: absolute; inset: 0;
  background-image: url('/assets/optimized/hero_image.webp');
  background-size: cover;
  background-position: 60% center;
  z-index: 0;
}
.hero__video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 60% center;
  z-index: 1;
}
/* Canvas sits on top of video when WebGL active */
.hero__canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 1;
}
/* Hide canvas when WebGL not active */
.hero__canvas.is-hidden { display: none; }
.hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(8,8,12,0.15) 0%,
    rgba(8,8,12,0.25) 50%,
    rgba(8,8,12,0.25) 70%,
    rgba(250,250,249,0.5) 90%,
    var(--bg-2) 100%
  );
  z-index: 2;
}
.hero__content {
  position: relative; z-index: 3;
  text-align: center; color: #fff;
  max-width: 700px; padding: 22vh 24px 0;
  perspective: 800px;
}
.hero__badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 500;
  color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 6px 16px; border-radius: 100px;
  opacity: 0; animation: fade-up 0.7s var(--spring) 0.1s forwards;
}
.hero__badge-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--blue);
  animation: pulse-dot 2s ease-in-out infinite;
}
.hero__h1 {
  font-size: clamp(36px, 5.5vw, 60px);
  font-weight: 800; line-height: 1.05;
  letter-spacing: -2.5px; color: #fff;
  margin-top: 24px;
}
.hero__h1-line {
  display: block; opacity: 0;
  transform: translateY(50px) rotateX(-20deg);
  transform-origin: center bottom;
  animation: hero-text-in 0.9s var(--spring) forwards;
}
.hero__h1-line:nth-child(1) { animation-delay: 0.2s; }
.hero__h1-line:nth-child(2) { animation-delay: 0.35s; }
.hero__desc {
  font-size: clamp(15px, 1.8vw, 18px);
  color: rgba(255,255,255,0.55);
  line-height: 1.65; margin-top: 20px;
  max-width: 520px; margin-left: auto; margin-right: auto;
  opacity: 0; animation: fade-up 0.7s ease 0.55s forwards;
}
.hero__buttons {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; margin-top: 36px; flex-wrap: wrap;
  opacity: 0; animation: fade-up 0.7s ease 0.7s forwards;
}
.hero__btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--blue); color: #fff;
  font-size: 15px; font-weight: 600;
  height: 52px; padding: 0 28px; border-radius: 100px;
  transition: transform 0.25s var(--spring), box-shadow 0.25s;
  box-shadow: 0 4px 20px rgba(26, 136, 248, 0.3);
}
.hero__btn-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 32px rgba(26, 136, 248, 0.4);
}
.hero__btn-primary svg { width: 18px; height: 18px; flex-shrink: 0; }
.hero__btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.8);
  font-size: 15px; font-weight: 500;
  height: 50px; padding: 0 28px; border-radius: 100px;
  transition: background 0.2s, border-color 0.2s, transform 0.2s var(--spring);
}
.hero__btn-ghost:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.18);
  transform: scale(1.04);
}

/* ============================================
   CLOUD DIVIDER — gt-flaire technique
   1px wrapper, overflow-y visible, clouds translateY upward
============================================ */
.cloud-divider {
  position: relative;
  height: 1px;
  overflow-x: clip;
  overflow-y: visible;
  z-index: 20;
  pointer-events: none;
}
.cloud-divider::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  top: -79px;
  height: 80px;
  background: linear-gradient(to bottom, transparent, var(--bg-2));
  width: 100%;
  pointer-events: none;
}
.cloud-divider img {
  position: absolute;
  pointer-events: none;
  z-index: 30;
}
/* 6 clouds — exact gt-flaire measurements */
/* Clouds 1-3: visible on all viewports */
.cloud-c1 {
  width: 65%;
  transform: translateY(-300px) translateZ(0);
  animation: cdrift-2 22s ease-in-out infinite alternate;
}
.cloud-c2 {
  width: 55%;
  transform: translateY(-300px) translateZ(0);
  animation: cdrift-3 17s ease-in-out infinite alternate;
}
.cloud-c3 {
  width: 45%;
  transform: translateY(-300px) translateZ(0);
  animation: cdrift-4 29s ease-in-out infinite alternate;
}
/* Clouds 4-6: desktop only */
.cloud-c4 {
  width: 45%;
  transform: translateY(-300px) translateZ(0);
  animation: cdrift-5 13s ease-in-out infinite alternate;
}
.cloud-c5 {
  width: 75%;
  transform: translateY(-300px) translateZ(0);
  animation: cdrift-6 41s ease-in-out infinite alternate;
}
.cloud-c6 {
  width: 55%;
  transform: translateY(-300px) translateZ(0);
  animation: cdrift-1 30s ease-in-out infinite alternate;
}

/* ============================================
   LOGO MARQUEE
============================================ */
.marquee-wrap {
  position: relative;
  z-index: 30;
  padding: 24px 0 0;
  margin-bottom: 260px;
}
.marquee-label {
  text-align: center;
  font-size: 11px; font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--fg-3);
  margin-bottom: 16px;
}
.marquee {
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}
.marquee__track {
  display: flex;
  gap: 48px;
  animation: marquee 40s linear infinite;
  width: max-content;
}
.marquee__track:hover { animation-play-state: paused; }
.marquee__inner {
  display: flex;
  align-items: center;
  gap: 48px;
  flex-shrink: 0;
}
.marquee__logo {
  height: 52px;
  opacity: 0.35;
  filter: grayscale(100%);
  transition: opacity 0.3s;
}
.marquee__logo:hover { opacity: 0.7; }
.marquee__logo-text {
  font-family: 'DM Sans', sans-serif;
  font-size: 16px; font-weight: 700;
  color: var(--fg-1); opacity: 0.2;
  white-space: nowrap;
  letter-spacing: -0.3px;
}

/* ============================================
   FEATURES — Numbered (wrangle.ai inspired)
============================================ */
.features {
  background: linear-gradient(180deg,
    var(--bg-2) 0%,
    #e9f0ff 18%,
    #dbeafe 30%,
    #d4f0e4 48%,
    #ecfdf5 60%,
    #e8e0f7 78%,
    #f3f0ff 92%,
    #fafaf9 100%
  );
  padding: 80px 0 0;
  position: relative;
}
.feature {
  max-width: 1080px;
  margin: 0 auto;
  padding: 72px 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.feature--reversed .feature__text { order: 2; }
.feature--reversed .feature__visual { order: 1; }

.feature__number {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(64px, 8vw, 96px);
  font-weight: 800;
  letter-spacing: -4px;
  line-height: 1;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--fg-1) 0%, rgba(0,0,0,0.12) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.feature__label {
  font-size: 12px; font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 10px;
}
.feature__label--blue { color: var(--blue); }
.feature__label--green { color: var(--green); }
.feature__label--purple { color: var(--purple); }

.feature__h2 {
  font-size: clamp(28px, 3.5vw, 38px);
  font-weight: 700; line-height: 1.15;
  letter-spacing: -1px;
}
.feature__desc {
  font-size: 16px; color: var(--fg-2);
  line-height: 1.6; margin-top: 14px;
}
.feature__pills {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 20px;
}
.feature__pill {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 14px; border-radius: 100px;
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(0,0,0,0.06);
  backdrop-filter: blur(8px);
}
.feature__pill-icon {
  height: 18px; width: auto;
  display: block;
}
.feature__checks {
  margin-top: 20px;
  display: flex; flex-direction: column; gap: 10px;
}
.feature__check {
  display: flex; align-items: center; gap: 10px;
  font-size: 15px; color: var(--fg-1); font-weight: 500;
}
.feature__check-icon {
  width: 20px; height: 20px; flex-shrink: 0;
  border-radius: 50%; display: flex;
  align-items: center; justify-content: center;
}
.feature__check-icon svg { width: 12px; height: 12px; }

.feature__visual {
  display: flex; align-items: center; justify-content: center;
}
.feature__img {
  width: 100%;
  max-width: 420px;
  animation: float-gentle 6s ease-in-out infinite;
  filter: drop-shadow(0 24px 48px rgba(0,0,0,0.12));
}

/* ============================================
   FAQ — wrangle.ai inspired
============================================ */
.faq-section {
  background: var(--bg-2);
  padding: 120px 0;
}
.faq__wrapper {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 48px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.faq__header {
  text-align: left;
}
.faq__header h2 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--fg-1);
}
.faq__header p {
  font-size: 14px; color: var(--fg-3);
  margin-top: 12px; line-height: 1.5;
}
.faq__container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.faq__item {
  border-bottom: 1px solid rgba(0,0,0,0.1);
}
.faq__question {
  width: 100%;
  display: flex; align-items: center;
  justify-content: space-between; gap: 16px;
  padding: 0 0 16px;
  text-align: left;
}
.faq__question-text {
  font-family: 'Inter', sans-serif;
  font-size: 18px; font-weight: 500;
  color: var(--fg-1); line-height: 1.4;
  letter-spacing: -0.01em;
  flex: 1;
}
.faq__icon {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.35s var(--spring);
}
.faq__icon svg {
  width: 16px; height: 16px;
  color: var(--fg-2);
}
.faq__item.is-open .faq__icon {
  transform: rotate(45deg);
}
.faq__answer {
  max-height: 0; overflow: hidden;
  transition: max-height 0.4s var(--spring);
}
.faq__answer-inner {
  font-size: 14px; color: var(--fg-2);
  padding-bottom: 16px; line-height: 1.6;
  letter-spacing: -0.01em;
}

/* ============================================
   CTA — wrangle.ai two-column layout
============================================ */
.cta-section {
  background: var(--bg-2);
  padding: 80px 0 120px;
}
.cta__row {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 48px;
  display: flex;
  gap: 80px;
  align-items: flex-start;
}
.cta__left {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}
.cta__h2 {
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 500; line-height: 1;
  letter-spacing: -0.04em; color: var(--fg-1);
}
.cta__desc {
  font-size: 14px; color: var(--fg-3);
  line-height: 1.6;
}
.cta__buttons {
  display: flex; align-items: center;
  gap: 16px; margin-top: 8px;
}
.cta__btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--blue); color: #fff;
  font-size: 15px; font-weight: 600;
  height: 52px; padding: 0 28px; border-radius: 100px;
  transition: transform 0.25s var(--spring), box-shadow 0.25s;
  box-shadow: 0 4px 20px rgba(26, 136, 248, 0.3);
}
.cta__btn:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 32px rgba(26, 136, 248, 0.4);
}
.cta__btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.cta__btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 500;
  color: var(--fg-3);
  letter-spacing: -0.02em;
  height: 40px; padding: 0 4px;
  transition: color 0.2s, gap 0.2s var(--spring);
}
.cta__btn-secondary:hover { color: var(--fg-1); gap: 10px; }
.cta__btn-secondary svg { width: 14px; height: 14px; }
.cta__right {
  width: 45%;
  display: flex;
  gap: 40px;
  align-items: stretch;
}
.cta__feature-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}
.cta__feature-icon {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  color: var(--fg-3);
}
.cta__feature-icon svg { width: 24px; height: 24px; }
.cta__feature-title {
  font-size: 14px; font-weight: 500;
  color: var(--fg-1); letter-spacing: -0.02em;
  line-height: 1.3;
}
.cta__feature-desc {
  font-size: 14px; color: var(--fg-3);
  line-height: 1.6;
}
.cta__divider {
  width: 1px;
  align-self: stretch;
  border-left: 1px dashed rgba(0,0,0,0.16);
}

/* ============================================
   CHAT SHOWCASE — WhatsApp bot demo
============================================ */
.chat-showcase {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 48px 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.chat-showcase__text {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.chat-showcase__label {
  font-size: 12px; font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--wa);
}
.chat-showcase__h2 {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 700; line-height: 1.1;
  letter-spacing: -1.5px;
}
.chat-showcase__desc {
  font-size: 16px; color: var(--fg-2);
  line-height: 1.6;
}
.chat-showcase__visual {
  display: flex;
  justify-content: center;
}
.phone-frame {
  width: 320px;
  background: #111;
  border-radius: 36px;
  padding: 12px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.18), 0 0 0 1px rgba(255,255,255,0.06);
  animation: float-gentle 6s ease-in-out infinite;
}
.phone-frame__screen {
  background: #e5ddd5;
  border-radius: 26px;
  overflow: hidden;
}
.phone-frame__header {
  background: #075e54;
  padding: 14px 16px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.phone-frame__avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--green));
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: #fff;
}
.phone-frame__name {
  font-size: 14px; font-weight: 600;
  color: #fff; line-height: 1.2;
}
.phone-frame__status {
  font-size: 11px; color: rgba(255,255,255,0.6);
}
.phone-frame__chat {
  padding: 12px 10px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.chat-bubble {
  max-width: 85%;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.45;
  position: relative;
}
.chat-bubble--user {
  align-self: flex-end;
  background: #dcf8c6;
  color: #111;
  border-bottom-right-radius: 2px;
}
.chat-bubble--bot {
  align-self: flex-start;
  background: #fff;
  color: #111;
  border-bottom-left-radius: 2px;
}
.chat-bubble__time {
  font-size: 10px;
  color: rgba(0,0,0,0.35);
  text-align: right;
  margin-top: 2px;
}
.chat-bubble__list {
  margin: 4px 0 2px;
  padding-left: 4px;
  font-size: 12.5px;
  line-height: 1.5;
}
.chat-bubble__check {
  color: var(--wa);
  font-size: 11px;
  margin-left: 4px;
}

/* ============================================
   RESPONSIVE — Landing-specific rules
============================================ */

/* Tablet — disable WebGL canvas (prevents video stretch on iPad) */
@media (max-width: 1024px) {
  .hero__canvas { display: none !important; }
  .hero__video { opacity: 1 !important; }
}

@media (max-width: 768px) {
  .hero__h1 { letter-spacing: -1.5px; }
  .hero__buttons { flex-direction: column; width: 100%; }
  .hero__btn-primary, .hero__btn-ghost { width: 100%; justify-content: center; }
  .hero { min-height: 100vh; }
  .hero__content { padding: 18vh 24px 0; }

  .cloud-c1 { animation: none; transform: translateY(-180px) translateZ(0); width: 110%; left: -5%; }
  .cloud-c2 { animation: none; transform: translateY(-150px) translateZ(0); width: 100%; }
  .cloud-c3, .cloud-c4, .cloud-c5, .cloud-c6 { display: none; }
  .features { padding: 40px 0 0; }
  .marquee-wrap { margin-bottom: 160px; }
  .features__cloud { display: none; }

  .chat-showcase { grid-template-columns: 1fr; gap: 32px; padding: 0 24px 60px; text-align: center; }
  .chat-showcase__text { order: 1; }
  .chat-showcase__visual { order: 2; }
  .phone-frame { width: 280px; }

  .feature { grid-template-columns: 1fr; gap: 24px; padding: 48px 24px; }
  .feature--reversed .feature__text { order: 1; }
  .feature--reversed .feature__visual { order: 2; }
  .feature__number { font-size: 56px; letter-spacing: -3px; }
  .feature__img { max-width: 280px; }

  .faq-section { padding: 60px 0; }
  .faq__wrapper { padding: 0 24px; }
  .faq__question-text { font-size: 16px; }
  .faq__answer-inner { padding-bottom: 12px; }
  .faq__question { padding: 0 0 12px; }

  .cta-section { padding: 60px 0; }
  .cta__row { flex-direction: column; gap: 48px; padding: 0 24px; }
  .cta__right { width: 100%; }
  .cta__h2 { letter-spacing: -0.02em; }
}

@media (max-width: 480px) {
  .hero { min-height: 100svh; }
  .hero__content { padding: 16vh 20px 0; }
  .features { padding: 20px 0 0; }
  .feature { padding: 36px 20px; }
  .feature__number { font-size: 48px; }
  .cta__right { flex-direction: column; gap: 32px; }
  .cta__divider { width: 100%; height: 1px; border-left: none; border-top: 1px dashed rgba(0,0,0,0.16); align-self: auto; }
  .cta__buttons { flex-direction: column; align-items: flex-start; }
}
