/* ANA Nexus — gallery design
   Tokens from the approved Claude design artifact (Main.dc.html).
   Base styles work with no JS and stacked sections; main.js adds the
   "Gallery Walk" choreography (html.walk-h) on capable desktops. */
:root {
  --ground: #F2EEE7;
  --ink: #16130F;
  --dim: #5A534B;
  --dim-dark-bg: #B8B0A4;
  --accent: #9E2A1E;
  --accent-warm: #E7A08F;
  --wall: #16130F;
  --vitrine: #E6DFD3;
  --vitrine-ledge: #DCD3C5;
  --vitrine-rep: #2A2136;
  --vitrine-rep-ledge: #211A2B;
  --vitrine-rep-dim: #BAB1C8;
  --serif: "Bodoni Moda", "Bodoni MT", Didot, serif;
  --sans: "Instrument Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --gutter: clamp(20px, 4.5vw, 64px);
  /* Content is drawn at 1440px: beyond that, side padding grows to center it. */
  --pad: max(var(--gutter), calc((100vw - 1472px) / 2));
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; }
.caps { letter-spacing: 0.14em; text-transform: uppercase; }
.accent { color: var(--accent); }
.dim { color: var(--dim); }
.rule { height: 1px; background: var(--ink); }
.rule.light { background: var(--ground); }
.right { text-align: right; }
.center { text-align: center; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--ground); padding: 8px 14px; z-index: 60; }
.skip:focus { left: 8px; }

/* Wayfinding pill (JS shows and updates it past the hero) */
#wayfinding {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
  z-index: 50;
  background: var(--ground); color: var(--ink);
  border: 1px solid var(--ink);
  padding: 7px 16px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s;
  white-space: nowrap;
}
#wayfinding.show { opacity: 1; }

/* ═══ Gallery 00 · Hero ═══ */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: 32px var(--pad) 40px;
}
.topnav { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.wordmark { font-weight: 500; letter-spacing: 0.2em; }
.gallery-tag { color: var(--dim); }
.topnav-links { display: flex; gap: clamp(18px, 3vw, 36px); }
.topnav-links a { padding: 14px 0; }
.topnav + .rule { margin-top: 12px; }

.hero-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: clamp(360px, 58vh, 720px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.axis {
  position: absolute; left: 50%; top: 24px; bottom: 24px; width: 1px;
  background: var(--accent);
}
.axis-note {
  position: absolute; left: calc(50% + 14px); top: 40px;
  font-size: 11px; color: var(--accent); line-height: 1.7;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(110px, 32vw, 480px);
  line-height: 0.8;
  letter-spacing: -0.02em;
  font-variation-settings: 'opsz' 96;
  display: flex;
}
.hero h1 span { display: inline-block; }
.nexus {
  position: absolute; right: clamp(0px, 8vw, 120px); bottom: clamp(8px, 8vh, 70px);
  font-family: var(--serif); font-style: italic; font-weight: 450;
  font-size: clamp(48px, 10.5vw, 150px); line-height: 1;
  /* Low optical size keeps the italic's hairlines readable at this scale */
  font-variation-settings: 'opsz' 44;
  color: var(--accent);
}
.definition {
  position: absolute; left: 0; bottom: clamp(24px, 9vh, 96px);
  width: 240px;
  font-size: 12px; line-height: 1.7; color: var(--dim);
  letter-spacing: 0; text-transform: none;
  display: flex; flex-direction: column;
}
.definition .term { color: var(--ink); font-weight: 500; }

.hero-foot {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  padding-top: 20px;
  letter-spacing: 0.08em;
  line-height: 1.7;
}

/* ═══ Gallery 01 · Wall text ═══ */
.wall-text {
  background: var(--wall);
  color: var(--ground);
  padding: clamp(64px, 9vw, 120px) var(--pad);
  display: flex;
  gap: clamp(32px, 5vw, 64px);
}
.wall-text a:hover { color: var(--accent-warm); }
.wall-label { width: 260px; flex-shrink: 0; display: flex; flex-direction: column; gap: 16px; }
.wall-dash { width: 40px; height: 1px; background: var(--ground); }
.wall-hint { color: var(--dim-dark-bg); line-height: 1.7; letter-spacing: 0.08em; text-transform: none; }
.wall-text p {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(26px, 3.8vw, 54px);
  line-height: 1.18;
  letter-spacing: -0.01em;
}
.wall-text em { font-style: italic; color: var(--accent-warm); }

/* ═══ Gallery 02 · The Collection ═══ */
.collection-head {
  padding: clamp(64px, 7vw, 96px) var(--pad) 0;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap;
}
.collection-head h2, .codes h2 {
  font-family: var(--serif); font-weight: 400;
  letter-spacing: -0.02em; line-height: 1;
}
.collection-head h2 { font-size: clamp(52px, 6.6vw, 96px); }
.collection-head .mono { padding-bottom: 14px; }
h2 em, h3 em { font-style: italic; }

.walk-track { display: flex; flex-direction: column; }

.exhibit { padding: clamp(40px, 4vw, 56px) var(--pad) 0; }
.exhibit .rule { margin-bottom: 32px; }
.exhibit-body { display: flex; gap: clamp(28px, 3.3vw, 48px); align-items: stretch; }

.vitrine {
  flex: 0 1 820px;
  min-height: clamp(560px, 48vw, 700px);
  position: relative;
  background: var(--vitrine);
  display: flex; align-items: center; justify-content: center;
}
.vitrine-rep { background: var(--vitrine-rep); }
.vitrine .ledge { position: absolute; left: 0; right: 0; bottom: 0; height: 120px; background: var(--vitrine-ledge); }
.vitrine-rep .ledge { background: var(--vitrine-rep-ledge); }
.vitrine-tag { position: absolute; top: 20px; font-size: 11px; color: var(--dim); }
.vitrine-tag.left { left: 24px; }
.vitrine-tag.right { right: 24px; }
.vitrine-rep .vitrine-tag { color: var(--vitrine-rep-dim); }

/* phones */
.phone {
  position: relative;
  width: 290px; height: 590px;
  flex-shrink: 0;
  margin-top: -30px;
  z-index: 1;
}
.phone-shop {
  padding: 9px; border-radius: 42px; background: #111111;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22);
  transform: rotate(-2.5deg);
}
.phone-rep {
  padding: 10px; border-radius: 46px; background: #0B0A08;
  box-shadow: 0 40px 60px -30px rgba(0,0,0,0.8), 0 0 0 1px #3A342D;
}
.phone-screen { width: 100%; height: 100%; border-radius: 37px; overflow: hidden; display: flex; flex-direction: column; }
.phone-shop .phone-screen { border-radius: 34px; }
.sdl-screen {
  background-image: url(/assets/shopdelist-screen-bg.jpg);
  background-size: auto 100%;
  background-position: 30% center;
}

/* object labels */
.object-label {
  flex: 1 1 auto;
  min-width: 0;
  display: flex; flex-direction: column; justify-content: space-between;
  gap: 40px; padding-bottom: 8px;
}
.label-top { display: flex; flex-direction: column; gap: 20px; }
.object-label h3 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(48px, 6.1vw, 88px);
  line-height: 0.95; letter-spacing: -0.02em;
}
.object-label h3 em { font-weight: 400; }
.meta { font-size: 13px; line-height: 1.8; letter-spacing: 0; text-transform: none; }
.object-label p { font-size: 17px; line-height: 1.6; max-width: 420px; }
.object-label p.desc-long { font-size: 15.5px; line-height: 1.55; max-width: 470px; }
.label-bottom { display: flex; flex-direction: column; gap: 28px; }
.swatch-block { display: flex; flex-direction: column; gap: 10px; }
.swatch-block .mono { font-size: 11px; }
.swatches { display: flex; gap: 8px; }
.swatches div { width: 64px; height: 84px; }
.visit {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 0; font-size: 13px;
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink);
}

/* The Gallery Walk: horizontal travel, enabled by main.js on capable desktops */
html.walk-h .walk { height: 100vh; overflow: hidden; }
html.walk-h .walk-track { flex-direction: row; height: 100%; will-change: transform; }
html.walk-h .panel {
  width: 100vw; flex: 0 0 100vw;
  height: 100%;
  display: flex; flex-direction: column; justify-content: center;
  padding-top: 0;
}
html.walk-h .vitrine { min-height: min(700px, calc(100vh - 220px)); }

/* ═══ Gallery 03 · House codes ═══ */
.codes { padding: clamp(72px, 8.5vw, 120px) var(--pad) clamp(64px, 7vw, 96px); display: flex; flex-direction: column; gap: clamp(36px, 4vw, 56px); position: relative; z-index: 0; }
.codes-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.codes h2 { font-size: clamp(40px, 4.5vw, 64px); }
.codes-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.code { display: flex; flex-direction: column; gap: 16px; padding-top: 24px; border-top: 1px solid var(--ink); }
.code-name { font-family: var(--serif); font-size: 40px; line-height: 1.05; }
.code p { font-size: 16px; line-height: 1.6; color: #3A342D; }

/* ═══ Gallery 04 · Exit / colophon ═══ */
.colophon {
  background: var(--accent);
  color: var(--ground);
  padding: clamp(64px, 7vw, 96px) var(--pad) 40px;
  display: flex; flex-direction: column; justify-content: space-between;
  gap: clamp(64px, 10vw, 140px);
  position: relative; z-index: 1;
}
.colophon a:hover { color: var(--ground); opacity: 0.75; }
.hello { display: flex; flex-direction: column; gap: 28px; align-items: flex-start; }
.hello-link {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(64px, 11.6vw, 168px);
  line-height: 0.9; letter-spacing: -0.03em;
}
.hello-mail { font-size: 16px; letter-spacing: 0.06em; text-transform: none; overflow-wrap: anywhere; }
.colophon-foot { display: flex; flex-direction: column; gap: 20px; }
.colophon-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  letter-spacing: 0.08em;
  line-height: 1.7;
}

/* ═══ Legal pages ═══ */
.legal-page { max-width: 780px; margin: 0 auto; padding: 0 var(--gutter) 120px; }
.legal-page .topnav { padding-top: 32px; }
.legal-kicker { margin-top: clamp(48px, 8vw, 96px); color: var(--dim); }
.legal-page h1 {
  font-family: var(--serif); font-weight: 400; letter-spacing: -0.02em;
  font-size: clamp(52px, 8vw, 96px); line-height: 1; margin-top: 16px;
}
.legal-page h2 { font-family: var(--serif); font-weight: 400; font-size: 32px; margin: 48px 0 12px; }
.legal-page p, .legal-page li { color: #3A342D; margin: 12px 0; }
.legal-page a { border-bottom: 1px solid currentColor; }
.legal-page .rule { margin-top: 12px; }

/* ═══ Responsive ═══ */
@media (max-width: 1100px) {
  .exhibit-body { flex-direction: column; }
  .exhibit-mirrored .exhibit-body { flex-direction: column-reverse; }
  .vitrine { flex-basis: auto; width: 100%; min-height: 620px; }
  .object-label { gap: 48px; }
  .colophon-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .colophon-grid .right { text-align: left; }
}
@media (max-width: 820px) {
  .gallery-tag { display: none; }
  .axis-note { display: none; }
  .definition { position: static; width: auto; max-width: 300px; margin-top: 40px; align-self: flex-start; }
  .hero-stage { flex-direction: column; justify-content: center; align-items: stretch; }
  .hero-stage h1 { justify-content: center; }
  .nexus { right: 4vw; bottom: clamp(64px, 18vh, 130px); }
  .hero-foot { grid-template-columns: 1fr; gap: 18px; }
  .hero-foot .center, .hero-foot .right { text-align: left; }
  .wall-text { flex-direction: column; }
  .wall-label { width: auto; }
  .codes-grid { grid-template-columns: 1fr; }
  #wayfinding { display: none; }
}
@media (max-width: 480px) {
  .topnav-links { gap: 14px; }
  .topnav-links a { padding: 12px 0; }
  .vitrine { min-height: 600px; padding: 56px 0 0; }
  .phone { margin-top: 0; }
  .colophon-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
