/* /preview: free website preview round. Loaded after style.css and pages.css. */

.pg--preview { --field: #FBF9F5; }
.pg--preview main { overflow-x: clip; }
.pg--preview .pg-h2 { margin-bottom: clamp(24px, 4vw, 40px); }

/* ---------- Hero ---------- */
.pg--preview .pg-hero { position: relative; padding-bottom: 8px; }
.pv-mark { position: absolute; z-index: -1; right: var(--gutter); top: clamp(10px, 3vw, 40px); height: clamp(260px, 44vw, 520px); width: auto; color: var(--ink-text); opacity: 0.045; pointer-events: none; }
.pg--preview .pg-hero .pg-actions { margin-top: 32px; }
.pg--preview .pg-lede { max-width: 54ch; }

/* ---------- How it works ---------- */
.steps { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.steps li { display: grid; grid-template-columns: 72px minmax(0, 1fr); column-gap: 14px; border-top: 1px solid var(--ink-text); padding: 18px 0 22px; }
.steps__no { grid-row: 1 / span 2; font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: 58px; line-height: 0.95; color: var(--ember); }
.steps__title { font-family: var(--font-display); font-weight: 500; font-size: 26px; line-height: 1.12; margin-bottom: 6px; }
.steps__line { font-family: var(--font-ui); font-weight: 300; font-size: 16px; line-height: 1.6; color: var(--body-ivory); max-width: 40ch; }
@media (min-width: 640px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 36px; }
  .steps li { display: block; padding: 18px 0 0; }
  .steps__no { display: block; font-size: clamp(72px, 8vw, 96px); margin-bottom: 18px; }
}
@media (min-width: 1000px) { .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 36px; } }

/* ---------- Examples ---------- */
.eg li { display: grid; grid-template-columns: minmax(0, 1fr) 112px; gap: 16px; align-items: center; padding: 20px 0; border-top: 1px solid var(--hairline-ivory); }
.eg li:last-child { border-bottom: 1px solid var(--hairline-ivory); }
.eg .tool__tag { margin: 0 0 10px; }
.eg__line { font-family: var(--font-display); font-weight: 500; font-size: 21px; line-height: 1.18; max-width: 28ch; }
.eg__go { display: inline-flex; align-items: center; min-height: 44px; margin-top: 4px; font-family: var(--font-ui); font-weight: 500; font-size: 15px; text-decoration: underline; text-decoration-color: var(--ember); text-decoration-thickness: 1px; text-underline-offset: 6px; }
.eg__img { aspect-ratio: 4 / 3; overflow: hidden; border-radius: 2px; background: var(--paper); box-shadow: 0 0 0 1px rgba(26, 25, 23, 0.16); }
.eg__img img { width: 100%; height: 100%; object-fit: cover; }
/* Link to /try under the examples */
.eg__try { margin-top: 22px; font-family: var(--font-ui); font-weight: 300; font-size: 16px; line-height: 1.6; color: var(--body-ivory); }
.eg__try .eg__go { margin-top: 0; color: var(--ink-text); }
@media (min-width: 720px) {
  .eg li { grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; padding: 28px 0; }
  .eg__line { font-size: clamp(28px, 3vw, 34px); }
}

/* ---------- Application form ---------- */
.apply { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; scroll-margin-top: 16px; }
.apply__head .pg-h2 { margin-bottom: 14px; }
.apply__sub { font-family: var(--font-ui); font-weight: 300; font-size: 16px; line-height: 1.6; color: var(--body-ivory); margin-bottom: 28px; }
.apply__sub:has(+ .apply__lang) { margin-bottom: 6px; }
.apply__lang { font-family: var(--font-ui); font-weight: 300; font-size: 15px; line-height: 1.55; color: var(--secondary-ivory); margin-bottom: 28px; }
@media (min-width: 960px) {
  .apply { grid-template-columns: minmax(0, 300px) minmax(0, 640px); column-gap: 96px; }
  .apply__head { position: sticky; top: 28px; align-self: start; }
}

.f { margin: 0 0 30px; min-width: 0; }
.f__label { display: block; width: 100%; padding: 0; margin-bottom: 10px; font-family: var(--font-ui); font-weight: 500; font-size: 16px; line-height: 1.4; color: var(--ink-text); }
.f__label--sub { font-weight: 400; margin: 14px 0 8px; }
.f__tag { margin-left: 6px; font-weight: 300; font-size: 14px; color: var(--grey-on-light); white-space: nowrap; }
.f__input { display: block; width: 100%; min-height: 48px; padding: 12px 14px; font-family: var(--font-ui); font-weight: 400; font-size: 16px; line-height: 1.4; color: var(--ink-text); background: var(--field); border: 1px solid var(--grey-on-light); border-radius: 2px; appearance: none; -webkit-appearance: none; }
.f__input:focus { border-color: var(--ink-text); box-shadow: 0 0 0 1px var(--ink-text); }
.f__input:focus-visible { outline-offset: 3px; }
.f__input::placeholder { color: var(--grey-on-light); opacity: 1; transition: opacity 150ms ease; }
.f__input.ph-out::placeholder { opacity: 0; }
.f__area { resize: vertical; min-height: 112px; }
.f__count { margin-top: 6px; text-align: right; font-family: var(--font-ui); font-weight: 300; font-size: 14px; color: var(--grey-on-light); }
.f__note { margin: 14px 0 6px; font-family: var(--font-ui); font-weight: 300; font-size: 15px; line-height: 1.55; color: var(--body-ivory); }

.choices { display: flex; flex-direction: column; }
.choices--row { flex-direction: row; flex-wrap: wrap; gap: 0 32px; }
.choice { display: flex; align-items: flex-start; gap: 14px; min-height: 44px; padding: 10px 0; cursor: pointer; font-family: var(--font-ui); font-weight: 300; font-size: 16px; line-height: 1.45; color: var(--body-ivory); }
.choice input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--ink-text); }
.choices:not(.choices--row) .choice + .choice { border-top: 1px solid var(--hairline-ivory); }

/* Reveal: Other, 3D house. Same entry as .reveal-field on /costs (fade + 8px drop, GPU only);
   closing snaps. Closed content is display:none, so it is out of sight, tab order and readers. */
.reveal { display: none; }
.reveal.is-open { display: block; opacity: 1; transform: none; transition: opacity 240ms var(--ease-ui), transform 240ms var(--ease-ui); }
@starting-style { .reveal.is-open { opacity: 0; transform: translateY(-8px); } }
.reveal__in { padding: 0 5px; margin: 0 -5px; }
.reveal__in > :last-child { margin-bottom: 8px; }

.f__err { margin-top: 10px; padding-left: 12px; border-left: 2px solid var(--ember); font-family: var(--font-ui); font-weight: 500; font-size: 15px; line-height: 1.4; color: var(--ink-text); }
.f.has-error .f__input { border-color: var(--ember); box-shadow: 0 0 0 1px var(--ember); }

.cta--send { width: 100%; margin-top: 6px; padding: 14px 20px; border: 0; white-space: normal; text-align: center; letter-spacing: 0.2em; line-height: 1.4; cursor: pointer; }
@media (min-width: 720px) { .cta--send { width: auto; padding: 14px 40px; letter-spacing: 0.26em; } }
.apply__fine { margin-top: 14px; font-family: var(--font-ui); font-weight: 300; font-size: 14px; line-height: 1.55; color: var(--grey-on-light); }
.apply__fine a, .apply__ns a { text-underline-offset: 3px; }
.apply__sent { color: var(--body-ivory); }
.apply__ns { margin-bottom: 24px; font-family: var(--font-ui); font-weight: 300; font-size: 16px; color: var(--body-ivory); }

.closed__h { font-family: var(--font-display); font-weight: 500; font-size: clamp(30px, 4.4vw, 44px); line-height: 1.1; }
.closed__line { margin-top: 10px; font-family: var(--font-ui); font-weight: 300; font-size: 17px; line-height: 1.55; color: var(--body-ivory); }

/* ---------- Questions ---------- */
.faqwrap { margin-bottom: clamp(64px, 9vw, 120px); }
.faq { max-width: 760px; }
.faq > div { padding: 22px 0; border-top: 1px solid var(--hairline-ivory); }
.faq > div:last-child { border-bottom: 1px solid var(--hairline-ivory); }
.faq dt { font-family: var(--font-display); font-weight: 500; font-size: 24px; line-height: 1.15; margin-bottom: 6px; }
.faq dd { margin: 0; max-width: 60ch; font-family: var(--font-ui); font-weight: 300; font-size: 16px; line-height: 1.6; color: var(--body-ivory); }
.faq a { text-underline-offset: 3px; }

/* Reduced motion: style.css turns every transition off site-wide (same as .reveal-field on /costs),
   and preview.js does not rotate the placeholder. */
