/* ============================================================
   Syndicly — responsive layer.

   The pages carry their layout in inline styles (they came out of a
   design canvas), so every override here needs !important. That is
   the reason for it, not carelessness: an inline style cannot be
   beaten any other way.

   The hooks are explicit classes (sy-*) added to the structural
   containers in the three index.html files. Keep them in place when
   editing the markup — nothing here is guessed from the inline CSS.

   Fluid type uses clamp() with the desktop value as the maximum, so
   wide viewports render exactly as before.
   ============================================================ */

/* ---------- fluid type (all viewports; capped at the desktop size) ---- */
.sy-h1         { font-size: clamp(32px, 9.2vw, 68px) !important; line-height: 1.16 !important; }
.sy-h2         { font-size: clamp(26px, 6.9vw, 40px) !important; }
.sy-h2--demo   { font-size: clamp(27px, 7.2vw, 44px) !important; }
.sy-stat       { font-size: clamp(36px, 9vw, 44px) !important; }
.sy-gain-stat  { font-size: clamp(25px, 6.7vw, 34px) !important; }
.sy-quote-text { font-size: clamp(18px, 4.9vw, 28px) !important; }
.sy-lede       { font-size: clamp(19px, 4.4vw, 26px) !important; }

/* ---------- fluid section padding ------------------------------------ */
.sy-sec {
  padding: clamp(56px, 10vw, 96px) clamp(20px, 3.4vw, 32px) !important;
}
.sy-hero {
  padding: clamp(48px, 9vw, 88px) clamp(20px, 3.4vw, 32px) clamp(48px, 7.5vw, 72px) !important;
}
.sy-nav-bar   { padding: 12px clamp(16px, 3.4vw, 32px) !important; }
.sy-footer-bar{ padding: 24px clamp(20px, 3.4vw, 32px) !important; }

/* ---------- nav: hamburger below the point where the links fit -------- */
.sy-nav-burger { display: none; }

@media (max-width: 1023px) {
  .sy-nav-burger {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; padding: 0; margin-right: -6px;
    border: 1px solid var(--ds-color-border-subtle);
    border-radius: var(--ds-radius-md);
    background: transparent; color: var(--ds-color-text-primary);
    cursor: pointer;
  }
  .sy-nav-burger .sy-nav-burger__close,
  .sy-nav-burger[aria-expanded="true"] .sy-nav-burger__open { display: none; }
  .sy-nav-burger[aria-expanded="true"] .sy-nav-burger__close { display: block; }

  .sy-nav-actions { gap: 12px !important; }
  /* The button sits before the switcher in the source so the desktop
     `display: contents` trick keeps working; put it back on the right. */
  .sy-nav-burger { order: 3; }

  /* The panel is the same markup as the desktop link row — no duplicated
     copy to translate three times over. */
  .sy-nav-menu {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0; z-index: 55;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 4px clamp(16px, 3.4vw, 32px) 20px;
    background: var(--ds-color-background-elevated);
    border-bottom: 1px solid var(--ds-color-border-subtle);
    box-shadow: var(--ds-shadow-lg);
  }
  .sy-nav-bar[data-nav-open] .sy-nav-menu { display: flex; }
  .sy-nav-menu > a:not(.syn-btn) {
    padding: 15px 2px;
    border-bottom: 1px solid var(--ds-color-border-subtle);
    font-size: var(--ds-font-size-lg) !important;
    color: var(--ds-color-text-primary) !important;
  }
  .sy-nav-menu > .syn-btn { margin-top: 18px; justify-content: center; }
}

@media (min-width: 1024px) {
  /* Flatten the wrapper so the links, the switcher and the CTA sit in the
     nav's own flex row, in the desktop order, exactly as before. */
  .sy-nav-menu { display: contents; }
  .sy-lang     { order: 1; }
  .sy-nav-cta  { order: 2; }
}

/* The hero glow bleeds 40px past the section on each side, but the section
   only has 32px of padding — so below 1260px it pushes the page wider than
   the viewport. Pull the bleed in to fit inside the padding. */
@media (max-width: 1259px) {
  .sy-hero-glow { left: -12px !important; right: -12px !important; }
}

/* ---------- stacking: tablet and down --------------------------------- */
@media (max-width: 899px) {
  /* Hero: three side-by-side mock cards become one column. */
  .sy-hero-panel { grid-template-columns: 1fr !important; }
  .sy-hero-glow  { top: 40px !important; bottom: -24px !important; }
  /* Pills pinned at 4% / 41% / 96% across the top: they label three columns
     that no longer exist, and they overlap. Each card carries the same label
     as its own eyebrow anyway. */
  .sy-panel-tab { display: none !important; }

  /* Decorative scroll collage: fixed-width cards at absolute percentages.
     It cannot be made to read at this size, so it goes. */
  .sy-collage { display: none !important; }

  .sy-grid-3 { grid-template-columns: 1fr 1fr !important; gap: 24px !important; }

  .sy-quote      { padding: clamp(24px, 5vw, 48px) !important; }
  .sy-quote-grid { grid-template-columns: 1fr !important; gap: 24px !important; }

  /* "Comment ça marche": the horizontal rail becomes a vertical timeline,
     number in a gutter on the left, text beside it. */
  .sy-steps { grid-template-columns: 1fr !important; gap: 28px !important; }
  .sy-steps-line {
    top: 22px !important; bottom: 22px !important;
    left: 21px !important; right: auto !important;
    width: 2px !important; height: auto !important;
  }
  .sy-step {
    display: grid !important;
    grid-template-columns: 44px 1fr;
    column-gap: 18px; row-gap: 4px; align-items: start;
  }
  .sy-step > :first-child { grid-row: 1 / span 2; }

  .sy-compare     { grid-template-columns: 1fr !important; }
  .sy-compare-col { padding: clamp(20px, 4vw, 32px) !important; }

  .sy-flow { grid-template-columns: 1fr !important; justify-items: center; gap: 20px !important; }
  .sy-flow > div:empty { display: none !important; }
  .sy-flow-arrow { height: 56px !important; transform: rotate(90deg); }
  .sy-flow > div { width: 100%; }

  .sy-faq { grid-template-columns: 1fr !important; gap: 40px !important; }

  .sy-demo {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
    padding: clamp(28px, 6vw, 72px) clamp(20px, 4vw, 48px) !important;
  }
  /* The frame keeps its 295px: the Odoo page is a flat 293px tall at every
     width and in all three languages, and its body background paints any
     extra height as a blank white block. Measure that page before changing
     this number — do not pad it "to be safe". */
}

/* ---------- stacking: phone ------------------------------------------- */
@media (max-width: 639px) {
  .sy-grid-3 { grid-template-columns: 1fr !important; gap: 28px !important; }
  .sy-grid-3 > .syn-card { padding: 22px !important; }

  .sy-footer-bar { flex-direction: column; gap: 12px; }
}
