*,*::before,*::after{box-sizing:border-box}
:root{
  --bg:#f6f5f3; --ink:#171614; --dim:#6b6862; --line:#dedbd6; --card:#fffefc;
  --serif:"Iowan Old Style","Palatino Linotype",Palatino,Georgia,serif;
  --sans:ui-sans-serif,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  --pad:clamp(1rem,4vw,3rem);
}
@media (prefers-color-scheme:dark){
  :root{--bg:#131211;--ink:#e9e6e1;--dim:#928d85;--line:#2c2a27;--card:#1a1917}
}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--ink);font-family:var(--sans);
  font-size:16px;line-height:1.55;-webkit-font-smoothing:antialiased}
img{display:block;max-width:100%;height:auto}
a{color:inherit}
.skip{position:absolute;left:-9999px}
.skip:focus{left:1rem;top:1rem;background:var(--ink);color:var(--bg);padding:.6rem 1rem;z-index:9}
:focus-visible{outline:2px solid currentColor;outline-offset:3px}

.top{display:flex;justify-content:space-between;align-items:baseline;gap:1rem;
  padding:1.25rem var(--pad);border-bottom:1px solid var(--line)}
.wordmark{font-family:var(--serif);font-size:1.05rem;letter-spacing:.12em;
  text-transform:uppercase;text-decoration:none}
.top nav a{font-size:.8rem;letter-spacing:.1em;text-transform:uppercase;
  text-decoration:none;color:var(--dim)}
.top nav a:hover{color:var(--ink)}

.hero{padding:clamp(3rem,10vw,7rem) var(--pad) clamp(2rem,5vw,3.5rem);max-width:60rem}
.hero h1{font-family:var(--serif);font-weight:400;font-size:clamp(2.2rem,7vw,4.2rem);
  line-height:1.05;margin:0 0 1rem}
.lede{font-size:clamp(1rem,2.2vw,1.2rem);color:var(--dim);max-width:34em;margin:0}

.rooms{display:grid;gap:1px;background:var(--line);
  grid-template-columns:repeat(auto-fill,minmax(260px,1fr));
  border-block:1px solid var(--line)}
/* The room's wall tone is a light gallery colour (see plan.json), so it can only
   ever be an accent — used as a background it turns the label grey-on-grey in
   dark mode. As a border it carries the same information in both themes. */
.roomcard{background:var(--bg);padding:1rem 1rem 1.25rem;text-decoration:none;
  display:flex;flex-direction:column;gap:.65rem;transition:background .25s;
  border-bottom:3px solid var(--tone,var(--line))}
.roomcard:hover{background:var(--card)}
/* The card frame is a fixed 3:2 but the hero behind it need not be (Architecture
   — Interior's is 1.295), and the default object-fit:fill would stretch it.
   Cropping a navigation thumbnail is fine; distorting a photograph is not. */
.roomcard img{width:100%;height:100%;object-fit:cover}
.rc-name{font-family:var(--serif);font-size:1.15rem}
.rc-count{font-size:.75rem;letter-spacing:.12em;text-transform:uppercase;color:var(--dim)}

.crumb{padding:1rem var(--pad) 0;font-size:.78rem;letter-spacing:.08em;
  text-transform:uppercase;color:var(--dim)}
.crumb a{text-decoration:none}
.crumb a:hover{text-decoration:underline}
.crumb span{margin:0 .4rem;opacity:.5}

.roomhead{padding:clamp(1.5rem,5vw,3.5rem) var(--pad) clamp(1.2rem,3vw,2rem);
  border-bottom:3px solid var(--tone,var(--line))}
.roomhead h1{font-family:var(--serif);font-weight:400;
  font-size:clamp(1.8rem,5.5vw,3.2rem);margin:0 0 .4rem;line-height:1.1}
.meta{margin:0;font-size:.8rem;letter-spacing:.1em;text-transform:uppercase;color:var(--dim)}

.jump{padding:1rem var(--pad);display:flex;flex-wrap:wrap;gap:.4rem 1rem;
  border-bottom:1px solid var(--line);font-size:.78rem;letter-spacing:.06em;
  text-transform:uppercase}
.jump a{color:var(--dim);text-decoration:none}
.jump a:hover{color:var(--ink)}

/* Justified rows. Each cell carries an inline `flex` whose grow factor and basis
   are proportional to its aspect ratio, so a row of mixed portrait and landscape
   works resolves to one height with no cropping and no stranded gaps. The
   ::after absorbs the free space on the final row, which would otherwise
   stretch two photographs across the whole width. */
/* --rh has to leave room for two of the widest works side by side, or a pair of
   landscapes misses sharing a row by a few pixels and both go full-bleed. The
   widest aspect in the collection is 2.0, so keep --rh under ~(usable/4.4). */
.grid{--rh:290px;display:flex;flex-wrap:wrap;align-items:flex-start;
  gap:clamp(1.2rem,2.5vw,2.2rem);padding:clamp(1.5rem,4vw,3rem) var(--pad)}
@media (max-width:1400px){.grid{--rh:250px}}
@media (max-width:1100px){.grid{--rh:215px}}
@media (max-width:900px){.grid{--rh:185px}}
@media (max-width:760px){.grid{--rh:170px}}
@media (max-width:480px){.grid{--rh:145px}}
/* Soaks up most of the free space on the final row. Without it two works get
   stretched across the full width; with it set too high they stay at their
   basis and end up conspicuously smaller than every row above. */
.grid::after{content:"";flex-grow:2.5}
.cell{margin:0}
.cell a{text-decoration:none;display:block}
.frame{display:block;overflow:hidden;background-position:center}
.cell .frame{box-shadow:0 1px 2px rgba(0,0,0,.10),0 8px 24px -12px rgba(0,0,0,.28)}
.cell img{width:100%;transition:opacity .5s}
.cell a:hover .frame{box-shadow:0 2px 4px rgba(0,0,0,.14),0 14px 34px -12px rgba(0,0,0,.4)}
figcaption{padding-top:.6rem;font-size:.74rem;letter-spacing:.05em;color:var(--dim);
  display:flex;flex-direction:column;gap:.1rem}
figcaption .d{color:var(--ink)}

.roomblock h2{display:flex;align-items:baseline;gap:.7rem;margin:0;
  padding:clamp(2rem,5vw,3.5rem) var(--pad) 0;font-family:var(--serif);
  font-weight:400;font-size:clamp(1.3rem,3.5vw,2rem)}
.roomblock h2 a{text-decoration:none}
.roomblock h2 .n{font-family:var(--sans);font-size:.72rem;letter-spacing:.12em;color:var(--dim)}

.work{display:grid;gap:clamp(1.5rem,4vw,3.5rem);padding:clamp(1.2rem,3vw,2.5rem) var(--pad);
  grid-template-columns:1fr;align-items:start}
@media (min-width:900px){.work{grid-template-columns:minmax(0,1fr) 21rem}}
.plate .frame{box-shadow:0 2px 6px rgba(0,0,0,.14),0 20px 50px -18px rgba(0,0,0,.42)}
.label h1{font-family:var(--serif);font-weight:400;font-size:1.6rem;margin:0 0 .2rem}
.label .room{margin:0 0 1.4rem;font-size:.76rem;letter-spacing:.12em;
  text-transform:uppercase;color:var(--dim)}
.words{margin:0 0 1.6rem;padding:0 0 0 1rem;border-left:2px solid var(--line);
  font-family:var(--serif);font-size:1.02rem;line-height:1.6}
.wall{margin:0 0 1.4rem;border-top:1px solid var(--line)}
.wall .row{display:grid;grid-template-columns:6.5rem 1fr;gap:.75rem;
  padding:.55rem 0;border-bottom:1px solid var(--line)}
.wall dt{font-size:.7rem;letter-spacing:.11em;text-transform:uppercase;color:var(--dim)}
.wall dd{margin:0;font-size:.9rem}
.palette{display:flex;height:1.5rem;margin-bottom:1.2rem}
.palette span{flex:1}
.alt{font-size:.8rem;color:var(--dim);margin:0 0 1.6rem}
.alt strong{font-weight:600;letter-spacing:.06em;text-transform:uppercase;font-size:.7rem}
.pager{display:flex;gap:1.2rem;font-size:.78rem;letter-spacing:.1em;text-transform:uppercase}
.pager a{color:var(--dim);text-decoration:none}
.pager a:hover{color:var(--ink)}

.note{padding:clamp(2rem,6vw,4rem) var(--pad);max-width:34em;color:var(--dim)}
.enter{display:inline-block;margin-bottom:.6rem;font-family:var(--serif);
  font-size:1.15rem;color:var(--ink);text-decoration:none;
  border-bottom:1px solid var(--line);padding-bottom:.15rem}
.enter:hover{border-color:var(--ink)}
.foot{padding:clamp(2rem,5vw,3.5rem) var(--pad);border-top:1px solid var(--line);
  font-size:.78rem;color:var(--dim)}
.foot p{margin:0 0 .35rem}
.fine{opacity:.75;max-width:36em}

@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
