:root {
  --ink: #080a0a;
  --ink-soft: #111311;
  --bone: #f1eee7;
  --muted: #9c9d9a;
  --brass: #d0a034;
  --brass-light: #efc86b;
  --line: rgba(255, 255, 255, 0.17);
  --display: "DM Serif Display", Georgia, serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--bone);
  background: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.site-shell {
  position: relative;
  width: min(100%, 1440px);
  min-height: 100vh;
  margin: 0 auto;
  overflow: hidden;
  background: #090b0b;
  isolation: isolate;
}

.site-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(circle at 84% 18%, rgba(208, 160, 52, 0.14), transparent 30%),
    linear-gradient(135deg, #070909 0%, #0c0d0c 55%, #080a0a 100%);
}

.masthead {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 4.25rem);
  padding: clamp(1.8rem, 4vw, 4.3rem) clamp(1.5rem, 5vw, 4.75rem) 0;
}

.brand,
.region {
  margin: 0;
  font-family: var(--mono);
  font-size: clamp(0.72rem, 1.2vw, 1rem);
  line-height: 1;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.brand {
  color: var(--bone);
  text-decoration: none;
  white-space: nowrap;
}

.region {
  color: #979895;
}

.region span {
  margin: 0 0.55em;
  color: var(--bone);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: min(1080px, calc(100vh - 112px));
  padding: clamp(4.8rem, 10vh, 8.7rem) clamp(1.5rem, 5vw, 4.75rem) 5rem;
}

.hero-photo {
  position: absolute;
  inset: -9rem -1rem 0 34%;
  z-index: -2;
  background: url("assets/homeowner-hero.png") center 34% / cover no-repeat;
  filter: saturate(0.82) contrast(1.08) brightness(0.72);
}

.scroll-cue {
  display: none;
}

.mobile-story {
  display: none;
}

.hero-shade {
  position: absolute;
  inset: -9rem 0 0;
  z-index: -1;
  background:
    linear-gradient(90deg, #080a0a 0%, rgba(8, 10, 10, 0.98) 30%, rgba(8, 10, 10, 0.67) 55%, rgba(8, 10, 10, 0.14) 82%),
    linear-gradient(0deg, #080a0a 0%, transparent 33%),
    linear-gradient(180deg, rgba(8, 10, 10, 0.5) 0%, transparent 26%);
}

.plumb {
  position: absolute;
  top: 9rem;
  bottom: 3.4rem;
  left: clamp(1.5rem, 5vw, 4.75rem);
  width: 1rem;
}

.plumb-line {
  position: absolute;
  top: 0;
  bottom: 2.7rem;
  left: 0.35rem;
  width: 1px;
  background: linear-gradient(var(--brass), rgba(208, 160, 52, 0.35), var(--brass));
  transform-origin: top;
  animation: lower-line 1.15s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

.plumb-bob {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0.72rem;
  height: 2.65rem;
  clip-path: polygon(50% 0, 100% 18%, 72% 75%, 50% 100%, 28% 75%, 0 18%);
  background: linear-gradient(90deg, #8c6420, var(--brass-light), #8c6420);
  transform-origin: 50% -25rem;
  animation: settle 2.2s 0.85s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.hero-copy {
  width: min(100%, 750px);
  margin-left: clamp(3rem, 5.5vw, 6rem);
  animation: rise 0.8s 0.12s ease-out both;
}

.eyebrow,
.promise {
  font-family: var(--mono);
  text-transform: uppercase;
  color: var(--brass);
  letter-spacing: 0.3em;
}

.eyebrow {
  margin: 0 0 2.5rem;
  font-size: 0.83rem;
}

h1 {
  max-width: 11ch;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(3.45rem, 7vw, 7.6rem);
  font-weight: 400;
  line-height: 0.96;
  letter-spacing: -0.025em;
  text-wrap: balance;
  text-shadow: 0 4px 35px rgba(0, 0, 0, 0.58);
}

.subhead {
  margin: 2rem 0 3.2rem;
  font-size: clamp(1.2rem, 2.2vw, 1.75rem);
  line-height: 1.5;
  color: #deded9;
}

.promise {
  width: min(100%, 620px);
  margin: 0 0 4.3rem;
  padding: 1.65rem 0 0;
  border-top: 1px solid var(--line);
  font-size: clamp(0.72rem, 1.3vw, 0.94rem);
}

.access-form {
  width: min(100%, 840px);
}

.website-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.access-button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.form-intro {
  display: none;
}

.roles {
  display: flex;
  gap: clamp(1.25rem, 4vw, 4rem);
  margin: 0 0 1.25rem;
  padding: 0;
  border: 0;
}

.role {
  padding: 0 0 0.75rem;
  border: 0;
  border-bottom: 2px solid transparent;
  color: #777a78;
  background: transparent;
  font-family: var(--mono);
  font-size: clamp(0.68rem, 1.15vw, 0.83rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease;
}

.role:hover,
.role.is-active {
  color: var(--bone);
}

.role.is-active {
  border-bottom-color: var(--brass);
}

.email-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 5rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(7, 8, 8, 0.73);
  backdrop-filter: blur(8px);
}

.email-row:focus-within {
  border-color: var(--brass);
  box-shadow: 0 0 0 1px rgba(208, 160, 52, 0.2);
}

.email-row input {
  min-width: 0;
  padding: 1rem 1.75rem;
  border: 0;
  outline: 0;
  color: var(--bone);
  background: transparent;
  font-size: 1.05rem;
}

.email-row input::placeholder {
  color: #747674;
}

.access-button {
  min-width: 250px;
  padding: 0 2rem;
  border: 1px solid var(--brass);
  margin: -1px;
  color: var(--brass-light);
  background: rgba(10, 10, 9, 0.76);
  font-family: var(--mono);
  font-size: 0.83rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease;
}

.access-button:hover {
  color: #111;
  background: var(--brass);
}

.privacy-note,
.form-message {
  margin: 1.5rem 0 0;
  color: #aaa9a4;
  font-size: 0.9rem;
  line-height: 1.55;
  letter-spacing: 0.03em;
}

.form-message {
  min-height: 1.5em;
  color: var(--brass-light);
}

.form-message.is-error {
  color: #f29a7c;
}

footer {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 clamp(1.5rem, 5vw, 4.75rem);
  padding: 1.75rem 0 2.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #737573;
  font-family: var(--mono);
  font-size: 0.73rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

footer p {
  margin: 0;
}

footer a {
  color: inherit;
  text-decoration: none;
}

footer a:hover {
  color: var(--brass-light);
}

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

:focus-visible {
  outline: 2px solid var(--brass-light);
  outline-offset: 4px;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes lower-line {
  from { opacity: 0; transform: scaleY(0); }
  to { opacity: 1; transform: scaleY(1); }
}

@keyframes settle {
  0% { opacity: 0; transform: rotate(0deg); }
  20% { opacity: 1; transform: rotate(3deg); }
  50% { transform: rotate(-1.8deg); }
  75% { transform: rotate(0.8deg); }
  100% { opacity: 1; transform: rotate(0); }
}

@media (max-width: 800px) {
  .site-shell {
    width: 100%;
    overflow: clip;
  }

  .masthead {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 5;
    width: 100%;
    min-height: 4.75rem;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 0;
    background: linear-gradient(180deg, rgba(8, 10, 10, 0.78), transparent);
  }

  .brand {
    font-size: 0.72rem;
    letter-spacing: 0.27em;
  }

  .region {
    max-width: none;
    font-size: 0.56rem;
    line-height: 1.4;
    letter-spacing: 0.16em;
    text-align: right;
  }

  .region span {
    margin: 0 0.2em;
  }

  .hero {
    display: block;
    min-height: 0;
    padding: 0;
  }

  .hero > .hero-photo,
  .hero > .hero-shade {
    display: none;
  }

  .mobile-story {
    position: relative;
    display: block;
    height: 285svh;
    background: #080a0a;
  }

  .mobile-story-pin {
    position: sticky;
    top: 0;
    width: 100%;
    height: 100svh;
    overflow: hidden;
    background: #080a0a;
  }

  .mobile-story-photo {
    position: absolute;
    inset: -2%;
    z-index: 0;
    background: url("assets/homeowner-hero.png") center 12% / cover no-repeat;
    background-position: center 12%;
    filter: saturate(0.88) contrast(1.04) brightness(0.82);
    transform: scale(1.02);
    transform-origin: 52% 38%;
    will-change: transform, filter;
  }

  .mobile-story-shade {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
      linear-gradient(180deg, rgba(8, 10, 10, 0.36) 0%, rgba(8, 10, 10, 0.03) 25%, rgba(8, 10, 10, 0.12) 52%, rgba(8, 10, 10, 0.9) 100%),
      linear-gradient(90deg, rgba(8, 10, 10, 0.28), transparent 72%);
    opacity: 0.62;
    will-change: opacity;
  }

  .mobile-story-words {
    position: absolute;
    right: 1.4rem;
    bottom: max(6.7rem, calc(env(safe-area-inset-bottom) + 5.5rem));
    left: 1.4rem;
    z-index: 2;
    font-family: var(--display);
    text-shadow: 0 3px 24px rgba(0, 0, 0, 0.9);
  }

  .story-line {
    margin: 0;
    color: var(--bone);
    font-size: clamp(2.35rem, 11vw, 3.35rem);
    line-height: 0.98;
    letter-spacing: -0.02em;
    opacity: 0;
    transform: translateY(1.3rem);
    transition: opacity 520ms ease, transform 620ms cubic-bezier(0.2, 0.8, 0.2, 1);
  }

  .story-line + .story-line {
    margin-top: 0.18em;
  }

  .story-line-three {
    color: var(--brass-light);
  }

  .mobile-story[data-step="1"] .story-line-one,
  .mobile-story[data-step="2"] .story-line-one,
  .mobile-story[data-step="2"] .story-line-two,
  .mobile-story[data-step="3"] .story-line-one,
  .mobile-story[data-step="3"] .story-line-two,
  .mobile-story[data-step="3"] .story-line-three {
    opacity: 1;
    transform: translateY(0);
  }

  .scroll-cue {
    position: absolute;
    right: 0;
    bottom: max(2rem, env(safe-area-inset-bottom));
    left: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    margin: 0;
    color: rgba(241, 238, 231, 0.8);
    font-family: var(--mono);
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9);
    animation: cue-pulse 2.4s ease-in-out infinite;
    transition: opacity 300ms ease;
  }

  .scroll-cue span {
    color: var(--brass-light);
    font-size: 0.9rem;
  }

  .mobile-story:not([data-step="0"]) .scroll-cue {
    opacity: 0;
    animation: none;
  }

  .plumb {
    display: none;
  }

  .hero-copy {
    position: relative;
    z-index: 2;
    width: 100%;
    margin: 0;
    padding: 3.5rem 1.5rem 4.5rem;
    border-top: 1px solid var(--brass);
    background: #080a0a;
    box-shadow: 0 -3rem 5rem rgba(0, 0, 0, 0.62);
  }

  .hero-copy > .eyebrow,
  .hero-copy > h1 {
    display: none;
  }

  .eyebrow {
    margin-bottom: 1.5rem;
    font-size: 0.7rem;
    letter-spacing: 0.28em;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.88);
  }

  h1 {
    max-width: 11.5ch;
    font-size: clamp(2.5rem, 10.3vw, 3.3rem);
    line-height: 1.055;
    letter-spacing: -0.015em;
    text-wrap: pretty;
    text-shadow: none;
  }

  h1 span {
    display: block;
  }

  h1 span + span {
    margin-top: 0.18em;
    color: #ded8cc;
  }

  .subhead {
    margin: 0 0 2.75rem;
    max-width: 28ch;
    font-family: var(--display);
    font-size: clamp(2rem, 8.8vw, 2.8rem);
    line-height: 1.08;
    color: var(--bone);
    text-shadow: none;
  }

  .promise {
    width: 100%;
    margin-bottom: 3.5rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.71rem;
    line-height: 1.7;
    letter-spacing: 0.2em;
  }

  .access-form {
    width: 100%;
  }

  .form-intro {
    display: block;
    margin-bottom: 1.5rem;
  }

  .form-intro p {
    margin: 0 0 0.65rem;
    color: var(--brass);
    font-family: var(--mono);
    font-size: 0.62rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
  }

  .form-intro h2 {
    margin: 0;
    font-family: var(--sans);
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.45;
    color: var(--bone);
  }

  .roles {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.75rem;
  }

  .role {
    min-height: 3.8rem;
    padding: 0.8rem 0.65rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-bottom-width: 1px;
    font-size: 0.62rem;
    line-height: 1.45;
    letter-spacing: 0.12em;
  }

  .role:last-child {
    grid-column: 1 / -1;
  }

  .role.is-active {
    border-color: var(--brass);
    background: rgba(208, 160, 52, 0.08);
  }

  .email-row {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 0.85rem;
    border: 0;
    background: transparent;
    backdrop-filter: none;
  }

  .email-row:focus-within {
    border-color: transparent;
    box-shadow: none;
  }

  .email-row input {
    min-height: 4.25rem;
    padding: 1rem 1.15rem;
    border: 1px solid rgba(255, 255, 255, 0.27);
    background: rgba(7, 8, 8, 0.83);
    font-size: 1rem;
  }

  .email-row input:focus {
    border-color: var(--brass);
  }

  .access-button {
    min-width: 0;
    min-height: 4.25rem;
    margin: 0;
    padding: 0.9rem 1.15rem;
    background: var(--brass);
    color: #11110f;
    font-size: 0.74rem;
  }

  .privacy-note,
  .form-message {
    margin-top: 1.65rem;
    font-size: 0.82rem;
    line-height: 1.7;
  }

  footer {
    flex-direction: column;
    margin: 0 1.5rem;
    padding: 2.25rem 0 2.75rem;
    font-size: 0.62rem;
    line-height: 1.7;
  }
}

@keyframes cue-pulse {
  0%, 100% { opacity: 0.55; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(0.25rem); }
}

@supports not (position: sticky) {
  @media (max-width: 800px) {
    .mobile-story {
      height: 100svh;
    }

    .mobile-story-pin {
      position: relative;
    }

    .mobile-story .story-line {
      opacity: 1;
      transform: none;
    }
  }
}

@media (max-width: 420px) {
  .region {
    display: none;
  }

  .hero {
    padding: 0;
  }

  .mobile-story-photo {
    background-position: 53% 18%;
  }

  h1 {
    font-size: clamp(2.45rem, 11.5vw, 3rem);
  }
}

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

  .mobile-story {
    height: 100svh;
  }

  .mobile-story .story-line {
    opacity: 1;
    transform: none;
  }

  .scroll-cue {
    display: none;
  }
}
