/* ==========================================================================
   components.css – Wärme mit System
   Buttons first (PROJECT_PLAN §5.5). Cards, readouts, tables and FAQ follow
   in Phase 3 as their UX Builder elements are built.
   ========================================================================== */

@property --ws-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 270deg;
}

/* --------------------------------------------------------------------------
   Primary button – navy pill, animated gradient ring, soft glow, arrow.

   Applied to Flatsome's own .button.primary so every button an editor adds in
   UX Builder is on brand without touching code (PROJECT_PLAN §5.5).
   -------------------------------------------------------------------------- */

/* Flatsome writes class="button primary is-outline" for an outline button –
   the colour and the style are separate attributes. Every primary rule is
   therefore scoped with :not(.is-outline), otherwise outline buttons inherit
   the gradient ring and the glow. */
.button.primary:not(.is-outline),
.ws-btn {
  --ws-ring: 2px;

  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  gap: 0.65em;
  min-height: 52px;
  margin-bottom: 0;
  padding: 0.85em 1.5em 0.85em 1.7em;
  border: var(--ws-ring) solid transparent;
  border-radius: var(--ws-radius-pill);
  background:
    linear-gradient(var(--ws-ink), var(--ws-ink)) padding-box,
    conic-gradient(
      from var(--ws-angle) at 50% 50%,
      var(--ws-indigo),
      var(--ws-red) 30%,
      var(--ws-amber) 50%,
      var(--ws-red) 70%,
      var(--ws-indigo)
    ) border-box;
  box-shadow: none;
  color: #fff;
  font-family: var(--ws-font-display);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  text-decoration: none;
  transition: transform 0.2s ease;
}

/* Soft glow underneath. */
.button.primary:not(.is-outline)::before,
.ws-btn::before {
  content: "";
  position: absolute;
  inset: 6px 10px -6px;
  z-index: -1;
  border-radius: inherit;
  background: var(--ws-gradient);
  filter: blur(16px);
  opacity: 0.28;
  transition: opacity 0.3s ease;
}

/* Arrow, added by CSS so editors never have to add an icon. */
.button.primary:not(.is-outline)::after,
.ws-btn::after {
  content: "";
  flex: none;
  width: 1.05em;
  height: 1.05em;
  background: currentColor;
  -webkit-mask: url("../svg/arrow-right.svg") center / contain no-repeat;
          mask: url("../svg/arrow-right.svg") center / contain no-repeat;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.button.primary:not(.is-outline):hover,
.ws-btn:hover {
  color: #fff;
  animation: ws-ring-spin 3.2s linear infinite;
}

.button.primary:not(.is-outline):hover::before,
.ws-btn:hover::before { opacity: 0.55; }

.button.primary:not(.is-outline):hover::after,
.ws-btn:hover::after { transform: translateX(4px); }

.button.primary:not(.is-outline):active,
.ws-btn:active { transform: scale(0.98); }

.button.primary:not(.is-outline):focus-visible,
.ws-btn:focus-visible {
  outline: 3px solid var(--ws-focus);
  outline-offset: 3px;
}

@keyframes ws-ring-spin {
  to { --ws-angle: 630deg; }
}

/* Flatsome wraps button labels in a <span>; keep it from adding its own box. */
.button.primary:not(.is-outline) > span,
.ws-btn > span {
  display: inline;
  padding: 0;
  margin: 0;
}

/* --------------------------------------------------------------------------
   Button rows.

   Flatsome gives every button a 16px right margin, which is enough to push a
   primary + secondary pair past the edge of a 6-column container and stack
   them. Add the class to the *column* when two buttons belong together and
   they lay out as a wrapping flex row with an explicit gap.
   -------------------------------------------------------------------------- */

.ws-actions > .col-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ws-space-3);
}

.ws-actions > .col-inner > .button { margin: 0; }

/* --------------------------------------------------------------------------
   Trust row – three short facts, small, no icons, spacing instead of
   middle dots (content doc §2.1).
   -------------------------------------------------------------------------- */

.ws-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ws-space-3) var(--ws-space-7);
  margin-top: var(--ws-space-6);
  font-size: 0.9375rem;
  color: var(--ws-muted);
}

.ws-trust-row > li { margin: 0 !important; }

/* --------------------------------------------------------------------------
   The "three questions" rows – a fine rule between, question left, answer
   right. No cards, no icons (content doc §2.2).
   -------------------------------------------------------------------------- */

.ws-question-row {
  padding-top: var(--ws-space-6);
  padding-bottom: var(--ws-space-6);
  border-top: 1px solid var(--ws-line);
}

.ws-question-row .col-inner > p:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   Readout – the big measured numbers. Size/weight come from Global Styles
   (".readout"); the colour and the tabular figures belong here.
   -------------------------------------------------------------------------- */

.readout {
  color: var(--ws-ink);
  font-variant-numeric: tabular-nums;
  margin-bottom: var(--ws-space-2);
}

.ws-section-navy .readout { color: #fff; }

/* --------------------------------------------------------------------------
   Secondary button – outline, same pill and arrow, no gradient.
   -------------------------------------------------------------------------- */

.button.is-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.65em;
  min-height: 52px;
  margin-bottom: 0;
  padding: 0.85em 1.5em 0.85em 1.7em;
  border: 1.5px solid var(--ws-ink);
  border-radius: var(--ws-radius-pill);
  background: transparent;
  box-shadow: none;
  color: var(--ws-ink);
  font-family: var(--ws-font-display);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.button.is-outline::after {
  content: "";
  flex: none;
  width: 1.05em;
  height: 1.05em;
  background: currentColor;
  -webkit-mask: url("../svg/arrow-right.svg") center / contain no-repeat;
          mask: url("../svg/arrow-right.svg") center / contain no-repeat;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.button.is-outline:hover {
  background-color: var(--ws-ink);
  color: #fff;
}

.button.is-outline:hover::after { transform: translateX(4px); }

.button.is-outline:focus-visible {
  outline: 3px solid var(--ws-focus);
  outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Tertiary – a text link with an underline and the same arrow.
   -------------------------------------------------------------------------- */

.ws-link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--ws-font-display);
  font-weight: 600;
  color: var(--ws-link);
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

.ws-link-arrow::after {
  content: "";
  flex: none;
  width: 1em;
  height: 1em;
  background: currentColor;
  -webkit-mask: url("../svg/arrow-right.svg") center / contain no-repeat;
          mask: url("../svg/arrow-right.svg") center / contain no-repeat;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ws-link-arrow:hover::after { transform: translateX(4px); }

/* --------------------------------------------------------------------------
   On navy: the primary button flips to a white fill with ink text, keeps the
   ring and the glow (PROJECT_PLAN §5.5).
   -------------------------------------------------------------------------- */

.dark .button.primary:not(.is-outline),
.ws-section-navy .button.primary:not(.is-outline) {
  background:
    linear-gradient(#fff, #fff) padding-box,
    conic-gradient(
      from var(--ws-angle) at 50% 50%,
      var(--ws-indigo),
      var(--ws-red) 30%,
      var(--ws-amber) 50%,
      var(--ws-red) 70%,
      var(--ws-indigo)
    ) border-box;
  color: var(--ws-ink);
}

.dark .button.primary:not(.is-outline):hover,
.ws-section-navy .button.primary:not(.is-outline):hover { color: var(--ws-ink); }

.dark .button.is-outline,
.ws-section-navy .button.is-outline {
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
}

.dark .button.is-outline:hover,
.ws-section-navy .button.is-outline:hover {
  background-color: #fff;
  color: var(--ws-ink);
}

/* --------------------------------------------------------------------------
   Sizes. Never below 44px (touch target).
   -------------------------------------------------------------------------- */

.button.primary:not(.is-outline).is-small,
.button.is-outline.is-small,
.ws-btn.is-small {
  min-height: 44px;
  padding: 0.6em 1.15em 0.6em 1.35em;
  font-size: 0.9375rem;
}

/* --------------------------------------------------------------------------
   Reduced motion: no ring spin, no arrow slide.
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .button.primary:not(.is-outline):hover,
  .ws-btn:hover { animation: none; }

  .button.primary:not(.is-outline)::after,
  .button.is-outline::after,
  .ws-btn::after,
  .ws-link-arrow::after { transition: none; }
}

/* --------------------------------------------------------------------------
   Kurzantwort – the short answer under a page headline, written for the
   featured snippet (content doc §3.1, §4.1, §5.1, §6.1). A rule and a little
   air, not a tinted box, so it does not read as a template callout.
   -------------------------------------------------------------------------- */

.ws-answer {
  max-width: 68ch;
  margin: var(--ws-space-5) 0 var(--ws-space-6);
  padding-left: var(--ws-space-5);
  border-left: 3px solid var(--ws-ink);
}

.ws-answer p {
  margin-bottom: 0;
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.2rem);
  line-height: 1.6;
  color: var(--ws-ink);
}

/* --------------------------------------------------------------------------
   Reference places line (content doc §2.8).
   -------------------------------------------------------------------------- */

.ws-places {
  max-width: 78ch;
  color: var(--ws-muted);
}

.ws-places strong { color: var(--ws-ink); }

/* --------------------------------------------------------------------------
   Contact list (content doc §9.1). Label left, value right, generous size.
   -------------------------------------------------------------------------- */

.ws-contact-list {
  margin: var(--ws-space-6) 0;
  font-size: 1.0625rem;
}

.ws-contact-list > li {
  display: grid;
  grid-template-columns: minmax(100px, 26%) 1fr;
  gap: var(--ws-space-4);
  padding: var(--ws-space-3) 0;
  margin: 0 !important;
  border-top: 1px solid var(--ws-line);
}

.ws-contact-list__label { color: var(--ws-muted); }

.ws-contact-list a {
  font-family: var(--ws-font-display);
  font-weight: 600;
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   Placeholders that stand in for something still to come: the consent-gated
   YouTube embed and the two WPForms forms. Both are deliberately plain so
   nobody mistakes them for finished design.
   -------------------------------------------------------------------------- */

.ws-embed-placeholder,
.ws-form-pending {
  padding: clamp(20px, 3vw, 32px);
  border: 1px dashed var(--ws-line);
  border-radius: var(--ws-radius-panel);
  background: var(--ws-stone);
}

.ws-embed-placeholder__title {
  font-family: var(--ws-font-display);
  font-weight: 600;
  color: var(--ws-ink);
}

.ws-form-pending p:last-child,
.ws-embed-placeholder p:last-child { margin-bottom: 0; }

.ws-form-pending code {
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(14, 23, 49, 0.06);
  font-size: 0.9em;
}

/* Each contact row is a two-column grid, so the value must be a single
   element. Without the wrapper a row that mixes a span and loose text spills
   into extra implicit grid rows. */
.ws-contact-list__value { min-width: 0; }
