/* ===== HappyGo — Compact & Modern ===== */

:root {
  --red: #E42828;
  --red-dark: #C41E1E;
  --orange: #F7941D;
  --orange-deep: #E8780C;
  --yellow: #FFD166;
  --bg: #FFFFFF;
  --bg-soft: #F8FAFC;
  --bg-warm: #FFF7F0;
  --text: #0F172A;
  --text-muted: #64748B;
  --border: #E2E8F0;
  --gradient: linear-gradient(135deg, var(--red), var(--orange));
  --gradient-anim: linear-gradient(-45deg, #E42828, #F7941D, #FF6B35, #E42828);
  --shadow-sm: 0 2px 8px rgba(15,23,42,0.06);
  --shadow-md: 0 12px 40px rgba(15,23,42,0.1);
  --shadow-lg: 0 24px 60px rgba(228,40,40,0.15);
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --container: 1080px;
  --header-h: 72px;
  --font: 'Plus Jakarta Sans', system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }

/* ===== Animated background orbs ===== */

.bg-orbs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  animation: orbFloat 18s ease-in-out infinite;
}

.orb--1 {
  width: 400px; height: 400px;
  background: rgba(247,148,29,0.4);
  top: -100px; right: -100px;
}

.orb--2 {
  width: 300px; height: 300px;
  background: rgba(228,40,40,0.25);
  bottom: 20%; left: -80px;
  animation-delay: -6s;
}

.orb--3 {
  width: 250px; height: 250px;
  background: rgba(255,107,53,0.2);
  top: 50%; right: 10%;
  animation-delay: -12s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -40px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

main, .header, .footer, .mobile-cta { position: relative; z-index: 1; }

/* ===== Header ===== */

.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: var(--header-h);
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: all 0.4s var(--ease);
}

.header--scrolled {
  background: rgba(255,255,255,0.95);
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.header__inner { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.header__logo { height: 40px; width: auto; }
.header__nav { display: none; align-items: center; gap: 28px; }
.header__nav a:not(.btn) { font-size: 14px; font-weight: 600; color: var(--text-muted); text-decoration: none; transition: color 0.2s; }
.header__nav a:not(.btn):hover { color: var(--red); }

.header__menu-btn {
  display: flex; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 8px;
}
.header__menu-btn span { display: block; width: 22px; height: 2.5px; background: var(--red); border-radius: 2px; transition: all 0.3s var(--ease); }
.header__menu-btn.is-open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.header__menu-btn.is-open span:nth-child(2) { opacity: 0; }
.header__menu-btn.is-open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

@media (min-width: 860px) {
  .header__nav { display: flex; }
  .header__menu-btn { display: none; }
}

.header__nav.is-open {
  display: flex; flex-direction: column; position: fixed;
  top: var(--header-h); left: 0; right: 0; bottom: 0;
  background: var(--bg); padding: 32px 24px; gap: 16px;
}

/* ===== Buttons ===== */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius-pill);
  font-family: var(--font); font-size: 14px; font-weight: 700;
  text-decoration: none; border: none; cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.3s var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn--sm { padding: 10px 18px; font-size: 13px; }
.btn--lg { padding: 15px 28px; font-size: 15px; }

.btn--primary {
  background: var(--gradient);
  background-size: 200% 200%;
  color: #fff;
  box-shadow: 0 8px 24px rgba(228,40,40,0.3);
  animation: gradientShift 4s ease infinite;
}
.btn--primary:hover { box-shadow: 0 12px 32px rgba(247,148,29,0.4); transform: translateY(-2px); }

.btn--ghost {
  background: rgba(255,255,255,0.8);
  color: var(--text);
  border: 1.5px solid var(--border);
  backdrop-filter: blur(8px);
}
.btn--ghost:hover { border-color: var(--orange); background: #fff; }

.btn--white { background: #fff; color: var(--red); box-shadow: var(--shadow-md); }
.btn--white:hover { transform: translateY(-2px); }

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ===== Hero ===== */

.hero {
  padding: calc(var(--header-h) + 28px) 0 40px;
}

.hero__grid {
  display: grid; grid-template-columns: 1fr; gap: 28px; align-items: center;
}

@media (min-width: 900px) {
  .hero__grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 40px;
    align-items: stretch;
  }
}

.hero__visual {
  width: 100%;
  display: flex;
}

@media (min-width: 900px) {
  .hero__visual { align-self: stretch; }
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 14px 5px 8px;
  background: rgba(255,255,255,0.9); border: 1px solid var(--border);
  border-radius: var(--radius-pill); font-size: 11px; font-weight: 700;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 20px;
}
.eyebrow__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gradient); animation: pulse 2s ease infinite; }

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

.hero h1 {
  font-size: clamp(30px, 5vw, 46px);
  font-weight: 800; line-height: 1.08; letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.hero__lead {
  font-size: 16px; color: var(--text-muted); line-height: 1.7;
  margin-bottom: 28px; max-width: 480px;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }

.hero__metrics {
  display: flex; gap: 24px; flex-wrap: wrap;
  padding-top: 20px; border-top: 1px solid var(--border);
}
.hero__metrics div { display: flex; flex-direction: column; gap: 2px; }
.hero__metrics strong { font-size: 13px; font-weight: 800; }
.hero__metrics span { font-size: 11px; color: var(--text-muted); }

.hero__image-frame {
  position: relative;
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
}

.hero__image {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  object-fit: cover;
  object-position: center 35%;
  display: block;
  height: auto;
  max-height: 240px;
  aspect-ratio: 16 / 9;
  animation: heroImgFloat 5s ease-in-out infinite;
}

@media (min-width: 900px) {
  .hero__image-frame {
    flex: 1;
    max-width: none;
    margin: 0;
    height: 100%;
    min-height: 100%;
  }

  .hero__image {
    width: 100%;
    height: 100%;
    min-height: 100%;
    max-height: none;
    aspect-ratio: unset;
    object-position: center 32%;
    animation: none;
  }
}

@keyframes heroImgFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.hero__float {
  position: absolute; padding: 10px 14px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255,255,255,0.9);
  animation: heroFloatIn 0.8s var(--ease) both;
}
.hero__float strong { display: block; font-size: 11px; font-weight: 800; }
.hero__float span { font-size: 10px; color: var(--text-muted); }
.hero__float--top { top: 8%; right: 8px; animation-delay: 0.4s; }
.hero__float--bottom { bottom: 8%; left: 8px; animation-delay: 0.6s; }

@keyframes heroFloatIn {
  from { opacity: 0; transform: translateY(12px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ===== Page load animations ===== */

.anim-up {
  opacity: 0;
  animation: animUp 0.8s var(--ease) forwards;
  animation-delay: var(--d, 0s);
}

@keyframes animUp {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Sections ===== */

.section { padding: 56px 0; }
.section--soft { background: var(--bg-soft); }
.section--dark {
  background: linear-gradient(135deg, var(--red-dark), #8B1A1A);
  color: #fff; padding: 48px 0;
}
.section--cta { padding: 56px 0 48px; }

.section-tag {
  display: inline-block; font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--orange-deep); margin-bottom: 10px;
}

.section-intro { text-align: center; max-width: 560px; margin: 0 auto 32px; }
.section-intro h2 {
  font-size: clamp(26px, 4vw, 36px); font-weight: 800;
  letter-spacing: -0.03em; margin-bottom: 8px;
}
.section-intro p { color: var(--text-muted); font-size: 15px; }

.text-gradient {
  background: var(--gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== About ===== */

.about-grid {
  display: grid; gap: 32px; align-items: center;
}

@media (min-width: 768px) {
  .about-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}

.about-text h2 { font-size: 28px; font-weight: 800; margin-bottom: 12px; letter-spacing: -0.02em; }
.about-text p { font-size: 15px; color: var(--text-muted); margin-bottom: 10px; }
.about-text__accent { color: var(--red-dark) !important; font-weight: 700; }

.win-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}

.win-pill {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.win-pill:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.win-pill span { font-size: 22px; }
.win-pill strong { display: block; font-size: 13px; font-weight: 800; }
.win-pill small { font-size: 11px; color: var(--text-muted); }
.win-pill--brand {
  background: var(--gradient);
  border: none; color: #fff;
}
.win-pill--brand small { color: rgba(255,255,255,0.85); }

/* ===== Benefits row ===== */

.benefit-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 32px;
}

@media (min-width: 640px) {
  .benefit-row { grid-template-columns: repeat(5, 1fr); }
}

.benefit-mini {
  padding: 18px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-align: center;
  transition: all 0.35s var(--ease);
  cursor: default;
}
.benefit-mini svg { color: var(--orange-deep); margin-bottom: 8px; }
.benefit-mini h3 { font-size: 13px; font-weight: 800; margin-bottom: 2px; }
.benefit-mini p { font-size: 11px; color: var(--text-muted); }

.benefit-mini:hover {
  transform: translateY(-4px);
  border-color: var(--orange);
  box-shadow: var(--shadow-md);
  background: linear-gradient(180deg, #fff, var(--bg-warm));
}

/* ===== Marquee ===== */

.marquee-wrap {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  padding: 4px 0;
}

.marquee__track {
  display: flex; width: max-content;
  animation: marquee 30s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }

.marquee__group { display: flex; gap: 10px; padding-right: 10px; }

.marquee__chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 18px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 13px; font-weight: 700;
  white-space: nowrap;
  transition: transform 0.2s, border-color 0.2s;
}
.marquee__chip:hover { transform: scale(1.04); border-color: var(--orange); }

@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ===== Tabs ===== */

.tabs {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-bottom: 40px;
}

.tabs__nav {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
}

.tabs__btn {
  flex: 1; padding: 14px 12px;
  background: none; border: none;
  font-family: var(--font); font-size: 13px; font-weight: 700;
  color: var(--text-muted); cursor: pointer;
  position: relative;
  transition: color 0.3s var(--ease);
}

.tabs__btn::after {
  content: '';
  position: absolute; bottom: 0; left: 20%; right: 20%;
  height: 3px; background: var(--gradient);
  border-radius: 3px 3px 0 0;
  transform: scaleX(0);
  transition: transform 0.35s var(--ease);
}

.tabs__btn.is-active { color: var(--red-dark); }
.tabs__btn.is-active::after { transform: scaleX(1); }
.tabs__btn:hover { color: var(--text); }

.tabs__panels { padding: 28px 24px; min-height: 180px; }

.tabs__panel {
  display: none;
  animation: tabIn 0.45s var(--ease);
}
.tabs__panel.is-active { display: block; }

@keyframes tabIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.tabs__panel h3 { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.tabs__panel p { font-size: 14px; color: var(--text-muted); margin-bottom: 16px; line-height: 1.65; }
.tabs__panel p strong { color: var(--text); }

.tabs__link {
  display: inline-block; margin-top: 8px;
  font-size: 14px; font-weight: 700; color: var(--red);
  text-decoration: none;
  transition: transform 0.2s;
}
.tabs__link:hover { transform: translateX(4px); }

.tag-cloud {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.tag-cloud span {
  padding: 6px 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 600;
  transition: all 0.25s var(--ease);
}
.tag-cloud span:hover {
  background: var(--bg-warm);
  border-color: var(--orange);
  transform: translateY(-2px);
}

/* ===== Flow (horizontal steps) ===== */

.flow { margin-bottom: 32px; }
.flow__title { font-size: 16px; font-weight: 800; margin-bottom: 16px; text-align: center; }

.flow__track {
  display: flex; gap: 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.flow__track::-webkit-scrollbar { display: none; }

.flow__step {
  flex: 0 0 auto;
  scroll-snap-align: start;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  min-width: 100px;
  position: relative;
  padding: 0 8px;
}

.flow__step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 18px; left: calc(50% + 22px);
  width: calc(100% - 44px); height: 2px;
  background: linear-gradient(90deg, var(--orange), var(--red));
  opacity: 0.3;
}

.flow__step span {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: var(--gradient);
  color: #fff; font-weight: 800; font-size: 14px;
  border-radius: 50%;
  margin-bottom: 8px;
  box-shadow: 0 4px 12px rgba(228,40,40,0.25);
  transition: transform 0.3s var(--ease);
}

.flow__step:hover span { transform: scale(1.1); }

.flow__step p { font-size: 11px; font-weight: 700; color: var(--text-muted); line-height: 1.3; }

@media (min-width: 768px) {
  .flow__track { justify-content: space-between; overflow: visible; }
  .flow__step { flex: 1; min-width: 0; }
}

/* ===== Why pills ===== */

.why-row {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
}
.why-row span {
  padding: 8px 16px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 700;
  transition: all 0.3s var(--ease);
}
.why-row span:hover {
  background: var(--gradient);
  color: #fff; border-color: transparent;
  transform: translateY(-2px);
}

/* ===== Purpose ===== */

.purpose-block { text-align: center; max-width: 640px; margin: 0 auto; }
.purpose-block__chain {
  font-size: 16px; line-height: 1.7; opacity: 0.95; margin-bottom: 12px;
}
.purpose-block__close { font-size: 18px; }
.purpose-block__close strong { color: var(--yellow); }

/* ===== CTA Split ===== */

.cta-split {
  display: grid; gap: 16px;
}

@media (min-width: 640px) {
  .cta-split { grid-template-columns: 1fr 1fr; }
}

.cta-box {
  padding: 32px 28px;
  border-radius: var(--radius-lg);
  text-align: center;
  transition: transform 0.35s var(--ease);
}
.cta-box:hover { transform: translateY(-4px); }

.cta-box--download {
  background: var(--bg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}
.cta-box--download img { margin-bottom: 12px; height: 44px; width: auto; }
.cta-box--download h2 { font-size: 24px; font-weight: 800; margin-bottom: 6px; }
.cta-box--download p { font-size: 14px; color: var(--text-muted); margin-bottom: 20px; }

.cta-box--partner {
  background: var(--gradient);
  background-size: 200% 200%;
  animation: gradientShift 5s ease infinite;
  color: #fff;
  box-shadow: var(--shadow-lg);
}
.cta-box--partner h2 { font-size: 24px; font-weight: 800; margin-bottom: 6px; }
.cta-box--partner p { font-size: 14px; opacity: 0.95; margin-bottom: 20px; }

.store-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.store-btn {
  padding: 10px 20px;
  background: var(--text); color: #fff;
  border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s;
}
.store-btn--play { background: var(--gradient); }
.store-btn:hover { transform: scale(1.05); }

.cta-tagline {
  text-align: center; margin-top: 24px;
  font-size: 15px; font-weight: 700; color: var(--red);
}

/* ===== Footer ===== */

.footer {
  background: var(--text);
  color: rgba(255,255,255,0.7);
  padding: 32px 0;
}

.footer__inner {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 16px;
}
.footer__inner img { height: 36px; width: auto; filter: brightness(1.1); }
.footer__inner p { font-size: 13px; }
.footer__links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer__links a { color: rgba(255,255,255,0.65); text-decoration: none; font-size: 13px; font-weight: 600; transition: color 0.2s; }
.footer__links a:hover { color: #fff; }

/* ===== Mobile CTA ===== */

.mobile-cta {
  display: flex; gap: 10px;
  position: fixed; bottom: 0; left: 0; right: 0;
  padding: 12px 16px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  z-index: 150;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.06);
  transition: opacity 0.3s, transform 0.3s var(--ease);
}
.mobile-cta .btn { flex: 1; }

@media (min-width: 860px) { .mobile-cta { display: none; } }
@media (max-width: 859px) { body { padding-bottom: 68px; } }

/* ===== Scroll reveal ===== */

.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

.reveal:nth-child(2) { transition-delay: 0.08s; }
.reveal:nth-child(3) { transition-delay: 0.16s; }

/* ===== Reduced motion ===== */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  .anim-up, .reveal { opacity: 1; transform: none; }
  .marquee__track { animation: none; flex-wrap: wrap; justify-content: center; width: 100%; }
  .marquee__group:last-child { display: none; }
  .orb { display: none; }
}
