/* Tibblo pages: the game page, parents' guide, support and legal texts.
   Colours and type follow the game (scripts/ui/tokens.gd, Nunito). */

@font-face {
  font-family: "Nunito";
  src: url("/assets/fonts/nunito-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 1000; font-display: swap;
  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";
  src: url("/assets/fonts/nunito-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 200 1000; font-display: swap;
  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 {
  --cream: #FFF6EA;
  --cream-2: #FFEEDB;
  --paper: #FFFFFF;
  --ink: #2E2240;
  --ink-2: #6B5F80;
  --line: #EADCC9;
  --coral: #E8572E;
  --coral-dark: #C9441C;
  --teal: #11968C;
  --teal-dark: #0B6F68;
  --sun: #FFC23D;
  --night: #2E2240;
  --focus: #2F6BFF;
  --pad: 20px;
  --max: 1160px;
  color-scheme: light;
}
@media (min-width: 760px) { :root { --pad: 40px; } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }
body {
  margin: 0; background: var(--cream); color: var(--ink);
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 18px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--teal-dark); font-weight: 700; text-decoration-thickness: 2px; text-underline-offset: 0.2em; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

html[data-lang="en"] .l-tr,
html[data-lang="tr"] .l-en { display: none !important; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--pad); top: 12px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 20; border-radius: 8px; }

.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 18px; padding-bottom: 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 900; font-size: 22px; letter-spacing: -0.01em; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.top nav { display: flex; align-items: center; gap: 4px; }
.top nav a { color: var(--ink-2); font-weight: 700; font-size: 16px; text-decoration: none; padding: 8px 10px; border-radius: 10px; }
.top nav a:hover, .top nav a[aria-current="page"] { color: var(--ink); background: var(--cream-2); }
.lang { display: inline-flex; margin-left: 8px; border: 2px solid var(--line); border-radius: 10px; overflow: hidden; }
.lang button { font: inherit; font-size: 14px; font-weight: 800; border: 0; background: transparent; color: var(--ink-2); padding: 4px 10px; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--ink); color: #fff; }
@media (max-width: 720px) { .top nav .opt { display: none; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 800; font-size: 17px; text-decoration: none; cursor: pointer;
  padding: 13px 22px; border-radius: 14px; border: 0; line-height: 1.2;
  background: var(--coral); color: #fff; box-shadow: inset 0 -3px 0 var(--coral-dark);
}
.btn:hover { background: #EE6A43; }
.btn.line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.btn.line:hover { background: var(--cream-2); }
.btn.light { background: #fff; color: var(--ink); box-shadow: none; }

/* Hero */
.hero { display: grid; gap: 40px; align-items: center; padding-top: 40px; padding-bottom: 64px; }
@media (min-width: 960px) { .hero { grid-template-columns: 5fr 6fr; padding-top: 64px; padding-bottom: 96px; } }
.hero h1 { margin: 0 0 18px; font-size: clamp(40px, 6vw, 68px); line-height: 1.02; font-weight: 900; letter-spacing: -0.025em; }
.hero .lead { margin: 0; font-size: clamp(18px, 2vw, 21px); color: var(--ink-2); max-width: 34ch; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.availability { margin: 28px 0 0; padding-top: 18px; border-top: 2px dashed var(--line); font-size: 15px; color: var(--ink-2); max-width: 40ch; }
.availability strong { color: var(--ink); }

.troupe { position: relative; aspect-ratio: 3 / 2; background: #FFE6C7; border-radius: 32px; overflow: hidden; }
.troupe::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 30%; background: #F7D3A6; }
.troupe img { position: absolute; height: auto; }
.troupe .p-pipkin { left: 7%; bottom: 33%; width: 17%; }
.troupe .p-morra { left: 22%; bottom: 29%; width: 24%; }
.troupe .p-zuzu { right: 21%; bottom: 30%; width: 23%; }
.troupe .p-bolt { right: 7%; bottom: 33%; width: 16%; }
.troupe .p-tibblo { left: 50%; bottom: 8%; width: 42%; transform: translateX(-50%); z-index: 2; }

/* Sections */
.band { padding-top: 72px; padding-bottom: 72px; }
.band.paper { background: var(--paper); }
.band.night { background: var(--night); color: #F6EEFF; }
.sec-head { max-width: 640px; margin-bottom: 40px; }
.sec-head h2 { margin: 0 0 10px; font-size: clamp(30px, 4vw, 44px); line-height: 1.08; font-weight: 900; letter-spacing: -0.02em; }
.sec-head p { margin: 0; color: var(--ink-2); font-size: 19px; }
.night .sec-head p { color: #CFC3E3; }

/* Pets */
.pets { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 760px) { .pets { grid-template-columns: repeat(5, 1fr); gap: 18px; } }
.pet { margin: 0; }
.pet .tile { position: relative; aspect-ratio: 1; border-radius: 22px; background: var(--tint); }
.pet .tile img { position: absolute; inset: 13%; width: 74%; height: 74%; object-fit: contain; }
.pet figcaption { padding: 12px 4px 0; }
.pet b { display: block; font-size: 20px; font-weight: 900; }
.pet span { display: block; color: var(--ink-2); font-size: 15px; line-height: 1.4; }
.pet i { display: block; font-style: normal; font-size: 15px; margin-top: 6px; line-height: 1.4; }
.t-tibblo { --tint: #D8F1EC; } .t-pipkin { --tint: #E4F2D2; } .t-morra { --tint: #ECE2F9; } .t-zuzu { --tint: #FFF0C4; } .t-bolt { --tint: #DCEAFB; }

.growth { margin-top: 56px; display: grid; gap: 24px; align-items: end; grid-template-columns: repeat(4, 1fr); padding: 28px 20px 18px; background: var(--cream); border-radius: 22px; }
.growth figure { margin: 0; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 10px; }
.growth img { width: auto; }
.growth figcaption { font-weight: 800; font-size: 15px; color: var(--ink-2); }
.growth-note { margin: 14px 0 0; color: var(--ink-2); font-size: 16px; }

/* Feature rows */
.feature { display: grid; gap: 28px; align-items: center; padding: 28px 0; }
@media (min-width: 860px) {
  .feature { grid-template-columns: 1fr 1fr; gap: 72px; padding: 40px 0; }
  .feature.flip .shot { order: 2; }
}
.feature .shot { justify-self: center; width: min(320px, 78%); }
.feature .shot img { border-radius: 26px; box-shadow: 0 1px 0 var(--line), 0 18px 40px rgba(46, 34, 64, 0.14); }
.feature h3 { margin: 0 0 10px; font-size: clamp(26px, 3vw, 34px); font-weight: 900; letter-spacing: -0.015em; line-height: 1.12; }
.feature p { margin: 0 0 14px; color: var(--ink-2); max-width: 44ch; }
.ticks { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ticks li { font-size: 15px; font-weight: 800; padding: 5px 12px; border-radius: 10px; background: var(--cream-2); }

/* Parents band */
.facts { display: grid; grid-template-columns: 1fr; gap: 0 48px; margin: 0; }
@media (min-width: 760px) { .facts { grid-template-columns: 1fr 1fr; } }
.facts div { display: grid; grid-template-columns: 9.5em 1fr; gap: 16px; padding: 16px 0; border-top: 1px solid rgba(246, 238, 255, 0.16); }
.facts dt { font-weight: 800; }
.facts dd { margin: 0; color: #CFC3E3; }
.night .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.night .btn.line { color: #fff; box-shadow: inset 0 0 0 2px rgba(246, 238, 255, 0.3); }
.night .btn.line:hover { background: rgba(255, 255, 255, 0.06); }

/* Long text: legal, support, parents' guide */
.doc-head { padding-top: 40px; padding-bottom: 32px; border-bottom: 2px solid var(--line); }
.doc-head h1 { margin: 0 0 10px; font-size: clamp(34px, 5vw, 52px); font-weight: 900; letter-spacing: -0.02em; line-height: 1.05; }
.doc-head p { margin: 0; color: var(--ink-2); max-width: 60ch; }
.doc-head .meta { margin-top: 14px; font-size: 15px; }
.doc { display: grid; gap: 40px; padding-top: 40px; padding-bottom: 80px; }
@media (min-width: 980px) { .doc { grid-template-columns: 250px minmax(0, 1fr); gap: 72px; } }
.toc { font-size: 15px; }
.toc nav { position: sticky; top: 24px; }
.toc b { display: block; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.toc a { display: block; padding: 5px 10px; margin-left: -10px; border-radius: 8px; color: var(--ink-2); font-weight: 700; text-decoration: none; }
.toc a:hover { background: var(--cream-2); color: var(--ink); }
@media (max-width: 979px) { .toc { display: none; } }
.text { max-width: 70ch; }
.text h2 { font-size: 24px; font-weight: 900; letter-spacing: -0.01em; line-height: 1.2; margin: 44px 0 12px; scroll-margin-top: 24px; }
.text h2:first-child { margin-top: 0; }
.text h3 { font-size: 19px; font-weight: 800; margin: 24px 0 6px; }
.text p, .text li { color: var(--ink); }
.text p { margin: 0 0 14px; }
.text ul, .text ol { padding-left: 22px; margin: 0 0 14px; }
.text li { margin: 5px 0; }
.text .muted { color: var(--ink-2); }
.callout { background: var(--paper); border: 2px solid var(--line); border-radius: 18px; padding: 20px 24px; margin: 0 0 32px; }
.callout h2 { margin-top: 0 !important; font-size: 20px; }
.callout ul { margin-bottom: 0; }
.table { width: 100%; border-collapse: collapse; margin: 8px 0 18px; font-size: 16px; }
.table th, .table td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
.table th { font-weight: 800; }
.table-scroll { overflow-x: auto; }
details { border-bottom: 2px solid var(--line); padding: 14px 0; }
details summary { font-weight: 800; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; font-weight: 900; color: var(--ink-2); }
details[open] summary::after { content: "−"; }
details p { margin: 10px 0 0; color: var(--ink-2); }
.contact-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 24px; border-radius: 18px; background: var(--paper); border: 2px solid var(--line); margin: 0 0 36px; }
.contact-card .k { font-size: 15px; color: var(--ink-2); font-weight: 700; }
.contact-card .v { font-size: 22px; font-weight: 900; word-break: break-all; }

/* Footer */
.foot { background: var(--cream-2); padding-top: 48px; padding-bottom: 32px; font-size: 15px; }
.foot-grid { display: grid; gap: 28px; grid-template-columns: 1fr 1fr; }
@media (min-width: 860px) { .foot-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.foot-brand { grid-column: 1 / -1; }
@media (min-width: 860px) { .foot-brand { grid-column: auto; } }
.foot-brand p { margin: 10px 0 0; color: var(--ink-2); max-width: 30ch; }
.foot h2 { margin: 0 0 10px; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.foot a { color: var(--ink); font-weight: 700; text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.fine { margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 13px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

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