/* ============================================================
   RichText — Component Styles
   Self-contained typography for structured content blocks.
   Covers all standard rich text elements.
   Design tokens are defined in src/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/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;
}

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

.faq {
  background-color: var(--background);
  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%;
}

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


/* ============================================================
   Illustration panel
   ============================================================ */

.faq-illustration {
  flex:      1 0 0;
  min-width: 0;
}

.faq-illustration picture,
.faq-illustration__img {
  display: block;
  height:  auto;
  width:   100%;
}


/* ============================================================
   Mobile — Webflow landscape breakpoint (≤767px)
   ============================================================ */

@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 + landscape mobile (≤991px): 60px × 2 = 120px */
@media (max-width: 991px) {
  .container {
    max-width: calc(100% - 120px);
  }
}

/* Portrait mobile (≤479px): 16px × 2 = 32px */
@media (max-width: 479px) {
  .container {
    max-width: calc(100% - 32px);
  }
}


/* ============================================================
   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 + 128px);  /* 1360px content + 64px × 2 */
  padding:    0 4rem;                /* 64px sides */
  margin:     0 auto;
  box-sizing: border-box;
}

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

/* Portrait mobile (≤479px) */
@media (max-width: 479px) {
  .container-wide {
    padding: 0 1rem;
  }
}

