/* Dusk Tales / Miasto zasypia. Colours and type come from the app's design
   system (lib/core/design/tokens): night mood for the landing, dawn mood for
   paper sections and the policy. Fonts: Fraunces + Alegreya Sans (SIL OFL 1.1),
   self-hosted, subset to Latin + Polish. */

@font-face { font-family: "Fraunces"; src: url("/fonts/fraunces-900.woff2") format("woff2"); font-weight: 900; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("/fonts/fraunces-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url("/fonts/alegreya-sans-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url("/fonts/alegreya-sans-400i.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url("/fonts/alegreya-sans-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --ink-900: #0E1122; --ink-800: #12162A; --ink-700: #1C2238; --ink-600: #263050; --ink-500: #39436A;
  --paper-50: #FFF8EA; --paper-100: #F7EEDB; --paper-200: #F0E4CA; --paper-300: #E2D3B2; --paper-400: #B9AE96;
  --vermilion-300: #E8664A; --vermilion-500: #D2462A; --vermilion-700: #A9361D;
  --ochre-300: #EDC067; --ochre-500: #DDA032; --ochre-800: #8A6A1E;
  --teal-300: #7FA79C; --teal-500: #3E6E68; --slate-600: #5B5A66;

  --bg: var(--ink-800); --fg: var(--paper-200); --muted: var(--paper-400);
  --accent: var(--ochre-500); --on-accent: var(--ink-700); --line: rgba(240, 228, 202, .32);
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --text: "Alegreya Sans", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --gutter: 16px; --max: 1120px; --radius: 14px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 400 1.125rem/1.5 var(--text);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--ochre-300); text-underline-offset: .18em; }
a:hover { color: var(--paper-50); }
:focus-visible { outline: 3px solid var(--ochre-300); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -.01em; }
h2 { font-weight: 900; font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem); line-height: 1.08; }
h3 { font-weight: 600; font-size: 1.35rem; line-height: 1.25; }
p { margin: 0; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--paper-200); color: var(--ink-800); padding: 8px 12px; }

/* ---------- top bar ---------- */
.topbar { position: absolute; inset: 0 0 auto; z-index: 3; background: linear-gradient(rgba(14, 17, 34, .88), rgba(14, 17, 34, .55) 60%, transparent); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; padding-bottom: 14px; }
.mark { display: inline-flex; align-items: center; gap: 10px; color: var(--paper-200); text-decoration: none; font: 900 1.15rem/1 var(--display); }
.mark img { width: 36px; height: 36px; border-radius: 10px; }
.lang { display: flex; gap: 4px; font: 700 .9rem/1 var(--text); letter-spacing: .08em; }
.lang a { color: var(--paper-400); text-decoration: none; padding: 8px 10px; border-radius: 999px; }
.lang a[aria-current="page"] { color: var(--ink-700); background: var(--paper-200); }
.lang a:hover { color: var(--paper-50); }
.lang a[aria-current="page"]:hover { color: var(--ink-700); }

/* ---------- hero ---------- */
.hero {
  --art: min(100vw, 640px);
  position: relative; isolation: isolate; text-align: center;
  padding-bottom: clamp(48px, 8vw, 88px);
  background:
    radial-gradient(ellipse 70% 45% at 50% 18%, rgba(237, 192, 103, .10), transparent 70%),
    linear-gradient(var(--ink-900), var(--ink-800) 60%);
}
.sky { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.sky::before, .sky::after {
  content: ""; position: absolute; inset: 0; background-repeat: repeat;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cg stroke='%23F0E4CA' stroke-linecap='round' stroke-opacity='.18' stroke-width='1.2'%3E%3Cpath d='M20 40l14-6M150 22l10-4M90 120l16-7M200 160l12-5M40 200l10-4M170 92l8-3M120 210l14-6'/%3E%3C/g%3E%3Cg fill='%23F0E4CA' fill-opacity='.75'%3E%3Cpath d='M64 70l1.5 4 4 1.5-4 1.5-1.5 4-1.5-4-4-1.5 4-1.5z'/%3E%3Cpath d='M214 30l1 3 3 1-3 1-1 3-1-3-3-1 3-1z'/%3E%3Ccircle cx='132' cy='170' r='1'/%3E%3Ccircle cx='24' cy='130' r='1'/%3E%3C/g%3E%3C/svg%3E");
}
.sky::after { background-size: 380px; background-position: 120px 60px; opacity: .6; }
.hero-art {
  width: var(--art); margin: 0 auto; aspect-ratio: 2 / 3;
  -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent 96%), linear-gradient(to right, transparent, #000 14%, #000 86%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, #000 60%, transparent 96%), linear-gradient(to right, transparent, #000 14%, #000 86%, transparent);
  mask-composite: intersect;
}
.hero-art { position: relative; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; }
.hero-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 42%, rgba(14, 17, 34, .72) 66%, rgba(18, 22, 42, .96) 84%); }
.hero-copy { position: relative; z-index: 1; margin-top: calc(var(--art) * -0.5); padding: 0 var(--gutter); }
.hero-copy::before {
  content: ""; position: absolute; z-index: -1; left: 50%; top: -12%; width: min(100vw, 760px); height: 124%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 50%, rgba(14, 17, 34, .86) 30%, rgba(14, 17, 34, 0) 70%);
}
.hero h1 {
  font-weight: 900; font-size: clamp(3.4rem, 2rem + 7vw, 6.2rem); line-height: .95; letter-spacing: -.02em;
  color: var(--paper-200); text-shadow: 0 4px 0 var(--ink-900), 0 0 28px rgba(14, 17, 34, .9);
}
.tagline {
  margin-top: 14px; font: 900 clamp(1.45rem, 1.1rem + 1.6vw, 2.1rem)/1.15 var(--display);
  color: var(--paper-200); text-shadow: 0 3px 0 var(--ink-900), 0 0 22px rgba(14, 17, 34, .9);
}
.tagline em { font-style: normal; color: var(--ochre-500); display: block; }
.promise { margin: 18px auto 0; max-width: 34ch; font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem); color: var(--paper-100); }
.stores { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 26px; }
.store {
  display: inline-flex; align-items: center; gap: 12px; min-width: 214px; min-height: 56px; padding: 10px 22px 10px 18px;
  border-radius: 12px; background: var(--ochre-500); color: var(--ink-700); text-decoration: none; text-align: left;
  box-shadow: 0 3px 0 var(--ochre-800); transition: background-color .15s ease, transform .15s ease;
}
.store:hover { background: var(--ochre-300); color: var(--ink-700); }
.store:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ochre-800); }
.store svg { width: 24px; height: 24px; flex: none; fill: currentColor; }
.store span { display: flex; flex-direction: column; font: 700 1.15rem/1.1 var(--text); }
.store small { font: 500 .78rem/1.1 var(--text); letter-spacing: .04em; }
.pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 26px auto 0; padding: 0; max-width: 640px; list-style: none; }
.pills li { padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; font: 700 .92rem/1.2 var(--text); letter-spacing: .03em; color: var(--paper-200); background: rgba(28, 34, 56, .7); }

/* ---------- sections ---------- */
.section { padding: clamp(56px, 9vw, 112px) 0; }
.kicker { font: 700 .85rem/1.2 var(--text); letter-spacing: .16em; text-transform: uppercase; color: var(--ochre-500); margin-bottom: 10px; }
.lede { margin-top: 16px; max-width: 60ch; color: var(--paper-100); }
.ornament { display: flex; align-items: center; gap: 10px; width: 150px; margin: 18px 0 0; }
.ornament::before, .ornament::after { content: ""; flex: 1; height: 2px; background: currentColor; opacity: .7; }
.ornament i { width: 9px; height: 9px; background: var(--vermilion-500); transform: rotate(45deg); }
.center { text-align: center; }
.center .ornament, .center .lede { margin-left: auto; margin-right: auto; }

.split { display: grid; gap: 32px; align-items: center; }
.framed { border: 6px solid var(--paper-200); border-radius: var(--radius); box-shadow: 0 6px 0 var(--ink-900); overflow: hidden; background: var(--ink-700); }
.narrator .framed { max-width: 460px; margin: 0 auto; }
.narrator .framed img { aspect-ratio: 1; object-fit: cover; object-position: 50% 62%; }
.facts { margin: 22px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.facts li { position: relative; padding-left: 26px; color: var(--paper-100); }
.facts li::before { content: ""; position: absolute; left: 4px; top: .55em; width: 9px; height: 9px; background: var(--ochre-500); transform: rotate(45deg); }

/* dawn mood: paper background */
.dawn {
  --fg: var(--ink-700); --muted: var(--slate-600); --line: rgba(28, 34, 56, .38);
  background: var(--paper-200); color: var(--ink-700); color-scheme: light;
}
.dawn .kicker { color: var(--vermilion-700); }
.dawn .lede, .dawn p { color: var(--ink-700); }
.dawn a { color: var(--vermilion-700); }
.dawn a:hover { color: var(--ink-800); }
.dawn :focus-visible { outline-color: var(--ink-500); }

.steps { margin: 40px 0 0; padding: 0; list-style: none; display: grid; gap: 22px; counter-reset: step; }
.step { display: grid; grid-template-columns: 104px 1fr; gap: 16px; align-items: start; }
.step img { width: 104px; height: 104px; border-radius: 12px; border: 4px solid var(--ink-700); }
.step .n { display: inline-block; font: 900 .95rem/1 var(--display); color: var(--vermilion-700); margin-bottom: 4px; letter-spacing: .06em; }
.step h3 { margin-bottom: 6px; }
.step p { color: var(--slate-600); font-size: 1.05rem; }
.win { margin-top: 36px; padding: 18px 20px; border: 2px solid var(--ink-700); border-radius: var(--radius); background: var(--paper-100); max-width: 760px; }

.roles { margin: 40px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.role { background: var(--ink-700); border: 4px solid var(--paper-200); border-radius: var(--radius); overflow: hidden; box-shadow: 0 5px 0 var(--ink-900); }
.role img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.role div { padding: 12px 12px 14px; border-top: 3px solid var(--vermilion-500); }
.role h3 { font-weight: 900; font-size: 1.2rem; color: var(--paper-200); }
.role p { margin-top: 4px; font-size: .98rem; line-height: 1.35; color: var(--paper-400); }
.characters { margin-top: 36px; max-width: 68ch; color: var(--paper-100); }

.shots { margin: 40px calc(var(--gutter) * -1) 0; padding: 4px var(--gutter) 16px; list-style: none; display: grid; grid-auto-flow: column; grid-auto-columns: 68%; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.shots li { scroll-snap-align: center; }
.shots img { width: 100%; aspect-ratio: 1 / 2; border-radius: 18px; border: 4px solid var(--ink-700); box-shadow: 0 5px 0 rgba(28, 34, 56, .35); background: var(--ink-700); }

/* click-to-load video: nothing is fetched from YouTube before the click */
.video { position: relative; margin: 36px auto 0; aspect-ratio: 16 / 9; max-width: 900px; border-radius: var(--radius); overflow: hidden; border: 6px solid var(--paper-200); background: var(--ink-900); box-shadow: 0 6px 0 var(--ink-900); }
.video-link { position: absolute; inset: 0; display: grid; place-items: end; padding: clamp(14px, 3vw, 28px); cursor: pointer; }
.video-link img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video .play { position: relative; width: clamp(52px, 9vw, 84px); height: clamp(52px, 9vw, 84px); border-radius: 50%; background: var(--ochre-500); box-shadow: 0 4px 0 var(--ochre-800); display: grid; place-items: center; transition: transform .15s ease, background-color .15s ease; }
.video .play svg { width: 34px; height: 34px; margin-left: 5px; fill: var(--ink-700); }
.video-link:hover .play { background: var(--ochre-300); transform: scale(1.06); }
.video-link:focus-visible { outline: 4px solid var(--ochre-300); outline-offset: -8px; border-radius: 8px; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-note { margin-top: 12px; font-size: .95rem; color: var(--muted); }

.finale { text-align: center; }
.finale img.emblem { width: 96px; height: 96px; margin: 0 auto 22px; border-radius: 24px; box-shadow: 0 5px 0 var(--ink-900); }
.finale h2 { max-width: 20ch; margin: 0 auto; }

.footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 1rem; }
.footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; justify-content: space-between; }
.footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer a { color: var(--paper-200); }

/* ---------- inner pages (policy, 404) ---------- */
.page-head { background: var(--ink-800); }
.page-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; padding-bottom: 14px; }
.page { padding: 40px 0 72px; }
.notice { max-width: 640px; margin: 0 auto; text-align: center; padding: 72px 0; }
.notice h1 { font-weight: 900; font-size: clamp(2.6rem, 2rem + 4vw, 4.4rem); line-height: 1; }
.notice p { margin-top: 18px; }
.notice .stores { margin-top: 28px; }

/* The policy text is copied word for word from remotion.pl/apps/dusktales/privacy;
   these rules restyle its original classes (.container, .last-updated, .box). */
.policy { max-width: 800px; margin: 0 auto; background: var(--paper-50); color: var(--ink-700); border-radius: 20px; padding: 28px 20px; line-height: 1.65; box-shadow: 0 6px 0 var(--ink-900); }
.policy header { margin-bottom: 32px; border-bottom: 1px solid var(--paper-300); padding-bottom: 22px; }
.policy h1 { font-weight: 900; font-size: clamp(2rem, 1.6rem + 2vw, 2.6rem); line-height: 1.1; color: var(--ink-700); margin-bottom: 8px; }
.policy h2 { font-weight: 600; font-size: 1.4rem; line-height: 1.25; margin: 34px 0 12px; color: var(--ink-700); }
.policy h3 { font-family: var(--text); font-weight: 700; font-size: 1.1rem; margin: 20px 0 8px; }
.policy p { margin-bottom: 16px; color: #3B3F4F; }
.policy strong { color: var(--ink-800); }
.policy ul { margin: 0 0 20px 22px; padding: 0; }
.policy li { margin-bottom: 8px; color: #3B3F4F; }
.policy a { color: var(--vermilion-700); }
.policy .last-updated { color: var(--slate-600); font-size: .95rem; }
.policy .box { background: var(--paper-200); border-radius: 14px; padding: 18px 20px; margin: 20px 0; border: 1px solid var(--paper-300); }
.policy table { width: 100%; border-collapse: collapse; margin: 8px 0 24px; font-size: .98rem; }
.policy th, .policy td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--paper-300); color: #3B3F4F; }
.policy th { color: var(--ink-800); background: var(--paper-200); }
.policy footer { margin-top: 44px; text-align: center; font-size: .9rem; color: var(--slate-600); }
@media (max-width: 640px) {
  .policy table, .policy thead, .policy tbody, .policy tr, .policy th, .policy td { display: block; }
  .policy thead { display: none; }
  .policy td { border: none; padding: 3px 0; }
  .policy tr { border-bottom: 1px solid var(--paper-300); padding: 10px 0; }
}

/* ---------- larger screens ---------- */
@media (min-width: 640px) {
  .roles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 32px; }
  .shots { grid-auto-columns: 40%; }
  .policy { padding: 48px 56px; }
}
@media (min-width: 960px) {
  .split { grid-template-columns: 1fr 1.1fr; gap: 64px; }
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .step { grid-template-columns: 1fr; }
  .step img { width: 100%; height: auto; aspect-ratio: 1; }
  .shots { margin: 40px 0 0; padding: 4px 0 0; grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; }
  .hero { --art: 600px; }
  .narrator .framed img { aspect-ratio: 2 / 3; }
}

@media (prefers-reduced-motion: no-preference) {
  .sky::after { animation: twinkle 7s ease-in-out infinite alternate; }
  @keyframes twinkle { from { opacity: .35; } to { opacity: .8; } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
