/* ==========================================================================
   Heartwood Carpentry Co. — shared stylesheet
   Warm craftsman palette: cream + walnut + amber gold. Georgia serif
   headings, clean sans body. Boxed split hero, rounded cards, no external
   assets — all imagery is inline SVG or CSS.
   ========================================================================== */

/* ---- Design tokens ---- */
:root {
  --cream: #f7f1e6;
  --cream-alt: #efe6d6;
  --white: #fffdf8;
  --walnut-dark: #3a2415;
  --walnut: #4a2f1f;
  --walnut-mid: #6b4226;
  --gold: #b8863b;
  --gold-light: #d4a94f;
  --gold-pale: #e8d7ae;
  --ink: #2c2013;
  --ink-soft: #4d3c2a;
  --border: rgba(74, 47, 31, 0.16);
  --shadow: 0 12px 32px rgba(58, 36, 21, 0.12);
  --shadow-sm: 0 4px 12px rgba(58, 36, 21, 0.08);

  --font-serif: Georgia, Cambria, "Times New Roman", Times, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.25rem;
  --space-5: 3.5rem;
  --space-6: 5rem;
  --space-7: 7rem;

  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;

  --container: 1160px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--walnut);
  line-height: 1.22;
  margin: 0 0 var(--space-2);
  font-weight: 700;
}
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.65rem, 3.2vw, 2.35rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); }
p { margin: 0 0 var(--space-2); }
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-3);
}

/* ---- Focus states (accessibility) ---- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.hamburger:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--walnut);
  color: var(--white);
  padding: 0.75rem 1.25rem;
  z-index: 200;
  border-radius: 0 0 8px 0;
  font-weight: 600;
}
.skip-link:focus {
  left: 0;
}
.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;
}

/* ---- Utility bar ---- */
.utility-bar {
  background: var(--walnut-dark);
  color: var(--gold-pale);
  font-size: 0.85rem;
}
.utility-bar .container {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: space-between;
  align-items: center;
  padding-block: 0.5rem;
}
.utility-bar a {
  text-decoration: none;
  color: var(--gold-pale);
}
.utility-bar a:hover,
.utility-bar a:focus-visible {
  color: var(--white);
  text-decoration: underline;
}
.utility-bar .utility-tagline {
  font-style: italic;
  color: rgba(232, 215, 174, 0.75);
}

/* ---- Header / nav ---- */
.site-header {
  background: var(--cream);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-2);
  gap: var(--space-3);
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-mark { width: 44px; height: 44px; flex-shrink: 0; }
.logo-text {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--walnut);
  line-height: 1.1;
}
.logo-text span {
  display: block;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 0.7rem;
  letter-spacing: 0.09em;
  color: var(--gold);
  text-transform: uppercase;
  margin-top: 2px;
}

.hamburger {
  display: none;
  background: transparent;
  border: 2px solid var(--walnut);
  border-radius: var(--radius-sm);
  width: 46px;
  height: 40px;
  padding: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.hamburger-icon,
.hamburger-icon::before,
.hamburger-icon::after {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--walnut);
  border-radius: 2px;
  position: relative;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.hamburger-icon::before,
.hamburger-icon::after {
  content: "";
  position: absolute;
  left: 0;
}
.hamburger-icon::before { top: -7px; }
.hamburger-icon::after { top: 7px; }
.hamburger[aria-expanded="true"] .hamburger-icon { background: transparent; }
.hamburger[aria-expanded="true"] .hamburger-icon::before { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] .hamburger-icon::after { transform: translateY(-7px) rotate(-45deg); }

.main-nav ul {
  display: flex;
  gap: var(--space-4);
  align-items: center;
}
.main-nav a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--ink-soft);
  padding: 0.4rem 0.1rem;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--walnut);
  border-bottom-color: var(--gold);
}
.main-nav a[aria-current="page"] {
  color: var(--walnut);
  border-bottom-color: var(--gold);
}
.nav-cta {
  background: var(--walnut);
  color: var(--white) !important;
  padding: 0.6rem 1.2rem !important;
  border-radius: 999px;
  border-bottom: none !important;
}
.nav-cta:hover, .nav-cta:focus-visible {
  background: var(--walnut-mid);
  color: var(--white) !important;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  padding: 0.9rem 1.9rem;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--walnut);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover, .btn-primary:focus-visible {
  background: var(--walnut-mid);
  color: var(--white);
}
.btn-outline {
  background: transparent;
  border-color: var(--gold);
  color: var(--walnut);
}
.btn-outline:hover, .btn-outline:focus-visible {
  background: var(--gold);
  color: var(--walnut-dark);
}
.btn-block { width: 100%; }

/* ---- Wood grain texture (decorative) ---- */
.grain-divider {
  height: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='34' viewBox='0 0 220 34'%3E%3Cg fill='none' stroke='%234a2f1f' stroke-opacity='0.35' stroke-width='1.4'%3E%3Cpath d='M0 6 Q 27 1 55 6 T 110 6 T 165 6 T 220 6'/%3E%3Cpath d='M0 17 Q 27 12 55 17 T 110 17 T 165 17 T 220 17'/%3E%3Cpath d='M0 28 Q 27 23 55 28 T 110 28 T 165 28 T 220 28'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-size: 220px 34px;
  opacity: 0.6;
}

/* ---- Hero ---- */
.hero {
  padding-block: var(--space-5) var(--space-6);
  position: relative;
}
.hero-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1fr;
  overflow: hidden;
  position: relative;
}
.hero-copy {
  padding: var(--space-5) var(--space-4);
  position: relative;
  z-index: 2;
}
.hero-eyebrow {
  display: inline-block;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--gold);
  background: var(--gold-pale);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  margin-bottom: var(--space-2);
}
.hero-copy p.lede {
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 46ch;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}
.hero-art {
  background: var(--cream-alt);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='34' viewBox='0 0 220 34'%3E%3Cg fill='none' stroke='%234a2f1f' stroke-opacity='0.10' stroke-width='1.4'%3E%3Cpath d='M0 6 Q 27 1 55 6 T 110 6 T 165 6 T 220 6'/%3E%3Cpath d='M0 17 Q 27 12 55 17 T 110 17 T 165 17 T 220 17'/%3E%3Cpath d='M0 28 Q 27 23 55 28 T 110 28 T 165 28 T 220 28'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 220px 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  min-height: 280px;
}
.hero-art svg { width: 100%; height: auto; max-width: 380px; }

@media (min-width: 800px) {
  .hero-box { grid-template-columns: 1.1fr 0.9fr; }
  .hero-copy { padding: var(--space-6) var(--space-5); }
}

/* ---- Sections ---- */
section { padding-block: var(--space-6); }
.section-tight { padding-block: var(--space-5); }
.section-head {
  max-width: 62ch;
  margin-bottom: var(--space-4);
}
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow {
  display: block;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
}
.bg-alt { background: var(--cream-alt); }
.bg-walnut {
  background: var(--walnut-dark);
  color: var(--gold-pale);
}
.bg-walnut h2, .bg-walnut h3 { color: var(--white); }

/* ---- Grids / cards ---- */
.grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  box-shadow: var(--shadow-sm);
}
.card h3 { margin-bottom: 0.5rem; }
.service-card { display: flex; flex-direction: column; gap: 0.4rem; }
.service-icon {
  width: 54px;
  height: 54px;
  background: var(--cream-alt);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
  flex-shrink: 0;
}
.service-icon svg { width: 30px; height: 30px; }
.service-card a.service-link {
  margin-top: auto;
  font-weight: 700;
  color: var(--walnut);
  text-decoration: none;
  border-bottom: 2px solid var(--gold);
  align-self: flex-start;
}
.service-card a.service-link:hover,
.service-card a.service-link:focus-visible { color: var(--gold); }

/* ---- Stats / trust bar ---- */
.stats-bar {
  background: var(--walnut);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-3);
  margin-top: calc(var(--space-6) * -1 + var(--space-4));
  position: relative;
  z-index: 3;
  box-shadow: var(--shadow);
}
.stats-bar .grid { text-align: center; }
.stat-num {
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  color: var(--gold-light);
  display: block;
  font-weight: 700;
}
.stat-label {
  font-size: 0.88rem;
  color: var(--gold-pale);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---- Testimonials ---- */
.testimonial {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius-md);
  padding: var(--space-3);
}
.testimonial p.quote {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--ink-soft);
  font-size: 1.05rem;
}
.testimonial .stars { color: var(--gold); letter-spacing: 2px; margin-bottom: 0.5rem; }
.testimonial .cite { font-weight: 700; color: var(--walnut); font-style: normal; }
.testimonial .cite span {
  display: block;
  font-weight: 400;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

/* ---- CTA banner ---- */
.cta-banner {
  background: var(--walnut-dark);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-4);
  text-align: center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='34' viewBox='0 0 220 34'%3E%3Cg fill='none' stroke='%23d4a94f' stroke-opacity='0.12' stroke-width='1.4'%3E%3Cpath d='M0 6 Q 27 1 55 6 T 110 6 T 165 6 T 220 6'/%3E%3Cpath d='M0 17 Q 27 12 55 17 T 110 17 T 165 17 T 220 17'/%3E%3Cpath d='M0 28 Q 27 23 55 28 T 110 28 T 165 28 T 220 28'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 220px 34px;
}
.cta-banner h2 { color: var(--white); }
.cta-banner p { color: var(--gold-pale); max-width: 56ch; margin-inline: auto; }
.cta-banner .hero-actions { justify-content: center; }

/* ---- Values / list items ---- */
.check-list li {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}
.check-list svg { flex-shrink: 0; margin-top: 3px; }

/* ---- Team / avatars ---- */
.team-card { text-align: center; }
.avatar {
  width: 96px;
  height: 96px;
  margin: 0 auto var(--space-2);
}
.team-card h3 { margin-bottom: 0.1rem; }
.team-role {
  color: var(--gold);
  font-weight: 700;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.6rem;
  display: block;
}

/* ---- Area list ---- */
.area-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.area-chip {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  font-weight: 600;
  color: var(--walnut);
}

/* ---- Table (hours) ---- */
.hours-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
}
.hours-table caption {
  text-align: left;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--walnut);
  margin-bottom: 0.75rem;
  font-weight: 700;
}
.hours-table th, .hours-table td {
  text-align: left;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.98rem;
}
.hours-table tr:last-child th, .hours-table tr:last-child td { border-bottom: none; }
.hours-table th { color: var(--ink-soft); font-weight: 600; }

/* ---- Forms ---- */
.form-grid {
  display: grid;
  gap: var(--space-2);
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .form-grid.two-col { grid-template-columns: 1fr 1fr; }
}
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field label { font-weight: 700; color: var(--walnut); font-size: 0.92rem; }
.field .required { color: var(--gold); }
.field input,
.field select,
.field textarea {
  font-family: var(--font-sans);
  font-size: 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 1px;
  border-color: var(--gold);
}
.form-note { font-size: 0.85rem; color: var(--ink-soft); margin-top: var(--space-1); }

/* ---- Contact info blocks ---- */
.contact-info-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
}
.contact-info-card ul li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: var(--space-2);
}
.contact-info-card a { text-decoration: none; font-weight: 600; }
.contact-info-card a:hover, .contact-info-card a:focus-visible { color: var(--gold); }
.icon-chip {
  width: 40px;
  height: 40px;
  background: var(--cream-alt);
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ---- Footer ---- */
.site-footer {
  background: var(--walnut-dark);
  color: var(--gold-pale);
  border-top: 4px solid var(--gold);
}
.footer-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 1fr;
  padding-block: var(--space-6) var(--space-4);
}
@media (min-width: 760px) {
  .footer-grid { grid-template-columns: 1.3fr 1fr 1fr 1fr; }
}
.footer-grid h2 {
  color: var(--white);
  font-size: 1.3rem;
}
.footer-grid h3 {
  color: var(--gold-light);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-2);
}
.footer-grid p { color: rgba(232, 215, 174, 0.85); }
.footer-grid a {
  color: var(--gold-pale);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 0.6rem;
}
.footer-grid a:hover, .footer-grid a:focus-visible { color: var(--white); text-decoration: underline; }
.footer-bottom {
  border-top: 1px solid rgba(212, 169, 79, 0.25);
  padding-block: var(--space-2);
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  color: rgba(232, 215, 174, 0.7);
}
.footer-logo { display: flex; align-items: center; gap: 0.6rem; margin-bottom: var(--space-2); }
.footer-logo .logo-mark { width: 40px; height: 40px; }

/* ---- Page hero (interior pages, shorter) ---- */
.page-header {
  padding-block: var(--space-5) var(--space-4);
  text-align: center;
}
.page-header .eyebrow { display: block; text-align: center; }
.page-header .lede { max-width: 60ch; margin-inline: auto; color: var(--ink-soft); font-size: 1.08rem; }

/* ---- Misc ---- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.gold-rule {
  width: 64px;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
  margin: var(--space-2) 0;
}
.center-rule { margin-inline: auto; }

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .hamburger-icon, .hamburger-icon::before, .hamburger-icon::after {
    transition: none;
  }
}

/* ---- Mobile nav ---- */
@media (max-width: 860px) {
  .hamburger { display: inline-flex; }
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: none;
  }
  .main-nav.is-open { display: block; }
  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--space-2) var(--space-3) var(--space-3);
  }
  .main-nav li { border-bottom: 1px solid var(--border); }
  .main-nav li:last-child { border-bottom: none; margin-top: 0.5rem; }
  .main-nav a {
    display: block;
    padding: 0.9rem 0.2rem;
    border-bottom: none !important;
  }
  .nav-cta { text-align: center; }
  .stats-bar { margin-top: var(--space-3); }
}

@media (min-width: 861px) {
  .main-nav { display: block !important; }
}

/* ==========================================================================
   Booking / Portal / Estimate — interactive demo pages
   ========================================================================== */

/* ---- Demo note ---- */
.demo-note {
  background: var(--gold-pale);
  color: var(--walnut-dark);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1.1rem;
  font-size: 0.88rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: var(--space-2);
}
.demo-note svg { flex-shrink: 0; }

/* ---- Shared "app panel" shell ---- */
.app-panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: var(--space-4);
}
@media (min-width: 700px) {
  .app-panel { padding: var(--space-5); }
}
.app-step { display: none; }
.app-step.is-active { display: block; animation: hwc-fade-in 0.35s ease; }
.app-step h2 {
  font-size: 1.35rem;
  margin-bottom: var(--space-1);
}
.app-step-intro {
  color: var(--ink-soft);
  max-width: 60ch;
  margin-bottom: var(--space-3);
}
.step-back {
  background: none;
  border: none;
  color: var(--gold);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0.4rem 0;
  margin-bottom: var(--space-2);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.step-back:hover, .step-back:focus-visible { color: var(--walnut); }

@keyframes hwc-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .app-step.is-active { animation: none; }
}

/* ---- Progress indicator (booking + estimate deposit) ---- */
.flow-progress {
  display: flex;
  gap: 0.5rem;
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}
.flow-progress span {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: var(--cream-alt);
  border: 1px solid var(--border);
}
.flow-progress span.is-current {
  background: var(--walnut);
  color: var(--white);
  border-color: var(--walnut);
}
.flow-progress span.is-done {
  background: var(--gold-pale);
  color: var(--walnut-dark);
  border-color: var(--gold);
}

/* ---- Visit type / project type selector cards ---- */
.choice-grid {
  display: grid;
  gap: var(--space-2);
  grid-template-columns: 1fr;
  margin-bottom: var(--space-3);
}
@media (min-width: 640px) {
  .choice-grid { grid-template-columns: repeat(2, 1fr); }
}
.choice-grid.choice-grid-3 { grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .choice-grid.choice-grid-3 { grid-template-columns: repeat(3, 1fr); }
}
.choice-card {
  text-align: left;
  background: var(--cream);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  cursor: pointer;
  font-family: var(--font-sans);
  color: var(--ink);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.choice-card h3 { margin-bottom: 0.25rem; font-size: 1.1rem; }
.choice-card p { margin: 0; color: var(--ink-soft); font-size: 0.92rem; }
.choice-card:hover { border-color: var(--gold-light); }
.choice-card[aria-pressed="true"] {
  border-color: var(--gold);
  background: var(--gold-pale);
}
.choice-card[aria-pressed="true"] h3 { color: var(--walnut-dark); }

/* ---- Calendar ---- */
.cal-wrap { max-width: 480px; }
.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-2);
}
.cal-month-label {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--walnut);
  font-size: 1.15rem;
}
.cal-weekdays,
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.4rem;
}
.cal-weekdays span {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  padding-bottom: 0.3rem;
}
.cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cream-alt);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  font-weight: 700;
  color: var(--walnut);
  cursor: pointer;
  font-size: 0.95rem;
}
.cal-day:hover:not(:disabled) { border-color: var(--gold-light); }
.cal-day:disabled {
  background: transparent;
  color: var(--border);
  cursor: not-allowed;
  font-weight: 400;
}
.cal-day.is-empty { visibility: hidden; cursor: default; }
.cal-day.is-selected {
  background: var(--walnut);
  color: var(--white);
  border-color: var(--walnut);
}
.cal-legend {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-2);
  font-size: 0.82rem;
  color: var(--ink-soft);
  flex-wrap: wrap;
}
.cal-legend span { display: inline-flex; align-items: center; gap: 0.4rem; }
.cal-legend i {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  display: inline-block;
}
.cal-legend .swatch-available { background: var(--cream-alt); border: 1px solid var(--border); }
.cal-legend .swatch-selected { background: var(--walnut); }
.cal-legend .swatch-unavailable { background: transparent; border: 1px dashed var(--border); }

/* ---- Time slots ---- */
.slot-grid {
  display: grid;
  gap: var(--space-2);
  grid-template-columns: 1fr;
  max-width: 420px;
}
@media (min-width: 520px) {
  .slot-grid { grid-template-columns: repeat(2, 1fr); }
}
.slot-btn {
  background: var(--cream);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--walnut);
  text-align: left;
  cursor: pointer;
}
.slot-btn span {
  display: block;
  font-weight: 400;
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-top: 0.15rem;
}
.slot-btn:hover { border-color: var(--gold-light); }
.slot-btn[aria-pressed="true"] {
  border-color: var(--gold);
  background: var(--gold-pale);
}

/* ---- Confirmation screen ---- */
.confirm-screen { text-align: center; max-width: 560px; margin-inline: auto; }
.confirm-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto var(--space-2);
  border-radius: 50%;
  background: var(--gold-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: hwc-pop 0.4s ease;
}
@keyframes hwc-pop {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .confirm-icon { animation: none; }
}
.confirm-ref {
  display: inline-block;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.2rem;
  background: var(--cream-alt);
  border: 1px dashed var(--gold);
  border-radius: var(--radius-sm);
  padding: 0.6rem 1.2rem;
  color: var(--walnut);
  margin: var(--space-2) 0;
  letter-spacing: 0.02em;
}
.confirm-summary {
  background: var(--cream-alt);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  text-align: left;
  margin: var(--space-3) 0;
}
.confirm-summary dt { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--gold); font-weight: 700; }
.confirm-summary dd { margin: 0 0 var(--space-2); color: var(--ink); font-weight: 600; }
.confirm-summary dd:last-child { margin-bottom: 0; }
.next-steps { text-align: left; counter-reset: step; margin-top: var(--space-3); }
.next-steps li {
  display: flex;
  gap: 0.85rem;
  margin-bottom: var(--space-2);
  align-items: flex-start;
}
.next-steps .step-num {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--walnut);
  color: var(--white);
  font-family: var(--font-serif);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

/* ---- Portal login ---- */
.portal-login-wrap {
  max-width: 440px;
  margin-inline: auto;
}
.portal-login-wrap .app-panel { text-align: center; }
.portal-login-wrap .field { text-align: left; }
.login-divider {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: var(--space-3) 0;
  color: var(--ink-soft);
  font-size: 0.85rem;
}
.login-divider::before, .login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ---- Dashboard layout ---- */
.dashboard-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}
.dashboard-head p { margin: 0; color: var(--ink-soft); }
.logout-link {
  background: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  font-weight: 700;
  color: var(--walnut);
  cursor: pointer;
  font-size: 0.88rem;
}
.logout-link:hover { border-color: var(--gold); }

.dash-section { margin-bottom: var(--space-5); }
.dash-section h2 { font-size: 1.3rem; }

.appt-card {
  display: flex;
  gap: var(--space-2);
  align-items: flex-start;
}
.appt-date-chip {
  flex-shrink: 0;
  width: 62px;
  background: var(--walnut);
  color: var(--white);
  border-radius: var(--radius-sm);
  text-align: center;
  padding: 0.5rem 0.25rem;
  font-family: var(--font-serif);
}
.appt-date-chip .mon { display: block; font-size: 0.7rem; text-transform: uppercase; color: var(--gold-light); }
.appt-date-chip .day { display: block; font-size: 1.3rem; font-weight: 700; line-height: 1; }

/* ---- Data table (service history / invoices) ---- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
}
.data-table th, .data-table td {
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}
.data-table thead th {
  background: var(--cream-alt);
  color: var(--walnut);
  font-family: var(--font-serif);
  font-weight: 700;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table-scroll { overflow-x: auto; border-radius: var(--radius-md); }
.status-badge {
  display: inline-block;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}
.status-badge.is-complete { background: #dfeee0; color: #2b6b32; }
.status-badge.is-scheduled { background: var(--gold-pale); color: var(--walnut-dark); }
.status-badge.is-progress { background: #e6eefb; color: #2a5599; }

/* ---- Invoices ---- */
.invoice-card { margin-bottom: var(--space-3); }
.invoice-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}
.invoice-head h3 { margin: 0; }
.invoice-badge {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
}
.invoice-badge.is-paid { background: #dfeee0; color: #2b6b32; }
.invoice-badge.is-due { background: #fbe4d6; color: #a34a13; }
.line-items { width: 100%; margin-bottom: var(--space-2); }
.line-items tr td { padding: 0.45rem 0; border-bottom: 1px dashed var(--border); font-size: 0.9rem; }
.line-items tr:last-child td { border-bottom: none; }
.line-items td:last-child { text-align: right; font-weight: 700; color: var(--walnut); white-space: nowrap; }
.invoice-total {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--walnut);
  border-top: 2px solid var(--gold-pale);
  padding-top: 0.6rem;
  margin-top: 0.3rem;
}

/* ---- Milestone stepper ---- */
.milestone-stepper {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: var(--space-3) 0;
}
@media (min-width: 760px) {
  .milestone-stepper { flex-direction: row; align-items: flex-start; }
}
.milestone {
  display: flex;
  gap: var(--space-2);
  flex: 1;
  position: relative;
  padding-bottom: var(--space-3);
}
@media (min-width: 760px) {
  .milestone { flex-direction: column; gap: 0.6rem; padding-bottom: 0; padding-right: var(--space-2); }
}
.milestone-dot-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}
.milestone-dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--cream-alt);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--ink-soft);
  font-size: 0.85rem;
  flex-shrink: 0;
}
.milestone-line {
  width: 2px;
  flex: 1;
  background: var(--border);
  margin-top: 2px;
}
@media (min-width: 760px) {
  .milestone-line { width: 100%; height: 2px; flex: none; margin: 15px 0 0; }
  .milestone-dot-wrap { flex-direction: row; width: 100%; }
}
.milestone.is-done .milestone-dot { background: var(--gold); border-color: var(--gold); color: var(--white); }
.milestone.is-done .milestone-line { background: var(--gold); }
.milestone.is-current .milestone-dot { background: var(--walnut); border-color: var(--walnut); color: var(--white); }
.milestone-body h4 { margin: 0 0 0.2rem; font-size: 0.98rem; color: var(--walnut); }
.milestone-body p { margin: 0; font-size: 0.85rem; color: var(--ink-soft); }
.milestone-current-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--walnut);
  background: var(--gold-pale);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  margin-top: 0.3rem;
}

/* ---- Account block ---- */
.account-grid {
  display: grid;
  gap: var(--space-2);
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .account-grid { grid-template-columns: repeat(2, 1fr); }
}
.account-grid dt { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--gold); font-weight: 700; }
.account-grid dd { margin: 0.15rem 0 0; color: var(--ink); font-weight: 600; }

/* ---- Modal (payment) ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(44, 32, 19, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3);
  z-index: 300;
}
.modal-overlay[hidden] { display: none; }
.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: var(--space-4);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: hwc-fade-in 0.25s ease;
}
.modal-close {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  background: var(--cream-alt);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--walnut);
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover { background: var(--gold-pale); }
.modal h2 { font-size: 1.25rem; padding-right: var(--space-4); }
.modal-amount {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--walnut);
  font-weight: 700;
  margin-bottom: var(--space-2);
}
.card-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
}
.trust-cue {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-top: var(--space-2);
}
.trust-cue svg { flex-shrink: 0; }

/* ---- Payment states: form / processing / success ---- */
.pay-state { display: none; }
.pay-state.is-active { display: block; }
.pay-processing {
  text-align: center;
  padding: var(--space-4) 0;
}
.spinner {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 4px solid var(--gold-pale);
  border-top-color: var(--gold);
  margin: 0 auto var(--space-2);
  animation: hwc-spin 0.8s linear infinite;
}
@keyframes hwc-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .spinner { animation: hwc-spin 1.6s linear infinite; }
}
.pay-success { text-align: center; padding: var(--space-2) 0; }

/* ---- Estimate builder ---- */
.range-field { margin-bottom: var(--space-3); }
.range-field-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.4rem;
}
.range-field-head label { font-weight: 700; color: var(--walnut); }
.range-value {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--gold);
  font-size: 1.1rem;
}
input[type="range"] {
  width: 100%;
  accent-color: var(--gold);
  height: 8px;
  cursor: pointer;
}
.range-scale {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-top: 0.2rem;
}

.species-grid {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(2, 1fr);
  margin-bottom: var(--space-3);
}
@media (min-width: 640px) {
  .species-grid { grid-template-columns: repeat(3, 1fr); }
}
.species-option {
  background: var(--cream);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.6rem;
  text-align: center;
  cursor: pointer;
  font-family: var(--font-sans);
}
.species-option .species-name { display: block; font-weight: 700; color: var(--walnut); font-size: 0.88rem; }
.species-option .species-rate { display: block; font-size: 0.76rem; color: var(--ink-soft); margin-top: 0.15rem; }
.species-option:hover { border-color: var(--gold-light); }
.species-option[aria-pressed="true"] { border-color: var(--gold); background: var(--gold-pale); }

.price-panel {
  background: var(--walnut-dark);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  text-align: center;
  position: sticky;
  top: calc(var(--space-2) + 76px);
}
.price-panel .eyebrow { color: var(--gold-light); }
.price-range {
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  font-weight: 700;
  color: var(--white);
  margin: 0.3rem 0;
}
.price-panel .price-disclaimer {
  font-size: 0.82rem;
  color: var(--gold-pale);
  margin-top: var(--space-2);
}
.breakdown-table {
  width: 100%;
  margin-top: var(--space-3);
  text-align: left;
}
.breakdown-table td {
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(212, 169, 79, 0.25);
  font-size: 0.88rem;
  color: var(--gold-pale);
}
.breakdown-table td:last-child { text-align: right; font-weight: 700; color: var(--white); }
.breakdown-table tr:last-child td { border-bottom: none; }

.estimate-layout {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .estimate-layout { grid-template-columns: 1.5fr 1fr; align-items: start; }
}
