:root {
  --ink: #030403;
  --panel: #090907;
  --gold: #ba8b43;
  --gold-bright: #e7c989;
  --ivory: #e9e1c9;
  --muted: #948b78;
  --line: rgba(186, 139, 67, 0.28);
  --serif: Georgia, "Times New Roman", serif;
  --sans: Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--ink); }
body { margin: 0; color: var(--ivory); background: var(--ink); font-family: var(--sans); }
body.modal-open { overflow: hidden; }
a { color: inherit; }
button, input { font: inherit; }
button { color: inherit; }
img, video { display: block; max-width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.site { min-height: 100vh; overflow: hidden; background: var(--ink); }
.grain { position: fixed; inset: 0; z-index: 50; pointer-events: none; opacity: .16; mix-blend-mode: soft-light; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.23'/%3E%3C/svg%3E"); }

.nav-shell { position: fixed; z-index: 40; top: 0; left: 0; right: 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 76px; padding: 0 clamp(22px, 4vw, 64px); border-bottom: 1px solid rgba(186,139,67,.17); background: linear-gradient(180deg, rgba(3,4,3,.94), rgba(3,4,3,.58), transparent); backdrop-filter: blur(8px); }
.brand { display: inline-flex; width: max-content; gap: 11px; align-items: center; color: var(--ivory); font-family: var(--serif); font-size: .78rem; letter-spacing: .22em; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 29px; height: 29px; border: 1px solid var(--line); border-radius: 50%; color: var(--gold-bright); font-size: 1.05rem; letter-spacing: 0; }
.nav-shell nav { display: flex; gap: clamp(18px, 3vw, 42px); }
.nav-shell nav a, .ig-link { color: var(--muted); font-size: .62rem; letter-spacing: .19em; text-decoration: none; transition: color .2s ease; }
.nav-shell nav a:hover, .ig-link:hover { color: var(--gold-bright); }
.ig-link { justify-self: end; }

.threshold { position: relative; display: grid; grid-template-columns: minmax(300px, .9fr) minmax(380px, 1.1fr); align-items: center; min-height: 100svh; padding: 110px clamp(28px, 7vw, 110px) 72px; isolation: isolate; border-bottom: 1px solid var(--line); background: radial-gradient(circle at 68% 46%, rgba(128,77,14,.18), transparent 32%), radial-gradient(circle at 50% 100%, rgba(13,74,67,.08), transparent 36%), #030403; }
.threshold::before { content: ""; position: absolute; inset: 8% 3%; z-index: -2; border: 1px solid rgba(186,139,67,.08); }
.threshold-copy { position: relative; z-index: 2; max-width: 650px; }
.eyebrow { margin: 0; color: var(--gold); font-family: var(--serif); font-size: clamp(.58rem, .8vw, .72rem); letter-spacing: .27em; text-transform: uppercase; }
.threshold h1 { margin: 24px 0 18px; font-family: var(--serif); font-size: clamp(5.6rem, 14vw, 13rem); font-weight: 400; line-height: .7; letter-spacing: -.06em; text-shadow: 0 0 80px rgba(186,139,67,.18); }
.threshold h1 span { color: var(--gold-bright); font-size: .42em; vertical-align: top; }
.threshold-manifesto { margin: 36px 0; color: #c7bea9; font-family: var(--serif); font-size: clamp(1.25rem, 2.4vw, 2.15rem); line-height: 1.28; }
.access-code { display: grid; width: min(100%, 480px); border-top: 1px solid var(--line); }
.access-code span { padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .63rem; letter-spacing: .2em; }
.enter-control { display: flex; align-items: center; justify-content: space-between; width: min(100%, 480px); margin-top: 22px; padding: 18px 20px; border: 1px solid rgba(231,201,137,.52); background: rgba(186,139,67,.06); color: var(--ivory); cursor: pointer; font-family: var(--serif); font-size: .77rem; letter-spacing: .2em; transition: background .2s ease, transform .2s ease; }
.enter-control:hover { background: rgba(186,139,67,.13); transform: translateY(-2px); }
.enter-control i { color: var(--gold-bright); font-size: 1.2rem; font-style: normal; }
.threshold-organ { position: relative; justify-self: center; width: min(38vw, 500px); filter: sepia(.12) contrast(1.08); }
.threshold-organ::before, .threshold-organ::after { content: ""; position: absolute; inset: -7%; border: 1px solid rgba(186,139,67,.16); border-radius: 50%; animation: orbit 28s linear infinite; }
.threshold-organ::after { inset: -17%; border-color: rgba(186,139,67,.08); animation-direction: reverse; animation-duration: 44s; }
.threshold-organ img { position: relative; z-index: 2; width: 100%; max-height: 74vh; object-fit: contain; mix-blend-mode: screen; opacity: .72; mask-image: radial-gradient(ellipse 48% 47% at center, #000 36%, transparent 76%); transition: opacity 1.2s ease, transform 1.2s ease; }
.site.entered .threshold-organ img { opacity: 1; transform: scale(1.035); }
.scan-line { position: absolute; z-index: 3; left: 11%; right: 11%; top: 28%; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-bright), transparent); box-shadow: 0 0 16px var(--gold); opacity: .45; animation: scan 7s ease-in-out infinite; }
.threshold-note { position: absolute; right: clamp(28px, 5vw, 80px); bottom: 30px; margin: 0; color: #6f6758; font-size: .58rem; letter-spacing: .22em; }
.threshold-orbit { position: absolute; z-index: -1; border: 1px solid rgba(186,139,67,.08); border-radius: 50%; }
.orbit-a { width: 480px; height: 480px; left: -300px; top: 20%; }
.orbit-b { width: 340px; height: 340px; right: -180px; bottom: -70px; }

.intro-strip { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); background: #070706; }
.intro-strip p { margin: 0; padding: 22px 3vw; border-right: 1px solid var(--line); color: var(--gold); font-family: var(--serif); font-size: .64rem; letter-spacing: .18em; text-align: center; }
.intro-strip p:last-child { border-right: 0; }

.sequence-section, .corpus-section, .method-section, .access-section { padding: clamp(78px, 10vw, 150px) clamp(22px, 6vw, 96px); }
.section-head { display: grid; grid-template-columns: 1.2fr .8fr; gap: 60px; align-items: end; max-width: 1480px; margin: 0 auto 54px; }
.section-head h2, .method-copy h2, .access-section h2 { margin: 17px 0 0; color: var(--ivory); font-family: var(--serif); font-size: clamp(2.6rem, 6vw, 6.6rem); font-weight: 400; line-height: .91; letter-spacing: -.03em; }
.section-head > p { max-width: 530px; margin: 0; color: var(--muted); font-family: var(--serif); font-size: clamp(1rem, 1.6vw, 1.42rem); line-height: 1.58; }
.sequence-section { border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #050505, #090806); }
.sequence-rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(210px, 1fr); gap: 1px; max-width: 1480px; margin: 0 auto; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-color: var(--gold) #090806; border: 1px solid var(--line); background: var(--line); }
.sequence-node { display: grid; grid-template-rows: auto 320px auto auto; min-width: 0; padding: 0; border: 0; background: #060605; text-align: left; cursor: pointer; }
.node-index { padding: 14px 15px; color: #756b58; font-size: .58rem; letter-spacing: .18em; }
.node-image { position: relative; overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.node-image img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.75) brightness(.8); transition: transform .6s ease, filter .6s ease; }
.sequence-node:hover .node-image img { transform: scale(1.045); filter: saturate(1) brightness(1); }
.node-family { padding: 18px 16px 7px; color: var(--gold); font-size: .55rem; letter-spacing: .2em; }
.sequence-node strong { padding: 0 16px 22px; color: var(--ivory); font-family: var(--serif); font-size: 1.02rem; font-weight: 400; letter-spacing: .08em; }

.corpus-section { background: radial-gradient(circle at 8% 20%, rgba(141,84,14,.07), transparent 26%), var(--ink); }
.corpus-head { grid-template-columns: 1fr auto; }
.archive-count { display: flex; gap: 14px; align-items: baseline; border-bottom: 1px solid var(--line); }
.archive-count span { color: var(--gold-bright); font-family: var(--serif); font-size: 4rem; }
.archive-count small { color: var(--muted); font-size: .55rem; letter-spacing: .18em; }
.archive-controls { display: flex; justify-content: space-between; gap: 24px; max-width: 1480px; margin: 0 auto 34px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.filters { display: flex; gap: 7px; overflow-x: auto; }
.filters button { flex: 0 0 auto; padding: 10px 12px; border: 1px solid transparent; background: none; color: #807664; cursor: pointer; font-size: .58rem; letter-spacing: .16em; }
.filters button:hover, .filters button.active { border-color: var(--line); color: var(--gold-bright); background: rgba(186,139,67,.06); }
.search-control { display: flex; align-items: center; width: min(360px, 38vw); border-left: 1px solid var(--line); padding-left: 18px; }
.search-control input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ivory); font-size: .6rem; letter-spacing: .15em; }
.search-control input::placeholder { color: #675f51; }
.search-control i { color: var(--gold); font-size: 1.1rem; font-style: normal; }
.record-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; max-width: 1480px; margin: 0 auto; border: 1px solid var(--line); background: var(--line); }
.record-card { min-width: 0; padding: 0; border: 0; background: #070706; text-align: left; cursor: pointer; animation: reveal .55s ease both; animation-delay: var(--delay); }
.record-media { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; background: #030303; }
.record-media img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.83) saturate(.72); transition: filter .45s ease, transform .6s ease; }
.record-card:hover .record-media img { filter: brightness(1.04) saturate(1); transform: scale(1.025); }
.record-status, .seen-mark { position: absolute; z-index: 2; top: 11px; left: 11px; padding: 7px 8px; border: 1px solid rgba(231,201,137,.25); background: rgba(2,3,3,.76); color: var(--gold-bright); font-size: .48rem; letter-spacing: .15em; }
.seen-mark { top: auto; bottom: 11px; left: auto; right: 11px; color: #8a806c; }
.play-glyph { position: absolute; z-index: 2; inset: 50% auto auto 50%; transform: translate(-50%,-50%); display: grid; place-items: center; width: 50px; height: 50px; border: 1px solid rgba(231,201,137,.58); border-radius: 50%; background: rgba(3,4,3,.62); color: var(--gold-bright); font-size: .8rem; padding-left: 3px; }
.record-meta { display: grid; min-height: 126px; padding: 17px 16px 20px; border-top: 1px solid var(--line); }
.record-meta > span { color: var(--gold); font-size: .5rem; letter-spacing: .2em; }
.record-meta strong { align-self: end; margin-top: 18px; font-family: var(--serif); font-size: clamp(.9rem, 1.4vw, 1.2rem); font-weight: 400; letter-spacing: .08em; }
.record-meta em { margin-top: 6px; color: #756d60; font-family: var(--serif); font-size: .66rem; font-style: normal; }
.empty-state { padding: 80px 0; color: var(--muted); font-family: var(--serif); letter-spacing: .16em; text-align: center; }

.method-section { display: grid; grid-template-columns: minmax(320px,.85fr) minmax(400px,1.15fr); gap: clamp(50px, 8vw, 130px); align-items: center; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: linear-gradient(90deg,#050504,#0b0906 58%,#050504); }
.method-image { position: relative; max-width: 680px; justify-self: end; }
.method-image::before { content: "IA"; position: absolute; z-index: 2; right: 9%; bottom: 7%; color: rgba(231,201,137,.16); font-family: var(--serif); font-size: clamp(3rem,8vw,9rem); }
.method-image img { width: 100%; border: 1px solid var(--line); }
.method-copy { min-width: 0; max-width: 710px; }
.method-copy h2 { overflow-wrap: anywhere; font-size: clamp(3.4rem,7vw,8rem); }
.method-lead { margin: 28px 0; color: var(--gold-bright)!important; font-family: var(--serif); font-size: clamp(1.15rem,2vw,1.8rem)!important; }
.method-copy > p { color: var(--muted); font-family: var(--serif); font-size: 1.05rem; line-height: 1.7; }
.method-equation { display: grid; grid-template-columns: 1fr auto; margin: 34px 0; border-top: 1px solid var(--line); }
.method-equation span, .method-equation i { padding: 12px 0; border-bottom: 1px solid var(--line); }
.method-equation span { color: var(--ivory); font-family: var(--serif); font-size: .75rem; letter-spacing: .16em; }
.method-equation i { color: var(--gold); font-size: .54rem; font-style: normal; letter-spacing: .18em; }
.manifesto-line { padding: 20px; border: 1px solid var(--line); color: var(--ivory)!important; }

.access-section { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 40px; min-height: 55vh; background: radial-gradient(circle at 80% 30%, rgba(186,139,67,.12), transparent 33%), #030403; }
.access-section a { display: flex; gap: 70px; align-items: center; padding: 22px 24px; border: 1px solid rgba(231,201,137,.48); color: var(--ivory); font-family: var(--serif); font-size: .7rem; letter-spacing: .19em; text-decoration: none; transition: background .2s ease; }
.access-section a:hover { background: rgba(186,139,67,.11); }
.access-section a i { color: var(--gold-bright); font-size: 1.4rem; font-style: normal; }
.site-footer { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; padding: 30px clamp(22px,6vw,96px); border-top: 1px solid var(--line); color: #776e5d; }
.footer-emblem { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; color: var(--gold); }
.site-footer p { margin: 0; font-family: var(--serif); font-size: .62rem; letter-spacing: .18em; }
.site-footer > div:last-child { display: flex; gap: 18px; font-size: .48rem; letter-spacing: .15em; }

.record-dialog-backdrop { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 28px; overflow-y: auto; background: rgba(0,0,0,.9); backdrop-filter: blur(16px); animation: fade .2s ease both; }
.record-dialog-backdrop[hidden] { display: none !important; }
.record-dialog { position: relative; display: grid; grid-template-columns: minmax(300px,.95fr) minmax(360px,1.05fr); width: min(1180px,100%); max-height: calc(100svh - 56px); border: 1px solid rgba(231,201,137,.44); background: #070706; box-shadow: 0 36px 130px #000; overflow: hidden; }
.dialog-close { position: absolute; z-index: 3; top: 12px; right: 12px; width: 42px; height: 42px; border: 1px solid var(--line); background: rgba(3,4,3,.88); color: var(--ivory); cursor: pointer; font-size: 1.6rem; font-weight: 200; }
.dialog-media { display: grid; place-items: center; min-height: 600px; overflow: hidden; border-right: 1px solid var(--line); background: #010101; }
.dialog-media img, .dialog-media video { width: 100%; height: 100%; max-height: calc(100svh - 58px); object-fit: contain; }
.dialog-copy { overflow-y: auto; padding: clamp(34px,5vw,72px); }
.dialog-copy h2 { margin: 18px 0 8px; font-family: var(--serif); font-size: clamp(2.4rem,5vw,5rem); font-weight: 400; letter-spacing: -.03em; line-height: .95; }
.dialog-latin { margin: 0 0 30px; color: var(--gold); font-family: var(--serif); font-size: .85rem; letter-spacing: .12em; }
.classification-table { display: grid; grid-template-columns: auto 1fr; border-top: 1px solid var(--line); }
.classification-table span, .classification-table strong { padding: 11px 0; border-bottom: 1px solid var(--line); font-size: .55rem; letter-spacing: .15em; }
.classification-table span { color: #746b5c; }
.classification-table strong { color: var(--gold-bright); font-weight: 400; text-align: right; }
.dialog-description { margin: 30px 0; color: #aea48f; font-family: var(--serif); font-size: 1.06rem; line-height: 1.7; }
.protocol-box { padding: 20px; border: 1px solid var(--line); }
.protocol-box span { color: var(--gold); font-size: .52rem; letter-spacing: .18em; }
.protocol-box p { margin: 12px 0 0; color: #b9af9a; font-family: var(--serif); line-height: 1.55; }
.caption-details { margin-top: 18px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.caption-details summary { padding: 15px 0; color: var(--gold); cursor: pointer; font-size: .56rem; letter-spacing: .18em; }
.caption-details p { white-space: pre-line; color: #9e9584; font-family: var(--serif); font-size: .9rem; line-height: 1.65; }
.dialog-actions { display: flex; gap: 12px; margin-top: 24px; }
.dialog-actions a { flex: 1; padding: 14px; border: 1px solid var(--line); color: var(--ivory); font-size: .56rem; letter-spacing: .15em; text-align: center; text-decoration: none; }
.dialog-actions a:hover { border-color: var(--gold-bright); }

@keyframes orbit { to { transform: rotate(360deg); } }
@keyframes scan { 0%,100% { top: 24%; opacity: .2; } 50% { top: 74%; opacity: .62; } }
@keyframes reveal { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 1050px) {
  .record-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .threshold { grid-template-columns: 1fr .8fr; }
  .site-footer { grid-template-columns: auto 1fr; }
  .site-footer > div:last-child { display: none; }
}

@media (max-width: 900px) {
  .method-section { grid-template-columns: 1fr; }
  .method-image { justify-self: stretch; }
}

@media (max-width: 760px) {
  .nav-shell { grid-template-columns: 1fr auto; min-height: 64px; padding: 0 18px; }
  .nav-shell nav { display: none; }
  .ig-link { font-size: .52rem; }
  .threshold { grid-template-columns: 1fr; align-items: start; min-height: 100svh; padding: 112px 24px 56px; }
  .threshold-copy { z-index: 4; }
  .threshold h1 { font-size: clamp(5.4rem,30vw,9rem); }
  .threshold-manifesto { margin: 27px 0; font-size: 1.25rem; }
  .access-code, .enter-control { width: 100%; }
  .threshold-organ { position: absolute; z-index: 1; right: -18%; bottom: 2%; width: 92vw; opacity: .42; }
  .threshold-note { left: 24px; right: auto; bottom: 22px; }
  .intro-strip { grid-template-columns: 1fr; }
  .intro-strip p { border-right: 0; border-bottom: 1px solid var(--line); text-align: left; }
  .section-head, .corpus-head { grid-template-columns: 1fr; gap: 24px; }
  .archive-count { width: max-content; }
  .sequence-section, .corpus-section, .method-section, .access-section { padding: 76px 18px; }
  .sequence-rail { grid-auto-columns: 72vw; }
  .archive-controls { align-items: stretch; flex-direction: column; }
  .search-control { width: 100%; min-height: 44px; border-left: 0; border-top: 1px solid var(--line); padding: 12px 0 0; }
  .record-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .record-meta { min-height: 112px; padding: 14px 12px; }
  .record-meta strong { font-size: .87rem; }
  .record-status { max-width: calc(100% - 20px); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .method-section { grid-template-columns: 1fr; }
  .method-image { justify-self: stretch; }
  .method-copy h2 { font-size: clamp(3.2rem,16vw,5.2rem); }
  .access-section { grid-template-columns: 1fr; align-items: center; }
  .access-section a { justify-content: space-between; gap: 20px; }
  .site-footer { padding: 28px 18px; }
  .record-dialog-backdrop { align-items: start; padding: 0; }
  .record-dialog { grid-template-columns: 1fr; max-height: none; min-height: 100svh; border-width: 0; overflow: visible; }
  .dialog-media { min-height: 68svh; border-right: 0; border-bottom: 1px solid var(--line); }
  .dialog-media img, .dialog-media video { max-height: 78svh; }
  .dialog-copy { overflow: visible; padding: 34px 20px 54px; }
  .dialog-actions { flex-direction: column; }
}

@media (max-width: 410px) {
  .record-grid { grid-template-columns: 1fr; }
  .record-media { aspect-ratio: 4 / 4.7; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms!important; animation-iteration-count: 1!important; transition-duration: .01ms!important; }
}
