/* The Underground Mind — TUM-WEB-001-v2
   Direction: "Excavation". The page is a descent through strata, from the
   lit surface (the sign) down to the signal (watch/listen readiness).
   Charcoal + amber + bone. Cardo (display/serif), Source Sans 3 (body),
   Anonymous Pro (stratum labels). All fonts self-hosted, SIL OFL 1.1. */

@font-face { font-family: "Cardo"; src: url("../fonts/cardo-regular.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Cardo"; src: url("../fonts/cardo-italic.woff") format("woff"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Cardo"; src: url("../fonts/cardo-bold.woff") format("woff"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("../fonts/sourcesans3-var.woff") format("woff"); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Anonymous Pro"; src: url("../fonts/anonymouspro-regular.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --char: #0e0c0a;
  --soot: #16120f;
  --earth: #231a12;
  --amber: #eaa14c;
  --amber-hot: #ffc77d;
  --rust: #a5582a;
  --bone: #f2e8d7;
  --muted: #bcae97;
  --line: rgba(234, 161, 76, .28);
  --serif: "Cardo", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "Anonymous Pro", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --measure: 38rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--char);
  color: var(--bone);
  font: 400 1.125rem/1.6 var(--sans);
  text-rendering: optimizeLegibility;
}
/* fine grain over everything: rough edges, not glossy */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 50; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .9 0 0 0 0 .8 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--amber); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--amber-hot); }
:focus-visible { outline: 2px solid var(--amber-hot); outline-offset: 3px; border-radius: 2px; }

h1, h2 { font-family: var(--serif); font-weight: 400; line-height: 1.05; margin: 0; letter-spacing: -.01em; }
h2 { font-size: clamp(2.25rem, 6.5vw, 4.75rem); margin-bottom: 1.5rem; text-wrap: balance; }
p { margin: 0 0 1em; max-width: var(--measure); }
.big { font-family: var(--serif); font-size: clamp(1.35rem, 2.6vw, 1.85rem); line-height: 1.35; max-width: 34rem; }

.skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--amber); color: var(--char); padding: .6rem 1rem; font-weight: 600; text-decoration: none; }
.skip:focus { top: 1rem; color: var(--char); }

.wrap { padding-inline: var(--gutter); max-width: 76rem; margin-inline: auto; }

/* stratum label + the excavation rule that runs down the left edge */
.stratum {
  font: 400 .8125rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase;
  color: var(--amber); margin-bottom: 1.25rem; display: flex; align-items: center; gap: .75rem;
}
.stratum::before { content: ""; width: 2.25rem; height: 1px; background: var(--amber); flex: none; }

/* ---------- masthead ---------- */
.masthead {
  position: absolute; inset: 0 0 auto; z-index: 10;
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 1.5rem;
  padding: 1.1rem var(--gutter);
}
.wordmark { font: 400 1rem/1 var(--serif); letter-spacing: .18em; text-transform: uppercase; color: var(--bone); text-decoration: none; }
.masthead ul { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin: 0; padding: 0; }
.masthead nav a { font: 400 .8125rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); text-decoration: none; padding: .5rem 0; display: inline-block; }
.masthead nav a:hover { color: var(--amber-hot); }
@media (max-width: 34em) { .masthead nav { display: none; } } /* single-page: sections stay reachable by scrolling + skip link */

/* ---------- surface / hero ---------- */
/* Portrait / narrow: the sign art stacks above the copy at its natural
   aspect so the full neon sign is always visible (never cropped). */
.surface { position: relative; isolation: isolate; }
.surface__art { display: block; position: relative; }
.surface__art img { width: 100%; animation: hum 7s ease-in-out infinite; }
.surface__art::after { content: ""; position: absolute; inset: auto 0 0; height: 35%; background: linear-gradient(to bottom, transparent, var(--char)); }
.surface__art::before { content: ""; position: absolute; inset: 0 0 auto; height: 22%; z-index: 1; background: linear-gradient(to top, transparent, rgba(14,12,10,.85)); }
.surface__copy { padding: 0 var(--gutter); margin-top: -2rem; position: relative; max-width: 62rem; }
.show-title { font: 400 .8125rem/1.5 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--amber); margin-bottom: 1.25rem; display: flex; flex-wrap: wrap; gap: .1rem .9rem; align-items: center; }
.show-title::before { content: ""; width: 2.25rem; height: 1px; background: var(--amber); }
.show-title span { color: var(--muted); }
.lede { font-family: var(--serif); font-size: clamp(2.3rem, 9vw, 4.25rem); line-height: 1.02; max-width: 18ch; margin: 0; text-wrap: balance; }
.lede span { display: block; font-style: italic; color: var(--amber); font-size: .5em; line-height: 1.2; margin-top: .55em; }
.surface__foot { display: flex; justify-content: space-between; align-items: end; gap: 1rem; padding: 2.5rem var(--gutter) 1.5rem; }
.tag { font: italic 400 1.15rem/1.2 var(--serif); color: var(--muted); margin: 0; }
.descend { font: 400 .8125rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; padding: .75rem 0; }
.descend span { display: inline-block; animation: sink 2.4s ease-in-out infinite; }

/* Landscape / wide: the sign band sits in normal flow, capped by viewport
   height and cropped around the sign; the copy always starts below it, so
   sign and headline can never overlap at any window height (v2 fix for
   short laptop windows such as 1262x625). Source sign occupies rows
   ~355-415 of 701; object-position keeps it centred in the visible band. */
@media (min-width: 48em) and (min-aspect-ratio: 5/4) {
  .surface__art img { height: min(58svh, calc(100vw * 420 / 1122)); min-height: 15rem; object-fit: cover; object-position: 50% 62%; }
  .surface__art::after { height: 28%; }
  .surface__art::before { height: 18%; }
  .surface__copy { margin-top: 0; padding-top: .5rem; }
  .lede { font-size: clamp(2.2rem, 4vw, 4rem); max-width: 22ch; }
  .surface__foot { padding-top: 2rem; }
}

@keyframes hum { 0%, 100% { filter: brightness(1); } 48% { filter: brightness(1.06); } 50% { filter: brightness(.97); } 52% { filter: brightness(1.05); } }
@keyframes sink { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(.3rem); } }

/* ---------- layers ---------- */
.layer { position: relative; padding-block: clamp(4.5rem, 11vw, 9rem); }
.layer + .layer { border-top: 1px solid var(--line); }

.premise .cols { display: grid; gap: 1.5rem 4rem; }
.premise .cols p:last-child { color: var(--muted); }
@media (min-width: 60em) { .premise .cols { grid-template-columns: 1.1fr 1fr; align-items: start; } .premise .cols p:last-child { margin-top: .5rem; } }

/* core sample: ten strata, each slightly deeper and darker, with rough edges */
.core { background: var(--soot); padding-bottom: 0; }
.core__intro { color: var(--muted); margin-bottom: 3rem; }
.strata { list-style: none; margin: 0; padding: 0; counter-reset: none; }
.strata li {
  --h: 4.25rem;
  position: relative; display: flex; align-items: center; gap: 1.25rem;
  min-height: var(--h);
  padding: 1rem var(--gutter);
  font: 400 clamp(1.6rem, 4.4vw, 3.1rem)/1 var(--serif);
  margin-top: -.6rem; /* overlap so the jagged edges interlock */
  clip-path: polygon(0 .6rem, 7% 0, 16% .45rem, 29% .1rem, 41% .55rem, 55% 0, 68% .4rem, 80% .05rem, 91% .5rem, 100% .15rem, 100% 100%, 0 100%);
}
.strata li:nth-child(even) { clip-path: polygon(0 .2rem, 9% .55rem, 22% 0, 35% .45rem, 47% .1rem, 60% .6rem, 73% .15rem, 86% .5rem, 100% 0, 100% 100%, 0 100%); }
.strata li:nth-child(1)  { background: #7a4a22; --h: 3.6rem; margin-top: 0; }
.strata li:nth-child(2)  { background: #6c4120; --h: 5rem; }
.strata li:nth-child(3)  { background: #5f3a1e; --h: 3.9rem; }
.strata li:nth-child(4)  { background: #53331c; --h: 4.6rem; font-style: italic; }
.strata li:nth-child(5)  { background: #472c19; --h: 5.6rem; }
.strata li:nth-child(6)  { background: #3c2616; --h: 4.1rem; }
.strata li:nth-child(7)  { background: #322014; --h: 4.8rem; }
.strata li:nth-child(8)  { background: #291b11; --h: 4rem; }
.strata li:nth-child(9)  { background: #21160e; --h: 5.2rem; font-style: italic; }
.strata li:nth-child(10) { background: #18110b; --h: 6rem; padding-bottom: 2rem; }
.strata .n { font: 400 .8125rem/1 var(--mono); letter-spacing: .12em; color: var(--amber-hot); opacity: .85; min-width: 2ch; }
@media (min-width: 60em) {
  .strata li { padding-left: calc(var(--gutter) + 12vw); }
}

/* format */
.format__list { display: grid; gap: 0; margin: 2rem 0 0; }
.format__list > div { border-top: 1px solid var(--line); padding: 1.5rem 0; display: grid; gap: .35rem; align-content: start; }
.format__list dt { font: 400 clamp(1.35rem, 2.4vw, 1.75rem)/1.2 var(--serif); color: var(--amber); }
.format__list dd { margin: 0; color: var(--muted); max-width: 30rem; }
@media (min-width: 48em) {
  .format__list { grid-template-columns: 1fr 1fr; column-gap: 4rem; }
}

/* room */
.room { display: grid; gap: 2.5rem; padding-top: 0; background: var(--earth); }
.room__art { margin: 0; }
.room__art img { width: 100%; aspect-ratio: 1122 / 1102; object-fit: cover; }
.room__art figcaption { font: 400 .8125rem/1.4 var(--mono); letter-spacing: .04em; color: var(--muted); padding: .75rem var(--gutter) 0; }
.room__copy { padding-inline: var(--gutter); }
.room__copy p:last-child { color: var(--muted); font-style: italic; font-family: var(--serif); font-size: 1.3rem; }
@media (min-width: 60em) {
  .room { grid-template-columns: 55fr 45fr; align-items: center; gap: 0; padding-block: 0; }
  .room__art figcaption { padding-left: 1.25rem; padding-bottom: 1.25rem; }
  .room__copy { padding: 4rem var(--gutter) 4rem 4rem; }
}

/* host */
.host h2 { display: flex; flex-direction: column; gap: .5rem; }
.host__role { font: italic 400 .4em/1 var(--serif); color: var(--amber); letter-spacing: 0; }
.host p:last-child { color: var(--muted); }
@media (min-width: 60em) { .host__wrap { padding-left: calc(var(--gutter) + 12vw); } }

/* listen / signal */
.listen {
  background:
    radial-gradient(60rem 22rem at 70% 110%, rgba(234,161,76,.20), transparent 70%),
    var(--char);
}
.listen h2 { color: var(--bone); }
.listen > .wrap > p:not(.stratum):not(.big) { color: var(--muted); }

.signal-line { font: 400 .8125rem/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--amber); margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); max-width: 46rem; }

/* footer */
.foot { border-top: 1px solid var(--line); padding-block: 3rem; background: #0a0807; }
.foot__wrap { display: grid; gap: .25rem; }
.foot__mark { font: 400 1rem/1 var(--serif); letter-spacing: .24em; text-transform: uppercase; margin-bottom: .5rem; }
.foot__sub { font-family: var(--serif); font-style: italic; color: var(--muted); }
.foot__fine { font-size: .9rem; color: var(--muted); }
.foot__up { font: 400 .8125rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; text-decoration: none; justify-self: start; padding: .75rem 0; }

/* ---------- 404 ---------- */
.lost { min-height: 100svh; display: grid; align-content: end; position: relative; isolation: isolate; padding: 0 var(--gutter) 3rem; }
.lost picture { position: absolute; inset: 0; z-index: -1; }
.lost img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; opacity: .55; }
.lost h1 { font-size: clamp(2.4rem, 7vw, 5rem); max-width: 14ch; margin-bottom: 1rem; }

/* ---------- motion & print ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  body::after, .surface__art, .masthead nav, .descend, .foot__up { display: none; }
  body { background: #fff; color: #000; }
  .layer, .core, .room, .listen, .foot, .strata li { background: none !important; color: #000; }
}
