:root {
  --paper: #f2eee5;
  --paper-soft: #fffdf8;
  --paper-line: #d9d0c1;
  --ink: #1a2b25;
  --muted: #58675f;
  --evergreen: #2f6b57;
  --evergreen-deep: #214f41;
  --sage: #dce8dc;
  --terracotta: #ad4c31;
  --blue: #496b7c;
  --focus: #ad4c31;
  --dark: #223d34;
  --shadow: 0 24px 80px rgba(26, 43, 37, 0.14);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.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;
}

.skip-link {
  position: fixed;
  z-index: 40;
  top: 12px;
  left: 12px;
  transform: translateY(-160%);
  background: var(--ink);
  color: var(--paper-soft);
  padding: 10px 14px;
  border-radius: 8px;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px max(24px, calc((100% - 1180px) / 2));
  background: rgba(255, 253, 248, 0.92);
  border-bottom: 1px solid rgba(89, 75, 58, 0.16);
  backdrop-filter: blur(16px);
}

.brand,
.top-nav,
.hero-actions,
.cta-actions {
  display: flex;
  align-items: center;
}

.brand {
  min-height: 44px;
  text-decoration: none;
}

.brand img {
  display: block;
  width: clamp(132px, 15vw, 168px);
  height: auto;
}

.top-nav {
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  font-size: 15px;
}

.top-nav a {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
}

.top-nav a:hover {
  background: var(--sage);
}

.hero {
  position: relative;
  min-height: 76vh;
  display: grid;
  align-items: end;
  overflow: hidden;
  padding: 124px max(24px, calc((100% - 1180px) / 2)) 72px;
  border-bottom: 1px solid var(--paper-line);
}

.hero-image,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-image {
  background-image: url("/assets/homeasy-transaction-hero.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(18, 29, 25, 0.82) 0%, rgba(18, 29, 25, 0.58) 45%, rgba(18, 29, 25, 0.14) 100%),
    linear-gradient(0deg, rgba(18, 29, 25, 0.55) 0%, rgba(18, 29, 25, 0) 58%);
}

.hero-copy {
  position: relative;
  max-width: 850px;
  color: var(--paper-soft);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--terracotta);
  font-weight: 700;
  letter-spacing: 0;
}

.eyebrow-light {
  color: #f5c47f;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: Iowan Old Style, Baskerville, Georgia, serif;
  font-weight: 600;
  letter-spacing: 0;
}

h1 {
  max-width: 820px;
  margin-bottom: 20px;
  font-size: 68px;
  line-height: 1.05;
}

h2 {
  margin-bottom: 14px;
  font-size: 42px;
  line-height: 1.1;
}

h3 {
  margin-bottom: 8px;
  font-size: 24px;
  line-height: 1.16;
}

.hero-lead {
  max-width: 680px;
  margin-bottom: 26px;
  font-size: 22px;
  line-height: 1.45;
}

.hero-actions,
.cta-actions {
  gap: 12px;
  flex-wrap: wrap;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 12px 18px;
  font-weight: 700;
  text-decoration: none;
}

.button-primary {
  background: var(--paper-soft);
  color: var(--evergreen-deep);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
}

.button-secondary,
.button-tertiary {
  border: 1px solid currentColor;
  color: currentColor;
}

.section-pad {
  padding: 84px max(24px, calc((100% - 1180px) / 2));
}

.split-intro {
  max-width: 880px;
  margin-bottom: 30px;
}

.outcome-section,
.compare-section {
  background: var(--paper-soft);
}

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

.outcome-lines article,
.compare-grid article {
  min-height: 238px;
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--paper-line);
  border-radius: 8px;
  background: var(--paper);
}

.outcome-lines article {
  align-content: start;
  grid-template-rows: auto 1fr;
}

.compare-grid article {
  align-content: start;
  grid-template-rows: auto minmax(60px, auto) 1fr;
}

.compare-grid h3,
.compare-grid p {
  margin-bottom: 0;
}

.line-number,
.compare-grid span {
  color: var(--terracotta);
  font-weight: 700;
}

.outcome-lines p,
.compare-grid p,
.final-cta p,
.footer {
  color: var(--muted);
}

.flow-section {
  background: var(--dark);
  color: var(--paper-soft);
}

.flow-intro {
  padding-bottom: 36px;
}

.flow-intro h2,
.flow-intro p:last-child {
  max-width: 820px;
}

.flow-intro p:last-child {
  color: #d9eadf;
  font-size: 20px;
}

.flow-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.86fr) minmax(0, 1.14fr);
  gap: 34px;
  padding: 0 max(24px, calc((100% - 1180px) / 2)) 92px;
}

.flow-compact-panel {
  display: none;
}

.flow-panel {
  position: sticky;
  top: 72px;
  align-self: start;
  height: calc(100vh - 72px);
  height: calc(100svh - 72px);
  display: grid;
  align-items: start;
  align-items: safe center;
  padding-block: 20px;
}

.flow-panel-inner {
  min-height: 612px;
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 24px;
  border: 1px solid rgba(255, 253, 248, 0.22);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.08);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18);
}

.flow-counter {
  margin: 0;
  color: #d9eadf;
  font-size: 14px;
  font-weight: 700;
}

.flow-diagram {
  position: relative;
  min-height: 500px;
}

.flow-line {
  position: absolute;
  left: 22px;
  top: 24px;
  bottom: 24px;
  width: 3px;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.18);
}

.flow-line span {
  display: block;
  width: 100%;
  height: 0;
  border-radius: inherit;
  background: #f5c47f;
  transition: height 220ms ease;
}

.flow-diagram ol,
.flow-steps {
  margin: 0;
  padding: 0;
  list-style: none;
}

.flow-diagram ol {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 13px;
}

.flow-diagram li {
  min-height: 56px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  color: #d9eadf;
  transition: color 180ms ease, transform 180ms ease;
}

.flow-diagram li span,
.step-number {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 253, 248, 0.28);
  background: var(--dark);
  color: var(--paper-soft);
  font-weight: 700;
}

.flow-diagram li.is-active {
  color: var(--paper-soft);
  transform: translateX(4px);
}

.flow-diagram li.is-complete {
  color: var(--paper-soft);
}

.flow-diagram li.is-complete span {
  background: var(--evergreen);
  border-color: var(--evergreen);
}

.flow-diagram li.is-active span {
  background: #f5c47f;
  color: var(--ink);
  border-color: #f5c47f;
}

.flow-steps {
  display: grid;
  gap: 18px;
}

.flow-steps li {
  min-height: 310px;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  padding: 24px;
  border: 1px solid rgba(255, 253, 248, 0.18);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.08);
  color: #d9eadf;
  transition: transform 200ms ease;
}

.flow-steps li.is-complete {
  border-color: rgba(245, 196, 127, 0.42);
  background: rgba(255, 253, 248, 0.12);
  color: var(--paper-soft);
}

.flow-steps li.is-complete .step-number {
  background: var(--evergreen);
  border-color: var(--evergreen);
  color: var(--paper-soft);
}

.flow-steps li.is-active {
  background: var(--paper-soft);
  color: var(--ink);
  border-color: var(--paper-soft);
  transform: translateY(-2px);
}

.flow-steps li.is-active p {
  color: var(--muted);
}

.flow-steps li.is-active .step-number {
  background: var(--terracotta);
  color: var(--paper-soft);
  border-color: var(--terracotta);
}

.step-kicker {
  margin-bottom: 8px;
  color: #f5c47f;
  font-weight: 700;
}

.flow-steps li.is-active .step-kicker {
  color: var(--terracotta);
}

.compare-grid article {
  background: var(--paper-soft);
}

.trust-section {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  grid-template-areas:
    "eyebrow ."
    "title copy";
  column-gap: 36px;
  row-gap: 10px;
  align-items: start;
  background: var(--dark);
  color: var(--paper-soft);
}

.trust-section > .eyebrow {
  grid-area: eyebrow;
  margin-bottom: 0;
}

.trust-section > h2 {
  grid-area: title;
  margin-bottom: 0;
}

.trust-section > .trust-copy {
  grid-area: copy;
  margin: 0;
  color: #d9eadf;
  font-size: 20px;
}

.final-cta {
  overflow: hidden;
  background: var(--paper);
  text-align: center;
}

.final-cta h2 {
  max-width: 760px;
  margin: 0 auto 20px;
  font-size: 48px;
  line-height: 1.08;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.final-cta h2 span {
  display: block;
}

.final-cta p {
  max-width: 640px;
  margin: 0 auto 26px;
  font-size: 20px;
}

.final-cta .cta-kicker {
  margin-bottom: 10px;
  color: var(--terracotta);
  font-weight: 700;
}

.final-cta .button-primary {
  background: var(--evergreen-deep);
  color: var(--paper-soft);
}

.final-cta .button-secondary,
.final-cta .button-tertiary {
  color: var(--evergreen-deep);
}

.final-cta .cta-actions {
  justify-content: center;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 30px max(24px, calc((100% - 1180px) / 2));
  border-top: 1px solid var(--paper-line);
  background: var(--paper-soft);
}

.footer p {
  margin: 0;
}

.footer nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.footer nav a {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 980px) {
  h1 {
    font-size: 54px;
  }

  h2,
  .final-cta h2 {
    font-size: 38px;
  }

  .outcome-lines,
  .compare-grid,
  .trust-section,
  .flow-layout {
    grid-template-columns: 1fr;
  }

  .trust-section {
    grid-template-areas:
      "eyebrow"
      "title"
      "copy";
  }

  .flow-panel {
    display: none;
  }

  .flow-compact-panel {
    position: sticky;
    top: 82px;
    z-index: 10;
    display: grid;
    gap: 10px;
    margin: 0 max(24px, calc((100% - 1180px) / 2)) 22px;
    padding: 16px 18px;
    border: 1px solid rgba(255, 253, 248, 0.2);
    border-radius: 8px;
    background: rgba(34, 61, 52, 0.94);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(16px);
  }

  .flow-compact-panel p {
    margin: 0;
    color: #d9eadf;
    font-size: 14px;
    font-weight: 700;
  }

  .flow-compact-panel strong {
    font-family: Iowan Old Style, Baskerville, Georgia, serif;
    font-size: 24px;
    line-height: 1.12;
  }

  .flow-compact-track {
    overflow: hidden;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 253, 248, 0.2);
  }

  .flow-compact-track span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: #f5c47f;
    transition: width 220ms ease;
  }
}

@media (max-width: 680px) and (orientation: portrait) {
  .hero-image {
    background-image: url("/assets/homeasy-transaction-hero-phone.webp");
    background-position: center top;
  }
}

@media (min-width: 681px) and (max-width: 980px) {
  .hero-image {
    background-image: url("/assets/homeasy-transaction-hero-tablet.webp");
    background-position: center top;
  }
}

@media (min-width: 981px) and (min-aspect-ratio: 13/10) and (max-aspect-ratio: 199/100) {
  .hero-image {
    background-image: url("/assets/homeasy-transaction-hero-landscape.webp");
    background-position: center top;
  }
}

@media (min-width: 2560px) and (min-aspect-ratio: 13/10) and (max-aspect-ratio: 199/100),
  (min-width: 981px) and (min-resolution: 2dppx) and (min-aspect-ratio: 13/10) and (max-aspect-ratio: 199/100) {
  .hero-image {
    background-image: url("/assets/homeasy-transaction-hero-landscape-4k.webp");
    background-position: center top;
  }
}

@media (min-width: 981px) and (min-aspect-ratio: 2/1) {
  .hero-image {
    background-image: url("/assets/homeasy-transaction-hero-ultrawide.webp");
    background-position: center top;
  }
}

@media (max-width: 680px) {
  .site-header {
    min-height: 64px;
    align-items: center;
    flex-direction: row;
    gap: 12px;
    padding: 10px 18px;
  }

  .brand img {
    width: 122px;
  }

  .top-nav {
    flex-wrap: nowrap;
    gap: 4px;
    justify-content: flex-end;
    margin-left: auto;
  }

  .top-nav a {
    padding-right: 6px;
    padding-left: 6px;
    white-space: nowrap;
  }

  .top-nav a:nth-child(2),
  .top-nav a:nth-child(3) {
    display: none;
  }

  .hero {
    min-height: 720px;
    padding: 104px 18px 48px;
  }

  h1 {
    font-size: 42px;
    line-height: 1.08;
  }

  h2,
  .final-cta h2 {
    font-size: 32px;
  }

  .hero-lead,
  .flow-intro p:last-child,
  .trust-section > .trust-copy,
  .final-cta p {
    font-size: 18px;
  }

  .section-pad,
  .flow-intro,
  .flow-layout {
    padding-left: 18px;
    padding-right: 18px;
  }

  .flow-layout {
    padding-bottom: 58px;
  }

  .flow-compact-panel {
    top: 72px;
    margin-right: 18px;
    margin-left: 18px;
  }

  .flow-compact-panel strong {
    font-size: 21px;
  }

  .flow-steps li {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .cta-actions,
  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }
}

@media (max-width: 360px) {
  h1 {
    font-size: 36px;
  }

  h2,
  .final-cta h2 {
    font-size: 29px;
  }

  .brand img {
    width: 108px;
  }

  .top-nav {
    font-size: 14px;
  }
}

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