/* ============================================================
   The 360 Solution — subpage styles (forms + legal)
   Loaded in addition to styles.css on the subpages.
   ============================================================ */

/* ---- Form inputs ---- */
.form-page input:not([type="checkbox"]),
.form-page textarea,
.form-page select {
  font-family: 'Hanken Grotesk', sans-serif; font-size: 15px; color: #16191f;
  width: 100%; border: 1px solid #d3ccbc; background: #faf7f0;
  padding: 13px 15px; border-radius: 2px; outline: none;
  transition: border-color .2s, background .2s, box-shadow .2s;
  -webkit-appearance: none; appearance: none;
}
.form-page input::placeholder,
.form-page textarea::placeholder { color: #b0a897; }
.form-page input:focus,
.form-page textarea:focus,
.form-page select:focus { border-color: #2f57e6; background: #fdfbf7; box-shadow: 0 0 0 3px rgba(47,87,230,.07); }
.form-page textarea { resize: vertical; min-height: 90px; }
.form-page input[type="checkbox"] { width: 18px; height: 18px; flex: none; cursor: pointer; border-radius: 2px; accent-color: #2f57e6; }
.form-page input[type="file"] { display: none; }

/* ---- Chips (form selections) ---- */
.fchip {
  padding: 9px 14px; border: 1px solid #d3ccbc; background: #faf7f0;
  color: #46474b; border-radius: 2px; font-size: 13.5px; font-weight: 400;
  cursor: pointer; transition: all .18s; font-family: 'Hanken Grotesk', sans-serif;
  line-height: 1.4; outline: none; text-align: left;
}
.fchip:hover { border-color: #b9b1a0; }
.fchip.active { border: 1.5px solid #2f57e6; background: rgba(47,87,230,.07); color: #1a3fcc; font-weight: 500; }

/* ---- Stepper / panel animations ---- */
@keyframes stepIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fadeInSnapVal { from { opacity: .3; } to { opacity: 1; } }
[data-step-panel] { animation: stepIn .38s cubic-bezier(.2,.7,.2,1) both; }
[data-snap-val] { animation: fadeInSnapVal .35s ease both; }

/* ---- Form layout responsive ---- */
@media (max-width: 920px) {
  [data-main-grid] { grid-template-columns: 1fr !important; }
  [data-snap-col] { position: static !important; max-height: none !important; }
  [data-snap-mobile] { display: block !important; }
}
@media (min-width: 921px) { [data-snap-mobile] { display: none !important; } }

/* ---- Legal pages: TOC scrollspy + grid ---- */
[data-toc] { transition: color .25s, border-color .25s; border-left: 2px solid transparent; }
[data-toc].toc-active { color: #16191f !important; border-left-color: var(--accent,#2f57e6) !important; }
@media (max-width: 860px) {
  [data-legal-grid] { grid-template-columns: 1fr !important; }
  [data-toc-col] { position: static !important; }
}

/* number-stepper hover (role count) */
.numbtn:hover { background: rgba(22,25,31,.06); }

/* ============================================================
   SUCCESS STATE — Unternehmen / Mandat confirmation
   Radius system: panels 6px, chips/buttons 2px (matches form chips).
   ============================================================ */

@keyframes succ-circle-draw {
  from { stroke-dashoffset: 214; opacity: 0; }
  5%   { opacity: 1; }
  to   { stroke-dashoffset: 0; opacity: 1; }
}
@keyframes succ-check-draw {
  from { stroke-dashoffset: 54; }
  to   { stroke-dashoffset: 0; }
}
@keyframes succ-fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes succ-scale-pop {
  from { opacity: 0; transform: scale(.7); }
  60%  { transform: scale(1.06); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes succ-step-in {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* All child elements start hidden until .success-active is applied */
#success-section .succ-badge,
#success-section .succ-status,
#success-section .succ-heading,
#success-section .succ-body,
#success-section .succ-mandate,
#success-section .succ-timeline,
#success-section .succ-step,
#success-section .succ-contact,
#success-section .succ-ctas { opacity: 0; }

/* SVG paths: pre-set dasharray so the draw animation works */
#success-section .succ-circle { stroke-dasharray: 214; stroke-dashoffset: 214; }
#success-section .succ-check  { stroke-dasharray: 54;  stroke-dashoffset: 54; }

/* Active: staggered entrance (MOTION ~5 — feedback + sequential reveal) */
#success-section.success-active .succ-badge {
  animation: succ-scale-pop .55s cubic-bezier(.34,1.56,.64,1) .05s both;
}
#success-section.success-active .succ-circle {
  animation: succ-circle-draw .85s cubic-bezier(.4,0,.2,1) .25s both;
}
#success-section.success-active .succ-check {
  animation: succ-check-draw .42s cubic-bezier(.4,0,.2,1) .95s both;
}
#success-section.success-active .succ-status   { animation: succ-fade-up .5s cubic-bezier(.2,.8,.2,1) .6s both; }
#success-section.success-active .succ-heading  { animation: succ-fade-up .6s cubic-bezier(.2,.8,.2,1) .72s both; }
#success-section.success-active .succ-body     { animation: succ-fade-up .55s cubic-bezier(.2,.8,.2,1) .88s both; }
#success-section.success-active .succ-mandate  { animation: succ-fade-up .6s cubic-bezier(.2,.8,.2,1) 1.02s both; }
#success-section.success-active .succ-timeline { animation: succ-fade-up .01s linear 1.18s both; } /* parent: instant so children animate */
#success-section.success-active .succ-tl-1     { animation: succ-step-in .5s cubic-bezier(.2,.8,.2,1) 1.2s both; }
#success-section.success-active .succ-tl-2     { animation: succ-step-in .5s cubic-bezier(.2,.8,.2,1) 1.32s both; }
#success-section.success-active .succ-tl-3     { animation: succ-step-in .5s cubic-bezier(.2,.8,.2,1) 1.44s both; }
#success-section.success-active .succ-contact  { animation: succ-fade-up .55s cubic-bezier(.2,.8,.2,1) 1.56s both; }
#success-section.success-active .succ-ctas     { animation: succ-fade-up .55s cubic-bezier(.2,.8,.2,1) 1.66s both; }

/* Overflow guards: prevent grid/flex blowout from nowrap children (mobile) */
#success-section .succ-inner { min-width: 0; }
#success-section .succ-mandate-body > div { min-width: 0; }
#success-section .succ-mandate-head { flex-wrap: wrap; }
#success-section .succ-contact > div { overflow-wrap: break-word; }

/* Mandate recap panel hover (subtle) */
#success-section .succ-mandate { transition: border-color .25s; }
#success-section .succ-mandate:hover { border-color: rgba(236,232,224,.16); }

/* Mandate tags */
.succ-tag {
  font-family: 'IBM Plex Mono', monospace; font-size: 10px; letter-spacing: .06em;
  color: #aeb1ab; background: rgba(236,232,224,.06);
  border: 1px solid rgba(236,232,224,.1); border-radius: 2px;
  padding: 4px 9px; white-space: nowrap;
}

/* Timeline */
.succ-timeline .succ-step {
  position: relative; display: grid; grid-template-columns: 28px 1fr;
  gap: 18px; padding-bottom: 26px;
}
.succ-timeline .succ-step:last-child { padding-bottom: 0; }
.succ-timeline .succ-step:not(:last-child)::before {
  content: ""; position: absolute; left: 13px; top: 30px; bottom: 2px;
  width: 1px; background: rgba(236,232,224,.13);
}
.succ-timeline .succ-marker {
  width: 28px; height: 28px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-family: 'IBM Plex Mono', monospace; font-size: 10.5px; color: #8f928b;
  background: #14171c; border: 1px solid rgba(236,232,224,.2);
  position: relative; z-index: 1;
}
.succ-timeline .succ-step.is-final .succ-marker {
  background: #2f57e6; border-color: #2f57e6; color: #fff;
}
.succ-timeline .succ-step-title {
  font-family: 'Hanken Grotesk', sans-serif; font-size: 15px; font-weight: 600;
  color: #ece8e0; margin-bottom: 6px; letter-spacing: -.01em;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px;
}
.succ-timeline .succ-eta {
  font-family: 'IBM Plex Mono', monospace; font-size: 10px; font-weight: 400;
  letter-spacing: .04em; color: #9aadee; background: rgba(47,87,230,.12);
  border-radius: 2px; padding: 3px 7px;
}
.succ-timeline .succ-step-text { font-size: 13.5px; line-height: 1.58; color: #6f726c; }

/* Contact block hover */
#success-section .succ-contact { transition: border-color .25s; }
#success-section .succ-contact:hover { border-color: rgba(236,232,224,.18); }

/* CTA hover states */
.succ-cta-primary:hover { background: #ffffff !important; transform: translateY(-1px); }
.succ-cta-ghost:hover   { border-color: rgba(236,232,224,.55) !important; transform: translateY(-1px); }
.succ-cta-primary:active, .succ-cta-ghost:active { transform: translateY(0); }

/* Responsive: mandate panel + timeline collapse */
@media (max-width: 720px) {
  #success-section .succ-mandate-body { grid-template-columns: 1fr !important; }
  #success-section .succ-metrics {
    border-left: none !important;
    border-top: 1px solid rgba(236,232,224,.08) !important;
  }
}
@media (max-width: 640px) {
  #success-section .succ-inner { padding-left: 20px !important; padding-right: 20px !important; }
  #success-section .succ-heading { font-size: clamp(1.95rem,8vw,2.6rem) !important; }
}

@media (prefers-reduced-motion: reduce) {
  #success-section .succ-badge,
  #success-section .succ-status,
  #success-section .succ-heading,
  #success-section .succ-body,
  #success-section .succ-mandate,
  #success-section .succ-timeline,
  #success-section .succ-step,
  #success-section .succ-contact,
  #success-section .succ-ctas { animation: none !important; opacity: 1 !important; transform: none !important; }
  #success-section .succ-circle,
  #success-section .succ-check { animation: none !important; stroke-dashoffset: 0 !important; }
}
