/* Plushlight website. Colors are the Art Bible's palette tokens (section 2);
   the page is the storybook side of the game: ui_plate night, ui_cloth panels
   with dashed seams, ink outlines, text in ui_icon. */

@font-face {
  font-family: "Grandstander";
  src: url("fonts/grandstander.ttf") format("truetype-variations"),
       url("fonts/grandstander.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ui-plate: #1b1923;
  --ui-plate-light: #3d394b;
  --ui-track: #0e0c13;
  --ui-icon: #f5f3fa;
  --ui-icon-shade: #c9c3d9;
  --ui-cloth: #514c62;
  --ui-cloth-seam: #736d89;
  --ink: #040307;
  --beam: #fff1a8;
  --pajama: #9ec5ff;
  --env-floor: #3a3743;
  --display: "Grandstander", ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
  --text: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: 16px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ui-plate);
  color: var(--ui-icon);
  font: 400 1.0625rem/1.6 var(--text);
  overflow-wrap: break-word;
}

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

a { color: var(--beam); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--beam); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, .display {
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.005em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.4rem, 7vw, 4rem); }
h2 { font-size: clamp(1.6rem, 4.5vw, 2.25rem); }
h3 { font-size: 1.25rem; font-weight: 700; margin-top: 1.6em; }

.wrap { width: min(72rem, 100% - 2 * var(--gutter)); margin-inline: auto; }
.narrow { width: min(46rem, 100% - 2 * var(--gutter)); margin-inline: auto; }

/* Header and footer */

.top {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-block: 1rem;
}
.brand {
  display: flex; align-items: center; gap: 0.6rem;
  color: var(--ui-icon); text-decoration: none;
  font: 800 1.35rem var(--display);
}
.brand img { width: 40px; height: 40px; border-radius: 9px; }
.top nav { display: flex; gap: 1.1rem; font: 700 1rem var(--display); }
.top nav a { color: var(--ui-icon-shade); text-decoration: none; }
.top nav a:hover, .top nav a[aria-current] { color: var(--ui-icon); }

.foot {
  margin-top: 5rem;
  padding-block: 2rem 3rem;
  border-top: 2px dashed var(--ui-cloth-seam);
  color: var(--ui-icon-shade);
  font-size: 0.95rem;
}
.foot nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; margin-bottom: 0.8rem; font: 700 1rem var(--display); }
.foot nav a { color: var(--ui-icon); text-decoration: none; }
.foot nav a:hover { color: var(--beam); }
.foot p { margin: 0.2rem 0; }

/* Cloth panel: the pause menu and wake-up screen's look */

.cloth {
  position: relative;
  background: var(--ui-cloth);
  border: 3px solid var(--ink);
  border-radius: 18px;
  padding: clamp(1.25rem, 4vw, 2.25rem);
  box-shadow: 0 6px 0 var(--ink);
}
.cloth::before {
  content: "";
  position: absolute; inset: 7px;
  border: 2px dashed var(--ui-cloth-seam);
  border-radius: 12px;
  pointer-events: none;
}
.cloth > * { position: relative; }

/* Home */

.hero {
  display: grid; gap: 2rem; align-items: center;
  grid-template-columns: minmax(0, 1fr);
  padding-block: 1.5rem 3rem;
}
@media (min-width: 900px) {
  .hero { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
}
.hero .icon { width: 96px; height: 96px; border-radius: 22px; border: 3px solid var(--ink); margin-bottom: 1.2rem; }
.hero .sub { font: 700 clamp(1.2rem, 3vw, 1.5rem)/1.3 var(--display); color: var(--beam); margin: 0 0 1rem; }
.hero p.lead { font-size: 1.125rem; color: var(--ui-icon-shade); max-width: 34rem; }
.meta { font: 700 0.95rem var(--display); color: var(--ui-icon-shade); margin-top: 0.75rem; }

/* Apple badge: official artwork, unmodified, at least 40 px tall, with clear
   space of a quarter of its height around it. */
.badge { display: inline-block; padding: 14px; margin: 0 -14px; }
.badge img { height: 54px; width: auto; }

.video {
  border: 3px solid var(--ink);
  border-radius: 16px;
  overflow: hidden;
  background: var(--ui-track);
  box-shadow: 0 6px 0 var(--ink);
  aspect-ratio: 1280 / 590;
}
.video video { width: 100%; height: 100%; object-fit: cover; }

section { padding-block: 2.5rem; }
.section-head { text-align: center; margin-bottom: 1.5rem; }
.section-head p { color: var(--ui-icon-shade); margin: 0 auto; max-width: 38rem; }

.shots {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(100vw - 3rem, 40rem);
  gap: 1rem; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; padding: 0.25rem var(--gutter) 1rem;
  margin-inline: calc(-1 * var(--gutter));
  scrollbar-color: var(--ui-cloth-seam) transparent;
}
.shots img { scroll-snap-align: center; border-radius: 12px; width: 100%; }

.plays { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.plays .cloth { padding: 1.4rem 1.4rem 1.2rem; }
.plays h3 { margin-top: 0; font-size: 1.2rem; }
.plays p { margin: 0; color: var(--ui-icon); }

.cast {
  display: grid; gap: 1.25rem 1rem;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
}
.teddy { text-align: center; }
.teddy figure { margin: 0; display: flex; align-items: flex-end; justify-content: center; height: 11rem; }
.teddy img { max-height: 100%; width: auto; }
.teddy h3 { margin: 0.6rem 0 0.2rem; font-size: 1.15rem; }
.teddy p { margin: 0; font-size: 0.98rem; color: var(--ui-icon-shade); line-height: 1.45; }

.cta { text-align: center; }
.cta p { color: var(--ui-icon-shade); }

/* Text pages */

.page { padding-block: 1rem 0; }
.page h1 { font-size: clamp(1.75rem, 7.5vw, 3rem); hyphens: auto; -webkit-hyphens: auto; }
.page h2 { font-size: clamp(1.35rem, 3.5vw, 1.7rem); margin-top: 2.2em; }
.page .cloth h2:first-child { margin-top: 0; }
.page ul, .page ol { padding-left: 1.3rem; }
.page li + li { margin-top: 0.35rem; }
.page address { font-style: normal; }
.page dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.3rem 1.2rem; }
.page dt { color: var(--ui-icon-shade); }
.page dd { margin: 0; }
@media (max-width: 520px) {
  .page dl { grid-template-columns: 1fr; }
  .page dd { margin-bottom: 0.6rem; }
}
.page table { border-collapse: collapse; width: 100%; font-size: 0.97rem; }
.page th, .page td { text-align: left; vertical-align: top; padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--ui-plate-light); }
.page th { font: 700 1rem var(--display); }
.table-scroll { overflow-x: auto; }

.toc { columns: 2 16rem; padding-left: 1.3rem; }

details { border-bottom: 1px solid var(--ui-plate-light); padding-block: 0.4rem; }
details summary {
  cursor: pointer; list-style: none;
  font: 700 1.15rem/1.4 var(--display); padding: 0.6rem 2rem 0.6rem 0; position: relative;
}
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; position: absolute; right: 0.2rem; top: 0.45rem; color: var(--beam); font-size: 1.4rem; }
details[open] summary::after { content: "\2212"; }
details > :not(summary) { margin-top: 0; }

.contact { font: 800 clamp(1.2rem, 4vw, 1.6rem) var(--display); }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
