/* ─── Reset & base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --brown:    #7A4F28;
  --brown-dk: #4E2F0E;
  --brown-lt: #A67048;
  --tan:      #C8924A;
  --tan-lt:   #E8B870;
  --cream:    #FDF8F0;
  --warm:     #F5EDD8;
  --border:   #E2D4B8;
  --text:     #2C1A08;
  --mid:      #6B4A28;
  --muted:    #A08060;
  --white:    #FFFFFF;
  --success:  #1e7e4a;
  --success-lt:#eaf6ee;
  --error-lt: #fdecea;
  --urgent:   #c0392b;
  --radius:   10px;
  --shadow:   0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.08);
  --font-head: 'Oswald', sans-serif;
  --font-body: 'Nunito', sans-serif;
}

html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--cream);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ─── Header ─────────────────────────────────────────────────── */
.site-header {
  background: var(--brown-dk);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.header-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 20px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  text-decoration: none;
}
.header-logo {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 15%;
  border: 2px solid var(--tan);
  display: block;
  flex-shrink: 0;
}
.header-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.header-brand-name {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .95rem;
  color: var(--white);
  letter-spacing: .04em;
}
.header-brand-sub {
  font-size: .5rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--tan-lt);
  margin-top: 1px;
}
.header-phone {
  display: flex;
  align-items: center;
  gap: 7px;
  color: rgba(255,255,255,.8);
  text-decoration: none;
  font-size: .88rem;
  font-weight: 700;
  transition: color .2s;
}
.header-phone:hover { color: var(--tan-lt); }
.header-phone svg { opacity: .75; }

/* ─── Hero ───────────────────────────────────────────────────── */
.hero {
  background: var(--brown-dk);
  padding: 38px 20px 42px;
  text-align: center;
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(200,146,74,.12) 0%, transparent 60%);
  pointer-events: none;
}
.hero-inner { max-width: 560px; margin: 0 auto; position: relative; z-index: 1; }
.hero h1 {
  font-family: var(--font-head);
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: .02em;
  color: var(--white);
}
.hero h1 span { color: var(--tan-lt); }
.hero p {
  font-size: 1rem;
  opacity: .75;
  max-width: 440px;
  margin: 0 auto;
}

/* ─── Page layout ────────────────────────────────────────────── */
main { flex: 1; }
.page-wrap {
  max-width: 700px;
  margin: 0 auto;
  padding: 36px 20px 60px;
}
.form-wrap { }

/* ─── Card ───────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
  border: 1px solid var(--border);
}

/* ─── Fieldsets ──────────────────────────────────────────────── */
fieldset { border: none; }
.fieldset + .fieldset { margin-top: 32px; }
legend {
  display: block;
  width: 100%;
  font-family: var(--font-head);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--tan);
  padding-bottom: 10px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--warm);
}

/* ─── Fields ─────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.field:last-child { margin-bottom: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 540px) { .field-row { grid-template-columns: 1fr; } }

label { font-size: .875rem; font-weight: 700; color: var(--mid); }
.req { color: var(--tan); }

input[type=text], input[type=email], input[type=tel], textarea {
  width: 100%;
  padding: 11px 15px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: .95rem;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}
input:focus, textarea:focus {
  border-color: var(--tan);
  box-shadow: 0 0 0 3px rgba(200,146,74,.15);
}
textarea { resize: vertical; min-height: 130px; }
.hint { font-size: .8rem; color: var(--muted); }

/* ─── Response note ──────────────────────────────────────────── */
.response-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--warm);
  border: 1px solid var(--border);
  border-left: 3px solid var(--tan);
  border-radius: 8px;
  padding: 13px 15px;
  margin-top: 8px;
  font-size: .85rem;
  color: var(--mid);
  line-height: 1.5;
}
.response-note svg { flex-shrink: 0; margin-top: 1px; color: var(--tan); opacity: .85; }

/* ─── File upload ────────────────────────────────────────────── */
.file-drop {
  border: 2px dashed var(--border);
  border-radius: 8px;
  position: relative;
  transition: border-color .2s, background .2s;
  min-height: 90px;
}
.file-drop:hover, .file-drop.drag-over {
  border-color: var(--tan);
  background: var(--warm);
}
.file-drop input[type=file] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 2;
  width: 100%; height: 100%;
}
.file-drop-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 20px;
  color: var(--muted);
  pointer-events: none;
}
.file-drop-inner svg { opacity: .4; }
.file-drop-inner span { font-size: .9rem; }
.file-hint { font-size: .78rem !important; color: #bba888; }
.file-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px;
}
.file-preview:empty { display: none; }
.thumb-wrap { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.file-thumb {
  width: 80px; height: 80px;
  border-radius: 7px;
  object-fit: cover;
  border: 1.5px solid var(--border);
}
.thumb-label { font-size: .7rem; color: var(--muted); max-width: 80px; text-align: center; word-break: break-all; }

/* ─── Buttons ────────────────────────────────────────────────── */
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 28px;
  background: var(--tan);
  color: var(--text);
  border: none;
  border-radius: 25px;
  padding: 15px 28px;
  font-size: 1rem;
  font-family: var(--font-head);
  font-weight: 500;
  letter-spacing: .04em;
  cursor: pointer;
  transition: background .2s, transform .1s;
}
.btn-primary:hover  { background: var(--tan-lt); transform: translateY(-1px); }
.btn-primary:active { transform: scale(.98); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.btn-outline {
  display: inline-block;
  margin-top: 16px;
  padding: 10px 24px;
  border: 2px solid var(--tan);
  color: var(--brown);
  border-radius: 25px;
  font-size: .9rem;
  font-family: var(--font-head);
  font-weight: 500;
  letter-spacing: .04em;
  cursor: pointer;
  background: none;
  transition: all .2s;
}
.btn-outline:hover { background: var(--tan); color: var(--text); }

.spinner {
  width: 20px; height: 20px;
  border: 2.5px solid rgba(44,26,8,.25);
  border-top-color: var(--text);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Messages ───────────────────────────────────────────────── */
.msg {
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 24px;
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.5;
}
.msg.error   { background: var(--error-lt);   color: var(--urgent);  border: 1px solid #f5bdb8; }
.msg.success { background: var(--success-lt); color: var(--success); border: 1px solid #b8dfc8; }

/* ─── Success block ──────────────────────────────────────────── */
.success-block {
  text-align: center;
  padding: 24px 16px 8px;
}
.success-icon {
  width: 72px; height: 72px;
  background: var(--warm);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: var(--tan);
  border: 2px solid var(--border);
}
.success-block h2 {
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--brown-dk);
  margin-bottom: 10px;
}
.success-block p {
  color: var(--muted);
  font-size: .95rem;
  max-width: 420px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ─── Form footer ────────────────────────────────────────────── */
.form-footer {
  text-align: center;
  font-size: .82rem;
  color: var(--muted);
  margin-top: 16px;
}
.form-footer a { color: var(--brown); text-decoration: none; font-weight: 700; }
.form-footer a:hover { color: var(--tan); text-decoration: underline; }

/* ─── Site footer ────────────────────────────────────────────── */
.site-footer {
  background: var(--brown-dk);
  color: rgba(255,255,255,.5);
  font-size: .8rem;
  padding: 16px 20px;
  margin-top: auto;
}
.footer-inner {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.footer-inner a { color: rgba(255,255,255,.65); text-decoration: none; }
.footer-inner a:hover { color: var(--tan-lt); }

/* ─── Rates notice ───────────────────────────────────────────── */
.rates-box {
  background: var(--warm);
  border: 1px solid var(--border);
  border-left: 4px solid var(--tan);
  border-radius: 8px;
  padding: 18px 20px;
  margin-bottom: 28px;
}
.rates-box-title {
  font-family: var(--font-head);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--tan);
  margin-bottom: 12px;
}
.rates-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.rates-row:last-of-type { border-bottom: none; }
.rates-label {
  font-size: .875rem;
  color: var(--mid);
  line-height: 1.4;
}
.rates-hint {
  display: block;
  font-size: .75rem;
  color: var(--muted);
  font-weight: 400;
  margin-top: 1px;
}
.rates-price {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  text-align: right;
}
.rates-footer {
  font-size: .75rem;
  color: var(--muted);
  margin-top: 12px;
  line-height: 1.55;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

/* ─── Acknowledgment checkbox ────────────────────────────────── */
.ack-field {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 24px;
  padding: 18px 20px;
  background: var(--brown-dk);
  border-radius: 8px;
  cursor: pointer;
  transition: outline .15s;
}
.ack-field:has(input:checked) { outline: 3px solid var(--tan); }
.ack-field input[type=checkbox] {
  width: 22px; height: 22px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--tan);
  cursor: pointer;
}
.ack-field label {
  font-size: .9rem;
  color: rgba(255,255,255,.85);
  line-height: 1.6;
  cursor: pointer;
  font-weight: 600;
}

/* ─── Mobile ─────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .hero h1  { font-size: 1.75rem; }
  .card     { padding: 22px 18px; }
  .hero     { padding: 28px 16px 32px; }
  .page-wrap{ padding: 24px 14px 48px; }
}

/* ─── Desktop two-column layout ──────────────────────────────── */
@media (min-width: 800px) {
  .header-inner { max-width: 1100px; }
  .footer-inner { max-width: 1100px; }
  .page-wrap    { max-width: 1100px; padding: 52px 40px 80px; }
  .form-layout  { display: grid; grid-template-columns: 1fr 320px; gap: 32px; align-items: start; }
  .form-sidebar { position: sticky; top: 82px; display: flex; flex-direction: column; gap: 16px; }
  .steps-inline { display: none; }
}
@media (max-width: 799px) {
  .form-sidebar { display: none; }
}

/* ─── Sidebar panels ─────────────────────────────────────────── */
.sidebar-info {
  background: var(--brown-dk);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
  border: 1px solid rgba(200,146,74,.2);
}
.sidebar-info-title {
  font-family: var(--font-head);
  font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--tan-lt); margin-bottom: 14px; font-weight: 600;
}
.sidebar-step {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-step:last-of-type { border-bottom: none; }
.sidebar-step-num {
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(200,146,74,.2); color: var(--tan-lt);
  font-family: var(--font-head); font-size: .75rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.sidebar-step p { font-size: .84rem; color: rgba(255,255,255,.65); line-height: 1.6; margin: 0; }
.sidebar-step strong { color: rgba(255,255,255,.9); }

.sidebar-notice {
  background: var(--warm); border: 1px solid var(--border);
  border-left: 4px solid var(--tan); border-radius: var(--radius);
  padding: 16px 18px;
}
.sidebar-notice p { font-size: .84rem; color: var(--mid); line-height: 1.65; margin: 0; }
.sidebar-notice strong { color: var(--text); }

.sidebar-phone {
  background: var(--warm); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 20px; text-align: center;
}
.sidebar-phone p { font-size: .82rem; color: var(--muted); margin-bottom: 8px; }
.sidebar-phone a {
  display: block; font-family: var(--font-head);
  font-size: 1.1rem; font-weight: 600; letter-spacing: .04em;
  color: var(--brown-dk); text-decoration: none;
}
.sidebar-phone a:hover { color: var(--tan); }

/* ── ADDRESS AUTOCOMPLETE (Addy NZ) ─────────────────────────── */
.addr-wrap { position: relative; }
.addr-dropdown {
  display: none;
  position: absolute;
  top: calc(100% - 2px);
  left: 0; right: 0;
  background: #fff;
  border: 2px solid var(--tan);
  border-top: none;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 6px 16px rgba(78,47,14,.13);
  z-index: 50;
  max-height: 220px;
  overflow-y: auto;
}
.addr-dropdown.open { display: block; }
.addr-item {
  padding: .6rem .95rem;
  font-size: .92rem;
  color: var(--text);
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  line-height: 1.35;
}
.addr-item:last-child { border-bottom: none; }
.addr-item:hover, .addr-item.focused { background: var(--warm); color: var(--brown-dk); }
