
:root {
  --ink: #14110e;
  --bone: #efe3c9;
  --white: #f8f5ee;
  --smoke: #1a1714;
  --frame-rgb: 245, 235, 210;
  --frame-color: rgba(245, 235, 210, 0.28);
  --shadow: 0 28px 72px rgba(0,0,0,0.30);
  --max: 1260px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ink); color: var(--bone); font-family: Georgia, "Times New Roman", serif; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; }
p { margin: 0 0 1.1rem; font-size: clamp(1rem, 1.2vw, 1.12rem); line-height: 1.62; }
.eyebrow { margin-bottom: 12px; font-family: Arial, sans-serif; font-size: .72rem; line-height: 1; letter-spacing: .24em; text-transform: uppercase; color: rgba(248,245,238,.82); }
h1, h2, h3 { margin: 0 0 1rem; line-height: .98; font-weight: 500; }
h1 { font-size: clamp(4rem, 10vw, 8rem); }
h2 { font-size: clamp(1.45rem, 2.65vw, 2.35rem); }
h3 { font-size: clamp(1.35rem, 2.15vw, 2rem); }
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 60; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 18px max(18px, calc((100vw - var(--max)) / 2)); background: linear-gradient(to bottom, rgba(12,10,8,.76), rgba(12,10,8,.1)); }
.brand { text-decoration: none; font-size: 1.08rem; letter-spacing: .1em; text-transform: uppercase; font-family: Arial, sans-serif; font-weight: 700; }
.nav-toggle { display: none; }
nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 14px; }
nav a { text-decoration: none; font-family: Arial, sans-serif; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; padding: 8px 2px; opacity: .86; }
nav a:hover { opacity: 1; }
.media-section, .fullscreen-tab-panel { position: relative; display: grid; align-items: center; justify-items: center; min-height: 100vh; padding: 92px 20px 34px; overflow: hidden; isolation: isolate; }
.media-section::before, .fullscreen-tab-panel::before { content: ""; position: absolute; inset: 0; background-image: var(--bg); background-size: cover; background-position: center center; transform: scale(1.015); z-index: 0; }
.section-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.veil { position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(10,9,7,.32), rgba(12,10,8,.58)); }
.hero-veil { background: radial-gradient(circle at center, rgba(255,255,255,.06), transparent 34%), linear-gradient(180deg, rgba(10,9,7,.32), rgba(12,10,8,.58)); }
.left-veil { background: linear-gradient(90deg, rgba(15,12,9,.74) 0%, rgba(15,12,9,.46) 38%, rgba(15,12,9,.18) 68%, rgba(15,12,9,.36) 100%); }
.writer-veil { background: linear-gradient(180deg, rgba(15,12,9,.70) 0%, rgba(15,12,9,.20) 54%, rgba(15,12,9,.64) 100%); }
.frame { position: absolute; inset: 14px; z-index: 2; border: 2px solid var(--frame-color); pointer-events: none; }
.hero-content, .copy-panel, .content-card, .theme-stack, .tabs, .overlay-copy { position: relative; z-index: 3; }
.hero-content { width: min(var(--max), calc(100% - 36px)); text-align: center; color: var(--bone); }
.hero-content .credit { max-width: 720px; margin: 0 auto; }
.title-fade { animation: titleFade 1.8s ease both; }
@keyframes titleFade { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
.fullscreen-copy { justify-items: stretch; }
.copy-panel { width: min(700px, calc(100% - 18px)); padding: clamp(22px, 4vw, 42px); border: 1px solid rgba(var(--frame-rgb), .44); background: rgba(20,17,14,.58); backdrop-filter: blur(4px); box-shadow: var(--shadow); color: var(--white); }
.logline-section { justify-items: start; }
.logline-panel { margin-left: clamp(0px, 8vw, 110px); max-width: 640px; }
.wide-card .content-card, .teaser-card { width: min(var(--max), calc(100% - 32px)); max-width: 760px; padding: clamp(24px, 5vw, 52px); color: var(--white); border: 1px solid rgba(var(--frame-rgb), .44); background: rgba(20,17,14,.48); backdrop-filter: blur(3px); box-shadow: var(--shadow); }
.clean-card { margin-left: clamp(0px, 8vw, 110px); justify-self: start; }
.center-card { text-align: center; }
/* Shared tab sections */
.tabbed-fullscreen { position: relative; min-height: 100vh; background: var(--ink); color: var(--white); }
.fullscreen-tabs { position: relative; min-height: 100vh; }
.floating-tab-list { position: absolute; z-index: 12; top: 74px; left: 50%; transform: translateX(-50%); display: grid; grid-template-columns: repeat(3, 1fr); width: min(680px, calc(100% - 48px)); border: 1px solid rgba(var(--frame-rgb), .32); background: rgba(20,17,14,.72); backdrop-filter: blur(5px); box-shadow: 0 16px 42px rgba(0,0,0,.24); }
.character-tab-list { grid-template-columns: repeat(4, 1fr); width: min(880px, calc(100% - 48px)); }
.tab-button { appearance: none; border: 0; border-right: 1px solid rgba(var(--frame-rgb), .30); background: rgba(245,235,210,.10); color: var(--bone); padding: 15px 10px; font-family: Arial, sans-serif; text-transform: uppercase; letter-spacing: .13em; font-weight: 700; cursor: pointer; }
.tab-button:last-child { border-right: 0; }
.tab-button.active { background: var(--bone); color: #1b1510; }
.tab-panel[hidden] { display: none !important; }
.fullscreen-tab-panel { min-height: 100vh; align-items: end; justify-items: start; padding: 132px clamp(18px, 6vw, 78px) clamp(30px, 7vw, 74px); }
.fullscreen-tab-panel.active { display: grid; }
.act-veil { background: linear-gradient(0deg, rgba(10,8,6,.82) 0%, rgba(10,8,6,.52) 35%, rgba(10,8,6,.12) 72%); }
.character-veil { background: linear-gradient(90deg, rgba(10,8,6,.72) 0%, rgba(10,8,6,.36) 36%, rgba(10,8,6,.15) 62%, rgba(10,8,6,.52) 100%); }
.overlay-copy { width: min(700px, 100%); color: var(--white); padding: clamp(20px, 3vw, 34px); border-left: 2px solid rgba(var(--frame-rgb), .66); background: rgba(20,17,14,.42); backdrop-filter: blur(3px); box-shadow: var(--shadow); }
.overlay-copy p:last-child { margin-bottom: 0; }
.character-panel::before { background-size: cover; background-position: center center; }
.character-copy { max-width: 620px; }
.right-overlay { justify-self: end; }
.teaser-section { min-height: 86vh; }
.themes-section { min-height: 82vh; }
.theme-stack { width: min(var(--max), calc(100% - 36px)); display: grid; }
.single-theme { max-width: 720px; }
.theme-card { color: var(--white); padding: clamp(24px, 4vw, 44px); border: 1px solid rgba(var(--frame-rgb), .48); background: rgba(20,17,14,.56); backdrop-filter: blur(3px); box-shadow: var(--shadow); }
.writer-section { align-items: start; justify-items: center; padding-top: clamp(90px, 12vh, 132px); }
.wide-writer-panel { width: min(1080px, calc(100% - 52px)); max-width: 1080px; text-align: center; background: rgba(20,17,14,.50); }
.signature { margin-top: .4rem; }
.closing { min-height: 92vh; }
.closing::before { background-position: center center; }
.closing-content h2 { font-size: clamp(4.4rem, 12vw, 10rem); }
.button { display: inline-block; margin-top: 14px; padding: 14px 22px; border: 2px solid rgba(var(--frame-rgb), .75); text-decoration: none; font-family: Arial, sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.scroll-fade { opacity: 0; transform: translateY(26px); transition: opacity .65s ease, transform .65s ease; }
.scroll-fade.is-visible { opacity: 1; transform: translateY(0); }
footer { padding: 22px 18px; text-align: center; background: var(--ink); color: var(--bone); }
footer p { margin: 0; font-size: .9rem; font-family: Arial, sans-serif; }
@media (max-width: 760px) {
  .site-header { align-items: center; padding: 14px 16px; background: linear-gradient(to bottom, rgba(20,17,14,.9), rgba(20,17,14,.14)); }
  .nav-toggle { display: block; border: 1px solid rgba(var(--frame-rgb), .5); background: rgba(20,17,14,.4); color: var(--white); padding: 8px 10px; font-family: Arial, sans-serif; text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; }
  nav { position: absolute; top: 54px; right: 16px; display: none; width: min(250px, calc(100vw - 32px)); padding: 12px; background: rgba(20,17,14,.94); border: 1px solid rgba(var(--frame-rgb), .45); }
  nav.open { display: grid; gap: 4px; }
  nav a { padding: 10px; }
  .media-section { min-height: 82vh; padding: 78px 16px 26px; }
  .frame { inset: 10px; }
  .copy-panel, .content-card, .teaser-card, .theme-card { width: 100%; padding: 20px; }
  .logline-panel, .clean-card { margin-left: 0; margin-right: 0; }
  .left-veil, .writer-veil { background: linear-gradient(0deg, rgba(15,12,9,.78), rgba(15,12,9,.24) 60%, rgba(15,12,9,.46)); }
  .floating-tab-list { top: 64px; width: calc(100% - 28px); }
  .character-tab-list { grid-template-columns: repeat(2, 1fr); top: 60px; }
  .tab-button { padding: 12px 5px; font-size: .72rem; letter-spacing: .1em; }
  .fullscreen-tab-panel { min-height: 86vh; padding: 132px 16px 24px; }
  .character-tabs-section .fullscreen-tab-panel { padding-top: 156px; }
  .overlay-copy { width: 100%; padding: 18px; }
  .overlay-copy p { font-size: .98rem; line-height: 1.5; }
  .wide-writer-panel { width: 100%; text-align: left; }
  .writer-section { align-items: start; justify-items: stretch; padding-top: 88px; }
  .closing-content h2 { font-size: clamp(3.8rem, 17vw, 6.2rem); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .title-fade, .scroll-fade { animation: none; transition: none; opacity: 1; transform: none; } }


/* V7 refinements */
.tabs [role="tabpanel"] { display: none; }
.tabs [role="tabpanel"].active { display: grid; }
.tabs [role="tabpanel"][hidden] { display: none !important; }

.story-tabs-section .fullscreen-tab-panel { justify-items: end; align-items: end; }
.story-tabs-section .act-copy { max-width: 520px; justify-self: end; text-align: left; margin-right: clamp(4px, 3vw, 48px); }
.story-tabs-section .act-copy h2 { margin-bottom: .75rem; }
.story-tabs-section .overlay-copy { border-left: 0; border-right: 2px solid rgba(var(--frame-rgb), .66); }

.character-panel::before { background-size: cover; background-position: center center; transform: scale(1.01); }
.character-tabs-section .fullscreen-tab-panel { justify-items: start; align-items: end; }
.character-tab-list { width: min(860px, calc(100% - 48px)); }
.character-copy { max-width: 520px; }
.character-tabs-section .overlay-copy { background: rgba(20,17,14,.50); }

.wide-writer-panel { width: min(1160px, calc(100% - 40px)); max-width: 1160px; }
.wide-writer-panel p { max-width: 980px; margin-left: auto; margin-right: auto; }

@media (max-width: 760px) {
  .story-tabs-section .fullscreen-tab-panel { justify-items: stretch; }
  .story-tabs-section .act-copy { max-width: none; margin-right: 0; }
  .story-tabs-section .overlay-copy { border-right: 0; border-left: 2px solid rgba(var(--frame-rgb), .66); }
  .character-panel::before { background-position: center top; }
  .hero-content { color: var(--bone); }
}

/* Mobile alignment fixes: Historical Canvas + Writer's Note */
@media (max-width: 760px) {
  .historical-canvas.media-section,
  .writer-section.media-section {
    min-height: 100svh;
    align-items: center;
    justify-items: center;
    padding: 78px 16px 26px;
  }

  .historical-canvas .clean-card,
  .writer-section .wide-writer-panel {
    justify-self: center;
    align-self: center;
    width: min(100%, 520px);
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }

  .writer-section .wide-writer-panel p {
    text-align: center;
  }
}
