/* Antikythera Cosmos: the landing page as a museum gallery at night.
   Dark warm walls, the bronze spot-lit, light card labels beside each object, an inscription face for titles. */

:root {
  --wall: #120e0b;
  --wall-2: #1a1410;
  --wall-3: #231b15;
  --ink: #ece2d0;
  --ink-dim: #bfb19a;
  --ink-faint: #8a7d6a;
  --bronze: #c99a5b;
  --bronze-hi: #e2bb7e;
  --verdigris: #7fa596;
  --card: #ebe1cc;
  --card-ink: #2a2018;
  --card-dim: #6b5b49;
  --rule: rgba(201, 154, 91, 0.28);
  --display: "Marcellus", "Palatino Linotype", "Book Antiqua", serif;
  --body: "Alegreya", "Palatino Linotype", Georgia, serif;
  --sc: "Alegreya SC", "Alegreya", "Palatino Linotype", Georgia, serif;
  --gutter: clamp(16px, 4vw, 56px);
  --measure: 38rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--wall);
  color: var(--ink);
  font-family: var(--body);
  font-size: clamp(17px, 1.05vw + 12px, 19px);
  line-height: 1.6;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: var(--bronze-hi); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--bronze-hi); outline-offset: 3px; }
code { font-family: ui-monospace, Consolas, monospace; font-size: 0.88em; color: var(--bronze-hi); overflow-wrap: anywhere; }
.small-caps { font-family: var(--sc); text-transform: lowercase; letter-spacing: 0.12em; color: var(--bronze); margin: 0; font-size: 0.95em; }

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

/* ---------- the bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 24px;
  padding: 12px var(--gutter);
  background: rgba(18, 14, 11, 0.86);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--rule);
}
.bar-mark { font-family: var(--display); letter-spacing: 0.34em; text-transform: uppercase; color: var(--bronze); text-decoration: none; font-size: 15px; white-space: nowrap; }
.bar-links { display: flex; gap: 20px; margin-left: auto; font-size: 15px; }
.bar-links a { color: var(--ink-dim); text-decoration: none; white-space: nowrap; }
.bar-links a span { font-family: var(--display); color: var(--bronze); margin-right: 4px; }
.bar-links a:hover { color: var(--ink); }
.bar-cta { font-family: var(--sc); text-transform: lowercase; letter-spacing: 0.1em; font-size: 15px; color: var(--wall); background: var(--bronze); padding: 5px 14px; text-decoration: none; white-space: nowrap; }
.bar-cta:hover { background: var(--bronze-hi); color: var(--wall); }
@media (max-width: 980px) { .bar-links { display: none; } .bar-cta { margin-left: auto; } }

/* ---------- buttons ---------- */
.btn { display: inline-block; padding: 12px 22px; font-family: var(--sc); text-transform: lowercase; letter-spacing: 0.08em; font-size: 17px; text-decoration: none; line-height: 1.3; }
.btn-bronze { background: var(--bronze); color: var(--wall); }
.btn-bronze:hover { background: var(--bronze-hi); color: var(--wall); }
.btn-line { border: 1px solid var(--bronze); color: var(--bronze-hi); }
.btn-line:hover { background: rgba(201, 154, 91, 0.12); color: var(--ink); }

/* ---------- object labels: light cards on the dark wall ---------- */
.label {
  background: var(--card);
  color: var(--card-ink);
  padding: 16px 18px 14px;
  font-size: 15px;
  line-height: 1.45;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) inset, 0 10px 30px rgba(0, 0, 0, 0.45);
  max-width: 22rem;
}
.label .acc { margin: 0; font-family: var(--sc); text-transform: lowercase; letter-spacing: 0.14em; color: var(--card-dim); font-size: 14px; }
.label .obj { margin: 2px 0 10px; font-family: var(--display); font-size: 19px; line-height: 1.25; }
.label dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; border-top: 1px solid rgba(42, 32, 24, 0.22); padding-top: 9px; }
.label dt { font-family: var(--sc); text-transform: lowercase; letter-spacing: 0.06em; color: var(--card-dim); }
.label dd { margin: 0; }

/* ---------- entrance: the title wall ---------- */
.entrance { position: relative; min-height: calc(100svh - 52px); display: grid; align-items: end; overflow: hidden; isolation: isolate; }
.entrance-media { position: absolute; inset: 0 0 0 18%; z-index: -2; }
.entrance-media video { width: 100%; height: 100%; object-fit: cover; object-position: 62% 50%; }
.entrance::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(18, 14, 11, 0.92) 0%, rgba(18, 14, 11, 0.6) 34%, rgba(18, 14, 11, 0) 62%),
    linear-gradient(0deg, rgba(18, 14, 11, 1) 0%, rgba(18, 14, 11, 0) 30%);
}
.entrance-wall { padding: 18vh var(--gutter) 64px; max-width: 46rem; }
.kicker { font-family: var(--sc); text-transform: lowercase; letter-spacing: 0.2em; color: var(--bronze); margin: 0 0 10px; }
h1 { font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: 0.16em; line-height: 1.02; margin: 0 0 22px; font-size: clamp(42px, 7.4vw, 104px); color: var(--ink); text-shadow: 0 2px 30px rgba(0, 0, 0, 0.6); }
h1 span { color: var(--bronze-hi); letter-spacing: 0.3em; font-size: 0.62em; }
.wall-text { font-size: clamp(19px, 1.5vw + 12px, 24px); line-height: 1.45; color: var(--ink); max-width: 34rem; margin: 0 0 18px; }
.status { display: inline-flex; align-items: center; gap: 9px; margin: 0 0 24px; font-family: var(--sc); text-transform: lowercase; letter-spacing: 0.08em; font-size: 15px; color: var(--verdigris); border: 1px solid rgba(127, 165, 150, 0.45); padding: 3px 12px 4px; }
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--verdigris); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.label-entrance { position: absolute; right: var(--gutter); bottom: 64px; }
@media (max-width: 1100px) {
  .entrance { display: block; min-height: 0; }
  .entrance-media { position: relative; inset: auto; aspect-ratio: 16 / 9; }
  .entrance::before { background: linear-gradient(0deg, rgba(18, 14, 11, 1) 0%, rgba(18, 14, 11, 0) 22%); height: calc(100vw * 9 / 16); bottom: auto; }
  .entrance-wall { padding: 8px var(--gutter) 28px; }
  .label-entrance { position: static; margin: 0 var(--gutter) 40px; }
}

/* ---------- the inscription: the numbers ---------- */
.inscription { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: var(--wall-2); padding: 26px var(--gutter); }
.inscription ul { list-style: none; margin: 0 auto; padding: 0; max-width: 1240px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px 0; }
@media (max-width: 1100px) { .inscription ul { grid-template-columns: repeat(3, 1fr); } .inscription li:nth-child(4) { border-left: 0; } }
.inscription li { font-size: 15px; color: var(--ink-dim); padding: 0 18px; border-left: 1px solid var(--rule); line-height: 1.35; }
.inscription li:first-child { border-left: 0; }
.inscription b { display: block; font-family: var(--display); font-weight: 400; font-size: 30px; color: var(--bronze-hi); letter-spacing: 0.04em; }
@media (max-width: 640px) {
  .inscription ul { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 0; }
  .inscription li { border-left: 0; padding: 0 10px; }
}

/* ---------- the plan of the gallery ---------- */
.plan { padding: 88px var(--gutter) 40px; }
.plan-inner { max-width: 54rem; margin: 0 auto; }
.plan h2 { font-size: 18px; margin-bottom: 18px; }
.directory { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.directory a { display: flex; align-items: baseline; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--ink); }
.directory a:hover .name { color: var(--bronze-hi); }
.directory .num { font-family: var(--display); color: var(--bronze); min-width: 2.4em; font-size: 20px; }
.directory .name { font-family: var(--display); font-size: clamp(19px, 1.2vw + 13px, 24px); }
.directory .lead { flex: 1; border-bottom: 1px dotted var(--ink-faint); transform: translateY(-5px); min-width: 20px; }
.directory .what { color: var(--ink-dim); font-style: italic; text-align: right; }
.plan-note { color: var(--ink-dim); font-style: italic; margin: 18px 0 0; max-width: var(--measure); }
@media (max-width: 640px) {
  .directory a { flex-wrap: wrap; gap: 2px 10px; }
  .directory .lead { display: none; }
  .directory .what { flex-basis: 100%; text-align: left; padding-left: calc(2.4em * 20 / 17 + 10px); font-size: 15px; }
}

/* ---------- rooms ---------- */
.room { position: relative; padding: 110px var(--gutter) 60px; border-top: 1px solid var(--rule); background: radial-gradient(ellipse 60% 40% at 50% 0%, rgba(201, 154, 91, 0.06), transparent 70%); }
.room:nth-of-type(even) { background-color: var(--wall-2); }
.room-head { position: relative; max-width: 1180px; margin: 0 auto 26px; }
.room-num { position: absolute; right: 0; top: -40px; font-family: var(--display); font-size: clamp(110px, 16vw, 220px); line-height: 1; color: rgba(201, 154, 91, 0.08); pointer-events: none; user-select: none; }
.room h2 { font-family: var(--display); font-weight: 400; font-size: clamp(32px, 3.4vw + 14px, 58px); line-height: 1.08; margin: 6px 0 0; letter-spacing: 0.02em; max-width: 18ch; }
.room-text { max-width: 1180px; margin: 0 auto 48px; }
.room-text p { max-width: var(--measure); margin: 0 0 1em; color: var(--ink); }
.room-text p + p { color: var(--ink-dim); }
@media (min-width: 1100px) {
  .room-text:has(p + p) { columns: 2; column-gap: 56px; }
  .room-text p { break-inside: avoid; max-width: none; }
  .room-text p + p { color: var(--ink); }
}

/* the object on its plinth */
.exhibit { margin: 0 auto; max-width: 1180px; display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: 0 36px; align-items: end; }
.exhibit .vitrine { grid-column: 1; grid-row: 1; position: relative; }
.exhibit .plinth { grid-column: 1; grid-row: 2; }
.exhibit .label { grid-column: 2; grid-row: 1 / span 2; align-self: end; margin-bottom: 26px; }
.vitrine { background: #0c0907; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55); }
.vitrine::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(201, 154, 91, 0.16); }
.vitrine video, .vitrine img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #0c0907; }
.plinth { height: 26px; margin: 0 6%; background: linear-gradient(180deg, #2c231c 0%, #1b1511 100%); border-top: 1px solid rgba(226, 187, 126, 0.25); box-shadow: 0 18px 30px rgba(0, 0, 0, 0.5); }
.caveat { max-width: 1180px; margin: 22px auto 0; color: var(--ink-faint); font-style: italic; font-size: 16px; }
.caveat::before { content: "Note. "; font-style: normal; font-family: var(--sc); text-transform: lowercase; letter-spacing: 0.08em; color: var(--bronze); }

.pair { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 56px 40px; }
.pair .exhibit { grid-template-columns: 1fr; gap: 0; max-width: none; margin: 0; }
.pair .exhibit .label { grid-column: 1; grid-row: 3; margin: 22px 0 0; max-width: none; }

/* room III: four cases */
.cases { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 72px 48px; }
.case { grid-template-columns: 1fr; gap: 0; margin: 0; max-width: none; align-items: start; }
.case .case-tag { grid-row: 1; margin-bottom: 12px; font-size: 17px; }
.case .vitrine { grid-row: 2; }
.case .case-text { grid-row: 3; margin-top: 18px; color: var(--ink-dim); font-size: 0.95em; }
.case .case-text p { margin: 0; }
.case .label { grid-column: 1; grid-row: 4; margin: 18px 0 0; max-width: none; }

@media (max-width: 1100px) {
  .exhibit { grid-template-columns: 1fr; }
  .exhibit .label { grid-column: 1; grid-row: 3; margin: 22px 0 0; max-width: 30rem; }
  .pair, .cases { grid-template-columns: 1fr; }
}

/* room V: the visit */
.visit { max-width: 1180px; margin: 80px auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.visit-still img { width: 100%; height: auto; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5); }
.still-cap { color: var(--ink-dim); font-size: 15px; font-style: italic; margin: 12px 0 0; }
.still-cap .small-caps { font-style: normal; margin-right: 6px; }
.visit-text h3 { font-family: var(--display); font-weight: 400; font-size: 26px; margin: 0 0 14px; }
.can { margin: 0 0 26px; padding-left: 1.1em; color: var(--ink-dim); }
.can li { margin-bottom: 8px; }
.can li::marker { color: var(--bronze); }
.fine { color: var(--ink-faint); font-size: 15px; font-style: italic; margin: 14px 0 0; }
@media (max-width: 900px) { .visit { grid-template-columns: 1fr; } }

/* ---------- conservation notes ---------- */
.notes { padding: 100px var(--gutter); background: var(--wall-3); border-top: 1px solid var(--rule); }
.notes-inner, .biblio-inner { max-width: 1180px; margin: 0 auto; }
.notes h2, .biblio h2 { font-family: var(--display); font-weight: 400; font-size: clamp(30px, 2.6vw + 14px, 46px); margin: 6px 0 36px; }
.notes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 36px 56px; }
.notes-grid > div { border-top: 1px solid var(--rule); padding-top: 18px; }
.notes h3 { font-family: var(--display); font-weight: 400; font-size: 22px; color: var(--bronze-hi); margin: 0 0 10px; }
.notes p, .notes li { color: var(--ink-dim); }
.notes p { margin: 0 0 1em; }
.notes ul { margin: 0; padding-left: 1.1em; }
.notes li { margin-bottom: 6px; }
.notes li::marker { color: var(--bronze); }
@media (max-width: 860px) { .notes-grid { grid-template-columns: 1fr; } }

/* ---------- bibliography ---------- */
.biblio { padding: 90px var(--gutter) 80px; border-top: 1px solid var(--rule); }
.refs { margin: 0 0 48px; padding-left: 1.4em; color: var(--ink-dim); max-width: 50rem; }
.refs li { margin-bottom: 12px; padding-left: 4px; }
.refs li::marker { font-family: var(--display); color: var(--bronze); }
.credits { width: 100%; border-collapse: collapse; font-size: 15px; color: var(--ink-dim); }
.credits caption { text-align: left; margin-bottom: 10px; }
.credits th { text-align: left; font-family: var(--sc); text-transform: lowercase; letter-spacing: 0.08em; font-weight: 400; color: var(--bronze); border-bottom: 1px solid var(--rule); padding: 6px 12px 6px 0; }
.credits td { border-bottom: 1px solid rgba(201, 154, 91, 0.12); padding: 8px 12px 8px 0; vertical-align: top; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .credits thead { display: none; }
  .credits tr { display: block; padding: 10px 0; border-bottom: 1px solid rgba(201, 154, 91, 0.12); }
  .credits td { display: block; border: 0; padding: 0; }
  .credits td:first-child { color: var(--ink); }
}

/* ---------- foot ---------- */
.foot { padding: 50px var(--gutter) 70px; text-align: center; color: var(--ink-faint); border-top: 1px solid var(--rule); font-size: 15px; }
.hedera { font-size: 26px; color: var(--bronze); margin: 0 0 10px; }
.foot p { margin: 0 0 10px; }
.foot-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 22px; }
