/* Matchies landing — palette locked to app tokens (matcha, cocoa, white frost, ink) */

:root {
  --brand-100: #e8f2d9;
  --brand-200: #d2e5b8;
  --brand-300: #b3d38d;
  --brand-500: #78ab43;
  --brand-600: #5c8f2d;
  --brand-700: #477026;
  --brand-800: #3a5a23;
  --brand-900: #314c20;
  --cocoa-100: #ede6df;
  --cocoa-200: #d9c9bb;
  --cocoa-300: #c0a78e;
  --cocoa-500: #8a6a4f;
  --cocoa-700: #59412f;
  --cocoa-800: #463427;
  --cocoa-900: #392b21;
  --ink: #111827;
  --ink-soft: #4b5563;
  --ink-faint: #6b7280;
  --frost: rgba(255, 255, 255, 0.7);
  --frost-strong: rgba(255, 255, 255, 0.86);
  --line: rgba(57, 43, 33, 0.12);
  --font-sans: 'Barlow', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Barlow Condensed', 'Barlow', ui-sans-serif, system-ui, sans-serif;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --shadow-card: 0 1px 2px rgba(57, 43, 33, 0.06), 0 8px 24px rgba(57, 43, 33, 0.08);
  --shadow-pop: 0 12px 40px rgba(57, 43, 33, 0.18);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background-color: #ede7e0;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Warm cocoa wash with matcha/brown blobs — mirrors the app shell background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(45% 35% at 12% 8%, rgba(120, 171, 67, 0.2) 0%, transparent 70%),
    radial-gradient(42% 34% at 88% 14%, rgba(89, 65, 47, 0.22) 0%, transparent 70%),
    radial-gradient(55% 42% at 50% 100%, rgba(138, 106, 79, 0.24) 0%, transparent 72%),
    linear-gradient(180deg, #f6f1ea 0%, #e5dbd0 100%);
}

h1, h2, h3 {
  font-family: var(--font-display);
  letter-spacing: 0.015em;
  line-height: 1.1;
  font-weight: 700;
}

img, svg {
  max-width: 100%;
  display: block;
}

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

.container {
  width: min(1120px, 100% - 40px);
  margin-inline: auto;
}

.icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--frost);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.brand-bar {
  height: 4px;
  background: linear-gradient(90deg, var(--cocoa-700) 0%, var(--brand-700) 100%);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 64px;
  padding-block: 8px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--cocoa-900);
}

.logo svg {
  width: 34px;
  height: 34px;
  border-radius: var(--r-md);
}

.main-nav {
  display: flex;
  gap: 4px;
  margin-inline: auto;
}

.main-nav a {
  padding: 10px 14px;
  border-radius: var(--r-md);
  font-weight: 500;
  color: var(--ink-soft);
  transition: color 0.2s, background-color 0.2s;
}

.main-nav a:hover {
  color: var(--brand-700);
  background: rgba(120, 171, 67, 0.1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

/* Language switcher — segmented control */
.lang-switch {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  background: rgba(57, 43, 33, 0.08);
  border-radius: var(--r-md);
}

.lang-switch button {
  appearance: none;
  border: 0;
  background: transparent;
  font: 600 13px/1 var(--font-sans);
  color: var(--ink-soft);
  padding: 8px 12px;
  min-height: 32px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.lang-switch button:hover {
  color: var(--cocoa-900);
}

.lang-switch button[aria-pressed='true'] {
  background: #fff;
  color: var(--brand-700);
  box-shadow: 0 1px 3px rgba(57, 43, 33, 0.15);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: var(--r-md);
  font: 600 16px/1.2 var(--font-sans);
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.2s, border-color 0.2s, transform 0.15s, box-shadow 0.2s;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--brand-700);
  color: #fff;
  box-shadow: 0 2px 8px rgba(71, 112, 38, 0.35);
}

.btn-primary:hover {
  background: var(--brand-800);
}

.btn-ghost {
  background: var(--frost);
  border-color: var(--line);
  color: var(--cocoa-800);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  border-color: var(--cocoa-300);
  background: var(--frost-strong);
}

.btn:focus-visible,
.lang-switch button:focus-visible,
.main-nav a:focus-visible,
a:focus-visible {
  outline: 3px solid var(--brand-500);
  outline-offset: 2px;
}

.header-cta {
  display: none;
}

/* ---------- Hero ---------- */

.hero {
  padding: 64px 0 48px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 56px;
  align-items: center;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--line);
  font: 600 13px/1.2 var(--font-sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cocoa-700);
  backdrop-filter: blur(8px);
}

.kicker .dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--brand-500);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.hero h1 {
  font-size: clamp(52px, 8vw, 88px);
  text-transform: uppercase;
  color: var(--cocoa-900);
  margin: 20px 0 16px;
}

.hero h1 .accent {
  color: var(--brand-700);
}

.hero .sub {
  font-size: 19px;
  color: var(--ink-soft);
  max-width: 34em;
  margin-bottom: 28px;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.hero-note {
  font-size: 14px;
  color: var(--ink-faint);
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-note .icon {
  width: 18px;
  height: 18px;
  color: var(--brand-600);
}

/* ---------- Phone mockup ---------- */

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.phone {
  position: relative;
  width: 300px;
  border-radius: 42px;
  background: var(--cocoa-900);
  padding: 12px;
  box-shadow: var(--shadow-pop);
  transform: rotate(2deg);
}

.phone-screen {
  border-radius: 32px;
  overflow: hidden;
  background: linear-gradient(180deg, #f6f1ea 0%, #e9e0d5 100%);
  padding: 14px 14px 18px;
}

.phone-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 4px 12px;
}

.phone-top .wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--cocoa-900);
}

.phone-top .icon {
  width: 20px;
  height: 20px;
  color: var(--cocoa-700);
}

.swipe-card {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-card);
}

.swipe-photo {
  position: relative;
  height: 240px;
  background:
    radial-gradient(90% 70% at 78% 18%, rgba(179, 211, 141, 0.85) 0%, transparent 60%),
    radial-gradient(80% 80% at 15% 90%, rgba(89, 65, 47, 0.5) 0%, transparent 65%),
    linear-gradient(160deg, #5c8f2d 0%, #477026 45%, #3a5a23 100%);
}

.swipe-photo .glyph {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 96px;
  height: 96px;
  color: rgba(255, 255, 255, 0.9);
}

.swipe-photo .shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(20, 16, 12, 0.55) 100%);
}

.swipe-id {
  position: absolute;
  left: 14px;
  bottom: 12px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
  font: 600 18px/1.2 var(--font-sans);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.swipe-id .icon {
  width: 18px;
  height: 18px;
  color: var(--brand-300);
}

.showrate {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(6px);
  color: var(--brand-800);
  font: 600 11px/1 var(--font-sans);
  padding: 6px 9px;
  border-radius: 999px;
}

.showrate .icon {
  width: 13px;
  height: 13px;
}

.swipe-body {
  padding: 12px 14px 14px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--brand-100);
  color: var(--brand-800);
  font: 500 12px/1.2 var(--font-sans);
}

.chip .icon {
  width: 14px;
  height: 14px;
}

.chip.cocoa {
  background: var(--cocoa-100);
  color: var(--cocoa-800);
}

.swipe-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-faint);
}

.swipe-meta .icon {
  width: 14px;
  height: 14px;
}

.swipe-actions {
  display: flex;
  justify-content: center;
  gap: 22px;
  padding-top: 16px;
}

.action-btn {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  box-shadow: var(--shadow-card);
  color: var(--ink-faint);
}

.action-btn.like {
  background: var(--brand-700);
  color: #fff;
}

.match-toast {
  position: absolute;
  right: -28px;
  bottom: 84px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--frost-strong);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 10px 16px;
  box-shadow: var(--shadow-pop);
  font: 600 14px/1.2 var(--font-sans);
  color: var(--cocoa-900);
  transform: rotate(-2deg);
  animation: float 4s ease-in-out infinite;
}

.match-toast .icon {
  width: 20px;
  height: 20px;
  color: var(--brand-600);
}

@keyframes float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -8px; }
}

.card-ghost {
  position: absolute;
  inset: 12px;
  border-radius: 42px;
  background: rgba(255, 255, 255, 0.5);
  transform: rotate(-5deg) translateX(-22px);
  z-index: -1;
  border: 1px solid var(--line);
}

/* ---------- Sections ---------- */

.section {
  padding: 72px 0;
}

.section-head {
  max-width: 640px;
  margin-bottom: 40px;
}

.section-head h2 {
  font-size: clamp(34px, 5vw, 48px);
  text-transform: uppercase;
  color: var(--cocoa-900);
  margin-bottom: 12px;
}

.section-head p {
  font-size: 17px;
  color: var(--ink-soft);
}

/* Features */

.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.feature-card {
  background: var(--frost);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-pop);
}

.feature-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-100);
  color: var(--brand-700);
  margin-bottom: 16px;
}

.feature-card:nth-child(even) .feature-icon {
  background: var(--cocoa-100);
  color: var(--cocoa-700);
}

.feature-card h3 {
  font-size: 22px;
  margin-bottom: 6px;
  color: var(--cocoa-900);
}

.feature-card p {
  font-size: 15px;
  color: var(--ink-soft);
}

/* How it works */

.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  counter-reset: step;
}

.step {
  position: relative;
  background: var(--frost);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px 24px 24px;
  box-shadow: var(--shadow-card);
}

.step-num {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 700;
  line-height: 1;
  color: var(--brand-200);
  margin-bottom: 8px;
}

.step:nth-child(2) .step-num { color: var(--cocoa-200); }
.step:nth-child(3) .step-num { color: var(--brand-300); }

.step h3 {
  font-size: 22px;
  color: var(--cocoa-900);
  margin-bottom: 6px;
}

.step p {
  font-size: 15px;
  color: var(--ink-soft);
}

/* Sports */

.sports-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sport-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  min-height: 44px;
  border-radius: 999px;
  background: var(--frost);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  font: 500 15px/1.2 var(--font-sans);
  color: var(--cocoa-800);
  box-shadow: var(--shadow-card);
}

.sport-chip .icon {
  width: 20px;
  height: 20px;
  color: var(--brand-700);
}

.sport-chip:nth-child(even) .icon {
  color: var(--cocoa-600);
}

.sport-chip-more {
  border: 1.5px dashed rgba(71, 112, 38, 0.45);
  background: rgba(232, 242, 217, 0.55);
  color: var(--brand-700);
  font-weight: 600;
}

/* Malaysia band */

.band {
  background: linear-gradient(120deg, var(--cocoa-800) 0%, var(--cocoa-900) 70%);
  color: #f0e6d8;
  padding: 72px 0;
}

.band h2 {
  font-size: clamp(34px, 5vw, 48px);
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 12px;
}

.band > .container > p {
  font-size: 17px;
  color: rgba(240, 230, 216, 0.85);
  max-width: 46em;
  margin-bottom: 40px;
}

.band-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.band-item {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--r-lg);
  padding: 22px;
}

.band-item .icon {
  width: 28px;
  height: 28px;
  color: var(--brand-300);
  margin-bottom: 12px;
}

.band-item h3 {
  font-size: 20px;
  color: #fff;
  margin-bottom: 4px;
}

.band-item p {
  font-size: 14px;
  color: rgba(240, 230, 216, 0.8);
}

/* CTA */

.cta-card {
  background: var(--frost-strong);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-pop);
  padding: 56px 28px;
  text-align: center;
}

.cta-card h2 {
  font-size: clamp(36px, 6vw, 56px);
  text-transform: uppercase;
  color: var(--cocoa-900);
  margin-bottom: 12px;
}

.cta-card h2 .accent {
  color: var(--brand-700);
}

.cta-card p {
  font-size: 17px;
  color: var(--ink-soft);
  max-width: 36em;
  margin: 0 auto 28px;
}

/* Footer */

.site-footer {
  background: var(--cocoa-900);
  color: rgba(240, 230, 216, 0.75);
  padding: 48px 0 32px;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.site-footer .logo {
  color: #fff;
}

.footer-tagline {
  margin-top: 8px;
  font-size: 14px;
}

.footer-langs {
  display: flex;
  gap: 8px;
}

.footer-langs button {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: rgba(240, 230, 216, 0.85);
  font: 500 13px/1 var(--font-sans);
  padding: 9px 14px;
  min-height: 36px;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.footer-langs button:hover,
.footer-langs button[aria-pressed='true'] {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.footer-bottom {
  padding-top: 24px;
  font-size: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
}

/* ---------- Reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */

@media (min-width: 640px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .band-grid { grid-template-columns: repeat(3, 1fr); }
  .cta-card { padding: 64px 48px; }
}

@media (min-width: 900px) {
  .hero { padding: 88px 0 72px; }
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; }
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .header-cta { display: inline-flex; }
}

@media (max-width: 899px) {
  .main-nav { display: none; }
  .hero-visual { padding-top: 8px; }
  .match-toast { right: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
