/* ==========================================================================
   The George — Nora Residences
   Design base: 1920px artboard. Sizes scale fluidly with clamp() and
   collapse to a single-column layout below 900px.
   ========================================================================== */

/* ---------- Fonts ---------- */
@font-face {
  font-family: "TT Norms";
  src: url("../fonts/TTNorms-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "TT Norms";
  src: url("../fonts/TTNorms-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "TT Norms";
  src: url("../fonts/TTNorms-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* Cormorant (Light 300 for headlines), self-hosted */
@font-face {
  font-family: "Cormorant Local";
  src: url("../fonts/Cormorant-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Local";
  src: url("../fonts/Cormorant-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --c-light: #dfdfd5;
  --c-dark: #2c3729;
  --c-cream: #ecebe3;
  --c-line: rgba(44, 55, 41, 0.55);
  --c-error: #9a3b2e;

  --f-sans: "TT Norms", "Helvetica Neue", Arial, sans-serif;
  /* Cormorant Light, self-hosted (the design weight; the Adobe kit only had Regular/Bold) */
  --f-serif: "Cormorant Local", Georgia, serif;

  --gutter: clamp(20px, 2.5vw, 48px);
  --fs-display: clamp(38px, 4.792vw, 92px);
  --fs-body: clamp(15px, 0.99vw, 19px);
  --fs-small: clamp(13px, 0.94vw, 18px);
  --fs-link: clamp(15px, 1.05vw, 20px);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--c-light);
  color: var(--c-dark);
  font-family: var(--f-sans);
  font-weight: 400;
  font-size: var(--fs-body);
  line-height: 1.39;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
picture { display: block; }
a { color: inherit; }
p { margin: 0 0 1.39em; }
p:last-child { margin-bottom: 0; }
button { font: inherit; color: inherit; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: var(--gutter); top: -100px; z-index: 100;
  background: var(--c-dark); color: var(--c-light);
  padding: 10px 16px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }

.eyebrow {
  font-size: var(--fs-small);
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0;
}

.text-link {
  font-size: var(--fs-link);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: opacity 0.25s var(--ease);
}
.text-link:hover { opacity: 0.6; }

.display {
  font-family: var(--f-serif);
  font-weight: 300;
  font-size: var(--fs-display);
  line-height: 0.978;       /* 90px @ 92px */
  letter-spacing: -0.03em;
  text-transform: uppercase;
  margin: 0;
}

/* ---------- Logos ---------- */
.logo { display: inline-block; line-height: 0; }
.logo__img { width: clamp(180px, 22.7vw, 436px); height: auto; }   /* 436px @ 1920 */
.nora-logo { display: block; width: clamp(96px, 7.4vw, 142px); height: auto; }   /* 142px @ 1920 */

/* ==========================================================================
   Header (landing page)
   ========================================================================== */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(18px, 2.3vw, 44px) var(--gutter) clamp(18px, 2.24vw, 43px);
}
.site-header .text-link { font-size: clamp(15px, 1.25vw, 24px); letter-spacing: 0.04em; }

/* ==========================================================================
   Hero video
   ========================================================================== */
.hero { padding: 0 var(--gutter); }

.video {
  position: relative;
  aspect-ratio: 16 / 9;   /* matches the Vimeo film, so no bars when it plays */
  overflow: hidden;
  background: #000;
}
.video__cover,
.video__cover img,
.video iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}
.video__cover img { object-fit: cover; }
.video iframe { border: 0; }

.video__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}
.video__play-icon {
  display: block;
  width: clamp(72px, 16.77vw, 322px);
  transition: transform 0.5s var(--ease), opacity 0.5s var(--ease);
  opacity: 1;
}
.video__play-icon svg { display: block; width: 100%; height: auto; }
.video__play:hover .video__play-icon { transform: scale(1.06); opacity: 1; }

.video.is-playing .video__cover,
.video.is-playing .video__play { opacity: 0; visibility: hidden; transition: opacity 0.4s, visibility 0s 0.4s; }

.hero__meta {
  display: flex;
  justify-content: space-between;
  padding-top: clamp(16px, 2.3vw, 44px);
}

/* ==========================================================================
   Headline over a rotating image (landing + thank you)
   ========================================================================== */
.statement {
  position: relative;
  display: grid;
  place-items: center;
  text-align: center;
}
.statement > * { grid-area: 1 / 1; }

.photo-cycle {
  position: relative;
  width: clamp(160px, 15.2vw, 292px);
  aspect-ratio: 292 / 381;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.photo-cycle picture {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.photo-cycle picture.is-active { opacity: 1; }
.photo-cycle img { width: 100%; height: 100%; object-fit: cover; }

.statement .display { position: relative; z-index: 1; pointer-events: none; top: -0.076em; }

.residences {
  padding: clamp(60px, 5.677vw, 109px) var(--gutter) clamp(100px, 11.823vw, 227px);
}

/* ==========================================================================
   Intro: dark panel + building
   ========================================================================== */
.intro {
  display: grid;
  grid-template-columns: 1125fr 795fr;
  background: var(--c-dark);
  color: var(--c-cream);
}
.intro__panel {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(28px, 2.344vw, 45px) var(--gutter) 0;
}
.intro__top {
  display: grid;
  grid-template-columns: clamp(140px, 12.708vw, 244px) minmax(0, 500px);
  column-gap: var(--gutter);
}
.intro__top p { font-size: var(--fs-body); line-height: 1.316; max-width: 500px; }
.intro .display {
  /* last line intentionally bleeds off the bottom edge, as in the design */
  margin-bottom: -0.18em;
  padding-top: 60px;
}
.intro__media picture { height: 100%; }
.intro__media img { width: 100%; height: 100%; object-fit: cover; }

/* ==========================================================================
   Embossed GEORGE
   ========================================================================== */
.emboss {
  overflow: hidden;
  padding: clamp(40px, 4.948vw, 95px) 0 clamp(60px, 8.021vw, 154px);
}
.emboss img {
  width: 103.3%;            /* 1983 / 1920 */
  max-width: none;
  margin-left: -1.65%;
}

/* ==========================================================================
   Neighbourhood carousel + copy
   ========================================================================== */
.neighbourhood {
  display: grid;
  grid-template-columns: 1098fr 822fr;
  align-items: stretch;   /* photo and text column always end on the same line */
}
.carousel {
  position: relative;
  /* Never shorter than the design's 1098:594 shape (column = 1098/1920 of the
     width); grows with the text column when that is taller. Photo is cropped
     to fill (object-fit: cover), so there is never an empty gap under it. */
  min-height: calc(57.1875vw * 594 / 1098);
  overflow: hidden;
  touch-action: pan-y;
  background: #c9cbc2;
}
.carousel__track {
  position: absolute;
  inset: 0;
  display: flex;
  transition: transform 0.8s var(--ease-out);
}
.carousel__slide {
  position: relative;
  flex: 0 0 100%;
  height: 100%;
}
.carousel__slide picture { height: 100%; }
.carousel__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}
/* Mouse / touch drag */
.carousel { cursor: grab; user-select: none; -webkit-user-select: none; }
.carousel.is-dragging { cursor: grabbing; }
.carousel.is-dragging .carousel__track { transition: none; }

.carousel__dots {
  position: absolute;
  left: 50%;
  bottom: clamp(14px, 2.6vw, 50px);
  transform: translateX(-50%);
  display: flex;
  gap: clamp(22px, 2.1vw, 40px);
  margin: 0; padding: 0; list-style: none;
}
.carousel__dot {
  display: block;
  width: clamp(12px, 0.95vw, 18px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: background-color 0.3s, transform 0.3s;
}
.carousel__dot:hover { transform: scale(1.15); }
.carousel__dot.is-active { background: #fff; }

.neighbourhood__copy {
  padding: 0 var(--gutter) 0 clamp(24px, 4.375vw, 84px);
}
.neighbourhood__copy .eyebrow { margin-top: -2px; margin-bottom: clamp(40px, 7.083vw, 136px); }
.neighbourhood__copy .body { max-width: 525px; line-height: 1.316; }
.neighbourhood__copy .body p { margin-bottom: 1.316em; }
.neighbourhood__copy .body p:last-child { margin-bottom: 0; }

/* ==========================================================================
   Retail enquiry form
   ========================================================================== */
.inquiry {
  display: grid;
  grid-template-columns: clamp(160px, 23.125vw, 444px) 1fr;
  column-gap: var(--gutter);
  padding: clamp(56px, 6.615vw, 127px) var(--gutter) clamp(64px, 5.313vw, 102px);
}
.form__grid {
  display: grid;
  grid-template-columns: 580fr 692fr;
  column-gap: clamp(24px, 3.125vw, 60px);
  row-gap: 0;
}
.field { position: relative; }
/* row spacing taken from the design (72 / 82 / 89px pitch at 1920) */
.field:nth-child(3), .field:nth-child(4) { margin-top: clamp(20px, 1.302vw, 25px); }
.field:nth-child(5), .field:nth-child(6) { margin-top: clamp(20px, 1.823vw, 35px); }
.field:nth-child(7) { margin-top: clamp(20px, 2.188vw, 42px); }
.inquiry > .eyebrow { padding-top: 4px; }
.form[hidden] { display: none !important; }

/* Contact message (shown while the form is hidden) */
.inquiry__contact { font-size: var(--fs-link); line-height: 1.5; }
.inquiry__contact p { margin: 0; }
.inquiry__contact p:first-child { margin-bottom: clamp(18px, 1.563vw, 30px); }
.inquiry__contact .contact + .contact { margin-top: clamp(8px, 0.625vw, 12px); }
.contact__name { display: inline-block; min-width: clamp(150px, 9.375vw, 180px); margin-right: 1em; }
.contact__email {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: opacity 0.25s var(--ease);
  overflow-wrap: anywhere;
}
.contact__email:hover { opacity: 0.6; }
@media (max-width: 600px) {
  .contact__name { display: block; min-width: 0; margin-right: 0; }
  .inquiry__contact .contact + .contact { margin-top: 16px; }
}
.field--full { grid-column: 1 / -1; }

.field input,
.field select {
  display: block;
  width: 100%;
  font: inherit;
  font-size: clamp(15px, 0.9375vw, 18px);
  color: var(--c-dark);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--c-line);
  border-radius: 0;
  padding: 4px 0 clamp(10px, 0.885vw, 17px);
  outline: none;
  transition: border-color 0.25s;
  -webkit-appearance: none;
          appearance: none;
}
.field input::placeholder { color: var(--c-dark); opacity: 1; }
.field input:focus,
.field select:focus { border-bottom-color: var(--c-dark); }

.field select { cursor: pointer; padding-right: 40px; }
.field select:invalid,
.field select.is-placeholder { color: var(--c-dark); }
.field--select::after {
  content: "";
  position: absolute;
  right: clamp(12px, 1.2vw, 22px);
  top: 0.55em;
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 6px solid var(--c-dark);
  pointer-events: none;
}

.field.has-error input,
.field.has-error select { border-bottom-color: var(--c-error); }
.field__error {
  position: absolute;
  left: 0; top: 100%;
  margin-top: 4px;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--c-error);
}

.form__actions { margin-top: clamp(48px, 6.042vw, 116px); }
.form__submit {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-size: clamp(15px, 0.9375vw, 18px);
}
.form__submit[disabled] { opacity: 0.5; cursor: progress; }
.form__status { margin-top: 16px; font-size: 14px; color: var(--c-error); min-height: 1em; }

/* ==========================================================================
   Footer (dark on landing, light on thank-you)
   ========================================================================== */
.site-footer {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 60px;
  min-height: clamp(300px, 22.1vw, 425px);
  padding: clamp(32px, 2.6vw, 50px) clamp(20px, 2.6vw, 50px) clamp(28px, 2.6vw, 50px);
}
.site-footer--dark { background: var(--c-dark); color: var(--c-cream); }
.site-footer--light {
  background: var(--c-light);
  color: var(--c-dark);
  min-height: clamp(300px, 22.19vw, 426px);
  padding-top: clamp(32px, 3.073vw, 59px);
  padding-bottom: clamp(28px, 2.292vw, 44px);
}

.site-footer__top,
.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 32px;
}
.site-footer__top { align-items: flex-start; }
.site-footer__bottom { align-items: last baseline; }



.legal {
  font-weight: 300;
  font-size: clamp(14px, 0.9375vw, 18px);
  line-height: 1.278;
  margin: 0;
}
@media (min-width: 1101px) { .legal { white-space: nowrap; } }

.footer-nav ul {
  display: flex;
  gap: clamp(24px, 3.1vw, 60px);
  margin: 0; padding: 0; list-style: none;
}
/* legal text, links and icons share one bottom line */
.footer-nav { margin-bottom: 0; }
.footer-nav .text-link { white-space: nowrap; font-size: clamp(14px, 0.99vw, 19px); letter-spacing: 0.01em; }

.site-footer__right {
  display: flex;
  align-items: last baseline;
  gap: clamp(40px, 8.2vw, 158px);
}

.social {
  /* inline icons: an icon with no text has its baseline at its bottom edge,
     so the row sits exactly on the legal text / link baseline */
  display: block;
  white-space: nowrap;
  font-size: 0;
  margin: 0; padding: 0; list-style: none;
}
.social li { display: inline-block; vertical-align: baseline; }
.social li + li { margin-left: clamp(14px, 1.15vw, 22px); }
.social a {
  display: block;
  position: relative;   /* icon is absolutely centred, so the circle's bottom is the baseline */
  width: clamp(32px, 2vw, 38px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: currentColor;
  transition: opacity 0.25s var(--ease);
}
.social a:hover { opacity: 0.7; }
.social svg { position: absolute; inset: 0; margin: auto; width: 64%; height: 64%; }
.site-footer--dark .social svg { color: var(--c-dark); }
.site-footer--light .social svg { color: var(--c-light); }

/* ==========================================================================
   Thank-you page
   ========================================================================== */
.page-thanks { background: var(--c-dark); }

.thanks {
  background: var(--c-dark);
  color: var(--c-cream);
  text-align: center;
  padding: clamp(34px, 2.813vw, 54px) var(--gutter) clamp(100px, 9.323vw, 179px);
}
.thanks__brand {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
}
.thanks__the {
  font-weight: 300;
  font-size: clamp(20px, 1.6vw, 30px);
  letter-spacing: 0.1em;
  line-height: 1;
}
.thanks__mark {
  width: clamp(220px, 20.3vw, 390px);
  height: auto;
  margin: clamp(16px, 1.51vw, 29px) 0 clamp(18px, 1.51vw, 29px);
}
.thanks__sub {
  font-weight: 400;
  font-size: clamp(13px, 0.885vw, 17px);
  letter-spacing: 0.12em;
  line-height: 1.294;
  text-transform: uppercase;
}
.thanks .statement { margin-top: clamp(44px, 4.271vw, 82px); }
.thanks .display { color: var(--c-cream); top: -0.011em; }
.thanks__copy {
  max-width: 470px;
  margin: clamp(36px, 3.906vw, 75px) auto 0;
  font-size: clamp(16px, 1.016vw, 19.5px);
  line-height: 25px;
}

/* ==========================================================================
   Scroll animations
   Elements carry data-anim="…"; main.js adds .in-view when they enter the
   viewport. Optional per-element delay: style="--d:150ms".
   ========================================================================== */
:root {
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.77, 0, 0.175, 1);
}
.js [data-anim] {
  transition: opacity 1.1s var(--ease-out), transform 1.1s var(--ease-out);
  transition-delay: var(--d, 0ms);
}
.js [data-anim="up"]:not(.in-view)    { opacity: 0; transform: translateY(40px); }
.js [data-anim="down"]:not(.in-view)  { opacity: 0; transform: translateY(-20px); }
.js [data-anim="scale"]:not(.in-view) { opacity: 0; transform: scale(0.92); }

/* Image reveal: wipes up from the bottom while the picture settles */
.js [data-anim="reveal"] {
  clip-path: inset(0 0 0 0);
  transition: clip-path 1.4s var(--ease-io);
  transition-delay: var(--d, 0ms);
}
.js [data-anim="reveal"]:not(.in-view) { clip-path: inset(100% 0 0 0); }
.js [data-anim="reveal"] img { transition: transform 2s var(--ease-out); transition-delay: var(--d, 0ms); }
.js [data-anim="reveal"]:not(.in-view) img { transform: scale(1.15); }

/* Big embossed wordmark: slow fade + rise */
.js [data-anim="emboss"] img { transition: opacity 1.8s var(--ease-out), transform 1.8s var(--ease-out); }
.js [data-anim="emboss"]:not(.in-view) img { opacity: 0; transform: translateY(60px); }

/* Children one after another */
.js [data-anim="stagger"] { transition: none; }
.js [data-anim="stagger"] > * {
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
  transition-delay: calc(var(--d, 0ms) + var(--i, 0) * 90ms);
}
.js [data-anim="stagger"]:not(.in-view) > * { opacity: 0; transform: translateY(30px); }

/* Headlines rise line by line (lines are wrapped by main.js) */
.js [data-anim="lines"] { transition: none; }
.anim-line { display: block; }
.js [data-anim="lines"] .anim-line {
  transition: opacity 1.2s var(--ease-out), transform 1.2s var(--ease-out);
  transition-delay: calc(var(--d, 0ms) + var(--i, 0) * 120ms);
}
.js [data-anim="lines"]:not(.in-view) .anim-line { opacity: 0; transform: translateY(0.45em); }

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

/* ==========================================================================
   Tablet / mobile
   ========================================================================== */
@media (max-width: 1200px) {
  .site-footer__right { gap: 40px; }
  .legal { max-width: 40%; }
}
@media (max-width: 900px) {
  .legal { max-width: none; }
}

@media (max-width: 900px) {
  .intro { grid-template-columns: 1fr; }
  .intro__panel { padding-bottom: 0; }
  .intro__top { grid-template-columns: 1fr; row-gap: 16px; }
  .intro .display { padding-top: 64px; }
  .intro__media { width: 100%; aspect-ratio: 4 / 3; overflow: hidden; }
  .intro__top p { max-width: none; }
  .neighbourhood__copy .body { max-width: none; }

  .neighbourhood { grid-template-columns: 1fr; }
  .carousel { min-height: 0; aspect-ratio: 1098 / 594; }
  .neighbourhood__copy { padding: 36px var(--gutter) 0; }
  .neighbourhood__copy .eyebrow { margin-bottom: 20px; }

  .inquiry { grid-template-columns: 1fr; row-gap: 28px; }
  .form__grid { grid-template-columns: 1fr; }
  .form__grid .field + .field { margin-top: 26px; }

  .site-footer { gap: 48px; }
  .site-footer__bottom { flex-direction: column; align-items: center; gap: 28px; text-align: center; }
  .site-footer__right { flex-direction: column; align-items: center; gap: 28px; }
  .footer-nav ul { justify-content: center; }
  .social { text-align: center; }
}

@media (max-width: 560px) {
  .intro__media { aspect-ratio: 795 / 993; }
  .site-header { gap: 16px; }
  .site-header .logo__img { width: 170px; }
  .hero__meta { font-size: 13px; }
  .residences .display,
  .thanks .display { font-size: clamp(30px, 9vw, 40px); }
  .site-footer__top { align-items: center; }
  .site-footer .logo__img { width: 180px; }
  .footer-nav ul { flex-wrap: wrap; gap: 14px 24px; }
}
