/* Max Brummer — Audio Visual Storyteller
   Layout: cream editorial pages, full-bleed photography, black footer.
   One fixed look (matches the original site), so colors are set explicitly. */
:root {
  --cream: #fbf9f2;
  --cream-2: #f2ece0;
  --ink: #313131;
  --black: #000;
  --stone: #c4c0b1;
  --red: #d11f2b;
  --olive: #3a3c22;
  --line: #d9d5c7;

  --font-logo: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --font-display: "Aboreto", "Cinzel", "Trajan Pro", Georgia, serif;
  --font-body: "Newsreader", "Iowan Old Style", Georgia, serif;

  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --edge: 6px;
  --radius: 16px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--black);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.45;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
h1, h2, h3 { font-weight: 400; margin: 0; text-wrap: balance; }
p { margin: 0; }

/* ---------- Header ---------- */
body::before {
  content: ""; position: fixed; inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--cream);
}
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: var(--cream);
  display: flex; align-items: center; justify-content: space-between;
  padding-block: 10px 12px;
  padding-left: var(--gutter); padding-right: var(--gutter-r);
}
/* Shadow shows only once the page is scrolled */
.site-header { box-shadow: 0 0 0 rgba(0, 0, 0, 0), 0 0 0 rgba(0, 0, 0, 0); transition: box-shadow .3s ease; }
.scrolled .site-header { box-shadow: 0 2px 4px rgba(0, 0, 0, .18), 0 8px 22px rgba(0, 0, 0, .28); }
.menu-open .site-header { box-shadow: none; }
.logo { text-decoration: none; display: inline-flex; flex-direction: column; line-height: 1; }
.logo-name {
  font-family: var(--font-logo); font-weight: 400;
  font-size: clamp(30px, 4vw, 40px); letter-spacing: -0.05em; color: var(--ink);
}
.logo-tag {
  font-family: var(--font-logo); font-size: clamp(13px, 1.6vw, 16px);
  color: var(--stone); margin-top: -0.25em; letter-spacing: -0.01em;
}
.menu-toggle {
  width: 44px; height: 44px; display: grid; place-content: center; gap: 6px;
  background: none; border: 0; cursor: pointer; padding: 0;
}
.menu-toggle span { display: block; width: 22px; height: 1.5px; background: var(--ink); transition: transform .3s, opacity .3s; }
.menu-open .menu-toggle span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- Menu overlay ---------- */
.menu {
  position: fixed; inset: 0; z-index: 15; background: var(--cream);
  display: flex; flex-direction: column; justify-content: center;
  padding-left: var(--gutter); padding-right: var(--gutter-r);
  padding-block: 120px 60px;
  opacity: 0; visibility: hidden; transition: opacity .35s, visibility .35s;
}
.menu-open .menu { opacity: 1; visibility: visible; }
.menu nav { display: flex; flex-direction: column; gap: clamp(8px, 2vh, 20px); max-width: 1200px; width: 100%; margin: 0 auto; }
.menu a {
  font-family: var(--font-display); font-size: clamp(36px, 7vw, 84px);
  line-height: 1; text-decoration: none; color: var(--ink); letter-spacing: -0.03em;
  transition: color .2s, transform .3s;
}
.menu a:hover, .menu a[aria-current="page"] { color: var(--red); }
.menu a:hover { transform: translateX(8px); }
.menu-open { overflow: hidden; }

/* ---------- Home: hero ---------- */
.hero { position: relative; margin: 0 var(--edge); }
.hero img { width: 100%; height: clamp(320px, 41vw, 640px); object-fit: cover; object-position: 50% 40%; }
.hero-card {
  position: absolute; left: 0; bottom: 0;
  width: min(32%, 460px); min-height: 40%;
  background: var(--cream);
  padding: 12px 18px 18px 12px;
  display: flex; flex-direction: column; gap: 14px;
}
.hero-card h1 { font-family: var(--font-display); font-size: clamp(22px, 3vw, 44px); line-height: 1; letter-spacing: -0.05em; color: var(--black); }
.hero-card p { font-size: clamp(12px, 1.2vw, 15px); max-width: 34ch; }

/* ---------- Home: areas of focus ---------- */
.focus {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px;
  padding-block: 40px clamp(60px, 11vw, 140px);
  padding-left: var(--edge); padding-right: var(--edge);
}
.focus h2 { font-family: var(--font-display); font-size: clamp(20px, 2.4vw, 30px); letter-spacing: -0.05em; line-height: 1.05; }
.focus .tagline { font-style: italic; font-size: 13px; padding-top: 8px; }
.focus .blurb { font-size: 13px; max-width: 34ch; padding-top: 8px; }

.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--edge); margin: 0 var(--edge); }
.tile { position: relative; display: block; overflow: hidden; aspect-ratio: 0.77; text-decoration: none; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.tile:hover img { transform: scale(1.04); }
.tile span {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  background: var(--cream); color: var(--red);
  font-family: var(--font-display); font-size: clamp(16px, 2.4vw, 30px); letter-spacing: 0.01em;
  padding: 0.55em 0.65em; white-space: nowrap; line-height: 1;
  transition: background .3s, color .3s;
}
.tile:hover span { background: var(--red); color: var(--cream); }

.closer { margin-top: var(--edge); }
.closer img { width: 100%; height: clamp(300px, 46vw, 720px); object-fit: cover; }

/* ---------- Photography ---------- */
.gallery-page { background: var(--black) linear-gradient(180deg, var(--olive) 0%, #23240f 45%, #0b0b06 85%, var(--black) 100%) no-repeat; }
.gallery {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px;
  padding-block: 20px 12px; padding-left: max(12px, var(--gutter)); padding-right: max(12px, var(--gutter-r));
  max-width: 1600px; margin: 0 auto;
}
.gallery button {
  all: unset; cursor: zoom-in; display: block; aspect-ratio: 1; overflow: hidden; border-radius: var(--radius);
  background: rgba(255,255,255,.04);
}
.gallery button:focus-visible { outline: 2px solid var(--cream); outline-offset: 2px; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1), filter .4s; }
.gallery button:hover img { transform: scale(1.05); }

.lightbox {
  position: fixed; inset: 0; z-index: 40; background: rgba(8, 8, 4, .96);
  display: grid; place-items: center;
  padding: max(56px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(56px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
}
[hidden], .lightbox[hidden] { display: none !important; }
.lightbox img {
  max-width: min(100%, 1600px); max-height: 100%; object-fit: contain; border-radius: 6px;
  touch-action: none; cursor: zoom-in; transform-origin: center; user-select: none; -webkit-user-drag: none;
}
.lightbox { overflow: hidden; }
.lightbox.zoomed img { cursor: grab; border-radius: 0; }
.lightbox.dragging.zoomed img { cursor: grabbing; }
.lightbox img.ease { transition: transform .28s cubic-bezier(.2,.7,.2,1); }
.lightbox.zoomed .lb-prev, .lightbox.zoomed .lb-next { opacity: .35; }
.lightbox button {
  position: absolute; background: none; border: 0; color: var(--cream); cursor: pointer;
  width: 52px; height: 52px; display: grid; place-items: center; opacity: .8;
}
.lightbox button:hover { opacity: 1; }
.lightbox svg { width: 26px; height: 26px; fill: currentColor; }
.lb-close { top: calc(10px + env(safe-area-inset-top, 0px)); right: calc(10px + env(safe-area-inset-right, 0px)); }
.lb-prev { left: calc(4px + env(safe-area-inset-left, 0px)); top: 50%; transform: translateY(-50%) scaleX(-1); }
.lb-next { right: calc(4px + env(safe-area-inset-right, 0px)); top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); left: 0; right: 0; text-align: center; color: var(--stone); font-size: 13px; font-variant-numeric: tabular-nums; }

/* ---------- Videos ---------- */
.video-page { background: var(--black); }
.story-page { background: var(--cream); }
.videos {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px;
  width: min(90%, 1200px); margin: 0 auto; padding-block: 24px 48px;
}
.video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #111; }
.story-page .video { box-shadow: 0 4px 10px rgba(0,0,0,.28); }
.video a { position: absolute; inset: 0; display: block; color: #fff; text-decoration: none; }
.video img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.video a::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(0,0,0,.6) 0%, rgba(0,0,0,0) 32%, rgba(0,0,0,0) 70%, rgba(0,0,0,.35) 100%);
}
.video:hover img { transform: scale(1.03); }
.video-title {
  position: absolute; z-index: 2; top: 14px; left: 16px; right: 16px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: clamp(14px, 1.5vw, 18px); font-weight: 600; line-height: 1.2;
}
.video-title small { display: block; font-weight: 400; font-size: 12px; opacity: .85; margin-top: 2px; }
.play {
  position: absolute; z-index: 2; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 68px; height: 48px; border-radius: 14px; background: #e3242b; display: grid; place-items: center;
  transition: transform .25s, background .25s;
}
.play::after { content: ""; border-style: solid; border-width: 10px 0 10px 17px; border-color: transparent transparent transparent #fff; margin-left: 4px; }
.video:hover .play { transform: translate(-50%, -50%) scale(1.08); background: #ff0000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.podcast { display: flex; justify-content: center; padding-block: 8px 40px; padding-left: var(--gutter); padding-right: var(--gutter-r); }
.podcast a {
  background: var(--red); color: var(--cream); text-decoration: none; text-align: center;
  font-family: var(--font-display); font-size: clamp(20px, 2.8vw, 30px); line-height: 0.95; letter-spacing: 0.01em;
  border-radius: var(--radius) 0; padding: 0.4em 0.75em; transition: background .25s, transform .25s;
}
.podcast a:hover { background: #a9141f; transform: translateY(-2px); }

/* ---------- Secret peel-back corner + terminal (Storytelling) ---------- */
.peel-wrap { padding-block: 8px 56px; }
.peel {
  --term-bg: #0d0d0b; --term-fg: #e9e4d4; --term-dim: #8a8676; --term-faint: #4a4840; --amber: #e8b04a; --term-accent: #a9b884;
  position: relative; z-index: 5; width: min(90%, 1200px); margin: 0 auto;
  height: clamp(300px, 42vh, 380px); border-radius: var(--radius);
}
.peel-sheet { position: absolute; inset: 0; z-index: 2; }
.peel-cover {
  position: absolute; inset: -1px; z-index: 2; background: var(--cream);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center;
  padding-inline: 16px;
}
.peel .podcast { padding: 0; }
.peel-eyebrow { font-style: italic; color: var(--stone); font-size: 14px; }
.peel-note { font-style: italic; font-size: 14px; color: var(--ink); }
.peel-hint {
  position: absolute; right: 54px; bottom: 16px; font-style: italic; font-size: 13px; color: var(--stone);
  opacity: 0; transform: translateX(6px); transition: opacity .3s, transform .3s;
}
.peel:hover .peel-hint, .peel:focus-within .peel-hint { opacity: 1; transform: none; }
.peel-flap {
  position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; pointer-events: none; overflow: visible;
  filter: drop-shadow(-3px -3px 5px rgba(0, 0, 0, .22));
  clip-path: inset(-1px round calc(var(--radius) + 1px));
}
.peel-tab {
  position: absolute; left: 0; top: 0; z-index: 4; width: 64px; height: 64px; margin: 0; padding: 0;
  border: 0; border-radius: 50%; background: transparent; cursor: grab; touch-action: none;
}
.peel-tab:active { cursor: grabbing; }
.peel-tab:focus-visible { outline: 2px solid var(--red); outline-offset: -10px; }
.peel.is-open .peel-sheet, .peel.is-open .peel-tab { visibility: hidden; }

.terminal {
  position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column;
  border-radius: var(--radius); overflow: hidden;
  background: var(--term-bg); color: var(--term-fg);
  font-family: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 14px;
}
.term-bar {
  display: flex; align-items: center; gap: 7px; padding: 11px 14px 9px; border-bottom: 1px solid #23221d;
  color: var(--term-dim); font-size: 12px;
}
.term-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--term-faint); }
.term-dot:first-child { background: var(--term-accent); }
.term-title { margin-left: 8px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.term-clock {
  color: var(--term-accent); font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 12px;
}
.term-clock.low { color: var(--amber); }
.term-close {
  all: unset; cursor: pointer; color: var(--term-dim); font-size: 12px; padding: 2px 8px; border-radius: 4px;
}
.term-close:hover, .term-close:focus-visible { color: var(--term-fg); background: #23221d; }
.term-out {
  flex: 1; min-height: 0; overflow-y: auto; padding: 10px 16px 4px;
  white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45;
  scrollbar-color: var(--term-faint) transparent;
}
.term-out .dim { color: var(--term-dim); }
.term-out .cmd { color: var(--stone); }
.term-out .cmd b { color: var(--term-accent); font-weight: 400; }
.term-out .title { color: var(--term-accent); font-weight: 600; letter-spacing: .08em; }
.term-out .end { color: var(--amber); font-weight: 600; }
.term-out .gap { height: .5em; }
.term-out .stamp { color: var(--term-accent); font-size: 12px; }
.term-out .shot { margin: 8px 0 4px; display: flex; flex-direction: column; gap: 4px; max-width: 100%; overflow-x: auto; }
.term-out .ascii {
  margin: 0; font: inherit; font-size: 12px; line-height: 1.2; white-space: pre; color: var(--term-fg);
  font-family: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
.term-out .ascii .l { display: block; animation: line-in .35s ease-out both; animation-delay: calc(var(--i) * 55ms); }
.term-out .shot figcaption { color: var(--term-dim); font-size: 11px; }
@keyframes line-in { from { opacity: 0; filter: brightness(2.2); } to { opacity: 1; filter: none; } }
@media (prefers-reduced-motion: reduce) { .term-out .ascii .l { animation: none; } }
@media (max-width: 760px) { .term-out .ascii { font-size: clamp(8px, 2.5vw, 12px); } }
.choices { display: flex; flex-direction: column; align-items: flex-start; gap: 0; margin: 4px 0 2px; }
.choices button {
  all: unset; cursor: pointer; padding: 1px 6px; margin-left: -6px; border-radius: 3px; color: var(--term-fg);
  white-space: normal;
}
.choices button:hover, .choices button:focus-visible { background: var(--term-accent); color: var(--term-bg); }
.choices button:disabled { color: var(--term-faint); background: none; cursor: default; }
.choices button.picked:disabled { color: var(--term-dim); }
.term-in { display: flex; align-items: center; gap: 10px; padding: 6px 16px 10px; border-top: 1px solid #1a1916; }
.term-prompt { color: var(--term-accent); white-space: nowrap; }
.term-in input {
  all: unset; flex: 1; min-width: 0; color: var(--term-fg); caret-color: var(--term-accent);
  font: inherit;
}
@media (max-width: 760px) {
  .peel { width: auto; margin: 0 var(--gutter); height: 400px; }
  .terminal { font-size: 13px; }
  .term-prompt { display: none; }
  .term-in::before { content: "$"; color: var(--term-accent); }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--black); color: var(--cream-2);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px;
  padding-block: 22px 120px; padding-left: var(--gutter); padding-right: var(--gutter-r);
}
.site-footer .logo-name { color: var(--cream-2); }
.foot-cols { display: grid; grid-template-columns: repeat(2, auto); gap: clamp(28px, 8vw, 110px); text-align: right; font-size: 12px; }
.foot-cols h3 { font-family: var(--font-body); font-style: italic; color: var(--stone); font-size: 12px; margin-bottom: 14px; }
.foot-cols ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.foot-cols .plain a { text-decoration: none; }
.foot-cols a:hover { color: var(--stone); }

/* ---------- Narrow screens ---------- */
@media (max-width: 760px) {
  .hero-card { position: relative; width: auto; min-height: 0; padding: 18px 10px 0; }
  .hero img { height: 62vw; }
  .focus { grid-template-columns: 1fr; gap: 6px; padding-left: var(--gutter); padding-right: var(--gutter-r); padding-block: 36px 48px; }
  .tiles { grid-template-columns: 1fr; }
  .tile { aspect-ratio: 4 / 3; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .videos { grid-template-columns: 1fr; width: auto; margin: 0 var(--gutter); }
  .site-footer { grid-template-columns: 1fr; }
  .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); text-align: left; gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
