/* Design pass follows unslop by Damir Sokolovsky (@heydamir), CC BY 4.0. */
:root {
  color-scheme: light;
  --site-header-height: 76px;
  --paper: #f7f4ed;
  --ink: #26241f;
  --secondary: #514b40;
  --muted: #6d6458;
  --rule: #dad3c6;
  --soft: #ede8dc;
  --accent: #785613;
  --sans: 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --serif: 'Noto Serif KR', 'AppleMyungjo', Batang, serif;
  --mono: 'SFMono-Regular', Consolas, monospace;
  --ease: cubic-bezier(.2, .65, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.65 var(--sans); }
a { color: inherit; }
button, input { font: inherit; }
a, button, input { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
h1, h2, h3, p, figure { margin: 0; }
section, figure { scroll-margin-top: 24px; }
[hidden] { display: none !important; }

.wrap { width: min(1280px, calc(100% - 96px)); margin-inline: auto; }
.skip { position: absolute; z-index: 2; left: 16px; top: 8px; padding: 8px 12px; background: var(--paper); transform: translateY(-200%); }
.skip:focus { transform: none; }
.site-header { display: flex; align-items: center; justify-content: space-between; min-height: var(--site-header-height); border-bottom: 1px solid var(--rule); }
.wordmark { display: inline-flex; align-items: baseline; gap: 8px; text-decoration: none; }
.wordmark strong { font: 600 28px/1 var(--sans); letter-spacing: -.05em; }
.wordmark span { color: var(--secondary); font-size: 13px; }
.site-header nav { display: flex; gap: 28px; }
.site-header nav a, .site-footer a { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; text-decoration: none; }
.site-header nav a:hover, .site-footer a:hover { text-decoration: underline; text-underline-offset: 4px; }

.hero {
  --hero-paper: #fff9ee;
  --hero-secondary: #f4ecdf;
  --hero-accent: #f4db9a;
  position: relative;
  display: grid;
  align-items: center;
  isolation: isolate;
  min-height: max(540px, 100svh);
  padding-block: 72px 100px;
  background: #201c23;
  color: var(--hero-paper);
}
.hero-story[data-scroll]::after { content: ''; display: block; height: clamp(360px, 60svh, 520px); }
.hero-story[data-scroll] .hero { position: sticky; top: var(--pin-top, 0px); }
.hero-copy { position: relative; z-index: 1; pointer-events: none; }
.hero-copy > * { width: fit-content; pointer-events: auto; }
.hero .eyebrow, .hero .intro { color: var(--hero-secondary); }
.hero :focus-visible { outline-color: var(--hero-accent); }
.eyebrow { color: var(--muted); font-size: 13px; }
h1 { margin-top: 20px; font: 500 clamp(44px, 4.7vw, 72px)/1.16 var(--serif); letter-spacing: -.055em; }
h1 span { display: block; }
.intro { max-width: 27ch; margin-top: 24px; color: var(--secondary); font-size: 16px; line-height: 1.85; word-break: keep-all; }
.primary { display: inline-flex; align-items: center; gap: 24px; min-height: 48px; margin-top: 28px; padding: 8px 16px; border-radius: 4px; background: var(--hero-paper); color: var(--ink); font-size: 14px; text-decoration: none; transition: background-color 160ms var(--ease); }
.primary:hover { background: var(--soft); }

.screen, .film, .screen::after { position: absolute; inset: 0; }
.screen::after {
  content: '';
  pointer-events: none;
  background:
    linear-gradient(90deg, #17141be8, #17141b9c 31%, transparent 66%),
    linear-gradient(0deg, #17141bec, transparent 25%),
    linear-gradient(180deg, #17141b9c, transparent 17%);
}
.screen-top, .caption { position: absolute; z-index: 1; inset-inline: 0; }
.screen-top, .film-note { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--hero-secondary); font-size: 12px; }
.screen-top { top: 24px; }
.time { font: 400 12px/1.4 var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.film { background: url('media/hero-poster.webp') center / cover no-repeat; overflow: hidden; }
.film video { display: block; width: 100%; height: 100%; object-fit: cover; }
.caption { bottom: 24px; }
.film-note { min-height: 24px; }
.film-note > :last-child { text-align: right; }

.archive, .about { border-top: 1px solid var(--rule); padding-block: 40px 56px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
h2 { font: 500 clamp(24px, 3vw, 36px)/1.35 var(--serif); letter-spacing: -.035em; }
.section-heading .time { color: var(--muted); }
.category-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; margin: 0; padding: 0; list-style: none; }
.category-list li { border-top: 1px solid var(--rule); }
.category-list a { display: grid; grid-template-columns: 104px minmax(0, 1fr) auto; align-items: center; gap: 16px; min-height: 96px; padding-block: 16px; text-decoration: none; }
.category-thumb { display: block; width: 100%; height: auto; aspect-ratio: 104 / 64; object-fit: cover; border-radius: 4px; background: var(--soft); }
.category-list strong { display: block; font-size: 18px; font-weight: 500; }
.category-list small { color: var(--secondary); font-size: 14px; }
.category-list a > :last-child { color: var(--accent); }
.category-list a:hover strong { text-decoration: underline; text-underline-offset: 4px; }
.category-page { min-height: 64vh; padding-block: 48px 80px; }
.category-page .back { display: inline-block; color: var(--secondary); font-size: 14px; }
.category-page h1 { margin-block: 24px 16px; }
.work-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 24px; margin: 32px 0 0; padding: 24px 0 0; border-top: 1px solid var(--rule); list-style: none; }
.work-grid--shorts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.work-link { display: grid; gap: 8px; color: inherit; text-decoration: none; }
.work-thumb { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--soft); }
.work-thumb img { display: block; width: 100%; height: 100%; object-fit: contain; }
.work-grid--shorts .work-thumb { aspect-ratio: 9 / 16; }
.work-duration { position: absolute; right: 8px; bottom: 8px; padding: 4px 8px; background: #26241f; color: var(--paper); }
.work-title { font-size: 16px; font-weight: 500; overflow-wrap: anywhere; }
.work-link:hover .work-title { text-decoration: underline; text-underline-offset: 4px; }
.work-player { width: min(960px, calc(100% - 32px)); max-height: calc(100% - 32px); padding: 16px; border: 1px solid var(--rule); background: var(--paper); color: var(--ink); }
.work-player::backdrop { background: #201c23cf; }
.work-player header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.work-player h2 { font: 500 18px/1.4 var(--sans); letter-spacing: normal; }
.work-player button { min-height: 44px; padding-inline: 12px; border: 0; background: var(--soft); color: var(--ink); cursor: pointer; white-space: nowrap; }
.work-player video { display: block; width: 100%; max-height: 74svh; background: var(--ink); }
.about p { color: var(--secondary); }
.about { display: grid; grid-template-columns: 1fr 2fr; gap: 32px; }
.about p { max-width: 50ch; word-break: keep-all; }
.site-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; padding-block: 24px 16px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 14px; }
.footer-copy { display: grid; gap: 4px; }
.footer-copy > span { color: var(--ink); font-weight: 500; }
.footer-copy > a { width: fit-content; color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.footer-contact { display: flex; align-items: center; margin-inline-start: auto; }
.footer-contact a { justify-content: center; width: 44px; border-radius: 4px; }
.footer-contact a:hover { background: var(--soft); }
.footer-contact img { display: block; }

@media (max-width: 860px) {
  .wrap { width: calc(100% - 48px); }
  h1 { font-size: clamp(40px, 7vw, 60px); }
  .intro { max-width: 40ch; }
  .category-list { gap: 0 24px; }
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work-grid--shorts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    align-content: center;
    gap: 24px;
    min-height: calc(100svh - var(--site-header-height));
    padding-block: 24px;
  }
  .hero-story[data-scroll] { background: #201c23; }
  .hero h1 { font-size: clamp(28px, 8.4vw, 48px); margin-top: 8px; }
  .hero h1 span { display: inline; }
  .hero h1 span + span::before { content: ' '; }
  .hero .intro { margin-top: 12px; font-size: 16px; line-height: 1.6; max-width: 36ch; }
  .hero .primary { margin-top: 16px; }
  .hero .screen, .hero .film, .hero .caption { position: static; }
  .hero .screen::after, .hero .screen-top { display: none; }
  .hero .film { aspect-ratio: 16 / 9; background-size: contain; }
  .hero .film video { object-fit: contain; }
  .hero .caption { margin-top: 8px; }
  .hero .film-note { font-size: 13px; }
}

@media (max-width: 480px) {
  :root { --site-header-height: 64px; }
  .wrap { width: calc(100% - 40px); }
  .site-header nav { gap: 16px; }
  .film-note { flex-wrap: wrap; gap: 4px 12px; }
  .category-list { grid-template-columns: 1fr; }
  .category-list a { grid-template-columns: 80px minmax(0, 1fr) auto; gap: 12px; min-height: 80px; }
  .footer-copy { flex-basis: 100%; }
  .footer-contact { margin-inline-start: -8px; }
  .about { grid-template-columns: 1fr; gap: 16px; }
  .work-grid { grid-template-columns: 1fr; gap: 24px 12px; }
  .work-grid--shorts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work-grid--shorts .work-title { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
