/* Saint Andrews Lane — built on the Oakâme style reference (Refero).
   Two colours, one typeface, hairlines, no shadows, no gradients, square images, pill controls. */

:root {
  --ink: #403a34;
  --canvas: #f6f1eb;
  --body: #333333;
  --quiet: #555555;

  --font: "Inter", "Neue Haas Grotesk Display", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --text-label: 10px;
  --text-caption: 12px;
  --text-body: 18px;
  --text-lead: 20px;
  --text-heading-sm: 40px;
  --text-heading-lg: 60px;
  --text-statement: clamp(40px, 4.3vw, 60px);
  --text-display: clamp(60px, 11.5vw, 180px);
  --text-hero: clamp(60px, 10vw, 250px);

  --gutter: 20px;
  --pad: clamp(20px, 2.2vw, 30px);
  --section: clamp(68px, 9vw, 120px);
  --hairline: 1px solid var(--ink);
}

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

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

body {
  margin: 0;
  background: var(--canvas);
  color: var(--body);
  font-family: var(--font);
  font-size: var(--text-body);
  line-height: 1.5;
  letter-spacing: -0.004em;
  font-feature-settings: "ss01" on, "cv11" on, "tnum" on;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; width: 100%; height: auto; border-radius: 0; }
a { color: inherit; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.hero :focus-visible, .lightbox :focus-visible { outline-color: var(--canvas); }

.skip {
  position: absolute; left: var(--pad); top: -60px;
  background: var(--ink); color: var(--canvas);
  padding: 12px 24px; font-size: var(--text-caption);
  text-transform: uppercase; letter-spacing: 0.083em; text-decoration: none; z-index: 10;
}
.skip:focus { top: 12px; }

/* ---------- type roles ---------- */

.label {
  font-size: var(--text-caption);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.083em;
  text-transform: uppercase;
  color: var(--ink);
}
.label--xs { font-size: var(--text-label); letter-spacing: 0.1em; }
.label--quiet { color: var(--quiet); }

.display {
  font-size: var(--text-display);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.056em;
  color: var(--ink);
}

.statement {
  font-size: var(--text-statement);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.056em;
  text-transform: uppercase;
  color: var(--ink);
  text-wrap: balance;
}

.lead {
  font-size: var(--text-lead);
  font-weight: 500;
  line-height: 1.25;
  text-transform: uppercase;
  color: var(--ink);
}

/* ---------- layout ---------- */

.wrap { max-width: 1400px; margin-inline: auto; padding-inline: var(--pad); }
.rule { border: 0; border-top: var(--hairline); margin: 0; }
.section { padding-block: var(--section); }
.stack-20 > * + * { margin-top: 20px; }
.stack-40 > * + * { margin-top: 40px; }

/* ---------- nav ---------- */

.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 30px; min-height: 68px;
  padding-inline: var(--pad);
  border-bottom: var(--hairline);
}
.wordmark {
  font-size: var(--text-body); font-weight: 500; color: var(--ink);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px;
  white-space: nowrap;
}
.nav__links { display: flex; align-items: center; gap: 30px; list-style: none; margin: 0; padding: 0; }
.nav__links a { text-decoration: none; }
.nav__links a:not(.pill):hover { text-decoration: underline; text-underline-offset: 6px; }

.pill {
  display: inline-block;
  border: var(--hairline); border-radius: 9999px;
  padding: 8px 20px;
  background: transparent; color: var(--ink);
  font: inherit; font-size: var(--text-caption); font-weight: 500; line-height: 1.3;
  letter-spacing: 0.083em; text-transform: uppercase; text-decoration: none; white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.pill:hover { background: var(--ink); color: var(--canvas); }

.button {
  display: inline-block;
  background: var(--ink); color: var(--canvas);
  border: var(--hairline); border-radius: 0;
  padding: 12px 24px;
  font: inherit; font-size: var(--text-caption); font-weight: 500; line-height: 1.3;
  letter-spacing: 0.083em; text-transform: uppercase; text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.button:hover { background: var(--canvas); color: var(--ink); }

/* ---------- hero ---------- */

.hero {
  position: relative;
  height: min(86vh, 62vw + 240px);
  min-height: 520px;
  overflow: hidden;
  background: var(--ink);
  border-bottom: var(--hairline);
}
.hero__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 0.6s ease;
}
.hero__img.is-active { opacity: 1; }
video.hero__img { background: #000; }
/* a single flat veil (not a gradient) so the display word holds on daylight frames */
.hero::after { content: ""; position: absolute; inset: 0; background: rgb(64 58 52 / 0.28); pointer-events: none; }

.hero__content {
  position: absolute; z-index: 1; inset: auto 0 0 0;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 40px;
  padding: var(--pad);
}
.hero__title { color: var(--canvas); }
.hero__title .label { color: var(--canvas); display: block; margin-bottom: 8px; }
.hero__word {
  display: block;
  font-size: var(--text-hero); font-weight: 400; line-height: 1.1; letter-spacing: -0.056em;
  margin-left: -0.04em; white-space: nowrap;
}
.strip { display: flex; gap: clamp(8px, 1vw, 20px); flex: none; }
.hero__side { padding-bottom: 1.6vw; }
.strip button {
  width: clamp(56px, 4.2vw, 120px); aspect-ratio: 14 / 9; padding: 0; background: none; cursor: pointer;
  border: 1px solid transparent; border-radius: 0; overflow: hidden;
}
.strip button[aria-pressed="true"] { border-color: var(--canvas); }
.strip img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- facts ---------- */

.facts { display: grid; grid-template-columns: repeat(6, 1fr); border-bottom: var(--hairline); }
.facts > div { padding: 40px var(--pad); border-left: var(--hairline); }
.facts > div:first-child { border-left: 0; }
.facts dt { margin-bottom: 8px; }
.facts dd {
  font-size: var(--text-heading-sm); font-weight: 400; line-height: 1.25; letter-spacing: -0.056em;
  color: var(--ink); white-space: nowrap;
}
.facts dd small { font-size: var(--text-body); letter-spacing: -0.004em; }

/* ---------- editorial split ---------- */

.split { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gutter); row-gap: 20px; }
.split__label { grid-column: 1 / span 5; text-align: right; padding-right: 20px; }
.split__body { grid-column: 7 / span 6; max-width: 50ch; }
.split__body p + p { margin-top: 20px; }

/* ---------- chapters ---------- */

.chapter__head { padding-block: var(--section) 40px; }
.chapter__head .label { display: block; margin-bottom: 8px; }
.chapter__head .display { margin-left: -0.04em; }

.bleed { border-block: var(--hairline); }
.bleed img { width: 100%; max-height: 92vh; object-fit: cover; }

.plates { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gutter); }
.plate { grid-column: span 6; }
.plate--4 { grid-column: span 4; }
.plate--3 { grid-column: span 3; }
.plate--8 { grid-column: span 8; }
.plate img { border: var(--hairline); aspect-ratio: 3 / 2; object-fit: cover; height: auto; }
.plate--square img { aspect-ratio: 1; }
.plate--tall img { aspect-ratio: 3 / 4; }
.plate--fill { display: flex; flex-direction: column; }
.plate--fill img { flex: 1; aspect-ratio: auto; min-height: 0; }
figcaption { margin-top: 8px; }

/* ---------- gallery ---------- */

.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gutter); list-style: none; margin: 0; padding: 0; }
.gallery button {
  display: block; width: 100%; padding: 0; background: none; cursor: zoom-in;
  border: var(--hairline); border-radius: 0; overflow: hidden;
}
.gallery img { aspect-ratio: 1; object-fit: cover; transition: opacity 0.2s ease; }
.gallery button:hover img { opacity: 0.86; }
.gallery .label { display: block; margin-top: 8px; }

.lightbox {
  width: 100vw; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 20px; border: 0; background: var(--ink); color: var(--canvas);
}
.lightbox::backdrop { background: var(--ink); }
.lightbox[open] { display: grid; grid-template-rows: auto 1fr auto; gap: 20px; }
.lightbox__bar { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.lightbox .label { color: var(--canvas); }
.lightbox .pill { color: var(--canvas); border-color: var(--canvas); }
.lightbox .pill:hover { background: var(--canvas); color: var(--ink); }
.lightbox__stage { min-height: 0; position: relative; }
.lightbox__stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.lightbox__nav { display: flex; justify-content: center; gap: 20px; }

/* ---------- tour ---------- */

.tour { border: var(--hairline); aspect-ratio: 16 / 9; display: grid; place-items: center; text-align: center; padding: 20px; }
.tour iframe { width: 100%; height: 100%; border: 0; display: block; }
.tour.is-loaded { padding: 0; display: block; }
.tour__prompt > * + * { margin-top: 20px; }

/* ---------- specs ---------- */

.specs { display: grid; grid-template-columns: repeat(2, 1fr); column-gap: var(--gutter); }
.specs > div {
  display: grid; grid-template-columns: 5fr 7fr; gap: var(--gutter);
  padding-block: 20px; border-top: var(--hairline);
}
.specs dd { color: var(--body); }

/* ---------- contact ---------- */

.contact { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gutter); row-gap: 40px; align-items: end; }
.contact .display { grid-column: 1 / -1; margin-left: -0.04em; }
.contact__who { grid-column: 1 / span 5; }
.contact__who p { color: var(--ink); font-size: var(--text-lead); line-height: 1.4; }
.contact__act { grid-column: 7 / span 6; display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }

.footer { padding-block: 40px; }
.footer p { max-width: 110ch; }
.footer p + p { margin-top: 8px; }

/* ---------- responsive ---------- */

@media (max-width: 1100px) {
  .hero__content { flex-direction: column; align-items: flex-start; gap: 20px; }
  .hero__word { font-size: clamp(60px, 13.6vw, 250px); }
  .hero__side { padding-bottom: 0; }
  .strip button { width: 88px; }
  .facts { grid-template-columns: repeat(3, 1fr); }
  .facts > div:nth-child(4) { border-left: 0; }
  .facts > div:nth-child(n + 4) { border-top: var(--hairline); }
  .nav__links li:not(.nav__cta) { display: none; }
}

@media (max-width: 760px) {
  .strip { gap: 8px; }
  .strip button { width: 58px; }
  .nav { gap: 12px; }
  .nav .pill span { display: none; }
  .hero__word { font-size: clamp(40px, 13.6vw, 250px); }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .facts > div, .facts > div:nth-child(4) { padding: 20px var(--pad); border-left: 0; border-top: var(--hairline); }
  .facts > div:first-child, .facts > div:nth-child(4) { grid-column: 1 / -1; }
  .facts > div:first-child { border-top: 0; }
  .facts > div:nth-child(3), .facts > div:nth-child(6) { border-left: var(--hairline); }
  .split__label, .split__body, .contact__who, .contact__act { grid-column: 1 / -1; }
  .split__label { text-align: left; padding-right: 0; }
  .plate, .plate--4, .plate--8 { grid-column: 1 / -1; }
  .plate--3 { grid-column: span 6; }
  .plate--fill img { aspect-ratio: 3 / 2; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .specs { grid-template-columns: 1fr; }
  .tour { aspect-ratio: 3 / 4; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
