/* =============================================================================
   Visual Journal — styles
   Editorial minimalism. Photo-led. Light + dark. No build step.
   ========================================================================== */

/* ----- Theme tokens -------------------------------------------------------- */
:root {
  /* Personal Design Language — warm neutral base, accents in small doses */
  --bg:        #F7F4F0;   /* warm paper */
  --bg-raised: #EFEAE3;   /* subtle grouped surface */
  --ink:       #242424;   /* primary text */
  --ink-soft:  #5c574f;
  --ink-faint: #948d82;
  --line:      #E3DDD3;
  --line-soft: #ECE7DE;

  --accent:        #E86A4A;  /* warm red — primary intent, selected, emphasis */
  --accent-strong: #D2553A;  /* red, hover/pressed */
  --green:         #7BBF8C;  /* calm emphasis, success, soft secondary */
  --green-ink:     #3F7D54;  /* readable green text on light */
  --yellow:        #F6E6A8;  /* highlights, tags, gentle support */
  --on-photo:      #ffffff;

  --maxw: 1240px;
  --gap: clamp(0.5rem, 1.5vw, 1rem);
  --pad: clamp(1.25rem, 5vw, 4rem);

  /* Inter for all UI/body; Roboto Slab (open-source, Archer-like) for display moments only */
  --font-display: "Roboto Slab", "Roboto Serif", "Iowan Old Style", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --shadow: none;
}

:root[data-theme="dark"] {
  --bg:        #1A1714;   /* warm dark */
  --bg-raised: #221E1A;
  --ink:       #EDE7DD;
  --ink-soft:  #B3AC9F;
  --ink-faint: #80796B;
  --line:      #322C26;
  --line-soft: #28231F;

  --accent:        #F08763;  /* lighter warm red for dark surfaces */
  --accent-strong: #F4A085;
  --green:         #84C896;
  --green-ink:     #9AD3AA;
  --yellow:        #E9D692;
  --on-photo:      #ffffff;
  --shadow: none;
}

/* Follow the OS when the user hasn't chosen explicitly */
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --bg:        #1A1714;
    --bg-raised: #221E1A;
    --ink:       #EDE7DD;
    --ink-soft:  #B3AC9F;
    --ink-faint: #80796B;
    --line:      #322C26;
    --line-soft: #28231F;
    --accent:        #F08763;
    --accent-strong: #F4A085;
    --green:         #84C896;
    --green-ink:     #9AD3AA;
    --yellow:        #E9D692;
    --shadow: none;
  }
}

/* ----- Reset / base -------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .4s var(--ease), color .4s var(--ease);
  position: relative;
}

/* Animated subtle grain texture */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.045;
  z-index: -1;
  pointer-events: none;
  background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><filter id="noise"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="4" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23noise)" opacity="0.7"/></svg>');
  animation: grain 8s steps(10) infinite;
  mix-blend-mode: multiply;
}

/* In dark mode, use lighter blend and slightly higher opacity */
:root[data-theme="dark"] body::before {
  opacity: 0.055;
  mix-blend-mode: overlay;
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] body::before {
    opacity: 0.055;
    mix-blend-mode: overlay;
  }
}

@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-5%, -10%); }
  20% { transform: translate(-15%, 5%); }
  30% { transform: translate(7%, -25%); }
  40% { transform: translate(-5%, 25%); }
  50% { transform: translate(-15%, 10%); }
  60% { transform: translate(15%, 0%); }
  70% { transform: translate(0%, 15%); }
  80% { transform: translate(3%, 35%); }
  90% { transform: translate(-10%, 10%); }
}

img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--bg); padding: .6rem 1rem; border-radius: 0;
}
.skip-link:focus { left: 0; }

/* ----- Header -------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background-color .3s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.wordmark { display: inline-flex; align-items: baseline; gap: .5ch; }
.wordmark-text {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.18rem;
  letter-spacing: .01em;
}
.site-nav { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.2rem); }
.site-nav a {
  font-size: .82rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: .35rem 0;
  position: relative;
  transition: color .25s var(--ease);
}
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
.site-nav a:hover { color: var(--ink); }
.site-nav a:hover::after,
.site-nav a.is-active::after { transform: scaleX(1); }
.site-nav a.is-active { color: var(--ink); }

.theme-toggle {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; cursor: pointer;
  display: inline-grid; place-items: center; color: var(--ink-soft);
  transition: border-color .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}
.theme-toggle:hover { color: var(--ink); border-color: var(--ink-faint); transform: rotate(12deg); }
.theme-toggle-icon { width: 15px; height: 15px; border-radius: 50%; position: relative; background: currentColor; }
/* sun/moon morph: in dark theme show a crescent */
:root[data-theme="dark"] .theme-toggle-icon,
:root[data-theme="auto"] .theme-toggle-icon {}
.theme-toggle-icon::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: var(--bg); transform: translate(40%, -40%) scale(0);
  transition: transform .3s var(--ease);
}
:root[data-theme="dark"] .theme-toggle-icon::after { transform: translate(35%, -35%) scale(.85); }
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] .theme-toggle-icon::after { transform: translate(35%, -35%) scale(.85); }
}

/* ----- Generic page scaffolding ------------------------------------------- */
.page { padding-block: clamp(2rem, 6vw, 4.5rem) clamp(3rem, 9vw, 6rem); }
.page-head { margin-bottom: clamp(2rem, 6vw, 3.5rem); max-width: 60ch; }
.page-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2rem, 6vw, 3.4rem);
  line-height: 1.04;
  letter-spacing: -.01em;
  margin: 0 0 .6rem;
}
.page-intro { color: var(--ink-soft); font-size: 1.05rem; margin: 0; max-width: 52ch; }
.eyebrow {
  font-size: .76rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-faint); margin: 0 0 1rem;
}

/* fade-in on enter - disabled for cleaner feel */
.reveal { opacity: 1; transform: none; }
.reveal.is-in { opacity: 1; transform: none; }

/* ----- Home: hero ---------------------------------------------------------- */
.hero { position: relative; }
.hero-media {
  position: relative;
  height: clamp(70vh, 82vh, 900px);
  min-height: 460px;
  overflow: hidden;
  background: var(--bg-raised);
}
.hero-media img, .hero-media video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  animation: heroIn 1.4s var(--ease) both;
}
@keyframes heroIn { from { transform: scale(1.06); opacity: 0; } to { transform: none; opacity: 1; } }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.05) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,.55) 100%);
}
.hero-copy {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  color: var(--on-photo);
  padding-bottom: clamp(2rem, 6vw, 4rem);
}
.hero-headline {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.2rem, 7vw, 5rem);
  line-height: 1.02;
  letter-spacing: -.015em;
  margin: 0 0 .6rem;
  max-width: 18ch;
  text-shadow: 0 2px 30px rgba(0,0,0,.35);
}
.hero-support {
  font-size: clamp(1rem, 2vw, 1.2rem);
  max-width: 40ch; margin: 0 0 1.6rem; color: rgba(255,255,255,.86);
}
.hero-cta { display: flex; flex-wrap: wrap; gap: .9rem; }
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .85rem; letter-spacing: .04em;
  padding: .7rem 1.2rem; border-radius: 2px;
  border: 1px solid rgba(255,255,255,.65); color: var(--on-photo);
  transition: background-color .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
}
.btn:hover { background: var(--on-photo); color: #111; border-color: var(--on-photo); }
.btn .arr { transition: transform .25s var(--ease); }
.btn:hover .arr { transform: translateX(3px); }

/* ----- Section headers ----------------------------------------------------- */
.section { padding-block: clamp(2.6rem, 7vw, 5rem); }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; margin-bottom: clamp(1.4rem, 4vw, 2.2rem);
}
.section-title {
  font-family: var(--font-display);
  font-weight: 400; font-size: clamp(1.4rem, 3.5vw, 2rem);
  margin: 0; letter-spacing: -.01em;
}
.section-link {
  font-size: .8rem; letter-spacing: .05em; color: var(--ink-soft);
  white-space: nowrap; display: inline-flex; gap: .4rem; align-items: center;
}
.section-link:hover { color: var(--accent); }
.section-link .arr { transition: transform .25s var(--ease); }
.section-link:hover .arr { transform: translateX(3px); }

/* ----- Journal grid + cards ------------------------------------------------ */
.grid-journals {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: clamp(1.4rem, 3.5vw, 2.6rem) clamp(1.2rem, 2.5vw, 2rem);
}
.grid-journals.is-home {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr));
}

.card { display: block; group: card; }
.card-media {
  position: relative; overflow: hidden; background: var(--bg-raised);
  aspect-ratio: 3 / 2; border-radius: 0;
}
.card-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: opacity .3s var(--ease);
}
.card:hover .card-media img { opacity: 0.92; }
.card-badge {
  position: absolute; top: .7rem; left: .7rem;
  font-size: .66rem; letter-spacing: .12em; text-transform: uppercase;
  padding: .3rem .55rem; border-radius: 2px;
  background: color-mix(in srgb, #000 65%, transparent);
  color: #fff; backdrop-filter: blur(4px);
  display: inline-flex; align-items: center; gap: .4rem;
}
.card-badge .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.card-badge.is-mixed { color: #ffd0c2; }  /* warm red family */
.card-badge.is-film { color: #c9e6d3; }   /* green family */

.card-body { padding-top: .85rem; }
.card-title {
  font-family: var(--font-display); font-weight: 500;
  font-size: 1.28rem; line-height: 1.18; margin: 0 0 .3rem;
  letter-spacing: -.01em;
}
.card:hover .card-title { color: var(--accent); }
.card-meta {
  font-size: .78rem; letter-spacing: .03em; color: var(--ink-faint);
  display: flex; flex-wrap: wrap; gap: .5ch; align-items: center;
}
.card-meta .sep { opacity: .5; }
.card-intro { margin: .5rem 0 0; color: var(--ink-soft); font-size: .92rem; line-height: 1.55; max-width: 42ch; }

/* ----- Film cards (wider posters) ----------------------------------------- */
.grid-films {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr));
  gap: clamp(1.6rem, 4vw, 3rem) clamp(1.2rem, 2.5vw, 2rem);
}
.film-card .card-media { aspect-ratio: 16 / 9; }
.film-card .play {
  position: absolute; inset: 0; display: grid; place-items: center;
  pointer-events: none;
}
.film-card .play span {
  width: 62px; height: 62px; border-radius: 50%;
  background: color-mix(in srgb, #000 35%, transparent);
  border: 1px solid rgba(255,255,255,.7);
  backdrop-filter: blur(3px);
  display: grid; place-items: center;
  transition: transform .3s var(--ease), background-color .3s var(--ease);
}
.film-card:hover .play span { transform: scale(1.08); background: color-mix(in srgb, #000 20%, transparent); }
.film-card .play span::after {
  content: ""; margin-left: 3px;
  border-style: solid; border-width: 9px 0 9px 15px;
  border-color: transparent transparent transparent #fff;
}
.film-card .card-duration {
  position: absolute; bottom: .7rem; right: .7rem;
  font-size: .7rem; letter-spacing: .05em;
  padding: .25rem .5rem; border-radius: 2px;
  background: color-mix(in srgb, #000 65%, transparent); color: #fff;
}

/* ----- About teaser strip -------------------------------------------------- */
.about-teaser { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.about-teaser-inner {
  display: grid; grid-template-columns: 1fr; gap: 1.2rem;
  padding-block: clamp(2.4rem, 7vw, 4.5rem);
}
@media (min-width: 760px) {
  .about-teaser-inner { grid-template-columns: minmax(0, 0.34fr) minmax(0, 1fr); gap: 2rem; }
}
.about-teaser .eyebrow { margin: 0; }
.about-teaser p.lead {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(1.3rem, 3.2vw, 2rem); line-height: 1.35; margin: 0 0 1rem;
  max-width: 30ch;
}
.about-teaser .more { color: var(--accent); font-size: .88rem; letter-spacing: .04em; }
.about-teaser .more .arr { transition: transform .25s var(--ease); display: inline-block; }
.about-teaser .more:hover .arr { transform: translateX(3px); }

/* ----- Filters (journals index) ------------------------------------------- */
.filters {
  display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: clamp(1.6rem, 4vw, 2.4rem);
}
.chip {
  font-size: .76rem; letter-spacing: .05em;
  padding: .4rem .85rem; border-radius: 2px;
  border: 1px solid var(--line); background: transparent; color: var(--ink-soft);
  cursor: pointer; transition: all .2s var(--ease);
}
.chip:hover { border-color: var(--ink-faint); color: var(--ink); }
.chip.is-active { background: var(--accent); color: #fff; border-color: var(--accent); }
.filter-count { color: var(--ink-faint); font-size: .8rem; margin-left: .25rem; align-self: center; }

/* ----- Journal detail ------------------------------------------------------ */
.entry { padding-block: clamp(1.5rem, 5vw, 3rem) clamp(3rem, 9vw, 6rem); }
.entry-head { max-width: 62ch; margin-bottom: clamp(1.8rem, 5vw, 3rem); }
.back-link {
  font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint);
  display: inline-flex; gap: .45rem; align-items: center; margin-bottom: 1.4rem;
}
.back-link:hover { color: var(--accent); }
.back-link .arr { transition: transform .25s var(--ease); }
.back-link:hover .arr { transform: translateX(-3px); }
.entry-title {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(2.2rem, 6vw, 4rem); line-height: 1.03; letter-spacing: -.015em;
  margin: 0 0 .7rem;
}
.entry-meta {
  font-size: .85rem; letter-spacing: .04em; color: var(--ink-faint);
  display: flex; flex-wrap: wrap; gap: .55ch; align-items: center; margin-bottom: 1rem;
}
.entry-meta .sep { opacity: .5; }
.entry-meta .type { color: var(--accent); }
.entry-intro {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(1.15rem, 2.6vw, 1.55rem); line-height: 1.45; color: var(--ink);
  margin: 0; max-width: 44ch;
}

/* media flow - tighter spacing for seamless experience */
.flow { display: flex; flex-direction: column; gap: clamp(0.5rem, 1.2vw, 0.75rem); }
.flow figure { margin: 0; }
.flow figcaption, .block-caption {
  font-size: .8rem; color: var(--ink-faint); margin-top: .6rem; letter-spacing: .02em;
  max-width: 60ch;
}
.b-full img {
  width: 100%;
  border-radius: 0;
  max-height: 70vh;
  object-fit: cover;
}

/* Offset pair - large + small with different aspect ratios */
.b-offset {
  display: grid;
  gap: clamp(0.5rem, 1.2vw, 0.75rem);
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .b-offset {
    grid-template-columns: 2fr 1fr;
  }
}

.b-offset .large {
  aspect-ratio: 3 / 2;
  overflow: hidden;
}

.b-offset .small {
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

.b-offset img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Detail grid - square crops, adapts to image count */
.b-detail-grid {
  display: grid;
  gap: clamp(0.5rem, 1.2vw, 0.75rem);
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 640px) {
  .b-detail-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

/* Override for specific counts */
.b-detail-grid[data-count="2"] {
  grid-template-columns: repeat(2, 1fr);
}

.b-detail-grid[data-count="3"] {
  grid-template-columns: repeat(3, 1fr);
}

.b-detail-grid[data-count="4"] {
  grid-template-columns: repeat(4, 1fr);
}

.b-detail-grid .cell {
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.b-detail-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Crop control - use object-position with focal point */
img[data-focal-x][data-focal-y] {
  object-position: var(--focal-x, 50%) var(--focal-y, 50%);
}
.b-pair, .b-triptych {
  display: grid;
  gap: clamp(0.5rem, 1.2vw, 0.75rem);
  align-items: center;
}
.b-pair { grid-template-columns: 1fr; }
.b-triptych { grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .b-pair { grid-template-columns: 1fr 1fr; }
  .b-triptych { grid-template-columns: 1fr 1fr 1fr; }
}

/* Pair: contain naturally */
.b-pair img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 0;
}

/* Triptych: crop to consistent 4:3 aspect ratio */
.b-triptych > * {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.b-triptych img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

/* Grid: crop to square cells */
.b-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}
.b-grid {
  display: grid;
  gap: clamp(0.5rem, 1.2vw, 0.75rem);
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 720px) { .b-grid { grid-template-columns: repeat(3, 1fr); } }
.b-grid .cell { aspect-ratio: 1 / 1; overflow: hidden; }

.zoomable { cursor: zoom-in; }

.b-note {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(1.2rem, 2.8vw, 1.7rem); line-height: 1.45;
  color: var(--ink-soft); max-width: 34ch;
  margin-inline: auto; text-align: center; padding-block: clamp(1.5rem, 3vw, 2rem);
}
.b-divider { height: 1px; background: var(--line); width: min(120px, 40%); margin: clamp(1rem,4vw,2.5rem) auto; border: 0; }

/* native / embed video block */
.video-block { position: relative; border-radius: 0; overflow: hidden; background: #000; }
.video-block video, .video-block iframe { width: 100%; aspect-ratio: 16 / 9; display: block; border: 0; }
.video-poster {
  position: absolute; inset: 0; cursor: pointer; border: 0; padding: 0; background: none;
}
.video-poster img { width: 100%; height: 100%; object-fit: cover; }
.video-poster::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at center, rgba(0,0,0,.15), rgba(0,0,0,.45));
}
.video-poster .play-big {
  position: absolute; inset: 0; margin: auto; width: 74px; height: 74px; border-radius: 50%;
  background: color-mix(in srgb, #000 30%, transparent); border: 1px solid rgba(255,255,255,.75);
  display: grid; place-items: center; transition: transform .3s var(--ease), background-color .3s var(--ease);
}
.video-poster:hover .play-big { transform: scale(1.08); }
.video-poster .play-big::after {
  content: ""; margin-left: 4px; border-style: solid; border-width: 11px 0 11px 18px;
  border-color: transparent transparent transparent #fff;
}
.video-missing {
  position: absolute; inset: auto 0 0 0; text-align: center; color: rgba(255,255,255,.8);
  font-size: .75rem; letter-spacing: .04em; padding: .6rem; background: rgba(0,0,0,.35);
}

/* tags + prev/next */
.entry-foot { margin-top: clamp(2.4rem, 7vw, 4rem); border-top: 1px solid var(--line); padding-top: 1.6rem; }
.tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.4rem; }
.tag {
  font-size: .74rem; letter-spacing: .04em; color: var(--ink-soft);
  padding: .28rem .7rem; border-radius: 2px;
  background: color-mix(in srgb, var(--yellow) 55%, transparent);
  border: 1px solid color-mix(in srgb, var(--yellow) 70%, var(--line));
}
.tag:hover { color: var(--ink); border-color: color-mix(in srgb, var(--yellow) 90%, var(--ink)); }
.related-film {
  display: inline-flex; gap: .5rem; align-items: center; color: var(--accent);
  font-size: .85rem; letter-spacing: .03em; margin-bottom: 1.6rem;
}
.related-film:hover .arr { transform: translateX(3px); }
.related-film .arr { transition: transform .25s var(--ease); }

.prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.4rem; }
.prevnext a {
  display: flex; flex-direction: column; gap: .25rem; padding: 1rem 0;
}
.prevnext .lbl { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); }
.prevnext .ttl { font-family: var(--font-display); font-size: 1.05rem; color: var(--ink); }
.prevnext a:hover .ttl { color: var(--accent); }
.prevnext .next { text-align: right; align-items: flex-end; }
.prevnext .disabled { opacity: .35; pointer-events: none; }

/* ----- Film detail --------------------------------------------------------- */
.film-detail .player {
  border-radius: 0; overflow: hidden; background: #000; margin-bottom: clamp(1.6rem,4vw,2.4rem);
}
.film-detail .player video, .film-detail .player iframe { width: 100%; aspect-ratio: 16/9; display: block; border: 0; }
.film-info { display: grid; gap: 1.2rem; max-width: 60ch; }
.film-desc { color: var(--ink-soft); font-size: 1.05rem; line-height: 1.6; }
.stills { margin-top: clamp(2rem,6vw,3.5rem); }
.stills-grid { display: grid; gap: clamp(.6rem,1.6vw,1rem); grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.stills-grid img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 0; }

/* ----- About page ---------------------------------------------------------- */
.about-page { max-width: 56ch; }
.about-page .lead {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(1.5rem, 4vw, 2.3rem); line-height: 1.35; margin: 0 0 1.6rem;
}
.about-image {
  margin: 2rem 0;
  border-radius: 8px;
  overflow: hidden;
}
.about-image img {
  width: 100%;
  height: auto;
  display: block;
}
.about-page p { color: var(--ink-soft); font-size: 1.05rem; margin: 0 0 1.2rem; }
.about-page a.inline { color: var(--accent); border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.about-page a.inline:hover { border-bottom-color: var(--accent); }
.about-list { list-style: none; padding: 0; margin: 1.2rem 0; }
.about-list li {
  padding: .7rem 0; border-top: 1px solid var(--line); color: var(--ink-soft);
  display: flex; gap: 1rem;
}
.about-list li b { color: var(--ink); font-weight: 500; font-family: var(--font-display); min-width: 7ch; }

/* ----- Footer -------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); margin-top: clamp(3rem, 8vw, 6rem); }
.footer-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1rem; padding-block: clamp(2rem, 5vw, 3rem);
}
.footer-mark { font-family: var(--font-display); font-size: 1.05rem; margin: 0; }
.footer-line { color: var(--ink-faint); font-size: .85rem; margin: 0; flex: 1 1 240px; }
.footer-nav { display: flex; gap: 1.4rem; }
.footer-nav a { font-size: .8rem; letter-spacing: .05em; color: var(--ink-soft); }
.footer-nav a:hover { color: var(--accent); }
.footer-nav a.studio-link { color: var(--accent); }
.footer-nav a.studio-link::before { content: "·"; margin-right: 1.4rem; color: var(--ink-faint); }

/* ----- Lightbox ------------------------------------------------------------ */
.lightbox {
  position: fixed; inset: 0; z-index: 90; display: none;
  background: color-mix(in srgb, #000 92%, transparent);
  align-items: center; justify-content: center;
}
.lightbox.is-open { display: flex; animation: lbIn .25s var(--ease); }
@keyframes lbIn { from { opacity: 0; } to { opacity: 1; } }
.lb-figure { margin: 0; max-width: min(92vw, 1500px); max-height: 88vh; display: flex; flex-direction: column; align-items: center; }
.lb-img { max-width: 100%; max-height: 84vh; object-fit: contain; border-radius: 0; }
.lb-caption { color: rgba(255,255,255,.7); font-size: .8rem; margin-top: .8rem; text-align: center; }
.lb-close, .lb-prev, .lb-next {
  position: absolute; background: transparent; border: 0; color: #fff; cursor: pointer;
  opacity: .75; transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { opacity: 1; }
.lb-close { top: 18px; right: 24px; font-size: 2.4rem; line-height: 1; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); font-size: 3rem; padding: 1rem; }
.lb-prev { left: 1vw; } .lb-next { right: 1vw; }
.lb-prev:hover { transform: translateY(-50%) translateX(-3px); }
.lb-next:hover { transform: translateY(-50%) translateX(3px); }
.lb-counter { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,.6); font-size: .78rem; letter-spacing: .1em; }
@media (max-width: 640px) {
  .lb-prev, .lb-next { font-size: 2rem; padding: .5rem; }
}

/* ----- Empty state --------------------------------------------------------- */
.empty { color: var(--ink-faint); padding: 3rem 0; font-size: .95rem; }

/* ----- Responsive: compact header on small screens ------------------------- */
@media (max-width: 600px) {
  .header-inner { height: 58px; }
  .wordmark-text { font-size: 1rem; }
  .site-nav { gap: 0.9rem; }
  .site-nav a { font-size: 0.7rem; letter-spacing: 0.03em; padding: 0.3rem 0; }
  .theme-toggle { width: 30px; height: 30px; }
  .theme-toggle-icon { width: 13px; height: 13px; }
}
@media (max-width: 380px) {
  /* keep the wordmark as a tidy home link; trim nav to essentials' breathing room */
  .wordmark-text { font-size: 0.92rem; }
  .site-nav { gap: 0.7rem; }
  .site-nav a { font-size: 0.66rem; }
}

/* ----- Misc ---------------------------------------------------------------- */
.is-hidden { display: none !important; }
