/* ═══════════════════════════════════════════════════
   PepperSprint — Non-Tailwind Rules Only
   Fonts:  Sofia Sans (brand) · Trebuchet MS (titles) · Segoe UI (body)
   Orange: #F57C00
═══════════════════════════════════════════════════ */

/* ─── Tokens ─── */
:root {
  --color-bg: #0a0a0a;
  --color-elevated: #141414;
  --color-accent: #f57c00;
  --color-accent-dim: rgba(245, 124, 0, 0.12);
  --color-border: rgba(255, 255, 255, 0.08);
  --color-orange-section: #2c1204;
  --color-surface: #f2f3f5;
  --color-surface-2: #f2f3f5;
  --color-ink: #111111;
  --color-ink-muted: rgba(17, 17, 17, 0.7);
  --font-brand: "Sofia Sans", Arial, sans-serif;
  --font-title: "Trebuchet MS", Trebuchet, Arial, sans-serif;
  --font-sans: "Segoe UI", Roboto, system-ui, sans-serif;
}

/* ─── Reset ─── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: #fff;
  overflow-x: hidden;
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  display: block;
  max-width: 100%;
}
ul {
  list-style: none;
}

/* ─── Heading base ─── */
h1,
h2,
h3 {
  font-family: var(--font-title);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
h4,
h5,
h6 {
  font-family: var(--font-sans);
}

.ps-heading-fusion {
  color: #111;
}
@supports (-webkit-background-clip: text) {
  .ps-heading-fusion {
    background-image: linear-gradient(
      90deg,
      #0b0b0d 0%,
      #0b0b0d 45%,
      #f57c00 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

/* ─── Dot-grid background ─── */
.dot-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 80px 80px;
}
.dot-grid::after {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(
    ellipse 80% 60% at 50% 0%,
    rgba(245, 124, 0, 0.07) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.section-hero,
.section-pricing {
  isolation: isolate;
  overflow: hidden;
}
.section-hero::before,
.section-hero::after,
.section-pricing::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.section-hero {
  background: var(--color-bg);
  position: relative;
}
.section-hero::before {
  background:
    radial-gradient(
      ellipse 70% 70% at 18% 12%,
      rgba(245, 124, 0, 0.22),
      transparent 60%
    ),
    radial-gradient(
      ellipse 60% 55% at 84% 22%,
      rgba(245, 124, 0, 0.12),
      transparent 62%
    ),
    radial-gradient(
      ellipse 70% 70% at 50% 120%,
      rgba(255, 255, 255, 0.06),
      transparent 55%
    ),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 46%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.18) 0%, rgba(0, 0, 0, 0.7) 100%);
  transform: translate3d(-1.25%, -1%, 0) scale(1.02);
  transform-origin: 50% 20%;
  animation: ps-hero-float 18s ease-in-out infinite alternate;
}
.section-hero::after {
  background:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    radial-gradient(
      ellipse 55% 45% at 60% 10%,
      rgba(245, 124, 0, 0.08),
      transparent 65%
    ),
    radial-gradient(
      ellipse 80% 70% at 30% 95%,
      rgba(245, 124, 0, 0.06),
      transparent 70%
    );
  background-size:
    56px 56px,
    56px 56px,
    auto,
    auto;
  background-position: center, center, center, center;
  opacity: 0.32;
}
.section-pricing::before {
  background:
    radial-gradient(
      circle at 50% 100%,
      rgba(245, 124, 0, 0.08),
      transparent 34%
    ),
    linear-gradient(180deg, transparent 0%, rgba(245, 124, 0, 0.03) 100%);
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--color-bg);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ─── Lenis smooth scroll ─── */
html.lenis,
html.lenis body {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}
.lenis.lenis-stopped {
  overflow: hidden;
}

/* ─── Navigation ─── */
#main-nav {
  top: 0;
  transition: all 0.3s linear;
}
#main-nav.scrolled {
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  top: 0;
}
#main-nav.hide {
  transform: translateY(-130px);
}

/* ─── Mobile menu ─── */
.mobile-menu {
  display: none;
}
.mobile-menu.open {
  display: flex;
}

/* ─── Stats / Why Us section ─── */
.stats-section {
  background: var(--color-orange-section);
  position: relative;
  z-index: 1;
}
.stats-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* ─── Testimonial logo ─── */
.testimonial-logo {
  border-bottom: 2px solid transparent;
  transition:
    opacity 0.2s,
    border-color 0.2s;
}
.testimonial-logo.active {
  opacity: 1 !important;
  border-color: var(--color-accent);
}

/* ─── Tile square ─── */
.tile-square {
  aspect-ratio: 1 / 1;
}

/* ─── MARQUEE (trust logos) ─── */
.ps-marquee {
  overflow: hidden;
}
.ps-marquee__track {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  width: max-content;
  animation: marquee-scroll 40s linear infinite;
}
.ps-marquee__track:hover {
  animation-play-state: paused;
}
.ps-marquee__track > * {
  flex: 0 0 auto;
}
@keyframes marquee-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes ps-hero-float {
  from {
    transform: translate3d(-1.25%, -1%, 0) scale(1.02);
  }
  to {
    transform: translate3d(1.25%, 0.9%, 0) scale(1.06);
  }
}

.ps-hero-panel {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.02)
  );
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.ps-hero-card {
  border-radius: 34px;
  background:
    radial-gradient(
      ellipse 70% 55% at 18% 30%,
      rgba(245, 124, 0, 0.16),
      transparent 70%
    ),
    linear-gradient(
      115deg,
      rgba(230, 245, 255, 0.98) 0%,
      rgba(255, 246, 233, 0.98) 56%,
      rgba(247, 247, 255, 0.98) 100%
    );
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    0 60px 140px rgba(0, 0, 0, 0.7),
    0 20px 60px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}
.ps-hero-card__inner {
  padding: 40px 34px;
}
@media (max-width: 640px) {
  .ps-hero-card__inner {
    padding: 32px 22px;
  }
}

.ps-light,
.ps-white {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.ps-light {
  background: var(--color-surface);
  color: var(--color-ink);
}
.ps-white {
  background: var(--color-surface-2);
  color: var(--color-ink);
}
.ps-light::before,
.ps-white::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.ps-light::before {
  background:
    radial-gradient(
      ellipse 60% 55% at 18% 0%,
      rgba(0, 0, 0, 0.05),
      transparent 62%
    ),
    radial-gradient(
      ellipse 55% 45% at 84% 22%,
      rgba(0, 0, 0, 0.04),
      transparent 70%
    ),
    linear-gradient(180deg, rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0));
}
.ps-white::before {
  background:
    radial-gradient(
      ellipse 70% 60% at 15% 0%,
      rgba(0, 0, 0, 0.04),
      transparent 62%
    ),
    radial-gradient(
      ellipse 60% 50% at 88% 32%,
      rgba(0, 0, 0, 0.03),
      transparent 72%
    ),
    linear-gradient(180deg, rgba(0, 0, 0, 0.02), transparent 45%);
}
.ps-light > *,
.ps-white > * {
  position: relative;
  z-index: 1;
}

/* ─── Case studies horizontal scroll (desktop) ─── */
.ps-cases-marquee {
  overflow-x: auto;
}
.ps-cases-marquee::-webkit-scrollbar {
  display: none;
}
.ps-cases-marquee__track {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
}
.ps-cases-marquee__track > * {
  flex: 0 0 auto;
}

/* ─── Hero video background ─── */
.hero-video-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}

/* ─── Journey / Engagement flow ─── */
.journey-connector {
  position: absolute;
  top: 32px;
  left: 50%;
  right: -50%;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(245, 124, 0, 0.4),
    rgba(245, 124, 0, 0.1)
  );
}

/* ─── Phase 2 distinct background ─── */
.phase2-section {
  background: #1a1a1a;
  position: relative;
}
.phase2-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 60% 40% at 50% 50%,
    rgba(245, 124, 0, 0.04),
    transparent 70%
  );
  pointer-events: none;
}

/* ─── Why PepperSprint card ─── */
.why-card {
  transition:
    transform 0.3s ease,
    border-color 0.3s ease;
}
.why-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 124, 0, 0.3) !important;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.12);
}

/* ─── Tech table ─── */
.tech-row {
  transition: background 0.2s;
}
.tech-row:hover {
  background: rgba(0, 0, 0, 0.02);
}

/* ─── Case study card photo ─── */
.cs-card-photo {
  height: 200px;
  position: relative;
  overflow: hidden;
}

/* ─── Mobile overrides ─── */
@media (max-width: 768px) {
  .hero-proof {
    left: 16px !important;
    right: 16px !important;
    bottom: 16px !important;
  }
}
@media (max-width: 767px) {
  .grid > .border-r {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-left: 0;
    padding-right: 0;
  }
  .grid > .border-r:last-of-type {
    border-bottom: none;
  }
}
