/* ============================================
   BRANDXB — MAIN STYLESHEET
   Design System & Global Styles
   ============================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Montserrat:wght@400;600;700;800;900&display=swap');

/* ============================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================ */
:root {
  /* Brand Colors */
  --color-bg:           #080B14;
  --color-bg-2:         #0D1120;
  --color-bg-3:         #111827;
  --color-surface:      #141928;
  --color-surface-2:    #1C2236;
  --color-border:       rgba(255,255,255,0.07);
  --color-border-hover: rgba(255,255,255,0.15);

  /* Primary accent — gold */
  --color-gold:         #C9A84C;
  --color-gold-light:   #E4C06E;
  --color-gold-dim:     rgba(201,168,76,0.12);

  /* Sub-brand: FoodXB — warm terracotta */
  --color-food:         #E8622A;
  --color-food-light:   #FF8050;
  --color-food-dim:     rgba(232,98,42,0.12);

  /* Sub-brand: Connext — electric violet */
  --color-connext:      #7B5CF0;
  --color-connext-light:#9B7DFF;
  --color-connext-dim:  rgba(123,92,240,0.12);

  /* Typography */
  --color-white:        #FFFFFF;
  --color-text:         #E2E8F0;
  --color-text-muted:   #8892A4;
  --color-text-subtle:  #4A5568;

  /* Typography Scale */
  --font-sans:   'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display:'Montserrat', 'Inter', sans-serif;

  --text-xs:    0.75rem;
  --text-sm:    0.875rem;
  --text-base:  1rem;
  --text-lg:    1.125rem;
  --text-xl:    1.25rem;
  --text-2xl:   1.5rem;
  --text-3xl:   1.875rem;
  --text-4xl:   2.25rem;
  --text-5xl:   3rem;
  --text-6xl:   3.75rem;
  --text-7xl:   4.5rem;
  --text-8xl:   6rem;
  --text-9xl:   8rem;

  /* Spacing */
  --space-1:    0.25rem;
  --space-2:    0.5rem;
  --space-3:    0.75rem;
  --space-4:    1rem;
  --space-5:    1.25rem;
  --space-6:    1.5rem;
  --space-8:    2rem;
  --space-10:   2.5rem;
  --space-12:   3rem;
  --space-16:   4rem;
  --space-20:   5rem;
  --space-24:   6rem;
  --space-32:   8rem;
  --space-40:   10rem;

  /* Layout */
  --container-sm:  640px;
  --container-md:  768px;
  --container-lg:  1024px;
  --container-xl:  1280px;
  --container-2xl: 1440px;
  --container-max: 1560px;

  /* Borders */
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-xl:  16px;
  --radius-2xl: 24px;
  --radius-full:9999px;

  /* Shadows */
  --shadow-sm:  0 1px 2px rgba(0,0,0,0.4);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg:  0 8px 32px rgba(0,0,0,0.6);
  --shadow-xl:  0 16px 64px rgba(0,0,0,0.7);
  --shadow-gold:0 8px 32px rgba(201,168,76,0.2);

  /* Transitions */
  --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:cubic-bezier(0.45, 0, 0.55, 1);
  --duration-fast:  150ms;
  --duration-base:  300ms;
  --duration-slow:  500ms;
  --duration-xslow: 800ms;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

input, textarea, select {
  font-family: inherit;
}

/* ============================================
   LAYOUT UTILITIES
   ============================================ */
.container {
  width: 100%;
  max-width: var(--container-2xl);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-8);
  padding-right: var(--space-8);
}

.container--narrow {
  max-width: var(--container-xl);
}

.section {
  padding-top: var(--space-32);
  padding-bottom: var(--space-32);
}

.section--lg {
  padding-top: var(--space-40);
  padding-bottom: var(--space-40);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
.display-xl {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 8vw, var(--text-9xl));
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--color-white);
}

.display-lg {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5.5vw, var(--text-8xl));
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--color-white);
}

.display-md {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, var(--text-6xl));
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--color-white);
}

.heading-xl {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, var(--text-5xl));
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--color-white);
}

.heading-lg {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, var(--text-4xl));
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--color-white);
}

.heading-md {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw, var(--text-3xl));
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-white);
}

.body-lg {
  font-size: var(--text-xl);
  line-height: 1.7;
  color: var(--color-text-muted);
}

.body-base {
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-text-muted);
}

.label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.label--gold { color: var(--color-gold); }
.label--food { color: var(--color-food); }
.label--connext { color: var(--color-connext); }

/* Text gradient */
.text-gradient-gold {
  background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-food {
  background: linear-gradient(135deg, var(--color-food) 0%, var(--color-food-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-connext {
  background: linear-gradient(135deg, var(--color-connext) 0%, var(--color-connext-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: background var(--duration-base) var(--ease-out),
              backdrop-filter var(--duration-base) var(--ease-out),
              border-color var(--duration-base) var(--ease-out);
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(8, 11, 20, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: var(--color-border);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  max-width: var(--container-2xl);
  margin: 0 auto;
  padding: 0 var(--space-8);
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

.nav__logo-img {
  width: 38px;
  height: 38px;
  display: block;
  flex-shrink: 0;
  object-fit: contain;
}

.nav__logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-xl);
  color: var(--color-white);
  letter-spacing: -0.02em;
}

.nav__logo-text span {
  color: var(--color-gold);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.nav__link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  transition: color var(--duration-fast), background var(--duration-fast);
  position: relative;
}

.nav__link:hover,
.nav__link.active {
  color: var(--color-white);
  background: rgba(255,255,255,0.05);
}

/* Dropdown */
.nav__dropdown {
  position: relative;
}

.nav__dropdown-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.nav__dropdown-toggle svg {
  width: 14px;
  height: 14px;
  transition: transform var(--duration-fast);
}

.nav__dropdown:hover .nav__dropdown-toggle svg {
  transform: rotate(180deg);
}

.nav__dropdown-menu {
  position: absolute;
  top: calc(100% + var(--space-3));
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-3);
  min-width: 260px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-base) var(--ease-out),
              transform var(--duration-base) var(--ease-out);
  box-shadow: var(--shadow-xl);
}

.nav__dropdown:hover .nav__dropdown-menu {
  opacity: 1;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
}

.nav__dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  transition: background var(--duration-fast);
}

.nav__dropdown-item:hover {
  background: rgba(255,255,255,0.05);
}

.nav__dropdown-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: var(--text-sm);
  font-weight: 800;
  font-family: var(--font-display);
}

.nav__dropdown-icon--food {
  background: var(--color-food-dim);
  color: var(--color-food);
}

.nav__dropdown-icon--connext {
  background: var(--color-connext-dim);
  color: var(--color-connext);
}

.nav__dropdown-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav__dropdown-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-white);
}

.nav__dropdown-desc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* Hamburger */
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-2);
  cursor: pointer;
}

.nav__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: transform var(--duration-base), opacity var(--duration-base);
}

.nav__hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__hamburger.open span:nth-child(2) { opacity: 0; }
.nav__hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav */
.nav__mobile {
  display: none;
  position: fixed;
  top: 80px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-bg);
  padding: var(--space-8);
  flex-direction: column;
  gap: var(--space-2);
  overflow-y: auto;
  z-index: 999;
}

.nav__mobile.open {
  display: flex;
}

.nav__mobile-link {
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--color-text-muted);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--color-border);
  transition: color var(--duration-fast);
}

.nav__mobile-link:hover { color: var(--color-white); }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: var(--font-sans);
  transition: all var(--duration-base) var(--ease-out);
  white-space: nowrap;
  cursor: pointer;
}

.btn--primary {
  background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-light) 100%);
  color: var(--color-bg);
  box-shadow: 0 4px 20px rgba(201,168,76,0.3);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(201,168,76,0.45);
}

.btn--ghost {
  background: transparent;
  color: var(--color-white);
  border: 1px solid var(--color-border);
}

.btn--ghost:hover {
  border-color: var(--color-border-hover);
  background: rgba(255,255,255,0.05);
  transform: translateY(-2px);
}

.btn--food {
  background: linear-gradient(135deg, var(--color-food) 0%, var(--color-food-light) 100%);
  color: var(--color-white);
  box-shadow: 0 4px 20px rgba(232,98,42,0.3);
}

.btn--food:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(232,98,42,0.45);
}

.btn--connext {
  background: linear-gradient(135deg, var(--color-connext) 0%, var(--color-connext-light) 100%);
  color: var(--color-white);
  box-shadow: 0 4px 20px rgba(123,92,240,0.3);
}

.btn--connext:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(123,92,240,0.45);
}

.btn--lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
}

.btn--sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
}

.btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform var(--duration-fast);
}

.btn:hover svg.btn-arrow {
  transform: translateX(3px);
}

/* ============================================
   CARDS
   ============================================ */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  transition: border-color var(--duration-base), transform var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out);
}

.card:hover {
  border-color: var(--color-border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.card__body {
  padding: var(--space-8);
}

/* ============================================
   SECTION HEADER
   ============================================ */
.section-header {
  margin-bottom: var(--space-16);
}

.section-header--center {
  text-align: center;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--space-16);
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.section-eyebrow::before {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

/* ============================================
   NOISE TEXTURE OVERLAY
   ============================================ */
.noise-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* ============================================
   GRADIENT ORBS (Background decoration)
   ============================================ */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

.orb--gold {
  background: radial-gradient(circle, rgba(201,168,76,0.2) 0%, transparent 70%);
}

.orb--food {
  background: radial-gradient(circle, rgba(232,98,42,0.15) 0%, transparent 70%);
}

.orb--connext {
  background: radial-gradient(circle, rgba(123,92,240,0.15) 0%, transparent 70%);
}

/* ============================================
   DIVIDERS
   ============================================ */
.divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 0;
}

/* ============================================
   STATS
   ============================================ */
.stat-number {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--color-white);
}

/* ============================================
   TAGS / CHIPS
   ============================================ */
.tag {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.tag--gold {
  background: var(--color-gold-dim);
  color: var(--color-gold-light);
  border: 1px solid rgba(201,168,76,0.2);
}

.tag--food {
  background: var(--color-food-dim);
  color: var(--color-food-light);
  border: 1px solid rgba(232,98,42,0.2);
}

.tag--connext {
  background: var(--color-connext-dim);
  color: var(--color-connext-light);
  border: 1px solid rgba(123,92,240,0.2);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--color-bg-2);
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-20);
  padding-bottom: var(--space-10);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--space-16);
  margin-bottom: var(--space-16);
}

.footer__brand-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-top: var(--space-4);
  margin-bottom: var(--space-6);
}

.footer__heading {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-subtle);
  margin-bottom: var(--space-5);
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer__link {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  transition: color var(--duration-fast);
}

.footer__link:hover {
  color: var(--color-white);
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-border);
  gap: var(--space-4);
  flex-wrap: wrap;
}

.footer__copy {
  font-size: var(--text-sm);
  color: var(--color-text-subtle);
}

.footer__social {
  display: flex;
  gap: var(--space-3);
}

.footer__social-link {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  transition: all var(--duration-fast);
}

.footer__social-link:hover {
  border-color: var(--color-gold);
  color: var(--color-gold);
  background: var(--color-gold-dim);
}

.footer__social-link svg {
  width: 16px;
  height: 16px;
}

.footer__sub-brands {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-4);
}

.footer__sub-brand-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  font-size: var(--text-xs);
  font-weight: 700;
  font-family: var(--font-display);
  transition: all var(--duration-fast);
}

.footer__sub-brand-badge--food {
  color: var(--color-food);
}

.footer__sub-brand-badge--food:hover {
  background: var(--color-food-dim);
  border-color: rgba(232,98,42,0.3);
}

.footer__sub-brand-badge--connext {
  color: var(--color-connext);
}

.footer__sub-brand-badge--connext:hover {
  background: var(--color-connext-dim);
  border-color: rgba(123,92,240,0.3);
}

/* ============================================
   ANIMATIONS
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--duration-xslow) var(--ease-out),
              transform var(--duration-xslow) var(--ease-out);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 100ms; }
.reveal-delay-2 { transition-delay: 200ms; }
.reveal-delay-3 { transition-delay: 300ms; }
.reveal-delay-4 { transition-delay: 400ms; }
.reveal-delay-5 { transition-delay: 500ms; }

/* Scale reveal */
.reveal-scale {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity var(--duration-xslow) var(--ease-out),
              transform var(--duration-xslow) var(--ease-out);
}

.reveal-scale.revealed {
  opacity: 1;
  transform: scale(1);
}

/* ============================================
   CURSOR
   ============================================ */
.cursor {
  position: fixed;
  width: 10px;
  height: 10px;
  background: var(--color-gold);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.1s, width 0.3s, height 0.3s, opacity 0.3s;
  mix-blend-mode: difference;
}

.cursor-follower {
  position: fixed;
  width: 36px;
  height: 36px;
  border: 1.5px solid rgba(201,168,76,0.5);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: all 0.15s var(--ease-out);
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--color-surface-2);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-subtle);
}

/* ============================================
   SELECTION
   ============================================ */
::selection {
  background: var(--color-gold-dim);
  color: var(--color-gold-light);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .container {
    padding-left: var(--space-6);
    padding-right: var(--space-6);
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-10);
  }
}

@media (max-width: 768px) {
  .nav__links,
  .nav__actions {
    display: none;
  }

  .nav__hamburger {
    display: flex;
  }

  .section {
    padding-top: var(--space-20);
    padding-bottom: var(--space-20);
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .footer__bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .container {
    padding-left: var(--space-5);
    padding-right: var(--space-5);
  }
}
