/* Application page (BDOG-375). Mobile first; tokens come from /assets/site.css. */
.apply-page main { min-height: 60vh; }
.wrap.narrow { max-width: 44rem; }
.apply-page section { padding-block: 0; }
.apply-page section.step { padding: 1.3rem 1rem 1.4rem; }
.form-hero { padding-block: clamp(1.6rem, 5vw, 3.2rem) 1.2rem !important; }
.form-hero h1 { font-size: clamp(2rem, 8vw, 3.4rem); margin: .5rem 0 .9rem; }
.form-hero h1 em { font-style: italic; color: var(--accent); }
.form-hero .lead { font-size: 1.1rem; color: var(--muted); line-height: 1.5; }
.top .back { text-decoration: none; color: var(--muted); font-weight: 600; font-size: var(--step--1); padding: .7rem 0; }
.top .back:hover { color: var(--fg); }

.apply { display: grid; gap: 1.1rem; padding-bottom: calc(3rem + env(safe-area-inset-bottom, 0px)); }

/* track switch: two large segments; works without JS (radios) */
.track-switch { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; border: 0; margin: 0; padding: 0; }
.seg { position: relative; display: block; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.seg-text { display: grid; gap: .1rem; align-content: center; height: 100%; min-height: 4.2rem; padding: .7rem .9rem; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--bg); text-align: left; transition: border-color .2s, background-color .2s; }
.seg-text b { font-size: 1rem; line-height: 1.25; }
.seg-text small { color: var(--muted); font-size: .85rem; line-height: 1.3; }
.seg input:checked + .seg-text { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.seg input:checked + .seg-text small { color: color-mix(in srgb, var(--on-accent) 82%, transparent); }
.seg input:focus-visible + .seg-text { outline: 3px solid var(--accent); outline-offset: 3px; }

/* track sections, switched in CSS so a no-JS visitor sees the right questions */
.apply:has(#track-pro:checked) [data-track="new"],
.apply:has(#track-new:checked) [data-track="pro"] { display: none; }

.step { background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--radius) * 1.3); display: grid; gap: 1rem; counter-increment: step; }
.apply { counter-reset: step; }
.step > h2 { font-family: var(--display); font-weight: 500; font-size: 1.45rem; line-height: 1.15; display: flex; align-items: center; gap: .65rem; }
.step > h2::before { content: counter(step); flex: none; display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--accent-soft); color: var(--fg); font: 700 .9rem var(--body); }
.fields { display: grid; gap: 1.15rem; }

.field { display: grid; gap: .4rem; min-width: 0; }
.field > label, .field .label, .choices legend { font-size: .95rem; font-weight: 700; line-height: 1.35; }
.opt { font-weight: 500; color: var(--muted); font-size: .85rem; }
.hint { font-size: .88rem; color: var(--muted); line-height: 1.4; }
.err { color: #b3261e; font-size: .9rem; font-weight: 600; line-height: 1.35; }
.err:empty { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .err { color: #ff9a92; } }

/* 16px minimum keeps iOS Safari from zooming on focus */
.field input[type="text"], .field input[type="tel"], .field input[type="email"], .field input[type="date"],
.field select, .field textarea {
  font: inherit; font-size: max(16px, 1rem); color: var(--fg); background: var(--bg);
  border: 1.5px solid var(--line); border-radius: 12px; padding: .8rem .9rem; width: 100%; min-height: 3.2rem;
  -webkit-appearance: none; appearance: none; line-height: 1.3;
}
.field input[type="date"] { min-width: 0; }
.field textarea { min-height: 7.5rem; resize: vertical; line-height: 1.5; }
.field input::placeholder, .field textarea::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 0; border-color: var(--accent); }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: #b3261e; }
.field.invalid .choice > span, .consent.invalid .check { border-color: #b3261e; }
.select { position: relative; }
.select::after { content: ""; position: absolute; right: 1.1rem; top: 50%; width: .55rem; height: .55rem; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.select select { padding-right: 2.6rem; }

/* choice cards (radio and checkbox): the whole card is the tap target */
.choices { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: .5rem; }
.choices legend { padding: 0; margin-bottom: .5rem; }
.choice-list { display: grid; gap: .5rem; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice > span { display: flex; align-items: center; gap: .75rem; min-height: 3.2rem; padding: .6rem .9rem; border: 1.5px solid var(--line); border-radius: 12px; background: var(--bg); font-size: 1rem; line-height: 1.3; transition: border-color .2s, background-color .2s; }
.choice > span::before { content: ""; flex: none; width: 1.35rem; height: 1.35rem; border: 2px solid var(--line); border-radius: 50%; background: var(--bg); transition: border-color .2s, background .2s, box-shadow .2s; }
.choice input[type="checkbox"] + span::before { border-radius: 6px; }
.choice input:checked + span { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, var(--bg)); }
.choice input[type="radio"]:checked + span::before { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 3.5px var(--bg); }
.choice input[type="checkbox"]:checked + span::before { border-color: var(--accent); background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat; }
.choice input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
/* short option sets sit side by side where there is room */
@media (min-width: 520px) { .choice-list { grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); } }

/* photos */
.photo-box { display: grid; gap: .7rem; }
.photo-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); }
.photo-add { justify-self: stretch; min-height: 3.4rem; border-style: dashed; cursor: pointer; font-size: 1rem; }
.photo-add span { font-size: 1.4rem; line-height: 1; }
.photo-input:focus-visible + .photo-list, .photo-add:focus-within { outline: none; }
.photo-box:has(.photo-input:focus-visible) .photo-add { outline: 3px solid var(--accent); outline-offset: 3px; }
.photo-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(6.2rem, 1fr)); gap: .6rem; }
.photo-list:empty { display: none; }
.photo-list li { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--bg); border: 1px solid var(--line); }
.photo-list img { width: 100%; height: 100%; object-fit: cover; }
.photo-list .busy { position: absolute; inset: 0; display: grid; place-items: center; font-size: .8rem; color: var(--muted); }
.photo-list button { position: absolute; top: 0; right: 0; width: 2.75rem; height: 2.75rem; border: 0; background: none; padding: 0; cursor: pointer; display: grid; place-items: center; }
.photo-list button::before { content: "\00d7"; width: 1.7rem; height: 1.7rem; border-radius: 50%; display: grid; place-items: center; background: rgba(23, 19, 27, .72); color: #fff; font: 400 1.3rem/1 var(--body); }
.photo-count { font-size: .88rem; color: var(--muted); }

/* consents */
.consents { gap: .9rem; }
.consent { gap: .3rem; }
.check { display: grid; grid-template-columns: 1.6rem 1fr; gap: .8rem; align-items: start; padding: .85rem .9rem; border: 1.5px solid var(--line); border-radius: 12px; background: var(--bg); cursor: pointer; font-size: .95rem; line-height: 1.45; }
.check input { width: 1.6rem; height: 1.6rem; margin: 0; accent-color: var(--accent); }
.check a { color: var(--accent); font-weight: 600; }
.rodo { border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.rodo summary { cursor: pointer; font-weight: 700; padding: .9rem 1rem; min-height: 3rem; font-size: .95rem; }
.rodo-body { padding: 0 1rem 1rem; display: grid; gap: .7rem; font-size: .9rem; line-height: 1.5; color: var(--muted); }
.rodo-body b { color: var(--fg); }
.notice { font-size: .88rem; color: var(--muted); line-height: 1.5; padding-left: .9rem; border-left: 3px solid var(--pink); }

/* honeypot: off-screen, not display:none (some bots skip those) */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.submit-row { display: grid; gap: .7rem; justify-items: stretch; }
.btn.submit { min-height: 3.6rem; font-size: 1.1rem; width: 100%; }
.btn.submit[disabled] { opacity: .7; cursor: progress; }
.call-alt { text-align: center; color: var(--muted); font-size: .95rem; max-width: none; }
.status { min-height: 1.4em; font-weight: 600; text-align: center; max-width: none; }
.status.error { color: #b3261e; }
.pow { font-size: .82rem; color: var(--muted); text-align: center; max-width: none; }
.noscript { padding: .9rem 1rem; border-radius: 12px; border: 1.5px dashed var(--pink); font-size: .95rem; max-width: none; }

.done { background: var(--surface); border: 1px solid var(--accent-soft); border-radius: calc(var(--radius) * 1.3); padding: 1.6rem 1.2rem; display: grid; gap: .9rem; margin-bottom: 3rem; }
.done h2 { font-family: var(--display); font-size: 2rem; }
.done .btn { justify-self: start; }

@media (min-width: 640px) {
  .apply-page section.step { padding: 1.6rem 1.6rem 1.8rem; }
  .fields { grid-template-columns: 1fr 1fr; gap: 1.2rem 1rem; }
  .field[data-type="textarea"], .field[data-type="radio"], .field[data-type="multi"], .field[data-type="photos"], .field[data-field="name"], .field[data-field="portfolio_url"] { grid-column: 1 / -1; }
  .submit-row { grid-template-columns: auto 1fr; align-items: center; gap: 1.2rem; }
  .btn.submit { width: auto; padding-inline: 2.4rem; }
  .call-alt { text-align: left; }
}
@media (max-width: 380px) { .track-switch { grid-template-columns: 1fr; } }
.field > label.check { font-weight: 500; font-size: .95rem; }

.terms-list { list-style: none; margin: 1.1rem 0 0; padding: 0; display: grid; gap: .35rem; font-size: 1rem; }
.terms-list li { padding-left: 1.2rem; position: relative; }
.terms-list li::before { content: ""; position: absolute; left: 0; top: .6em; width: .55rem; height: .55rem; border-radius: 50%; background: var(--pink); }
