/* ============================================================
   Shared homepage section patterns
   Import in any section component that uses the sticky badge rail.

   Provides: .hp-section shell, .hp-rail sticky rail,
   .hp-badge pill, .hp-heading, .hp-body
   ============================================================ */


/* ---- Section shell ----------------------------------------
   Background-color is intentionally omitted — each section
   sets its own via a single-rule override. */

.hp-section {
  position:       relative;
  display:        flex;
  flex-direction: column;
  align-items:    center;
  gap:            4rem;      /* 64px */
  padding:        8rem 0;   /* 128px top + bottom */
  font-family:    var(--font-family-default);
  width:          100%;
  box-sizing:     border-box;
  scroll-margin-top: var(--nav-section-offset, 8rem);
}

/* Tablet (≤991px) */
@media (max-width: 991px) {
  .hp-section {
    padding: 6rem 0;
    gap:     3rem;
  }
}

/* Mobile (≤767px) */
@media (max-width: 767px) {
  .hp-section {
    padding: 4rem 0;
    gap:     2rem;
  }
}


/* ---- Sticky badge rail ------------------------------------
   Absolutely positioned inside the first .container, pushed
   left via right: calc(100% - 80px).  The offset skips the
   container's left padding so the rail anchors to the content
   edge rather than the padding edge.  .container has
   position: relative so the rail is bounded to the container's
   height — badge stops when the container ends.
   Width = gutter between container (1024px) and container-wide
   (1384px): (1384 − 1024) / 2 = 180px.
   Shown only at ≥1480px — when container-wide is at max-width
   and the gutter is a fixed, predictable size. */

.hp-rail {
  display:        none;
  position:       absolute;
  right:          calc(100% - 80px);   /* 80px = container left padding */
  top:            0;
  bottom:         0;
  width:          calc((1384px - 1024px) / 2);   /* 180px */
  pointer-events: none;
}

.hp-rail__sticky {
  position:        sticky;
  top:             var(--nav-section-offset, 8rem);
  display:         flex;
  justify-content: flex-end;
  align-items:     flex-start;
  padding-right:   12px;   /* 12px gap from the container's left edge */
}

@media (min-width: 1480px) {
  .hp-rail {
    display:         flex;
    justify-content: flex-start;
    align-items:     flex-start;
  }
}


/* ---- Badge pill -------------------------------------------
   Base pill used in the sticky rail and as the inline badge.
   .hp-badge--inline controls visibility relative to breakpoint. */

.hp-badge {
  display:         inline-flex;
  align-items:     center;
  justify-content: center;
  gap:             6px;
  height:          26px;
  padding:         0 var(--spacing-3);
  background:      var(--card);
  border-radius:   var(--radius-full);
  font-size:       var(--font-size-xs);
  font-weight:     var(--font-weight-medium);
  line-height:     var(--line-height-xs);
  color:           var(--foreground);
  white-space:     nowrap;
}

/* Inline variant — shown below 1488px, hidden at and above
   (matches the rail breakpoint so there is never a gap where
   neither badge is shown) */
.hp-badge--inline {
  margin-bottom: var(--spacing-6);
}

@media (min-width: 1480px) {
  .hp-badge--inline {
    display: none;
  }
}

@media (max-width: 767px) {
  .hp-badge--inline {
    margin-bottom: 1rem;
  }
}

/* Live indicator dot (DemoSection "Live demo" badge) */
.hp-badge__dot {
  display:          block;
  width:            6px;
  height:           6px;
  border-radius:    var(--radius-full);
  background-color: var(--primary);
  flex-shrink:      0;
}


/* ---- Section heading --------------------------------------
   36px regular weight; .fw-bold inside uses bold. */

.hp-heading {
  margin:      0;
  font-size:   2.25rem;
  font-weight: var(--font-weight-regular);
  line-height: 2.5rem;
  color:       var(--foreground);
}



/* ---- Section body text ------------------------------------
   20px regular — used in header intro blocks. */

.hp-body {
  margin:      0;
  font-size:   1.25rem;
  font-weight: var(--font-weight-regular);
  line-height: 1.75rem;
  color:       var(--foreground);
}

@media (max-width: 767px) {
  .hp-heading {
    font-size:   1.875rem;  /* 30px */
    line-height: 2.25rem;   /* 36px */
  }

  .hp-body {
    font-size:   1.125rem;  /* 18px */
    line-height: 1.75rem;   /* 28px */
  }
}


/* ---- Shared card shell ------------------------------------
   Secondary background + hairline border + 12px radius.
   Use alongside component class for layout-specific rules. */

.card-secondary {
  background:    var(--secondary);
  border:        0.5px solid var(--border);
  border-radius: 12px;
  box-sizing:    border-box;
}


/* ---- 26px number pill -------------------------------------
   Circular badge used for step numbers.
   Color (background) set per-component. */

.num-pill {
  display:         inline-flex;
  align-items:     center;
  justify-content: center;
  width:           26px;
  height:          26px;
  flex-shrink:     0;
  border-radius:   var(--radius-full);
  font-size:       var(--font-size-xs);
  font-weight:     var(--font-weight-medium);
  line-height:     1;
  color:           var(--foreground);
}


/* ---- Card typography --------------------------------------
   Base/bold title and base/regular muted body.
   Color overrides applied per-component as needed. */

.card-title {
  margin:      0;
  font-size:   var(--font-size-base);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-base);
}

.card-body {
  margin:      0;
  font-size:   var(--font-size-base);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-base);
  color:       var(--muted-foreground);
}


/* ---- Page H1 — shared display heading --------------------- */

.page-h1 {
  display:        flex;
  flex-direction: column;
  margin:         0;
  font-size:      3rem;    /* 48px */
  line-height:    1.15;
  font-weight:    var(--font-weight-light);
  color:          var(--foreground);
}

@media (max-width: 767px) {
  .page-h1 { font-size: 2.25rem; }
}

@media (max-width: 479px) {
  .page-h1 { font-size: 2rem; }
}

/* ============================================================
   HomepageHero — Homepage hero section
   Design tokens from src/styles/tokens.css.
   ============================================================ */

/* ---- Outer section ---- */
.homepage-hero {
  position:         relative;
  z-index:          150;
  display:          flex;
  flex-direction:   column;
  align-items:      center;
  padding-top:      8rem;      /* 128px — matches Figma pt-[128px] */
  width:            100%;
  font-family:      var(--font-family-default);
  background:       linear-gradient(180deg, var(--background) 0%, var(--secondary) 100%);
  box-sizing:       border-box;
}

/* ---- Inner container — heading + player stacked ---- */
.homepage-hero .container {
  display:        flex;
  flex-direction: column;
  gap:            7rem;        /* 112px — between heading block and player */
}

@media (max-width: 991px) {
  .homepage-hero .container {
    gap: 6rem;                 /* 96px */
  }

  .homepage-hero__intro {
    flex-direction: column;
  }

  .homepage-hero__body {
    max-width: 100%;
  }
}

@media (max-width: 767px) {
  .homepage-hero .container {
    gap: 2rem;               /* 32px */
  }
}


/* ============================================================
   Heading block
   ============================================================ */

.homepage-hero__heading {
  display:        flex;
  flex-direction: column;
  gap:            4rem;        /* 64px — between H1 and intro row */
  width:          100%;
}


/* ---- Intro row — body copy + CTAs ---- */

.homepage-hero__intro {
  display:     flex;
  gap:         2.25rem;        /* 36px — Figma gap-[36px] */
  align-items: flex-start;
  width:       100%;
}

.homepage-hero__body {
  flex:        1;
  max-width:   46.875rem;          /* 800px */
  margin:      0;
  font-size:   1.25rem;        /* 20px — Figma font-size-xl */
  font-weight: var(--font-weight-regular);
  line-height: 1.75rem;        /* 28px — Figma line-height-xl */
  color:       var(--foreground);
}

.homepage-hero__actions {
  display:     flex;
  flex-wrap:   wrap;
  gap:         var(--spacing-3);  /* 12px */
  align-items: flex-start;
  flex-shrink: 0;
}

.homepage-hero__secondary-cta {
  display: grid;
  gap:     10px;
}

.homepage-hero__secondary-note {
  margin:       0;
  text-align:   center;
  font-size:    var(--font-size-xs);    /* 12px */
  line-height:  var(--line-height-xs);  /* 16px */
  font-weight:  var(--font-weight-regular);
  color:        var(--muted-foreground);
}


/* ============================================================
   Built-in player — sits above the skyline illustration
   ============================================================ */

.homepage-hero__player {
  position: relative;
  z-index:  1;
  width:    100%;
}




/* ============================================================
   Bottom decoration image — absolutely positioned, takes no space
   Fixed 1512×126px, centered horizontally
   ============================================================ */

.homepage-hero__decoration {
  position:         absolute;
  bottom:           0;
  left:             50%;
  transform:        translateX(-50%);
  width:            1512px;
  max-width:        none;
  height:           126px;
  pointer-events:   none;
  z-index:          0;
  mask-image:       linear-gradient(to right, transparent 0%, black 6%, black 94%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 6%, black 94%, transparent 100%);
}


/* ============================================================
   No-player fallback — collapse the container gap and add space
   so the illustration is visible:
   64px gap + 126px illustration height = 190px bottom padding
   ============================================================ */

.homepage-hero--no-player {
  padding-bottom: 190px;
}

.homepage-hero--no-player .container {
  gap: 0;
}


/* ============================================================
   Mobile — landscape/tablet (≤767px)
   ============================================================ */

@media (max-width: 767px) {
  .homepage-hero {
    padding-top: 5rem;         /* 80px */
  }

  .homepage-hero__heading {
    gap:            2rem;    /* 32px */
    padding-bottom: 2rem;      /* 32px */
  }

  .homepage-hero__intro {
    flex-direction: column;
    gap:            2.25rem;    /* 36px */
  }

  .homepage-hero__body {
    max-width: 100%;
  }

  .homepage-hero__actions {
    flex-direction: column;
  }

  .homepage-hero__secondary-note {
    padding-left: 1.5rem;
    text-align:   left;
  }
}


/* ============================================================
   Portrait mobile (≤479px)
   ============================================================ */

@media (max-width: 479px) {
  .homepage-hero {
    padding-top: 4rem;         /* 64px */
  }

}

/* ============================================================
   Container — shared responsive layout constraint
   Provides 1024px max content width with responsive side padding.
   Import this in any component that uses the .container class.
   ============================================================ */

.container {
  position:   relative;
  width:      100%;
  max-width:  calc(1024px + 160px); /* 1024px content + 80px × 2 */
  padding:    0 80px;
  margin:     0 auto;
  box-sizing: border-box;
}

/* Tablet (≤991px): 60px sides */
@media (max-width: 991px) {
  .container {
    padding: 0 60px;
  }
}

/* Landscape mobile (≤767px): 2rem sides */
@media (max-width: 767px) {
  .container {
    padding: 0 2rem;
  }
}



/* ============================================================
   Wide container — 1360px content + 48px side padding
   Used for full-bleed section content blocks (slider, big cards)
   that need to be wider than the standard 1024px text container.
   ============================================================ */

.container-wide {
  width:      100%;
  max-width:  calc(1384px + 96px);   /* 1384px content + 48px × 2 */
  padding:    0 3rem;                /* 48px sides */
  margin:     0 auto;
  box-sizing: border-box;
}

/* Tablet + landscape mobile (≤991px) */
@media (max-width: 991px) {
  .container-wide {
    padding: 0 1rem;
  }
}


