@import url("portal.css");
/* ============================================================
   UPPER INT GAMES · doc engine (A4 print-perfect)

   THESIS      A studio production sheet: briefs that read like the
               call sheet of a studio that takes artists seriously.
               Refuses both the corporate Word doc and gamer neon.
   OWN-WORLD   Uppercase identity on paper: cream pages framed by
               structural black covers, Anton monument numerals in
               fuchsia, orange spec values, one fuchsia-to-orange
               hairline per page, a printer's spine strip on the edge.
   STORY       An artist opens the PDF and within a minute knows the
               game, the scene, the deliverable, the specs and the
               money, and feels the studio is organized and exciting.
   FIRST PAGE  Black cover: lockup top-left, doc-type tag, huge Anton
               title, meta grid (artist/date/code), gradient rule.
   SIGNATURE   The spine strip + giant section numerals. On screen the
               only motion is the cover rule drawing itself in.
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

body {
  font-family: var(--body);
  font-weight: 400;
  font-size: var(--t-body);
  line-height: 1.6;
  color: var(--ink);
  background: var(--ink-2);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.05; }
img { max-width: 100%; display: block; }
.px { image-rendering: pixelated; }

/* ============ SHEET (one A4 page) ============ */
.sheet {
  position: relative;
  width: 210mm;
  height: 297mm;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  padding: var(--page-pad);
  padding-right: calc(var(--page-pad) + var(--spine-w));
  display: flex;
  flex-direction: column;
}
.sheet--dark { background: var(--ink); color: var(--cream); }

@media screen {
  body { padding: 36px 16px; }
  .sheet {
    margin: 0 auto 28px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  }
}

@page { size: A4; margin: 0; }
@media print {
  body { background: none; }
  .sheet { margin: 0; box-shadow: none; page-break-after: always; }
  .sheet:last-child { page-break-after: auto; }
}

/* ============ SPINE (printer's strip, every page) ============ */
.spine {
  position: absolute; top: 0; right: 0; bottom: 0; width: var(--spine-w);
  border-left: 0.35mm solid var(--line-soft);
  display: flex; flex-direction: column; align-items: center;
  justify-content: space-between;
  padding: var(--m4) 0;
  font-size: var(--t-micro);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.sheet--dark .spine { border-left-color: var(--cream-line); color: var(--cream-dim); }
.spine__code, .spine__studio { writing-mode: vertical-rl; }
.spine__tick { width: 2.6mm; height: 2.6mm; background: var(--grad); }

/* ============ SECTION HEAD ============ */
.sheet__head {
  display: flex; align-items: flex-end; gap: var(--m3);
  padding-bottom: var(--m3);
  margin-bottom: var(--m4);
  border-bottom: 0.35mm solid var(--line);
}
.sheet--dark .sheet__head { border-bottom-color: var(--cream-line); }
.sheet__num {
  font-family: var(--display);
  font-size: var(--t-numeral);
  line-height: 0.78;
  color: var(--fuchsia);
  letter-spacing: -0.01em;
}
.sheet__head-text { padding-bottom: 1.5mm; }
/* register slot at the far end of the head rule, never above the heading */
.sheet__kicker {
  margin-left: auto;
  align-self: flex-end;
  padding-bottom: 2.5mm;
  font-size: var(--t-label);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.sheet--dark .sheet__kicker { color: var(--cream-dim); }
.sheet__title { font-size: var(--t-h1); text-transform: uppercase; letter-spacing: 0.01em; }

.sheet__body { flex: 1 1 auto; min-height: 0; }

/* ============ FOOT ============ */
.sheet__foot {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-top: var(--m2);
  margin-top: var(--m3);
  border-top: 0.35mm solid var(--line-soft);
  font-size: var(--t-label);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.sheet--dark .sheet__foot { border-top-color: var(--cream-line); color: var(--cream-dim); }
.sheet__foot b { font-weight: 500; color: inherit; }
.sheet__page { color: var(--orange); font-variant-numeric: tabular-nums; }

/* ============ COVER ============ */
.cover { justify-content: space-between; }
.cover__top { display: flex; justify-content: space-between; align-items: flex-start; }
.cover__lockup { width: 40mm; }
.cover__tag {
  border: 0.4mm solid var(--cream-line);
  padding: 1.8mm 3.5mm;
  font-size: var(--t-label);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--cream);
}
.cover__mid { position: relative; z-index: 2; }
.cover__over {
  font-size: var(--t-lead);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: var(--m2);
}
.cover__title {
  font-size: var(--t-hero);
  text-transform: uppercase;
  color: var(--cream);
  max-width: 150mm;
}
.cover__title em { font-style: normal; color: var(--fuchsia); }
.cover__rule {
  height: 1.2mm; background: var(--grad);
  margin: var(--m4) 0 var(--m3);
  transform-origin: 0 50%;
}
@media screen { .cover__rule { animation: rule-in 0.8s var(--ease-out) both; } }
@keyframes rule-in { from { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) { .cover__rule { animation: none; } }
.cover__meta {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--m3);
  position: relative; z-index: 2;
}
.cover__meta div { border-top: 0.35mm solid var(--cream-line); padding-top: 2.5mm; }
.cover__meta dt {
  font-size: var(--t-label); letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--cream-dim); margin-bottom: 1mm;
}
.cover__meta dd { font-size: var(--t-body); font-weight: 500; color: var(--cream); }

/* ============ PROSE (context, direction) ============ */
.lead { font-size: var(--t-lead); line-height: 1.55; max-width: 150mm; margin-bottom: var(--m3); }
.prose p { max-width: 142mm; margin-bottom: var(--m2); color: var(--ink-soft); }
.prose strong, .terms strong { font-weight: 700; color: var(--ink); }
.sheet--dark .prose p { color: var(--cream); }

.fact-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--m3); margin: var(--m3) 0; }
.fact {
  border-top: 0.6mm solid var(--fuchsia);
  padding-top: 2mm;
}
.fact b { display: block; font-family: var(--display); font-size: var(--t-h3); letter-spacing: 0.02em; }
.fact span { font-size: var(--t-label); letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-faint); }

/* ============ SPEC CHIPS (key-value production cells) ============ */
.kv-row { display: flex; flex-wrap: wrap; gap: var(--m2); margin: var(--m3) 0; }
.kv {
  border: 0.4mm solid var(--line);
  border-radius: var(--radius);
  padding: 2mm 3.5mm;
  min-width: 30mm;
}
.kv dt { font-size: var(--t-label); letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-faint); }
.kv dd { font-weight: 700; font-size: var(--t-body); }
.kv dd em { font-style: normal; color: var(--fuchsia); }

/* ============ CARDS (characters, refs) ============ */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--m3); }
.cards--2 { grid-template-columns: repeat(2, 1fr); }
.card { border: 0.4mm solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card__img {
  background: var(--ink-2);
  display: flex; align-items: center; justify-content: center;
  min-height: 42mm; padding: var(--m2);
}
.card__img img { max-height: 52mm; }
.card__body { padding: var(--m2) var(--m2) var(--m3); }
.card__name { font-family: var(--display); font-size: var(--t-h3); text-transform: uppercase; }
.card__role { font-size: var(--t-label); letter-spacing: 0.22em; text-transform: uppercase; color: var(--fuchsia); margin-bottom: 1.5mm; }
.card__notes { list-style: none; }
.card__notes li { padding-left: 4mm; position: relative; font-size: 8.5pt; line-height: 1.5; color: var(--ink-soft); }
.card__notes li::before { content: ""; position: absolute; left: 0; top: 0.45em; width: 1.8mm; height: 1.8mm; background: var(--orange); }

/* placeholder slot for art that does not exist yet */
.card__img--empty {
  background: repeating-linear-gradient(-45deg, var(--paper-deep) 0 4mm, var(--paper) 4mm 8mm);
  color: var(--ink-faint);
  font-size: var(--t-label); letter-spacing: 0.24em; text-transform: uppercase;
  text-align: center;
}

/* ============ MOOD / REFERENCE GRID ============ */
.mood { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--m2); }
.mood figure { border: 0.4mm solid var(--line); border-radius: var(--radius); overflow: hidden; }
.mood figure.is-not { border-color: var(--fuchsia); }
.mood img { width: 100%; height: 40mm; object-fit: cover; }
.mood figcaption {
  padding: 1.5mm 2.5mm; font-size: 8pt; color: var(--ink-soft);
  border-top: 0.35mm solid var(--line-soft);
}
.mood .is-not figcaption::before {
  content: "NÃO É ISTO · "; color: var(--fuchsia); font-weight: 700; letter-spacing: 0.08em;
}
[data-lang="en"] .mood .is-not figcaption::before { content: "NOT THIS · "; }

/* ============ DO / DON'T ============ */
.dodont { display: grid; grid-template-columns: 1fr 1fr; gap: var(--m3); }
.dodont__col h3 {
  font-size: var(--t-h3); text-transform: uppercase; margin-bottom: var(--m2);
  padding-bottom: 1.5mm; border-bottom: 0.6mm solid var(--orange);
}
.dodont__col--dont h3 { border-bottom-color: var(--fuchsia); }
.dodont li { list-style: none; padding-left: 5mm; position: relative; margin-bottom: 1.5mm; color: var(--ink-soft); }
.dodont__col--do li::before { content: "✓"; position: absolute; left: 0; color: var(--orange); font-weight: 700; }
.dodont__col--dont li::before { content: "✕"; position: absolute; left: 0; color: var(--fuchsia); font-weight: 700; }

/* ============ STYLIZATION SCALE (1 = photoreal, 10 = abstract) ============ */
.scale { margin: var(--m3) 0; }
.scale__cells { display: grid; grid-template-columns: repeat(10, 1fr); gap: 1mm; }
.scale__cells span {
  height: 4.5mm; border: 0.35mm solid var(--line); border-radius: 0.6mm;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--t-micro); color: var(--ink-faint);
}
.scale__cells span.is-target { background: var(--grad); border-color: transparent; color: var(--paper); font-weight: 700; }
.scale__ends {
  display: flex; justify-content: space-between; margin-top: 1mm;
  font-size: var(--t-label); letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-faint);
}

/* ============ SAFE-AREA RULER (16:9 overlay guide) ============
   Band geometry is parameterized; defaults are the GAME SAFE-AREA LAW
   (GAME-SAFEAREA-LAW.md): fleet envelope 19.5:9-20:9, worst crop 20:9
   (10% top+bottom), worst sides iPhone Dynamic Island (62pt/956pt),
   bottom adds home/gesture bar. Safe rect = center 86% x 72%. */
.safearea { margin-top: var(--m3); --sa-top: 13%; --sa-bottom: 15%; --sa-side: 7%; }
.safearea__frame {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  border: 0.5mm solid var(--ink); background: var(--ink-2); overflow: hidden;
}
.safearea__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.5; }
.safearea__strip {
  position: absolute;
  background: repeating-linear-gradient(45deg, rgba(216, 0, 76, 0.5) 0 1.2mm, rgba(216, 0, 76, 0.12) 1.2mm 3mm);
  display: flex; align-items: center; justify-content: center;
}
.safearea__strip--top { left: 0; right: 0; top: 0; height: var(--sa-top); }
.safearea__strip--bottom { left: 0; right: 0; bottom: 0; height: var(--sa-bottom); }
.safearea__strip--left { top: var(--sa-top); bottom: var(--sa-bottom); left: 0; width: var(--sa-side); }
.safearea__strip--right { top: var(--sa-top); bottom: var(--sa-bottom); right: 0; width: var(--sa-side); }
/* dashed line inside a band marking where the 20:9 cover crop actually cuts the art */
.safearea__cropline { position: absolute; left: 0; right: 0; border-top: 0.4mm dashed var(--cream-dim); }
.safearea__cropline--top { top: 10%; }
.safearea__cropline--bottom { bottom: 10%; border-top: 0; border-bottom: 0.4mm dashed var(--cream-dim); }
.safearea__strip span {
  font-size: var(--t-micro); letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--cream); background: rgba(8, 7, 8, 0.72); padding: 0.8mm 2mm; white-space: nowrap;
}
.safearea__strip--left, .safearea__strip--right { align-items: flex-start; padding-top: 4mm; }
.safearea__strip--left span, .safearea__strip--right span { writing-mode: vertical-rl; padding: 2mm 0.8mm; }
.safearea__core {
  position: absolute; inset: var(--sa-top) var(--sa-side) var(--sa-bottom) var(--sa-side);
  border: 0.6mm dashed var(--orange);
  display: flex; align-items: center; justify-content: center;
}
.safearea__core span {
  font-size: var(--t-label); letter-spacing: 0.28em; text-transform: uppercase; text-align: center;
  color: var(--cream); background: rgba(8, 7, 8, 0.62); padding: 1.5mm 3mm; line-height: 1.7;
}
.safearea__island {
  position: absolute; left: 2.4%; top: 50%; transform: translateY(-50%);
  width: 2%; height: 15%; border-radius: 99mm;
  background: var(--ink); border: 0.3mm solid var(--cream-dim);
}
.safearea__home {
  position: absolute; bottom: 2.6%; left: 50%; transform: translateX(-50%);
  width: 24%; height: 1.8%; border-radius: 99mm; background: var(--cream); opacity: 0.9;
}
.safearea__legend { list-style: none; margin-top: var(--m3); display: grid; grid-template-columns: 1fr 1fr; gap: 1.5mm var(--m4); }
.safearea__legend li { position: relative; padding-left: 6mm; font-size: 9pt; color: var(--ink-soft); }
.safearea__legend .sw { position: absolute; left: 0; top: 0.35em; width: 3.4mm; height: 3.4mm; }
.safearea__legend .sw--avoid { background: repeating-linear-gradient(45deg, rgba(216, 0, 76, 0.55) 0 0.8mm, rgba(216, 0, 76, 0.15) 0.8mm 1.8mm); }
.safearea__legend .sw--core { border: 0.5mm dashed var(--orange); }
.safearea__legend .sw--ui { background: var(--cream); border: 0.3mm solid var(--line); }

/* ============ SPEC TABLE ============ */
.spec-table { width: 100%; border-collapse: collapse; font-size: 9pt; }
.spec-table th {
  text-align: left; font-size: var(--t-label); letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-faint); font-weight: 500;
  padding: 1.5mm 2.5mm; border-bottom: 0.6mm solid var(--ink);
}
.spec-table td { padding: 2mm 2.5mm; border-bottom: 0.35mm solid var(--line-soft); vertical-align: top; }
.spec-table td:first-child { font-weight: 700; }
.spec-table .val { color: var(--fuchsia); font-weight: 700; }

/* ============ TIMELINE / MILESTONES ============ */
.milestones { list-style: none; counter-reset: ms; }
.milestones li {
  counter-increment: ms;
  display: grid; grid-template-columns: 16mm 1fr auto; gap: var(--m3);
  align-items: baseline;
  padding: var(--m2) 0;
  border-bottom: 0.35mm solid var(--line-soft);
}
.milestones li::before {
  content: counter(ms, decimal-leading-zero);
  font-family: var(--display); font-size: var(--t-h2); color: var(--fuchsia);
}
.milestones b { display: block; font-size: var(--t-body); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.milestones p { font-size: 9pt; color: var(--ink-soft); max-width: 120mm; }
.milestones .ms-gate {
  font-size: var(--t-label); letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--orange); white-space: nowrap;
}

/* compact variant for six-step trails (courses, trails): tighter rows, smaller body */
.milestones--compact li { padding: 2.2mm 0; }
.milestones--compact p { font-size: 8.5pt; line-height: 1.4; }

/* ============ TERMS (payment and rights) ============ */
.terms { display: grid; grid-template-columns: 1fr 1fr; gap: var(--m4); }
.terms h3 {
  font-size: var(--t-h3); text-transform: uppercase; margin-bottom: var(--m2);
  padding-bottom: 1.5mm; border-bottom: 0.6mm solid var(--ink);
}
.terms p, .terms li { font-size: 9.5pt; color: var(--ink-soft); margin-bottom: 1.5mm; }
.terms ul { list-style: none; }
.terms li { padding-left: 4mm; position: relative; }
.terms li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 1.8mm; height: 1.8mm; background: var(--grad); }

/* ============ CHECKLIST (what we need from you) ============ */
.check { list-style: none; columns: 2; column-gap: var(--m4); }
.check li {
  break-inside: avoid;
  padding: 2mm 0 2mm 7mm; position: relative;
  border-bottom: 0.35mm solid var(--line-soft);
  color: var(--ink-soft); font-size: 9.5pt;
}
.check li::before {
  content: ""; position: absolute; left: 0; top: 2.8mm;
  width: 3.2mm; height: 3.2mm; border: 0.5mm solid var(--ink); border-radius: 0.6mm;
}

/* ============ BACK COVER ============ */
.back { justify-content: space-between; }
.back__contact dt { font-size: var(--t-label); letter-spacing: 0.26em; text-transform: uppercase; color: var(--cream-dim); }
.back__contact dd { font-size: var(--t-h3); font-family: var(--display); color: var(--cream); margin-bottom: var(--m3); }
.back__note { font-size: 9.5pt; color: var(--cream-dim); max-width: 120mm; }

/* ============ RULES (numbered law blocks, handbooks) ============
   A grid of short, numbered rules: Anton numeral in fuchsia, an uppercase
   title, one or two lines of body. --patterns prefixes the numeral with P
   (a named failure pattern instead of a rule). */
.rules { list-style: none; counter-reset: rule; display: grid; grid-template-columns: 1fr 1fr; gap: var(--m2) var(--m3); }
.rules--1col { grid-template-columns: 1fr; }
.rules li {
  counter-increment: rule;
  position: relative; padding: 2.5mm 3mm 2.5mm 14mm;
  border: 0.4mm solid var(--line); border-radius: var(--radius);
  break-inside: avoid;
}
.rules li::before {
  content: counter(rule, decimal-leading-zero);
  position: absolute; left: 3mm; top: 2.2mm;
  font-family: var(--display); font-size: var(--t-h2); line-height: 1; color: var(--fuchsia);
}
.rules--patterns li::before { content: "P" counter(rule); }
.rules b { display: block; font-size: var(--t-body); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.8mm; }
.rules p { font-size: 8.8pt; line-height: 1.45; color: var(--ink-soft); }
.rules p em { font-style: normal; color: var(--orange); font-weight: 700; }

/* dense variant of the spec table for catalogues and long ledgers */
.spec-table--dense { font-size: 7.8pt; }
.spec-table--dense th { padding: 1mm 1.8mm; }
.spec-table--dense td { padding: 1.1mm 1.8mm; line-height: 1.35; }

/* four-cell fact strip (numbers pages) */
.fact-row--4 { grid-template-columns: repeat(4, 1fr); }

/* ============ UTIL ============ */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: var(--m4); }
.mt { margin-top: var(--m3); }
.note {
  border: 0.4mm solid var(--line);
  border-radius: var(--radius);
  padding: var(--m2) var(--m3); font-size: 9pt; color: var(--ink-soft);
  margin-top: var(--m3);
}
