/* ============================================================
   nuhuis — Amsterdam student housing
   Portfolio of homes we've placed. Quiet, editorial, restrained.
   ============================================================ */

:root {
  --brown: #5E2A0A;
  --brown-deep: #3D1B06;
  --cream: #EFE8D9;
  --cream-hi: #F5F0E3;
  --cream-lo: #E4DBC7;
  --ink: #1F1508;
  --line: rgba(31, 21, 8, 0.12);
  --line-strong: rgba(31, 21, 8, 0.3);

  --f-display: "Fraunces", "Times New Roman", serif;
  --f-body: "Instrument Sans", ui-sans-serif, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --radius: 10px;
  --max: 1320px;
  --gutter: clamp(20px, 4vw, 56px);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--brown); color: var(--cream); }

/* Subtle paper grain */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 200;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.12 0 0 0 0 0.08 0 0 0 0 0.04 0 0 0 0.45 0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.3'/></svg>");
  opacity: 0.4; mix-blend-mode: multiply;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 0.98;
  margin: 0;
  color: var(--brown-deep);
  font-variation-settings: "opsz" 144, "SOFT" 30;
}
.italic { font-style: italic; font-variation-settings: "opsz" 144, "SOFT" 100; }
.eyebrow {
  font-family: var(--f-mono);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  font-weight: 400;
  color: var(--brown);
}
.lede { font-size: clamp(1rem, 1.2vw, 1.18rem); line-height: 1.5; max-width: 52ch; color: var(--ink); }

/* ---------- Layout ---------- */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px var(--gutter);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 20px;
  transition: background 0.4s var(--ease), backdrop-filter 0.4s, border 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(239, 232, 217, 0.78);
  backdrop-filter: blur(14px) saturate(1.05);
  -webkit-backdrop-filter: blur(14px) saturate(1.05);
  border-bottom-color: var(--line);
}
.nav-on-hero:not(.is-scrolled) { color: var(--cream-hi); }
.nav-on-hero:not(.is-scrolled) a { color: var(--cream-hi); }
.nav-on-hero:not(.is-scrolled) .btn-ghost {
  color: var(--cream-hi);
  border-color: rgba(239, 232, 217, 0.5);
}
.nav-on-hero:not(.is-scrolled) .btn-ghost:hover {
  background: var(--cream-hi); color: var(--ink); border-color: var(--cream-hi);
}
.nav-left, .nav-right { display: flex; align-items: center; gap: 28px; font-size: 0.9rem; }
.nav-right { justify-content: flex-end; }
.nav-center { display: flex; justify-content: center; }

.nav a:not(.logo) {
  position: relative;
  padding: 6px 0;
  font-weight: 500;
}
.nav a:not(.logo)::after {
  content: "";
  position: absolute; left: 0; right: 100%; bottom: 2px;
  height: 1px; background: currentColor;
  transition: right 0.45s var(--ease);
}
.nav a:not(.logo):hover::after { right: 0; }

/* Logo */
.logo {
  display: inline-block;
  width: 68px; height: 68px;
  transition: transform 0.4s var(--ease);
  flex-shrink: 0;
}
.logo:hover { transform: rotate(-4deg); }
.logo img { width: 100%; height: 100%; display: block; object-fit: contain; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border-radius: 2px;
  font-size: 0.88rem;
  font-weight: 500;
  background: var(--brown-deep);
  color: var(--cream-hi);
  transition: transform 0.3s var(--ease), background 0.3s;
  border: 1px solid var(--brown-deep);
  letter-spacing: 0.01em;
}
.btn:hover { transform: translateY(-2px); background: var(--brown); border-color: var(--brown); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); }
.btn-ghost:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.btn .arrow { transition: transform 0.35s var(--ease); display: inline-block; }
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- Hero ---------- */
.hero {
  padding: 140px var(--gutter) 72px;
  min-height: min(96vh, 920px);
  display: flex; flex-direction: column; justify-content: flex-end;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  color: var(--cream-hi);
}
.hero-bg {
  position: absolute; inset: 0; z-index: -2;
}
.hero-bg img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.02);
  animation: heroDrift 18s ease-out forwards;
}
@keyframes heroDrift { to { transform: scale(1.08); } }
.hero::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(31,21,8,0.25) 0%, rgba(31,21,8,0) 35%, rgba(31,21,8,0.55) 100%),
    linear-gradient(180deg, rgba(61,27,6,0.2), rgba(61,27,6,0.2));
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 60px;
  align-items: end;
  max-width: var(--max);
  margin: 0 auto;
  width: 100%;
}
.hero h1 {
  font-size: clamp(3.25rem, 10.5vw, 10rem);
  letter-spacing: -0.045em;
  color: var(--cream-hi);
  line-height: 0.88;
  text-shadow: 0 2px 30px rgba(0,0,0,0.25);
}
.hero .eyebrow { color: var(--cream-hi); opacity: 0.85; }
.hero .lede { color: var(--cream-hi); opacity: 0.92; }
.hero h1 .line { display: block; overflow: hidden; }
.hero h1 .line > span {
  display: inline-block;
  transform: translateY(105%);
  animation: rise 1.1s var(--ease-out) forwards;
}
.hero h1 .line:nth-child(2) > span { animation-delay: 0.12s; }
.hero h1 .line:nth-child(3) > span { animation-delay: 0.24s; }
@keyframes rise { to { transform: translateY(0); } }

.hero-right {
  display: flex; flex-direction: column; gap: 24px;
  padding-bottom: 12px;
  opacity: 0;
  animation: fadeUp 0.9s 0.5s var(--ease-out) forwards;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Section ---------- */
section { position: relative; }

.section-head {
  display: grid; grid-template-columns: auto 1fr auto;
  gap: 28px; align-items: baseline;
  padding: 100px 0 48px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 56px;
}
.section-head .num {
  font-family: var(--f-mono);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  color: var(--brown);
  text-transform: uppercase;
}
.section-head h2 {
  font-size: clamp(2.4rem, 5.5vw, 4.6rem);
  letter-spacing: -0.035em;
}
.section-head .kicker {
  font-size: 0.78rem; color: var(--brown);
  font-family: var(--f-mono);
  letter-spacing: 0.14em; text-transform: uppercase;
}

/* ---------- Homes (portfolio grid) ---------- */
.homes-section { padding: 0 0 120px; }
.homes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px 28px;
}
.home {
  display: flex; flex-direction: column; gap: 16px;
  cursor: pointer;
  transition: transform 0.5s var(--ease);
}
.home:hover { transform: translateY(-4px); }
.home .frame {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--cream-lo);
}
.home .frame img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.9s var(--ease);
}
.home:hover .frame img { transform: scale(1.04); }
.home .meta {
  display: grid; grid-template-columns: 1fr auto;
  gap: 10px 20px;
  padding-right: 4px;
  align-items: start;
}
.home .meta .title {
  font-family: var(--f-display);
  font-size: 1.3rem;
  letter-spacing: -0.015em;
  color: var(--brown-deep);
  line-height: 1.1;
}
.home .meta .sub {
  font-size: 0.85rem;
  color: var(--ink);
  opacity: 0.64;
  margin-top: 6px;
  letter-spacing: 0.01em;
}
.home .meta .placed {
  text-align: right;
  font-family: var(--f-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--brown);
  white-space: nowrap;
}

/* ---------- Split band ---------- */
.band {
  padding: 120px 0;
}
.band + .band { padding-top: 0; }
.band-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 80px;
  align-items: center;
}
.band h2 {
  font-size: clamp(2.6rem, 6.5vw, 5.5rem);
  letter-spacing: -0.04em;
}
.band p { font-size: 1.05rem; max-width: 50ch; }

.band-cta { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.btn-block {
  width: 100%; max-width: 340px;
  justify-content: center;
  padding: 22px 28px;
  font-size: 0.98rem;
}
.discount-note {
  font-weight: 500;
  color: #3a4a7a;
  text-align: center;
  font-size: 0.92rem;
  margin: 0;
}

.band-logo { display: flex; justify-content: center; align-items: center; }
.logo.logo-xl { width: 220px; height: 220px; }
.logo.logo-xl:hover { transform: rotate(-3deg); }

/* ---------- Testimonials ---------- */
.testimonials { padding: 0 0 120px; }
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.quote {
  background: var(--cream-hi);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 32px 28px;
  display: flex; flex-direction: column; gap: 22px;
  transition: transform 0.5s var(--ease), background 0.5s;
}
.quote:hover { transform: translateY(-4px); background: var(--cream-lo); }
.quote .mark {
  font-family: var(--f-display);
  font-size: 3.4rem;
  line-height: 0.6;
  color: var(--brown);
  opacity: 0.35;
  font-style: italic;
  margin-bottom: -10px;
}
.quote blockquote {
  margin: 0;
  font-family: var(--f-display);
  font-size: 1.18rem;
  line-height: 1.35;
  letter-spacing: -0.015em;
  color: var(--brown-deep);
  font-weight: 400;
  font-variation-settings: "opsz" 40, "SOFT" 50;
}
.quote .who {
  display: grid; grid-template-columns: 44px 1fr;
  gap: 14px; align-items: center;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.quote .avatar-sm {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--cream-lo);
  overflow: hidden;
}
.quote .avatar-sm img { width: 100%; height: 100%; object-fit: cover; }
.quote .name { font-size: 0.92rem; font-weight: 500; color: var(--ink); }
.quote .place {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--brown);
  margin-top: 3px;
}

/* ---------- CTA strip ---------- */
.cta {
  padding: 140px var(--gutter);
  text-align: center;
}
.cta h2 {
  font-size: clamp(2.8rem, 8vw, 7.5rem);
  letter-spacing: -0.045em;
}
.cta h2 em { font-style: italic; font-variation-settings: "opsz" 144, "SOFT" 100; color: var(--brown); }
.cta .row { margin-top: 36px; display: inline-flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ---------- Footer ---------- */
.footer {
  background: var(--brown-deep);
  color: var(--cream);
  padding: 72px var(--gutter) 32px;
  position: relative;
  overflow: hidden;
}
.footer-top {
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  gap: 60px;
  padding-bottom: 60px;
  border-bottom: 1px solid rgba(239, 232, 217, 0.15);
}
.footer h4 {
  color: var(--cream);
  font-family: var(--f-mono);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 400;
  opacity: 0.6;
  margin-bottom: 18px;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 0.95rem; }
.footer ul a:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer-brand .logo { width: 76px; height: 76px; }
.footer-brand p { margin: 20px 0 0; max-width: 34ch; opacity: 0.68; font-size: 0.92rem; }

.footer-wordmark {
  font-family: var(--f-display);
  font-size: clamp(6rem, 22vw, 22rem);
  line-height: 0.82;
  letter-spacing: -0.05em;
  margin-top: 56px;
  color: var(--cream);
  opacity: 0.9;
}
.footer-meta {
  margin-top: 28px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px;
  font-family: var(--f-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  opacity: 0.55;
}

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }

/* ---------- Utilities ---------- */
.small { font-size: 0.84rem; }
.mono { font-family: var(--f-mono); }
.muted { opacity: 0.6; }

/* ---------- Homes page ---------- */
.homes-head {
  padding: 160px var(--gutter) 60px;
  max-width: var(--max);
  margin: 0 auto;
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 60px; align-items: end;
}
.homes-head h1 {
  font-size: clamp(3rem, 8vw, 6.5rem);
  letter-spacing: -0.045em;
}
.homes-head .lede { max-width: 40ch; }
.homes-body { padding: 40px var(--gutter) 120px; max-width: var(--max); margin: 0 auto; }
.homes-count {
  font-family: var(--f-mono);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  color: var(--brown);
  text-transform: uppercase;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 50px;
}

/* ---------- About page ---------- */
.about-hero {
  padding: 160px var(--gutter) 80px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 80px;
  align-items: end;
  max-width: var(--max);
  margin: 0 auto;
}
.about-hero h1 { font-size: clamp(3rem, 9vw, 8rem); letter-spacing: -0.045em; }

.team-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
.team-grid-3 { grid-template-columns: repeat(3, 1fr); max-width: 1020px; margin: 0 auto; }
.member { display: flex; flex-direction: column; gap: 12px; }
.member .avatar {
  aspect-ratio: 3 / 4;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--cream-lo);
}
.member .avatar img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.member:hover .avatar img { transform: scale(1.04); }
.member .name { font-family: var(--f-display); font-size: 1.2rem; letter-spacing: -0.015em; }
.member .role {
  font-size: 0.78rem;
  font-family: var(--f-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brown);
}

/* ---------- Contact page ---------- */
.contact-simple {
  max-width: 820px;
  margin: 0 auto;
  padding: 180px var(--gutter) 140px;
  text-align: left;
}
.contact-simple h1 {
  font-size: clamp(3rem, 9vw, 7rem);
  letter-spacing: -0.045em;
  margin-top: 22px;
}
.contact-simple .lede { margin-top: 36px; max-width: 46ch; font-size: 1.15rem; }
.contact-actions {
  margin-top: 44px;
  display: inline-flex; flex-wrap: wrap; gap: 12px;
}
.contact-facts {
  margin: 80px 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}
.contact-facts dt {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--brown);
  margin-bottom: 10px;
}
.contact-facts dd {
  margin: 0;
  font-family: var(--f-display);
  font-size: 1.15rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--brown-deep);
}
.contact-facts a { border-bottom: 1px solid var(--line-strong); }
.contact-facts a:hover { border-bottom-color: var(--ink); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .band-grid { grid-template-columns: 1fr; gap: 40px; }
  .homes-grid { grid-template-columns: repeat(2, 1fr); gap: 36px 20px; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .testimonial-grid { grid-template-columns: 1fr 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .homes-head, .about-hero { grid-template-columns: 1fr; gap: 40px; padding-top: 130px; }
  .team-grid-3 { grid-template-columns: repeat(3, 1fr); }
  .contact-facts { grid-template-columns: 1fr 1fr; gap: 28px; }
}
@media (max-width: 640px) {
  .nav { padding: 14px 20px; }
  .nav-left { display: none; }
  .logo { width: 56px; height: 56px; }
  .hero { padding: 110px 20px 50px; }
  .homes-grid { grid-template-columns: 1fr; gap: 28px; }
  .section-head { grid-template-columns: 1fr; gap: 10px; padding: 70px 0 30px; margin-bottom: 36px; }
  .team-grid { grid-template-columns: 1fr 1fr; }
  .team-grid-3 { grid-template-columns: 1fr; }
  .testimonial-grid { grid-template-columns: 1fr; }
  .contact-facts { grid-template-columns: 1fr; }
  .contact-simple { padding: 130px 20px 90px; }
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .field-row { grid-template-columns: 1fr; }
  .btn { padding: 11px 18px; font-size: 0.85rem; }
}
