/* ── TPRS SHARED STYLES ─────────────────────────────────────────── */
/* Fonts loaded per-page via Google Fonts link tag                   */

/* ── TOKENS ─────────────────────────────────────────────────────── */
:root {
  --bg:      #faf8f4;
  --surface: #f5f1ea;
  --card:    #ede9e0;
  --ink:     #18140e;
  --gold:    #9B7824;
  --maroon:  #7a1a2e;
  --teal:    #2a5a6e;
  --mid:     #8a8078;
  --light:   #d4ccbe;
  --shadow:  rgba(0,0,0,0.07);
}
[data-dark="true"] {
  --bg:      #14110c;
  --surface: #1d1a14;
  --card:    #242018;
  --ink:     #f0ece4;
  --maroon:  #8a2238;
  --teal:    #4a8a9e;
  --mid:     #8a8478;
  --light:   #2e2a22;
  --shadow:  rgba(0,0,0,0.3);
}

/* ── RESET ───────────────────────────────────────────────────────── */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; }
body { background:var(--bg); color:var(--ink); font-family:'IBM Plex Sans',sans-serif; transition:background .3s,color .3s; -webkit-font-smoothing:antialiased; }
img  { max-width:100%; display:block; }
a    { color:inherit; text-decoration:none; }
ul   { list-style:none; }

/* ── TYPE ────────────────────────────────────────────────────────── */
h1,h2,h3,h4 { font-family:'Cormorant Garamond',serif; font-weight:600; line-height:1.1; }
.overline    { font-family:'IBM Plex Sans',sans-serif; font-size:10px; font-weight:500; letter-spacing:4px; text-transform:uppercase; color:var(--mid); }
.body-serif  { font-family:'EB Garamond',serif; font-size:16px; line-height:1.75; }
.link-arrow  { font-size:13px; color:var(--teal); display:inline-block; margin-top:14px; }
.link-arrow:hover { text-decoration:underline; }

/* ── LAYOUT ──────────────────────────────────────────────────────── */
.wrap       { max-width:1200px; margin:0 auto; padding:0 52px; }
.section    { padding:48px 0; }
.rule       { height:2px; background:var(--ink); }
.rule-light { height:1px; background:var(--light); }
.section-head { display:flex; justify-content:space-between; align-items:baseline; border-bottom:2px solid var(--ink); padding-bottom:10px; margin-bottom:28px; }
.section-head h2 { font-size:28px; }
.section-head a  { font-size:12px; color:var(--teal); font-family:'IBM Plex Sans',sans-serif; }
.section-head a:hover { text-decoration:underline; }

/* ── NAV ─────────────────────────────────────────────────────────── */
nav { position:sticky; top:0; z-index:100; background:var(--bg); border-bottom:3px double var(--ink); }
.nav-strip { display:flex; justify-content:space-between; padding:6px 52px; font-size:10px; letter-spacing:2px; color:var(--mid); border-bottom:1px solid var(--light); }
.nav-main  { display:flex; align-items:center; justify-content:space-between; padding:14px 52px; }
.nav-logo img { height:34px; width:auto; }
[data-dark="true"] .nav-logo img { filter:invert(1) brightness(.9); }
.nav-links { display:flex; gap:28px; }
.nav-links a { font-size:13px; color:var(--mid); transition:color .2s; }
.nav-links a:hover, .nav-links a.active { color:var(--ink); }
.nav-actions { display:flex; gap:14px; align-items:center; }
.btn-icon { width:32px; height:32px; border-radius:50%; border:1px solid var(--light); background:none; cursor:pointer; color:var(--mid); font-size:15px; display:flex; align-items:center; justify-content:center; transition:border-color .2s,color .2s; }
.btn-icon:hover { border-color:var(--ink); color:var(--ink); }
.btn-join { padding:7px 18px; border:1.5px solid var(--gold); background:transparent; font-family:'IBM Plex Sans',sans-serif; font-size:12px; font-weight:500; color:var(--gold); cursor:pointer; letter-spacing:1px; transition:background .2s,color .2s; }
.btn-join:hover { background:var(--gold); color:var(--bg); }

/* ── MASTHEAD ────────────────────────────────────────────────────── */
.masthead { text-align:center; padding:20px 52px 16px; border-bottom:1px solid var(--ink); }
.masthead img { height:52px; width:auto; margin:0 auto 10px; }
[data-dark="true"] .masthead img { filter:invert(1) brightness(.9); }

/* ── BUTTONS ─────────────────────────────────────────────────────── */
.btn-primary { display:inline-block; padding:11px 28px; background:var(--gold); color:#18140e; font-family:'IBM Plex Sans',sans-serif; font-size:13px; font-weight:500; border:none; cursor:pointer; transition:opacity .2s; letter-spacing:.5px; }
.btn-primary:hover { opacity:.85; }
.btn-outline { display:inline-block; padding:10px 24px; border:1.5px solid currentColor; font-family:'IBM Plex Sans',sans-serif; font-size:13px; cursor:pointer; background:transparent; transition:background .2s,color .2s; }

/* ── HERO ────────────────────────────────────────────────────────── */
.hero { position:relative; height:600px; overflow:hidden; }
.hero-img { width:100%; height:100%; object-fit:cover; object-position:center 20%; }
.hero-overlay { position:absolute; inset:0; background:linear-gradient(100deg,rgba(20,17,12,.9) 38%,rgba(20,17,12,.15)); }
.hero-body { position:absolute; bottom:70px; left:52px; max-width:560px; }
.hero-eyebrow { font-size:10px; letter-spacing:4px; color:var(--gold); margin-bottom:14px; font-weight:500; }
.hero-title { font-family:'Cormorant Garamond',serif; font-size:52px; line-height:1.08; color:#f0ece4; margin-bottom:18px; }
.hero-subtitle { font-family:'EB Garamond',serif; font-size:18px; color:#9a9288; margin-bottom:30px; }
.hero-ctas { display:flex; gap:14px; }
.hero-stats { position:absolute; bottom:0; right:0; display:flex; }
.hero-stat { padding:13px 24px; border-left:1px solid rgba(255,255,255,.07); background:rgba(20,17,12,.82); text-align:center; backdrop-filter:blur(4px); }
.hero-stat strong { display:block; font-family:'Cormorant Garamond',serif; font-size:24px; font-weight:600; color:var(--gold); }
.hero-stat span { font-size:10px; color:#666; }

/* ── EDITORIAL GRID (homepage hero strip) ────────────────────────── */
.ed-grid { display:grid; grid-template-columns:1fr 280px; border-bottom:1px solid var(--ink); }
.ed-feature { border-right:1px solid var(--ink); padding:32px 32px 32px 0; }
.ed-feature h2 { font-size:34px; line-height:1.12; margin-bottom:16px; }
.ed-sidebar { padding:28px 0 28px 24px; }
.ed-sidebar .latest-item { padding:10px 0; border-bottom:1px solid var(--light); }
.ed-sidebar .latest-item p:first-child { font-family:'EB Garamond',serif; font-size:14px; }
.ed-sidebar .latest-item p:last-child  { font-size:11px; color:var(--mid); margin-top:2px; }

/* ── WATCH ───────────────────────────────────────────────────────── */
.watch-grid { display:grid; grid-template-columns:2fr 1fr 1fr; gap:14px; }
.watch-grid iframe { display:block; width:100%; }
.watch-stack { display:flex; flex-direction:column; gap:14px; }
.watch-grid-6 { grid-template-columns:1fr 1fr 1fr; }
.watch-grid.watch-grid-6 .watch-item video,
.watch-grid.watch-grid-6 > video { aspect-ratio:4/3; width:100%; object-fit:contain; display:block; background:#000; }
.watch-item { display:flex; flex-direction:column; }
.watch-label { margin-top:7px; }
.watch-clip-name { display:block; font-family:'IBM Plex Sans',sans-serif; font-size:10px; font-weight:500; color:var(--mid); letter-spacing:.5px; line-height:1.4; }
.watch-film-name { display:block; font-family:'EB Garamond',serif; font-size:13px; font-style:italic; color:var(--ink); line-height:1.4; margin-top:2px; }
.watch-grid-4 { grid-template-columns:1fr 1fr; }
.watch-grid.watch-grid-4 video { width:100%; height:auto; display:block; background:#000; }

/* ── THREE COL ───────────────────────────────────────────────────── */
.three-col { display:grid; grid-template-columns:repeat(3,1fr); }
.col { }
.col + .col { border-left:1px solid var(--light); }
.col-inner { padding:32px 28px; }
.col:first-child .col-inner { padding-left:0; }
.col:last-child  .col-inner { padding-right:0; }
.col-head { display:flex; justify-content:space-between; align-items:baseline; border-bottom:2px solid var(--ink); padding-bottom:8px; margin-bottom:18px; }
.col-head h3 { font-size:22px; }
.col-head a  { font-size:12px; color:var(--teal); }
.col-head a:hover { text-decoration:underline; }
.film-row { padding:8px 0; border-bottom:1px solid var(--light); }
.film-row a { font-family:'EB Garamond',serif; font-size:14px; font-style:italic; transition:color .2s; }
.film-row a:hover { color:var(--gold); }
.film-row span { font-size:11px; color:var(--mid); display:block; margin-top:1px; }
.song-row { display:flex; align-items:center; gap:12px; padding:9px 0; border-bottom:1px solid var(--light); }
.song-num  { font-family:'Cormorant Garamond',serif; font-size:16px; color:var(--mid); width:20px; flex-shrink:0; }
.song-name { font-family:'EB Garamond',serif; font-size:15px; font-style:italic; }
.research-row { display:flex; gap:10px; padding:10px 0; border-bottom:1px solid var(--light); align-items:flex-start; }
.research-num  { font-family:'Cormorant Garamond',serif; font-size:18px; font-weight:600; color:var(--gold); flex-shrink:0; line-height:1.4; }
.research-row p:first-child { font-family:'EB Garamond',serif; font-size:14px; }
.research-row p:last-child  { font-size:11px; color:var(--mid); }
.fig-thumb img { width:100%; border:1px solid var(--light); opacity:.85; margin-top:20px; }
.fig-thumb p   { font-size:10px; color:var(--mid); margin-top:6px; line-height:1.4; }

/* ── BOOKS ───────────────────────────────────────────────────────── */
.books-grid { display:flex; flex-wrap:nowrap; gap:22px; overflow-x:auto; padding-bottom:12px; scrollbar-width:thin; scrollbar-color:var(--light) transparent; }
.books-grid > div { flex:0 0 160px; }
.book-cover { aspect-ratio:2/3; object-fit:cover; width:100%; border:1px solid var(--light); }
.book-placeholder { aspect-ratio:2/3; background:var(--card); border:1px solid var(--light); display:flex; align-items:center; justify-content:center; }
.book-placeholder span { font-family:'Cormorant Garamond',serif; font-size:13px; text-align:center; padding:12px; color:var(--mid); line-height:1.4; }
.book-title  { font-family:'EB Garamond',serif; font-size:15px; font-style:italic; margin-top:12px; line-height:1.3; }
.book-author { font-size:12px; color:var(--mid); margin-top:4px; }
.book-pub    { font-size:11px; color:var(--gold); }

/* ── PEOPLE ──────────────────────────────────────────────────────── */
.people-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:22px; }
.person-card { display:flex; gap:16px; padding:20px; background:var(--bg); border:1px solid var(--light); transition:border-color .2s; }
.person-card:hover { border-color:var(--gold); }
.person-avatar { width:56px; height:56px; border-radius:50%; background:var(--card); border:1px solid var(--light); flex-shrink:0; display:flex; align-items:center; justify-content:center; font-family:'Cormorant Garamond',serif; font-size:18px; font-weight:600; color:var(--gold); overflow:hidden; }
.person-avatar img { width:100%; height:100%; object-fit:cover; }
.person-name { font-family:'Cormorant Garamond',serif; font-size:19px; font-weight:600; line-height:1.2; margin-bottom:3px; }
.person-role { font-size:12px; color:var(--gold); font-weight:500; }
.person-inst { font-size:11px; color:var(--mid); margin-top:2px; }

/* ── GALLERY ─────────────────────────────────────────────────────── */
.gallery-row { display:flex; gap:6px; }
.gallery-row img { flex:1; height:200px; object-fit:cover; filter:grayscale(20%); transition:filter .3s,opacity .2s; cursor:pointer; }
.gallery-row img:hover { filter:grayscale(0); opacity:.92; }

/* ── ABOUT + JOIN ────────────────────────────────────────────────── */
.two-panel { display:grid; grid-template-columns:1fr 1fr; }
.panel { padding:44px 52px; }
.panel + .panel { border-left:1px solid var(--light); }
.panel-dark { background:var(--maroon); }
.panel h2 { font-size:28px; margin-bottom:14px; }
.panel-dark h2 { color:#f5f1ea; }
.panel-dark p { color:rgba(245,241,234,.7); }
.panel-dark .btn-outline { color:#f5f1ea; border-color:rgba(245,241,234,.5); margin-top:22px; }
.panel-dark .btn-outline:hover { background:rgba(245,241,234,.12); }

/* ── PARTNERS ────────────────────────────────────────────────────── */
.partners { background:var(--card); padding:22px 52px; border-top:1px solid var(--light); }
.partners-row { display:flex; justify-content:space-between; margin-top:14px; flex-wrap:wrap; gap:10px; }
.partner-tag { padding:7px 18px; border:1px solid var(--light); font-size:12px; color:var(--mid); }

/* ── FOOTER ──────────────────────────────────────────────────────── */
footer { background:#0e0c08; padding:26px 52px; display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:10px; }
.foot-copy { font-size:12px; color:#555; }
.foot-links { display:flex; gap:22px; }
.foot-links a,.foot-social a { font-size:12px; color:#555; transition:color .2s; }
.foot-links a:hover,.foot-social a:hover { color:var(--gold); }
.foot-social { display:flex; gap:16px; }

/* ── PAGE HEADER (inner pages) ───────────────────────────────────── */
.page-hero { padding:56px 52px 40px; border-bottom:1px solid var(--light); }
.page-hero .overline { margin-bottom:12px; }
.page-hero h1 { font-size:52px; line-height:1.05; max-width:800px; }
.page-hero p  { font-family:'EB Garamond',serif; font-size:18px; color:var(--mid); margin-top:14px; max-width:640px; line-height:1.7; }

/* ── FILM GRID ───────────────────────────────────────────────────── */
.film-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:24px; }
.film-card { cursor:pointer; }
.film-card-poster { aspect-ratio:2/3; background:var(--card); border:1px solid var(--light); position:relative; overflow:hidden; transition:border-color .2s; }
.film-card:hover .film-card-poster { border-color:var(--gold); }
.film-card-poster img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:center top; opacity:.85; }
.film-card-info { position:relative; }
.film-card h3 { font-size:17px; margin-top:10px; line-height:1.2; }
.film-card span { font-size:11px; color:var(--mid); }
.film-card .award { font-size:10px; color:var(--gold); margin-top:4px; font-weight:500; }

/* ── RESEARCH PAGE ───────────────────────────────────────────────── */
.figure-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:28px; margin-top:8px; }
.figure-card { border:1px solid var(--light); overflow:hidden; cursor:zoom-in; transition:border-color .2s; position:relative; }
.figure-card:hover { border-color:var(--gold); }
.figure-card img { width:100%; display:block; }
.figure-caption { padding:12px 16px; font-size:12px; color:var(--mid); border-top:1px solid var(--light); line-height:1.5; }
.fig-inner { padding:20px; background:var(--surface); }
.fig-zoom-hint { font-size:9px; color:var(--mid); letter-spacing:1px; opacity:.5; padding:3px 12px 8px; text-align:right; font-family:'IBM Plex Sans',sans-serif; }
/* Fig zoom modal */
.fig-modal { display:none; position:fixed; inset:0; z-index:1000; background:rgba(0,0,0,.85); overflow-y:auto; padding:32px 24px; cursor:zoom-out; }
.fig-modal.open { display:flex; align-items:flex-start; justify-content:center; }
.fig-modal-inner { background:var(--bg); border:2px solid var(--ink); max-width:1100px; width:100%; padding:36px; position:relative; cursor:default; }
.fig-modal-close { position:absolute; top:12px; right:16px; font-size:26px; cursor:pointer; color:var(--mid); background:none; border:none; line-height:1; font-family:'IBM Plex Sans',sans-serif; }
.fig-modal-close:hover { color:var(--ink); }
#figModalContent { zoom: 2; width: 100%; }

/* ── JOIN FORM ───────────────────────────────────────────────────── */
.form-field { margin-bottom:22px; }
.form-field label { display:block; font-size:12px; font-weight:500; letter-spacing:1px; margin-bottom:8px; color:var(--mid); }
.form-field input, .form-field select, .form-field textarea { width:100%; padding:11px 14px; background:var(--surface); border:1px solid var(--light); color:var(--ink); font-family:'IBM Plex Sans',sans-serif; font-size:14px; transition:border-color .2s; outline:none; }
.form-field input:focus,.form-field select:focus,.form-field textarea:focus { border-color:var(--gold); }
.form-field textarea { height:120px; resize:vertical; }
