@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;1,500&family=Figtree:ital,wght@0,400;0,500;0,600&display=swap");

:root {
  --bg: #f3eee4;
  --bg-elevated: #faf7f1;
  --fg: #1a2c33;
  --fg-muted: #5c6569;
  --fg-subtle: #7a8387;
  --ink: #1b3a4b;
  --ink-hover: #152e3c;
  --accent: #1b3a4b;
  --accent-fg: #f3eee4;
  --border: color-mix(in oklab, var(--fg) 14%, transparent);
  --border-strong: color-mix(in oklab, var(--fg) 24%, transparent);
  --shadow-border:
    0 0 0 1px rgba(26, 44, 51, 0.06),
    0 1px 2px -1px rgba(26, 44, 51, 0.06),
    0 2px 4px 0 rgba(26, 44, 51, 0.04);
  --shadow-border-hover:
    0 0 0 1px rgba(26, 44, 51, 0.1),
    0 1px 2px -1px rgba(26, 44, 51, 0.08),
    0 8px 20px -12px rgba(26, 44, 51, 0.18);

  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 72px;
  --space-9: 96px;

  --font-display: "Cormorant Garamond", "Palatino Linotype", Palatino, serif;
  --font-body: "Figtree", "Segoe UI", system-ui, sans-serif;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --text-lg: clamp(1.125rem, 1.05rem + 0.35vw, 1.25rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  --text-2xl: clamp(2rem, 1.35rem + 2.2vw, 3.25rem);
  --text-3xl: clamp(2.4rem, 1.5rem + 3.2vw, 4.25rem);

  --leading-tight: 1.12;
  --leading-snug: 1.28;
  --leading-body: 1.65;
  --tracking-display: -0.028em;
  --tracking-wide: 0.14em;

  --wrap: 72rem;
  --measure: 40rem;
  --header-h: 4.25rem;

  --motion-quick: 150ms;
  --motion-fast: 250ms;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  color: var(--fg);
  background: var(--bg);
  text-align: center;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  margin-inline: auto;
  border-radius: var(--radius-lg);
  outline: 1px solid rgba(26, 44, 51, 0.1);
  outline-offset: -1px;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-display);
  text-wrap: balance;
  text-align: center;
  color: var(--ink);
  margin: 0 auto var(--space-4);
}

h1 {
  font-size: var(--text-3xl);
  max-width: 16ch;
}

h2 {
  font-size: var(--text-xl);
  max-width: 22ch;
}

h3 {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  letter-spacing: 0;
  line-height: var(--leading-snug);
  max-width: none;
}

p {
  margin: 0 auto var(--space-4);
  max-width: var(--measure);
  text-align: center;
  text-wrap: pretty;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--ink);
  text-underline-offset: 0.18em;
}

a:hover {
  color: color-mix(in oklab, var(--ink) 80%, black);
}

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

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: 100;
  background: var(--ink);
  color: var(--accent-fg);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  top: var(--space-4);
  color: var(--accent-fg);
}

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

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

/* Buttons */
.btn,
.btn-secondary,
button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.7rem 1.35rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 550;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    background-color var(--motion-quick) var(--ease-out),
    color var(--motion-quick) var(--ease-out),
    border-color var(--motion-quick) var(--ease-out),
    box-shadow var(--motion-quick) var(--ease-out),
    transform var(--motion-quick) var(--ease-out);
}

.btn,
button[type="submit"] {
  background: var(--accent);
  color: var(--accent-fg);
}

.btn:hover,
button[type="submit"]:hover {
  background: var(--ink-hover);
  color: var(--accent-fg);
}

.btn:active,
.btn-secondary:active,
button[type="submit"]:active {
  transform: scale(0.98);
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background: color-mix(in oklab, var(--ink) 6%, transparent);
  color: var(--ink);
}

p:has(.btn),
p:has(.btn-secondary) {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-3);
  max-width: none;
  margin-inline: auto;
}

/* Site header */
body > header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  min-height: var(--header-h);
  padding: var(--space-3) clamp(1rem, 4vw, 2.5rem);
  text-align: left;
  background: color-mix(in oklab, var(--bg) 88%, white);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.brand {
  margin-right: auto;
}

.brand p {
  margin: 0.15rem 0 0;
  max-width: none;
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
  color: var(--fg-muted);
}

.brand a {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  color: var(--ink);
}

.brand a img {
  width: 28px;
  height: 28px;
  margin: 0;
  border-radius: 6px;
  outline: none;
}

.brand a span {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 44px;
  min-width: 44px;
  padding: 0 var(--space-4);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 550;
  cursor: pointer;
  user-select: none;
}

.menu-toggle-bars {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 16px;
}

.menu-toggle-bars span {
  display: block;
  height: 2px;
  width: 100%;
  background: currentColor;
  border-radius: 1px;
  transition:
    transform var(--motion-fast) var(--ease-out),
    opacity var(--motion-fast) var(--ease-out);
}

body > header.nav-open .menu-toggle-bars span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

body > header.nav-open .menu-toggle-bars span:nth-child(2) {
  opacity: 0;
}

body > header.nav-open .menu-toggle-bars span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

body > header > .btn {
  display: inline-flex;
}

body > header nav {
  display: none;
  flex-basis: 100%;
  padding: var(--space-2) 0 var(--space-3);
  text-align: center;
}

body > header.nav-open nav {
  display: block;
}

body > header nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  width: auto;
  max-width: none;
  display: grid;
  gap: 2px;
  justify-items: center;
}

body > header nav li {
  margin: 0 0 var(--space-3);
}

body > header nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 var(--space-3);
  text-decoration: none;
  color: var(--fg);
  border-radius: var(--radius-sm);
}

body > header nav a:hover,
body > header nav a[aria-current="page"] {
  background: color-mix(in oklab, var(--ink) 7%, transparent);
  color: var(--ink);
}

@media (min-width: 1080px) {
  body > header {
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: var(--space-2);
    padding-inline: clamp(1rem, 2.5vw, 2rem);
  }

  .brand {
    flex-shrink: 0;
    margin-right: 0;
  }

  body > header > .btn {
    flex-shrink: 0;
  }

  body > header nav {
    display: flex;
    flex-basis: auto;
    flex: 1 1 auto;
    min-width: 0;
    padding: 0;
    justify-content: center;
    align-items: center;
  }

  body > header nav ul {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 0.1rem;
    width: auto;
    max-width: none;
  }

  body > header nav li {
    margin: 0;
    flex-shrink: 0;
  }

  body > header nav a {
    padding: 0.35rem 0.55rem;
    font-size: 0.8125rem;
    white-space: nowrap;
    min-height: 2.5rem;
  }

  body > header .menu-toggle {
    display: none;
  }
}

@media (min-width: 1240px) {
  body > header nav a {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-sm);
  }

  body > header nav ul {
    gap: var(--space-1);
  }
}

/* Main content */
main {
  flex: 1;
  width: min(100% - 2rem, var(--wrap));
  margin-inline: auto;
  padding-block: var(--space-8) var(--space-9);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-8);
}

main > header,
main > section,
main > article,
main > figure,
main > nav {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

main > header,
section[aria-labelledby="hero-title"] {
  gap: 0;
}

main > header > p:first-child,
section[aria-labelledby="hero-title"] > p:first-child {
  margin-bottom: var(--space-3);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--fg-muted);
}

main > header > p:last-of-type,
section[aria-labelledby="hero-title"] > p:nth-of-type(2) {
  font-size: var(--text-lg);
  color: var(--fg-muted);
  max-width: 36rem;
}

main > header {
  margin-bottom: var(--space-2);
}

section {
  gap: var(--space-4);
}

section > h2 {
  margin-bottom: var(--space-2);
}

section > img,
article > img {
  width: 100%;
  max-width: 52rem;
  margin-block: var(--space-2) var(--space-4);
}

figure {
  margin: 0;
  width: 100%;
  max-width: 64rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

figure img {
  width: 100%;
}

figcaption {
  margin-top: var(--space-3);
  max-width: var(--measure);
  font-size: var(--text-sm);
  color: var(--fg-muted);
  text-align: center;
}

ul,
ol {
  width: 100%;
  max-width: 36rem;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

ol {
  list-style: decimal;
  list-style-position: inside;
}

li {
  margin: 0 0 var(--space-3);
  text-align: center;
}

li:last-child {
  margin-bottom: 0;
}

ol li {
  text-align: left;
  padding-left: 0.25rem;
}

section > a:not(.btn):not(.btn-secondary),
article > a:not(.btn):not(.btn-secondary) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: var(--space-2);
}

section > .btn,
section > .btn-secondary,
article > .btn,
main > p > .btn {
  margin-top: var(--space-2);
}

address {
  font-style: normal;
  text-align: center;
  margin: 0 auto var(--space-4);
  max-width: var(--measure);
}

address p {
  margin-bottom: var(--space-3);
}

blockquote {
  margin: 0 auto;
  padding: var(--space-5) var(--space-4);
  width: 100%;
  max-width: 40rem;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-border);
}

blockquote p {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-style: italic;
  line-height: var(--leading-snug);
  color: var(--ink);
}

blockquote footer {
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  color: var(--fg-muted);
  font-style: normal;
}

/* Home: three highlights */
section[aria-labelledby="intro-title"] > ul {
  display: grid;
  gap: var(--space-4);
  max-width: 100%;
  margin-top: var(--space-3);
}

section[aria-labelledby="intro-title"] li {
  margin: 0;
  padding: var(--space-5);
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-border);
}

section[aria-labelledby="intro-title"] li img {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  margin: 0 0 var(--space-4);
  border-radius: var(--radius-sm);
}

section[aria-labelledby="intro-title"] h3 {
  margin-bottom: var(--space-2);
}

section[aria-labelledby="intro-title"] p {
  margin: 0 auto;
  color: var(--fg-muted);
}

/* Home: apartment cards */
section[aria-labelledby="featured-title"] {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: var(--space-5);
}

section[aria-labelledby="featured-title"] > h2,
section[aria-labelledby="featured-title"] > p {
  grid-column: 1 / -1;
}

section[aria-labelledby="featured-title"] article,
main > article {
  width: 100%;
  max-width: 36rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-5);
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-border);
  text-align: center;
}

section[aria-labelledby="featured-title"] article img,
main > article img {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  margin: 0 0 var(--space-4);
}

section[aria-labelledby="featured-title"] article h3,
main > article h2 {
  margin-bottom: var(--space-2);
  max-width: none;
}

section[aria-labelledby="featured-title"] article p,
main > article p {
  max-width: 32rem;
}

main > article ul {
  margin: var(--space-2) auto var(--space-4);
}

/* Apartment jump links */
main > nav[aria-label="Apartments"] ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
  max-width: none;
  margin: 0;
}

main > nav[aria-label="Apartments"] li {
  margin: 0;
}

main > nav[aria-label="Apartments"] a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.45rem 1rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  text-decoration: none;
  color: var(--ink);
  font-size: var(--text-sm);
}

main > nav[aria-label="Apartments"] a:hover {
  background: color-mix(in oklab, var(--ink) 6%, transparent);
}

/* Gallery */
section[aria-labelledby="gallery-title"] {
  gap: var(--space-5);
}

section[aria-labelledby="gallery-title"] ul {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  max-width: 100%;
}

section[aria-labelledby="gallery-title"] li {
  margin: 0;
}

section[aria-labelledby="gallery-title"] figure {
  max-width: none;
}

section[aria-labelledby="gallery-title"] img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  cursor: zoom-in;
  transition:
    transform var(--motion-fast) var(--ease-out),
    box-shadow var(--motion-fast) var(--ease-out);
}

section[aria-labelledby="gallery-title"] img:hover {
  box-shadow: var(--shadow-border-hover);
}

/* Reviews */
section[aria-labelledby="stories-title"] {
  gap: var(--space-5);
}

section[aria-labelledby="stories-title"] blockquote img {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  margin: 0 auto var(--space-4);
  border-radius: var(--radius-sm);
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.7s var(--ease-out),
    transform 0.7s var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Contact form + map */
.contact-split {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  width: 100%;
  max-width: 72rem;
  margin-top: var(--space-2);
}

.contact-split form {
  width: 100%;
  margin: 0;
}

#enquiry {
  scroll-margin-top: calc(var(--header-h) + 0.75rem);
}

.map-embed {
  position: relative;
  width: 100%;
  min-height: 320px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-elevated);
  box-shadow: var(--shadow-border);
  outline: 1px solid rgba(26, 44, 51, 0.1);
  outline-offset: -1px;
}

.map-embed iframe {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: var(--radius-lg);
}

form {
  width: min(100%, 36rem);
  margin: var(--space-2) auto 0;
  text-align: left;
}

form p {
  margin: 0 0 var(--space-4);
  max-width: none;
  text-align: left;
}

form label {
  display: block;
  margin-bottom: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 550;
}

form input,
form select,
form textarea {
  width: 100%;
  min-height: 44px;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--fg);
  font: inherit;
}

form textarea {
  min-height: 8rem;
  resize: vertical;
}

form input[type="checkbox"] {
  width: auto;
  min-height: 1.15rem;
  margin: 0.2rem 0 0;
  accent-color: var(--ink);
}

form p:has(input[type="checkbox"]) label {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  font-weight: 400;
}

form p:has(button[type="submit"]) {
  display: flex;
  justify-content: center;
  text-align: center;
  margin-top: var(--space-5);
  margin-bottom: 0;
}

.field-error {
  display: block;
  margin-top: var(--space-1);
  font-size: var(--text-sm);
  color: #8b2e2e;
}

.form-status {
  width: min(100%, 36rem);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-border);
}

#form-status-error {
  color: #8b2e2e;
}

/* Footer */
body > footer {
  margin-top: auto;
  padding: var(--space-8) clamp(1rem, 4vw, 2.5rem) var(--space-6);
  background: var(--ink);
  color: var(--accent-fg);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
}

body > footer p,
body > footer a {
  color: color-mix(in oklab, var(--accent-fg) 88%, white);
}

body > footer a:hover {
  color: white;
}

body > footer p {
  margin: 0 auto;
  max-width: 40rem;
}

body > footer div p {
  margin-bottom: var(--space-1);
}

body > footer div p:last-child {
  margin-bottom: 0;
}

body > footer nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2) var(--space-5);
  max-width: none;
  margin: 0;
  padding: 0;
  list-style: none;
}

body > footer nav li {
  margin: 0;
}

body > footer nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}

body > footer small {
  display: block;
  font-size: var(--text-xs);
  line-height: 1.55;
  color: color-mix(in oklab, var(--accent-fg) 62%, transparent);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  background: rgba(15, 24, 28, 0.88);
}

.lightbox[hidden] {
  display: none;
}

.lightbox-figure {
  margin: 0;
  max-width: min(90vw, 72rem);
  max-height: 90vh;
}

.lightbox-figure img {
  max-height: 78vh;
  width: auto;
  max-width: 100%;
  outline: none;
}

.lightbox-figure figcaption {
  color: color-mix(in oklab, var(--accent-fg) 80%, white);
}

.lightbox-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--accent-fg);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

body.lightbox-open {
  overflow: hidden;
}

@media (min-width: 700px) {
  section[aria-labelledby="intro-title"] > ul {
    grid-template-columns: repeat(3, 1fr);
    align-items: stretch;
  }

  section[aria-labelledby="gallery-title"] ul {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  section[aria-labelledby="featured-title"] {
    grid-template-columns: repeat(3, 1fr);
    align-items: stretch;
  }

  section[aria-labelledby="featured-title"] article {
    max-width: none;
    height: 100%;
  }

  section[aria-labelledby="gallery-title"] ul {
    grid-template-columns: repeat(3, 1fr);
  }

  main > article {
    max-width: 48rem;
    padding: var(--space-6);
  }

  .contact-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
    align-items: stretch;
  }

  .contact-split .map-embed {
    min-height: 100%;
  }

  .contact-split:has(form[hidden]) {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
