:root {
  --bh-ink: #1f3a5f;
  --bh-teal: #3fa7a0;
  --bh-cream: #f6f3ee;
  --bh-sand: #e9e2d6;
  --bh-text: #2a2a2a;
  --bh-soft: #5d5d5d;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}
* { box-sizing: border-box; }
html { -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bh-cream); color: var(--bh-text);
  font: 100%/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ---- brand band ---- */
.band {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: center;
  height: calc(58px + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top);
  background: rgba(31,58,95,.9); backdrop-filter: blur(16px) saturate(170%);
  -webkit-backdrop-filter: blur(16px) saturate(170%);
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.band a { display: block; height: 36px; }
.band img { height: 100%; width: auto; display: block; }

.wrap { max-width: 1180px; margin: 0 auto; padding: clamp(24px, 5vw, 64px) 16px 96px; }
h1 {
  font-size: clamp(2rem, 5.2vw, 3.8rem); line-height: 1.04; letter-spacing: -0.025em;
  color: var(--bh-ink); margin: 0 0 .35em;
}
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); max-width: 58ch; margin: 0 0 1.75rem; color: var(--bh-soft); }

/* ---- jump chips ---- */
/* one swipeable row pinned under the brand band; the chip of the project in view lights up */
.jump {
  position: sticky; top: calc(58px + env(safe-area-inset-top)); z-index: 30;
  display: flex; gap: 8px; flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x proximity; scrollbar-width: none;
  margin: 0 -16px clamp(36px, 6vw, 72px); padding: 10px 16px; list-style: none;
  background: color-mix(in srgb, var(--bh-cream) 94%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(31,58,95,.08);
}
.jump::-webkit-scrollbar { display: none; }
.jump li { flex: none; scroll-snap-align: start; }
.jump a {
  display: inline-block; padding: 9px 14px; border-radius: 999px; font-size: .88rem; font-weight: 600;
  white-space: nowrap; color: var(--bh-ink); text-decoration: none; background: rgba(31,58,95,.08);
  touch-action: manipulation; transition: transform 150ms var(--ease-out), background 150ms, color 150ms;
}
.jump a:active { transform: scale(.97); }
.jump a.on { background: var(--bh-ink); color: #fff; }
@media (hover: hover) and (pointer: fine) { .jump a:not(.on):hover { background: rgba(31,58,95,.16); } }

/* ---- project / area ---- */
.project { margin: 0 0 clamp(56px, 9vw, 110px); scroll-margin-top: calc(124px + env(safe-area-inset-top)); }
.project > h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); letter-spacing: -0.02em; color: var(--bh-ink); margin: 0 0 .15em; }
.project > .meta { color: var(--bh-soft); margin: 0 0 1.5rem; font-size: 1rem; }
.area { margin: 0 0 clamp(32px, 5vw, 56px); }
.area h3 { font-size: 1.15rem; letter-spacing: -0.01em; color: var(--bh-ink); margin: 0 0 .15em; }
.area .type { color: var(--bh-soft); margin: 0 0 1rem; font-size: .92rem; }
.row-label {
  font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--bh-soft); margin: 1.4rem 0 .6rem;
}
.cards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.cards .wide { grid-column: span 2; }
@media (max-width: 640px) { .cards .wide { grid-column: span 1; } }

/* ---- before/after curtain ---- */
.ba {
  position: relative; aspect-ratio: var(--ar, 4 / 5); overflow: hidden; border-radius: 14px;
  background: var(--bh-sand); box-shadow: 0 12px 32px rgba(31, 58, 95, .12);
  touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: ew-resize;
}
.ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.ba img.img-after { clip-path: inset(0 0 0 var(--x, 50%)); }
.ba .handle {
  position: absolute; top: 0; bottom: 0; left: var(--x, 50%); width: 2px; background: #fff;
  transform: translateX(-1px); box-shadow: 0 0 0 1px rgba(0,0,0,.08);
}
.ba .knob {
  position: absolute; top: 50%; left: var(--x, 50%); width: 44px; height: 44px; border-radius: 50%;
  transform: translate(-50%, -50%); background: rgba(255,255,255,.8);
  backdrop-filter: blur(12px) saturate(180%); -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(255,255,255,.7); box-shadow: 0 6px 18px rgba(0,0,0,.18);
  display: grid; place-items: center; color: #1f3a5f; font-size: 18px;
  transition: transform 160ms var(--ease-out);
}
.ba:active .knob { transform: translate(-50%, -50%) scale(.94); }
.ba:focus-visible { outline: 3px solid var(--bh-teal); outline-offset: 3px; }

.tag {
  position: absolute; top: 12px; padding: 6px 10px; border-radius: 999px; font-size: .76rem;
  font-weight: 650; letter-spacing: .05em; text-transform: uppercase; line-height: 1.2;
  background: rgba(255,255,255,.86); color: #1f3a5f;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.tag.before { left: 12px; }
.tag.after { right: 12px; background: #1f3a5f; color: #fff; }
.tag.process, .tag.detail { left: 12px; }

.single { position: relative; margin: 0; aspect-ratio: var(--ar, 4 / 5); border-radius: 14px; overflow: hidden; background: var(--bh-sand); box-shadow: 0 12px 32px rgba(31, 58, 95, .12); }
.single img { width: 100%; height: 100%; object-fit: cover; display: block; }
.single .tag.after { left: auto; right: 12px; }

/* ---- process carousel (native scroll-snap) ---- */
.strip {
  display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 14px;
  overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; scrollbar-width: thin;
}
.strip .single { flex: 0 0 min(72%, 300px); scroll-snap-align: start; aspect-ratio: var(--ar, 4 / 5); }
.strip .single.wide { flex-basis: min(86%, 440px); }

.cta {
  display: inline-block; margin-top: 1rem; padding: 16px 28px; border-radius: 999px;
  background: var(--bh-teal); color: #fff; text-decoration: none; font-weight: 650; font-size: 1.05rem;
  touch-action: manipulation; transition: transform 160ms var(--ease-out), background 160ms;
}
.cta:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .cta:hover { background: #35968f; } }

.pre-reveal { opacity: 0; transform: translateY(14px) scale(.985); transition: opacity 420ms var(--ease-out), transform 420ms var(--ease-out); }
.pre-reveal.revealed { opacity: 1; transform: none; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bh-cream: #14191f; --bh-sand: #1f262e; --bh-text: #e8e4dc; --bh-ink: #cfe0f5; --bh-soft: #a9b0b8; }
  :root:not([data-theme="light"]) .tag.after { background: #3fa7a0; }
  :root:not([data-theme="light"]) .jump a { background: rgba(207,224,245,.1); }
  :root:not([data-theme="light"]) .jump a.on { background: var(--bh-teal); color: #0e1621; }
}
:root[data-theme="dark"] { --bh-cream: #14191f; --bh-sand: #1f262e; --bh-text: #e8e4dc; --bh-ink: #cfe0f5; --bh-soft: #a9b0b8; }
:root[data-theme="dark"] .jump a.on { background: var(--bh-teal); color: #0e1621; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ba .knob, .cta, .jump a { transition: none; }
  .pre-reveal { opacity: 1; transform: none; transition: none; }
}
@media (prefers-reduced-transparency: reduce) { .ba .knob, .tag { backdrop-filter: none; background: #fff; } .band { backdrop-filter: none; background: #1f3a5f; } }
