/* 5/28 Esplanade, Brighton. Kay & Burton type system, tones taken from the building. */
@font-face { font-family: "Druk Wide"; src: url("fonts/KayBurtonDrukTextWide-Heavy.woff2") format("woff2"); font-weight: 900; font-display: swap; }
@font-face { font-family: "GT America Ext"; src: url("fonts/GTAmerica-ExtTh.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "GT America Ext"; src: url("fonts/GTAmerica-ExtMd.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --charcoal: #141414;   /* the fins */
  --ink: #000;
  --bone: #f4f2ee;       /* the render */
  --surface: #edecea;    /* K&B warm surface */
  --rule: #e0e0e0;
  --muted: #8a8a8a;
  --bronze: #3b2a1e;     /* the terrace soffit at dusk, used only behind the terrace */
  --display: "Druk Wide", Impact, sans-serif;
  --body: "GT America Ext", Helvetica, Arial, sans-serif;
  --gutter: clamp(20px, 5vw, 72px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: auto; }
body { background: var(--bone); color: var(--ink); font-family: var(--body); font-weight: 300; line-height: 1.55; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ---------- type ---------- */
.eyebrow { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; font-weight: 500; color: var(--muted); }
.display { font-family: var(--display); font-weight: 900; text-transform: uppercase; line-height: 0.98; letter-spacing: -0.005em; }
h3 { font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: clamp(1.25rem, 2.3vw, 2rem); line-height: 1.08; margin: 14px 0 18px; }
p { font-size: clamp(0.95rem, 1.05vw, 1.05rem); max-width: 34em; }
.thin { font-family: var(--body); font-weight: 300; text-transform: none; letter-spacing: 0.02em; font-size: 0.55em; display: block; margin-top: 0.35em; }
.fine { font-size: 12px; color: var(--muted); max-width: 46em; margin-top: 22px; }

/* ---------- fixed bar ---------- */
.bar { position: fixed; top: 0; left: 0; right: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; padding: 18px var(--gutter); mix-blend-mode: difference; color: #fff; }
.bar a { text-decoration: none; }
.bar-address { font-family: var(--display); font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; display: flex; gap: 12px; align-items: baseline; }
.bar-sub { font-family: var(--body); font-weight: 300; text-transform: none; letter-spacing: 0.12em; font-size: 11px; }
.bar-mid { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; font-weight: 500; }
.bar-cta { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; font-weight: 500; border: 1px solid currentColor; padding: 9px 16px; }

/* ---------- scrubbed sections ---------- */
.scrub { position: relative; height: 480vh; background: var(--charcoal); }
.stage { position: sticky; top: 0; height: 100vh; width: 100%; overflow: hidden; background: var(--charcoal); }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.veil { position: absolute; inset: 0; pointer-events: none; }
.veil-hero { background: linear-gradient(180deg, rgba(0,0,0,0.35) 0%, transparent 30%, transparent 60%, rgba(0,0,0,0.55) 100%); }
.veil-living { background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, transparent 35%, transparent 55%, rgba(0,0,0,0.5) 100%); }
.copy { position: absolute; inset: 0; z-index: 5; color: #fff; padding: 0 var(--gutter); }
.reveal-line { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 14vh; opacity: 0; will-change: opacity, transform; }
.reveal-line.display { font-size: clamp(2rem, 6.2vw, 6rem); text-shadow: 0 2px 40px rgba(0,0,0,0.35); }
.reveal-line.eyebrow { bottom: auto; top: 22vh; color: rgba(255,255,255,0.8); }
.copy-low .reveal-line { bottom: 10vh; }
.hint { position: absolute; right: var(--gutter); bottom: 22px; z-index: 6; color: rgba(255,255,255,0.7); font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; transition: opacity 0.4s; }
.hint::after { content: ""; display: block; width: 1px; height: 34px; background: currentColor; margin: 10px auto 0; animation: drop 1.8s ease-in-out infinite; }
@keyframes drop { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------- facts ---------- */
.facts { background: var(--bone); padding: clamp(64px, 10vw, 140px) var(--gutter); border-bottom: 1px solid var(--rule); }
.facts-inner { max-width: 1240px; margin: 0 auto; }
.spec { list-style: none; display: grid; grid-template-columns: repeat(7, 1fr); gap: 0; margin: 28px 0 40px; border-top: 1px solid var(--ink); }
.spec li { padding: 22px 26px 22px 0; border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; gap: 6px; }
.spec b { font-family: var(--display); font-weight: 900; font-size: clamp(1.25rem, 2.1vw, 2rem); line-height: 1; }
.spec span { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.lede { font-size: clamp(1.15rem, 1.9vw, 1.7rem); line-height: 1.35; max-width: 30em; }

/* ---------- plates (photo + copy) ---------- */
.plate { display: grid; grid-template-columns: 1.35fr 1fr; min-height: 100vh; background: var(--bone); }
.plate-flip { grid-template-columns: 1fr 1.35fr; }
.plate-flip .plate-img { order: 2; }
.plate-img { position: relative; overflow: hidden; min-height: 60vh; }
.plate-img img { width: 100%; height: 115%; object-fit: cover; will-change: transform; }
.plate-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(48px, 7vw, 120px) var(--gutter); }
.plate-dark { background: var(--bronze); color: var(--bone); }
.plate-dark .eyebrow { color: rgba(244,242,238,0.6); }
.inset { margin-top: 34px; width: min(360px, 100%); border: 1px solid rgba(255,255,255,0.15); }

/* ---------- the plan ---------- */
.plan { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); padding: clamp(64px, 9vw, 130px) var(--gutter); background: var(--surface); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); align-items: start; }
.plan-copy { position: sticky; top: 96px; }
.rooms { list-style: none; counter-reset: room; margin-top: 30px; border-top: 1px solid var(--ink); }
.rooms li { counter-increment: room; display: grid; grid-template-columns: 2.2em 1fr auto; gap: 12px; align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--rule); font-size: 0.95rem; }
.rooms li::before { content: counter(room, decimal-leading-zero); font-family: var(--display); font-size: 11px; color: var(--muted); }
.rooms li span { font-weight: 500; }
.rooms li i { font-style: normal; color: var(--muted); font-size: 0.85rem; letter-spacing: 0.02em; }
.plan-img { background: #fff; padding: clamp(20px, 3vw, 48px); border: 1px solid var(--rule); display: flex; justify-content: center; }
/* the plan is a tall crescent: cap it to the viewport so the balcony end never falls below the fold */
.plan-img img { max-height: 76vh; width: auto; }

/* ---------- rooms grid ---------- */
.rooms-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: minmax(38vh, auto); gap: 6px; padding: 6px; background: var(--bone); }
.cell { position: relative; overflow: hidden; background: var(--surface); }
.cell.wide { grid-column: span 2; }
.cell img { width: 100%; height: 100%; object-fit: cover; }
.cell figcaption { position: absolute; left: 18px; bottom: 16px; color: #fff; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 500; text-shadow: 0 1px 14px rgba(0,0,0,0.6); }
.cell.text { display: flex; flex-direction: column; justify-content: flex-end; gap: 14px; padding: clamp(24px, 3vw, 44px); background: var(--charcoal); color: var(--bone); }
.cell.text .eyebrow { color: rgba(244,242,238,0.55); }
.cell.text p { font-size: 0.95rem; }

/* ---------- position strip ---------- */
.position { background: var(--bone); padding: clamp(64px, 9vw, 130px) 0 clamp(48px, 6vw, 90px); }
.position-copy { padding: 0 var(--gutter); max-width: 1240px; margin: 0 auto 36px; }
.strip { display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 var(--gutter); scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.strip figure { flex: 0 0 min(72vw, 880px); scroll-snap-align: start; }
.strip img { aspect-ratio: 3 / 2; width: 100%; object-fit: cover; }
.strip figcaption { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); font-weight: 500; padding: 12px 0; }

/* ---------- enquire ---------- */
.enquire { background: var(--charcoal); color: var(--bone); padding: clamp(80px, 12vw, 160px) var(--gutter); }
.enquire-inner { max-width: 1240px; margin: 0 auto; }
.enquire .eyebrow { color: rgba(244,242,238,0.55); }
.enquire h3 { font-size: clamp(2rem, 6vw, 5.5rem); margin: 12px 0 44px; }
.agents { display: grid; grid-template-columns: repeat(2, minmax(0, 320px)); gap: 40px; margin-bottom: 44px; }
.agent { display: flex; flex-direction: column; gap: 4px; border-top: 1px solid rgba(255,255,255,0.25); padding-top: 16px; }
.agent b { font-weight: 500; font-size: 1.05rem; }
.agent span { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(244,242,238,0.55); margin-bottom: 8px; }
.agent a { text-decoration: none; font-size: 0.95rem; }
.agent a:hover { text-decoration: underline; }
.links { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-block; text-decoration: none; font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; font-weight: 500; padding: 16px 22px; background: var(--bone); color: var(--ink); }
.btn.ghost { background: transparent; color: var(--bone); border: 1px solid rgba(255,255,255,0.4); }
.enquire .fine { color: rgba(244,242,238,0.68); }

/* ---------- reveals ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.9s ease, transform 0.9s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .plate, .plate-flip { grid-template-columns: 1fr; }
  .plate-flip .plate-img { order: 0; }
  .plate-img { min-height: 62vw; }
  .plan { grid-template-columns: 1fr; }
  .plan-copy { position: static; }
  .rooms-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: minmax(34vh, auto); }
  .spec { grid-template-columns: repeat(4, 1fr); }
  .agents { grid-template-columns: 1fr; }
  .bar-mid { display: none; }
  .scrub { height: 380vh; }
}
@media (max-width: 560px) {
  /* at 390px the address ran under the Enquire button */
  .bar-sub { display: none; }
  .bar-address { font-size: 11px; }
  .bar-cta { padding: 8px 12px; font-size: 10px; letter-spacing: 0.16em; }
  .rooms-grid { grid-template-columns: 1fr; }
  .cell.wide { grid-column: span 1; }
  .spec { grid-template-columns: repeat(2, 1fr); }
  .reveal-line.display { font-size: 1.55rem; }
  /* one photo per swipe: a 72vw card leaves a sliver of the next caption chopped mid-word */
  .strip { padding: 0; gap: 0; }
  .strip figure { flex: 0 0 100vw; }
  .strip figcaption { padding: 12px var(--gutter); }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hint::after { animation: none; }
  .plate-img img { height: 100%; transform: none !important; }
}

/* ---------- the close: private inspection over the bay ---------- */
.enquire { position: relative; overflow: hidden; }
.enquire-bg { position: absolute; inset: 0; z-index: 0; }
.enquire-bg img { width: 100%; height: 100%; object-fit: cover; }
.enquire-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,20,20,0.88) 0%, rgba(20,20,20,0.86) 55%, rgba(20,20,20,0.93) 100%); }
.enquire-inner { position: relative; z-index: 1; }
.showing { margin-bottom: 52px; max-width: 720px; }
.form-lead { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; font-weight: 500; color: rgba(244,242,238,0.75); margin-bottom: 20px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; margin-bottom: 24px; }
.fields label { display: flex; flex-direction: column; gap: 7px; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 500; color: rgba(244,242,238,0.6); }
.fields label.full { grid-column: 1 / -1; }
.fields input, .fields textarea { font-family: var(--body); font-weight: 300; font-size: 1rem; color: var(--bone); background: transparent; border: 0; border-bottom: 1px solid rgba(244,242,238,0.35); padding: 9px 0; letter-spacing: normal; text-transform: none; border-radius: 0; }
.fields input:focus, .fields textarea:focus { outline: none; border-bottom-color: var(--bone); }
.fields textarea { resize: vertical; }
.showing button { border: 0; cursor: pointer; font-family: var(--body); }
.form-note { font-size: 12px; color: rgba(244,242,238,0.8); margin-top: 14px; min-height: 1em; }
.showing .fine a { color: inherit; }
@media (max-width: 560px) { .fields { grid-template-columns: 1fr; } }
.veil-terrace { background: linear-gradient(180deg, rgba(0,0,0,0.25) 0%, transparent 32%, transparent 52%, rgba(0,0,0,0.62) 100%); }
/* the terrace is the shortest chapter: it builds to the close rather than lingering */
#terrace.scrub { height: 360vh; }
@media (max-width: 900px) { #terrace.scrub { height: 300vh; } }

/* ---------- the written detail ----------
   Prose, set at reading width in two columns on desktop. Deliberately quiet:
   it sits between the aerial strip and the enquiry, and should read as the
   part of the page you slow down for, not another visual event. */
.detail { background: var(--surface); padding: clamp(64px, 9vw, 130px) var(--gutter); border-top: 1px solid var(--rule); }
.detail-inner { max-width: 1240px; margin: 0 auto; }
.detail-inner > h2 { font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: clamp(1.25rem, 2.3vw, 2rem); line-height: 1.08; margin: 14px 0 0; max-width: 20ch; }
.detail-cols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 84px); margin-top: clamp(36px, 5vw, 64px); }
.detail-cols h3 { margin: 0 0 14px; font-size: clamp(0.95rem, 1.35vw, 1.15rem); }
.detail-cols h3 + p { margin-top: 0; }
.detail-cols p { font-size: clamp(0.92rem, 1.05vw, 1rem); line-height: 1.75; margin: 0 0 16px; max-width: 62ch; }
.detail-cols > div > h3:not(:first-child) { margin-top: clamp(30px, 3.5vw, 46px); }
.detail-cols a { color: inherit; text-underline-offset: 3px; }
@media (max-width: 860px) { .detail-cols { grid-template-columns: 1fr; gap: 0; } }
.agency { margin-top: 52px; padding-top: 30px; border-top: 1px solid rgba(244,242,238,0.16); }
.agency img { width: 230px; max-width: 60vw; height: auto; opacity: 0.85; }
.agency a:hover img { opacity: 1; }

/* Display lines carry explicit <br/> breaks sized to the copy column, but a
   narrower viewport will still rewrap them. balance spreads the overflow across
   the lines instead of stranding one word on its own. */
.reveal-line.display { text-wrap: balance; }

.spec b sup { font-size: 0.5em; vertical-align: super; line-height: 0; }
.spec-note { margin-top: -26px; margin-bottom: 34px; }
