/* ============================================================
   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:     1024px;
  max-width: calc(100% - 160px); /* 80px × 2 — desktop */
  margin:    0 auto;
}

/* Tablet (≤991px): 60px × 2 = 120px */
@media (max-width: 991px) {
  .container {
    max-width: calc(100% - 120px);
  }
}

/* Landscape mobile (≤767px): 2rem × 2 = 4rem */
@media (max-width: 767px) {
  .container {
    max-width: calc(100% - 4rem);
  }
}



/* ============================================================
   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(1360px + 96px);   /* 1360px 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 2rem;
  }

  .container-wide > * {
    margin-left:  -1rem;
    width:        calc(100% + 2rem) !important;
  }
}


/* ============================================================
   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;
}

/* 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: 100%.  .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
   (1360px): (1360 − 1024) / 2 = 168px.
   Shown only at ≥1488px — when the gutter is a fixed, predictable size. */

.hp-rail {
  display:        none;
  position:       absolute;
  right:          100%;
  top:            0;
  bottom:         0;
  width:          calc((1360px - 1024px) / 2);   /* 168px */
  pointer-events: none;
}

.hp-rail__sticky {
  position:        sticky;
  top:             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: 1488px) {
  .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: 1488px) {
  .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; <strong> inside uses bold. */

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

.hp-heading strong {
  font-weight: var(--font-weight-bold);
}


/* ---- 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);
}

.hp-body strong {
  font-weight: var(--font-weight-bold);
}

@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);
}

/* ============================================================
   DemoSection — Homepage "Live demo" section
   Shared section shell, rail, badge (incl. dot), heading, body → src/section.css
   ============================================================ */

.demo-section {
  background-color: var(--accent);
  padding-bottom: 12rem;
}


/* ============================================================
   Section header intro (heading + body block)
   ============================================================ */

.demo-section__intro {
  display:        flex;
  flex-direction: column;
  gap:            2.25rem;
  max-width:      800px;
}


/* ============================================================
   Cards row
   ============================================================ */

.demo-section__cards {
  display:     flex;
  align-items: stretch;
  gap:         var(--spacing-3);   /* 12px — matches Figma */
  width:       100%;
}

.demo-section__cards > svg {
  align-self:  center;
  flex-shrink: 0;
}

.demo-section__phone {
  color:           inherit;
  text-decoration: none;
  cursor:          pointer;
}


/* ============================================================
   Step card
   ============================================================ */

.demo-card {
  flex:           1;
  display:        flex;
  flex-direction: column;
  gap:            1.5rem;    /* 24px — Figma card 1 gap */
  padding:        1.75rem;   /* 28px */
  overflow:       hidden;
  background:     var(--card);
}

/* Cards 2 & 3 have larger gap between badge and title group */
.demo-card--lg { gap: 2rem; }  /* 32px — Figma cards 2&3 */

.demo-card__num {
  background: var(--secondary);
}

.demo-card__title-group {
  display:        flex;
  flex-direction: column;
  gap:            0.5rem;   /* 8px */
}

.demo-card__title {
  color: var(--popover-foreground);
}

.demo-card__pills {
  display:   flex;
  flex-wrap: wrap;
  gap:       var(--spacing-3);   /* 12px */
}

.demo-card__pill {
  display:       inline-flex;
  align-items:   center;
  height:        26px;
  padding:       5px var(--spacing-3);
  background:    var(--accent);
  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;
}


/* ============================================================
   Mobile heading / CTA visibility toggles
   ============================================================ */

.demo-section__mobile-heading,
.demo-section__mobile-cta {
  display: none;
}


/* ============================================================
   Tablet (≤991px)
   ============================================================ */

@media (max-width: 991px) {
  .demo-section__cards {
    flex-direction: column;
  }

  .demo-section__cards > svg {
    transform: rotate(90deg);
  }
}


/* ============================================================
   Mobile (≤767px)
   ============================================================ */

@media (max-width: 767px) {
  .demo-section__desktop-heading { display: none; }

  .demo-section__mobile-heading {
    display:     block;
    font-size:   var(--font-size-3xl, 1.875rem);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-3xl, 2.25rem);
  }

  .demo-section__mobile-cta { display: block; }

  /* Reset desktop's extra bottom padding so section.css 4rem 0 takes effect */
  .demo-section { padding-bottom: 4rem; }

  /* Container inner gap: 64px → 32px */
  .demo-section .container { gap: 2rem; }

  /* Intro gap: 36px → 32px */
  .demo-section__intro { gap: 2rem; }

  /* Cards bleed 1rem outside the container on each side */
  .demo-section__cards {
    margin-left: -1rem;
    width:       calc(100% + 2rem);
  }

}

/* ============================================================
   Button — Component Styles
   Scheme-aware: inherits data-scheme from a parent element.
   All color tokens flip automatically in dark context.
   ============================================================ */

.btn {
  /* Layout */
  align-items:     center;
  border:          1px solid transparent;
  box-sizing:      border-box;
  cursor:          pointer;
  display:         inline-flex;
  flex-shrink:     0;
  justify-content: center;
  overflow:        hidden;
  text-decoration: none;
  user-select:     none;
  white-space:     nowrap;

  /* Typography */
  font-family: var(--font-family-default);
  font-weight: var(--font-weight-medium);

  /* Transition */
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, opacity 120ms ease;
}


/* ============================================================
   Sizes
   Heights: xs=26px  sm=32px  md=36px  lg=40px
   All use font-size-sm (14px) except xs which uses font-size-xs (12px).
   ============================================================ */

.btn[data-size="xs"] {
  font-size:   var(--font-size-xs);      /* 12px */
  line-height: var(--line-height-xs);    /* 16px */
  gap:         0.25rem;                  /* 4px  */
  padding:     0.3125rem 0.75rem;        /* 5px 12px → height 26px */
}

.btn[data-size="sm"] {
  font-size:   var(--font-size-sm);      /* 14px */
  line-height: var(--line-height-sm);    /* 20px */
  gap:         0.375rem;                 /* 6px  */
  padding:     0.375rem 1rem;            /* 6px 16px → height 32px */
}

.btn[data-size="md"] {
  font-size:   var(--font-size-sm);      /* 14px */
  line-height: var(--line-height-sm);    /* 20px */
  gap:         0.375rem;                 /* 6px  */
  padding:     0.5rem 1rem;              /* 8px 16px → height 36px */
}

.btn[data-size="lg"] {
  font-size:   var(--font-size-sm);      /* 14px */
  line-height: var(--line-height-sm);    /* 20px */
  gap:         0.5rem;                   /* 8px  */
  padding:     0.625rem 1.5rem;          /* 10px 24px → height 40px */
}


/* ============================================================
   Shapes
   ============================================================ */

.btn[data-shape="rounded"] { border-radius: var(--radius-sm);   } /* 8px  */
.btn[data-shape="round"]   { border-radius: var(--radius-full); } /* pill */


/* ============================================================
   Variants
   ============================================================ */

.btn[data-variant="primary"] {
  background-color: var(--primary);
  border-color:     var(--primary);
  color:            var(--primary-foreground);
}

.btn[data-variant="secondary"] {
  background-color: transparent;
  border-color:     var(--border);
  color:            var(--brand-neutral-700);
}


.btn[data-variant="info"] {
  background-color: var(--info);
  border-color:     var(--info);
  color:            var(--info-foreground);
}

.btn[data-variant="success"] {
  background-color: var(--success);
  border-color:     var(--success);
  color:            var(--success-foreground);
}

.btn[data-variant="warning"] {
  background-color: var(--warning);
  border-color:     var(--warning);
  color:            var(--warning-foreground);
}

.btn[data-variant="destructive"] {
  background-color: var(--destructive);
  border-color:     var(--destructive);
  color:            var(--destructive-foreground);
}


/* ============================================================
   States
   ============================================================ */

/* Hover — default (card, info, success, warning, destructive) */
.btn:hover:not(:disabled):not([aria-disabled="true"]) {
  opacity: 0.88;
}

/* Primary hover — 20% dark overlay on background, full opacity */
.btn[data-variant="primary"]:hover:not(:disabled):not([aria-disabled="true"]) {
  background-color: color-mix(in srgb, var(--primary) 80%, #282825 20%);
  border-color:     color-mix(in srgb, var(--primary) 80%, #282825 20%);
  color:            var(--card);
  opacity:          1;
}

/* Secondary hover — darker border + foreground text, no fill */
.btn[data-variant="secondary"]:hover:not(:disabled):not([aria-disabled="true"]) {
  border-color: var(--muted-foreground);
  color:        var(--foreground);
  opacity:      1;
}

/* Active / pressed */
.btn:active:not(:disabled):not([aria-disabled="true"]) {
  opacity: 0.76;
}

/* Focus */
.btn:focus-visible {
  outline:        2px solid var(--ring);
  outline-offset: 2px;
}

/* Disabled */
.btn:disabled,
.btn[aria-disabled="true"] {
  cursor:         not-allowed;
  opacity:        0.4;
  pointer-events: none;
}


/* ============================================================
   Icon slot
   ============================================================ */

.btn__icon {
  align-items:     center;
  display:         inline-flex;
  flex-shrink:     0;
  justify-content: center;
}

.btn[data-size="xs"] .btn__icon { height: 0.75rem; width: 0.75rem; } /* 12px */
.btn[data-size="sm"] .btn__icon,
.btn[data-size="md"] .btn__icon,
.btn[data-size="lg"] .btn__icon { height: 1rem;    width: 1rem;    } /* 16px */

.btn__icon svg {
  display: block;
  height:  100%;
  width:   100%;
}


/* ============================================================
   Badge slot — optional count pill inside the button
   ============================================================ */

.btn__badge {
  align-items:      center;
  background-color: var(--primary);
  border-radius:    var(--radius-full);
  color:            var(--primary-foreground);
  display:          inline-flex;
  font-size:        var(--font-size-xs);   /* 12px */
  font-weight:      var(--font-weight-medium);
  justify-content:  center;
  line-height:      var(--line-height-xs); /* 16px */
  min-width:        1.25rem;               /* 20px */
  padding:          0.125rem 0.375rem;     /* 2px 6px */
}

