/* ==========================================================================
   Section 2 — Spotlight panel + stats bento
   Homepage only. Loaded after styles.css and hero.css (uses their tokens:
   --color-*, --hero-brand-gradient).
   ========================================================================== */

.spotlight {
  padding: clamp(2rem, 5vh, 3.25rem) clamp(1rem, 3vw, 1.5rem)
    clamp(2.5rem, 6vh, 4rem);
  background: var(--color-bg);
}

.spotlight__panel {
  --panel-pad-y: clamp(1.75rem, 4vw, 2.75rem);
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(1rem, 2.5vw, 2rem);
  align-items: center;
  max-width: min(68rem, 100%);
  margin: 0 auto;
  padding: 0;
  border-radius: 24px;
  background: color-mix(in srgb, var(--color-border) 32%, #eef1f4 68%);
  overflow: hidden;
}

.spotlight__copy {
  max-width: 26rem;
  padding: var(--panel-pad-y) 0 var(--panel-pad-y) clamp(1rem, 3vw, 1.5rem);
}

.spotlight__title {
  margin: 0;
  font-size: clamp(1.65rem, 3.2vw, 2.35rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.spotlight__lead {
  margin: clamp(0.85rem, 2vh, 1.15rem) 0 0;
  font-size: clamp(0.95rem, 1.35vw, 1.05rem);
  line-height: 1.55;
  color: color-mix(in srgb, var(--color-text) 55%, var(--color-muted-text) 45%);
}

.spotlight__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.25rem);
  margin-top: clamp(1.35rem, 3vh, 1.75rem);
}

.spotlight__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.65rem 1.35rem;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.spotlight__btn--primary {
  color: var(--color-bg);
  background: var(--color-text);
  border: 1px solid var(--color-text);
}

.spotlight__btn--primary:hover {
  color: var(--color-bg);
  background: color-mix(in srgb, var(--color-text) 88%, var(--color-primary) 12%);
  border-color: color-mix(in srgb, var(--color-text) 88%, var(--color-primary) 12%);
}

.spotlight__btn--ghost {
  padding-inline: 0.25rem;
  color: var(--color-text);
  background: transparent;
  border: none;
  font-weight: 700;
}

.spotlight__btn--ghost:hover {
  color: var(--color-primary);
}

/* Mosaic = 2-column asymmetric bento holding the 5 stat boxes.
   Left column is inset top/bottom; right column bleeds to the panel edges. */
.spotlight__mosaic {
  --mosaic-gap: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--mosaic-gap);
  align-items: stretch;
}

.spotlight__col {
  display: flex;
  flex-direction: column;
  gap: var(--mosaic-gap);
  min-width: 0;
}

/* Both columns are the same height (grid stretch). The 2 right cards each
   grow to fill that full height, just as the 3 left cards do. */
.spotlight__col--right .stat-box {
  flex: 1;
}

/* Right column rounds only its inner (left) corners; outer edges stay square. */
.spotlight__col--right .stat-box:first-child {
  border-radius: 0 0 0 var(--stat-radius);
}

.spotlight__col--right .stat-box:last-child {
  border-radius: var(--stat-radius) 0 0 0;
}

/* Left column: top card rounds its bottom, bottom card rounds its top. */
.spotlight__col--left .stat-box:first-child {
  border-radius: 0 0 var(--stat-radius) var(--stat-radius);
}

.spotlight__col--left .stat-box:last-child {
  border-radius: var(--stat-radius) var(--stat-radius) 0 0;
}

.stat-box {
  --stat-radius: 14px;
  --stat-fg: var(--color-text);
  --stat-unit: var(--color-primary);
  --stat-muted: var(--color-muted-text);
  --stat-border: var(--color-border);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: var(--stat-radius);
  border: 0.5px solid var(--stat-border);
  padding: 18px 20px;
  color: var(--stat-fg);
}

/* Box themes — black, white, and the brand gradient. Text/border colors
   flip via the --stat-* custom properties so contrast stays readable. */
.stat-box--dark {
  background: #0f1115;
  border-color: rgba(255, 255, 255, 0.1);
  --stat-fg: #ffffff;
  --stat-unit: #8fc0ff;
  --stat-muted: rgba(255, 255, 255, 0.75);
  --stat-border: rgba(255, 255, 255, 0.28);
}

.stat-box--gradient {
  background: var(--hero-brand-gradient, linear-gradient(90deg, #4da3ff 0%, #5b4dff 100%));
  border-color: rgba(255, 255, 255, 0.22);
  --stat-fg: #ffffff;
  --stat-unit: #ffffff;
  --stat-muted: rgba(255, 255, 255, 0.9);
  --stat-border: rgba(255, 255, 255, 0.45);
}

.stat-box--light {
  background: #ffffff;
  --stat-fg: var(--color-text);
  --stat-unit: var(--color-primary);
  --stat-muted: var(--color-muted-text);
  --stat-border: var(--color-border);
}

/* Per-box assignment. */
.stat-box--experience {
  background: #0f1115;
  border-color: rgba(255, 255, 255, 0.1);
  --stat-fg: #ffffff;
  --stat-unit: #8fc0ff;
  --stat-muted: rgba(255, 255, 255, 0.75);
  --stat-border: rgba(255, 255, 255, 0.28);
}

.stat-box--delivery {
  background: var(--hero-brand-gradient, linear-gradient(90deg, #4da3ff 0%, #5b4dff 100%));
  border-color: rgba(255, 255, 255, 0.22);
  --stat-fg: #ffffff;
  --stat-unit: #ffffff;
  --stat-muted: rgba(255, 255, 255, 0.9);
  --stat-border: rgba(255, 255, 255, 0.45);
}

.stat-box--quote {
  background: #ffffff;
  --stat-fg: var(--color-text);
  --stat-unit: var(--color-primary);
  --stat-muted: var(--color-muted-text);
  --stat-border: var(--color-border);
}

.stat-box--automation {
  background: var(--hero-brand-gradient, linear-gradient(90deg, #4da3ff 0%, #5b4dff 100%));
  border-color: rgba(255, 255, 255, 0.22);
  --stat-fg: #ffffff;
  --stat-unit: #ffffff;
  --stat-muted: rgba(255, 255, 255, 0.9);
  --stat-border: rgba(255, 255, 255, 0.45);
}

.stat-box--platforms {
  background: #0f1115;
  border-color: rgba(255, 255, 255, 0.1);
  --stat-fg: #ffffff;
  --stat-unit: #8fc0ff;
  --stat-muted: rgba(255, 255, 255, 0.75);
  --stat-border: rgba(255, 255, 255, 0.28);
}

.stat-box--sm {
  min-height: 100px;
}

.stat-box--lg {
  min-height: 170px;
}

.stat-box__body {
  position: relative;
  z-index: 1;
}

.stat-box__number {
  margin: 0;
  font-size: 34px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--stat-fg);
}

.stat-box__unit {
  margin-left: 3px;
  font-size: 15px;
  font-weight: 700;
  color: var(--stat-unit);
}

.stat-box__label {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--stat-fg);
}

.stat-box__sub {
  margin: 3px 0 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--stat-muted);
}

.stat-box__tags {
  position: relative;
  z-index: 1;
}

.stat-box__tag {
  display: inline-block;
  margin: 8px 3px 0 0;
  padding: 3px 9px;
  border-radius: 20px;
  border: 0.5px solid var(--stat-border);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--stat-muted);
}

/* —— Mobile —— */
@media (max-width: 767px) {
  .spotlight {
    padding-inline: max(0.75rem, env(safe-area-inset-left, 0px))
      max(0.75rem, env(safe-area-inset-right, 0px));
  }

  .spotlight__panel {
    --panel-pad-y: 1.5rem;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: clamp(1.5rem, 5vw, 2rem);
  }

  .spotlight__copy {
    max-width: none;
    padding: 0;
  }

  .spotlight__mosaic {
    grid-template-columns: 1fr;
  }

  .stat-box,
  .stat-box--sm,
  .stat-box--lg {
    min-height: 120px;
  }

  .spotlight__col--right .stat-box {
    flex: none;
    min-height: 120px;
  }

  /* Stacked cards get full rounding (the split corners are desktop-only). */
  .spotlight__col--left .stat-box:first-child,
  .spotlight__col--left .stat-box:last-child,
  .spotlight__col--right .stat-box:first-child,
  .spotlight__col--right .stat-box:last-child {
    border-radius: var(--stat-radius);
  }
}

/* —— Large screens —— */
@media (min-width: 1440px) {
  .spotlight__panel {
    max-width: min(74rem, 100%);
  }

  .spotlight__copy {
    max-width: 29rem;
    padding-left: 2.5rem;
  }

  .spotlight__title {
    font-size: clamp(2rem, 3vw, 2.6rem);
  }

  .spotlight__lead {
    font-size: clamp(1rem, 1.3vw, 1.15rem);
  }

  .spotlight__mosaic {
    --mosaic-gap: 14px;
  }

  .stat-box {
    padding: 20px 22px;
  }

  .stat-box--sm {
    min-height: 118px;
  }

  .stat-box--lg {
    min-height: 196px;
  }

  .stat-box__number {
    font-size: 38px;
  }

  .stat-box__unit {
    font-size: 16px;
  }

  .stat-box__label {
    font-size: 14px;
  }

  .stat-box__sub {
    font-size: 12.5px;
  }

  .stat-box__tag {
    font-size: 11px;
  }
}

@media (min-width: 1920px) {
  .spotlight__panel {
    max-width: min(86rem, 100%);
  }

  .spotlight__copy {
    max-width: 33rem;
    padding-left: 3.5rem;
  }

  .spotlight__title {
    font-size: clamp(2.4rem, 2.8vw, 3.1rem);
  }

  .spotlight__lead {
    font-size: clamp(1.1rem, 1.2vw, 1.3rem);
  }

  .spotlight__btn {
    min-height: 3rem;
    font-size: 1rem;
  }

  .spotlight__mosaic {
    --mosaic-gap: 16px;
  }

  .stat-box {
    --stat-radius: 16px;
    padding: 24px 26px;
  }

  .stat-box--sm {
    min-height: 140px;
  }

  .stat-box--lg {
    min-height: 236px;
  }

  .stat-box__number {
    font-size: 46px;
  }

  .stat-box__unit {
    font-size: 19px;
  }

  .stat-box__label {
    font-size: 16px;
  }

  .stat-box__sub {
    font-size: 14px;
  }

  .stat-box__tag {
    font-size: 12px;
    padding: 4px 11px;
  }
}

@media (min-width: 2560px) {
  .spotlight__panel {
    max-width: min(108rem, 100%);
  }

  .spotlight__copy {
    max-width: 40rem;
    padding-left: 5rem;
  }

  .spotlight__title {
    font-size: clamp(3rem, 2.6vw, 3.8rem);
  }

  .spotlight__lead {
    font-size: clamp(1.3rem, 1.1vw, 1.55rem);
  }

  .spotlight__btn {
    min-height: 3.5rem;
    padding: 0.8rem 1.65rem;
    font-size: 1.15rem;
  }

  .spotlight__mosaic {
    --mosaic-gap: 20px;
  }

  .stat-box {
    --stat-radius: 20px;
    padding: 32px 34px;
  }

  .stat-box--sm {
    min-height: 180px;
  }

  .stat-box--lg {
    min-height: 300px;
  }

  .stat-box__number {
    font-size: 60px;
  }

  .stat-box__unit {
    font-size: 24px;
  }

  .stat-box__label {
    font-size: 20px;
  }

  .stat-box__sub {
    font-size: 17px;
  }

  .stat-box__tag {
    font-size: 14px;
    padding: 5px 13px;
  }
}

@media (min-width: 3140px) {
  .spotlight__panel {
    max-width: min(136rem, 100%);
  }

  .spotlight__copy {
    max-width: 48rem;
    padding-left: 6.5rem;
  }

  .spotlight__title {
    font-size: clamp(3.6rem, 2.4vw, 4.6rem);
  }

  .spotlight__lead {
    font-size: clamp(1.5rem, 1vw, 1.85rem);
  }

  .spotlight__btn {
    min-height: 3.75rem;
    padding: 0.85rem 1.85rem;
    font-size: 1.3rem;
  }

  .spotlight__mosaic {
    --mosaic-gap: 24px;
  }

  .stat-box {
    --stat-radius: 24px;
    padding: 40px 42px;
  }

  .stat-box--sm {
    min-height: 220px;
  }

  .stat-box--lg {
    min-height: 372px;
  }

  .stat-box__number {
    font-size: 76px;
  }

  .stat-box__unit {
    font-size: 30px;
  }

  .stat-box__label {
    font-size: 25px;
  }

  .stat-box__sub {
    font-size: 21px;
  }

  .stat-box__tag {
    font-size: 17px;
    padding: 6px 16px;
  }
}
