/* Stepper form system: one question group per step, big bold fields.
   Used by /contact and by future survey, trip and booking forms. */

.form-page { min-height: 100vh; min-height: 100dvh; background: var(--paper); color: var(--fg-light); }
.form-shell { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); min-height: 100vh; min-height: 100dvh; }
.form-aside {
  background: var(--night); color: var(--fg-dark);
  padding: calc(var(--nav-h) + env(safe-area-inset-top, 0px) + 48px) var(--gutter) 48px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  position: sticky; top: 0; height: 100vh; height: 100dvh;
}
.form-aside h1 { font-size: clamp(2.6rem, 5vw, 5rem); font-weight: var(--w-black); }
.form-aside .lead { margin-top: 18px; }
.aside-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; counter-reset: s; }
.aside-steps li { display: flex; gap: 14px; align-items: center; padding: 10px 0; color: var(--muted-dark); font-weight: var(--w-bold); transition: color .3s; }
.aside-steps li::before { counter-increment: s; content: counter(s); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; border: 1.5px solid var(--line-dark); transition: all .3s; flex: none; }
.aside-steps li.current { color: var(--fg-dark); }
.aside-steps li.current::before { border-color: var(--brand); color: var(--brand); }
.aside-steps li.sent { color: var(--fg-dark); }
.aside-steps li.done::before { content: "✓"; background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.aside-foot { font-size: var(--t-small); color: var(--muted-dark); display: grid; gap: 6px; }
.aside-foot a { color: var(--fg-dark); }

.form-main { padding: calc(var(--nav-h) + env(safe-area-inset-top, 0px) + 48px) var(--gutter) 64px; display: flex; flex-direction: column; min-width: 0; }
.form-main > form, .form-main > .sent { width: 100%; max-width: 720px; margin: 0 auto; flex: 1; display: flex; flex-direction: column; }

.progress { display: flex; align-items: center; gap: 16px; margin-bottom: clamp(28px, 5vw, 56px); }
.progress-bar { flex: 1; height: 6px; border-radius: var(--r-pill); background: var(--line-light); overflow: hidden; }
.progress-bar i { display: block; height: 100%; width: 0; background: var(--brand-text); border-radius: inherit; transition: width .6s var(--ease); }
.progress-label { font-weight: var(--w-heavy); font-size: var(--t-small); color: var(--muted-light); font-variant-numeric: tabular-nums; white-space: nowrap; }

.step { display: none; flex-direction: column; gap: 28px; }
.step.active { display: flex; animation: step-in .55s var(--ease) both; }
.step.back.active { animation-name: step-in-back; }
@keyframes step-in { from { opacity: 0; transform: translateX(32px); } }
@keyframes step-in-back { from { opacity: 0; transform: translateX(-32px); } }
.step-head { display: grid; gap: 12px; }
.step-head h2 { font-size: clamp(2rem, 4.2vw, 3.4rem); font-weight: var(--w-black); }
.step-head p { margin: 0; color: var(--muted-light); font-size: var(--t-lead); max-width: 52ch; }

.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 16px; }
.field { display: grid; gap: 10px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
@media (max-width: 640px) { .fields { grid-template-columns: 1fr; } }
.field > label, .field > .label { font-size: var(--t-label); font-weight: var(--w-heavy); letter-spacing: .12em; text-transform: uppercase; color: var(--muted-light); }
.field .opt { font-weight: var(--w-semi); letter-spacing: .04em; text-transform: none; color: #7a8081; }
.input {
  width: 100%; min-height: 64px; padding: 16px 20px;
  border: 2px solid var(--line-light); border-radius: var(--r-md);
  background: var(--white); color: var(--fg-light);
  font-size: clamp(1.1rem, 1.6vw, 1.3rem); font-weight: var(--w-bold);
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none; appearance: none;
}
.input::placeholder { color: #a5aaa9; font-weight: var(--w-semi); }
.input:hover { border-color: #b9bdbb; }
.input:focus { outline: none; border-color: var(--brand-text); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-text) 18%, transparent); }
textarea.input { min-height: 180px; resize: vertical; line-height: 1.5; font-weight: var(--w-semi); }
select.input { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%230b0d0e' stroke-width='2.4' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 20px center; padding-right: 52px; }
.field.invalid .input, .field.invalid .choices { border-color: var(--danger); }
.err { color: var(--danger); font-weight: var(--w-bold); font-size: var(--t-small); display: none; }
.field.invalid .err { display: block; }
.hint { font-size: var(--t-small); color: var(--muted-light); }
.count { justify-self: end; font-size: .8rem; color: var(--muted-light); font-variant-numeric: tabular-nums; margin-top: -4px; }

/* Choice cards (radio) */
.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; border: 0; padding: 0; margin: 0; border-radius: var(--r-md); }
.choices.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) { .choices, .choices.three { grid-template-columns: 1fr; } }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice .card {
  display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; align-items: center;
  min-height: 72px; padding: 18px 20px; border-radius: var(--r-md);
  border: 2px solid var(--line-light); background: var(--white);
  transition: border-color .2s, box-shadow .2s, transform .2s var(--ease);
}
.choice:hover .card { border-color: #b9bdbb; transform: translateY(-2px); }
.choice input:focus-visible + .card { outline: 3px solid var(--brand-text); outline-offset: 3px; }
.choice input:checked + .card { border-color: var(--brand-text); box-shadow: inset 0 0 0 1px var(--brand-text); }
.choice .card .ic { grid-row: span 2; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--paper); color: var(--fg-light); transition: all .2s; }
.choice .card .ic svg { width: 22px; height: 22px; }
.choice input:checked + .card .ic { background: var(--brand); color: var(--brand-ink); }
.choice .card strong { font-size: 1.1rem; font-weight: var(--w-heavy); line-height: 1.2; }
.choice .card small { font-size: .9rem; color: var(--muted-light); line-height: 1.35; }
.choice.simple .card { grid-template-columns: 1fr; min-height: 60px; }
.choice.simple .card strong { font-size: 1.05rem; }
.choices.big .card { min-height: 104px; }

.field > label.check { font-size: 1rem; letter-spacing: 0; text-transform: none; color: var(--fg-light); font-weight: var(--w-semi); }
.check { display: grid; grid-template-columns: 28px 1fr; gap: 14px; align-items: start; cursor: pointer; font-weight: var(--w-semi); }
.check input { width: 28px; height: 28px; margin: 0; accent-color: var(--brand-text); }

.file-drop { display: grid; gap: 6px; justify-items: start; padding: 22px; border: 2px dashed var(--line-light); border-radius: var(--r-md); background: var(--white); cursor: pointer; transition: border-color .2s; }
.file-drop:hover, .file-drop.drag { border-color: var(--brand-text); }
.file-drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.file-drop strong { font-weight: var(--w-heavy); }
.file-drop span { font-size: var(--t-small); color: var(--muted-light); }

.callout { display: grid; gap: 16px; padding: clamp(22px, 3vw, 32px); border-radius: var(--r-lg); background: var(--night); color: var(--fg-dark); }
.callout h3 { font-size: clamp(1.5rem, 2.6vw, 2.2rem); }
.callout p { margin: 0; color: var(--muted-dark); }
.platforms { display: flex; flex-wrap: wrap; gap: 10px; }
.platforms a { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 18px; border-radius: var(--r-pill); background: var(--night-3); text-decoration: none; font-weight: var(--w-heavy); transition: background-color .2s, color .2s; }
.platforms a:hover { background: var(--brand); color: var(--brand-ink); }
.platforms svg { width: 20px; height: 20px; }

.summary { display: grid; gap: 0; border-radius: var(--r-md); background: var(--white); border: 2px solid var(--line-light); overflow: hidden; }
.summary div { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: 16px; padding: 14px 20px; border-top: 1px solid var(--paper-2); }
.summary div:first-child { border-top: 0; }
.summary dt { font-size: var(--t-label); font-weight: var(--w-heavy); letter-spacing: .1em; text-transform: uppercase; color: var(--muted-light); padding-top: 3px; }
.summary dd { margin: 0; font-weight: var(--w-bold); overflow-wrap: anywhere; white-space: pre-line; }
@media (max-width: 520px) { .summary div { grid-template-columns: 1fr; gap: 4px; } }

.form-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: auto; padding-top: 40px; }
.form-nav .btn { min-width: 140px; }
.form-nav .kbd { font-size: .8rem; color: var(--muted-light); font-weight: var(--w-semi); }
.form-nav .kbd kbd { font-family: inherit; font-weight: var(--w-heavy); padding: 2px 7px; border-radius: 6px; background: var(--white); border: 1px solid var(--line-light); }
@media (max-width: 640px) { .form-nav .kbd { display: none; } }

.form-alert { display: none; padding: 16px 20px; border-radius: var(--r-md); background: var(--danger-bg); color: #8f1f1f; font-weight: var(--w-bold); }
.form-alert.show { display: block; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.sent { justify-content: center; gap: 24px; align-items: flex-start; }
.sent .tick { width: 88px; height: 88px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; animation: pop .7s var(--ease) both; }
.sent .tick svg { width: 40px; height: 40px; }
.sent .tick path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .6s .35s var(--ease) forwards; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
.sent h2 { font-size: clamp(2.4rem, 5vw, 4.2rem); font-weight: var(--w-black); }
.sent .ref { font-family: ui-monospace, Menlo, monospace; font-size: 1.3rem; font-weight: var(--w-heavy); padding: 10px 16px; border-radius: var(--r-sm); background: var(--white); border: 2px solid var(--line-light); letter-spacing: .06em; }

@media (max-width: 960px) {
  .form-shell { grid-template-columns: 1fr; }
  .form-aside { position: relative; height: auto; padding-bottom: 32px; }
  .form-aside .aside-steps, .form-aside .aside-foot { display: none; }
  .form-main { padding-top: 40px; }
}
