/*!
 * Sotransoda Core - design system (light mode only).
 * All classes are prefixed `sts-` to avoid collisions with Astra / Elementor.
 */

/* ---------- Fonts (self-hosted, latin subset) ---------- */
@font-face {
  font-family: "Bebas Neue";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/bebas-neue-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/poppins-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/poppins-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/poppins-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: light; /* forced light mode (fallback) */
  color-scheme: only light; /* browsers that support `only` must not auto-darken */

  /* brand */
  --sts-navy: #203a80;
  --sts-navy-900: #142a66;
  --sts-ink: #0f1b3d;
  --sts-red: #e4022c;
  --sts-red-hover: #c00225;
  --sts-amber: #f4b740;

  /* text + surfaces */
  --sts-text: #374151;
  --sts-muted: #4b5563;
  --sts-bg: #ffffff;
  --sts-bg-alt: #f3f6fb;
  --sts-line: #d9e0ee;
  --sts-field-border: #6b7a99; /* 4.31:1 on white, 3.9:1 on --sts-bg-alt (WCAG 1.4.11 needs 3:1) */

  /* WhatsApp: dark text on green keeps AA contrast (6.2:1) */
  --sts-wa: #25d366;
  --sts-wa-hover: #1fbd5a;
  --sts-wa-ink: #0b3d1e;

  /* type */
  --sts-font-display: "Bebas Neue", "Arial Narrow", Impact, sans-serif;
  --sts-font-body: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --sts-fs-body: clamp(1.0625rem, 1.02rem + 0.2vw, 1.125rem); /* 17 -> 18px */
  --sts-fs-small: 0.9375rem;
  --sts-fs-h1: clamp(3rem, 1.7rem + 4.6vw, 5.25rem);
  --sts-fs-h2: clamp(2.25rem, 1.6rem + 2.8vw, 3.75rem);
  --sts-fs-h3: clamp(1.5rem, 1.25rem + 1vw, 2rem);
  --sts-lh-body: 1.65;

  /* spacing scale */
  --sts-s-1: 0.25rem;
  --sts-s-2: 0.5rem;
  --sts-s-3: 0.75rem;
  --sts-s-4: 1rem;
  --sts-s-5: 1.5rem;
  --sts-s-6: 2rem;
  --sts-s-7: 3rem;
  --sts-s-8: 4rem;
  --sts-s-9: 6rem;
  --sts-gutter: clamp(1.25rem, 0.8rem + 2vw, 2.5rem);

  /* radius + shadows */
  --sts-r-sm: 0.5rem;
  --sts-r-md: 0.875rem;
  --sts-r-lg: 1.5rem;
  --sts-r-pill: 999px;
  --sts-sh-1: 0 1px 2px rgba(15, 27, 61, 0.08), 0 1px 3px rgba(15, 27, 61, 0.06);
  --sts-sh-2: 0 6px 18px rgba(15, 27, 61, 0.1), 0 2px 6px rgba(15, 27, 61, 0.06);
  --sts-sh-3: 0 20px 50px rgba(15, 27, 61, 0.18), 0 6px 14px rgba(15, 27, 61, 0.08);

  --sts-tap: 44px; /* 44px minimum touch target (px: rem is 15px on the live site) */
  --sts-focus: 0 0 0 3px #fff, 0 0 0 6px var(--sts-navy);
  --sts-bar-h: 4.25rem;
  --sts-max: 1240px;
}

/* Neutralise any dark preference: the site is light only. */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: light;
    color-scheme: only light;
  }
  html,
  body {
    background-color: var(--sts-bg);
    color: var(--sts-text);
  }
}

/* ---------- Global UX fixes (scoped, mobile first) ---------- */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--sts-font-body);
  font-size: var(--sts-fs-body);
  line-height: var(--sts-lh-body);
  color: var(--sts-text);
  background-color: var(--sts-bg);
}

/* Safety net against stray horizontal scroll. `clip` (unlike `hidden`) does not
   create a scroll container, so position: sticky keeps working. */
html,
body {
  max-width: 100%;
  overflow-x: clip;
}

/* Never justify running text (rivers of white space hurt older readers). Scoped to
   content explicitly justified inline; centered/right Elementor text is intentional
   and must stay as designed. */
.entry-content p[style*="justify"],
.entry-content li[style*="justify"],
.elementor-widget-text-editor p[style*="justify"],
.elementor-widget-text-editor li[style*="justify"],
.elementor-widget-text-editor.elementor-align-justify,
.elementor-widget-text-editor.elementor-align-justify p,
.ast-article-post p[style*="justify"] {
  text-align: start !important;
  hyphens: manual;
}

@media (max-width: 921px) {
  /* Astra above-header bar: let it wrap instead of overflowing the viewport. */
  .ast-above-header-bar .ast-builder-grid-row,
  .ast-above-header .ast-builder-grid-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.25rem 1rem;
    grid-template-columns: none;
  }
  .ast-above-header-bar .site-header-section,
  .ast-above-header .site-header-section,
  .ast-above-header-bar .ast-builder-layout-element {
    min-width: 0;
    max-width: 100%;
    flex: 0 1 auto;
    flex-wrap: wrap;
    justify-content: center;
    overflow-wrap: anywhere;
  }
  .ast-above-header-bar a,
  .ast-above-header a {
    min-height: var(--sts-tap);
    display: inline-flex;
    align-items: center;
  }

  /* Readable body copy on phones (never below 16px). */
  body,
  .entry-content p,
  .entry-content li,
  .elementor-widget-text-editor,
  .elementor-widget-text-editor p,
  .elementor-widget-text-editor li {
    font-size: max(1rem, var(--sts-fs-body));
    line-height: var(--sts-lh-body);
  }

  /* Minimum 44px touch targets for common controls. */
  .elementor-button,
  .ast-button,
  .button,
  button,
  input[type="submit"],
  input[type="button"],
  select,
  .main-header-menu .menu-link,
  .ast-mobile-header-content .menu-link,
  .site-footer li a,
  .footer-adv a {
    min-height: var(--sts-tap);
  }
  .site-footer li a,
  .footer-adv a {
    display: inline-flex;
    align-items: center;
  }
}

/* Visible keyboard focus for everything we own. */
.sts-btn:focus-visible,
.sts-select:focus-visible,
.sts-link:focus-visible,
.sts-bar__btn:focus-visible,
.sts-trust a:focus-visible,
.sts-ctrl:focus-visible {
  outline: none;
  box-shadow: var(--sts-focus);
}

/* Predictable sizing for everything we own (Astra/Elementor already do this globally). */
[class^="sts-"],
[class*=" sts-"] {
  box-sizing: border-box;
}

/* Faster taps: no double-tap-zoom delay on our controls. */
.sts-btn,
.sts-bar__btn,
.sts-ctrl,
.sts-select,
.sts-trust__item {
  touch-action: manipulation;
}

/* ---------- Layout primitives ---------- */
.sts-container {
  width: min(100% - 2 * var(--sts-gutter), var(--sts-max));
  margin-inline: auto;
}
.sts-section {
  padding-block: clamp(2.5rem, 1.5rem + 5vw, 5.5rem);
}
.sts-section--alt {
  background: var(--sts-bg-alt);
}
.sts-visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Typography ---------- */
/* Doubled classes: beat theme/Elementor rules such as `.entry-content h1` (0,1,1). */
.sts-display.sts-display,
.sts-h1.sts-h1,
.sts-h2.sts-h2,
.sts-h3.sts-h3 {
  font-family: var(--sts-font-display);
  font-weight: 400;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--sts-navy);
  margin: 0;
  text-wrap: balance;
}
.sts-h1.sts-h1 {
  font-size: var(--sts-fs-h1);
  line-height: 0.95;
}
.sts-h2.sts-h2 {
  font-size: var(--sts-fs-h2);
  line-height: 1;
}
.sts-h3.sts-h3 {
  font-size: var(--sts-fs-h3);
  line-height: 1.05;
}
.sts-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sts-s-2);
  margin: 0;
  font-weight: 600;
  font-size: var(--sts-fs-small);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sts-red-hover);
}
.sts-eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 3px;
  border-radius: 2px;
  background: var(--sts-red);
}
.sts-lead {
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
  line-height: 1.6;
  color: var(--sts-muted);
  margin: 0;
  max-width: 38rem;
}

/* ---------- Buttons ---------- */
.sts-btn {
  --_bg: var(--sts-navy);
  --_fg: #fff;
  --_bg-h: var(--sts-navy-900);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sts-s-3);
  min-height: 3.5rem;
  padding: 0.75rem 1.25rem;
  border: 2px solid transparent;
  border-radius: var(--sts-r-pill);
  background: var(--_bg);
  color: var(--_fg);
  font-family: var(--sts-font-body);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--sts-sh-2);
  transition: background-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.sts-btn:hover {
  background: var(--_bg-h);
  color: var(--_fg);
  transform: translateY(-1px);
  box-shadow: var(--sts-sh-3);
}
.sts-btn:active {
  transform: translateY(0);
}
.sts-btn svg {
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
}
.sts-btn--wa {
  --_bg: var(--sts-wa);
  --_fg: var(--sts-wa-ink);
  --_bg-h: var(--sts-wa-hover);
}
.sts-btn--red {
  --_bg: var(--sts-red);
  --_bg-h: var(--sts-red-hover);
}
.sts-btn--ghost {
  --_bg: transparent;
  --_fg: var(--sts-navy);
  --_bg-h: #fff;
  border-color: var(--sts-navy);
  box-shadow: none;
}
.sts-btn--ghost:hover {
  box-shadow: var(--sts-sh-2);
}

/* ---------- Form control ---------- */
.sts-select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-height: 3.5rem;
  padding: 0.75rem 3rem 0.75rem 1.1rem;
  border: 2px solid var(--sts-field-border);
  border-radius: var(--sts-r-md);
  background: #fff
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23203A80' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")
    no-repeat right 1rem center / 1.25rem;
  color: var(--sts-ink);
  font-family: var(--sts-font-body);
  font-size: 1.0625rem; /* >=16px prevents iOS zoom */
  font-weight: 500;
  cursor: pointer;
}
.sts-select:hover {
  border-color: var(--sts-navy);
}

/* ---------- Sticky mobile action bar ---------- */
.sts-bar {
  display: none;
}
@media (max-width: 767px) {
  /* Doubled class: WP core ships `[role="region"] { position: relative }` (0,1,0), which
     would otherwise win by source order and un-fix the bar. */
  .sts-bar.sts-bar {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 9990;
    display: flex;
    gap: var(--sts-s-2);
    padding: 0.5rem 0.75rem calc(0.5rem + env(safe-area-inset-bottom, 0px));
    padding-left: calc(0.75rem + env(safe-area-inset-left, 0px));
    padding-right: calc(0.75rem + env(safe-area-inset-right, 0px));
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid var(--sts-line);
    box-shadow: 0 -6px 20px rgba(15, 27, 61, 0.1);
    transition: transform 0.25s ease;
  }
  .sts-bar.is-hidden {
    transform: translateY(110%);
    pointer-events: none;
    visibility: hidden;
  }
  .sts-bar__btn {
    display: inline-flex;
    flex: 1 1 0;
    align-items: center;
    justify-content: center;
    gap: var(--sts-s-2);
    min-height: 3.25rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--sts-r-pill);
    font-family: var(--sts-font-body);
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.1;
    text-decoration: none;
  }
  .sts-bar__btn svg {
    width: 1.4rem;
    height: 1.4rem;
    flex: none;
  }
  .sts-bar__btn--wa {
    flex: 1.6 1 0;
    background: var(--sts-wa);
    color: var(--sts-wa-ink);
  }
  .sts-bar__btn--call {
    background: var(--sts-navy);
    color: #fff;
  }
  /* WCAG 2.4.11: keep a focused control from sliding under the fixed bar. */
  html:has(body.sts-has-bar) {
    scroll-padding-bottom: calc(var(--sts-bar-h, 68px) + 1rem);
  }
  body.sts-has-bar {
    padding-bottom: calc(var(--sts-bar-h) + env(safe-area-inset-bottom, 0px));
  }
  /* Keep the Joinchat floating button clear of the bar. */
  body.sts-has-bar.sts-joinchat-offset .joinchat {
    --sep: calc(var(--sts-bar-h) + 0.75rem);
    bottom: calc(var(--sts-bar-h) + 0.75rem + env(safe-area-inset-bottom, 0px)) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sts-btn,
  .sts-bar {
    transition: none;
  }
  .sts-btn:hover {
    transform: none;
  }
}

/* ---------- Shared building blocks for content sections (v0.2) ---------- */
.sts-sechead {
  display: grid;
  gap: var(--sts-s-3);
  justify-items: start;
  margin-bottom: var(--sts-s-6);
}
.sts-sechead .sts-lead {
  max-width: 44rem;
}
.sts-tag {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0.2rem 0.75rem;
  border-radius: var(--sts-r-pill);
  background: var(--sts-bg-alt);
  border: 1px solid var(--sts-line);
  color: var(--sts-navy);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.5;
}
.sts-tag--red {
  background: #fdecef;
  border-color: #f6b7c3;
  color: #9d0220;
}
.sts-link {
  color: var(--sts-navy);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}
.sts-link:hover {
  color: var(--sts-red-hover);
}
.sts-link:focus-visible {
  outline: none;
  box-shadow: var(--sts-focus);
  border-radius: 2px;
}
.sts-btn--sm {
  min-height: var(--sts-tap);
  padding: 0.5rem 1rem;
  font-size: 0.9375rem;
  box-shadow: none;
}
.sts-btn--sm svg {
  width: 1.25rem;
  height: 1.25rem;
}
.sts-btn--light {
  --_bg: #fff;
  --_fg: var(--sts-navy);
  --_bg-h: var(--sts-bg-alt);
}
.sts-phone:focus-visible,
.sts-qa__q:focus-visible,
.sts-group__sum:focus-visible {
  outline: none;
  box-shadow: var(--sts-focus);
}

/* Visible breadcrumbs on inner pages (same trail as the BreadcrumbList JSON-LD). */
.sts-crumbs {
  width: min(100% - 2 * var(--sts-gutter), var(--sts-max));
  margin: var(--sts-s-3) auto 0;
  font-size: var(--sts-fs-small);
}
.sts-crumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 var(--sts-s-2);
  margin: 0;
  padding: 0;
  list-style: none;
}
.sts-crumbs__list li {
  display: inline-flex;
  align-items: center;
  gap: var(--sts-s-2);
  margin: 0;
  padding: 0;
}
.sts-crumbs a {
  display: inline-flex;
  align-items: center;
  min-height: var(--sts-tap);
  color: var(--sts-navy);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.sts-crumbs [aria-current] {
  color: var(--sts-muted);
}
.sts-crumbs__sep {
  color: var(--sts-muted);
}
.sts-crumbs--dark a {
  color: #fff;
}
.sts-crumbs--dark [aria-current],
.sts-crumbs--dark .sts-crumbs__sep {
  color: #dbe4f7;
}
