/* ============================================================
   Homepage / Landing Template Tokens & Overrides
   Loaded only on: front page + Homepage page template
   ============================================================ */

:root {
  /* Primary color override for landing design (v5_04 navy) */
  --brand-primary:       #1052a2;
  --brand-primary-hover: #0b3f80;

  /* Font override for landing design */
  --font-family-body:  Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-family-title: 'IBM Plex Sans', sans-serif;

  /* Landing-specific tokens not in brand.css */
  --cby-primary:    #1052a2;
  --cby-primary-2:  #0b3f80;
  --cby-accent:     #04b4e2;
  --cby-ink:        #102033;
  --cby-line:       rgba(16, 32, 51, 0.1);
  --cby-radius-sm:  14px;
  --cby-section-y:  112px;

  /* Landing gradient presets */
  --cby-gradient:        linear-gradient(135deg, var(--cby-primary), var(--mod-finance) 42%, var(--mod-hr));
  --cby-gradient-warm:   linear-gradient(135deg, var(--mod-finance), var(--mod-retail) 42%, var(--mod-sales));
  --cby-gradient-hot:    linear-gradient(135deg, var(--mod-project), var(--mod-asset) 48%, var(--mod-production));
  --cby-gradient-candy:  linear-gradient(135deg, var(--mod-finance), var(--mod-project) 38%, var(--mod-asset) 68%, var(--mod-production));

  /* .section-soft background variables */
  --cby-section-soft-glow-1: rgba(255, 193, 61, 0.22);
  --cby-section-soft-glow-2: rgba(18, 183, 200, 0.2);
  --cby-section-soft-glow-3: rgba(232, 11, 109, 0.11);
  --cby-section-soft-base:   var(--brand-wash);
  --cby-section-soft-bg:
    radial-gradient(circle at 8% 18%,  var(--cby-section-soft-glow-1), transparent 28%),
    radial-gradient(circle at 92% 15%, var(--cby-section-soft-glow-2), transparent 30%),
    radial-gradient(circle at 72% 88%, var(--cby-section-soft-glow-3), transparent 26%),
    var(--cby-section-soft-base);
}

/* Responsive --cby-section-y override */
@media (max-width: 991.98px) {
  :root { --cby-section-y: 86px; }
}

@media (max-width: 767.98px) {
  :root { --cby-section-y: 72px; }
}

/* Page-wide ambient gradient (full-page decorative backdrop) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(circle at 6%  12%, rgba(28, 154, 221, 0.12), transparent 28%),
    radial-gradient(circle at 96% 10%, rgba(232, 11, 109, 0.1),  transparent 24%),
    radial-gradient(circle at 50% 100%, rgba(255, 193, 61, 0.1), transparent 28%);
}

.section-pad {
  padding: var(--cby-section-y) 0;
}

.section-soft {
  background: var(--cby-section-soft-bg);
}

.section-gradient-soft {
  background: var(--cby-gradient-soft);
}

.container-wide {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}
.container-wider {
  width: min(1400px, calc(100% - 32px));
  margin-inline: auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--cby-accent);
  font-weight: 750;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  border-radius: 99px;
  background: currentColor;
}

.section-title {
  color: var(--cby-primary);
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.06;
  letter-spacing: -0.045em;
  font-weight: 850;
  margin-bottom: 18px;
}

.section-copy {
  color: var(--brand-muted);
  font-size: 1.05rem;
  max-width: 720px;
}

.text-balance {
  text-wrap: balance;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cby-primary);
  font-weight: 800;
}

.link-arrow i {
  transition: transform 180ms ease;
}

.link-arrow:hover i {
  transform: translateX(4px);
}

.btn-cby-primary,
.btn-cby-ghost,
.btn-cby-white,
.btn-cby-outline {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 999px;
  font-weight: 750;
  padding: 0.8rem 1.28rem;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}
.btn-cby-primary:hover,
.btn-cby-ghost:hover,
.btn-cby-white:hover,
.btn-cby-outline:hover {
  text-decoration: none;
}

.btn-cby-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--cby-primary) 0%, var(--mod-finance) 52%, var(--mod-hr) 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 16px 38px rgba(16, 82, 162, 0.24), 0 10px 26px rgba(18, 183, 200, 0.16);
  background-size: 135% 135%;
}

.btn-cby-primary:hover {
  color: #ffffff;
  background-position: 100% 50%;
  border-color: rgba(255, 255, 255, 0.24);
  transform: translateY(-2px);
  box-shadow: 0 20px 48px rgba(16, 82, 162, 0.28), 0 14px 34px rgba(18, 183, 200, 0.2);
}

.btn-cby-ghost {
  color: var(--cby-primary);
  background: rgba(4, 180, 226, 0.09);
  border: 1px solid rgba(4, 180, 226, 0.22);
}

.btn-cby-ghost:hover {
  color: var(--cby-primary);
  background: rgba(4, 180, 226, 0.16);
  transform: translateY(-2px);
}

.btn-cby-white {
  color: var(--cby-primary);
  background: linear-gradient(135deg, #ffffff, #eefaff);
  border: 1px solid rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 34px rgba(4, 180, 226, 0.12);
}

.btn-cby-white:hover {
  color: var(--cby-primary);
  transform: translateY(-2px);
  box-shadow: 0 15px 44px rgba(0, 0, 0, 0.18);
}

.btn-cby-outline {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.56);
  background: transparent;
}

.btn-cby-outline:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 650ms ease, transform 650ms ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ---------------------------------------------- */

/* Body and heading overrides — scoped so they don't bleed into other templates */
.homepage-wrapper {
  color: var(--cby-ink);
  letter-spacing: -0.01em;
}

.homepage-wrapper h1,
.homepage-wrapper h2,
.homepage-wrapper h3,
.homepage-wrapper h4,
.homepage-wrapper h5,
.homepage-wrapper h6,
.homepage-wrapper .section-title,
.homepage-wrapper .dash-content h3,
.homepage-wrapper .mini-panel-title {
  font-family: var(--font-family-title);
}

/* Hero Layout styles */
.hero-band {
  background-color: var(--brand-wash);
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.1;
  color: var(--brand-secondary);
}

.hero-lead {
  font-size: 1.2rem;
  color: var(--brand-muted);
}

/* Dashboard Panel Component */
.system-dashboard {
  background: var(--brand-deep);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
  font-family: monospace;
}

.dash-controls .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-left: 4px;
}

.dash-code {
  font-size: 0.9rem;
  line-height: 1.5;
  background: transparent;
  border: none;
  padding: 0;
}

/* Grid & Feature Sections */
.split-story-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4rem;
  align-items: center;
}

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

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

.mosaic-large {
  grid-column: span 2;
  grid-row: span 2;
}

/* Responsive Overrides */
@media (max-width: 991.98px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .split-story-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .module-mosaic {
    grid-template-columns: repeat(2, 1fr);
  }
  .mosaic-large {
    grid-column: span 2;
  }
}

@media (max-width: 575.98px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .module-mosaic {
    grid-template-columns: 1fr;
  }
}