/* Planner application funnel (/apply). Same visual language as /planning and /quiz. */

* { box-sizing: border-box; min-width: 0; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--uwp-beige); color: var(--fg); font-family: var(--font-body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
button, input, textarea { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; padding: 0; }
a { color: inherit; }
img { display: block; max-width: 100%; }

.ap-app { --gutter: 16px; --olive: var(--uwp-dark-olive); --cream: var(--uwp-beige); --ink-2: rgba(42,44,32,0.72); --ink-3: rgba(42,44,32,0.5); --ease: cubic-bezier(.22,.8,.26,1);
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.ap-icon { flex-shrink: 0; display: block; }
.ap-kicker { display: block; font-size: 10px; letter-spacing: 2.2px; text-transform: uppercase; color: rgba(227,218,204,0.75); }

.ap-header { position: sticky; top: 0; z-index: 20; min-height: 62px; padding: max(10px, env(safe-area-inset-top)) var(--gutter) 10px; display: flex; align-items: center; justify-content: center; background: #2A2F29; border-radius: 0 0 24px 24px; }
.ap-header img { width: 160px; height: auto; }

/* ---------- intro ---------- */
.ap-intro { flex: 1; position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: flex-start; color: var(--uwp-off-white);
  /* Slide the photo up under the header's rounded bottom corners so no cream shows there. */
  margin-top: -24px; padding-top: 24px; }
.ap-intro::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(42,47,41,0.82) 0%, rgba(42,47,41,0.38) 42%, rgba(42,47,41,0.92) 100%), var(--ap-img) center 58%/cover; }
.ap-intro__inner { width: 100%; max-width: 620px; margin: 0 auto; padding: 18px var(--gutter) 20px; display: grid; gap: 14px; justify-items: center; text-align: center; }
.ap-eyebrow { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--cream); background: rgba(42,44,32,0.42); border: 1px solid rgba(227,218,204,0.28); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.ap-intro__title { margin: 0; font-family: var(--font-display); font-style: italic; font-weight: 300; font-size: clamp(40px, 11vw, 64px); line-height: 1.08; letter-spacing: -0.8px; color: var(--cream); text-wrap: balance; }
.ap-intro__title em { font-weight: 900; }
.ap-intro__sub { margin: 0; font-size: 16px; font-weight: 300; line-height: 1.5; color: rgba(242,241,241,0.86); max-width: 40ch; }
.ap-perks { list-style: none; width: 100%; max-width: 420px; margin: 0 0 6px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; font-size: 13px; }
.ap-perks li { display: flex; align-items: center; gap: 8px; padding: 4px 2px; text-align: left; text-shadow: 0 1px 8px rgba(0,0,0,0.35); }
/* Full-width call to action pinned to the bottom of the screen. */
.ap-intro__cta { margin-top: auto; position: sticky; bottom: 0; width: 100%; max-width: 620px; margin-left: auto; margin-right: auto; padding: 12px var(--gutter) max(16px, env(safe-area-inset-bottom)); display: grid; gap: 8px; justify-items: center; }
.ap-button--cta { width: 100%; min-height: 56px; position: relative; justify-content: center; font-size: 17px; font-weight: 600; padding: 0 48px; }
.ap-button--cta .ap-icon { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); }
.ap-hint { margin: 0; display: inline-flex; align-items: center; gap: 5px; font-size: 11px; letter-spacing: 0.2px; color: rgba(242,241,241,0.78); }

/* ---------- buttons ---------- */
.ap-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 22px; border-radius: 999px; background: var(--olive); color: var(--cream); font-size: 15px; text-decoration: none; transition: transform .15s var(--ease), opacity .2s; }
.ap-button:focus-visible { outline: 2px solid var(--olive); outline-offset: 3px; }
.ap-button--light:focus-visible { outline-color: var(--cream); }
.ap-button:active { transform: scale(0.98); }
.ap-button:disabled { opacity: 0.45; cursor: default; }
.ap-button--light { background: var(--cream); color: var(--olive); }
.ap-button--ghost { background: transparent; color: var(--olive); border: 1px solid rgba(42,44,32,0.18); }
.ap-link { margin-top: 12px; font-size: 13px; color: var(--olive); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- steps ---------- */
.ap-layout { flex: 1; width: 100%; }
.ap-aside { display: none; }
.ap-main { width: 100%; max-width: 580px; margin: 0 auto; padding: 18px var(--gutter) 24px; display: flex; flex-direction: column; min-height: calc(100dvh - 74px); }
@media (min-width: 1000px) {
  .ap-layout { display: grid; grid-template-columns: minmax(380px, 42%) 1fr; }
  .ap-aside { display: flex; position: sticky; top: 74px; height: calc(100vh - 96px); margin: 12px 0 12px 18px; border-radius: 28px; overflow: hidden; align-items: flex-end; isolation: isolate; color: var(--uwp-off-white); }
  .ap-aside::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(42,44,32,0.05) 30%, rgba(42,44,32,0.86)), var(--ap-img) center/cover; transition: background-image .5s var(--ease); }
  .ap-aside > div { padding: 34px; display: grid; gap: 8px; }
  .ap-aside strong { font-family: var(--font-display); font-style: italic; font-weight: 900; font-size: 44px; line-height: 1; color: var(--cream); }
  .ap-main { padding-top: 32px; min-height: calc(100dvh - 96px); }
}
.ap-progress__top { margin-bottom: 8px; display: flex; justify-content: space-between; gap: 12px; font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--ink-2); }
.ap-progress__track { height: 4px; border-radius: 999px; background: rgba(42,44,32,0.12); overflow: hidden; }
.ap-progress__track i { display: block; height: 100%; border-radius: inherit; background: var(--olive); transition: width .4s var(--ease); }
.ap-step { margin-top: 16px; padding: 8px 0 0; background: transparent; border: 0; animation: ap-in .4s var(--ease) both; display: flex; flex-direction: column; flex: 1; }
@keyframes ap-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ap-step { animation: none; } }
.ap-title { margin: 0 0 8px; font-family: var(--font-display); font-style: italic; font-weight: 300; font-size: clamp(28px, 8vw, 36px); line-height: 1.08; letter-spacing: -0.6px; color: var(--olive); text-wrap: balance; }
.ap-title em { font-weight: 900; }
.ap-sub { margin: 0 0 18px; font-size: 14px; line-height: 1.45; color: var(--ink-2); font-weight: 300; font-style: italic; }
.ap-fields { display: grid; gap: 12px; margin-top: 14px; }
.ap-field { display: grid; gap: 6px; font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--ink-2); }
.ap-field input, .ap-input, .ap-textarea { width: 100%; padding: 14px 16px; border-radius: 14px; border: 1px solid rgba(42,44,32,0.14); background: #fff; font-size: 16px; letter-spacing: 0; text-transform: none; color: var(--fg); outline: none; }
.ap-field input:focus, .ap-input:focus, .ap-textarea:focus { border-color: rgba(42,44,32,0.4); box-shadow: 0 0 0 3px rgba(42,44,32,0.06); }
.ap-textarea { resize: vertical; min-height: 140px; line-height: 1.5; }
.ap-choices { display: grid; gap: 10px; }
.ap-choice { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; background: rgba(255,255,255,0.7); border: 1px solid rgba(42,44,32,0.1); text-align: left; transition: border-color .2s, background .2s; }
.ap-choice.is-selected { background: var(--olive); color: var(--cream); border-color: var(--olive); }
.ap-choice__icon { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: rgba(42,44,32,0.06); }
.ap-choice.is-selected .ap-choice__icon { background: rgba(227,218,204,0.16); }
.ap-choice__label { flex: 1; font-size: 15px; }
.ap-months { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ap-month { min-height: 48px; border-radius: 14px; background: rgba(255,255,255,0.7); border: 1px solid rgba(42,44,32,0.1); font-size: 14px; }
.ap-month.is-selected { background: var(--olive); color: var(--cream); border-color: var(--olive); }
.ap-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: auto; position: sticky; bottom: 0; padding: 14px 0 max(16px, env(safe-area-inset-bottom)); background: linear-gradient(180deg, rgba(227,218,204,0), var(--uwp-beige) 28%); }
.ap-error { margin: 14px 0 0; color: #9a4a3a; font-size: 13px; }
.ap-hp { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; }

/* ---------- done ---------- */
.ap-done { margin: 48px auto 0; max-width: 440px; text-align: center; display: grid; gap: 8px; justify-items: center; }
.ap-done__icon { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--olive); color: var(--cream); margin-bottom: 8px; }
@media (max-width: 999px) {
  .ap-progress__top { text-align: left; }
  .ap-title, .ap-sub { text-align: center; }
  .ap-link { display: block; margin-left: auto; margin-right: auto; }
}

/* Photographer credit, kept small at the bottom of every screen */
.ap-credit { margin: 6px 0 0; text-align: center; font-size: 11px; letter-spacing: 0.2px; color: var(--ink-3); }
.ap-credit a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.ap-intro .ap-credit { color: rgba(242,241,241,0.62); margin-top: 2px; }
.ap-main .ap-credit { margin-top: auto; padding-top: 18px; }

/* Intro: the photo runs edge to edge, top to bottom, behind a see-through header. */
.ap-app--intro .ap-header { position: absolute; left: 0; right: 0; top: 0; background: transparent; border-radius: 0; }
.ap-app--intro .ap-intro { margin-top: 0; padding-top: calc(62px + env(safe-area-inset-top)); min-height: 100vh; min-height: 100dvh; }
.ap-app--intro .ap-intro::before { background: linear-gradient(180deg, rgba(42,47,41,0.86) 0%, rgba(42,47,41,0.42) 38%, rgba(42,47,41,0.92) 100%), var(--ap-img) center 58%/cover; }
/* Perks: two columns sized to their text and centered as a group, so the space
   left of the first icon matches the space right of the second column. */
.ap-perks { width: auto; max-width: 100%; grid-template-columns: repeat(2, max-content); justify-content: center; column-gap: 28px; }
/* iPhone Safari paints the page under its bottom toolbar: keep the photo pinned
   to the full (large) viewport and make the page itself dark behind it, so no
   cream band shows below the intro. */
html:has(.ap-app--intro), body:has(.ap-app--intro) { background: #2A2F29; }
.ap-app--intro .ap-intro::before { position: fixed; top: 0; left: 0; right: 0; bottom: auto; height: 100vh; height: 100lvh; }
