
@font-face { font-family: 'FmDisplay'; src: url('/fonts/display.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'FmUI'; src: url('/fonts/ui.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'FmCJK'; src: url('/fonts/cjk.woff2') format('woff2'); font-weight: 600; font-display: swap; }
[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible { outline: 2px solid #e8b954; outline-offset: 2px; }

:root {
  --bg: #0c0c0e;
  --surface: #141418;
  --ink: #f4f3ee;
  --muted: #9a9891;
  --gold: #e8b954;
  --red: #d93829;
  --line: rgba(244, 243, 238, 0.14);
}
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "FmUI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6; overflow-x: hidden;
}
.fm-head {
  border-bottom: 1px solid var(--line); padding: 16px 32px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
}
.fm-brand { font-family: "FmDisplay", Georgia, serif; font-size: 1.45rem; letter-spacing: 0.16em; display: flex; align-items: center; gap: 10px; }
.fm-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); display: inline-block; }
.fm-nav { display: flex; gap: 24px; font-family: Consolas, monospace; font-size: 0.78rem; letter-spacing: 0.1em; flex-wrap: wrap; }
.fm-nav a { color: var(--muted); }
.fm-nav a:hover, .fm-nav a[aria-current="page"] { color: var(--gold); }

/* Hero & Live Film Emulsion Bar */
.fm-hero {
  max-width: 1260px; margin: 0 auto; padding: 42px 32px 32px;
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 28px; align-items: end;
  border-bottom: 1px solid var(--line);
}
.fm-kicker { font-family: Consolas, monospace; font-size: 0.72rem; letter-spacing: 0.18em; color: var(--gold); display: block; margin-bottom: 10px; }
.fm-hero h1 { font-family: "FmDisplay", "FmCJK", Georgia, serif; font-size: clamp(2.4rem, 5.2vw, 4.6rem); line-height: 0.96; margin: 0; }
.fm-hero p { margin: 0 0 18px; color: var(--muted); font-size: 0.92rem; }
.fm-stocks { display: flex; gap: 8px; flex-wrap: wrap; }
.fm-pill {
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  padding: 7px 13px; font-family: Consolas, "PingFang SC", monospace; font-size: 0.75rem; cursor: pointer;
}
.fm-pill:hover, .fm-pill.is-active { background: var(--gold); color: #0c0c0e; border-color: var(--gold); font-weight: 700; }

/* Authentic 35mm Sprocket Contact Sheet Grid */
.fm-sec { max-width: 1260px; margin: 0 auto; padding: 36px 32px; }
.fm-sec-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.fm-sec-head h1, .fm-sec-head h2 { font-family: "FmCJK", Georgia, serif; font-size: 1.55rem; margin: 0; font-weight: 600; }
.fm-sheet { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.fm-frame {
  background: var(--surface); border: 1px solid var(--line); padding: 18px 16px;
  position: relative; transition: border-color 0.2s ease;
}
.fm-frame:hover { border-color: var(--gold); }
.fm-sprockets {
  height: 10px; margin-bottom: 10px; opacity: 0.35;
  background-image: repeating-linear-gradient(90deg, #f4f3ee 0 12px, transparent 12px 26px);
}
.fm-sprockets-b { margin-top: 10px; margin-bottom: 0; }
.fm-img-wrap { overflow: hidden; background: #000; cursor: zoom-in; position: relative; }
.fm-img-wrap img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: filter 0.35s ease, transform 0.35s ease; }
.fm-frame:hover .fm-img-wrap img { transform: scale(1.02); }

/* Live CSS Film Stock Emulation Modes */
body.stock-portra .fm-img-wrap img, body.stock-portra #loupe-img { filter: contrast(1.04) saturate(1.12) sepia(0.14) brightness(1.03); }
body.stock-cinestill .fm-img-wrap img, body.stock-cinestill #loupe-img { filter: contrast(1.16) saturate(1.22) hue-rotate(-10deg) brightness(0.96); }
body.stock-hp5 .fm-img-wrap img, body.stock-hp5 #loupe-img { filter: grayscale(1) contrast(1.28) brightness(0.98); }
body.stock-fuji .fm-img-wrap img, body.stock-fuji #loupe-img { filter: contrast(0.96) saturate(0.92) hue-rotate(8deg) brightness(1.05); }

.fm-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.fm-meta h3 { margin: 0; font-family: "FmCJK", Georgia, serif; font-size: 1.02rem; }
.fm-code { font-family: Consolas, monospace; font-size: 0.74rem; color: var(--gold); }
.fm-exif { font-family: Consolas, monospace; font-size: 0.72rem; color: var(--muted); margin-top: 4px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* Darkroom Loupe Lightbox */
.fm-loupe { position: fixed; inset: 0; background: rgba(6,6,8,0.94); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(10px); }
.fm-loupe-box { width: min(980px, 100%); border: 1px solid var(--gold); background: var(--surface); padding: 20px; }
.fm-loupe-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; font-family: Consolas, "FmCJK", monospace; }
.fm-loupe-stage { background: #000; display: flex; justify-content: center; margin-bottom: 14px; }
.fm-loupe-stage img { max-height: 68vh; width: auto; object-fit: contain; }
.fm-loupe-bot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-family: Consolas, monospace; font-size: 0.78rem; color: var(--muted); }

.fm-grid3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.fm-card { background: var(--surface); border: 1px solid var(--line); padding: 22px; }
.fm-card h3 { margin: 0 0 8px; font-family: "FmCJK", serif; color: var(--gold); font-size: 1.08rem; }
.fm-card p { margin: 0; font-size: 0.85rem; color: var(--muted); }
.fm-foot { border-top: 1px solid var(--line); padding: 22px 32px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-family: Consolas, monospace; font-size: 0.74rem; color: var(--muted); }

@media (max-width: 860px) {
  .fm-hero, .fm-sheet { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .fm-head, .fm-hero, .fm-sec, .fm-foot { padding-left: 16px; padding-right: 16px; }
}

.fm-grid3 { margin-top: 22px; }
