/* ==========================================================================
   components.css – Buttons, Karten, Legenden-Icons, FAQ, Formulare, Chips
   ========================================================================== */

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--pine-800); --fg: var(--snow); --bd: var(--pine-800);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 50px; padding: 12px 22px; border-radius: 999px;
  background: var(--bg); color: var(--fg); border: 1.5px solid var(--bd);
  font-weight: 620; font-size: 1rem; letter-spacing: .005em; text-decoration: none; white-space: nowrap;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .2s, color .2s, border-color .2s;
  overflow: hidden; isolation: isolate;
}
.btn::after { /* Schimmer wie Morgenlicht über einem Grat */
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .22) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .7s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -14px rgba(21, 40, 30, .6); }
.btn:hover::after { transform: translateX(120%); }
.btn:active { transform: translateY(0); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--sm { min-height: 40px; padding: 8px 16px; font-size: .92rem; }
.btn--lg { min-height: 58px; padding: 14px 28px; font-size: 1.06rem; }
.btn--ghost { --bg: transparent; --fg: var(--ink); --bd: var(--line-strong); }
.btn--ghost:hover { --bd: var(--pine-700); box-shadow: none; }
.btn--glacier { --bg: var(--glacier-300); --fg: var(--pine-950); --bd: var(--glacier-300); }
.btn--glow { --bg: var(--alpenglow); --fg: var(--granite-950); --bd: var(--alpenglow); }
.on-dark .btn--ghost { --fg: var(--snow); --bd: rgba(244, 242, 236, .4); }
.on-dark .btn--ghost:hover { --bd: var(--glacier-300); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Karten ---------- */
.card {
  position: relative; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(22px, 2.6vw, 32px); box-shadow: var(--shadow-1);
}
.card--flat { box-shadow: none; background: transparent; }
/* Passermarken in den Ecken, wie auf einem Kartenblatt */
.ticks::before, .ticks::after {
  content: ''; position: absolute; width: 14px; height: 14px; pointer-events: none;
  border-color: var(--contour); opacity: .55;
}
.ticks::before { top: 10px; left: 10px; border-top: 1.5px solid; border-left: 1.5px solid; }
.ticks::after { bottom: 10px; right: 10px; border-bottom: 1.5px solid; border-right: 1.5px solid; }

.legend-icon {
  width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; flex: none;
  background: var(--glacier-100); color: var(--glacier-700); margin-bottom: 18px;
}
.legend-icon svg { width: 32px; height: 32px; }
.on-dark .legend-icon { background: rgba(159, 203, 216, .12); color: var(--glacier-300); }

.tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase;
  background: var(--glacier-100); color: var(--glacier-700); white-space: nowrap;
}
.tag--warn { background: rgba(226, 154, 107, .18); color: var(--alpenglow-deep); }
.tag--pine { background: rgba(63, 109, 88, .14); color: var(--pine-700); }
.tag--demo { background: transparent; border: 1px dashed currentColor; color: var(--granite-500); }
.on-dark .tag--demo { color: var(--granite-300); }

.check-list { list-style: none; display: grid; gap: 10px; }
.check-list li { position: relative; padding-left: 30px; }
.check-list li::before {
  content: ''; position: absolute; left: 0; top: .32em; width: 18px; height: 18px; border-radius: 50%;
  background: var(--pine-500) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='%23f4f2ec' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.on-dark .check-list li::before { background-color: var(--glacier-600); }

/* ---------- Kennzahl ---------- */
.stat__value { font-family: var(--font-display); font-size: clamp(2.2rem, 3vw + 1rem, 3.4rem); font-weight: 360; line-height: 1; letter-spacing: -0.03em; }
.stat__value small { font-size: .45em; letter-spacing: 0; margin-left: .15em; font-weight: 400; }
.stat__label { margin-top: 8px; font-size: .92rem; color: var(--ink-soft); }
.on-dark .stat__label { color: rgba(244, 242, 236, .66); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; max-width: 900px; }
.faq__item {
  border: 1px solid var(--line); border-radius: 16px; background: var(--white);
  transition: border-color .25s, box-shadow .25s;
}
.faq__item[open] { border-color: rgba(59, 125, 149, .45); box-shadow: var(--shadow-1); }
.faq__item summary {
  list-style: none; cursor: pointer; display: flex; gap: 16px; align-items: flex-start; justify-content: space-between;
  padding: 20px 22px; font-family: var(--font-display); font-size: clamp(1.08rem, .4vw + 1rem, 1.25rem); font-weight: 460; line-height: 1.35;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: ''; flex: none; width: 28px; height: 28px; margin-top: -1px; border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: linear-gradient(var(--ink), var(--ink)) center / 12px 1.6px no-repeat, linear-gradient(var(--ink), var(--ink)) center / 1.6px 12px no-repeat;
  transition: transform .35s var(--ease), background-color .2s;
}
.faq__item[open] summary::after { transform: rotate(45deg); background-color: var(--glacier-100); }
.faq__item summary:focus-visible { outline-offset: -3px; border-radius: 16px; }
.faq__body { padding: 0 22px 22px; color: var(--granite-700); max-width: 72ch; }
.faq__body p:last-child { margin-bottom: 0; }
.faq__item[open] .faq__body { animation: faq-open .45s var(--ease); }
@keyframes faq-open { from { opacity: 0; transform: translateY(-6px); } }
.faq-layout { display: grid; gap: 40px; }
@media (min-width: 1000px) {
  .faq-layout { grid-template-columns: 360px 1fr; gap: 64px; align-items: start; }
  .faq-layout .sec-head { position: sticky; top: calc(var(--header-h) + 32px); }
  .faq-layout .sec-head h2 { font-size: clamp(2rem, 2.2vw + .9rem, 2.9rem); }
}

/* ---------- Formulare ---------- */
.field { display: grid; gap: 7px; }
.field label, .field .label, fieldset legend {
  font-family: var(--font-mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--granite-600); font-weight: 500;
}
.input {
  width: 100%; min-height: 52px; padding: 12px 16px; border-radius: 12px;
  border: 1.5px solid var(--line-strong); background: var(--white);
  font-size: 1.02rem; transition: border-color .2s, box-shadow .2s;
}
.input::placeholder { color: var(--granite-500); }
.input:hover { border-color: var(--granite-500); }
.input:focus { outline: none; border-color: var(--glacier-600); box-shadow: 0 0 0 4px rgba(79, 148, 171, .2); }
.input[aria-invalid="true"] { border-color: var(--alpenglow-deep); box-shadow: 0 0 0 4px rgba(184, 100, 58, .14); }
select.input { appearance: none; padding-right: 44px; background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 8l5 5 5-5' fill='none' stroke='%231e2529' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") right 14px center / 18px no-repeat; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset legend { padding: 0; margin-bottom: 10px; }
.hint { font-size: .86rem; color: var(--ink-soft); line-height: 1.45; }
.form-alert:empty { display: none; }
.form-alert {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px;
  background: rgba(226, 154, 107, .14); border: 1px solid rgba(184, 100, 58, .35); color: #7a3c1c; font-size: .95rem;
}
.form-alert::before { content: '!'; flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--alpenglow-deep); color: var(--white); font-weight: 700; font-size: .8rem; margin-top: 1px; }

/* Auswahlkarten (Radio/Checkbox als große Fläche) */
.choice { position: relative; display: block; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.choice__face {
  display: flex; flex-direction: column; gap: 4px; height: 100%;
  padding: 16px 16px 14px; border-radius: 14px; border: 1.5px solid var(--line-strong); background: var(--white);
  transition: border-color .2s, box-shadow .25s, transform .25s var(--ease), background .2s;
}
.choice:hover .choice__face { border-color: var(--granite-500); }
.choice input:checked + .choice__face {
  border-color: var(--pine-700); background: linear-gradient(180deg, #fff, var(--glacier-50));
  box-shadow: 0 0 0 3px rgba(36, 71, 58, .14), var(--shadow-1); transform: translateY(-2px);
}
.choice input:focus-visible + .choice__face { outline: 3px solid var(--glacier-500); outline-offset: 3px; }
.choice__title { font-weight: 650; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.choice__meta { font-size: .86rem; color: var(--ink-soft); line-height: 1.4; }
.choice__price { font-family: var(--font-display); font-size: 1.45rem; font-weight: 420; letter-spacing: -0.02em; margin-top: 4px; }
.choice__face::after { /* Häkchen-Marke */
  content: ''; position: absolute; top: 12px; right: 12px; width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid var(--line-strong); background: var(--white);
  transition: background .2s, border-color .2s;
}
.choice input:checked + .choice__face::after {
  border-color: var(--pine-700);
  background: var(--pine-700) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='%23f4f2ec' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.choice--compact .choice__face { padding: 12px 40px 12px 14px; }

.segmented { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--snow-2); border: 1px solid var(--line); max-width: 100%; }
.segmented label { flex: 1 1 auto; text-align: center; }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segmented span { display: block; padding: 8px clamp(10px, 2.4vw, 16px); white-space: nowrap; border-radius: 999px; font-weight: 600; font-size: .93rem; transition: background .2s, color .2s; }
.segmented input:checked + span { background: var(--pine-800); color: var(--snow); }
.segmented input:focus-visible + span { outline: 3px solid var(--glacier-500); outline-offset: 2px; }

.check { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; font-size: .97rem; line-height: 1.4; }
.check input { appearance: none; flex: none; width: 22px; height: 22px; margin: 0; border-radius: 6px; border: 1.5px solid var(--granite-500); background: var(--white); display: grid; place-items: center; cursor: pointer; transition: background .2s, border-color .2s; }
.check input:checked { background: var(--pine-700) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='%23f4f2ec' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 15px no-repeat; border-color: var(--pine-700); }
.check small { display: block; color: var(--ink-soft); font-size: .85rem; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--white); font-size: .88rem; font-weight: 560; cursor: pointer;
  transition: border-color .2s, background .2s, transform .2s var(--ease);
}
.chip:hover { border-color: var(--pine-700); transform: translateY(-1px); }
.chip svg { width: 14px; height: 14px; color: var(--contour-text); }

/* Hinweisbox */
.note {
  display: flex; gap: 14px; padding: 16px 18px; border-radius: 14px; background: var(--glacier-50); border: 1px solid var(--glacier-200);
  font-size: .95rem; line-height: 1.55;
}
.note svg { width: 22px; height: 22px; flex: none; color: var(--glacier-700); margin-top: 2px; }
.note--glow { background: rgba(226, 154, 107, .1); border-color: rgba(226, 154, 107, .4); }
.note--glow svg { color: var(--alpenglow-deep); }

/* Wegmarke (rot-weiß-rot vermeiden: Wegmarkierung hier in Gletscherblau/Weiß) */
.waymark { display: inline-block; width: 22px; height: 14px; border-radius: 2px; background: linear-gradient(var(--glacier-600) 0 33%, var(--white) 33% 66%, var(--glacier-600) 66%); box-shadow: 0 0 0 1px var(--line); vertical-align: middle; }

/* Preis-Tabelle */
.price-table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.price-table caption { text-align: left; padding-bottom: 12px; font-family: var(--font-mono); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--contour-text); }
.price-table th, .price-table td { padding: 14px 12px; text-align: left; border-bottom: 1px solid var(--line); }
.price-table thead th { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--granite-600); font-weight: 500; }
.price-table td.num, .price-table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.price-table tbody th { font-weight: 600; }
.price-table tbody th small { display: block; font-weight: 400; color: var(--ink-soft); font-size: .84rem; }
.price-table tbody tr { transition: background .2s; }
.price-table tbody tr:hover { background: rgba(159, 203, 216, .12); }
