/* ============================================================
   RichText — Component Styles
   Self-contained typography for structured content blocks.
   Covers all standard rich text elements.
   Design tokens are defined in src/styles/tokens.css.
   ============================================================ */

.rich-text {
  color:       var(--foreground);
  font-family: var(--font-family-default);
  font-size:   var(--font-size-base);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-base);
}


/* ---- Paragraphs ---- */

.rich-text p {
  margin: 0;
}

.rich-text p + p,
.rich-text * + p {
  margin-top: 1rem;
}


/* ---- Headings ---- */

.rich-text h1,
.rich-text h2,
.rich-text h3,
.rich-text h4,
.rich-text h5,
.rich-text h6 {
  color:       var(--foreground);
  font-family: var(--font-family-default);
  font-weight: var(--font-weight-bold);
  margin:      0;
}

/* Space between a heading and what follows it */
.rich-text h1 + *,
.rich-text h2 + *,
.rich-text h3 + *,
.rich-text h4 + *,
.rich-text h5 + *,
.rich-text h6 + * {
  margin-top: 0.5rem;
}

/* Space before a heading that has something above it */
.rich-text * + h1,
.rich-text * + h2,
.rich-text * + h3,
.rich-text * + h4,
.rich-text * + h5,
.rich-text * + h6 {
  margin-top: 1.5rem;
}

.rich-text h1 { font-size: var(--font-size-h1); line-height: 1.2;  }
.rich-text h2 { font-size: var(--font-size-h2); line-height: 1.25; }
.rich-text h3 { font-size: var(--font-size-h3); line-height: 1.3;  }
.rich-text h4 { font-size: var(--font-size-h4); line-height: 1.4;  }
.rich-text h5 { font-size: var(--font-size-base); line-height: var(--line-height-base); }
.rich-text h6 { font-size: var(--font-size-sm);   line-height: var(--line-height-sm);  }


/* ---- Lists ---- */

.rich-text ul,
.rich-text ol {
  font-size:    inherit;
  line-height:  inherit;
  margin:       0;
  padding-left: 1.25rem;
}

.rich-text li {
  font-size:   inherit;
  line-height: inherit;
}

.rich-text * + ul,
.rich-text * + ol {
  margin-top: 0.5rem;
}

.rich-text ul { list-style-type: disc;    }
.rich-text ol { list-style-type: decimal; }

.rich-text li + li {
  margin-top: 0.25rem;
}

/* Nested lists */
.rich-text li > ul,
.rich-text li > ol {
  margin-top: 0.25rem;
}


/* ---- Inline emphasis ---- */

.rich-text strong,
.rich-text b {
  font-weight: var(--font-weight-bold);
}

.rich-text em,
.rich-text i {
  font-style: italic;
}


/* ---- Links ---- */

.rich-text a {
  color:           var(--primary);
  font-weight:     var(--font-weight-medium);
  text-decoration: none;
}

.rich-text a:hover {
  text-decoration: underline;
}


/* ---- Blockquote ---- */

.rich-text blockquote {
  border-left: 3px solid var(--border);
  color:       var(--muted-foreground);
  margin:      0;
  padding-left: 1rem;
}

.rich-text * + blockquote {
  margin-top: 1rem;
}


/* ---- Inline code ---- */

.rich-text code {
  background-color: var(--muted);
  border-radius:    0.25rem;
  font-family:      ui-monospace, 'Cascadia Code', 'Source Code Pro', monospace;
  font-size:        0.875em;
  padding:          0.125em 0.375em;
}


/* ---- Code block ---- */

.rich-text pre {
  background-color: var(--muted);
  border-radius:    var(--radius-sm);
  margin:           0;
  overflow-x:       auto;
  padding:          1rem 1.25rem;
}

.rich-text * + pre {
  margin-top: 1rem;
}

/* Reset inline code styles when inside a pre block */
.rich-text pre code {
  background: none;
  font-size:  1em;
  padding:    0;
}


/* ---- Horizontal rule ---- */

.rich-text hr {
  border:     none;
  border-top: 1px solid var(--border);
  margin:     1.5rem 0 0;
}


/* ---- Images ---- */

.rich-text img {
  display:   block;
  height:    auto;
  max-width: 100%;
}

/* ============================================================
   Accordion — Component Styles
   Design tokens are defined in src/styles/tokens.css.

   Figma spec (node 2018:22972):
     Border radius : 12px (0.75rem)
     Trigger padding: 10px 12px 10px 16px (top right bottom left)
     Trigger gap   : 32px between icon / question / price / chevron
     Answer padding : 12px top · 12px right · 24px bottom · 16px left
     Idle bg       : transparent (no background)
     Hover bg      : var(--accent)   — warm off-white (#FAF6F0)
     Open bg       : var(--card)     — white
     Chevron       : 18 × 18px, rotates 180° when open
   ============================================================ */

/* ---- Outer wrapper ---- */
.accordion {
  border-radius: 0.75rem;  /* 12px */
  overflow:      hidden;
  transition:    background-color 150ms ease;
}

.accordion:hover {
  background-color: var(--accent);
}

.accordion[data-open] {
  background-color: var(--card);
}

/* Keep card bg even when hovered while open */
.accordion[data-open]:hover {
  background-color: var(--card);
}

/* Ghost variant — no background changes on hover or open */
.accordion--ghost:hover,
.accordion--ghost[data-open],
.accordion--ghost[data-open]:hover {
  background-color: transparent;
}


/* ---- Trigger button ---- */
.accordion__trigger {
  align-items:  flex-start;
  background:   none;
  border:       none;
  cursor:       pointer;
  display:      flex;
  gap:          0.75rem;         /* 12px */
  padding:      0.625rem 0.75rem 0.625rem 1rem; /* 10px 12px 10px 16px */
  text-align:   left;
  width:        100%;
}

/* ---- Icon slot (16 × 16) ---- */
.accordion__icon {
  align-items:  center;
  color:        var(--foreground);
  display:      flex;
  flex-shrink:  0;
  height:       var(--line-height-base); /* 24px — vertically centers with text */
  width:        1rem;                    /* 16px */
}

.accordion__icon > * {
  display: block;
  height:  1rem;
  width:   1rem;
}

/* ---- Badge slot (optional, between icon and question) ---- */
.accordion__badge {
  align-items: center;
  display:     flex;
  flex-shrink: 0;
}

/* ---- Question text ---- */
.accordion__question {
  color:       var(--foreground);
  flex:        1 0 0;
  font-family: var(--font-family-default);
  font-size:   var(--font-size-base);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-base);
  min-width:   0;
}

/* ---- Price label (optional) ---- */
.accordion__price {
  color:        var(--muted-foreground); /* grey in idle; becomes foreground on hover/open */
  flex-shrink:  0;
  font-family:  var(--font-family-default);
  font-size:    var(--font-size-sm);   /* 14px */
  font-weight:  var(--font-weight-regular);
  line-height:  var(--line-height-sm); /* 20px */
  padding-top:  0.125rem;             /* 2px — nudge to align with bold question baseline */
  text-align:   right;
  white-space:  nowrap;
  transition:   color 150ms ease;
}

/* ---- Chevron ---- */
.accordion__chevron {
  align-items:     center;
  color:           var(--muted-foreground);
  display:         flex;
  flex-shrink:     0;
  height:          1.6875rem; /* 27px — Figma "Button area" height */
  justify-content: center;
}

.accordion__chevron-icon {
  display:    block;
  height:     1.125rem; /* 18px */
  transition: transform 220ms ease;
  width:      1.125rem;
}

/* Price becomes full foreground on hover and when open */
.accordion:hover .accordion__price,
.accordion[data-open] .accordion__price {
  color: var(--foreground);
}

.accordion[data-open] .accordion__chevron-icon {
  transform: rotate(180deg);
}


/* ---- Answer body — CSS grid height animation ---- */
.accordion__body-outer {
  display:            grid;
  grid-template-rows: 0fr;
  transition:         grid-template-rows 220ms ease;
}

.accordion[data-open] .accordion__body-outer {
  grid-template-rows: 1fr;
}

.accordion__body-inner {
  overflow: hidden;
}

/* Padding only — typography is handled by the RichText component.
   Top  : 2px — trigger already has pb:10px, together they form 12px gap (Figma gap-3)
   Right: 24px — matches outer pr:12px + answer pr:12px from Figma
   Bottom: 22px — matches outer pb:10px + answer pb:12px from Figma
   Left : 16px — aligns answer text with question text (Figma outer pl:16px + answer pl:0) */
.accordion__answer {
  padding: 0.125rem 1.5rem 1.375rem 1rem;
  color:   var(--foreground);
}

/* Ghost variant — muted answer text (used in DifferenceSection) */
.accordion--ghost .accordion__answer {
  color: var(--muted-foreground);
}

.faq {
  background-color: #FAF6F0;
  box-sizing:       border-box;
  display:          flex;
  flex-direction:   column;
  font-family:      var(--font-family-default);
  gap:            4rem;       /* 64px */
  padding:        6rem 0;     /* 96px */
  width:          100%;
}


/* ============================================================
   Title group
   ============================================================ */

.faq__title-group {
  margin-bottom: 4rem;
  width:          100%;
}

.faq__title {
  color:       var(--foreground);
  font-size:   2.25rem;       /* 36px */
  font-weight: var(--font-weight-bold);
  line-height: 2.5rem;        /* 40px */
  margin:      0;
}


/* ============================================================
   Body: two-column layout (accordions + illustration)
   ============================================================ */

.faq__body {
  align-items: flex-start;
  display:     flex;
  gap:         2rem;          /* 32px */
  width:       100%;
  padding: 28px;
  border-radius: 24px;
  background-color: #FFFFFF;
}

.faq__accordions {
  display:        flex;
  flex:           1 0 0;
  flex-direction: column;
  gap:            0.625rem;   /* 10px */
  min-width:      0;
  counter-reset: my-step-counter;
}

.accordion{
  padding: 0 !important;
}

.accordion__trigger:before {
    counter-increment: my-step-counter;
    content: counter(my-step-counter);
    font-weight: bold;
    color: #282825;
    background: #F5F0E7;
    width: 26px;
    height: 26px;
    border-radius: 26px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
    line-height: 16px;
}
.accordion__answer {
  color: #85857A !important;
}

.faq-section__header{
  margin-bottom: 40px;
}

@media (max-width: 767px) {
  .faq {
    gap:     2.25rem; /* 36px */
    padding: 4rem 0;
  }

  .faq__title {
    font-size:   1.875rem;  /* 30px */
    line-height: 2.25rem;   /* 36px */
  }

  .faq__title-group {
    margin-bottom: 2.25rem;  /* 36px */
  }

  /* Stack illustration above accordions instead of side-by-side */
  .faq__body {
    flex-direction: column;
  }

  /* Move illustration before accordions via order (DOM: accordions first) */
  .faq-illustration {
    order: -1;
    flex:  0 0 auto;
    width: 100%;
  }
}

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

