/* ============================================================
   globalrefer.online — Orange & Slate Design System
   Palette: Temu Orange #FF6600 | Slate #1E2A38 | White #FFFFFF
   Text: Dark Gray #222222
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap');

/* ── CSS Variables ── */
:root {
  --orange:        #FF6600;
  --orange-light:  #FF8533;
  --orange-deep:   #CC5200;
  --orange-glow:   rgba(255, 102, 0, 0.15);

  --slate:         #1E2A38;
  --slate-mid:     #2D3F52;
  --slate-light:   #4A5F75;
  --slate-mist:    #EBF0F5;

  --white:         #FFFFFF;
  --gray-text:     #222222;
  --gray-subtle:   #6B7888;
  --gray-border:   #D8E0E8;
  --gray-bg:       #F7F9FB;

  --font-display:  'Syne', sans-serif;
  --font-body:     'DM Sans', sans-serif;

  --radius-sm:     6px;
  --radius-md:     12px;
  --radius-lg:     20px;
  --radius-pill:   999px;

  --shadow-sm:     0 1px 4px rgba(30,42,56,0.08);
  --shadow-md:     0 4px 20px rgba(30,42,56,0.12);
  --shadow-lg:     0 12px 48px rgba(30,42,56,0.18);
  --shadow-orange: 0 6px 28px rgba(255,102,0,0.30);

  --transition:    0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --max-w:         1200px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--gray-text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font-family: var(--font-body); cursor: pointer; border: none; background: none; }

/* ── Typography Scale ── */
.display-xl {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5.5vw, 4.2rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--slate);
}

.display-lg {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--slate);
}

.display-md {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--slate);
}

h1, h2, h3, h4 { font-family: var(--font-display); }

h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); font-weight: 600; line-height: 1.25; }
h4 { font-size: 1.1rem; font-weight: 600; }

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange);
}

.lead {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  font-weight: 300;
  line-height: 1.7;
  color: var(--slate-light);
}

/* ── Accent Spans ── */
.text-orange { color: var(--orange); }
.text-slate  { color: var(--slate); }
.text-subtle { color: var(--gray-subtle); }

/* ── Layout Utilities ── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.section { padding-block: clamp(4rem, 8vw, 7rem); }
.section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ── Global mobile overflow protection ── */
@media (max-width: 768px) {
  .container { overflow-x: hidden; }
  .flow-diagram { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .payout-table-wrap, .gbp-table-wrap, .eu-table-wrap, .mkt-table-wrap { overflow-x: auto; }
}

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-sm { gap: 0.5rem; }
.gap-md { gap: 1rem; }
.gap-lg { gap: 2rem; }

.text-center { text-align: center; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.78rem 1.75rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: all var(--transition);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background var(--transition);
}

.btn:hover::after { background: rgba(255,255,255,0.08); }

/* Primary — Temu Orange */
.btn-primary {
  background: var(--orange);
  color: var(--white);
  box-shadow: var(--shadow-orange);
}

.btn-primary:hover {
  background: var(--orange-light);
  transform: translateY(-2px);
  box-shadow: 0 10px 36px rgba(255,102,0,0.38);
}

.btn-primary:active { transform: translateY(0); }

/* Secondary — Slate outline */
.btn-secondary {
  background: transparent;
  color: var(--slate);
  border: 1.5px solid var(--gray-border);
}

.btn-secondary:hover {
  border-color: var(--slate);
  background: var(--slate-mist);
}

/* Ghost white — for dark backgrounds */
.btn-ghost {
  background: rgba(255,255,255,0.12);
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.28);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.5);
}

/* Large variant */
.btn-lg {
  padding: 1rem 2.25rem;
  font-size: 1rem;
  border-radius: var(--radius-pill);
}

/* ── Navigation ── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--gray-border);
  transition: box-shadow var(--transition);
}

.site-nav.scrolled { box-shadow: var(--shadow-md); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 2rem;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--slate);
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.nav-logo-icon {
  width: 34px;
  height: 34px;
  background: var(--orange);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: white;
  font-weight: 800;
}

.nav-logo span { color: var(--orange); }

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-links a {
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--slate-light);
  transition: all var(--transition);
}

.nav-links a:hover { color: var(--slate); background: var(--gray-bg); }
.nav-links a.active { color: var(--orange); font-weight: 600; }

/* Country Selector */
.country-select-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.country-select-wrapper .globe-icon {
  position: absolute;
  left: 0.75rem;
  pointer-events: none;
  color: var(--slate-light);
  font-size: 0.95rem;
}

.country-select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--gray-bg);
  border: 1.5px solid var(--gray-border);
  border-radius: var(--radius-pill);
  padding: 0.45rem 2.4rem 0.45rem 2.1rem;
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--slate);
  cursor: pointer;
  transition: all var(--transition);
  min-width: 160px;
}

.country-select:hover { border-color: var(--orange); background: var(--white); }
.country-select:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-glow); }

.country-caret {
  position: absolute;
  right: 0.75rem;
  pointer-events: none;
  color: var(--gray-subtle);
  font-size: 0.7rem;
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--slate);
  border-radius: 2px;
  transition: all var(--transition);
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
}

/* ── Hero Section ── */
.hero {
  background: var(--white);
  position: relative;
  overflow: hidden;
  padding-block: clamp(5rem, 10vw, 8rem);
}

/* Subtle geometric background */
.hero::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -10%;
  width: 70vw;
  height: 70vw;
  max-width: 900px;
  max-height: 900px;
  background: radial-gradient(ellipse at center, rgba(255,102,0,0.06) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -5%;
  width: 50vw;
  height: 50vw;
  max-width: 600px;
  max-height: 600px;
  background: radial-gradient(ellipse at center, rgba(30,42,56,0.04) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(3rem, 6vw, 5rem);
}

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-cta { justify-content: center; }
  .hero-badge { justify-content: center; margin-inline: auto; }
  .hero-subtitle { margin-inline: auto; text-align: center; }
  .hero-stats { justify-content: center; }
  .hero-visual { display: none; }
}

@media (max-width: 560px) {
  .hero-title { font-size: clamp(2rem, 8vw, 2.8rem); }
  .hero-stats { gap: 1.5rem; }
  .hero-cta { flex-direction: column; align-items: center; width: 100%; }
  .hero-cta .btn { width: 100%; justify-content: center; text-align: center; }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--orange-glow);
  border: 1px solid rgba(255,102,0,0.2);
  border-radius: var(--radius-pill);
  padding: 0.35rem 0.9rem;
  margin-bottom: 1.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--orange-deep);
  letter-spacing: 0.04em;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  background: var(--orange);
  border-radius: 50%;
  animation: pulse 1.8s ease infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.07;
  letter-spacing: -0.03em;
  color: var(--slate);
  margin-bottom: 1.5rem;
}

.hero-title .highlight {
  color: var(--orange);
  position: relative;
}

.hero-subtitle {
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  font-weight: 300;
  line-height: 1.7;
  color: var(--slate-light);
  margin-bottom: 2.5rem;
  max-width: 520px;
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: 2.5rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.hero-stat {}
.hero-stat-num {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--slate);
  line-height: 1;
}
.hero-stat-label {
  font-size: 0.78rem;
  color: var(--gray-subtle);
  margin-top: 0.25rem;
  font-weight: 400;
}

/* ── Cards ── */
.card {
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition);
}

.card:hover {
  border-color: rgba(255,102,0,0.3);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--orange-glow);
  color: var(--orange);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 1.25rem;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--slate);
  margin-bottom: 0.6rem;
}

.card-text {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--gray-subtle);
}

/* ── Divider ── */
.divider {
  width: 100%;
  height: 1px;
  background: var(--gray-border);
  margin-block: 0;
}

.divider-orange {
  height: 3px;
  background: linear-gradient(90deg, var(--orange), var(--orange-light), transparent);
  border: none;
}

/* ── Badges & Tags ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-orange { background: var(--orange-glow); color: var(--orange-deep); }
.badge-slate  { background: var(--slate-mist); color: var(--slate-mid); }
.badge-green  { background: rgba(16,185,129,0.12); color: #065f46; }

/* ── Country Tag Grid ── */
.country-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.country-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.8rem;
  background: var(--gray-bg);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--slate-light);
  transition: all var(--transition);
}

.country-tag:hover {
  background: var(--orange-glow);
  border-color: rgba(255,102,0,0.3);
  color: var(--orange-deep);
}

.country-tag.active {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--white);
}

/* ── Banner / Alert Bar ── */
.top-banner {
  background: var(--slate);
  color: rgba(255,255,255,0.85);
  text-align: center;
  padding: 0.55rem 1rem;
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.top-banner strong { color: var(--orange); font-weight: 700; }

.top-banner a {
  color: rgba(255,255,255,0.7);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--transition);
}

.top-banner a:hover { color: var(--orange); }

/* ── CTA Section ── */
.cta-section {
  background: var(--slate);
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse 60% 80% at 80% 50%, rgba(255,102,0,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 40% 60% at 20% 50%, rgba(255,102,0,0.06) 0%, transparent 60%);
  pointer-events: none;
}

.cta-section .container { position: relative; z-index: 1; }

.cta-section h2 { color: var(--white); }
.cta-section .lead { color: rgba(255,255,255,0.6); }

/* ── Footer ── */
.site-footer {
  background: var(--slate);
  color: rgba(255,255,255,0.65);
  padding-block: 3.5rem 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-brand-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 0.75rem;
}

.footer-tagline {
  font-size: 0.85rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.45);
  margin-bottom: 1.25rem;
}

.footer-col-title {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-bottom: 1rem;
}

.footer-links { display: flex; flex-direction: column; gap: 0.55rem; }

.footer-links a {
  font-size: 0.87rem;
  color: rgba(255,255,255,0.6);
  transition: color var(--transition);
}

.footer-links a:hover { color: var(--orange); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-copy {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
}

/* ── Utility Classes ── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-8 { margin-bottom: 2rem; }

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.animate-fade-up   { animation: fadeUp 0.6s cubic-bezier(0.22,1,0.36,1) both; }
.animate-fade-in   { animation: fadeIn 0.5s ease both; }

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
