/* Mallard Digital — start.mallard-digital.com */

:root {
  --green:  #0B3D2E;
  --teal:   #164A4D;
  --blue:   #3A6D8C;
  --sand:   #D9C7A3;
  --gold:   #E0B600;
  --brown:  #5C4632;
  --bg:     #F4F4F2;
  --white:  #ffffff;
  --text:   #1a1a18;
  --muted:  #666660;
  --border: rgba(0,0,0,0.1);
  --radius: 8px;
  --radius-lg: 12px;
  --font-serif: 'Lora', Georgia, serif;
  --font-sans: 'DM Sans', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* HEADER */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-serif);
  font-size: 17px;
  color: var(--green);
  font-weight: 500;
}

.back-link {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}
.back-link:hover { color: var(--green); }

/* PAGE INTRO */
.page-intro {
  background: var(--green);
  padding: 3rem 2rem 2.5rem;
}
.page-intro-inner { max-width: 640px; margin: 0 auto; }

.page-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--sand);
  margin-bottom: 10px;
}

.page-intro h1 {
  font-family: var(--font-serif);
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 400;
  color: var(--white);
  margin-bottom: 12px;
  line-height: 1.25;
}

.page-lead {
  font-size: 15px;
  color: rgba(255,255,255,0.78);
  max-width: 560px;
  line-height: 1.7;
}

/* LAYOUT */
.layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 2rem 4rem;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 800px) {
  .layout { grid-template-columns: 1fr; }
  .estimator-sidebar { order: -1; }
  .estimator-sticky { position: static !important; }
}

/* FORM SECTIONS */
.discovery-form { min-width: 0; }

.form-section {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
}

.section-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 1.5rem;
}

.section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  min-width: 26px;
  background: var(--green);
  color: var(--white);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 500;
  margin-top: 2px;
}

.section-header h2 {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 3px;
}

.section-hint {
  font-size: 13px;
  color: var(--muted);
}

.section-divider {
  height: 1rem;
}

/* FIELDS */
.field {
  margin-bottom: 1.4rem;
}
.field:last-child { margin-bottom: 0; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.4rem;
}
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

label:not(.radio-item):not(.check-item) {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}

.field-hint {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
  line-height: 1.5;
}

.req { color: var(--green); }
.opt { font-weight: 400; color: var(--muted); font-size: 12px; }

input[type=text],
input[type=email],
input[type=url],
textarea,
select {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 14px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
}

input[type=text]:focus,
input[type=email]:focus,
input[type=url]:focus,
textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(11,61,46,0.08);
}

input.inline-input {
  width: 200px;
  display: inline-block;
  margin-left: 6px;
  vertical-align: middle;
}
input.inline-input:disabled { opacity: 0.4; cursor: not-allowed; }

textarea { resize: vertical; line-height: 1.6; min-height: 80px; }

/* RADIO GROUPS */
.radio-group { display: flex; flex-direction: column; gap: 8px; }

.radio-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  line-height: 1.5;
}

.radio-item input[type=radio] {
  width: auto;
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: var(--green);
}

/* CARD RADIOS */
.radio-group.stacked { gap: 6px; }

.card-radio {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: var(--bg);
  transition: border-color 0.15s, background 0.15s;
  align-items: flex-start;
}

.card-radio:hover { border-color: rgba(11,61,46,0.3); background: #eef3f0; }
.card-radio:has(input:checked) { border-color: var(--green); background: #eef3f0; }

.radio-card-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.radio-card-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.radio-card-price-inline {
  font-size: 12px;
  font-weight: 400;
  color: var(--green);
  background: rgba(11,61,46,0.08);
  padding: 1px 7px;
  border-radius: 20px;
}

.radio-card-sub {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.radio-card-price {
  font-size: 12px;
  font-weight: 500;
  color: var(--green);
  margin-top: 2px;
}

/* CHECKBOXES */
.check-group { display: flex; flex-direction: column; gap: 6px; }

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 13px;
  background: var(--bg);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.check-item:hover { border-color: rgba(11,61,46,0.3); background: #eef3f0; }
.check-item:has(input:checked) { border-color: var(--green); background: #eef3f0; }

.check-item input[type=checkbox] {
  width: auto;
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: var(--green);
}

.check-content { display: flex; flex-direction: column; gap: 2px; }
.check-title { font-size: 14px; font-weight: 500; color: var(--text); }
.check-price { font-size: 12px; font-weight: 400; color: var(--green); margin-left: 8px; }
.check-sub { font-size: 12px; color: var(--muted); line-height: 1.5; }

/* SUBMIT AREA */
.form-submit-area {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--green);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  padding: 13px 24px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  white-space: nowrap;
}
.submit-btn:hover { background: var(--teal); }
.submit-btn:active { transform: scale(0.98); }
.submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.submit-note {
  font-size: 13px;
  color: var(--muted);
}

.form-error {
  background: #fdf0ee;
  border: 1px solid #f0c4bb;
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 13px;
  color: #8b2e1f;
  margin-top: 1rem;
}

/* ESTIMATOR SIDEBAR */
.estimator-sidebar {
  min-width: 0;
}

.estimator-sticky {
  position: sticky;
  top: 72px;
}

.estimator-header {
  margin-bottom: 1.25rem;
}

.estimator-eyebrow {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--muted);
  margin-bottom: 4px;
}

.estimator-note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.estimate-total {
  background: var(--green);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 1.1rem 1.25rem;
}

.estimate-total-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 4px;
}

.estimate-total-value {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 400;
  color: var(--white);
  line-height: 1;
}

.estimate-monthly {
  background: var(--teal);
  padding: 0.75rem 1.25rem;
}

.estimate-monthly-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 2px;
}

.estimate-monthly-value {
  font-size: 16px;
  font-weight: 500;
  color: var(--white);
}

.estimate-line-items {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  padding: 1rem 1.25rem;
  list-style: none;
  min-height: 80px;
}

.estimate-empty {
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
}

.estimate-line-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.estimate-line-item:last-child { border-bottom: none; }

.estimate-item-label { color: var(--text); flex: 1; }
.estimate-item-price { color: var(--green); font-weight: 500; white-space: nowrap; }

.estimator-footer {
  margin-top: 1rem;
  font-size: 12px;
  color: var(--muted);
}
.estimator-footer a { color: var(--blue); text-decoration: none; }
.estimator-footer a:hover { text-decoration: underline; }

/* SUCCESS SCREEN */
.success-screen {
  max-width: 560px;
  margin: 4rem auto;
  padding: 0 2rem;
}

.success-inner {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  text-align: center;
  border: 1px solid var(--border);
}

.success-icon { margin-bottom: 1.25rem; }

.success-inner h2 {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 400;
  color: var(--green);
  margin-bottom: 12px;
}

.success-inner p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.success-estimate {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.75rem;
  font-size: 14px;
  text-align: left;
}

.back-btn {
  display: inline-block;
  font-size: 14px;
  color: var(--green);
  text-decoration: none;
  border: 1px solid var(--green);
  border-radius: var(--radius);
  padding: 9px 20px;
  transition: background 0.15s, color 0.15s;
}
.back-btn:hover { background: var(--green); color: var(--white); }

/* FOOTER */
.site-footer {
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 1.25rem 2rem;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}
.site-footer a { color: var(--blue); text-decoration: none; }

/* UTILITY */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
