/* Retail Shelf Growth - Premium Design System */

:root {
  --navy: #0b1f3a;
  --navy-deep: #061220;
  --navy-mid: #143052;
  --navy-soft: #1a3a5c;
  --coral: #e85a2c;
  --coral-hot: #ff6b3d;
  --coral-deep: #c4451a;
  --cream: #f7f5f2;
  --cream-dark: #ebe7e1;
  --white: #ffffff;
  --slate: #4a5568;
  --slate-light: #718096;
  --slate-muted: #a0aec0;
  --success: #0d9488;
  --chart-blue: #3b82f6;
  --chart-orange: #f97316;
  --chart-purple: #8b5cf6;
  --chart-red: #ef4444;
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, sans-serif;
  --shadow-sm: 0 1px 2px rgba(11, 31, 58, 0.05);
  --shadow-md: 0 8px 24px rgba(11, 31, 58, 0.08);
  --shadow-lg: 0 20px 50px rgba(11, 31, 58, 0.12);
  --shadow-glow: 0 0 40px rgba(232, 90, 44, 0.25);
  --radius: 1rem;
  --radius-lg: 1.5rem;
  --header-h: 96px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--navy);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection {
  background: rgba(232, 90, 44, 0.2);
  color: var(--navy);
}

/* Typography */
.font-display {
  font-family: var(--font-display);
}

h1,
h2,
h3,
h4,
.heading {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

/* Grain overlay */
.grain::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.035;
  pointer-events: none;
  z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 180px;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease),
    backdrop-filter 0.35s var(--ease);
}

.site-header.scrolled {
  background: rgba(247, 245, 242, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(11, 31, 58, 0.06);
}

.site-header .nav-link {
  position: relative;
  font-weight: 500;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.88);
  transition: color 0.2s ease;
}

.site-header.scrolled .nav-link {
  color: var(--navy-mid);
}

.site-header .nav-link:hover,
.site-header .nav-link.active {
  color: var(--coral-hot);
}

.site-header.scrolled .nav-link:hover,
.site-header.scrolled .nav-link.active {
  color: var(--coral);
}

.site-header .nav-link.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  background: var(--coral);
  border-radius: 2px;
}

.logo-img {
  height: 72px;
  width: auto;
  max-width: min(360px, 62vw);
  object-fit: contain;
  object-position: left center;
  transition: opacity 0.3s var(--ease);
  /* Keep crisp on retina - avoid CSS filters that blur small text */
  image-rendering: auto;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
}

/* Dual logo: white wordmark on dark hero, full-color after scroll */
.logo-img-dark,
.logo-img-light {
  display: block;
}

.logo-img-light {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) translateZ(0);
  opacity: 0;
  pointer-events: none;
}

.site-header a[aria-label] {
  position: relative;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  max-width: min(360px, 66vw);
}

.site-header.scrolled .logo-img-dark {
  opacity: 0;
}

.site-header.scrolled .logo-img-light {
  opacity: 1;
}

.site-header:not(.scrolled) .menu-toggle span {
  background: #fff;
}

.site-header:not(.scrolled) .btn-primary {
  box-shadow: 0 8px 24px rgba(232, 90, 44, 0.45);
}

/* Laptop / tablet: larger logo */
@media (min-width: 768px) {
  .logo-img {
    height: 78px;
    max-width: 380px;
  }

  .site-header a[aria-label] {
    max-width: 380px;
  }
}

@media (min-width: 1024px) {
  .logo-img {
    height: 82px;
    max-width: 400px;
  }

  .site-header a[aria-label] {
    max-width: 400px;
  }
}

/* Mobile: larger + sharp */
@media (max-width: 640px) {
  .logo-img {
    height: 60px;
    max-width: min(270px, 72vw);
  }

  .site-header a[aria-label] {
    max-width: min(270px, 72vw);
  }
}

@media (max-width: 380px) {
  .logo-img {
    height: 54px;
    max-width: min(240px, 70vw);
  }
}

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--navy-deep);
  transform: translateX(100%);
  transition: transform 0.45s var(--ease);
  display: flex;
  flex-direction: column;
  padding: calc(var(--header-h) + 1.5rem) 1.5rem 2rem;
}

.mobile-menu.open {
  transform: translateX(0);
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy);
  transition: transform 0.3s var(--ease), opacity 0.3s ease;
}

.menu-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1;
  padding: 0.9rem 1.6rem;
  border-radius: 9999px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
}

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

.btn-primary {
  background: var(--coral);
  color: var(--white);
  box-shadow: 0 8px 24px rgba(232, 90, 44, 0.3);
}

.btn-primary:hover {
  background: var(--coral-hot);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
  color: var(--white);
}

.btn-secondary {
  background: transparent;
  color: var(--navy);
  border-color: rgba(11, 31, 58, 0.15);
}

.btn-secondary:hover {
  border-color: var(--navy);
  background: var(--navy);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-white {
  background: var(--white);
  color: var(--navy);
  box-shadow: var(--shadow-md);
}

.btn-white:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: var(--coral);
}

.btn-outline-white {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.35);
}

.btn-outline-white:hover {
  background: var(--white);
  color: var(--navy);
  border-color: var(--white);
  transform: translateY(-2px);
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding-top: var(--header-h);
  overflow: hidden;
  background: linear-gradient(
    145deg,
    var(--navy-deep) 0%,
    var(--navy) 45%,
    var(--navy-mid) 100%
  );
}

.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 72% center;
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}

.hero-photo-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    105deg,
    rgba(6, 18, 32, 0.97) 0%,
    rgba(11, 31, 58, 0.88) 42%,
    rgba(11, 31, 58, 0.55) 68%,
    rgba(11, 31, 58, 0.35) 100%
  );
}

.hero-grid {
  position: absolute;
  inset: 0;
  z-index: 2;
  background-image: linear-gradient(
      rgba(255, 255, 255, 0.03) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black, transparent);
  -webkit-mask-image: radial-gradient(
    ellipse 80% 70% at 50% 40%,
    black,
    transparent
  );
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 2;
}

/* Premium media frames */
.media-frame {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
  box-shadow:
    0 4px 6px -1px rgba(11, 31, 58, 0.08),
    0 24px 48px -12px rgba(11, 31, 58, 0.18);
}

.media-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(11, 31, 58, 0.06);
  pointer-events: none;
}

.page-hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.28;
  pointer-events: none;
}

.page-hero-media-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    145deg,
    rgba(6, 18, 32, 0.92) 0%,
    rgba(11, 31, 58, 0.88) 55%,
    rgba(20, 48, 82, 0.82) 100%
  );
  pointer-events: none;
}

.hero-orb-1 {
  width: 420px;
  height: 420px;
  background: rgba(232, 90, 44, 0.22);
  top: 10%;
  right: -5%;
}

.hero-orb-2 {
  width: 320px;
  height: 320px;
  background: rgba(59, 130, 246, 0.12);
  bottom: 10%;
  left: -5%;
}

/* Section helpers */
.section {
  padding: 5.5rem 0;
}

@media (min-width: 768px) {
  .section {
    padding: 7rem 0;
  }
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 1rem;
}

.section-label::before {
  content: "";
  width: 1.5rem;
  height: 2px;
  background: var(--coral);
  border-radius: 2px;
}

/* Cards */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(11, 31, 58, 0.06);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease),
    border-color 0.35s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(232, 90, 44, 0.2);
}

.service-card .icon-wrap {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    rgba(232, 90, 44, 0.12),
    rgba(232, 90, 44, 0.04)
  );
  color: var(--coral);
  transition: background 0.3s ease, color 0.3s ease, transform 0.3s var(--ease);
}

.service-card:hover .icon-wrap {
  background: var(--coral);
  color: var(--white);
  transform: scale(1.05);
}

/* Case study cards */
.case-card {
  position: relative;
  overflow: hidden;
}

.case-card .case-metric {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.75rem;
  color: var(--coral);
  letter-spacing: -0.02em;
}

.case-card .tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.3rem 0.7rem;
  border-radius: 9999px;
  background: rgba(11, 31, 58, 0.06);
  color: var(--navy-mid);
}

/* Platform pills */
.platform-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  background: var(--white);
  border: 1px solid rgba(11, 31, 58, 0.08);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--navy-mid);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease), border-color 0.25s ease;
}

.platform-pill:hover {
  transform: translateY(-2px);
  border-color: var(--coral);
}

/* Stats */
.stat-value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.03em;
  line-height: 1;
  background: linear-gradient(135deg, var(--coral) 0%, #ff8a5c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Testimonials */
.testimonial-card {
  position: relative;
}

.testimonial-card::before {
  content: "\201C";
  font-family: var(--font-display);
  font-size: 5rem;
  line-height: 1;
  color: rgba(232, 90, 44, 0.15);
  position: absolute;
  top: 0.5rem;
  left: 1.25rem;
}

/* Forms */
.form-input {
  width: 100%;
  padding: 0.9rem 1.1rem;
  border-radius: 0.75rem;
  border: 1.5px solid rgba(11, 31, 58, 0.12);
  background: var(--white);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--navy);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

.form-input:focus {
  border-color: var(--coral);
  box-shadow: 0 0 0 4px rgba(232, 90, 44, 0.12);
}

.form-input::placeholder {
  color: var(--slate-muted);
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--navy-mid);
  margin-bottom: 0.4rem;
}

textarea.form-input {
  min-height: 140px;
  resize: vertical;
}

/* Footer */
.site-footer {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.75);
}

.site-footer a {
  color: rgba(255, 255, 255, 0.75);
  transition: color 0.2s ease;
}

.site-footer a:hover {
  color: var(--coral-hot);
}

/* Scroll animations */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

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

.reveal-delay-1 {
  transition-delay: 0.1s;
}
.reveal-delay-2 {
  transition-delay: 0.2s;
}
.reveal-delay-3 {
  transition-delay: 0.3s;
}
.reveal-delay-4 {
  transition-delay: 0.4s;
}
.reveal-delay-5 {
  transition-delay: 0.5s;
}

/* Page hero (inner pages) */
.page-hero {
  position: relative;
  padding: calc(var(--header-h) + 4rem) 0 4rem;
  background: linear-gradient(
    145deg,
    var(--navy-deep) 0%,
    var(--navy) 60%,
    var(--navy-mid) 100%
  );
  overflow: hidden;
}

/* Process steps */
.process-step {
  position: relative;
}

.process-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 3rem;
  line-height: 1;
  color: rgba(232, 90, 44, 0.15);
}

/* Result bars / metric callouts */
.metric-box {
  background: linear-gradient(
    135deg,
    rgba(232, 90, 44, 0.08),
    rgba(232, 90, 44, 0.02)
  );
  border: 1px solid rgba(232, 90, 44, 0.15);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}

.metric-box .value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.75rem;
  color: var(--coral);
  letter-spacing: -0.02em;
}

/* Timeline for case studies */
.timeline-item {
  position: relative;
  padding-left: 1.75rem;
  border-left: 2px solid rgba(232, 90, 44, 0.25);
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 0.35rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 4px rgba(232, 90, 44, 0.15);
}

/* Divider accent */
.accent-line {
  width: 3rem;
  height: 3px;
  background: var(--coral);
  border-radius: 2px;
}

/* Marketplace strip */
.marquee-track {
  display: flex;
  gap: 2rem;
  animation: marquee 28s linear infinite;
  width: max-content;
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Form success */
.form-success {
  display: none;
}

.form-success.show {
  display: block;
}

.form-wrap.hide {
  display: none;
}

/* Utility */
.text-balance {
  text-wrap: balance;
}

.bg-navy {
  background-color: var(--navy);
}

.bg-navy-deep {
  background-color: var(--navy-deep);
}

.bg-cream {
  background-color: var(--cream);
}

.text-coral {
  color: var(--coral);
}

.text-navy {
  color: var(--navy);
}

/* Focus visible for a11y */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 3px;
}

/* Smooth image */
img {
  max-width: 100%;
  height: auto;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--cream-dark);
}
::-webkit-scrollbar-thumb {
  background: var(--navy-soft);
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--coral);
}
