/* Excellia Properties
   Palette drawn from the place: matte filao green, basalt stone, lime-washed walls, brass. */

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url("../fonts/fraunces.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 300 500;
  font-display: swap;
  src: url("../fonts/fraunces-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/hanken-grotesk.woff2") format("woff2");
}

:root {
  /* Matte, greyed green: the dark ground for forms, menu and bands. */
  --green-950: #212a25;
  --green-900: #2c3831;
  --green-800: #3a4840;
  --green-200: #c3cfc4;
  --basalt: #1e2527;
  --basalt-soft: #566164;
  --lime: #f1f3ef;
  --paper: #ffffff;
  --brass: #b3934b;
  --brass-light: #d2b574;
  --line: rgba(30, 37, 39, 0.16);
  --line-on-dark: rgba(255, 255, 255, 0.22);

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-text: "Hanken Grotesk", "Segoe UI", system-ui, sans-serif;

  --gutter: clamp(20px, 4.5vw, 64px);
  --wrap: 1360px;
  --section: clamp(72px, 10vw, 152px);
  --header-h: 72px;
}

@media (min-width: 1200px) {
  :root { --header-h: 92px; }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  background: var(--paper);
  color: var(--basalt);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.is-locked { overflow: hidden; }

img, video, iframe { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, p, ul, dl, dd, figure { margin: 0; }
ul { padding: 0; list-style: none; }
address { font-style: normal; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 300;
  font-variation-settings: "SOFT" 0, "WONK" 0;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.6rem, 6vw, 5.25rem); line-height: 1; letter-spacing: -0.025em; }
h2 { font-size: clamp(2.25rem, 4.6vw, 4rem); line-height: 1.05; }

a { color: inherit; }

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

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

.section { padding-block: var(--section); }
.main--offset { padding-top: var(--header-h); }

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 200;
  padding: 12px 18px;
  background: var(--paper);
  color: var(--basalt);
}
.skip-link:focus { top: 12px; }

/* ---------- Buttons and links ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 28px;
  border: 1px solid transparent;
  border-radius: 2px;
  font: 500 1rem/1.2 var(--font-text);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.button--light { background: var(--paper); color: var(--basalt); }
.button--light:hover { background: var(--lime); }

.button--ghost { background: transparent; color: var(--paper); border-color: rgba(255, 255, 255, 0.55); }
.button--ghost:hover { background: rgba(255, 255, 255, 0.12); border-color: var(--paper); }

.button--dark { background: var(--green-900); color: var(--paper); }
.button--dark:hover { background: var(--green-800); }

.button--brass { background: var(--brass); color: var(--green-900); }
.button--brass:hover { background: #c5a660; }

.play-icon { width: 0; height: 0; border-block: 6px solid transparent; border-left: 9px solid currentColor; }

.link {
  display: inline-block;
  padding-block: 6px;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--brass);
  text-decoration-thickness: 1px;
  text-underline-offset: 7px;
  transition: text-underline-offset 0.2s, text-decoration-thickness 0.2s;
}
.link:hover { text-decoration-thickness: 2px; text-underline-offset: 5px; }
.link--quiet { font-weight: 400; color: var(--basalt-soft); }
.link--on-dark { color: var(--paper); }

/* ---------- Status: where a residence is in its life ---------- */

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--basalt);
}
.status::before {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
}
.status--done::before { background: currentColor; }
.status--building::before { background: var(--brass); border-color: var(--brass); }
.status--on-dark { color: var(--paper); }

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  color: var(--paper);
  transition: background-color 0.3s, color 0.3s, box-shadow 0.3s;
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0 0 -48px 0;
  background: linear-gradient(to bottom, rgba(20, 27, 23,0.55), rgba(20, 27, 23,0));
  pointer-events: none;
  transition: opacity 0.3s;
}
.site-header.is-solid,
.site-header.is-menu-open {
  background: var(--paper);
  color: var(--basalt);
  box-shadow: 0 1px 0 var(--line);
}
.site-header.is-solid::before,
.site-header.is-menu-open::before { opacity: 0; }

.site-header__inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 24px;
  height: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.brand { flex: none; display: block; }
.brand__mark { width: 150px; height: auto; }
.brand__mark--gold { display: none; }
.is-solid .brand__mark--light, .is-menu-open .brand__mark--light { display: none; }
.is-solid .brand__mark--gold, .is-menu-open .brand__mark--gold { display: block; }

.site-nav { display: none; margin-left: auto; }
.site-nav ul { display: flex; gap: clamp(20px, 2.4vw, 40px); }
.site-nav a {
  padding-block: 8px;
  font-size: 0.9875rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.site-nav a:hover, .site-nav a[aria-current] { border-bottom-color: var(--brass); }

.site-header__tools { display: flex; align-items: center; gap: 20px; margin-left: auto; }

.lang { display: none; gap: 2px; }
.lang a {
  display: inline-grid;
  place-items: center;
  min-width: 36px;
  min-height: 36px;
  padding: 0 6px;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  opacity: 0.65;
}
.lang a:hover { opacity: 1; }
.lang a[aria-current] { opacity: 1; box-shadow: inset 0 -1px 0 var(--brass); }

.button--header {
  display: none;
  min-height: 44px;
  padding: 0 22px;
  border-color: currentColor;
  background: transparent;
  color: inherit;
  font-size: 0.9375rem;
  white-space: nowrap;
}
.button--header:hover { background: var(--brass); border-color: var(--brass); color: var(--green-900); }

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: 500 0.9375rem/1 var(--font-text);
  cursor: pointer;
}
.menu-toggle__icon { position: relative; width: 26px; height: 12px; }
.menu-toggle__icon::before,
.menu-toggle__icon::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.25s, top 0.25s, bottom 0.25s;
}
.menu-toggle__icon::before { top: 0; }
.menu-toggle__icon::after { bottom: 0; }
[aria-expanded="true"] .menu-toggle__icon::before { top: 5px; transform: rotate(45deg); }
[aria-expanded="true"] .menu-toggle__icon::after { bottom: 5.5px; transform: rotate(-45deg); }

@media (min-width: 768px) {
  .brand__mark { width: 172px; }
  .button--header { display: inline-flex; }
}

@media (min-width: 1200px) {
  .site-nav { display: block; }
  .site-header__tools { margin-left: clamp(16px, 2.5vw, 44px); }
  .lang { display: flex; }
  .menu-toggle { display: none; }
}

/* ---------- Full-screen menu (phone and tablet) ---------- */

.menu {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  padding: clamp(28px, 6vw, 64px) var(--gutter) 32px;
  background: var(--green-900);
  color: var(--paper);
  overflow-y: auto;
}
.menu[hidden] { display: none; }

.menu__list a {
  display: block;
  padding-block: 10px;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2rem, 7.5vw, 3.25rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-decoration: none;
}
.menu__list a:hover, .menu__list a[aria-current] { color: var(--green-200); }

.menu__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 24px;
  border-top: 1px solid var(--line-on-dark);
}
.menu__phone { font-size: 1.25rem; text-decoration: none; }
.lang--menu { display: flex; gap: 8px; }
.lang--menu a { min-width: 44px; min-height: 44px; font-size: 1rem; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--green-900);
  color: var(--paper);
  overflow: hidden;
}

.hero__media { position: absolute; inset: 0; }
.hero__poster, .hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero__video { opacity: 0; transition: opacity 0.7s ease; }
.hero__video.is-visible { opacity: 1; }
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(20, 27, 23,0.9) 0%, rgba(20, 27, 23,0.66) 36%, rgba(20, 27, 23,0.3) 62%, rgba(20, 27, 23,0.06) 86%),
    linear-gradient(to right, rgba(20, 27, 23,0.38) 0%, rgba(20, 27, 23,0) 70%);
}

.hero__content {
  position: relative;
  padding-top: calc(var(--header-h) + 48px);
  padding-bottom: clamp(32px, 5vw, 64px);
}

.hero__title {
  font-size: clamp(2.5rem, 7.4vw, 7rem);
  line-height: 0.98;
  text-wrap: initial;
  overflow-wrap: break-word;
}
.hero__title span { display: block; }
.hero__title span:last-child { font-style: italic; }

.hero__lead {
  max-width: 34rem;
  margin-top: clamp(20px, 2.4vw, 32px);
  font-size: clamp(1.0625rem, 1.3vw, 1.25rem);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(24px, 3vw, 40px); }

.hero__bar { position: relative; border-top: 1px solid var(--line-on-dark); }
.hero__bar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 24px;
  padding-block: 16px;
  font-size: 0.9375rem;
}
.hero__bar-inner p:not(.status) { color: rgba(255, 255, 255, 0.9); }
.hero__pause {
  margin-left: auto;
  min-height: 36px;
  padding: 0;
  border: 0;
  background: none;
  color: rgba(255, 255, 255, 0.75);
  font: 400 0.875rem/1 var(--font-text);
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}
.hero__pause:hover { color: var(--paper); }

@media (max-width: 767px) {
  .hero__actions .button { flex: 1 1 100%; }
  .hero__pause { margin-left: 0; }
}

/* One orchestrated moment: the headline settles in on load. */
@media (prefers-reduced-motion: no-preference) {
  .hero__title span,
  .hero__lead,
  .hero__actions {
    opacity: 0;
    transform: translateY(18px);
    animation: settle 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  }
  .hero__title span:last-child { animation-delay: 0.12s; }
  .hero__lead { animation-delay: 0.32s; }
  .hero__actions { animation-delay: 0.44s; }
}
@keyframes settle {
  to { opacity: 1; transform: none; }
}

/* ---------- Page head (all pages except home) ---------- */

.page-head { padding-block: clamp(56px, 8vw, 120px) clamp(40px, 5vw, 72px); background: var(--lime); }
.page-head .wrap { display: grid; gap: 20px; justify-items: start; }
.page-head__lead {
  max-width: 40rem;
  font-size: clamp(1.125rem, 1.5vw, 1.3125rem);
  line-height: 1.5;
  color: var(--basalt-soft);
}
.page-head__place { font-weight: 500; }
.page-head--residence .page-head__place { order: 0; }
.page-head__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: 12px; }
.jump ul { display: flex; flex-wrap: wrap; gap: 4px 28px; margin-top: 8px; }
.jump a {
  display: inline-block;
  padding-block: 8px;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--brass);
  text-decoration-thickness: 1px;
  text-underline-offset: 7px;
}

/* ---------- Home: about ---------- */

.about { background: var(--lime); padding-bottom: 0; }
.about__grid { display: grid; gap: 40px; }

.about__statement {
  max-width: 22ch;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.75rem, 3.6vw, 3.25rem);
  line-height: 1.14;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.about__detail { display: grid; gap: 28px; max-width: 34rem; justify-items: start; }
.about__detail > p { color: var(--basalt-soft); }

.about__figure {
  margin-top: clamp(48px, 7vw, 104px);
  /* the image stands half on the lime ground and half on the white below */
  background: linear-gradient(to bottom, transparent 50%, var(--paper) 50%);
}
.about__figure img, .band-figure img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: 50% 62%;
}

.band-figure { background: linear-gradient(to bottom, var(--lime) 50%, transparent 50%); }

@media (min-width: 900px) {
  .about__grid { grid-template-columns: 7fr 5fr; gap: clamp(40px, 6vw, 112px); align-items: end; }
  .about__statement { max-width: 20ch; }
  .about__figure img, .band-figure img { aspect-ratio: 21 / 9; }
}

/* ---------- Facts ---------- */

.facts { display: flex; flex-wrap: wrap; gap: 14px 40px; }
.facts dt { font-size: 0.875rem; color: var(--basalt-soft); }
.facts dd { font-family: var(--font-display); font-size: 1.375rem; font-weight: 400; line-height: 1.3; }
.facts--row { width: 100%; padding-block: 20px; border-block: 1px solid var(--line); }
.facts--band {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 24px 40px;
  margin-top: clamp(32px, 4vw, 56px);
  padding-block: 28px;
  border-block: 1px solid var(--line);
}

/* ---------- Section head ---------- */

.section-head { display: grid; gap: 18px; margin-bottom: clamp(40px, 6vw, 88px); }
.section-head p { max-width: 30rem; color: var(--basalt-soft); }
.section-head--split { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; }

@media (min-width: 900px) {
  .section-head:not(.section-head--split) { grid-template-columns: 7fr 5fr; align-items: end; gap: clamp(40px, 6vw, 112px); }
}

/* ---------- Residences: wide slabs, stepped like terraces ---------- */

.residence { display: grid; gap: 24px; }
.residence + .residence { margin-top: clamp(64px, 9vw, 136px); }

.residence__media, .residence-card__media, .post__media, .post__thumb { display: block; overflow: hidden; background: var(--lime); }
.residence__media img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; }

/* No photos yet: a slatted screen, like the timber facades of the residences,
   inside a fine brass frame, with the note set like the quote on the about page. */
.residence__media--empty, .residence-card__media--empty, .gallery__empty {
  position: relative;
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.055) 0 1px, transparent 1px 18px),
    linear-gradient(160deg, var(--green-800), var(--green-950));
  color: var(--paper);
  text-decoration: none;
}
.residence__media--empty::after, .residence-card__media--empty::after, .gallery__empty::after {
  content: "";
  position: absolute;
  inset: clamp(10px, 1.6vw, 18px);
  border: 1px solid rgba(179, 147, 75, 0.5);
  pointer-events: none;
}
:is(.residence__media--empty, .residence-card__media--empty, .gallery__empty) span {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 18px 28px;
  background: var(--green-900);
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.125rem, 1.7vw, 1.625rem);
  line-height: 1.2;
}
:is(.residence__media--empty, .residence-card__media--empty, .gallery__empty) span::before,
:is(.residence__media--empty, .residence-card__media--empty, .gallery__empty) span::after {
  content: "";
  width: 40px;
  height: 1px;
  background: var(--brass);
}
.residence__media--empty, .gallery__empty { aspect-ratio: 2 / 1; }
.residence-card__media--empty { aspect-ratio: 3 / 2; }

.residence__body { display: grid; gap: 14px; justify-items: start; align-content: end; }
.residence__body h2, .residence__body h3 { font-size: clamp(2rem, 3.6vw, 3.25rem); line-height: 1.05; }
.residence a, .residence-card a, .post h2 a, .post h3 a, .gallery-section h2 a { text-decoration: none; }
.residence :is(h2, h3) a:hover, .residence-card h3 a:hover, .post :is(h2, h3) a:hover, .gallery-section h2 a:hover {
  text-decoration: underline;
  text-decoration-color: var(--brass);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.14em;
}
.residence .link { text-decoration: underline; text-decoration-color: var(--brass); text-decoration-thickness: 1px; }
.residence__place { color: var(--basalt-soft); }
.residence__text { max-width: 30rem; }
.residence__body .facts { width: 100%; padding-top: 18px; border-top: 1px solid var(--line); }
.residence__links { display: flex; flex-wrap: wrap; gap: 4px 28px; }

@media (min-width: 768px) and (max-width: 1099px) {
  .residence__body { grid-template-columns: 1fr 1fr; column-gap: 40px; }
  .residence__body > .status,
  .residence__body > :is(h2, h3),
  .residence__body > .residence__place { grid-column: 1; }
  .residence__body > .residence__text { grid-column: 2; grid-row: 1 / span 2; align-self: end; }
  .residence__body > .facts { grid-column: 2; grid-row: 3; }
  .residence__body > .residence__links { grid-column: 1 / -1; }
}

@media (min-width: 1100px) {
  .residence { grid-template-columns: repeat(12, 1fr); column-gap: clamp(24px, 3vw, 48px); align-items: end; }
  .residence__media { grid-column: 1 / span 8; }
  .residence__body { grid-column: 9 / span 4; padding-bottom: 4px; }
  .residence--flip .residence__media { grid-column: 5 / span 8; grid-row: 1; }
  .residence--flip .residence__body { grid-column: 1 / span 4; grid-row: 1; }
}

.residence-row {
  display: grid;
  gap: 48px 32px;
  margin-top: clamp(64px, 9vw, 136px);
  padding-top: clamp(40px, 5vw, 64px);
  border-top: 1px solid var(--line);
}
.residence-card { display: grid; gap: 8px; justify-items: start; align-content: start; }
.residence-card__media { width: 100%; margin-bottom: 12px; }
.residence-card__media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.residence-card h3 { font-size: clamp(1.5rem, 2.2vw, 2rem); line-height: 1.12; }

@media (min-width: 560px) { .residence-row { grid-template-columns: 1fr 1fr; } }
@media (min-width: 720px) { .residence-row { grid-template-columns: repeat(3, 1fr); column-gap: clamp(24px, 3vw, 48px); } }

/* Residences page: one group per status */
.residences-list { padding-block: clamp(56px, 7vw, 104px) var(--section); }
.residence-group + .residence-group { margin-top: clamp(72px, 10vw, 152px); }
.residence-group__title {
  margin-bottom: clamp(28px, 4vw, 56px);
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  font-size: clamp(1.5rem, 2.4vw, 2rem);
}
.residence-group .residence__body h3 { font-size: clamp(2rem, 3.6vw, 3.25rem); }

/* ---------- Contact band ---------- */

.contact { background: var(--green-900); color: var(--paper); padding-block: var(--section); }
.contact__grid { display: grid; gap: 56px; }
.contact__intro { display: grid; gap: 20px; justify-items: start; align-content: start; }
.contact__intro > p { max-width: 26rem; color: rgba(255, 255, 255, 0.8); }

.contact__phone {
  margin-top: 12px;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.25rem, 5.4vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--brass);
  text-decoration: none;
  white-space: nowrap;
}
.contact__phone:hover { color: var(--brass-light); }
.contact__address { color: rgba(255, 255, 255, 0.8); }
.contact__address a { color: var(--paper); text-underline-offset: 5px; }

.form { display: grid; gap: 22px; align-content: start; }
.field { display: grid; gap: 8px; }
.field label { font-size: 0.9375rem; font-weight: 500; }
/* A field for spam programs only: people never see or reach it. */
.field--trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.field__hint { font-weight: 400; opacity: 0.7; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--paper);
  font: 400 1.0625rem/1.4 var(--font-text);
}
.field textarea { resize: vertical; }
/* Select: own arrow in brass; the open list in the same green as the form. */
.field select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' fill='none' stroke='%23b3934b' stroke-width='1.5'%3E%3Cpath d='M1 1l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  cursor: pointer;
}
.field select option { background: var(--green-900); color: var(--paper); }

/* Browsers that can style the open list itself get the full treatment. */
@supports (appearance: base-select) {
  .field select, .field select::picker(select) { appearance: base-select; }
  .field select { display: flex; align-items: center; justify-content: space-between; padding-right: 16px; background-image: none; }
  .field select::picker-icon {
    content: "";
    width: 14px;
    height: 8px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' fill='none' stroke='%23b3934b' stroke-width='1.5'%3E%3Cpath d='M1 1l6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
    transition: rotate 0.2s;
  }
  .field select:open::picker-icon { rotate: 180deg; }
  .field select::picker(select) {
    margin-top: 6px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    background: var(--green-950);
    color: var(--paper);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.4);
  }
  .field select option { padding: 12px 14px; background: transparent; cursor: pointer; }
  .field select option::checkmark { display: none; }
  .field select option:hover, .field select option:focus-visible { background: rgba(255, 255, 255, 0.08); outline: none; }
  .field select option:checked { color: var(--brass-light); }
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: rgba(255, 255, 255, 0.7); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 1px;
  border-color: transparent;
}
.field [aria-invalid="true"] { border-color: #ffb4a6; }
.form .button { justify-self: start; }
.form__status { font-size: 0.9375rem; color: var(--green-200); }
.form__status:empty { display: none; }

@media (min-width: 1000px) {
  .contact__grid { grid-template-columns: 7fr 5fr; gap: clamp(48px, 7vw, 128px); }
}

/* ---------- Journal ---------- */

.journal__grid { display: grid; gap: 48px; }
.journal--page { padding-block: clamp(56px, 7vw, 104px) var(--section); }

.post--lead { display: grid; gap: 14px; align-content: start; }
.post__media { margin-bottom: 10px; }
.post__media img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; }
.post--lead :is(h2, h3) { font-size: clamp(1.75rem, 2.8vw, 2.5rem); line-height: 1.1; }
.post p { max-width: 34rem; color: var(--basalt-soft); }

.post-list { display: grid; align-content: start; }
.post--row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 20px;
  align-items: center;
  padding-block: 22px;
  border-top: 1px solid var(--line);
}
.post--row:last-child { border-bottom: 1px solid var(--line); }
.post__thumb img { width: 96px; height: 96px; object-fit: cover; }
.post--row :is(h2, h3) { font-size: 1.375rem; line-height: 1.2; margin-bottom: 4px; letter-spacing: -0.01em; }
.post--row p { font-size: 1rem; line-height: 1.45; }

@media (min-width: 1000px) {
  .journal__grid { grid-template-columns: 7fr 5fr; gap: clamp(40px, 6vw, 112px); }
  .post--row { grid-template-columns: 112px 1fr; }
  .post__thumb img { width: 112px; height: 112px; }
}

/* ---------- Running text ---------- */

.prose { max-width: 44rem; }
.prose > * + * { margin-top: 1.25em; }
.prose h2 { margin-top: 1.6em; font-size: clamp(1.625rem, 2.6vw, 2.25rem); line-height: 1.15; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: #37403f; }
.prose ul:not([class]) { display: grid; gap: 0.6em; }
.prose ul:not([class]) li { position: relative; padding-left: 1.5em; }
.prose ul:not([class]) li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 0.75em;
  height: 1px;
  background: var(--brass);
}


/* Justified running text, with hyphenation so the word spacing stays even.
   Not on phones: short lines tear justified text apart. */
@media (min-width: 720px) {
  .prose > p, .purpose__item p, .profile__text p:last-child {
    text-align: justify;
    -webkit-hyphens: auto;
    hyphens: auto;
    hyphenate-limit-chars: 7 3 3;
    text-wrap: pretty;
  }
}

.feature-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.feature-list li { padding-block: 14px; border-bottom: 1px solid var(--line); color: var(--basalt); }
@media (min-width: 560px) {
  .feature-list:not(.feature-list--single) { grid-template-columns: 1fr 1fr; column-gap: 40px; }
}

/* ---------- About page ---------- */

/* Two sentences on how we work, set like a pull quote across the full width. */
.statement { padding-block: clamp(48px, 7vw, 112px); }
.statement__text {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.375rem, 2.5vw, 2.25rem);
  line-height: 1.3;
  letter-spacing: -0.015em;
  text-align: center;
  text-wrap: balance;
}
.statement__text::before, .statement__text::after {
  content: "";
  display: block;
  width: 64px;
  height: 1px;
  margin-inline: auto;
  background: var(--brass);
}
.statement__text::before { margin-bottom: clamp(24px, 3vw, 40px); }
.statement__text::after { margin-top: clamp(24px, 3vw, 40px); }

/* Mission and vision: side by side on a photo of the island. */
.purpose { position: relative; color: var(--paper); background: var(--green-950); }
.purpose__media { position: absolute; inset: 0; }
.purpose__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.purpose__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20, 27, 23, 0.88) 0%, rgba(20, 27, 23, 0.72) 45%, rgba(20, 27, 23, 0.4) 100%);
}
.purpose__grid {
  position: relative;
  display: grid;
  align-content: end;
  min-height: min(78vh, 760px);
  padding-block: clamp(120px, 20vw, 280px) clamp(40px, 6vw, 88px);
}
.purpose__item { display: grid; gap: 16px; align-content: start; padding-block: 28px; border-top: 1px solid var(--line-on-dark); }
.purpose__item h2 { font-size: clamp(2rem, 3.4vw, 3rem); line-height: 1.05; color: var(--brass-light); }
.purpose__item p { max-width: 32rem; color: rgba(255, 255, 255, 0.9); }
@media (min-width: 800px) {
  .purpose__grid { grid-template-columns: 1fr 1fr; }
  .purpose__item { padding: 32px clamp(24px, 4vw, 64px) 0 0; }
  .purpose__item + .purpose__item { padding-left: clamp(24px, 4vw, 64px); border-left: 1px solid var(--line-on-dark); }
}

/* Directors: portrait cards; the profile opens in a window. */
.people { background: var(--lime); }
.people__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px 20px; }
@media (min-width: 900px) {
  .people__grid { grid-template-columns: repeat(4, 1fr); column-gap: clamp(24px, 3vw, 48px); }
}
.person { display: grid; gap: 6px; justify-items: start; align-content: start; }
.person__photo {
  display: block;
  width: 100%;
  margin-bottom: 12px;
  padding: 0;
  border: 0;
  background: var(--paper);
  cursor: pointer;
}
.person__photo img, .profile__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 20%; }
.person h3 { font-size: clamp(1.25rem, 1.8vw, 1.625rem); line-height: 1.15; }
.person__role { font-size: 0.9375rem; color: var(--basalt-soft); }
.person__more {
  margin-top: 6px;
  padding: 6px 0;
  border: 0;
  background: none;
  color: inherit;
  font: 500 1rem/1.6 var(--font-text);
  cursor: pointer;
}

.profile {
  position: fixed;
  inset: 0;
  width: min(920px, calc(100vw - 2 * var(--gutter)));
  height: fit-content;
  max-height: calc(100dvh - 48px);
  margin: auto;
  padding: 0;
  border: 0;
  background: var(--paper);
  color: var(--basalt);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  overflow: auto;
}
.profile:popover-open { display: grid; }
.profile::backdrop { background: rgba(33, 42, 37, 0.84); }
.profile__photo img { aspect-ratio: 4 / 3; }
.profile__text { display: grid; gap: 10px; align-content: center; padding: clamp(24px, 4vw, 56px); }
.profile__text h3 { font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.1; }
.profile__text p:last-child { margin-top: 12px; color: #37403f; }
.profile__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--basalt);
  cursor: pointer;
  transition: border-color 0.2s;
}
.profile__close:hover { border-color: var(--brass); }
.profile__close::before, .profile__close::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 1.5px;
  background: currentColor;
}
.profile__close::before { transform: translate(-50%, -50%) rotate(45deg); }
.profile__close::after { transform: translate(-50%, -50%) rotate(-45deg); }
@media (min-width: 720px) {
  .profile:popover-open { grid-template-columns: 5fr 7fr; }
  .profile__photo img { height: 100%; aspect-ratio: 4 / 5; }
}
@media (prefers-reduced-motion: no-preference) {
  .profile:popover-open { animation: lightbox-in 0.25s ease; }
}

/* ---------- Residence page ---------- */

.gallery { background: linear-gradient(to bottom, var(--lime) 0, var(--lime) 120px, transparent 120px); }
.gallery__lead a, .gallery__thumbs a, .photo-grid a { display: block; overflow: hidden; background: var(--lime); cursor: zoom-in; }
.gallery__lead img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; }
.gallery__thumbs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(140px, 1fr);
  gap: 8px;
  margin-top: 8px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
}
.gallery__thumbs li { scroll-snap-align: start; }
.gallery__thumbs img, .photo-grid img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.gallery__thumbs a:hover img, .photo-grid a:hover img, .gallery__lead a:hover img { opacity: 0.9; }
.gallery__thumbs:empty { display: none; }

.detail__grid { display: grid; gap: 56px; }
.enquiry {
  display: grid;
  gap: 18px;
  align-content: start;
  padding: clamp(24px, 3vw, 40px);
  background: var(--green-900);
  color: var(--paper);
}
.enquiry h2 { font-size: clamp(1.625rem, 2.2vw, 2rem); line-height: 1.15; }
.enquiry > p { color: rgba(255, 255, 255, 0.8); }
.enquiry__phone a { font-family: var(--font-display); font-size: 1.5rem; color: var(--brass); text-decoration: none; }
.enquiry__phone a:hover { color: var(--brass-light); }
.contact-list { display: grid; gap: 16px; }
.contact-list dt { font-size: 0.875rem; color: rgba(255, 255, 255, 0.7); }
.contact-list a { color: var(--paper); text-underline-offset: 5px; overflow-wrap: anywhere; }

@media (min-width: 1000px) {
  .detail__grid { grid-template-columns: 7fr 5fr; gap: clamp(48px, 7vw, 128px); align-items: start; }
  .enquiry { position: sticky; top: calc(var(--header-h) + 24px); }
}

.map {
  display: grid;
  gap: 14px;
  justify-items: start;
  padding: clamp(20px, 3vw, 32px);
  background: var(--lime);
}
.map__note { font-size: 0.9375rem; color: var(--basalt-soft); }
.map iframe { width: 100%; height: clamp(300px, 45vw, 440px); border: 0; }
.map.is-loaded { padding: 0; background: none; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-bottom: 8px;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}
.back-link::before {
  content: "";
  width: 7px;
  height: 7px;
  border-left: 1.5px solid var(--brass);
  border-bottom: 1.5px solid var(--brass);
  transform: rotate(45deg);
}
.back-link:hover { text-decoration: underline; text-decoration-color: var(--brass); text-underline-offset: 6px; }

.next { border-top: 1px solid var(--line); }
.next__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px 40px;
  padding-block: clamp(40px, 6vw, 88px);
}
.next__link { display: grid; gap: 6px; text-decoration: none; }
.next__label { font-size: 0.9375rem; color: var(--basalt-soft); }
.next__name { font-family: var(--font-display); font-weight: 300; font-size: clamp(2.25rem, 5vw, 4.5rem); line-height: 1.05; letter-spacing: -0.02em; }
.next__link:hover .next__name { text-decoration: underline; text-decoration-color: var(--brass); text-decoration-thickness: 1px; text-underline-offset: 0.12em; }

/* ---------- Gallery page ---------- */

.gallery-page { padding-block: clamp(56px, 7vw, 104px) var(--section); }
.gallery-section + .gallery-section { margin-top: clamp(64px, 8vw, 120px); }
.gallery-section__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 24px; margin-bottom: 24px; }
.gallery-section__head h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
.gallery-section__head p { color: var(--basalt-soft); }
.photo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 720px) { .photo-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; } }
@media (min-width: 1200px) { .photo-grid { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Lightbox ---------- */

.lightbox {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--green-950);
  color: var(--paper);
  overflow: hidden;
}
.lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.lightbox::backdrop { background: var(--green-950); }

.lightbox__bar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px var(--gutter);
  border-bottom: 1px solid var(--line-on-dark);
}
.lightbox__title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.25rem, 2vw, 1.625rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.lightbox__close { margin-left: auto; }
.lightbox__count + .lightbox__close { margin-left: 0; }
.lightbox__count {
  margin-left: auto;
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.75);
  white-space: nowrap;
}

.lightbox button { color: var(--paper); cursor: pointer; }
.lightbox__close, .lightbox__nav {
  position: relative;
  flex: none;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: none;
  transition: border-color 0.2s, background-color 0.2s;
}
.lightbox__close:hover, .lightbox__nav:hover { border-color: var(--brass); background: rgba(255, 255, 255, 0.06); }
.lightbox__close::before, .lightbox__close::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 1.5px;
  background: currentColor;
}
.lightbox__close::before { transform: translate(-50%, -50%) rotate(45deg); }
.lightbox__close::after { transform: translate(-50%, -50%) rotate(-45deg); }
.lightbox__nav::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  border-left: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translate(-30%, -50%) rotate(45deg);
}
.lightbox__next::before { transform: translate(-70%, -50%) rotate(-135deg); }

.lightbox__stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  place-items: center;
  min-height: 0;
  padding: clamp(12px, 2.5vw, 32px) var(--gutter);
  touch-action: pan-y;
}
.lightbox__stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.lightbox__stage img.is-ready { opacity: 1; }
/* On phones the photos are changed by swiping or with the strip below. */
.lightbox__nav { display: none; }
@media (min-width: 720px) {
  .lightbox__stage { grid-template-columns: auto minmax(0, 1fr) auto; column-gap: clamp(16px, 3vw, 40px); }
  .lightbox__nav { display: block; }
}

.lightbox__strip {
  position: relative;
  display: flex;
  justify-content: safe center;
  gap: 8px;
  padding: 12px var(--gutter) 16px;
  border-top: 1px solid var(--line-on-dark);
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}
.lightbox__strip[hidden] { display: none; }
.lightbox__strip button {
  display: block;
  width: clamp(64px, 9vw, 96px);
  padding: 0;
  border: 0;
  background: none;
  opacity: 0.45;
  transition: opacity 0.2s;
}
.lightbox__strip img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.lightbox__strip button:hover { opacity: 0.85; }
.lightbox__strip button[aria-current="true"] { opacity: 1; outline: 1.5px solid var(--brass); outline-offset: 2px; }

@media (prefers-reduced-motion: no-preference) {
  .lightbox[open] { animation: lightbox-in 0.25s ease; }
}
@keyframes lightbox-in {
  from { opacity: 0; }
}

/* ---------- Journal article ---------- */

.article__figure { background: linear-gradient(to bottom, var(--lime) 50%, transparent 50%); }
.article__figure img { width: 100%; max-height: 72vh; object-fit: cover; }
.article__figure video { width: 100%; aspect-ratio: 16 / 9; background: #000; }
.article__figure--narrow img { width: min(100%, 26rem); max-height: none; aspect-ratio: 1; object-position: 50% 20%; }
.prose--article { padding-top: clamp(40px, 5vw, 72px); }
.article__back { padding-block: clamp(40px, 5vw, 72px) var(--section); }

.doc-list { display: grid; margin-top: 2em; border-top: 1px solid var(--line); }
.doc { display: grid; grid-template-columns: 120px 1fr; gap: 24px; align-items: center; padding-block: 24px; border-bottom: 1px solid var(--line); }
.doc img { width: 120px; aspect-ratio: 4 / 5; object-fit: cover; object-position: top; }
.doc h2 { margin: 0 0 6px; font-size: 1.5rem; line-height: 1.2; }
.doc p { margin-bottom: 4px; }
@media (min-width: 720px) { .doc { grid-template-columns: 160px 1fr; gap: 32px; } .doc img { width: 160px; } }

/* ---------- Footer ---------- */

/* One step deeper than the green bands, so a band directly above stays readable as its own block. */
.site-footer { background: var(--green-950); color: rgba(255, 255, 255, 0.82); font-size: 1rem; }
.site-footer__grid { display: grid; gap: 40px 32px; padding-block: clamp(56px, 7vw, 96px); grid-template-columns: 1fr 1fr; }
.site-footer__brand { grid-column: 1 / -1; display: grid; gap: 18px; align-content: start; max-width: 22rem; }
.site-footer__brand img { width: 170px; }
.site-footer h2 {
  margin-bottom: 14px;
  font-family: var(--font-text);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.4;
  color: var(--paper);
}
.site-footer li a { display: inline-block; padding-block: 5px; text-decoration: none; overflow-wrap: anywhere; }
.site-footer a:hover { color: var(--paper); text-decoration: underline; text-decoration-color: var(--brass); text-underline-offset: 5px; }
.site-footer address { margin-top: 8px; max-width: 16rem; line-height: 1.5; }

.site-footer .social a { display: inline-flex; align-items: center; gap: 12px; }
.social svg { flex: none; }

.site-footer__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 22px;
  border-top: 1px solid var(--line-on-dark);
  font-size: 0.9375rem;
}
.site-footer__base a { display: inline-block; padding-block: 5px; text-decoration: none; }

/* ---------- Legal notice ---------- */

.legal { padding-block: clamp(48px, 6vw, 88px) var(--section); }
.legal__list { display: grid; gap: 14px; margin-top: 1em; }
.legal__list dt { font-size: 0.875rem; color: var(--basalt-soft); }
.legal__list a { text-underline-offset: 5px; }

.site-footer__follow, .site-footer__contact { grid-column: 1 / -1; }

@media (min-width: 560px) {
  .site-footer__follow, .site-footer__contact { grid-column: auto; }
}
@media (min-width: 1200px) {
  .site-footer__grid { grid-template-columns: 4fr 2fr 2fr 3fr 2fr; }
  .site-footer__brand { grid-column: auto; }
}

/* ---------- Film ---------- */

/* The film opens in the same full-screen frame as the photos. */
.lightbox__stage video {
  grid-column: 1 / -1;
  width: auto;
  height: auto;
  max-width: min(100%, 1280px);
  max-height: 100%;
  aspect-ratio: 1920 / 828;
  background: #000;
}

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