:root {
  color-scheme: light dark;
  --page: #f0eee9;
  --surface: #e7e1d6;
  --surface-strong: #d8cfbf;
  --ink: #201c16;
  --muted: #5f594f;
  --line: rgba(43, 36, 27, .19);
  --accent: #8a5a3b;
  --accent-bright: #a66b43;
  --brass: #8a6b3f;
  --dark: #0e0c09;
  --dark-soft: #17140f;
  --dark-ink: #ede6d6;
  --dark-muted: #bcb3a2;
  --dark-line: rgba(237, 230, 214, .18);
  --card-shadow: 0 18px 44px rgba(34, 27, 18, .1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #0e0c09;
    --surface: #17140f;
    --surface-strong: #211c15;
    --ink: #ede6d6;
    --muted: #bcb3a2;
    --line: rgba(237, 230, 214, .17);
    --accent: #b36f47;
    --accent-bright: #cb8052;
    --brass: #b08d57;
    --card-shadow: 0 22px 54px rgba(0, 0, 0, .22);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
a:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 5px;
}
.shell {
  width: min(1280px, calc(100% - 64px));
  margin: 0 auto;
}
.hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  color: var(--dark-ink);
  background: var(--dark);
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(112deg, #0e0c09 0 58%, #17130d 58% 100%);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='190' height='190' viewBox='0 0 190 190'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.84' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.9'/%3E%3C/svg%3E");
  pointer-events: none;
}
.utility-nav {
  display: flex;
  justify-content: flex-end;
  gap: 34px;
  padding-top: 28px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .04em;
}
.utility-nav a {
  color: var(--dark-muted);
  text-decoration: none;
  transition: color .2s ease;
}
.utility-nav a:hover { color: var(--dark-ink); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(330px, .7fr);
  gap: clamp(48px, 7vw, 104px);
  align-items: center;
  min-height: calc(100svh - 68px);
  padding: clamp(64px, 10vh, 120px) 0 clamp(74px, 12vh, 132px);
}
.eyebrow {
  margin: 0 0 30px;
  color: #c4a26b;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .17em;
  text-transform: uppercase;
}
h1, h2, h3, p { margin-top: 0; }
h1 {
  max-width: 900px;
  margin-bottom: 30px;
  font-family: "Fraunces", serif;
  font-size: clamp(4rem, 8.7vw, 8rem);
  font-variation-settings: "opsz" 96, "SOFT" 25, "WONK" 0;
  line-height: .92;
  letter-spacing: -.055em;
  font-weight: 500;
  text-wrap: balance;
  animation: title-in .9s cubic-bezier(.2,.75,.2,1) both;
}
h1 em {
  color: #c8a873;
  font-style: italic;
  font-variation-settings: "opsz" 96, "SOFT" 50, "WONK" 1;
}
.hero-copy {
  max-width: 640px;
  margin-bottom: 38px;
  color: var(--dark-muted);
  font-size: clamp(1.05rem, 1.35vw, 1.22rem);
  line-height: 1.7;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 54px;
  padding: 14px 22px;
  border: 1px solid #a9854e;
  background: #a9854e;
  color: #0e0c09;
  text-decoration: none;
  font-size: .9rem;
  font-weight: 600;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.button:hover {
  transform: translateY(-2px);
  background: #c4a26b;
  border-color: #c4a26b;
}
.button:active { transform: translateY(0); }
.text-link {
  color: var(--dark-ink);
  text-decoration-color: #706653;
  text-underline-offset: 7px;
  font-weight: 600;
}
.text-link:hover { text-decoration-color: #c4a26b; }
.arrow { font-size: 1.12em; line-height: 1; }
.field-mark {
  width: min(100%, 470px);
  justify-self: end;
  animation: mark-in 1s .12s cubic-bezier(.2,.75,.2,1) both;
}
.field-mark img {
  display: block;
  width: 100%;
  height: auto;
}
.section { padding: clamp(88px, 11vw, 150px) 0; }
.section-heading {
  display: grid;
  grid-template-columns: .46fr 1.54fr;
  gap: clamp(32px, 6vw, 88px);
  align-items: start;
  margin-bottom: clamp(48px, 7vw, 82px);
}
.section-label {
  margin: 9px 0 0;
  color: var(--accent);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
}
h2 {
  max-width: 900px;
  margin-bottom: 0;
  font-family: "Fraunces", serif;
  font-size: clamp(2.8rem, 5.4vw, 5.2rem);
  font-variation-settings: "opsz" 72, "SOFT" 25, "WONK" 0;
  line-height: .98;
  letter-spacing: -.045em;
  font-weight: 500;
  text-wrap: balance;
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}
.service {
  position: relative;
  min-height: 290px;
  padding: clamp(26px, 3vw, 40px);
  border: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.service:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow);
  border-color: color-mix(in srgb, var(--brass) 58%, transparent);
}
.service:nth-child(1) { grid-column: span 7; min-height: 380px; border-radius: 2px 58px 2px 2px; }
.service:nth-child(2) { grid-column: span 5; background: var(--surface-strong); }
.service:nth-child(3) { grid-column: span 4; }
.service:nth-child(4) { grid-column: span 8; border-radius: 2px 2px 52px 2px; }
.service:nth-child(5) { grid-column: span 5; background: var(--surface-strong); }
.service:nth-child(6) { grid-column: span 7; }
.service:nth-child(7) { grid-column: span 12; min-height: 260px; background: var(--surface-strong); }
.service-number {
  display: block;
  margin-bottom: clamp(50px, 8vw, 104px);
  color: var(--brass);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .12em;
}
.service:nth-child(1) .service-number { margin-bottom: clamp(74px, 11vw, 138px); }
h3 {
  max-width: 480px;
  margin-bottom: 16px;
  font-family: "Fraunces", serif;
  font-size: clamp(1.7rem, 2.4vw, 2.55rem);
  font-variation-settings: "opsz" 48, "SOFT" 25, "WONK" 0;
  line-height: 1.08;
  letter-spacing: -.028em;
  font-weight: 500;
}
.service p {
  max-width: 590px;
  margin-bottom: 0;
  color: var(--muted);
}
.contact {
  position: relative;
  overflow: hidden;
  background: var(--dark-soft);
  color: var(--dark-ink);
  border-top: 1px solid var(--dark-line);
}
.contact::before {
  content: "";
  position: absolute;
  width: 42vw;
  height: 42vw;
  min-width: 460px;
  min-height: 460px;
  right: -17vw;
  top: -22vw;
  border: 1px solid rgba(176, 141, 87, .24);
  border-radius: 50%;
  box-shadow: 0 0 0 80px rgba(176, 141, 87, .035), 0 0 0 160px rgba(176, 141, 87, .025);
  pointer-events: none;
}
.contact-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.18fr .82fr;
  gap: clamp(48px, 8vw, 120px);
  align-items: end;
  padding: clamp(92px, 13vw, 170px) 0;
}
.contact h2 {
  max-width: 730px;
  color: var(--dark-ink);
}
.contact h2 em {
  color: #c4a26b;
  font-style: italic;
  font-variation-settings: "opsz" 72, "SOFT" 50, "WONK" 1;
}
.contact p {
  max-width: 560px;
  margin: 26px 0 0;
  color: var(--dark-muted);
  font-size: 1.08rem;
}
.email-button {
  display: flex;
  width: 100%;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 21px;
  border: 1px solid #8f7248;
  background: transparent;
  color: var(--dark-ink);
  text-decoration: none;
  font-weight: 600;
  overflow-wrap: anywhere;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
.email-button:hover {
  transform: translateY(-2px);
  background: #b08d57;
  color: #0e0c09;
}
footer {
  padding: 28px 0;
  background: var(--dark);
  color: var(--dark-muted);
  border-top: 1px solid var(--dark-line);
  font-size: .76rem;
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 28px;
}
footer p { margin: 0; }

[hidden] { display: none !important; }
.service-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--brass);
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  transition: color .2s ease;
}
.service-link:hover { color: var(--accent-bright); }

/* AI Integration page */
.ai-hero { min-height: 0; }
.ai-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding-top: 28px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .04em;
}
.ai-topbar a {
  color: var(--dark-muted);
  text-decoration: none;
  transition: color .2s ease;
}
.ai-topbar a:hover { color: var(--dark-ink); }
.ai-hero-inner {
  max-width: 880px;
  padding: clamp(70px, 10vh, 110px) 0 clamp(82px, 11vh, 124px);
}
.ai-hero h1 { font-size: clamp(3.2rem, 6.8vw, 5.8rem); }
.ai-rows { border-top: 1px solid var(--line); }
.ai-row {
  display: grid;
  grid-template-columns: 90px minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(20px, 4vw, 56px);
  align-items: start;
  padding: 36px 0;
  border-bottom: 1px solid var(--line);
}
.ai-row .service-number { margin-bottom: 0; padding-top: 12px; }
.ai-row h3 { margin-bottom: 0; }
.ai-row p { max-width: 560px; margin-bottom: 0; color: var(--muted); }
.ai-start { margin-top: clamp(52px, 6vw, 76px); }
.ai-start h3 { margin-bottom: 26px; }
.ai-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 44px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ai-list li { position: relative; padding-left: 22px; color: var(--muted); }
.ai-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .6em;
  width: 8px;
  height: 8px;
  background: var(--brass);
}
.band { background: var(--surface); }
.ai-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.ai-step {
  padding: 30px 26px;
  border: 1px solid var(--line);
  background: var(--page);
}
.ai-step .step-num {
  display: block;
  margin-bottom: 44px;
  font-family: "Fraunces", serif;
  font-size: 2rem;
  line-height: 1;
  color: var(--brass);
}
.ai-step h3 { font-size: 1.45rem; margin-bottom: 12px; }
.ai-step p { margin-bottom: 0; color: var(--muted); font-size: .96rem; }
.ai-principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 56px);
}
.ai-principle { border-top: 2px solid var(--brass); padding-top: 22px; }
.ai-principle h3 { font-size: 1.5rem; margin-bottom: 12px; }
.ai-principle p { margin-bottom: 0; color: var(--muted); }

/* Service areas: Coeur d'Alene, Sandpoint, Spokane */
.area-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 0;
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid var(--dark-line);
  color: var(--dark-muted);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .05em;
}
.area-strip span { display: inline-flex; align-items: center; }
.area-strip span + span::before {
  content: "";
  width: 5px;
  height: 5px;
  margin: 0 16px;
  background: #b08d57;
  border-radius: 50%;
}
.area-strip a { color: var(--dark-ink); text-decoration: none; border-bottom: 1px solid #706653; padding-bottom: 2px; }
.area-strip a:hover { border-bottom-color: #c4a26b; }
.ai-areas {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.free-audit-note {
  margin: 26px 0 0;
  color: var(--dark-ink);
  font-size: 1rem;
}
.free-audit-note strong { color: #c4a26b; }
.ai-area {
  display: flex;
  flex-direction: column;
  padding: clamp(26px, 3vw, 38px);
  border: 1px solid var(--line);
  background: var(--surface);
}
.ai-area:nth-child(2), .ai-area:nth-child(3) { background: var(--surface-strong); }
.ai-area:last-child { grid-column: auto; }
.ai-area .area-county {
  margin-bottom: 46px;
  color: var(--brass);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.ai-area h3 { font-size: clamp(1.65rem, 2.2vw, 2.2rem); }
.ai-area p { margin-bottom: 0; color: var(--muted); font-size: .98rem; }
.ai-area-intro {
  max-width: 760px;
  margin: calc(clamp(48px, 7vw, 82px) * -1 + 18px) 0 44px;
  color: var(--muted);
  font-size: 1.05rem;
}
.ai-faqs { border-top: 1px solid var(--line); }
.ai-faq {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(20px, 4vw, 56px);
  padding: 34px 0;
  border-bottom: 1px solid var(--line);
}
.ai-faq h3 { font-size: 1.5rem; margin-bottom: 0; }
.ai-faq p { max-width: 620px; margin-bottom: 0; color: var(--muted); }
.footer-area { flex-basis: 100%; color: var(--dark-muted); }

@media (max-width: 900px) {
  .ai-steps { grid-template-columns: 1fr 1fr; }
  .ai-principles { grid-template-columns: 1fr; }
  .ai-areas { grid-template-columns: 1fr; }
  .ai-area:last-child { grid-column: auto; }
  .ai-area .area-county { margin-bottom: 28px; }
  .ai-faq { grid-template-columns: 1fr; gap: 12px; }
  .ai-row { grid-template-columns: 56px minmax(0, 1fr); }
  .ai-row p { grid-column: 2; }
}
@media (max-width: 600px) {
  .ai-topbar { padding-top: 20px; }
  .ai-hero h1 { font-size: clamp(2.9rem, 13.5vw, 4.4rem); }
  .ai-row { grid-template-columns: 1fr; gap: 10px; padding: 28px 0; }
  .ai-row .service-number { padding-top: 0; }
  .ai-row p { grid-column: auto; }
  .ai-list { grid-template-columns: 1fr; }
  .ai-steps { grid-template-columns: 1fr; }
}

@keyframes title-in {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes mark-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) {
  .hero { min-height: auto; }
  .hero-grid {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 78px;
    padding: 86px 0 108px;
  }
  .field-mark { width: min(72vw, 430px); justify-self: center; }
  .section-heading { grid-template-columns: 1fr; gap: 18px; }
  .section-label { margin-top: 0; }
  .service:nth-child(n) { grid-column: span 6; min-height: 300px; }
  .service:nth-child(1) { min-height: 340px; }
  .service:nth-child(7) { grid-column: span 12; }
  .contact-grid { grid-template-columns: 1fr; align-items: start; }
  .email-button { max-width: 560px; }
}

@media (max-width: 600px) {
  .shell { width: min(100% - 32px, 1280px); }
  .utility-nav { padding-top: 20px; gap: 24px; }
  h1 { font-size: clamp(3.55rem, 17vw, 5.4rem); }
  .hero-grid { padding: 62px 0 90px; gap: 62px; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .button { width: 100%; }
  .text-link { padding: 8px 0; }
  .field-mark { width: calc(100vw - 64px); }
  .section { padding: 78px 0; }
  .services-grid { grid-template-columns: 1fr; gap: 12px; }
  .service:nth-child(n) { grid-column: 1; min-height: 0; padding: 28px; border-radius: 0; }
  .service:nth-child(1) { border-radius: 0 38px 0 0; }
  .service:nth-child(4) { border-radius: 0 0 32px 0; }
  .service-number,
  .service:nth-child(1) .service-number { margin-bottom: 54px; }
  .contact::before { right: -340px; top: -260px; }
  .footer-row { display: grid; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition: none !important;
  }
}
