/* Cresvo Games site.
   The match ticket: white ticket paper on a navy night, field cells for facts,
   perforated tear lines, one coral shot trace per page.
   Type follows the brand: Fredoka (the logo's family) for headings, Nunito (the game's body face) for text.
   Fonts and media are self-hosted: the site loads nothing from other hosts. */

@font-face {
  font-family: "Fredoka";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/fredoka-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fredoka";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/fredoka-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/nunito-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/nunito-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/nunito-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/nunito-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("fonts/nunito-latin-800-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("fonts/nunito-latin-ext-800-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Brand (marka/KULLANIM.md) */
  --navy: #13224A;
  --coral: #FF5A4E;
  --coral-text: #D93A30;   /* small coral type on white */
  --paper: #FFFFFF;

  /* Derived from navy, never grey */
  --ink: #13224A;
  --ink-soft: #46526E;     /* 7.6:1 on paper */
  --night-soft: #C3CCE2;   /* secondary text on navy, 10:1 */
  --rule: #CCD3E3;         /* cell rules and perforations on paper */
  --night-rule: #2E3F6E;   /* rules on navy */

  --display: "Fredoka", "Nunito", "Segoe UI", sans-serif;
  --body: "Nunito", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --link: #2B4A9E;         /* links on paper: navy family, 8.4:1 */
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);

  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --radius: 14px;
  --notch: 1.1rem;
  --measure: 58ch;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  background: var(--navy);
  color-scheme: dark;
  scrollbar-color: var(--night-rule) var(--navy);
}

body {
  margin: 0;
  background: var(--navy);
  color: var(--paper);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--coral); color: var(--navy); }

img, svg, video { max-width: 100%; display: block; }

/* Links: no underlines. They read by weight (800 against 400 text) and, on
   paper, by colour; hover shifts colour and slides any arrow a few pixels. */
a {
  color: inherit;
  font-weight: 800;
  text-decoration: none;
  transition: color 180ms var(--ease-out);
}
.ticket a, .sheet a { color: var(--link); }
.ticket a:not(.action):hover, .sheet a:hover { color: var(--ink); }
.band a:hover:not(.action), .bar a:hover, .foot a:hover { color: var(--coral); }
a svg { transition: transform 180ms var(--ease-out); }
a:hover svg { transform: translateX(3px); }
@media (prefers-reduced-motion: reduce) {
  a, a svg, .action { transition: none; }
  a:hover svg { transform: none; }
}

:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 3px;
  border-radius: 3px;
}

h1, h2, h3 { text-wrap: balance; }
p, li { text-wrap: pretty; }

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--coral);
  color: var(--navy);
  font-weight: 600;
  padding: 0.6rem 1rem;
  z-index: 10;
}
.skip:focus { left: 1rem; top: 1rem; }

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

/* ---------- top bar ---------- */

.bar-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 1rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  flex-wrap: wrap;
}
.wordmark {
  display: inline-flex;
  padding: 0.3rem 0;
  line-height: 0;
  text-decoration: none;
}
.wordmark img { width: auto; height: 1.75rem; }
.bar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.1875rem;
}
.bar nav a {
  display: inline-block;
  padding: 0.6rem 0;
  font-weight: 600;
  color: var(--night-soft);
}
.bar nav a[aria-current="page"] { color: var(--paper); }

/* ---------- the ticket ---------- */

.ticket {
  position: relative;
  display: grid;
  background: var(--paper);
  color: var(--ink);
  border-radius: var(--radius);
}
.ticket-body {
  padding: clamp(1.5rem, 4vw, 3rem);
  min-width: 0;
}
.ticket-stub {
  position: relative;
  padding: clamp(1.25rem, 3vw, 2rem);
  border-top: 4px dotted var(--rule);
  min-width: 0;
}
/* notches where the tear line meets the edge: navy showing through */
.ticket-stub::before,
.ticket-stub::after {
  content: "";
  position: absolute;
  width: calc(var(--notch) * 2);
  height: calc(var(--notch) * 2);
  border-radius: 50%;
  background: var(--navy);
  top: calc(var(--notch) * -1 - 2px);
}
.ticket-stub::before { left: calc(var(--notch) * -1); }
.ticket-stub::after { right: calc(var(--notch) * -1); }

@media (min-width: 56rem) {
  .ticket { grid-template-columns: minmax(0, 1fr) auto; }
  .ticket-stub {
    border-top: 0;
    border-left: 4px dotted var(--rule);
  }
  .ticket-stub::before,
  .ticket-stub::after {
    top: auto;
    left: calc(var(--notch) * -1 - 2px);
    right: auto;
  }
  .ticket-stub::before { top: calc(var(--notch) * -1); }
  .ticket-stub::after { bottom: calc(var(--notch) * -1); }
}

/* field cells: label over value, ruled like a printed ticket */
.fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7.25rem, 1fr));
  margin: 0;
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}
.fields > div {
  padding: 0.6rem 0.85rem 0.7rem;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.fields dt {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.fields dd {
  margin: 0.1rem 0 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.15;
}
.fields dd.live { color: var(--coral-text); }

/* ---------- actions ---------- */

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  margin-top: 1.75rem;
}
.action {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 3rem;
  padding: 0.65rem 1.4rem;
  background: var(--coral);
  color: var(--navy);
  border-radius: 6px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.25rem;
  text-decoration: none;
  transition: background-color 160ms ease-out, color 160ms ease-out;
}
.ticket .action, .action { color: var(--navy); }
.ticket .action:hover, .action:hover { background: var(--navy); color: var(--paper); }
.action svg { width: 1.1em; height: 1.1em; }

/* ---------- home: first viewport ---------- */

.opening {
  padding-block: clamp(0.5rem, 2vw, 1.5rem) clamp(3rem, 7vw, 5rem);
}
.opening .ticket-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  position: relative;
}
.opening h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(3rem, 6.2vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.015em;
  margin: 0 0 1.25rem;
  max-width: 10ch;
}
.opening .lede {
  font-size: clamp(1.1875rem, 1.8vw, 1.25rem);
  line-height: 1.5;
  max-width: 31ch;
  margin: 0;
}
.opening .lede strong { font-weight: 800; }

/* the shot: a dotted coral arc from the action into the stub */
.shot-arc {
  display: none;
  position: absolute;
  z-index: 2;
  pointer-events: none;
  overflow: visible;
}
/* phones: a short shot from the action across the tear line into the footage */
@media (max-width: 55.99rem) {
  .shot-arc.narrow {
    display: block;
    right: 1.5rem;
    bottom: -3.25rem;
    width: 34%;
    height: 6rem;
  }
}
.shot-arc .trace {
  fill: none;
  stroke: var(--coral);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 0.1 13;
}
.shot-arc .reveal {
  fill: none;
  stroke: #fff;
  stroke-width: 18;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}
@media (min-width: 56rem) {
  .shot-arc.wide {
    display: block;
    left: 54%;
    right: -3rem;
    top: 1.25rem;
    height: 8.5rem;
    width: auto;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .shot-arc .reveal { animation: draw 1.4s 0.4s cubic-bezier(0.22, 0.61, 0.36, 1) both; }
}
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

/* the stub carries the footage */
.footage {
  margin: 0;
  display: grid;
  gap: 0.75rem;
  justify-items: center;
}
.footage-frame {
  position: relative;
  width: min(100%, 17rem);
  aspect-ratio: 720 / 1482;
  border-radius: 10px;
  overflow: hidden;
  background: var(--navy);
}
.footage-frame video,
.footage-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@media (min-width: 56rem) {
  .opening .footage-frame { width: auto; height: min(36rem, 68vh); }
}
.footage figcaption {
  font-size: 0.875rem;
  color: var(--ink-soft);
  text-align: center;
  max-width: 24ch;
}
.play-toggle {
  position: absolute;
  right: 0.6rem;
  bottom: 0.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: 50%;
  background: var(--navy);
  color: var(--paper);
  cursor: pointer;
}
.play-toggle svg { width: 1.1rem; height: 1.1rem; }
.play-toggle:hover { background: var(--coral); color: var(--navy); }

.availability {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  border-top: 1px solid var(--rule);
}
.availability li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.5rem 0.1rem;
  border-bottom: 1px solid var(--rule);
}
.availability .where {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.availability .state {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.1;
  text-align: right;
}

/* ---------- sections on the night ground ---------- */

.band { padding-block: clamp(3rem, 8vw, 6rem); }
.band + .band { border-top: 1px solid var(--night-rule); }
.band h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.25rem, 4.6vw, 3.25rem);
  line-height: 1.02;
  margin: 0 0 clamp(1.5rem, 3vw, 2.25rem);
}
.band .intro {
  color: var(--night-soft);
  font-size: 1.1875rem;
  max-width: 46ch;
  margin: 0 0 2.5rem;
}

/* a strip of real frames */
.frames {
  list-style: none;
  margin: 0;
  padding: 0 0 1rem;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(11rem, 1fr);
  gap: clamp(0.75rem, 2vw, 1.5rem);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
}
.frames li { scroll-snap-align: start; }
.frames figure { margin: 0; }
.frames img {
  width: 100%;
  height: auto;
  aspect-ratio: 720 / 1482;
  object-fit: cover;
  border-radius: 10px;
  background: var(--night-rule);
}
.frames figcaption {
  margin-top: 0.7rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.3;
}
@media (max-width: 40rem) {
  .frames { grid-auto-columns: 62%; }
}

/* studio statement */
.studio {
  display: grid;
  gap: 1.5rem 3rem;
}
@media (min-width: 52rem) {
  .studio { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: center; }
}
.studio p {
  margin: 0;
  font-size: clamp(1.1875rem, 2vw, 1.25rem);
  line-height: 1.5;
  max-width: 40ch;
}

/* ---------- game page ---------- */

.game-head .ticket-body { display: grid; gap: 1.5rem; align-content: start; position: relative; }
.game-logo { width: min(100%, 24rem); height: auto; margin: -0.5rem 0 0 -0.5rem; }
.game-title { margin: 0; max-width: none; }
.game-head .lede { margin: 0; max-width: 52ch; font-size: 1.1875rem; }
.game-head .ticket-stub {
  display: grid;
  gap: 1.25rem;
  align-content: start;
  justify-items: center;
}
@media (min-width: 56rem) {
  .game-head .shot-arc.wide { left: 58%; top: 2rem; height: 7rem; }
}
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: clamp(2.5rem, 6vw, 4rem);
}
.step {
  display: grid;
  grid-template-columns: minmax(7rem, 11rem) minmax(0, 1fr);
  gap: 1rem 1.5rem;
  align-items: start;
}
.step > div { padding-top: 0.5rem; }
.step img {
  width: 100%;
  height: auto;
  aspect-ratio: 720 / 1482;
  object-fit: cover;
  border-radius: 10px;
  background: var(--night-rule);
}
.step h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.25rem, 3vw, 2.25rem);
  line-height: 1;
  margin: 0 0 0.75rem;
}
.step p { margin: 0; max-width: 36ch; color: var(--night-soft); font-size: 1.0625rem; }
.step p + p { margin-top: 0.75rem; }
@media (min-width: 60rem) {
  .steps { grid-template-columns: 1fr 1fr; column-gap: 3.5rem; }
}

/* ---------- reading pages: a sheet of paper on the night ---------- */

.sheet {
  max-width: calc(var(--measure) + 2 * clamp(1.25rem, 5vw, 3.5rem));
  margin: clamp(0.5rem, 2vw, 1.5rem) auto clamp(3rem, 7vw, 5rem);
  padding: clamp(1.75rem, 5vw, 3.5rem) clamp(1.25rem, 5vw, 3.5rem) clamp(2rem, 5vw, 3.5rem);
  background: var(--paper);
  color: var(--ink);
  border-radius: var(--radius);
}
.sheet-wide { max-width: var(--wrap); }
.page-gutter { padding-inline: clamp(0.5rem, 2vw, var(--gutter)); }

.sheet h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.25rem, 7vw, 3.25rem);
  line-height: 0.92;
  margin: 0 0 0.75rem;
}
.sheet .updated {
  color: var(--ink-soft);
  margin: 0 0 2rem;
}
.sheet h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.875rem;
  line-height: 1.05;
  margin: 2.75rem 0 0.75rem;
}
.sheet h3 {
  font-size: 1.1875rem;
  font-weight: 600;
  margin: 1.75rem 0 0.4rem;
}
.sheet p, .sheet ul { margin: 0 0 1rem; }
.sheet ul { padding-left: 1.2rem; }
.sheet li { margin-bottom: 0.4rem; }
.sheet li::marker { color: var(--coral-text); }

/* the short version: a stub torn off the top of the document */
.summary {
  margin: 0 0 2.25rem;
  padding: 1.1rem 0 1.25rem;
  border-top: 4px dotted var(--rule);
  border-bottom: 4px dotted var(--rule);
  font-size: 1.1875rem;
}
.summary p:last-child { margin-bottom: 0; }

.contact-line {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.25rem, 6vw, 2.25rem);
  line-height: 1.1;
  margin: 0.5rem 0 1.5rem;
  overflow-wrap: anywhere;
}

/* tables (licences) */
.table-scroll { overflow-x: auto; margin: 0 0 1.5rem; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
}
th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.6rem 0.75rem 0.6rem 0;
  border-bottom: 1px solid var(--rule);
}
th {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom: 2px solid var(--ink);
}
td:first-child { font-weight: 600; }

/* ---------- footer ---------- */

.foot {
  border-top: 1px solid var(--night-rule);
}
.foot-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 2.25rem var(--gutter) 2.75rem;
  display: grid;
  gap: 1.25rem;
}
.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.1875rem;
}
.foot nav a { display: inline-block; padding: 0.45rem 0; font-weight: 600; }
.foot .billing {
  margin: 0;
  max-width: 68ch;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--night-soft);
}
.foot .billing a { font-weight: 700; }

/* ---------- 404 ---------- */

.missed { text-align: left; }
.missed .fields { max-width: 28rem; margin: 1.5rem 0; }

/* ---------- small helpers ---------- */

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* studio: the official "cresvo. games" lockup stands in for the heading;
   padding keeps the clear space of one "c" height around it */
.studio-mark { margin: 0; padding: 1.25rem 0; line-height: 0; }
.studio-mark img { width: min(100%, 17rem); height: auto; }
