/* ============================================================
   Referral Code Link — Premium Stylesheet
   Root variables sourced from global design system theme.css
   ============================================================ */

:root {
  /* --- Colors (Aligned with global theme) --- */
  --bg:             #ffffff;
  --bg-card:        #ffffff;
  --bg-surface:     #fafafa;
  --primary:        #FF6B35;
  --primary-hover:  #e05e2d;
  --text:           #111111;
  --text-muted:     #666666;
  --border:         1px solid #e5e5e5;
  --border-subtle:  1px solid #f0f0f0;
  
  /* --- Borders & Radius --- */
  --radius-sm:      6px;
  --radius:         12px;
  --radius-lg:      16px;

  /* --- Fonts (Using Premium typography, no Inter/Roboto/Arial) --- */
  --font-heading:   'Geist', 'Space Grotesk', system-ui, sans-serif;
  --font-body:      'Geist', 'DM Sans', system-ui, sans-serif;
  --font-mono:      'Geist Mono', 'JetBrains Mono', monospace;

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

/* Base resets & fonts */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--text);
  letter-spacing: -0.02em;
}

/* Main Container width mapping legacy layout: max-w-[896px] */
.container-island {
  width: 100%;
  max-width: 896px;
  margin-inline: auto;
  padding-inline: 16px;
}

/* ── FLOATING ISLAND HEADER ────────────────────────────── */
.header-island {
  position: sticky;
  top: 16px;
  z-index: 50;
  display: flex;
  justify-content: center;
  padding: 8px 16px 0;
  animation: fade-in-down 0.5s var(--ease-out) both;
}

.header-inner {
  width: 100%;
  max-width: 896px;
  border-radius: 9999px;
  border: 1px solid #e5e5e5;
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  height: 48px;
  align-items: center;
  justify-content: space-between;
  padding-left: 16px;
  padding-right: 8px; /* Room for nav button */
}

.logo-link {
  display: flex;
  align-items: center;
}

.btn-nav {
  display: flex;
  height: 32px;
  align-items: center;
  border-radius: 9999px;
  background-color: #111111;
  padding-left: 16px;
  padding-right: 16px;
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  transition: background-color 0.15s ease;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.btn-nav:hover {
  background-color: var(--primary);
}

/* ── HERO SECTION ─────────────────────────────────────── */
.hero-section {
  padding-top: 80px;
  padding-bottom: 80px;
  text-align: center;
  animation: fade-in-up 0.8s var(--ease-out) both;
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface);
  border: var(--border);
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #555;
  margin-bottom: 20px;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  background-color: #22c55e;
  border-radius: 50%;
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
  color: #111;
}

.hero-subtitle {
  color: #777;
  font-size: 17px;
  max-width: 500px;
  margin: 0 auto 32px;
  line-height: 1.6;
}

.btn-primary-hero {
  display: flex;
  height: 48px;
  align-items: center;
  border-radius: 9999px;
  background-color: #111111;
  padding-left: 32px;
  padding-right: 32px;
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  transition: background-color 0.15s ease;
  text-decoration: none;
}

.btn-primary-hero:hover {
  background-color: var(--primary);
}

/* ── TRUST STRIP ──────────────────────────────────────── */
.trust-strip {
  border-top: 1px solid #f0f0f0;
  border-bottom: 1px solid #f0f0f0;
  background-color: var(--bg-surface);
  padding: 64px 0;
}

.trust-title {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #aaa;
  margin-bottom: 28px;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

.trust-logo-img {
  height: 24px;
  opacity: 0.4;
  transition: opacity 0.2s ease;
}

.trust-logo-img:hover {
  opacity: 0.8;
}

.trust-placeholder {
  font-weight: 700;
  font-size: 16px;
  color: #ccc;
}

/* ── CODE OF THE DAY CARD ─────────────────────────────── */
.cod-card {
  border-radius: 16px;
  border: var(--border);
  background-color: #ffffff;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02);
}

.cod-inner {
  padding: 24px;
}

.cod-stats {
  margin-top: 20px;
  border-radius: 8px;
  border: var(--border-subtle);
  background-color: var(--bg-surface);
  padding: 12px;
}

.tag-pick {
  border-radius: 6px;
  border: 1px solid rgba(255, 107, 53, 0.3);
  background-color: rgba(255, 107, 53, 0.1);
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
}

/* Outlined brand button */
.btn-brand-outline {
  display: inline-flex;
  height: 40px;
  align-items: center;
  border-radius: 9999px;
  border: 2px solid;
  padding-left: 16px;
  padding-right: 16px;
  font-size: 13px;
  font-weight: 600;
  background: transparent;
  cursor: pointer;
  transition: transform 0.1s ease;
}

/* Filled brand button */
.btn-brand-filled {
  display: inline-flex;
  height: 40px;
  align-items: center;
  border-radius: 9999px;
  padding-left: 20px;
  padding-right: 20px;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  cursor: pointer;
  transition: opacity 0.15s ease;
  border: none;
}

.btn-brand-filled:hover {
  opacity: 0.8;
}

/* ── BRAND GRID & DYNAMIC BRAND CARDS ─────────────────── */
.company-grid {
  display: grid;
  gap: 16px;
}

@media (min-width: 640px) {
  .company-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .company-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* EXACT BRANDCARD REWRITE */
.brand-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid;
  text-decoration: none;
  transition: transform 0.15s var(--ease-out), box-shadow 0.15s var(--ease-out);
  animation: fade-in-up 0.6s var(--ease-out) both;
  animation-fill-mode: backwards;
}

.brand-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.brand-card-top {
  padding: 20px;
}

.brand-reward-tag {
  display: inline-block;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.brand-reward-desc {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.4;
}

.brand-logo-row {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo-box {
  display: flex;
  height: 32px;
  width: 32px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.brand-logo-img {
  height: 18px;
  width: 18px;
  object-fit: contain;
}

.brand-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-top: 1px solid;
}

.brand-action-link {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
}

.brand-action-link svg {
  transition: transform 0.15s ease;
}

.brand-card:hover .brand-action-link svg {
  transform: translateX(2px);
}

/* ── HOW IT WORKS ─────────────────────────────────────── */
.how-it-works-grid {
  display: grid;
  gap: 24px;
}

@media (min-width: 640px) {
  .how-it-works-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.step-card {
  border-radius: 12px;
  border: var(--border);
  background-color: #ffffff;
  padding: 24px;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.step-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05);
}

.step-number {
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

/* ── FOOTER ───────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid #f0f0f0;
  background-color: #ffffff;
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

@media (min-width: 640px) {
  .footer-inner {
    flex-direction: row;
  }
}

.footer-copy {
  font-size: 12px;
  color: #888;
}

.footer-nav a {
  font-size: 12px;
  color: #888;
  margin-left: 16px;
  transition: color 0.15s ease;
}

.footer-nav a:hover {
  color: var(--primary);
}

/* Helper utilities */
.hover-orange:hover {
  color: var(--primary) !important;
}

/* Skeleton animation */
.skeleton {
  background: #f4f4f5;
  background: linear-gradient(110deg, #f4f4f5 8%, #e4e4e7 18%, #f4f4f5 33%);
  background-size: 200% 100%;
  animation: shine 1.5s linear infinite;
}

.skeleton-card {
  border-radius: 16px;
  border: var(--border);
}

@keyframes shine {
  to { background-position-x: -200%; }
}

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in-down {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}
