/* ==========================================================================
   FairTrade18 — signup landing (static HTML / CSS / Bootstrap / JS)
   Design tokens & metrics mirrored 1:1 from the live build.
   Breakpoints are 640px / 1024px (matching the original), NOT Bootstrap's.
   ========================================================================== */

:root {
  /* brand */
  --brand-300: #6ee7b7;
  --brand-400: #34d399;
  --brand-500: #10b981;
  --brand-600: #059669;

  /* surfaces */
  --bg: #0a0e17;
  --dark-500: #243044;
  --dark-600: #1a2332;

  /* text */
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;

  /* whatsapp */
  --wa: #25d366;
  --wa-hover: #20bd5a;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------------------------------------------------------------- base ---- */

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
  line-height: 1.5;
}

body {
  margin: 0;
  overflow-x: hidden;
  background-color: var(--bg);
  color: #fff;
  font-family: Inter, system-ui, sans-serif;
  line-height: inherit;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
p {
  margin: 0;
}

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

img,
svg {
  display: block;
  vertical-align: middle;
}

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

.min-w-0 {
  min-width: 0;
}

::-webkit-scrollbar {
  width: 4px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--brand-500);
  border-radius: 2px;
}

/* --------------------------------------------------------- glass system --- */

.glass {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background-color: rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
}

.glass-strong {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background-color: rgba(21, 28, 44, 0.8);
  -webkit-backdrop-filter: blur(40px);
  backdrop-filter: blur(40px);
}

/* ------------------------------------------------- animated background ---- */

.bg-decor {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -10;
}

.blob {
  position: absolute;
  border-radius: 9999px;
  animation: float 6s ease-in-out infinite;
}

.blob-1 {
  top: -20%;
  left: -10%;
  width: 500px;
  height: 500px;
  background-color: rgba(16, 185, 129, 0.1);
  filter: blur(120px);
}

/* NOTE: on the live build this blob resolves to no background colour
   (its `bg-emerald-600/8` utility is never emitted), so it renders
   invisible. Kept as-is for a pixel-exact match — to light it up, add:
   background-color: rgba(5, 150, 105, 0.08); */
.blob-2 {
  bottom: -10%;
  right: -10%;
  width: 400px;
  height: 400px;
  filter: blur(100px);
  animation-delay: 3s;
}

.blob-3 {
  top: 40%;
  right: 20%;
  width: 300px;
  height: 300px;
  background-color: rgba(52, 211, 153, 0.05);
  filter: blur(80px);
  animation-delay: 1.5s;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 60px 60px;
}

.top-hairline {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background-image: linear-gradient(to right, transparent, rgba(16, 185, 129, 0.5), transparent);
}

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

/* ------------------------------------------------------------- shell ------ */

.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.page-main {
  flex: 1 1 0%;
  width: 100%;
  max-width: 28rem; /* 448px */
  margin-inline: auto;
  padding-inline: 1rem;
  padding-top: max(0.75rem, env(safe-area-inset-top));
  padding-bottom: 1.25rem;
}

/* -------------------------------------------------------------- header ---- */

.hero-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.brand-logo:hover {
  transform: scale(1.02);
}

.brand-logo:active {
  transform: scale(0.98);
}

.brand-logo img {
  height: 4rem;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  object-position: center;
}

.hero-copy {
  flex: 1 1 0%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 0;
}

.eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand-400);
  background-color: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  margin-bottom: 0.5rem;
}

.hero-title {
  font-family: Outfit, system-ui, sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.text-gradient {
  display: inline-block;
  padding-bottom: 0.125rem;
  background-image: linear-gradient(to right, var(--brand-400), var(--brand-300), var(--brand-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  color: var(--gray-400);
  font-size: 0.875rem;
  line-height: 1.25rem;
  text-align: center;
  margin-bottom: 1.25rem;
}

/* ---------------------------------------------------------------- card ---- */

.signup-card {
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
  width: 100%;
  max-width: 28rem;
  margin-inline: auto;
}

.card-head {
  text-align: center;
  margin-bottom: 1.25rem;
}

.card-title {
  font-family: Outfit, system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.75rem;
  color: #fff;
  margin-bottom: 0.5rem;
}

/* vertical rhythm equivalent of the original `space-y-4` */
.card-stack > * + * {
  margin-top: 1rem;
}

/* optional "or" separator (see README) — matches the original's styling */
.stack-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-block: 0.25rem;
}

.stack-divider > span:first-child,
.stack-divider > span:last-child {
  height: 1px;
  flex: 1 1 0%;
  background-color: rgba(255, 255, 255, 0.1);
}

.stack-divider > span:nth-child(2) {
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 500;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

/* --- WhatsApp CTA ------------------------------------------------------- */

.btn-whatsapp {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding-block: 0.875rem;
  border: 0;
  border-radius: 0.75rem;
  background-color: var(--wa);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  /* keeps the resting shadow identical to the source design */
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 10px 15px -3px rgba(37, 211, 102, 0.3),
    0 4px 6px -4px rgba(37, 211, 102, 0.3);
  animation: wa-halo 3s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  transition:
    background-color 0.25s ease,
    transform 0.28s cubic-bezier(0.34, 1.4, 0.64, 1),
    box-shadow 0.28s ease;
}

/* glossy depth pass */
.btn-whatsapp::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.16),
    rgba(255, 255, 255, 0) 52%,
    rgba(0, 0, 0, 0.07)
  );
}

/* light sweep — loops slowly at rest, snaps across on hover */
.btn-whatsapp::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 42%;
  pointer-events: none;
  background-image: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: translateX(-130%) skewX(-18deg);
  animation: wa-sheen 5s ease-in-out infinite;
}

.btn-whatsapp:hover,
.btn-whatsapp:focus-visible {
  background-color: var(--wa-hover);
  color: #fff;
  transform: translateY(-2px);
  /* pause the ambient ping once engaged, and hold a richer glow */
  animation: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    0 16px 30px -8px rgba(37, 211, 102, 0.55),
    0 6px 10px -6px rgba(37, 211, 102, 0.4);
}

.btn-whatsapp:hover::after,
.btn-whatsapp:focus-visible::after {
  animation: wa-sheen-fast 0.85s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-whatsapp:active {
  transform: translateY(0) scale(0.98);
  transition-duration: 0.08s;
}

.btn-whatsapp:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.wa-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  transform-origin: 50% 60%;
  animation: wa-chime 4.5s ease-in-out infinite;
}

.btn-whatsapp:hover .wa-icon,
.btn-whatsapp:focus-visible .wa-icon {
  animation: wa-chime-hover 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* click ripple, injected by main.js */
.wa-ripple {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  background-image: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.5) 0%,
    rgba(255, 255, 255, 0.18) 45%,
    rgba(255, 255, 255, 0) 70%
  );
  transform: translate(-50%, -50%) scale(0);
  animation: wa-ripple 0.65s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* expanding ring + breathing glow, echoing the source's `pulse-glow` */
@keyframes wa-halo {
  0% {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.2),
      0 10px 15px -3px rgba(37, 211, 102, 0.3),
      0 4px 6px -4px rgba(37, 211, 102, 0.3),
      0 0 0 0 rgba(37, 211, 102, 0.4);
  }
  70% {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.24),
      0 14px 26px -6px rgba(37, 211, 102, 0.48),
      0 4px 6px -4px rgba(37, 211, 102, 0.34),
      0 0 0 12px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.2),
      0 10px 15px -3px rgba(37, 211, 102, 0.3),
      0 4px 6px -4px rgba(37, 211, 102, 0.3),
      0 0 0 0 rgba(37, 211, 102, 0);
  }
}

/* travels across, then waits offscreen for the rest of the cycle */
@keyframes wa-sheen {
  0% {
    transform: translateX(-130%) skewX(-18deg);
    opacity: 0;
  }
  6% {
    opacity: 1;
  }
  30% {
    transform: translateX(230%) skewX(-18deg);
    opacity: 0;
  }
  100% {
    transform: translateX(230%) skewX(-18deg);
    opacity: 0;
  }
}

@keyframes wa-sheen-fast {
  0% {
    transform: translateX(-130%) skewX(-18deg);
    opacity: 1;
  }
  100% {
    transform: translateX(230%) skewX(-18deg);
    opacity: 0;
  }
}

/* periodic notification-style nudge */
@keyframes wa-chime {
  0%,
  86%,
  100% {
    transform: rotate(0) scale(1);
  }
  89% {
    transform: rotate(-10deg) scale(1.08);
  }
  92% {
    transform: rotate(8deg) scale(1.08);
  }
  95% {
    transform: rotate(-4deg) scale(1.04);
  }
  98% {
    transform: rotate(1deg) scale(1);
  }
}

@keyframes wa-chime-hover {
  0% {
    transform: rotate(0) scale(1);
  }
  35% {
    transform: rotate(-12deg) scale(1.14);
  }
  70% {
    transform: rotate(9deg) scale(1.08);
  }
  100% {
    transform: rotate(0) scale(1);
  }
}

@keyframes wa-ripple {
  to {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0;
  }
}

.card-terms {
  text-align: center;
  font-size: 11px;
  line-height: 1.625;
  color: var(--gray-500);
  margin-top: 1rem;
  padding-inline: 0.25rem;
}

/* -------------------------------------------------------- badges + stats -- */

.section-gap {
  margin-top: 2rem;
}

/* --- market category pills ----------------------------------------------
   Rebuilt from the source's flat PNG as live markup so each pill can
   animate. Per-pill accent colour arrives as `--tag-rgb` (space-separated
   triplet) and `--i` (index, drives both stagger delays).
   ------------------------------------------------------------------------ */

.tags-wrap {
  width: 100%;
}

.tags-heading {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--gray-400);
  margin-bottom: 1rem;
}

.tags-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.tag-slot {
  display: flex;
  --reveal-delay: calc(var(--i, 0) * 0.07s);
}

.tag-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3125rem 0.875rem 0.3125rem 0.3125rem;
  border-radius: 9999px;
  background-color: #0c111c;
  background-image: linear-gradient(
    135deg,
    rgb(var(--tag-rgb) / 0.12),
    rgb(var(--tag-rgb) / 0.02) 60%
  );
  transition: transform 0.3s cubic-bezier(0.34, 1.4, 0.64, 1);
}

/* carries the animated neon ring so it never clashes with the
   entrance animation running on .tag-slot */
.tag-pill::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgb(var(--tag-rgb) / 0.45);
  box-shadow:
    0 0 12px rgb(var(--tag-rgb) / 0.14),
    inset 0 0 12px rgb(var(--tag-rgb) / 0.05);
  pointer-events: none;
  animation: tag-breathe 5.5s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * 0.32s);
}

.tag-icon {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: rgb(var(--tag-rgb));
  border: 1px solid rgb(var(--tag-rgb) / 0.4);
  background-image: radial-gradient(
    circle at 30% 25%,
    rgb(var(--tag-rgb) / 0.3),
    rgb(var(--tag-rgb) / 0.08) 70%
  );
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tag-icon svg {
  width: 1rem;
  height: 1rem;
}

.tag-glyph {
  font-family: Outfit, system-ui, sans-serif;
  font-weight: 800;
  font-size: 0.9375rem;
  line-height: 1;
}

.tag-glyph-fx {
  font-size: 0.75rem;
  letter-spacing: -0.04em;
}

.tag-label {
  color: rgb(var(--tag-rgb));
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.25rem;
  white-space: nowrap;
  transition: text-shadow 0.3s ease;
}

/* ---- hover / focus: lock the ambient loop, hold the bright state ---- */

.tag-slot:hover .tag-pill,
.tag-slot:focus-within .tag-pill {
  transform: translateY(-3px);
}

.tag-slot:hover .tag-pill::before,
.tag-slot:focus-within .tag-pill::before {
  animation: none;
  border-color: rgb(var(--tag-rgb));
  box-shadow:
    0 0 20px rgb(var(--tag-rgb) / 0.45),
    0 0 40px rgb(var(--tag-rgb) / 0.2),
    inset 0 0 18px rgb(var(--tag-rgb) / 0.14);
}

.tag-slot:hover .tag-icon,
.tag-slot:focus-within .tag-icon {
  transform: scale(1.12) rotate(-8deg);
}

.tag-slot:hover .tag-label,
.tag-slot:focus-within .tag-label {
  text-shadow: 0 0 14px rgb(var(--tag-rgb) / 0.7);
}

/* a wave of light travels through the row: same keyframes, staggered delay */
@keyframes tag-breathe {
  0%,
  26%,
  100% {
    border-color: rgb(var(--tag-rgb) / 0.45);
    box-shadow:
      0 0 12px rgb(var(--tag-rgb) / 0.14),
      inset 0 0 12px rgb(var(--tag-rgb) / 0.05);
  }
  10% {
    border-color: rgb(var(--tag-rgb) / 0.95);
    box-shadow:
      0 0 22px rgb(var(--tag-rgb) / 0.4),
      0 0 44px rgb(var(--tag-rgb) / 0.16),
      inset 0 0 16px rgb(var(--tag-rgb) / 0.12);
  }
}

/* four abreast at every width; solid slate cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  width: 100%;
}

.stat-card {
  border-radius: 0.875rem;
  padding: 0.875rem 0.25rem;
  text-align: center;
  min-width: 0;
  background-color: #191f2b;
  border: 1px solid rgba(255, 255, 255, 0.045);
}

.stat-icon {
  color: var(--brand-400);
  display: flex;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.stat-icon svg {
  width: 1.125rem;
  height: 1.125rem;
}

/* clamp keeps 4 columns intact down to ~320px */
.stat-value {
  font-family: Outfit, system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(1rem, 4.4vw, 1.375rem);
  line-height: 1.2;
  color: #fff;
  white-space: nowrap;
  margin-bottom: 0.1875rem;
}

/* labels wrap to two lines, as in the reference */
.stat-label {
  font-size: clamp(9px, 2.9vw, 11px);
  line-height: 1.3;
  color: var(--gray-400);
  overflow-wrap: break-word;
}

/* -------------------------------------------------------------- footer ---- */

.page-footer {
  padding-inline: 1rem;
  padding-top: 1rem;
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.page-footer p {
  font-size: 10px;
  line-height: 1.625;
  color: var(--gray-500);
  max-width: 28rem;
  margin-inline: auto;
}

/* ------------------------------------------------- entrance animations ---- */

.reveal {
  opacity: 0;
  will-change: opacity, transform;
}

.reveal.is-visible {
  animation: reveal-up var(--reveal-duration, 0.55s) var(--ease-out) var(--reveal-delay, 0s) both;
}

.reveal-up-sm {
  --reveal-from: 10px;
  --reveal-duration: 0.4s;
}
.reveal-up-md {
  --reveal-from: 20px;
}
.reveal-up-lg {
  --reveal-from: 30px;
}

@keyframes reveal-up {
  from {
    opacity: 0;
    transform: translateY(var(--reveal-from, 20px));
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* springy pop-in used by the category pills — must follow .reveal.is-visible */
.reveal-pop.is-visible {
  animation: reveal-pop 0.6s cubic-bezier(0.34, 1.45, 0.64, 1) var(--reveal-delay, 0s) both;
}

@keyframes reveal-pop {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ============================== >= 640px ================================= */

@media (min-width: 640px) {
  .brand-logo img {
    height: 5rem;
    max-width: 280px;
  }

  .signup-card {
    padding: 2rem;
  }

  .card-head {
    margin-bottom: 1.5rem;
  }

  .card-title {
    font-size: 1.5rem;
    line-height: 2rem;
  }

  .btn-whatsapp {
    padding-block: 1rem;
    font-size: 1.125rem;
    line-height: 1.75rem;
  }

  .wa-icon {
    width: 1.5rem;
    height: 1.5rem;
  }

  .card-terms {
    font-size: 0.75rem;
    line-height: 1rem;
  }

  .tags-heading {
    font-size: 11px;
    letter-spacing: 0.26em;
  }

  .tags-grid {
    gap: 0.625rem;
  }

  .tag-pill {
    padding: 0.375rem 1rem 0.375rem 0.375rem;
    gap: 0.625rem;
  }

  .tag-icon {
    width: 2.25rem;
    height: 2.25rem;
  }

  .tag-icon svg {
    width: 1.125rem;
    height: 1.125rem;
  }

  .tag-glyph {
    font-size: 1.0625rem;
  }

  .tag-glyph-fx {
    font-size: 0.8125rem;
  }

  .tag-label {
    font-size: 0.9375rem;
  }

  .stats-grid {
    gap: 0.75rem;
  }

  .stat-card {
    padding: 1rem 0.5rem;
  }

  .stat-icon svg {
    width: 1.25rem;
    height: 1.25rem;
  }

  .stat-label {
    font-size: 0.75rem;
    line-height: 1.3;
  }
}

/* ============================= >= 1024px ================================= */

@media (min-width: 1024px) {
  .signup-card {
    margin-inline: 0;
    max-width: none;
  }

  .card-title {
    font-size: 1.875rem;
    line-height: 2.25rem;
  }
}

/* ------------------------------------------------ reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .blob {
    animation: none;
  }

  .reveal {
    opacity: 1;
  }

  .reveal.is-visible {
    animation: none;
  }

  /* keep the CTA's hover lift, drop the looping attention effects */
  .btn-whatsapp,
  .btn-whatsapp::after,
  .wa-icon,
  .btn-whatsapp:hover .wa-icon,
  .btn-whatsapp:focus-visible .wa-icon,
  .btn-whatsapp:hover::after,
  .btn-whatsapp:focus-visible::after {
    animation: none;
  }

  .btn-whatsapp::after {
    opacity: 0;
  }

  /* pills keep their hover feedback, lose the looping neon wave */
  .tag-pill::before {
    animation: none;
  }
}
