/* ===========================================================
   AppStorey — design tokens
   A warm, light archive — dark is reserved for three deliberate
   moments: the hero photo, the logo badge, and media "exhibit"
   cards (video/audio) where a dark frame reads as a stage light.
   =========================================================== */

:root {
  --page: #f5efe1;
  --raised: #fffdf8;
  --line: rgba(32, 31, 34, 0.14);
  --text: #201f22;
  --text-dim: rgba(32, 31, 34, 0.64);

  --ink: #141418;
  --ink-raised: #202024;
  --ink-line: rgba(255, 255, 255, 0.14);
  --ink-text: #f2eee4;
  --ink-text-dim: rgba(242, 238, 228, 0.66);

  --history: #b5542a;
  --interviews: #2c6e8c;
  --chip-gold: #d3a233;

  --serif: "Source Serif 4", Georgia, serif;
  --display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", "SF Mono", Menlo, monospace;

  --measure: 42rem;
  --radius: 3px;
}

* { box-sizing: border-box; }
html { color-scheme: light; }

html, body { overflow-x: hidden; }

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--chip-gold); outline-offset: 3px; }
img { max-width: 100%; display: block; }

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.001ms !important; animation-duration: 0.001ms !important; }
}

/* ---------------- logo ---------------- */
.logo-mark { display: block; flex-shrink: 0; }
.logo-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}
.logo-word {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: 0.005em;
}
.logo-lockup--light .logo-word { color: var(--text); }
.logo-lockup--dark .logo-word { color: var(--ink-text); }

/* ---------------- site chrome ---------------- */
.site-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: var(--page);
}
.site-header .bar {
  max-width: 68rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.6rem 1.4rem;
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.site-nav a { text-decoration: none; color: var(--text-dim); transition: color 0.15s; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--history); }

@media (max-width: 36rem) {
  .site-header .bar { flex-wrap: wrap; row-gap: 0.75rem; }
  .site-nav { gap: 0.5rem 1rem; font-size: 0.7rem; }
}

.site-footer {
  background: var(--raised);
  border-top: 1px solid var(--line);
  padding: 3rem 1.25rem 2.5rem;
  margin-top: 4rem;
}
.site-footer .wrap { max-width: 68rem; margin: 0 auto; }
.footer-links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 1rem;
}
.footer-links a { text-decoration: none; color: var(--text-dim); }
.footer-links a:hover { color: var(--history); }
.footer-note {
  font-family: var(--serif);
  font-style: italic;
  color: var(--text-dim);
  font-size: 0.95rem;
  max-width: 34rem;
  margin: 0;
}

/* ---------------- splash hero (home only) ---------------- */
.splash {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: flex-end;
  background:
    linear-gradient(180deg, rgba(10,10,12,0.25) 0%, rgba(10,10,12,0.55) 55%, rgba(8,8,10,0.92) 100%),
    url("/media/2015/06/mg_1229.jpg") center 28% / cover no-repeat;
  color: var(--ink-text);
}
.splash .wrap { max-width: 68rem; margin: 0 auto; padding: 3rem 1.25rem 3.25rem; width: 100%; min-width: 0; }
.splash .logo-lockup { margin-bottom: 2.5rem; }
.splash .logo-word { color: var(--ink-text); }
.splash .eyebrow {
  display: inline-block;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.74rem;
  color: var(--chip-gold);
  margin-bottom: 1rem;
}
.splash h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.4rem, 5.5vw, 4.1rem);
  line-height: 1.04;
  letter-spacing: -0.01em;
  margin: 0 0 1.1rem;
  max-width: 42rem;
  text-shadow: 0 2px 24px rgba(0,0,0,0.4);
}
.splash .lede {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--ink-text-dim);
  max-width: 34rem;
  margin: 0 0 2rem;
}
.splash .cta-row { display: flex; gap: 0.9rem; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: none;
  padding: 0.85rem 1.4rem;
  border-radius: 2px;
  transition: transform 0.15s, background 0.15s;
}
.btn-primary { background: var(--chip-gold); color: #161308; }
.btn-primary:hover { background: #e3ae3c; transform: translateY(-1px); }
.btn-ghost { background: rgba(255,255,255,0.08); color: var(--ink-text); border: 1px solid rgba(255,255,255,0.3); }
.btn-ghost:hover { background: rgba(255,255,255,0.16); transform: translateY(-1px); }

/* ---------------- featured teasers (home only) ---------------- */
.teasers { padding: 3.5rem 1.25rem; }
.teasers .wrap { max-width: 68rem; margin: 0 auto; }
.teasers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}
.teaser-card {
  display: block;
  background: var(--raised);
  border: 1px solid var(--line);
  padding: 1.5rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, transform 0.15s;
}
.teaser-card:hover { border-color: var(--chip-gold); transform: translateY(-2px); }
.teaser-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 0.7rem;
}
.teaser-card h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.15rem;
  margin: 0 0 0.5rem;
  line-height: 1.3;
}
.teaser-card p { margin: 0; color: var(--text-dim); font-size: 0.95rem; }

.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}
.featured-card {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 16rem;
  background-size: cover;
  background-position: center;
  text-decoration: none;
  color: var(--ink-text);
  overflow: hidden;
}
.featured-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,10,12,0.05) 0%, rgba(8,8,10,0.92) 85%);
}
.featured-card .body {
  position: relative;
  padding: 1.5rem;
}
.featured-card .featured-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--chip-gold);
  margin-bottom: 0.6rem;
}
.featured-card h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.2rem;
  line-height: 1.3;
  margin: 0;
  text-shadow: 0 2px 16px rgba(0,0,0,0.5);
}
.featured-card:hover h3 { color: var(--chip-gold); }

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.8rem;
}
.section-heading h2 {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
  color: var(--text-dim);
  margin: 0;
}
.section-heading a {
  font-family: var(--mono);
  font-size: 0.76rem;
  text-decoration: none;
  color: var(--history);
}

/* ---------------- audio exhibit: the Steve Jobs welcome clip ---------------- */
.audio-exhibit {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  background: var(--ink);
  color: var(--ink-text);
  margin: 0;
  overflow: hidden;
}
.audio-exhibit img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; filter: grayscale(0.15); }
.audio-exhibit-body { padding: 1.6rem 1.75rem; }
.audio-exhibit-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--chip-gold);
  display: block;
  margin-bottom: 0.6rem;
}
.audio-exhibit h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.3rem;
  margin: 0 0 0.8rem;
}
/* -------- giant play/meter button: press to make him talk -------- */
.play-zone {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.1rem;
  padding: 0.75rem;
  margin: -0.75rem -0.75rem 0.35rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s;
}
.play-zone:hover { background: rgba(211, 162, 51, 0.08); }
.play-zone:hover .play-zone-cue { color: var(--chip-gold); }
.play-zone:focus-visible { outline: 2px solid var(--chip-gold); outline-offset: 2px; }

.play-meter {
  flex-shrink: 0;
  width: 6.5rem;
  height: 6.5rem;
  background: var(--ink-raised);
  border: 2px solid var(--chip-gold);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s, background 0.15s;
}
.play-zone:hover .play-meter { transform: scale(1.04); background: #28282c; }
.play-zone:active .play-meter { transform: scale(0.97); }

.play-meter-icon.play-icon {
  width: 2.3rem;
  height: 2.3rem;
  color: var(--chip-gold);
  margin-left: 0.25rem;
}
.play-meter-bars {
  display: none;
  align-items: flex-end;
  justify-content: center;
  gap: 0.3rem;
  width: 70%;
  height: 55%;
}
.play-zone.is-playing .play-meter-icon.play-icon { display: none; }
.play-zone.is-playing .play-meter-bars { display: flex; }
.play-meter-bar {
  flex: 1;
  background: var(--chip-gold);
  height: 12%;
  min-height: 3px;
  border-radius: 1px;
}

.play-zone-text { min-width: 0; }
.play-zone-text h3 { margin: 0 0 0.3rem; }
.play-zone-cue {
  display: grid;
  margin: 0 0 0.6rem !important;
}
.play-zone-cue > span {
  grid-area: 1 / 1;
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: opacity 0.15s;
}
.play-zone-cue .cue-idle { color: var(--ink-text-dim); opacity: 1; }
.play-zone-cue .cue-playing { color: var(--chip-gold); opacity: 0; }
.play-zone.is-playing .play-zone-cue .cue-idle { opacity: 0; }
.play-zone.is-playing .play-zone-cue .cue-playing { opacity: 1; }

.audio-player {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}
.audio-player-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 50%;
  border: none;
  background: var(--chip-gold);
  color: var(--ink);
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}
.audio-player-btn:hover { background: #e3ae3c; transform: scale(1.06); }
.audio-player-btn .icon-play { margin-left: 2px; }
.audio-player-track {
  position: relative;
  flex: 1;
  height: 0.5rem;
  background: rgba(255,255,255,0.14);
  border-radius: 3px;
  cursor: pointer;
}
.audio-player-fill {
  position: absolute;
  inset: 0;
  width: 0%;
  background: var(--chip-gold);
  border-radius: 3px;
  pointer-events: none;
  transition: width 0.1s linear;
}
.audio-player-time {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--ink-text-dim);
  flex-shrink: 0;
  min-width: 2.4rem;
  text-align: right;
}
.audio-player audio { display: none; }
.audio-exhibit p {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-text-dim);
  font-size: 0.95rem;
  margin: 0;
  max-width: 38rem;
}
@media (max-width: 36rem) {
  .audio-exhibit { grid-template-columns: 1fr; }
  .audio-exhibit img { height: 10rem; }
}

/* ---------------- page hero (Story, Thanks) ---------------- */
.page-hero {
  background-size: cover;
  background-position: center;
  min-height: 20rem;
  display: flex;
  align-items: flex-end;
}
.page-hero .wrap {
  max-width: 68rem;
  margin: 0 auto;
  width: 100%;
  padding: 1.25rem 1.25rem 2.25rem;
}
.page-hero h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  color: var(--ink-text);
  margin: 0;
  text-shadow: 0 2px 24px rgba(0,0,0,0.4);
}

/* ---------------- timeline (archive index) ---------------- */
.timeline-section { padding: 1rem 1.25rem 2rem; }
.timeline-section .wrap { max-width: 68rem; margin: 0 auto; }
.timeline-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.9rem;
  margin-bottom: 0.4rem;
}
.timeline-heading h2 {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin: 0;
}
.timeline-heading .count { font-family: var(--mono); font-size: 0.78rem; color: var(--text-dim); }

.entry {
  display: block;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}
.entry:hover .entry-title { color: var(--history); }
.entry-cat {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.4rem;
  color: var(--text-dim);
}
.entry-cat .when { color: var(--text-dim); opacity: 0.55; margin-left: 0.6em; font-size: 0.9em; }
.entry-cat .when::before { content: "\2014\0020"; }
.dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; flex-shrink: 0; }
.dot.History { background: var(--history); }
.dot.Interviews { background: var(--interviews); }
.dot.Uncategorized { background: var(--chip-gold); }
.entry-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.3;
  margin: 0 0 0.4rem;
  transition: color 0.15s;
}
.entry-desc { font-family: var(--serif); color: var(--text-dim); margin: 0; max-width: 42rem; }

/* ---------------- article (content card) ----------------
   NeXT's own screens weren't busy — a handful of very large,
   very legible words on a field of empty space. Fewer rules,
   fewer boxes; let scale and air carry the hierarchy instead. */
.doc-wrap { padding: 4rem 1.25rem 1rem; }
.doc {
  max-width: var(--measure);
  margin: 0 auto;
  background: var(--raised);
  color: var(--text);
  border: none;
  box-shadow: 0 1px 3px rgba(32, 31, 34, 0.06);
  border-radius: var(--radius);
  padding: 4.5rem clamp(1.5rem, 9vw, 6rem) 5.5rem;
}
.doc.wide { max-width: 52rem; padding-left: 0; padding-right: 0; background: transparent; box-shadow: none; }

.doc-header { margin-bottom: 3.25rem; }
.doc-cat {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 1.5rem;
}
.doc h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.1rem, 5.5vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0 0 1.4rem;
}
.byline { font-family: var(--mono); font-size: 0.78rem; color: var(--text-dim); letter-spacing: 0.02em; margin: 0; }
.byline .sep { margin: 0 0.5em; opacity: 0.6; }

.prose { font-size: 1.1rem; line-height: 1.72; }
.prose > * + * { margin-top: 2rem; }
.prose h1 { font-family: var(--display); font-weight: 600; font-size: clamp(1.9rem, 4.5vw, 2.6rem); margin-top: 3.5rem; line-height: 1.1; letter-spacing: -0.015em; }
.prose h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.6rem, 3.6vw, 2.1rem);
  margin-top: 4rem;
  margin-bottom: -0.5rem;
  line-height: 1.18;
  letter-spacing: -0.01em;
}
.prose h3, .prose h5 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  margin-top: 2.6rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--history);
}
.prose p { margin: 0; }
.prose a { color: var(--interviews); text-decoration-thickness: 1px; }
.prose a:hover { color: var(--history); }
.prose strong { font-weight: 700; }
.prose ol, .prose ul { padding-left: 1.4rem; }
.prose li + li { margin-top: 0.5rem; }

.prose blockquote {
  margin: 1.6rem 0;
  padding-left: 1.25rem;
  border-left: 3px solid var(--chip-gold);
  font-style: italic;
  color: var(--text-dim);
}
.prose blockquote cite {
  display: block;
  font-family: var(--mono);
  font-style: normal;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.5rem;
}
.prose hr { border: none; border-top: 1px solid var(--line); margin: 2rem 0; }

/* -------- exhibit placards: every photo is a numbered artifact -------- */
.prose figure {
  margin: 2.2rem 0;
  background: #efe8d6;
  border: 1px solid var(--line);
  padding: 0.6rem 0.6rem 0.9rem;
  box-shadow: 0 0.4rem 1rem rgba(32, 31, 34, 0.08);
  transform: rotate(-0.6deg);
  transition: transform 0.2s ease;
}
.prose figure:nth-of-type(even) { transform: rotate(0.6deg); }
.prose figure:hover, .prose figure:focus-within { transform: rotate(0deg); }
.prose figure img, .prose figure picture { width: 100%; height: auto; }
.prose figure a { display: block; }
.prose figcaption {
  font-family: var(--serif);
  font-size: 0.9rem;
  color: var(--text-dim);
  padding-top: 0.6rem;
  border-top: 1px dashed var(--line);
  margin-top: 0.6rem;
}
.prose figcaption::before {
  content: "EXHIBIT";
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--history);
  margin-right: 0.5em;
}

/* -------- watch card: graceful stand-in for embeds that are now
   dead or privacy-restricted on their host platform -------- */
.watch-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 2.2rem 0;
  background: var(--ink);
  color: var(--ink-text);
  text-decoration: none;
  box-shadow: 0 0.5rem 1.2rem rgba(32, 31, 34, 0.14);
  overflow: hidden;
}
.watch-card img { width: 9rem; height: 6rem; object-fit: cover; flex-shrink: 0; }
.watch-meta { display: flex; align-items: center; gap: 0.9rem; padding: 0.9rem 1.1rem 0.9rem 0; }
.watch-card:not(:has(img)) .watch-meta { padding-left: 1.1rem; }
.watch-play {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.1rem; height: 2.1rem; border-radius: 50%;
  background: var(--chip-gold); color: var(--ink); font-size: 0.7rem; flex-shrink: 0;
}
.watch-title { display: block; font-family: var(--display); font-weight: 600; font-size: 1rem; line-height: 1.3; }
.watch-sub {
  display: block; font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--ink-text-dim); margin-top: 0.3rem;
}
.watch-card:hover .watch-title { color: var(--chip-gold); }

.embed-responsive { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; margin: 2.2rem 0; }
.embed-responsive iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.prose audio { width: 100%; margin: 1.2rem 0; }

.post-foot { max-width: var(--measure); margin: 2rem auto 0; padding: 0 clamp(1.25rem, 5vw, 0); }
.post-foot a { font-family: var(--mono); font-size: 0.82rem; text-decoration: none; color: var(--text-dim); }
.post-foot a:hover { color: var(--history); }

.doc.page h2 { font-family: var(--display); }

/* -------- archive library (unreferenced curation files) -------- */
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.lib-item {
  background: var(--raised); border: 1px solid var(--line); padding: 0.5rem;
  text-decoration: none; color: var(--text); display: flex; flex-direction: column; gap: 0.5rem;
}
.lib-thumb {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  background: #e7e1d2; overflow: hidden; font-family: var(--mono); font-size: 0.7rem;
  color: var(--text-dim); text-transform: uppercase;
}
.lib-thumb img { width: 100%; height: 100%; object-fit: cover; }
.lib-name { font-family: var(--mono); font-size: 0.74rem; word-break: break-all; color: var(--text-dim); }
