:root {
  --ink: #202823;
  --muted: #65706a;
  --paper: #fbfaf7;
  --surface: #ffffff;
  --line: #dce2dc;
  --sage: #4f6f5b;
  --teal: #2d6971;
  --clay: #bd5b4f;
  --gold: #d2ad45;
  --mist: #eef5f2;
  --shadow: 0 24px 70px rgba(23, 34, 28, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  min-height: 70px;
  padding: 12px clamp(18px, 4vw, 54px);
  background: rgba(251, 250, 247, 0.93);
  border-bottom: 1px solid rgba(32, 40, 35, 0.08);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--sage), var(--teal));
  border-radius: 8px;
  font-size: 13px;
  letter-spacing: 0;
}

.nav {
  display: flex;
  justify-content: center;
  gap: clamp(12px, 2vw, 28px);
  font-size: 14px;
  color: var(--muted);
}

.nav a,
.text-link {
  text-decoration: none;
}

.nav a:hover,
.text-link:hover {
  color: var(--ink);
}

.header-cta {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  color: #ffffff;
  background: var(--ink);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.hero {
  position: relative;
  min-height: 82vh;
  display: grid;
  align-items: end;
  isolation: isolate;
  overflow: hidden;
  background: #16211c;
}

.hero-media,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-media {
  background-image: url("assets/house-plan-hero.png");
  background-position: center;
  background-size: cover;
  z-index: -2;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(18, 28, 24, 0.82), rgba(18, 28, 24, 0.42) 46%, rgba(18, 28, 24, 0.08)),
    linear-gradient(0deg, rgba(18, 28, 24, 0.5), rgba(18, 28, 24, 0.05) 44%);
  z-index: -1;
}

.hero-inner {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: clamp(54px, 9vw, 110px) clamp(20px, 4vw, 54px);
  color: #ffffff;
}

.eyebrow,
.section-kicker,
.category-tag,
.result-label {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(48px, 8vw, 92px);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 660px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(18px, 2vw, 22px);
}

.hero-actions,
.final-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.hero-actions {
  margin-top: 32px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 8px;
  font: inherit;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.button.primary {
  color: #ffffff;
  background: var(--clay);
  box-shadow: 0 14px 30px rgba(189, 91, 79, 0.28);
}

.button.secondary {
  color: #ffffff;
  background: var(--teal);
}

.button.tertiary {
  color: var(--ink);
  background: var(--mist);
  border-color: var(--line);
}

.button.ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.32);
}

.button:hover,
.header-cta:hover {
  transform: translateY(-1px);
}

.micro-disclosure {
  max-width: 620px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  width: min(1180px, calc(100% - 40px));
  margin: -34px auto 0;
  position: relative;
  z-index: 4;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
  box-shadow: var(--shadow);
}

.trust-strip div {
  min-height: 112px;
  padding: 22px;
  background: var(--surface);
}

.trust-strip strong {
  display: block;
  font-size: 19px;
}

.trust-strip span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}

.section {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(58px, 8vw, 96px) 0;
}

.intro {
  max-width: 850px;
  margin-left: max(20px, calc((100% - 1180px) / 2));
}

.section h2 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1.05;
  letter-spacing: 0;
}

.section p {
  max-width: 760px;
  color: var(--muted);
  font-size: 17px;
}

.split,
.section-heading,
.checklist-section,
.final-cta {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

.section-heading,
.final-cta {
  align-items: end;
}

.section-heading {
  margin-bottom: 30px;
}

.text-link {
  justify-self: end;
  color: var(--teal);
  font-weight: 800;
}

.match-panel,
.result-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 20px 50px rgba(23, 34, 28, 0.08);
}

.match-panel {
  padding: clamp(20px, 3vw, 30px);
}

fieldset {
  display: grid;
  gap: 12px;
  margin: 0 0 22px;
  padding: 0;
  border: 0;
}

legend {
  margin-bottom: 12px;
  font-weight: 850;
}

label {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  color: #39433d;
}

input {
  accent-color: var(--teal);
}

.result-box {
  margin-top: 24px;
  padding: clamp(22px, 4vw, 36px);
  border-left: 6px solid var(--gold);
}

.result-box h3 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
}

.result-label {
  display: block;
  color: var(--sage);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.category-card {
  display: flex;
  min-height: 430px;
  flex-direction: column;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.category-card h3,
.proof-grid h3 {
  margin: 0;
  font-size: 24px;
}

.category-card p,
.proof-grid p {
  font-size: 15px;
}

.category-card ul {
  display: grid;
  gap: 9px;
  margin: 6px 0 24px;
  padding-left: 20px;
  color: var(--muted);
}

.category-card .button {
  margin-top: auto;
}

.category-tag {
  color: var(--clay);
}

.feature-card {
  background:
    linear-gradient(135deg, rgba(79, 111, 91, 0.12), rgba(45, 105, 113, 0.12)),
    var(--surface);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.blog-card {
  min-height: 240px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.blog-card h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.12;
}

.blog-card h3 a {
  text-decoration: none;
}

.blog-card h3 a:hover {
  color: var(--teal);
}

.blog-card p {
  color: var(--muted);
  font-size: 15px;
}

.prusa-post {
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.post-hero,
.post-layout {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
}

.post-hero {
  padding: clamp(42px, 7vw, 86px) 0 34px;
}

.post-hero h1 {
  max-width: 860px;
  margin: 0;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1;
  letter-spacing: 0;
}

.post-hero p {
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 21px);
}

.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: clamp(28px, 5vw, 58px);
  padding-bottom: clamp(58px, 8vw, 96px);
}

.post-main section {
  padding: 30px 0;
  border-top: 1px solid var(--line);
}

.post-main h2 {
  margin: 0 0 14px;
  font-size: clamp(25px, 3vw, 38px);
  line-height: 1.08;
}

.post-main h3 {
  margin: 22px 0 8px;
  font-size: 22px;
}

.post-main p,
.post-main li {
  color: var(--muted);
  font-size: 17px;
}

.post-main ul,
.post-main ol {
  display: grid;
  gap: 10px;
  padding-left: 24px;
}

.post-side {
  position: sticky;
  top: 96px;
  align-self: start;
  display: grid;
  gap: 16px;
}

.proof {
  width: 100%;
  max-width: none;
  padding-right: max(20px, calc((100% - 1180px) / 2));
  padding-left: max(20px, calc((100% - 1180px) / 2));
  background: #edf3ef;
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 34px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.proof-grid div {
  min-height: 230px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.76);
}

.checklist {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: check-item;
}

.checklist li {
  position: relative;
  min-height: 86px;
  padding: 18px 20px 18px 62px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  counter-increment: check-item;
}

.checklist li::before {
  position: absolute;
  top: 18px;
  left: 18px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #ffffff;
  background: var(--sage);
  border-radius: 8px;
  content: counter(check-item);
  font-size: 13px;
  font-weight: 850;
}

.checklist span {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
  font-weight: 850;
}

.final-cta {
  margin-bottom: 42px;
  padding: clamp(30px, 5vw, 46px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ink);
  color: #ffffff;
}

.final-cta p {
  color: rgba(255, 255, 255, 0.78);
}

.final-cta .button {
  justify-self: end;
  min-width: 230px;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  padding: 34px clamp(20px, 4vw, 54px);
  color: rgba(255, 255, 255, 0.78);
  background: #202823;
}

.site-footer strong {
  display: block;
  color: #ffffff;
}

.site-footer p {
  max-width: 680px;
  margin: 8px 0 0;
  font-size: 14px;
}

.guide-hero {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(56px, 8vw, 96px) 0 clamp(36px, 6vw, 70px);
}

.guide-hero h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(40px, 7vw, 78px);
  line-height: 0.98;
  letter-spacing: 0;
}

.guide-hero p {
  max-width: 780px;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 22px);
}

.guide-disclosure {
  max-width: 780px;
  margin-top: 24px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--mist);
  color: #3f4b44;
  font-size: 14px;
}

.guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: clamp(30px, 5vw, 64px);
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding-bottom: clamp(58px, 8vw, 96px);
}

.guide-article {
  min-width: 0;
}

.guide-article section {
  padding: 34px 0;
  border-top: 1px solid var(--line);
}

.guide-article h2 {
  margin: 0 0 16px;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.08;
}

.guide-article h3 {
  margin: 24px 0 8px;
  font-size: 22px;
}

.guide-article p,
.guide-article li {
  color: var(--muted);
  font-size: 17px;
}

.guide-article ul,
.guide-article ol {
  display: grid;
  gap: 10px;
  padding-left: 24px;
}

.guide-callout,
.sidebar-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.guide-callout {
  margin: 28px 0;
  padding: clamp(22px, 4vw, 32px);
  border-left: 6px solid var(--gold);
  box-shadow: 0 20px 50px rgba(23, 34, 28, 0.08);
}

.guide-callout h2,
.guide-callout h3 {
  margin-top: 0;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.quick-grid div {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.quick-grid strong {
  display: block;
  margin-bottom: 6px;
}

.quick-grid span {
  color: var(--muted);
  font-size: 14px;
}

.guide-sidebar {
  position: sticky;
  top: 96px;
  align-self: start;
  display: grid;
  gap: 16px;
}

.sidebar-card {
  padding: 22px;
}

.sidebar-card h2,
.sidebar-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

.sidebar-card p {
  color: var(--muted);
  font-size: 15px;
}

.sidebar-card .button {
  width: 100%;
  margin-top: 8px;
}

.link-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.link-list a {
  color: var(--teal);
  font-weight: 800;
  text-decoration: none;
}

.link-list a:hover {
  color: var(--ink);
}

.mini-faq {
  display: grid;
  gap: 14px;
}

.mini-faq details {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.mini-faq summary {
  cursor: pointer;
  font-weight: 850;
}

.mini-faq p {
  margin-bottom: 0;
}

@media (max-width: 920px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .nav {
    grid-column: 1 / -1;
    order: 3;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .hero {
    min-height: 78vh;
  }

  .trust-strip,
  .split,
  .section-heading,
  .checklist-section,
  .final-cta,
  .guide-layout,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .trust-strip,
  .category-grid,
  .proof-grid,
  .quick-grid,
  .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .guide-sidebar,
  .post-side {
    position: static;
  }

  .post-layout {
    grid-template-columns: 1fr;
  }

  .text-link,
  .final-cta .button {
    justify-self: start;
  }
}

@media (max-width: 640px) {
  .site-header {
    gap: 12px;
    padding: 10px 16px;
  }

  .brand span:last-child {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .header-cta {
    padding: 0 12px;
  }

  .hero-inner {
    padding: 62px 20px;
  }

  .hero-actions .button,
  .final-cta .button,
  .match-panel .button {
    width: 100%;
  }

  .trust-strip,
  .category-grid,
  .proof-grid,
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .trust-strip {
    width: calc(100% - 28px);
  }

  .section {
    width: calc(100% - 28px);
  }

  .guide-hero,
  .guide-layout,
  .post-hero,
  .post-layout {
    width: calc(100% - 28px);
  }

  .category-card {
    min-height: 0;
  }

  .quick-grid {
    grid-template-columns: 1fr;
  }
}
