/* Matryoshka Studio site. Colours are the channel's own (docs/gorsel-uretim/stil.md, brand/intro). */
@font-face { font-family: "Archivo"; src: url("/assets/fonts/Archivo.ttf") format("truetype");
             font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("/assets/fonts/Fraunces.ttf") format("truetype");
             font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("/assets/fonts/Fraunces-Italic.ttf") format("truetype");
             font-weight: 100 900; font-style: italic; font-display: swap; }

:root {
  color-scheme: light;
  --paper: #f4eedf;     /* board cream */
  --sheet: #f6f2e9;     /* source page */
  --ink: #2b2d31;
  --ink-soft: #55575d;
  --body: #2a2b2f;      /* doll charcoal */
  --ivory: #fbf6ea;
  --red: #b23b2e;       /* waist band */
  --blue: #2f4e6e;      /* links: institutions and sources */
  --rule: #d9cfb8;
  --gutter: clamp(16px, 5vw, 56px);
  --measure: 38rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: "Fraunces", Georgia, serif; font-size: 1.1875rem; line-height: 1.62;
  font-optical-sizing: auto;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Condensed display type, as in the intro wordmark */
.display, h1, h2, .wordmark, .site-nav {
  font-family: "Archivo", "Arial Narrow", sans-serif; font-stretch: 62%; font-weight: 800;
  letter-spacing: .01em; line-height: 1.02;
}
h1 { font-size: clamp(2.6rem, 6.4vw, 4.6rem); margin: 0 0 1.25rem; max-width: 18ch; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); margin: 0 0 1rem; }
p { margin: 0 0 1.1em; }

.wrap { max-width: 72rem; margin: 0 auto; padding: 0 var(--gutter); }
.measure { max-width: var(--measure); }

/* Header */
.site-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem;
             padding-top: 1.25rem; padding-bottom: 1.25rem; }
.wordmark { color: var(--ink); text-decoration: none; font-size: 1.5rem; letter-spacing: .3em;
            display: inline-flex; align-items: baseline; white-space: nowrap; }
.wordmark .gap { display: inline-block; width: .42em; }
.o { display: inline-block; width: .5em; height: .8em; margin: 0 .12em 0 .02em; vertical-align: baseline;
     transform-origin: 50% 100%; overflow: visible; }
.wordmark:hover { color: var(--ink); }
.wordmark:hover .o { animation: rock .7s ease-in-out; }
.wordmark:hover .o + .o, .wordmark:hover .gap + * .o { animation-delay: .08s; }
@keyframes rock { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-7deg); } 60% { transform: rotate(5deg); } 85% { transform: rotate(-2deg); } }
.site-nav { display: flex; gap: 1.4rem; font-size: 1.15rem; letter-spacing: .04em; }
.site-nav a { color: var(--ink); text-decoration: none; }
.site-nav a:hover { color: var(--red); }
.home .site-head .wordmark { visibility: hidden; }   /* the hero carries the wordmark on the home page */

/* Hero with the intro */
.hero { position: relative; }
.stage-box { position: relative; overflow: hidden; height: 56.25vw; max-height: 78vh; }
#stage { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; transform-origin: 0 0; }
.stage-box.moving { transition: height 1s cubic-bezier(.65, 0, .35, 1); }
.stage-box.moving #stage { transition: transform 1s cubic-bezier(.65, 0, .35, 1); }
/* Intro stage internals (same as brand/intro/hyperframes/index.html) */
#push { position: absolute; inset: 0; transform-origin: 50% 50%; }
#cam  { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; transform-origin: 0 0; }
#row { position: absolute; left: 0; top: 0; width: 1920px; display: flex; justify-content: center; align-items: baseline;
       z-index: 3; font-family: "Archivo", sans-serif; font-weight: 800; font-stretch: 62%; color: var(--ink);
       line-height: 1; white-space: nowrap; letter-spacing: 0; }
#row .it { display: inline-block; will-change: transform; }
#row .it svg { display: block; overflow: visible; }
#row .gap { display: inline-block; height: 0; }
#stage .doll { position: absolute; transform-origin: 50% 100%; }
#stage .doll svg { display: block; width: 100%; height: 100%; overflow: visible; }
#lidWrap { z-index: 1; }
#dust { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 2; }
#bodyWrap { z-index: 4; }
#lidLift { width: 100%; height: 100%; transform-origin: 85% 100%; }
#dissolve { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 5; }
#stage .p { position: absolute; left: 0; top: 0; border-radius: 50%; opacity: 0; will-change: transform, opacity; }
#stage .p.dust  { background: radial-gradient(circle, rgba(126,110,90,.55) 0%, rgba(126,110,90,.28) 38%, rgba(126,110,90,0) 70%); }
#stage .p.speck { background: rgba(70,62,52,.75); }
#stage .p.chip-body   { background: radial-gradient(circle, #2a2b2f 0 52%, rgba(42,43,47,0) 70%); }
#stage .p.chip-ivory  { background: radial-gradient(circle, #fbf6ea 0 52%, rgba(251,246,234,0) 70%); }
#stage .p.chip-accent { background: radial-gradient(circle, #b23b2e 0 52%, rgba(178,59,46,0) 70%); }
.replay { position: absolute; inset: 0; width: 100%; background: none; border: 0; cursor: pointer; }
.replay:focus-visible { outline-offset: -6px; }

/* The waist band: one short red band marks where a page opens */
.band { width: 4.5rem; height: 6px; background: var(--red); border: 0; margin: 0 0 2rem; border-radius: 1px; }

/* Home */
.lede { padding-top: clamp(1rem, 4vw, 3rem); padding-bottom: clamp(3rem, 8vw, 6rem); }
.lede .display { font-size: clamp(2rem, 4.8vw, 3.5rem); max-width: 20ch; margin: 0 0 1.5rem; }
.lede p.measure { color: var(--ink-soft); }

.film { display: grid; gap: clamp(1.25rem, 3vw, 2.75rem); padding-bottom: clamp(4rem, 9vw, 7rem); }
@media (min-width: 52rem) { .film { grid-template-columns: 7fr 5fr; align-items: center; } }
.film-pic { display: block; border-radius: 6px; overflow: hidden; background: var(--body);
            box-shadow: 0 1px 0 rgba(43,45,49,.08), 0 18px 40px -24px rgba(43,45,49,.45); }
.film-pic img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.film h3 { font-family: "Archivo", sans-serif; font-stretch: 62%; font-weight: 800; line-height: 1.04;
           font-size: clamp(1.8rem, 3.2vw, 2.4rem); margin: 0 0 .9rem; }
.film .meta { font-family: "Archivo", sans-serif; font-size: .95rem; color: var(--ink-soft); margin-bottom: .6rem; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; align-items: center; margin-top: 1.4rem; }
.button { font-family: "Archivo", sans-serif; font-weight: 700; font-size: 1rem; letter-spacing: .01em;
          background: var(--body); color: var(--ivory); text-decoration: none; padding: .8rem 1.25rem; border-radius: 4px; }
.button:hover { background: var(--red); color: var(--ivory); }
.textlink { font-family: "Archivo", sans-serif; font-weight: 600; font-size: 1rem; }

/* Footer: the smallest doll */
.site-foot { border-top: 1px solid var(--rule); padding-top: 2.5rem; padding-bottom: 3rem; }
.foot-grid { display: grid; grid-template-columns: auto 1fr; gap: 1.25rem 1.5rem; align-items: start; }
.foot-doll { width: 46px; height: 74px; }
.foot-grid h2 { font-size: 1.7rem; margin-bottom: .4rem; }
.foot-grid p { margin: 0 0 .5rem; }
.foot-note { color: var(--ink-soft); font-size: 1rem; font-style: italic; }
.small { font-family: "Archivo", sans-serif; font-size: .9rem; color: var(--ink-soft); margin-top: 1.5rem; }

/* Film page */
.film-head { padding-top: clamp(1.5rem, 5vw, 4rem); padding-bottom: 2rem; }
.player { position: relative; aspect-ratio: 16 / 9; background: var(--body); border-radius: 6px; overflow: hidden; }
.player img, .player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.player button { position: absolute; inset: 0; width: 100%; border: 0; padding: 0; background: none; cursor: pointer; }
.play-mark { position: absolute; left: 50%; top: 50%; width: 84px; height: 84px; margin: -42px 0 0 -42px; border-radius: 50%;
             background: rgba(42,43,47,.86); display: grid; place-items: center; transition: background .2s; }
.player button:hover .play-mark, .player button:focus-visible .play-mark { background: var(--red); }
.play-mark::after { content: ""; margin-left: 6px; border-style: solid; border-width: 15px 0 15px 25px;
                    border-color: transparent transparent transparent var(--ivory); }
.player-note { font-family: "Archivo", sans-serif; font-size: .9rem; color: var(--ink-soft); margin-top: .7rem; }

.film-body { display: grid; gap: 3rem; padding-top: 3rem; padding-bottom: clamp(4rem, 9vw, 7rem); }
@media (min-width: 60rem) { .film-body { grid-template-columns: minmax(0, 1fr) 19rem; gap: 4rem; } }
.film-body section + section { margin-top: 3.5rem; }
.chapters { list-style: none; padding: 0; margin: 0; font-family: "Archivo", sans-serif; font-size: 1.02rem; }
.chapters li { border-top: 1px solid var(--rule); }
.chapters li:last-child { border-bottom: 1px solid var(--rule); }
.chapters a { display: grid; grid-template-columns: 3.4rem 1fr; gap: .5rem; padding: .62rem 0; color: var(--ink); text-decoration: none; }
.chapters a:hover { color: var(--red); }
.chapters time { font-variant-numeric: tabular-nums; color: var(--ink-soft); }

/* Sources as a bibliography: publisher, then the document */
.sources { margin: 0 0 2.5rem; padding: 0; }
.sources > div { display: grid; gap: .15rem 1.5rem; padding: .85rem 0; border-top: 1px solid var(--rule); }
.sources > div:last-child { border-bottom: 1px solid var(--rule); }
@media (min-width: 40rem) { .sources > div { grid-template-columns: 11rem 1fr; } }
.sources dt { font-family: "Archivo", sans-serif; font-weight: 600; font-size: .98rem; color: var(--ink-soft); padding-top: .15rem; }
.sources dd { margin: 0; }
.sources a { overflow-wrap: anywhere; }
.credits { color: var(--ink-soft); font-size: 1.02rem; }

/* The screening room: where the cream page opens onto the film. Its top edge is the doll's red band. */
.screening { background: var(--body); color: var(--ivory); border-top: 6px solid var(--red); }
.screening a { color: var(--ivory); }
.screening a:hover { color: #f0b9ae; }
.screening :focus-visible { outline-color: var(--ivory); }
.key-art { display: block; position: relative; max-width: 100rem; margin: 0 auto; }
.key-art img { width: 100%; height: auto; aspect-ratio: 16 / 9; max-height: 82vh; object-fit: cover; object-position: 50% 45%; }
.screening-text { display: grid; gap: 1.25rem 3.5rem; padding-top: clamp(1.75rem, 4vw, 3rem); padding-bottom: clamp(3rem, 7vw, 5.5rem); }
@media (min-width: 56rem) { .screening-text { grid-template-columns: 7fr 5fr; align-items: start; } }
.screening h2 { font-size: clamp(2.3rem, 5vw, 3.9rem); line-height: 1; margin: 0; max-width: 16ch; }
.screening h2 a { text-decoration: none; }
.screening p { color: #d9d3c4; }
.screening .meta { font-family: "Archivo", sans-serif; font-size: .95rem; color: #b3ad9f; margin: 0 0 .9rem; }
.button.light { background: var(--ivory); color: var(--body); }
.button.light:hover { background: var(--red); color: var(--ivory); }

/* Film page head in the screening room */
.film-top { padding-top: clamp(1.75rem, 5vw, 3.5rem); padding-bottom: clamp(2rem, 5vw, 3.5rem); }
.film-top h1 { color: var(--ivory); max-width: 20ch; }
.film-top .player-note { color: #b3ad9f; }
.film-top .player-note a { color: var(--ivory); }

/* Dated timeline: a real sequence, so it is ordered and numbered by date */
.timeline { list-style: none; padding: 0; margin: 0 0 1rem; position: relative; }
.timeline li { position: relative; padding: 0 0 1.6rem 2rem; }
.timeline li::after { content: ""; position: absolute; left: .32rem; top: 1.35rem; bottom: .1rem; width: 2px; background: var(--rule); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::after { display: none; }
.timeline li::before { content: ""; position: absolute; left: 0; top: .5rem; width: .7rem; height: .7rem; border-radius: 50%;
                       background: var(--paper); border: 2px solid var(--ink); }
.timeline li.red::before { background: var(--red); border-color: var(--red); }
.timeline time { display: block; font-family: "Archivo", sans-serif; font-weight: 700; font-size: 1rem; letter-spacing: .01em; }
.timeline p { margin: .15rem 0 .2rem; }
.timeline .src { font-family: "Archivo", sans-serif; font-size: .92rem; }

/* One quote, given room */
.film-body figure + section { margin-top: 3.5rem; }
.quote { margin: 3rem 0 0; padding: 2.25rem 0 0; border-top: 6px solid var(--red); max-width: 40rem; }
.quote p { font-family: "Fraunces", serif; font-style: italic; font-weight: 400; font-size: clamp(1.6rem, 3.2vw, 2.25rem);
           line-height: 1.25; margin: 0 0 1rem; text-wrap: balance; }
.quote figcaption { font-family: "Archivo", sans-serif; font-size: .98rem; color: var(--ink-soft); }

/* 404 */
.lost { padding-top: clamp(3rem, 10vw, 7rem); padding-bottom: clamp(4rem, 10vw, 8rem); display: grid; gap: 2rem; }
@media (min-width: 46rem) { .lost { grid-template-columns: 14rem 1fr; align-items: center; } }
.lost svg { width: 9rem; height: auto; }
@media (min-width: 46rem) { .lost svg { width: 12rem; } }

@media (max-width: 30rem) {
  body { font-size: 1.0625rem; }
  .wordmark { font-size: 1.2rem; letter-spacing: .24em; }
  .site-nav { gap: 1rem; font-size: 1.05rem; }
}
@media (prefers-reduced-motion: reduce) {
  .wordmark:hover .o { animation: none; }
  * { scroll-behavior: auto !important; }
}

.nowrap { white-space: nowrap; }
