@font-face {
  font-family: 'Instrument Sans';
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/instrument-sans-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Montserrat';
  font-weight: 700 800;
  font-display: swap;
  src: url('/fonts/montserrat-latin.woff2') format('woff2');
}

:root {
  --bg: #031c25;
  --surface: #003c50;
  --surface-2: #01313f;
  --line: #134a5c;
  --line-strong: #5f8a98;
  --text: #f4f6f6;
  --text-2: #c9d6da;
  --muted: #9fb6bf;
  --accent: #eb5a0c;
  --accent-text: #ff8f52;
  --on-accent: #031c25;
  --ease: cubic-bezier(.2,.7,.2,1);
  --gutter: clamp(20px, 5vw, 72px);
  --display: 'Montserrat', 'Arial Black', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Instrument Sans', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-text); }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- Type ---- */
.display {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  text-wrap: balance;
}
.display-xl { font-size: clamp(38px, 6.4vw, 96px); letter-spacing: -0.01em; }
.display-l { font-size: clamp(34px, 4.6vw, 66px); }
.display-m { font-size: clamp(30px, 4vw, 56px); }
.display-s { font-size: clamp(28px, 3.4vw, 46px); }
.eyebrow { font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-text); }
.lead { margin: 0; max-width: 560px; color: var(--text-2); }
.muted { color: var(--text-2); }
.dim { color: var(--muted); }
p { margin: 0; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  font: inherit;
  font-weight: 600;
  border-radius: 2px;
  cursor: pointer;
  transition: transform .25s;
  border: 1px solid var(--text);
  background: transparent;
  color: var(--text);
}
.btn:hover { transform: translateY(-2px); color: var(--text); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { color: var(--on-accent); }
.btn-small { min-height: 44px; padding: 0 20px; font-size: 15px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.link-underline { padding: 12px 0; font-weight: 600; border-bottom: 1px solid var(--accent); }

.pill {
  min-height: 44px;
  padding: 0 20px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 2px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
}
.pill[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.pills { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---- Header / footer ---- */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding: 20px var(--gutter);
  border-bottom: 1px solid var(--line);
}
.logo { display: flex; }
.logo img { height: 46px; width: auto; display: block; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; font-size: 15px; }
.site-nav a { padding: 12px 0; border-bottom: 1px solid transparent; }
.site-nav a[aria-current="page"] { border-bottom-color: var(--accent); }
.site-nav .nav-login { padding: 11px 20px; border: 1px solid var(--text); border-radius: 2px; font-weight: 600; }
.site-footer {
  padding: 32px var(--gutter);
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
  font-size: 14px;
  color: var(--muted);
}
.site-footer a:hover { color: var(--accent-text); }

/* ---- Sections ---- */
.section { padding: 96px var(--gutter); display: flex; flex-direction: column; gap: 40px; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.page-intro { padding: 72px var(--gutter) 40px; display: flex; flex-direction: column; gap: 32px; }
.split {
  padding: 72px var(--gutter) 96px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
  gap: 40px 72px;
  align-items: start;
}
.stack { display: flex; flex-direction: column; gap: 20px; }
.stack-l { display: flex; flex-direction: column; gap: 24px; }
.row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---- Photo helpers ---- */
.cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(3,28,37,.92) 0%, rgba(3,28,37,.55) 45%, rgba(3,28,37,.15) 100%); }

/* ---- Photo grids ---- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(380px, 100%), 1fr)); gap: 16px; }
.grid-gallery { grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.card { display: flex; flex-direction: column; gap: 12px; }
.card[hidden] { display: none; }
.card-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 15px; }
.frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background-color: var(--surface);
  background-image: repeating-linear-gradient(135deg, transparent 0 14px, rgba(255,255,255,.05) 14px 15px);
  border: 1px solid var(--line);
}
.frame-wide { aspect-ratio: 3 / 2; }
.frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.frame button.open { position: absolute; inset: 0; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.tile { transition: transform .45s cubic-bezier(.2,.7,.2,1); }
.tile:hover { transform: translateY(-6px); outline: 2px solid var(--accent); outline-offset: -2px; }
.zoom img { transition: transform .9s cubic-bezier(.2,.7,.2,1); }
.zoom:hover img { transform: scale(1.05); }
.empty { padding: 64px 0; color: var(--muted); }

/* ---- Forms ---- */
.form { display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 14px; color: var(--text-2); }
.input {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  font: inherit;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: 2px;
}
select.input { padding: 0 12px; }
textarea.input { padding: 14px 16px; resize: vertical; }
.input:focus { outline: none; border-color: var(--accent-text); }
.input-code { letter-spacing: .2em; text-transform: uppercase; }
.check { display: flex; gap: 10px; align-items: center; font-size: 15px; color: var(--text-2); }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.notice { padding: 14px 16px; border: 1px solid var(--accent); border-radius: 2px; }
.notice-error { border-color: #ff6b6b; color: #ffd6d6; }
.hp { position: absolute; left: -9999px; }
.contact-details { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 15px; }

/* ---- Portal ---- */
.login { min-height: 100vh; display: flex; flex-wrap: wrap; }
.login-visual {
  position: relative;
  overflow: hidden;
  flex: 1 1 420px;
  min-height: 280px;
  padding: 28px clamp(20px, 4vw, 56px) 40px;
  background-color: var(--surface);
  border-right: 1px solid var(--line);
}
.login-visual .shade { background: linear-gradient(to bottom, rgba(3,28,37,.75) 0%, rgba(3,28,37,.1) 35%, rgba(3,28,37,.3) 100%); }
.login-visual .logo { position: relative; }
.login-panel { flex: 1 1 420px; display: flex; align-items: center; justify-content: center; padding: 56px var(--gutter); }
.login-panel .form { width: 100%; max-width: 420px; gap: 24px; }

.gallery-head { padding: 56px var(--gutter) 32px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 28px 48px; }
.gallery-tabs { padding: 0 var(--gutter) 24px; }
.gallery-body { padding: 0 var(--gutter) 140px; }
.fav {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 1;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: rgba(3,28,37,.8);
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
}
.fav svg { fill: none; }
.fav[aria-pressed="true"] { color: var(--accent); }
.fav[aria-pressed="true"] svg { fill: var(--accent); }
.card.is-fav .frame { border-color: var(--accent); }
.icon-btn { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: var(--text); }
.selection-bar {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 16px var(--gutter);
  background: var(--surface-2);
  border-top: 1px solid var(--line);
}
.selection-bar .row { gap: 10px; }
.selection-bar .btn { min-height: 48px; padding: 0 22px; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  grid-template-rows: auto 1fr;
  background: rgba(3,28,37,.97);
  padding: 12px var(--gutter) 24px;
}
.lightbox[hidden] { display: none; }
.lightbox-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 15px; }
.lightbox-bar .row { gap: 4px; align-items: center; }
.lightbox-stage { position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; }
.lightbox-stage img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox button { background: none; border: 0; color: var(--text); cursor: pointer; }
.lightbox .nav { position: absolute; top: 50%; translate: 0 -50%; width: 56px; height: 56px; font-size: 32px; }
.lightbox .prev { left: 0; }
.lightbox .next { right: 0; }

/* ---- Admin ---- */
.admin-wrap { padding: 48px var(--gutter) 96px; display: flex; flex-direction: column; gap: 48px; max-width: 1200px; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th, .table td { text-align: left; padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-weight: 600; color: var(--muted); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.table-wrap { overflow-x: auto; }
.badge { display: inline-block; padding: 2px 8px; font-size: 12px; border: 1px solid var(--line-strong); border-radius: 2px; color: var(--text-2); white-space: nowrap; }
.badge-accent { border-color: var(--accent); color: var(--accent-text); }
.code-box { font-family: ui-monospace, monospace; font-size: 28px; letter-spacing: .15em; padding: 16px 20px; background: var(--surface-2); border: 1px solid var(--accent); display: inline-block; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.thumbs figure { margin: 0; font-size: 12px; color: var(--muted); }
.thumbs img { width: 100%; aspect-ratio: 3/2; object-fit: cover; display: block; border: 1px solid var(--line); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 20px; }
.danger { border-color: #ff6b6b; color: #ffd6d6; }

.accent { color: var(--accent); }

/* ---- Motion ---- */
/* Text reveal "from several sides": headings are split server-side (src/text.js).
   Time-based on subpages (.wl/.fl); on the homepage js/home.js drives .wu and [data-fade] from the scroll position. */
@keyframes cU { from { opacity: 0; transform: translateY(120%) rotate(10deg); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes cD { from { opacity: 0; transform: translateY(-120%) rotate(-10deg); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes cL { from { opacity: 0; transform: translateX(-1.4em); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes cR { from { opacity: 0; transform: translateX(1.4em); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes fL { from { opacity: 0; transform: translateX(-90px); } to { opacity: 1; transform: none; } }
@keyframes fR { from { opacity: 0; transform: translateX(90px); } to { opacity: 1; transform: none; } }
@keyframes fB { from { opacity: 0; transform: translateY(60px); } to { opacity: 1; transform: none; } }
@keyframes kbIn { from { transform: scale(1.15); } to { transform: none; } }
@keyframes kb { from { transform: scale(1); } to { transform: scale(1.1); } }

.wm { display: inline-block; vertical-align: top; }
.wl, .wu { display: inline-block; transform-origin: left bottom; }
.wl { animation: cU .9s var(--ease) both; }
.wl.cD { animation-name: cD; } .wl.cL { animation-name: cL; } .wl.cR { animation-name: cR; }
.fl { animation: fB .9s var(--ease) both; }
.fl.fL { animation-name: fL; } .fl.fR { animation-name: fR; }
.kb { animation: kb 22s ease-out both; }
.kb-in { animation: kbIn 2.4s var(--ease) both; }
/* Scroll-driven pieces start hidden only when the script will reveal them. */
.js.motion [data-sv],
.js.motion .home .wu,
.js.motion .home [data-fade] { opacity: 0; }
.js.motion [data-sv], .js.motion .home .wu, .js.motion .home [data-slide] { will-change: transform, opacity; }

a.btn, button.btn { transition: transform .25s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---- Homepage: five full-screen blocks that slide over each other ---- */
html.home-snap { scroll-snap-type: y proximity; }
.home .site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  border-bottom: 0;
  background: linear-gradient(to bottom, rgba(3,28,37,.7), rgba(3,28,37,0));
}
.home-stack { position: relative; }
.blk {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  background: var(--surface);
}
.blk-intro { scroll-snap-align: start; }
.blk-pause { height: 85vh; height: 85svh; scroll-snap-align: end; }
.blk-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.blk-shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(3,28,37,.9) 0%, rgba(3,28,37,.3) 50%, rgba(3,28,37,0) 100%); }
.blk-shade-intro { background: linear-gradient(to top, rgba(3,28,37,.9) 0%, rgba(3,28,37,.35) 50%, rgba(3,28,37,.1) 100%); }
.blk-body {
  position: relative;
  width: 100%;
  max-width: 1100px;
  padding: 0 var(--gutter) 96px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transform-origin: left bottom;
}
.blk-intro .blk-body { gap: 24px; }
.blk-dim { position: absolute; inset: 0; background: var(--bg); opacity: 0; pointer-events: none; }
.blk-h1, .blk-title, .blk-closing-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
}
.blk-h1 { font-size: clamp(44px, 8vw, 124px); line-height: .95; text-wrap: balance; }
.blk-title { display: block; font-size: clamp(56px, 11vw, 168px); line-height: .9; }
.blk-text { max-width: 480px; color: var(--text-2); }
.blk-hint { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--text-2); }
.blk-hint span { display: block; width: 1px; height: 40px; background: var(--accent); }

.blk-closing { flex-direction: column; justify-content: center; align-items: stretch; background: var(--bg); }
.blk-closing .blk-body { max-width: none; padding: 120px var(--gutter) 80px; gap: 48px; }
.blk-closing-title { display: block; max-width: 1000px; font-size: clamp(40px, 6vw, 96px); line-height: .95; text-wrap: balance; }
.blk-ctas { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 16px; max-width: 1000px; }
.blk-cta { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 8px; min-height: 0; padding: 27px; border-color: var(--line-strong); text-align: left; font-weight: 400; }
.blk-cta-primary { padding: 28px; border: 0; background: var(--accent); color: var(--on-accent); }
.blk-cta-primary:hover { color: var(--on-accent); }
.blk-cta-title { font-family: var(--display); font-weight: 800; font-size: 24px; text-transform: uppercase; }
.blk-footer { display: flex; flex-wrap: wrap; gap: 8px 32px; font-size: 14px; color: var(--muted); }

.home-dots {
  position: fixed;
  right: clamp(16px, 3vw, 40px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.home-dots a { display: flex; align-items: center; justify-content: flex-end; width: 44px; height: 28px; }
.home-dots span { display: block; height: 3px; width: 14px; background: rgba(244,246,246,.55); transition: width .35s var(--ease), background-color .35s; }
.home-dots a[aria-current="true"] span { width: 36px; background: var(--accent); }
.home-count {
  position: fixed;
  left: var(--gutter);
  bottom: 28px;
  z-index: 10;
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .1em;
  pointer-events: none;
}

@media (max-width: 700px) {
  .blk-pause { height: 60vh; height: 60svh; }
  .blk-body { padding-bottom: 88px; }
  .blk-closing .blk-body { padding: 104px var(--gutter) 72px; gap: 32px; }
  .site-nav { gap: 4px 20px; }
}
/* Blocks 2–5 come in with a soft top edge instead of a hard line; js/home.js shrinks --f from 85% to 0. */
.js.motion .blk-emerge {
  opacity: 0;
  -webkit-mask: linear-gradient(to bottom, transparent, #000) top / 100% var(--f, 85%) no-repeat, linear-gradient(#000, #000) bottom / 100% calc(100% - var(--f, 85%) + 1px) no-repeat;
  mask: linear-gradient(to bottom, transparent, #000) top / 100% var(--f, 85%) no-repeat, linear-gradient(#000, #000) bottom / 100% calc(100% - var(--f, 85%) + 1px) no-repeat;
}
.js.motion .blk-emerge.is-in { -webkit-mask: none; mask: none; }
@media (max-width: 700px) {
  .blk-closing .blk-body { padding-right: 64px; }
}

/* ---- Subpages ---- */
.page-body { padding: 0 var(--gutter) 96px; }
.btn-block { width: 100%; }
.over { gap: 48px 72px; padding-bottom: 72px; }
.project-intro { gap: 20px; }
.project-intro .eyebrow { align-self: flex-start; padding: 8px 0; }
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(560px, 100%), 1fr)); gap: 16px; align-items: start; }
.project-photo { display: block; background: var(--surface); border: 1px solid var(--line); cursor: zoom-in; }
.project-photo img { display: block; width: 100%; height: auto; }
.project-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--line); }
a.card:hover { color: inherit; }
.gallery-note { padding: 0 var(--gutter) 24px; }
.nav-plain { padding: 12px 0; font: inherit; font-weight: 600; background: none; border: 0; color: inherit; cursor: pointer; }
.nav-plain:hover { color: var(--accent-text); }
.steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 28px; color: var(--text-2); }
.steps li::marker { color: var(--accent-text); font-weight: 600; }
.qr { width: 220px; margin: 14px 0 10px; padding: 0; background: var(--text); border-radius: 2px; }
.qr svg { display: block; width: 100%; height: auto; }
.secret { font-size: 15px; letter-spacing: .08em; color: var(--text); }
.prose { max-width: 820px; padding-bottom: 96px; }
.prose h2.display { font-size: 22px; margin-top: 16px; }
.prose p:not(.lead) { color: var(--text-2); }
