/* =========================================================
   Vitaliv — Skjema (contact + refund)
   Written from scratch. Nothing here comes from Jotform.
   ========================================================= */

*, *::before, *::after { box-sizing: border-box; }
/* The step panels are display:grid, which outranks the user-agent [hidden] rule
   and would leave step 1 on screen underneath step 2. */
[hidden] { display: none !important; }
body, h1, h2, h3, p, ul, li, figure, fieldset, legend { margin: 0; padding: 0; }
fieldset { border: 0; min-width: 0; }
ul, ol { list-style: none; }

:root {
  --ink:        #12312b;
  --ink-soft:   #3a5a4f;
  --ink-faint:  #6b877c;
  --green:      #4faf4d;
  --green-deep: #3d9440;
  --green-dark: #2f7a33;
  --green-tint: #f3f7f4;
  --green-line: #d7e7dc;
  --orange:     #ff6c0e;
  --danger:     #c0392b;
  --danger-bg:  #fdf1ef;
  --danger-line:#f0c7c0;
  --surface:    #ffffff;
  --bg:         #f7faf8;
  --line:       #e2ece6;

  --font-display: Fraunces, Georgia, 'Times New Roman', serif;
  --font-sans: Poppins, -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 24px;

  --shadow-card: 0 18px 50px rgba(18, 49, 43, 0.07), 0 2px 6px rgba(18, 49, 43, 0.04);
  --shadow-focus: 0 0 0 4px rgba(79, 175, 77, 0.16);

  --max-w: 1140px;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.vl-form-page {
  max-width: var(--max-w);
  margin-inline: auto;
  padding: clamp(2rem, 6vw, 4.5rem) clamp(1.25rem, 5vw, 2.5rem) clamp(3rem, 8vw, 6rem);
}

/* ── Two-column layout: context on the left, the form on the right ── */
.vl-layout {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 900px) {
  .vl-layout { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); }
  .vl-intro { position: sticky; top: 104px; }
}

.vl-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green-deep);
  background: var(--green-tint);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  margin-bottom: 1.1rem;
}

.vl-title {
  font-family: var(--font-display);
  font-weight: 620;
  font-size: clamp(2rem, 4.4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.vl-lead {
  margin-top: 1rem;
  font-size: clamp(1rem, 1.6vw, 1.125rem);
  color: var(--ink-soft);
  max-width: 46ch;
}

.vl-points { margin-top: 2.25rem; display: grid; gap: 1.25rem; }
.vl-point { display: grid; grid-template-columns: 34px 1fr; gap: 0.9rem; align-items: start; }
.vl-point__icon {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--green-tint); color: var(--green-deep);
}
.vl-point__icon svg { width: 18px; height: 18px; }
.vl-point__title { font-size: 0.975rem; font-weight: 600; line-height: 1.4; }
.vl-point__body { font-size: 0.9rem; color: var(--ink-faint); line-height: 1.55; }

/* ── The card ── */
.vl-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: clamp(1.5rem, 3.5vw, 2.75rem);
}

.vl-required-note { font-size: 0.85rem; color: var(--ink-faint); margin-bottom: 1.75rem; }

/* ── Step indicator (refund form) ── */
.vl-steps { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 2rem; }
.vl-step { display: flex; align-items: center; gap: 0.6rem; min-width: 0; }
.vl-step__dot {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 0.85rem; font-weight: 600;
  background: var(--green-tint); color: var(--ink-faint);
  border: 1px solid var(--green-line);
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}
.vl-step__label {
  font-size: 0.875rem; font-weight: 500; color: var(--ink-faint);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.vl-step[aria-current="step"] .vl-step__dot { background: var(--green); border-color: var(--green); color: #fff; }
.vl-step[aria-current="step"] .vl-step__label { color: var(--ink); font-weight: 600; }
.vl-step.is-done .vl-step__dot { background: var(--green-tint); border-color: var(--green); color: var(--green-deep); }
.vl-steps__rule { flex: 1 1 auto; height: 1px; background: var(--green-line); min-width: 12px; }
@media (max-width: 560px) { .vl-step__label { display: none; } }

/* ── Fields ── */
.vl-fields { display: grid; gap: 1.5rem; }
.vl-row { display: grid; gap: 1.5rem; }
@media (min-width: 620px) { .vl-row--2 { grid-template-columns: 1fr 1fr; } }

.vl-field { display: grid; gap: 0.45rem; min-width: 0; }
.vl-label { font-size: 0.925rem; font-weight: 600; line-height: 1.4; }
.vl-label .vl-req { color: var(--orange); margin-left: 0.15rem; }
.vl-label .vl-opt { font-weight: 400; color: var(--ink-faint); font-size: 0.85rem; margin-left: 0.35rem; }
.vl-hint { font-size: 0.85rem; color: var(--ink-faint); line-height: 1.5; }

.vl-input, .vl-textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--green-line);
  border-radius: var(--radius-md);
  padding: 0.8rem 1rem;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.vl-textarea { min-height: 148px; resize: vertical; line-height: 1.6; }
.vl-input::placeholder, .vl-textarea::placeholder { color: #a8bcb2; }
.vl-input:hover, .vl-textarea:hover { border-color: #bcd6c5; }
.vl-input:focus, .vl-textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: var(--shadow-focus);
}
.vl-input[aria-invalid="true"], .vl-textarea[aria-invalid="true"] {
  border-color: var(--danger);
  background: var(--danger-bg);
}
.vl-input[aria-invalid="true"]:focus, .vl-textarea[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 4px rgba(192, 57, 43, 0.13);
}
/* The number input's spinners fight the styling and invite stray scroll-wheel edits. */
.vl-input[type="number"] { appearance: textfield; -moz-appearance: textfield; }
.vl-input[type="number"]::-webkit-outer-spin-button,
.vl-input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ── Radio group as selectable cards ── */
.vl-choices { display: grid; gap: 0.6rem; margin-top: 0.15rem; }
.vl-choice {
  position: relative;
  display: grid; grid-template-columns: 22px 1fr; gap: 0.75rem; align-items: center;
  padding: 0.85rem 1rem;
  border: 1px solid var(--green-line);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}
.vl-choice:hover { border-color: #bcd6c5; background: #fbfdfc; }
.vl-choice input { position: absolute; opacity: 0; width: 0; height: 0; }
.vl-choice__mark {
  width: 22px; height: 22px; border-radius: 50%;
  border: 1.5px solid #bcd6c5; background: #fff;
  display: grid; place-items: center;
  transition: border-color .2s ease;
}
.vl-choice__mark::after {
  content: ""; width: 10px; height: 10px; border-radius: 50%;
  background: var(--green); transform: scale(0); transition: transform .18s ease;
}
.vl-choice__text { font-size: 0.95rem; line-height: 1.45; }
.vl-choice:has(input:checked) { border-color: var(--green); background: var(--green-tint); box-shadow: var(--shadow-focus); }
.vl-choice:has(input:checked) .vl-choice__mark { border-color: var(--green); }
.vl-choice:has(input:checked) .vl-choice__mark::after { transform: scale(1); }
.vl-choice:has(input:focus-visible) { outline: 3px solid var(--orange); outline-offset: 2px; }
.vl-choices[aria-invalid="true"] .vl-choice { border-color: var(--danger-line); }

.vl-other { margin-top: 0.6rem; display: none; }
.vl-other.is-open { display: block; }

/* ── Inline error ── */
.vl-error {
  display: none;
  align-items: flex-start; gap: 0.4rem;
  font-size: 0.85rem; line-height: 1.45; color: var(--danger);
}
.vl-error.is-shown { display: flex; }
.vl-error svg { flex: none; width: 15px; height: 15px; margin-top: 0.2rem; }

/* ── Error summary ── */
.vl-summary {
  display: none;
  border: 1px solid var(--danger-line);
  background: var(--danger-bg);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.75rem;
}
.vl-summary.is-shown { display: block; }
.vl-summary__title { font-size: 1rem; font-weight: 600; color: var(--danger); }
.vl-summary__lead { font-size: 0.875rem; color: var(--ink-soft); margin-top: 0.15rem; }
.vl-summary__list { margin-top: 0.7rem; display: grid; gap: 0.3rem; }
.vl-summary__list a { color: var(--danger); font-size: 0.875rem; text-underline-offset: 3px; }

/* ── Buttons ── */
.vl-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.vl-btn {
  font: inherit; font-weight: 600; cursor: pointer;
  border-radius: 999px; border: 1.5px solid transparent;
  padding: 0.85rem 1.9rem;
  transition: background-color .22s ease, color .22s ease, border-color .22s ease, transform .12s ease;
}
.vl-btn:active { transform: translateY(1px); }
.vl-btn:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.vl-btn--primary { background: var(--green); color: #fff; flex: 1 1 auto; }
.vl-btn--primary:hover { background: var(--green-dark); }
.vl-btn--primary[disabled] { background: #a9cfa8; cursor: progress; }
.vl-btn--ghost { background: transparent; color: var(--ink-soft); border-color: var(--green-line); }
.vl-btn--ghost:hover { border-color: var(--ink-soft); color: var(--ink); }

/* ── Honeypot: off-screen, never focusable, never announced ── */
.vl-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ── Success ── */
.vl-done { display: none; text-align: center; padding: clamp(1rem, 4vw, 2.5rem) 0; }
.vl-done.is-shown { display: block; }
.vl-done__icon {
  width: 68px; height: 68px; border-radius: 50%;
  background: var(--green-tint); color: var(--green-deep);
  display: grid; place-items: center; margin: 0 auto 1.5rem;
}
.vl-done__icon svg { width: 32px; height: 32px; }
.vl-done__title { font-family: var(--font-display); font-weight: 620; font-size: clamp(1.4rem, 3vw, 1.85rem); line-height: 1.2; }
.vl-done__body { margin-top: 0.75rem; color: var(--ink-soft); max-width: 42ch; margin-inline: auto; }
.vl-ref {
  margin: 1.75rem auto 0;
  display: inline-flex; flex-direction: column; gap: 0.2rem;
  background: var(--green-tint); border: 1px dashed var(--green-line);
  border-radius: var(--radius-md); padding: 0.9rem 1.5rem;
}
.vl-ref__label { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); }
.vl-ref__value { font-size: 1.1rem; font-weight: 600; letter-spacing: 0.03em; }

.vl-fail {
  display: none;
  border: 1px solid var(--danger-line); background: var(--danger-bg);
  border-radius: var(--radius-md); padding: 1rem 1.25rem; margin-top: 1.5rem;
}
.vl-fail.is-shown { display: block; }
.vl-fail__title { font-weight: 600; color: var(--danger); font-size: 0.95rem; }
.vl-fail__body { font-size: 0.875rem; color: var(--ink-soft); }

.vl-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
