/* Halden & Rowe */

:root {
  --paper: #141413;
  --ink: #EDEAE4;
  --accent: #B8A27A;
  --on-accent: #141413;
  --surface: #1E1D1B;
  --muted: #A39E95;
  --line: rgba(237, 234, 228, 0.14);

  /* Light (stone) section: darker tones so text clears 4.5:1 on #EDEAE4 */
  --stone: #EDEAE4;
  --stone-ink: #141413;
  --stone-accent: #765F3C;   /* 5.0:1 */
  --stone-muted: #57534C;    /* 6.4:1 */
  --stone-line: rgba(20, 20, 19, 0.16);

  --serif: 'Marcellus', Georgia, 'Times New Roman', serif;
  --sans: 'Jost', 'Helvetica Neue', Arial, sans-serif;

  --gutter: 48px;
  --section-y: 140px;
  --nav-h: 88px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, p, ol, ul, figure, address { margin: 0; padding: 0; }
ol, ul { list-style: none; }
img { display: block; max-width: 100%; height: auto; }
address { font-style: normal; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body.menu-open { overflow: hidden; }

::selection { background: var(--accent); color: var(--on-accent); }

:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 200;
  background: var(--ink); color: var(--paper);
  padding: 12px 18px; font-size: 14px;
}
.skip-link:focus { top: 16px; }

.container {
  width: 100%;
  max-width: calc(1320px + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); }

/* Type */
.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 5.6vw, 92px);
  line-height: 1.04;
  letter-spacing: 0.005em;
  text-wrap: balance;
}

.label {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--accent);
}

.section-label { margin-bottom: 72px; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 16px 30px;
  border: 1px solid var(--accent);
  border-radius: 2px;
  background: transparent;
  color: var(--accent);
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
}
.btn:hover { background: var(--accent); color: var(--on-accent); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--ink);
  padding-block: 10px;
}
.text-link::before {
  content: "";
  width: 32px;
  height: 1px;
  background: var(--accent);
  transition: width 0.4s var(--ease);
}
.text-link:hover::before,
.text-link:focus-visible::before { width: 48px; }

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 40px;
}

/* Navbar */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-h);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 0.5s ease, border-color 0.5s ease;
}
.nav.is-scrolled,
body.menu-open .nav {
  background: var(--paper);
  border-bottom-color: var(--line);
}
.nav__inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 48px;
}
.logo {
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: 0.24em;
  line-height: 1;
  white-space: nowrap;
  color: var(--ink);
}
.nav__links {
  margin-left: auto;
  display: flex;
  gap: 40px;
}
.nav__links a {
  font-weight: 400;
  font-size: 15px;
  letter-spacing: 0.06em;
  color: var(--ink);
  opacity: 0.86;
  padding-block: 8px;
  transition: opacity 0.3s ease, color 0.3s ease;
}
.nav__links a:hover { opacity: 1; color: var(--accent); }
.nav__cta { padding: 13px 24px; }

.nav__menu-btn {
  display: none;
  margin-left: auto;
  background: none;
  border: 0;
  padding: 12px 0 12px 16px;
  font-weight: 500;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--ink);
  cursor: pointer;
}

/* Full screen mobile menu */
.menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--paper);
  padding-top: calc(var(--nav-h) + 48px);
  overflow-y: auto;
}
.menu__inner { display: flex; flex-direction: column; gap: 8px; }
.menu__inner a {
  font-family: var(--serif);
  font-size: 44px;
  line-height: 1.25;
  padding-block: 6px;
  border-bottom: 1px solid var(--line);
}
.menu__inner a:last-child { color: var(--accent); border-bottom: 0; }
.menu:not([hidden]) { animation: menuIn 0.45s var(--ease); }
@keyframes menuIn { from { opacity: 0; } to { opacity: 1; } }

/* Hero */
.hero {
  position: relative;
  min-height: clamp(620px, 88vh, 940px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 45%;
  transform-origin: 70% 40%;
}
.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top right,
    rgba(20, 20, 19, 0.9) 0%,
    rgba(20, 20, 19, 0.74) 50%,
    rgba(20, 20, 19, 0.3) 75%,
    rgba(20, 20, 19, 0) 100%);
}
.hero__content { padding-top: calc(var(--nav-h) + 40px); padding-bottom: 104px; }
.hero__text { max-width: 760px; }
.hero__text .label { margin-bottom: 28px; color: var(--ink); }
.hero__text .display { margin-bottom: 28px; max-width: 7.6em; }
.hero__lede { max-width: 30em; margin-bottom: 44px; color: var(--ink); }

/* Intro */
.intro { padding-block: 200px; border-bottom: 1px solid var(--line); }
.intro__text {
  max-width: 1040px;
  margin-inline: auto;
  text-align: center;
  font-family: var(--serif);
  font-size: 34px;
  line-height: 1.45;
  letter-spacing: 0.005em;
}

/* Developments */
.dev {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 32px;
  align-items: center;
}
.dev + .dev { margin-top: 140px; }
.dev__media {
  grid-column: 1 / span 7;
  aspect-ratio: 5 / 4;
  overflow: hidden;
  background: var(--surface);
}
.dev__media img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.82); }
.dev__body { grid-column: 9 / span 4; }
.dev--reverse .dev__media { grid-column: 6 / span 7; order: 2; }
.dev--reverse .dev__body { grid-column: 1 / span 4; order: 1; }

.dev__body .label { margin-bottom: 24px; }
.dev__name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(36px, 3.6vw, 56px);
  line-height: 1.06;
  margin-bottom: 10px;
}
.dev__loc { color: var(--muted); margin-bottom: 28px; }
.dev__desc { margin-bottom: 32px; }
.dev__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  padding-block: 18px;
  margin-bottom: 28px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-weight: 400;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.dev__facts span:not(:last-child)::after {
  content: "·";
  margin-inline: 12px;
  color: var(--accent);
}

/* Numbers */
.numbers { padding-block: 0 var(--section-y); }
.numbers__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 48px;
}
.figure { border-top: 1px solid var(--accent); padding-top: 36px; }
.figure__num {
  font-family: var(--serif);
  font-size: 56px;
  line-height: 1;
  margin-bottom: 16px;
  font-variant-numeric: tabular-nums;
}
.figure__cap { color: var(--muted); font-size: 16px; max-width: 18em; }

/* Approach (stone) */
.approach { background: var(--stone); color: var(--stone-ink); }
.approach .label { color: var(--stone-accent); }
.approach__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 32px;
  align-items: center;
}
.approach__media {
  grid-column: 1 / span 5;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}
.approach__media img { width: 100%; height: 100%; object-fit: cover; }
.approach__body { grid-column: 7 / span 6; }
.approach__body .label { margin-bottom: 24px; }
.approach__body .display { margin-bottom: 64px; }
.principle {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 8px;
  padding-block: 32px;
  border-top: 1px solid var(--stone-line);
}
.principle:last-child { border-bottom: 1px solid var(--stone-line); }
.principle__num {
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1.2;
  color: var(--stone-accent);
}
.principle__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 28px;
  line-height: 1.2;
  margin-bottom: 10px;
}
.principle p { color: var(--stone-muted); }

/* Completed */
.completed { position: relative; }
.schemes { border-bottom: 1px solid var(--line); }
.scheme {
  display: grid;
  grid-template-columns: 2.2fr 1.4fr 0.8fr 0.8fr;
  align-items: baseline;
  gap: 24px;
  padding-block: 34px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  transition: color 0.4s ease;
}
.scheme__name {
  font-family: var(--serif);
  font-size: clamp(28px, 2.8vw, 42px);
  line-height: 1.1;
  color: var(--ink);
  transition: transform 0.6s var(--ease);
}
.scheme__year, .scheme__homes { text-align: right; font-variant-numeric: tabular-nums; }

.cursor-img {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 50;
  width: 240px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translate3d(-200px, -200px, 0);
  transition: opacity 0.35s ease, visibility 0.35s;
  will-change: transform;
}
.cursor-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.12);
  transition: transform 0.7s var(--ease);
}
.cursor-img.is-visible { opacity: 1; visibility: visible; }
.cursor-img.is-visible img { transform: scale(1); }

@media (hover: hover) and (pointer: fine) and (min-width: 768px) {
  .schemes .scheme:hover { color: var(--ink); }
  .scheme:hover .scheme__name { transform: translateX(12px); }
}
@media not all and (hover: hover) and (pointer: fine) {
  .cursor-img { display: none; }
}

/* Register */
.register { background: var(--surface); }
.register__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 32px;
  align-items: start;
}
.register__intro { grid-column: 1 / span 5; }
.register__intro .label { margin-bottom: 24px; }
.register__intro .display { margin-bottom: 32px; }
.register__lede { color: var(--muted); max-width: 26em; }
.register__form-wrap { grid-column: 7 / span 6; padding-top: 12px; }

.form { display: grid; gap: 36px; }
.field { display: grid; gap: 6px; }
.field label {
  font-weight: 500;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--muted);
}
.field input,
.field select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(237, 234, 228, 0.32);
  border-radius: 0;
  padding: 10px 0 12px;
  font-weight: 300;
  font-size: 18px;
  color: var(--ink);
  transition: border-color 0.3s ease;
}
.field select {
  padding-right: 32px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 14 8'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23B8A27A' stroke-width='1.2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 2px center;
}
.field select option { background: var(--surface); color: var(--ink); }
.field input:focus,
.field select:focus { outline: none; border-bottom-color: var(--accent); }
.field input:focus-visible,
.field select:focus-visible { outline: none; }
.field input:user-invalid { border-bottom-color: #D9A08B; }
.form .btn { justify-self: start; margin-top: 12px; }

.form__thanks {
  font-family: var(--serif);
  font-size: clamp(26px, 2.4vw, 34px);
  line-height: 1.35;
  max-width: 20em;
  padding-block: 24px;
  border-top: 1px solid var(--accent);
}
.form__thanks:focus { outline: none; }

/* Footer */
.footer { padding-block: 96px 48px; border-top: 1px solid var(--line); }
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr auto;
  gap: 40px;
  align-items: start;
  padding-bottom: 64px;
}
.footer__col { color: var(--muted); font-size: 16px; line-height: 1.8; }
.footer__col a { transition: color 0.3s ease; }
.footer__col a:hover { color: var(--ink); }
.footer__links { display: flex; gap: 32px; }
.footer__links a {
  font-weight: 500;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--ink);
  transition: color 0.3s ease;
}
.footer__links a:hover { color: var(--accent); }
.footer__legal {
  padding-top: 32px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}

/* Motion (only when JS is running and motion is allowed) */
@media (prefers-reduced-motion: no-preference) {
  .js .hero__media img {
    transform: scale(1.06);
    opacity: 0;
    transition: transform 2.4s var(--ease), opacity 1.2s ease;
  }
  .js .hero.is-ready .hero__media img { transform: scale(1); opacity: 1; }

  .js .hero__text > * {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 1.1s var(--ease), transform 1.1s var(--ease);
  }
  .js .hero.is-ready .hero__text > * { opacity: 1; transform: none; }
  .js .hero.is-ready .hero__text > :nth-child(1) { transition-delay: 0.35s; }
  .js .hero.is-ready .hero__text > :nth-child(2) { transition-delay: 0.5s; }
  .js .hero.is-ready .hero__text > :nth-child(3) { transition-delay: 0.7s; }
  .js .hero.is-ready .hero__text > :nth-child(4) { transition-delay: 0.85s; }

  .js .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 1s var(--ease), transform 1s var(--ease);
  }
  .js .reveal.is-in { opacity: 1; transform: none; }
  .js .scheme.reveal { transform: translateY(12px); }
  .js .principle.reveal:nth-child(2) { transition-delay: 0.12s; }
  .js .principle.reveal:nth-child(3) { transition-delay: 0.24s; }
  .js .figure.reveal:nth-child(2) { transition-delay: 0.12s; }
  .js .figure.reveal:nth-child(3) { transition-delay: 0.24s; }

  /* Development rows: image wipes up from the bottom, then the text follows */
  .js .dev__media {
    clip-path: inset(100% 0 0 0);
    transition: clip-path 1.1s var(--ease-in-out);
  }
  .js .dev__media img {
    transform: scale(1.08);
    transition: transform 1.8s var(--ease);
  }
  .js .dev.is-in .dev__media { clip-path: inset(0 0 0 0); }
  .js .dev.is-in .dev__media img { transform: scale(1); }
  .js .dev__body > * {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  }
  .js .dev.is-in .dev__body > * { opacity: 1; transform: none; }
  .js .dev.is-in .dev__body > :nth-child(1) { transition-delay: 0.6s; }
  .js .dev.is-in .dev__body > :nth-child(2) { transition-delay: 0.68s; }
  .js .dev.is-in .dev__body > :nth-child(3) { transition-delay: 0.76s; }
  .js .dev.is-in .dev__body > :nth-child(4) { transition-delay: 0.84s; }
  .js .dev.is-in .dev__body > :nth-child(5) { transition-delay: 0.92s; }
  .js .dev.is-in .dev__body > :nth-child(6) { transition-delay: 1s; }
}

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

/* Tablet */
@media (max-width: 1100px) {
  .nav__links { gap: 28px; }
  .nav__inner { gap: 32px; }
  .dev__body { grid-column: 8 / span 5; }
  .dev--reverse .dev__body { grid-column: 1 / span 5; }
  .approach__media { grid-column: 1 / span 6; }
  .approach__body { grid-column: 7 / span 6; padding-left: 16px; }
}

@media (max-width: 960px) {
  .nav__links, .nav__cta { display: none; }
  .nav__menu-btn { display: block; }
  .dev__media { grid-column: 1 / span 6; }
  .dev__body { grid-column: 7 / span 6; }
  .dev--reverse .dev__media { grid-column: 7 / span 6; }
  .dev--reverse .dev__body { grid-column: 1 / span 6; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__grid > .logo, .footer__links { grid-column: 1 / -1; }
}

/* Mobile */
@media (max-width: 767px) {
  :root { --gutter: 24px; --section-y: 88px; --nav-h: 72px; }
  body { font-size: 17px; }
  .logo { font-size: 16px; letter-spacing: 0.2em; }

  .hero__media img { object-position: 64% 50%; }
  .hero__content { padding-bottom: 56px; }
  .hero__text { max-width: none; }
  .hero__text .display { font-size: 40px; }
  .hero__overlay {
    background: linear-gradient(to top right,
      rgba(20, 20, 19, 0.92) 0%,
      rgba(20, 20, 19, 0.84) 55%,
      rgba(20, 20, 19, 0.66) 80%,
      rgba(20, 20, 19, 0) 100%);
  }

  .intro { padding-block: 112px; }
  .intro__text { font-size: 26px; line-height: 1.45; text-align: left; }

  .section-label { margin-bottom: 48px; }
  .dev, .dev--reverse { display: flex; flex-direction: column; align-items: stretch; }
  .dev--reverse .dev__media { order: 0; }
  .dev--reverse .dev__body { order: 1; }
  .dev__media { aspect-ratio: 4 / 3; margin-bottom: 36px; }
  .dev + .dev { margin-top: 96px; }

  .numbers__grid { grid-template-columns: 1fr; gap: 56px; }

  .approach__grid { display: flex; flex-direction: column; align-items: stretch; gap: 56px; }
  .approach__media { aspect-ratio: 4 / 5; }
  .approach__body { padding-left: 0; }
  .approach__body .display { margin-bottom: 40px; }
  .principle { grid-template-columns: 56px 1fr; }
  .principle__num, .principle__title { font-size: 24px; }

  .scheme { grid-template-columns: 1fr auto; padding-block: 26px; }
  .scheme__town, .scheme__homes { display: none; }
  .cursor-img { display: none; }

  .register__grid { display: flex; flex-direction: column; align-items: stretch; gap: 56px; }
  .register__form-wrap { padding-top: 0; }
  .form .btn { justify-self: stretch; text-align: center; }

  .footer { padding-block: 72px 40px; }
  .footer__grid { grid-template-columns: 1fr; gap: 28px; padding-bottom: 48px; }
  .footer__links { flex-wrap: wrap; gap: 20px 28px; }
}
