/* The Garden Cottage
   Paper, ink and one engraved line: cream page, light serif, slate-blue italics. */

:root {
  --paper: #F6F2EA;
  --paper-light: #FCFAF6;
  --paper-deep: #EFE8DA;
  --ink: #1B2233;
  --ink-soft: #4A4F5C;
  --muted: #7B7667;
  --rule: #DCD3C1;
  --slate: #3B5878;        /* the tower roof */
  --slate-deep: #2B4563;
  --terracotta: #B95C36;   /* the other roofs */
  --oxblood: #7B2A2A;      /* the shutters */
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --wrap: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(17px, 1.05vw + 13px, 19px);
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, dl, dd, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; }
em { font-style: italic; }
[id] { scroll-margin-top: 92px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 16px; background: var(--ink); color: var(--paper); font: 500 14px var(--sans); text-decoration: none; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--slate); outline-offset: 3px; }

.label {
  font: 500 11px/1.4 var(--sans);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── buttons ── */
.btn {
  display: inline-block;
  font: 500 12px/1 var(--sans);
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 19px 28px;
  border: 1px solid var(--slate-deep);
  transition: background-color .25s, color .25s, border-color .25s;
}
.btn-solid { background: var(--slate-deep); color: #fff; }
.btn-solid:hover { background: var(--ink); border-color: var(--ink); }
.btn-line { color: var(--slate-deep); padding: 14px 20px; letter-spacing: .04em; text-transform: none; font-size: 15px; }
.btn-line:hover { background: var(--slate-deep); color: #fff; }

/* ── top strip ── */
.topbar { border-bottom: 1px solid var(--rule); font: 400 13px/1.3 var(--sans); color: var(--ink-soft); }
.topbar-in { display: flex; align-items: center; gap: 22px; min-height: 40px; }
.topbar p { display: flex; align-items: center; gap: 8px; }
.topbar svg { width: 15px; height: 15px; fill: none; stroke: var(--ink-soft); stroke-width: 1.3; stroke-linecap: round; }
.topbar b { font-weight: 600; color: var(--ink); }
.topbar-facts { flex: 1; gap: 0 !important; padding-left: 22px; border-left: 1px solid var(--rule); white-space: nowrap; overflow: hidden; }
.topbar-facts span + span::before { content: "·"; margin: 0 12px; color: var(--muted); }
.topbar-link { font-weight: 500; color: var(--ink); text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 1px; white-space: nowrap; }
.topbar-link:hover { color: var(--slate); }

/* ── nav ── */
.nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color .3s; }
.nav.is-stuck { border-bottom-color: var(--rule); }
.nav-in { display: flex; align-items: center; gap: 28px; min-height: 80px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.brand-mark { width: 30px; height: 36px; fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.brand-name { font-size: 22px; line-height: 1; letter-spacing: -.01em; white-space: nowrap; }
.brand-name em, .foot-name em { color: var(--slate); }
.nav-links { display: flex; gap: clamp(18px, 2.6vw, 38px); margin-right: auto; }
.nav-links a { font: 500 15px/1 var(--sans); text-decoration: none; padding: 8px 0; border-bottom: 1px solid transparent; transition: border-color .2s, color .2s; }
.nav-links a:hover { color: var(--slate); border-bottom-color: currentColor; }
.nav-toggle { display: none; }

/* ── hero ── */
.hero { position: relative; overflow: hidden; padding-top: clamp(40px, 6vw, 84px); }
.hero-copy { position: relative; z-index: 2; text-align: center; }
h1 {
  font-weight: 300;
  font-size: clamp(2.9rem, 7.4vw, 6.6rem);
  line-height: .98;
  letter-spacing: -.025em;
}
h1 em, h2 em, .statement em, .quote em { color: var(--slate); font-weight: 300; }
.hero-lede { max-width: 33em; margin: clamp(22px, 2.6vw, 34px) auto clamp(26px, 2.8vw, 38px); font-size: clamp(1.06rem, 1.5vw, 1.32rem); line-height: 1.5; text-wrap: balance; }
.hero-art { position: relative; z-index: 1; margin-top: clamp(-150px, -9.5vw, -20px); pointer-events: none; }
.hero-art img { width: 100%; height: clamp(300px, 42.86vw, 1100px); object-fit: cover; object-position: 86% 100%; }

/* ── figures ── */
.figures { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: var(--paper-light); }
.figures-row { display: grid; grid-template-columns: repeat(5, 1fr); }
.figures-row > div { padding: clamp(24px, 3vw, 40px) clamp(14px, 2vw, 28px); border-left: 1px solid var(--rule); }
.figures-row > div:first-child { border-left: 0; padding-left: 0; }
.figures-row dt { font-weight: 300; font-size: clamp(1.7rem, 2.9vw, 2.6rem); line-height: 1.05; letter-spacing: -.02em; white-space: nowrap; }
.figures-row dt i { font-style: normal; color: var(--terracotta); }
.figures-row dd { margin-top: 8px; font: 400 14px/1.4 var(--sans); color: var(--ink-soft); }

/* ── statement blocks ── */
.idea { padding: clamp(72px, 10vw, 150px) 0 clamp(56px, 7vw, 100px); }
.idea-in { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: start; }
.idea .label { padding-top: .9em; }
.statement { max-width: 22em; font-weight: 300; font-size: clamp(1.55rem, 3vw, 2.5rem); line-height: 1.22; letter-spacing: -.015em; text-wrap: pretty; }
.byline { margin-top: 26px; font-style: italic; color: var(--muted); font-size: .95rem; }

/* ── photographs ── */
.plate a, .swatches a { display: block; overflow: hidden; background: var(--paper-deep); cursor: zoom-in; }
.plate img, .swatches img { width: 100%; transition: transform 1.1s cubic-bezier(.2, .7, .2, 1); }
.plate a:hover img, .swatches a:hover img { transform: scale(1.025); }
.plate figcaption { display: flex; flex-wrap: wrap; gap: 2px 20px; align-items: baseline; padding-top: 14px; }
.cap-title { font: 500 12px/1.5 var(--sans); letter-spacing: .14em; text-transform: uppercase; }
.cap-title b { font-weight: 500; color: var(--terracotta); margin-left: 8px; letter-spacing: .06em; }
.cap-text { font-style: italic; color: var(--ink-soft); font-size: .95rem; line-height: 1.45; }

/* ── section heads ── */
.section-head { display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px 60px; align-items: end; padding-bottom: clamp(28px, 4vw, 52px); }
h2 { font-weight: 300; font-size: clamp(2.1rem, 4.6vw, 3.7rem); line-height: 1.04; letter-spacing: -.022em; text-wrap: balance; }
.section-head p { max-width: 30em; color: var(--ink-soft); justify-self: end; }

/* ── five buildings ── */
.buildings { padding: clamp(72px, 10vw, 150px) 0 clamp(60px, 8vw, 120px); }
.cards { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.card { padding: 26px clamp(14px, 1.7vw, 26px) 34px; border-left: 1px solid var(--rule); }
.card:first-child { border-left: 0; padding-left: 0; }
.card:last-child { padding-right: 0; }
.card-art { height: clamp(150px, 13.5vw, 200px); display: grid; place-items: center; }
.card-art img { width: auto; height: 100%; max-width: 108%; object-fit: contain; }
.card-cap { font-style: italic; font-size: .82rem; color: var(--muted); padding: 14px 0 20px; border-bottom: 1px solid var(--rule); }
.card-num { margin-top: 20px; font-style: italic; color: var(--slate); font-size: .95rem; }
.card h3 { margin: 4px 0 10px; font-weight: 300; font-size: clamp(1.35rem, 1.9vw, 1.75rem); line-height: 1.15; letter-spacing: -.01em; }
.card p:last-child { font-size: .93rem; line-height: 1.55; color: var(--ink-soft); }

/* ── rooms ── */
.rooms { padding: clamp(60px, 8vw, 120px) 0 clamp(40px, 6vw, 90px); background: var(--paper-light); border-top: 1px solid var(--rule); }
.chapter { padding-bottom: clamp(56px, 8vw, 110px); }
.chapter-head { display: flex; align-items: baseline; gap: 18px; padding: 18px 0 clamp(20px, 2.6vw, 32px); border-top: 1px solid var(--ink); }
.chapter-num { font-style: italic; color: var(--slate); min-width: 2.2em; }
.chapter-head h3 { font-weight: 300; font-size: clamp(1.6rem, 2.8vw, 2.3rem); line-height: 1.1; letter-spacing: -.015em; }
.chapter-note { margin-left: auto; font: 400 13px/1.4 var(--sans); color: var(--muted); text-align: right; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(18px, 2.4vw, 34px); margin-top: clamp(26px, 3.4vw, 46px); }
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2.2vw, 30px); }
.split { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(28px, 6vw, 96px); align-items: center; }
.split-flip { grid-template-columns: 5fr 7fr; }
.quote { font-weight: 300; font-size: clamp(1.6rem, 3vw, 2.5rem); line-height: 1.18; letter-spacing: -.015em; max-width: 13em; text-wrap: balance; }
.spec { margin-top: clamp(24px, 3vw, 40px); border-top: 1px solid var(--rule); }
.spec > div { display: grid; grid-template-columns: 1fr auto; gap: 4px 20px; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.spec dt { font: 500 12px/1.5 var(--sans); letter-spacing: .14em; text-transform: uppercase; }
.spec-size { font: 500 13px/1.5 var(--sans); color: var(--terracotta); text-align: right; white-space: nowrap; }
.spec dd:last-child { grid-column: 1 / -1; font-style: italic; color: var(--ink-soft); font-size: .95rem; }

/* ── garden plan ── */
.plan { padding: clamp(72px, 10vw, 150px) 0; border-top: 1px solid var(--rule); }
.plan-in { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.plan-air { margin-top: clamp(48px, 7vw, 100px); }
.plan-text h2 { margin: 14px 0 24px; }
.plan-lede { font-size: 1.12em; line-height: 1.5; margin-bottom: 18px; }
.plan-text > p:not(.label):not(.plan-lede) { color: var(--ink-soft); }
.legend { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; margin-top: 32px; border-top: 1px solid var(--rule); }
.legend > div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--rule); font: 400 13.5px/1.4 var(--sans); }
.legend dt { color: var(--ink-soft); }
.legend dd { font-weight: 500; white-space: nowrap; }
.plan-sheet { background: var(--paper-light); border: 1px solid var(--rule); padding: clamp(14px, 2.4vw, 34px) clamp(14px, 2.4vw, 34px) 18px; box-shadow: 0 1px 0 #fff inset, 0 30px 60px -40px rgba(60, 50, 30, .35); }
.plan-sheet svg { width: 100%; height: auto; }
.plan-sheet figcaption { margin-top: 10px; font-style: italic; font-size: .85rem; color: var(--muted); text-align: center; }
.p-lab { font: 600 7.200px var(--sans); letter-spacing: .1em; text-transform: uppercase; fill: #23262B; }
.p-sm { font-size: 6.200px; }
.p-note { font: italic 400 7.500px var(--serif); fill: #3D4048; }
.p-halo { paint-order: stroke; stroke: rgba(246, 242, 234, .82); stroke-width: 2.6px; stroke-linejoin: round; }

/* ── details ── */
.details { padding: clamp(72px, 10vw, 150px) 0; background: var(--paper-deep); border-top: 1px solid var(--rule); }
.swatches { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(26px, 3.4vw, 48px) clamp(16px, 2.2vw, 30px); }
.swatches img { aspect-ratio: 4 / 3; object-fit: cover; }
.swatches h3 { margin-top: 16px; font: 500 12px/1.5 var(--sans); letter-spacing: .14em; text-transform: uppercase; }
.swatches p { font-style: italic; color: var(--ink-soft); font-size: .95rem; }

/* ── land ── */
.land { padding: clamp(72px, 10vw, 150px) 0; border-top: 1px solid var(--rule); }
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); }
.tier { padding: 30px clamp(18px, 2.6vw, 40px) 38px; border-left: 1px solid var(--rule); }
.tier:first-child { border-left: 0; padding-left: 0; }
.tier-pick { background: var(--paper-light); box-shadow: 0 -3px 0 var(--slate) inset; }
.tier-name { display: flex; align-items: center; gap: 12px; font: 500 12px/1.5 var(--sans); letter-spacing: .14em; text-transform: uppercase; }
.tag { font: 500 10px/1 var(--sans); letter-spacing: .12em; color: #fff; background: var(--slate); padding: 5px 8px 4px; }
.tier-size { margin: 14px 0 14px; font-weight: 300; font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1; letter-spacing: -.02em; color: var(--terracotta); white-space: nowrap; }
.tier p:last-child { color: var(--ink-soft); font-size: .97rem; }
.land-note { max-width: 46em; margin-top: 30px; font-style: italic; font-size: .9rem; color: var(--muted); }

/* ── closing ── */
.closing { border-top: 1px solid var(--rule); }
.closing-photo a { display: block; cursor: zoom-in; }
.closing-photo img { width: 100%; max-height: 86vh; object-fit: cover; object-position: 50% 42%; }
.closing-in { text-align: center; padding: clamp(60px, 8vw, 120px) 0 clamp(72px, 9vw, 130px); }
.closing .statement { margin: 18px auto 36px; max-width: 16em; font-size: clamp(1.9rem, 4.2vw, 3.4rem); line-height: 1.08; text-wrap: balance; }

/* ── footer ── */
.foot { position: relative; overflow: hidden; background: var(--ink); color: #E9E3D5; }
.foot-art { position: absolute; inset: auto 0 0 0; height: min(42.86vw, 620px); background: #C9BFA8; opacity: .2; -webkit-mask: url(assets/hero-engraving-1400.webp) 86% 100% / cover no-repeat; mask: url(assets/hero-engraving-1400.webp) 86% 100% / cover no-repeat; }
.foot-in { position: relative; text-align: center; padding: clamp(64px, 8vw, 110px) 0 clamp(190px, 30vw, 420px); }
.foot-name { font-weight: 300; font-size: clamp(2rem, 4vw, 3rem); line-height: 1; letter-spacing: -.02em; }
.foot-name em { color: #A9C1DC; }
.foot-line { margin-top: 14px; font-style: italic; color: #B9B3A4; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 30px; margin-top: 30px; }
.foot-links a { font: 500 14px/1 var(--sans); text-decoration: none; padding-bottom: 4px; border-bottom: 1px solid transparent; }
.foot-links a:hover { border-bottom-color: currentColor; }

/* ── lightbox ── */
.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: clamp(14px, 3vw, 44px); border: 0; background: rgba(20, 24, 34, .96); color: #E9E3D5; }
.lightbox[open] { display: grid; grid-template-rows: 1fr auto; gap: 12px; place-items: center; }
.lightbox::backdrop { background: rgba(20, 24, 34, .96); }
.lightbox img { max-width: 100%; max-height: 100%; min-height: 0; object-fit: contain; cursor: zoom-out; }
.lightbox-cap { font-style: italic; font-size: .92rem; text-align: center; max-width: 60em; }
.lightbox-close { position: absolute; top: 10px; right: 14px; width: 44px; height: 44px; border: 0; background: none; color: inherit; font: 300 34px/1 var(--serif); cursor: pointer; }

/* ── reveal ── */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.is-in { opacity: 1; transform: none; }
.cards .reveal:nth-child(2), .trio .reveal:nth-child(2), .swatches .reveal:nth-child(3n + 2), .tiers .reveal:nth-child(2) { transition-delay: .08s; }
.cards .reveal:nth-child(3), .trio .reveal:nth-child(3), .swatches .reveal:nth-child(3n), .tiers .reveal:nth-child(3) { transition-delay: .16s; }
.cards .reveal:nth-child(4) { transition-delay: .24s; }
.cards .reveal:nth-child(5) { transition-delay: .32s; }

/* ── tablet ── */
@media (max-width: 1040px) {
  .topbar-facts span:nth-child(n + 2) { display: none; }
  .nav-links { gap: 20px; }
  .nav-cta { display: none; }
  .cards { grid-template-columns: repeat(6, 1fr); border-bottom: 0; }
  .card { grid-column: span 2; padding-left: clamp(14px, 2vw, 26px); padding-right: clamp(14px, 2vw, 26px); border-bottom: 1px solid var(--rule); }
  .card:nth-child(1), .card:nth-child(4) { border-left: 0; padding-left: 0; }
  .card:nth-child(4), .card:nth-child(5) { grid-column: span 3; }
  .card:nth-child(4) .card-art, .card:nth-child(5) .card-art { aspect-ratio: 16 / 9; }
  .card:nth-child(4) .card-art img, .card:nth-child(5) .card-art img { width: 78%; }
  .card:nth-child(3), .card:last-child { padding-right: 0; }
  .figures-row { grid-template-columns: repeat(6, 1fr); }
  .figures-row > div { grid-column: span 2; }
  .figures-row > div:nth-child(n + 4) { grid-column: span 3; border-top: 1px solid var(--rule); }
  .figures-row > div:nth-child(4) { border-left: 0; padding-left: 0; }
  .idea-in { grid-template-columns: 1fr; }
  .idea .label { padding-top: 0; }
}

/* ── small tablet / phone ── */
@media (max-width: 820px) {
  .section-head { grid-template-columns: 1fr; align-items: start; }
  .section-head p { justify-self: start; }
  .plan-in, .split, .split-flip { grid-template-columns: 1fr; }
  .split-flip .split-text { order: 2; }
  .split .plate { max-width: 560px; }
  .split-flip .plate { max-width: none; }
  .nav-in { min-height: 68px; gap: 12px; }
  .nav-toggle { display: grid; gap: 7px; place-content: center; width: 44px; height: 44px; margin-right: -10px; border: 0; background: none; cursor: pointer; }
  .nav-toggle span:not(.sr) { display: block; width: 24px; height: 1.5px; background: var(--ink); transition: transform .25s; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(4.25px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-4.25px) rotate(-45deg); }
  .nav-links { position: absolute; left: 0; right: 0; top: 100%; display: none; flex-direction: column; gap: 0; margin: 0; padding: 6px var(--gutter) 18px; background: var(--paper); border-bottom: 1px solid var(--rule); }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 16px 0; border-bottom: 1px solid var(--rule); font-size: 17px; }
  .swatches { grid-template-columns: 1fr 1fr; }
  .tiers { grid-template-columns: 1fr; }
  .tier { border-left: 0; border-bottom: 1px solid var(--rule); padding-left: 0; padding-right: 0; }
  .tier-pick { padding-left: 20px; padding-right: 20px; margin-inline: -20px; box-shadow: 3px 0 0 var(--slate) inset; }
  .chapter-note { display: none; }
  .closing-photo img { min-height: 320px; }
}

@media (max-width: 560px) {
  .hero-art { margin-top: 8px; }
  .topbar-facts { display: none !important; }
  .topbar-in { justify-content: space-between; }
  .brand-name { font-size: 20px; }
  .hero-lede { text-wrap: pretty; }
  .btn { padding: 17px 22px; letter-spacing: .16em; }
  .figures-row { grid-template-columns: 1fr 1fr; }
  .figures-row > div, .figures-row > div:nth-child(n + 4) { grid-column: auto; border-top: 1px solid var(--rule); padding: 20px 14px; }
  .figures-row > div:nth-child(-n + 2) { border-top: 0; }
  .figures-row > div:nth-child(odd) { border-left: 0; padding-left: 0; }
  .figures-row > div:nth-child(4) { border-left: 1px solid var(--rule); padding-left: 14px; }
  .figures-row > div:last-child { grid-column: 1 / -1; }
  .cards { grid-template-columns: 1fr; }
  .card, .card:nth-child(4), .card:nth-child(5) { grid-column: auto; border-left: 0; padding: 22px 0 28px; }
  .card-art, .card:nth-child(4) .card-art, .card:nth-child(5) .card-art { aspect-ratio: 16 / 10; }
  .card-art img, .card:nth-child(4) .card-art img, .card:nth-child(5) .card-art img { width: 82%; }
  .pair, .trio { grid-template-columns: 1fr; }
  .swatches { grid-template-columns: 1fr; }
  .legend { grid-template-columns: 1fr; }
  .plan-sheet { margin-inline: calc(var(--gutter) * -.5); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .plate img, .swatches img { transition: none; }
}
