/* Shared foundation for every page: tokens, glass bar, buttons, object colours, footer. */
:root {
  --paper: #f4efe4;
  --card: #fffcf4;
  --ink: #1a1a16;
  --soft: #5a5b52;
  --line: #d8d2c2;
  --signal: #c63c1b;
  --night: #1a1d19;
  --cream: #f3eee2;
  --bar: rgb(255 252 244 / .64);
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .75, .15, 1);
  --gutter: clamp(20px, 5vw, 72px);
  --radius: clamp(22px, 3vw, 40px);
  /* Foreground for buttons; coloured bands and dark sections redefine these. */
  --fg: var(--ink);
  --on-fg: var(--cream);
  color-scheme: light;
}
*, *::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: 400 1rem/1.55 Geist, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
/* Paper grain over the whole page */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .16;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #0a6a9a; outline-offset: 4px; border-radius: 4px; }
::selection { color: #fff; background: var(--signal); }
.wrap { width: min(100% - 2 * var(--gutter), 1320px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; z-index: 100; left: 12px; top: -80px; padding: 12px 16px; border-radius: 999px; background: var(--ink); color: #fff; }
.skip:focus { top: 12px; }
.mono { font: 500 .76rem/1.4 var(--mono); letter-spacing: .07em; text-transform: uppercase; }

/* ---------- Floating glass bar ---------- */
.bar {
  position: fixed; z-index: 60; top: 14px; left: 50%; translate: -50% 0;
  display: flex; align-items: center; gap: 2px; padding: 5px; white-space: nowrap;
  border-radius: 999px; background: var(--bar);
  -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6);
  border: 1px solid rgb(26 26 22 / .08);
  box-shadow: 0 1px 0 rgb(255 255 255 / .6) inset, 0 10px 30px -14px rgb(26 26 22 / .35);
}
.identity { display: inline-flex; align-items: center; gap: 9px; padding: 8px 14px 8px 12px; font-weight: 600; letter-spacing: -.035em; }
.drawer-mark { display: inline-grid; width: 19px; gap: 2px; transform: skewY(-8deg); }
.drawer-mark i { height: 4px; background: var(--ink); }
.drawer-mark i:first-child { width: 78%; margin-left: 22%; background: var(--signal); }
.bar nav { display: flex; gap: 2px; }
.bar nav a { padding: 8px 14px; border-radius: 999px; font-size: .9rem; transition: background .25s, color .25s; }
.bar nav a:hover { background: rgb(26 26 22 / .07); }
.bar nav a.is-current { background: var(--ink); color: var(--cream); }
.clock { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 12px; margin-left: 4px; border-left: 1px solid rgb(26 26 22 / .1); font: 500 .74rem/1 var(--mono); letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.clock::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #3f9b5c; box-shadow: 0 0 0 3px rgb(63 155 92 / .18); }

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: clamp(24px, 2.6vw, 34px); }
.btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 22px;
  border: 0; border-radius: 999px; background: transparent; font-size: .95rem; font-weight: 500; letter-spacing: -.01em;
  transition: background .3s, color .3s, box-shadow .3s, transform .3s var(--ease);
}
.btn svg { width: 14px; height: 14px; flex: none; transition: transform .35s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn.ext:hover svg { transform: translate(2px, -2px); }
.btn.down:hover svg { transform: translateY(3px); }
.btn:active { transform: scale(.97); }
.btn-solid { background: var(--fg); color: var(--on-fg); }
.btn-line { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--fg) 55%, transparent); }
.btn-line:hover { box-shadow: inset 0 0 0 1.5px var(--fg); background: color-mix(in srgb, var(--fg) 7%, transparent); }

/* ---------- Object colours, sampled from each photo's backdrop ---------- */
.t-key { --bg: #ef3e14; --fg: #220a02; --soft: #2a0d04; --on-fg: #ffeadf; }
.t-glass { --bg: #8db9c3; --fg: #0c2a31; --soft: #24464e; --on-fg: #e9f6f8; }
.t-stones { --bg: #e6b149; --fg: #2b1b02; --soft: #4a3510; --on-fg: #fff3d6; }
.t-beacon { --bg: #9ca784; --fg: #161d0e; --soft: #2f3a22; --on-fg: #eef2e3; }
.blend {
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 66%, transparent 100%);
  mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 66%, transparent 100%);
}

/* ---------- Site footer ---------- */
.site-foot {
  position: relative; z-index: 3; border-radius: var(--radius) var(--radius) 0 0; background: var(--ink); color: var(--cream);
  padding: clamp(90px, 11vw, 160px) var(--gutter) 28px;
}
.site-foot-inner { width: min(1320px, 100%); margin-inline: auto; }
.site-foot h2 { font: 400 clamp(4.2rem, 13vw, 13.5rem)/.85 var(--serif); letter-spacing: -.06em; }
.site-foot h2 em { color: #ff8b67; }
.email {
  display: inline-flex; align-items: center; gap: clamp(12px, 1.6vw, 22px); margin-top: clamp(30px, 4vw, 54px);
  font-size: clamp(1.3rem, 3.4vw, 3rem); letter-spacing: -.04em; line-height: 1.1;
}
.email .ring { display: grid; place-items: center; width: 1.6em; height: 1.6em; flex: none; border-radius: 50%; border: 1.5px solid rgb(243 238 226 / .4); transition: background .35s, border-color .35s, rotate .5s var(--ease); }
.email .ring svg { width: 38%; height: 38%; }
.email:hover .ring { background: #ff8b67; border-color: #ff8b67; color: var(--ink); rotate: -45deg; }
.email u { text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1.5px no-repeat; padding-bottom: .08em; }
.foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 26px; margin-top: clamp(80px, 10vw, 140px); padding-top: 22px; border-top: 1px solid rgb(243 238 226 / .16); font-size: .92rem; }
.foot p { margin-right: auto; color: #a9ab9f; }
.foot a:hover, .policies a:hover { color: #ff8b67; }
.policies { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 16px; color: #8e9085; font-size: .82rem; }

/* ---------- Reveal on scroll ---------- */
.js [data-reveal] { opacity: 0; translate: 0 30px; transition: opacity 1s var(--ease), translate 1s var(--ease); transition-delay: var(--d, 0s); }
.js [data-reveal].is-in { opacity: 1; translate: 0 0; }

@media (max-width: 640px) {
  .clock, .bar nav a.optional { display: none; }
  .bar { gap: 0; }
  .identity { padding: 8px 10px; }
  .bar nav a { padding: 8px 11px; font-size: .86rem; }
  .email { font-size: clamp(1.15rem, 5.6vw, 1.6rem); }
  .foot p { flex-basis: 100%; }
}
@media (max-width: 380px) {
  .identity .name { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-reveal] { opacity: 1; translate: none; scale: none; rotate: none; }
}
