/* =========================================================
   Jordan Varley · page layout
   Built on the Homburg Signature brand kit (brand/tokens.css,
   brand/components.css). Every colour, radius and space here
   is a brand token. Change the look in brand/tokens.css.
   ========================================================= */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: var(--space-4); }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, figure, blockquote, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
h1, h2, h3, .display-l, .display-m { text-wrap: balance; }
p { text-wrap: pretty; }

.muted { color: var(--ink-muted); }
.eyebrow--copper { color: var(--copper); }
/* Section numbers count themselves, so hidden sections leave no gap */
main { counter-reset: section; }
.eyebrow .num { color: var(--ink-muted); margin-right: var(--space-3); font-variant-numeric: tabular-nums; }
.eyebrow .num::before { counter-increment: section; content: counter(section, decimal-leading-zero); }
.band-sunk { background: var(--surface-sunk); }
.section-head { display: grid; gap: var(--space-2); margin-bottom: var(--space-6); max-width: 760px; }

.skip-link {
  position: absolute; left: var(--space-3); top: var(--space-3); z-index: 100;
  padding: var(--space-2) var(--space-3); background: var(--ink); color: var(--surface);
  font-weight: 600; text-decoration: none; transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* ---------- Header ---------- */
.site-header { position: relative; z-index: 30; background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-5);
  padding-top: max(var(--space-3), env(safe-area-inset-top));
  padding-bottom: var(--space-3);
}
.sig-lockup picture { display: block; }
.sig-lockup__logo { width: 136px; }
.sig-lockup__name { font-size: 20px; }
.site-nav { display: none; gap: var(--space-5); margin-left: auto; }
.site-nav a {
  font-size: 14px; line-height: 20px; font-weight: 500; text-decoration: none;
  padding: var(--space-2) 0; border-bottom: 1px solid transparent;
}
.site-nav a:hover, .site-nav a[aria-current="true"] { border-bottom-color: var(--ink); }

/* ---------- Buttons for the Ironbark panel ---------- */
.btn--reverse { background: var(--on-ironbark); color: var(--ironbark); border-color: var(--on-ironbark); }
.btn--reverse:hover { background: var(--surface-raised); border-color: var(--surface-raised); }
.hero :focus-visible { outline-color: var(--on-ironbark); }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: 1fr; background: var(--ironbark); }
.hero__media { overflow: hidden; background: var(--surface-sunk); }
.hero__media img {
  width: 100%; aspect-ratio: 5 / 4; object-fit: cover; object-position: 50% 22%;
  animation: settle 1.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.hero__panel {
  color: var(--on-ironbark);
  padding: var(--space-5) var(--space-4) var(--space-6);
  display: flex; flex-direction: column; justify-content: flex-end; gap: var(--space-3);
}
.hero__panel .eyebrow { color: var(--on-ironbark); }
.hero__title {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(48px, 4.8vw, 88px); line-height: 0.95; letter-spacing: -0.015em;
}
.hero__title em { display: block; }
.hero__rule { background: var(--on-ironbark); margin: var(--space-2) 0; }
.hero__lede { max-width: 30ch; }

/* One-field starter */
.starter { margin-top: var(--space-4); display: grid; gap: var(--space-2); max-width: 520px; }
.starter__label { font-size: 11px; line-height: 14px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 600; }
.starter__row { display: grid; gap: var(--space-2); }
.starter input {
  width: 100%; min-height: 52px; padding: 14px var(--space-3);
  background: var(--surface-raised); color: var(--ink);
  border: 1px solid var(--on-ironbark); border-radius: var(--radius-1);
  font-family: var(--font-text); font-size: 16px; line-height: 22px;
}
.starter input::placeholder { color: var(--ink-muted); }
.starter .sig-btn { min-height: 52px; }
.starter__note { font-size: 13px; line-height: 18px; }
.starter__note a { text-underline-offset: 3px; white-space: nowrap; }

/* Rating and sales under the address box */
.hero__trust {
  margin-top: var(--space-2); padding-top: var(--space-3); max-width: 520px;
  border-top: 1px solid var(--line-strong); display: grid; gap: var(--space-1);
}
.hero__trust .fact span { white-space: nowrap; }

/* Load-in sequence for the hero text */
.hero__in { animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.hero__panel > :nth-child(1) { animation-delay: 0.10s; }
.hero__panel > :nth-child(2) { animation-delay: 0.18s; }
.hero__panel > :nth-child(3) { animation-delay: 0.30s; }
.hero__panel > :nth-child(4) { animation-delay: 0.38s; }
.hero__panel > :nth-child(5) { animation-delay: 0.48s; }
.hero__panel > :nth-child(6) { animation-delay: 0.58s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes settle { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }

/* ---------- Fact strip ---------- */
.proof { border-bottom: 1px solid var(--line); }
.proof__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.proof__list li {
  display: flex; flex-direction: column; gap: var(--space-1);
  padding: var(--space-4) var(--space-3) var(--space-4) 0;
}
.proof__list li:nth-child(even) { padding-left: var(--space-3); border-left: 1px solid var(--line); }
.proof__list li:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
.proof__v { font-family: var(--font-display); font-size: 26px; line-height: 1.1; font-variant-numeric: lining-nums; }
.proof__k { font-size: 11px; line-height: 14px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 600; color: var(--ink-muted); }

/* ---------- 01 About (split layout) ---------- */
.split { display: grid; gap: var(--space-5); }
.split__head { display: grid; gap: var(--space-2); align-content: start; }
.prose { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-4); }
.prose .sig-rule { margin: 0; }
.prose p { max-width: 60ch; }
.signoff { display: flex; flex-direction: column; gap: var(--space-1); padding-top: var(--space-2); }

/* ---------- 02 Results ---------- */
.results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.result {
  display: flex; flex-direction: column; gap: var(--space-1);
  padding: var(--space-4) var(--space-3) var(--space-4) 0;
  border-bottom: 1px solid var(--line);
}
.result:nth-child(even) { padding-left: var(--space-3); border-left: 1px solid var(--line); }
.result__value {
  font-family: var(--font-display); font-size: clamp(30px, 4vw, 56px); line-height: 1;
  font-variant-numeric: lining-nums tabular-nums; margin-bottom: var(--space-2);
}
.result__key { font-size: 11px; line-height: 14px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 600; }
.result__meta { font-size: 13px; line-height: 18px; color: var(--ink-muted); }

.sold__title {
  margin-top: var(--space-6); font-size: 11px; line-height: 14px; letter-spacing: 0.16em;
  text-transform: uppercase; font-weight: 600;
}
.sold { margin-top: var(--space-3); border-top: 1px solid var(--line); }
.sold__row {
  display: grid; grid-template-columns: 116px minmax(0, 1fr); column-gap: var(--space-3); row-gap: var(--space-1);
  align-items: baseline; padding: var(--space-3) 0; border-bottom: 1px solid var(--line);
}
.sold__price {
  grid-row: span 2; font-family: var(--font-display); font-size: 26px; line-height: 1.1;
  font-variant-numeric: lining-nums tabular-nums;
}
.sold__address { font-size: 16px; line-height: 22px; }
.sold__meta { font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.sold__note { margin-top: var(--space-3); max-width: 70ch; }

/* ---------- 03 Reviews ---------- */
.feature-quote { display: grid; gap: var(--space-4); padding-top: var(--space-5); border-top: 1px solid var(--line); }
.feature-quote__text {
  font-family: var(--font-display); font-style: italic; font-weight: 400;
  font-size: clamp(34px, 4.6vw, 64px); line-height: 1.05; letter-spacing: -0.01em;
  max-width: 20ch; text-indent: -0.4em; /* hang the opening quote mark */
  text-wrap: balance;
}
.quotes { display: grid; margin-top: var(--space-6); border-top: 1px solid var(--line); }
.quote { display: grid; gap: var(--space-3); align-content: start; padding: var(--space-5) 0; border-bottom: 1px solid var(--line); }
.quote__text { font-family: var(--font-display); font-style: italic; font-size: 28px; line-height: 1.2; text-indent: -0.4em; }
.quote__by { font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.quote__by strong { color: var(--ink); font-weight: 600; }
.quote__more summary {
  display: inline-block; cursor: pointer; list-style: none;
  font-size: 13px; line-height: 18px; font-weight: 600; letter-spacing: 0.04em;
  color: var(--ink-muted); border-bottom: 1px solid var(--line-strong);
}
.quote__more summary::-webkit-details-marker { display: none; }
.quote__more summary:hover { color: var(--ink); border-bottom-color: var(--ink); }
.quote__more summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.quote__more p { margin-top: var(--space-3); color: var(--ink-muted); max-width: 65ch; }
.quotes__source { margin-top: var(--space-4); }

/* ---------- 04 Process ---------- */
.steps { display: grid; border-top: 1px solid var(--line); }
.step { padding: var(--space-4) 0 var(--space-5); border-bottom: 1px solid var(--line); }
.step__num { display: block; margin-bottom: var(--space-3); font-family: var(--font-display); font-style: italic; font-size: 28px; line-height: 1; color: var(--ink-muted); }
.step h3 { margin-bottom: var(--space-2); }
.step p { max-width: 34ch; }

/* ---------- 05 Appraisal ---------- */
.appraisal { display: grid; gap: var(--space-5); }
.appraisal__intro { display: flex; flex-direction: column; gap: var(--space-2); }
.appraisal__intro .sig-rule { margin: var(--space-2) 0; }
.appraisal__intro p { max-width: 40ch; }
.direct { display: grid; gap: var(--space-3); margin-top: var(--space-4); padding-top: var(--space-4); border-top: 1px solid var(--line); }
.direct dt { font-size: 11px; line-height: 14px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 600; color: var(--ink-muted); }
.direct dd { font-size: 16px; line-height: 26px; }
.direct a { color: var(--copper); text-underline-offset: 3px; }

.form { background: var(--surface-raised); padding: var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-0); }
.form__head { display: grid; gap: var(--space-3); margin-bottom: var(--space-5); }
.form__stepline { font-size: 12px; line-height: 16px; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 600; color: var(--ink-muted); }
.form__progress { height: 2px; background: var(--line); }
.form__bar { display: block; height: 100%; width: 33.333%; background: var(--ink); transition: width 0.5s cubic-bezier(0.2, 0.7, 0.2, 1); }

.step-panel { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: var(--space-4); }
.step-panel:not([hidden]) { animation: rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.step-panel__title { padding: 0; margin-bottom: var(--space-4); }
.step-panel__title:focus { outline: none; }

.field { display: flex; flex-direction: column; gap: var(--space-2); }
.field__label { font-size: 11px; line-height: 14px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 600; color: var(--ink-muted); padding: 0; }
.field input, .field textarea {
  width: 100%; min-height: 52px; padding: 14px var(--space-3);
  background: var(--surface-raised); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: var(--radius-1);
  font-family: var(--font-text); font-size: 16px; line-height: 22px; /* 16px stops iPhone zooming in */
  -webkit-appearance: none; appearance: none;
  transition: border-color 0.2s ease;
}
.field textarea { resize: vertical; min-height: 104px; }
.field input:hover, .field textarea:hover { border-color: var(--ink-muted); }
.field input:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-color: var(--ink); }

.choice { border: 0; margin: 0; padding: 0; min-width: 0; }
.choice legend { margin-bottom: var(--space-2); }
.choice__options { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.choice__options label { position: relative; cursor: pointer; }
.choice__options input { position: absolute; opacity: 0; pointer-events: none; }
.choice__options span {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 var(--space-4);
  border: 1px solid var(--line-strong); border-radius: var(--radius-1);
  background: var(--surface-raised); color: var(--ink);
  font-size: 15px; line-height: 20px; font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.choice__options label:hover span { border-color: var(--ink); }
.choice__options input:checked + span { background: var(--ink); color: var(--surface-raised); border-color: var(--ink); }
.choice__options input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }

/* No error colour exists in the kit; copper is the nearest token */
.field__error { display: none; font-size: 13px; line-height: 18px; font-weight: 500; color: var(--copper); margin-top: var(--space-1); }
.is-invalid .field__error { display: block; }
.is-invalid input:not([type="radio"]) { border-color: var(--copper); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form__nav { display: flex; gap: var(--space-2); margin-top: var(--space-5); }
.form__nav [data-next], .form__nav [data-submit] { flex: 1; }
.form__nav [data-back] { padding-left: var(--space-4); padding-right: var(--space-4); }
.form__fine { margin-top: var(--space-3); }
.form__error { margin-top: var(--space-3); color: var(--copper); }

.form__success { display: flex; flex-direction: column; gap: var(--space-2); animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.form__success:focus { outline: none; }
.form__success .sig-rule { margin: var(--space-2) 0; }
.next { display: grid; margin-top: var(--space-4); border-top: 1px solid var(--line); }
.next li { display: grid; gap: var(--space-1); padding: var(--space-3) 0; border-bottom: 1px solid var(--line); }
.next__when { font-size: 11px; line-height: 14px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 600; color: var(--ink-muted); }
.next__what { font-size: 16px; line-height: 26px; }
.form__demo { margin-top: var(--space-4); padding: var(--space-3); border: 1px solid var(--line-strong); color: var(--ink-muted); }

/* ---------- Agent band ---------- */
.sig-agent__inner.sig-container { padding: var(--space-6) var(--space-4); align-items: flex-start; }
.agent__logo { width: 160px; height: auto; }
.agent__details { display: grid; gap: var(--space-1); }
.agent__details p { margin: 0; }
.agent__details a { text-underline-offset: 3px; }

/* ---------- Legal ---------- */
.legal__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2) var(--space-4); }
.legal__inner p { margin: 0; }
.sig-legal { padding-bottom: calc(var(--space-4) + 64px + env(safe-area-inset-bottom)); } /* room for the phone action bar */

/* ---------- Phone action bar ---------- */
.action-bar {
  position: fixed; z-index: 40; left: 0; right: 0; bottom: 0;
  display: grid; grid-template-columns: 1fr 1fr;
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--surface-raised); border-top: 1px solid var(--line);
  transform: translateY(100%); transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.action-bar.is-visible { transform: none; }
.action-bar a {
  display: flex; align-items: center; justify-content: center; min-height: 60px;
  font-size: 14px; line-height: 20px; font-weight: 600; letter-spacing: 0.04em; text-decoration: none;
}
.action-bar__call { color: var(--ink); }
.action-bar__cta { background: var(--copper-fill); color: var(--on-copper-fill); }
.action-bar a:focus-visible { outline: 2px solid var(--focus); outline-offset: -4px; }

/* ---------- Quiet reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal.is-in { opacity: 1; transform: none; }
.no-observer .reveal { opacity: 1; transform: none; }

/* ---------- Small phones ---------- */
@media (max-width: 479px) {
  .site-header__cta { display: none; }
  .sig-lockup__logo { width: 120px; }
  .sig-lockup__name { font-size: 18px; }
}

/* ---------- Tablet and up ---------- */
@media (min-width: 640px) {
  .starter__row { grid-template-columns: 1fr auto; }
  .form { padding: var(--space-5); }
  .hero__panel { padding: var(--space-6); }
  .proof__list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .proof__list li, .proof__list li:nth-child(even) { padding: var(--space-4); border-left: 1px solid var(--line); border-bottom: 0; }
  .proof__list li:first-child { padding-left: 0; border-left: 0; }
  .sig-agent__inner.sig-container { padding: var(--space-6); }
}

/* ---------- Desktop ---------- */
@media (min-width: 900px) {
  html { scroll-padding-top: 104px; }
  .site-header { position: sticky; top: 0; }
  .site-nav { display: flex; }
  .sig-lockup__logo { width: 150px; }

  .hero { grid-template-columns: 7fr 5fr; min-height: min(860px, calc(100svh - 96px)); }
  .hero__media { position: relative; }
  .hero__media img { position: absolute; inset: 0; aspect-ratio: auto; height: 100%; object-position: 50% 28%; }
  .hero__panel { padding: var(--space-6) var(--space-6) var(--space-5); gap: var(--space-2); }
  .starter { margin-top: var(--space-3); }

  .split { grid-template-columns: 5fr 7fr; gap: var(--space-7); }
  .split__head { position: sticky; top: 128px; }

  .results { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sold__row { grid-template-columns: 200px minmax(0, 1fr) auto; column-gap: var(--space-4); padding: var(--space-4) 0; }
  .sold__price { grid-row: auto; font-size: 32px; }
  .sold__meta { text-align: right; }
  .result, .result:nth-child(even) { padding: var(--space-5) var(--space-4); border-left: 1px solid var(--line); }
  .result:first-child { padding-left: 0; border-left: 0; }

  .quotes { grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
  .quote { padding: var(--space-5) var(--space-5) 0 0; border-bottom: 0; }
  .quote + .quote { padding-left: var(--space-5); border-left: 1px solid var(--line); }

  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 0; }
  .step { padding: 0 var(--space-5); border-bottom: 0; border-left: 1px solid var(--line); }
  .step:first-child { padding-left: 0; border-left: 0; }

  .appraisal { grid-template-columns: 5fr 7fr; gap: var(--space-7); align-items: start; }
  .appraisal__intro { position: sticky; top: 128px; }

  .action-bar { display: none; }
  .sig-legal { padding-bottom: var(--space-4); }
}

/* ---------- Respect "reduce motion" ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
