/* Homepage sections: hero, ribbons, work rows, reviews, CTA, footer */

/* ---------- Hero ---------- */
/* Desktop: text + buttons on the left, screenshots on the right.
   Mobile: text → screenshots → buttons → stats (see media queries). */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  grid-template-areas: "text media" "cta media";
  grid-template-rows: auto 1fr;
  gap: 0 36px;
  min-height: 600px;
  padding: 52px 48px 130px;
  overflow: hidden;
}
.hero-text { grid-area: text; }
.hero-media { grid-area: media; }
.hero-cta { grid-area: cta; }
.hero h1 { margin: 18px 0; font-size: clamp(2.4rem, 4.4vw, 3.8rem); line-height: 1.06; }
.hero h1 em { font-style: normal; background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { max-width: 520px; margin: 0; font-size: 1.08rem; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0 38px; }

.stats { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 18px 44px; margin: 0; }
.stats dt { font: 600 0.7rem "Space Grotesk", sans-serif; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.stats dd { margin: 4px 0 0; font-size: 1.7rem; font-weight: 600; white-space: nowrap; }
.stats dt { white-space: nowrap; }

/* 3 x 2 grid of real ad frames; columns drift up/down slightly */
.hero-media { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-content: center; }
.hero-tile {
  position: relative;
  aspect-ratio: 9 / 14;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid var(--line);
  box-shadow: 0 24px 50px -24px rgba(0, 0, 0, 0.9);
  animation: drift 9s ease-in-out infinite;
}
/* Middle column sits a little lower; columns drift out of sync (classes set in main.js) */
.hero-tile.col-2 { animation-delay: -3s; transform: translateY(26px); }
.hero-tile.col-3 { animation-delay: -6s; }
.hero-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--spring); }
.hero-tile:hover img { transform: scale(1.06); }
.hero-tile .tag {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(4, 7, 11, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
}
@keyframes drift { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }

/* Floating info badges over the grid */
.badge {
  position: absolute;
  z-index: 3;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 0.86rem;
  line-height: 1.35;
  animation: float 7s ease-in-out infinite;
}
.badge strong { font-size: 1rem; }
.badge-top { top: -6px; right: -10px; }
.badge-bottom { bottom: 6%; left: -34px; animation-delay: -3.5s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* Diagonal scrolling ribbons across the bottom of the hero */
.ribbons { position: absolute; left: -5%; right: -5%; bottom: 28px; height: 120px; pointer-events: none; z-index: 2; }
.ribbon { position: absolute; left: 0; right: 0; overflow: hidden; white-space: nowrap; padding: 10px 0; font: 700 0.9rem "Space Grotesk", sans-serif; letter-spacing: 0.22em; text-transform: uppercase; }
.ribbon-a { top: 34px; transform: rotate(-4deg); background: var(--accent-grad); color: #02121b; box-shadow: 0 10px 40px -10px rgba(41, 182, 236, 0.7); }
.ribbon-b { top: 30px; transform: rotate(3deg); background: rgba(255, 255, 255, 0.06); color: var(--muted); backdrop-filter: blur(8px); border-block: 1px solid var(--line); }
/* The track holds the words twice; moving it by exactly half makes a seamless loop */
.ribbon-track { display: flex; width: max-content; animation: marquee-x 38s linear infinite; }
.ribbon-b .ribbon-track { animation-direction: reverse; }
.ribbon-track span { padding: 0 1.1rem; }
.ribbon-track span::after { content: "•"; margin-left: 2.2rem; opacity: 0.6; }

/* ---------- Category chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.3s, background 0.3s, transform 0.4s var(--spring), box-shadow 0.3s;
}
.chip:hover { color: var(--text); transform: translateY(-2px); }
.chip[aria-pressed="true"] { color: #02121b; background: var(--accent-grad); border-color: transparent; box-shadow: 0 8px 22px -8px rgba(41, 182, 236, 0.7); }
.chips.sub .chip { height: 32px; font-size: 0.8rem; }
.chips.tabs.dimmed { opacity: 0.45; }
/* Small notice at the bottom ("Link copied") */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 90;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 600;
  translate: -50% 140%;
  opacity: 0;
  transition: translate 0.5s var(--spring), opacity 0.3s;
}
.toast.show { translate: -50% 0; opacity: 1; }

.empty { color: var(--muted); text-align: center; }
.empty a { color: var(--blue-bright); }

/* ---------- Work rows ---------- */
.work-row + .work-row { margin-top: 34px; }
.row-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-bottom: 16px; }
.row-head h3 { font-size: 1.25rem; }
.row-head .count { color: var(--muted); font-size: 0.85rem; }
.row-head .more { margin-left: auto; font-weight: 600; font-size: 0.9rem; color: var(--blue-bright); }
.track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 210px;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.card {
  position: relative;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--bg-raised);
  scroll-snap-align: start;
  transition: transform 0.6s var(--spring), box-shadow 0.4s, opacity 0.4s;
}
.card img { width: 100%; height: 100%; object-fit: cover; }
/* Square static ads: full image on top of a blurred copy of itself */
.card.image .bg { position: absolute; inset: 0; transform: scale(1.25); filter: blur(22px) brightness(0.55) saturate(1.2); }
.card.image .fg { position: absolute; inset: 0; object-fit: contain; }
.card:hover { transform: translateY(-6px) scale(1.02); box-shadow: 0 30px 60px -30px rgba(41, 182, 236, 0.55); }
.card .shade { position: absolute; inset: auto 0 0 0; padding: 40px 12px 12px; background: linear-gradient(transparent, rgba(2, 6, 10, 0.92)); color: #fff; }
.card .shade strong { display: block; font-size: 0.92rem; line-height: 1.25; }
.card .shade small { color: rgba(255, 255, 255, 0.72); font-size: 0.75rem; }
.card .lang { position: absolute; top: 10px; right: 10px; padding: 3px 9px; border-radius: 999px; font-size: 0.7rem; font-weight: 700; background: rgba(4, 7, 11, 0.55); color: #fff; backdrop-filter: blur(8px); }
.card .play { position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; translate: -50% -50%; background: rgba(255, 255, 255, 0.16); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.3); opacity: 0; transition: opacity 0.3s, scale 0.4s var(--spring); scale: 0.8; }
.card:hover .play { opacity: 1; scale: 1; }
.card.hidden { display: none; }
.card .mark { position: absolute; top: 10px; left: 10px; height: 16px; opacity: 0.55; }

/* ---------- Reviews (auto-scrolling) ---------- */
.reviews-wrap { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.reviews-track { display: flex; gap: 14px; width: max-content; animation: marquee-x 70s linear infinite; }
.reviews-track.reverse { margin-top: 14px; animation-direction: reverse; animation-duration: 85s; }
.reviews-wrap:hover .reviews-track { animation-play-state: paused; }
@keyframes marquee-x { to { transform: translateX(-50%); } }
.review {
  display: flex;
  gap: 14px;
  width: 360px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--field);
}
.avatar { display: grid; place-items: center; flex: none; width: 52px; height: 52px; border-radius: 16px; font-weight: 700; font-size: 1.2rem; color: #02121b; background: var(--accent-grad); }
.review p { margin: 6px 0 0; font-size: 0.9rem; color: var(--muted); }
.review b { font-size: 0.95rem; }
.review small { display: block; font-size: 0.78rem; color: var(--muted); }

/* ---------- CTA ---------- */
.cta {
  overflow: hidden;
  background:
    radial-gradient(600px 300px at 15% 0%, rgba(6, 151, 196, 0.35), transparent 70%),
    radial-gradient(500px 260px at 100% 100%, rgba(41, 182, 236, 0.18), transparent 70%),
    var(--glass);
}
.cta h2 { max-width: 640px; margin: 12px 0; font-size: clamp(1.7rem, 3vw, 2.5rem); line-height: 1.12; }
.cta p { max-width: 560px; margin: 0 0 26px; color: var(--muted); }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-whatsapp { border: 0; color: #fff; background: #1fa855; box-shadow: 0 10px 28px -10px rgba(31, 168, 85, 0.8); }
.btn-whatsapp:hover { background: #22b85d; }
.btn-whatsapp svg { width: 20px; height: 20px; color: #fff; }

/* ---------- Footer ---------- */
.footer { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 26px 8px 8px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; text-align: center; }
.footer .socials { order: -1; }
.socials { display: flex; gap: 8px; }
.socials a { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--line); background: var(--glass); transition: transform 0.4s var(--spring), color 0.3s; }
.socials a:hover { transform: translateY(-3px); color: var(--blue-bright); }
.socials svg { width: 17px; height: 17px; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .hero { grid-template-columns: minmax(0, 1fr); grid-template-areas: "text" "media" "cta"; grid-template-rows: auto; padding-bottom: 150px; }
  .hero-media { max-width: 560px; margin: 32px auto 0; width: 100%; }
  /* Badges sit under the screenshots instead of floating over them */
  .badge { position: static; animation: none; }
  .hero-media .badge { grid-row: 3; }
  .badge-top { grid-column: 1 / 3; }
  .badge-bottom { grid-column: 3 / 4; }
  .hero-actions, .cta-actions { justify-content: center; }
  .stats { justify-content: center; text-align: center; }
}
@media (max-width: 720px) {
  .section, .hero { padding: 30px 20px; }
  .hero { padding-bottom: 140px; }
  .stats { grid-template-columns: repeat(2, auto); gap: 16px 28px; }
  .stats > div:last-child { grid-column: 1 / -1; }
  .hero-media { gap: 8px; }
  .badge { font-size: 0.75rem; padding: 9px 12px; }
  .hero-media .badge-top { grid-column: 1 / -1; justify-self: center; text-align: center; margin-top: 18px; }
  .hero-media .badge-bottom { display: none; }   /* the ribbons already list the formats */
  .hero-tile.col-2 { transform: translateY(14px); }
  .hero-tile .tag { left: 6px; right: 6px; bottom: 6px; padding: 3px 7px; font-size: 0.62rem; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .track { grid-auto-columns: 160px; }
  .review { width: 290px; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .cta { text-align: center; }
  .cta h2, .cta p { margin-left: auto; margin-right: auto; }
}
