:root {
  --fg: #141a2e;
  --muted: #4a5470;
  --border: #d8dcea;
  --accent: #3b4fd8;
  color-scheme: light;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--studio-bg, #ffffff);
  color: var(--fg);
  font: 1rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.wrap { max-width: 60rem; margin: 0 auto; padding: 2rem 1rem; }
header { padding-top: 3rem; }
h1 { margin: 0 0 .5rem; font-size: 2.25rem; }
header p { margin: 0 0 .75rem; max-width: 38rem; color: var(--muted); font-size: 1.0625rem; }
header .lead { color: var(--fg); font-size: 1.375rem; line-height: 1.4; }
.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
}
.card {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  height: 100%;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: .75rem;
  color: var(--fg);
  text-decoration: none;
}
.card:hover { border-color: var(--accent); }
.card-preview { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; image-rendering: pixelated; border-radius: .25rem; margin-bottom: .5rem; }
.card h2 { margin: 0; font-size: 1.25rem; }
.card p { margin: 0; color: var(--muted); flex: 1; }
.card span { color: var(--accent); font-size: .875rem; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.top { display: flex; gap: 1.5rem; padding-bottom: 0; font-size: .95rem; }
.top a { color: var(--muted); text-decoration: none; }
.top a:hover { color: var(--accent); }
.lead { margin: 0 0 1.5rem; color: var(--muted); font-size: 1.25rem; max-width: 38rem; }
.about { margin-top: 3rem; }
.about h2 { margin: 2rem 0 .25rem; font-size: 1.5rem; }
.about p { margin: 0; max-width: 46rem; color: var(--muted); }
.about a { color: var(--accent); }
body[data-studio-app="home"] { font-family: "Segoe UI", "Helvetica Neue", system-ui, sans-serif; }
.home-wrap { max-width: 1160px; padding: 0 28px; margin: 0 auto; }
.home-intro { padding: 48px 0 56px; }
.home-byline { color: var(--muted); font-size: .9rem; margin: 0 0 22px; }
.home-intro h1 { font-size: clamp(2.8rem, 5vw, 4.5rem); line-height: 1.05; letter-spacing: -.065em; font-weight: 650; margin: 0 0 24px; }
.home-summary { color: var(--muted); max-width: 42ch; font-size: 1.075rem; line-height: 1.7; margin: 0 0 26px; }
.home-browse { color: var(--accent); font-weight: 600; font-size: .95rem; text-decoration: none; }
.home-browse span { margin-left: 14px; }
.home-membership { align-self: stretch; background: var(--studio-surface); border: 1px solid var(--border); border-radius: 13px; padding: 28px; }
.home-member-symbol { display: inline-block; font-size: 25px; font-weight: 700; letter-spacing: -.1em; color: var(--accent); margin-bottom: 12px; }
.home-member-symbol > span { display: inline-block; margin-left: 4px; font-size: 19px; transform: translateY(-6px); }
.home-membership h2 { font-size: 1.25rem; line-height: 1.3; letter-spacing: -.03em; margin: 0 0 12px; }
.home-membership > p { font-size: .9rem; color: var(--muted); margin: 0 0 18px; max-width: 35ch; }
.home-membership .home-price { font-size: 2.1rem; font-weight: 650; letter-spacing: -.045em; line-height: 1.2; color: var(--fg); }
.home-price span { font-size: .875rem; font-weight: 400; letter-spacing: 0; color: var(--muted); }
.home-membership .home-membership-note { font-size: .76rem; line-height: 1.6; margin: 14px 0 0; }
.home-membership .studio-button { font-size: .875rem; }
.home-library { scroll-margin-top: 24px; }
.home-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--border); padding-bottom: 18px; }
.home-section-heading h2 { margin: 0; font-size: 1.5rem; letter-spacing: -.035em; }
.home-section-heading p { margin: 0; font-size: .875rem; color: var(--muted); }
.home-catalog { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 42px; }
.home-catalog > li { border-bottom: 1px solid var(--border); }
.home-product { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 22px; padding: 30px 0; text-decoration: none; color: var(--fg); height: 100%; }
.home-product-mark { display: grid; place-items: center; width: 58px; height: 58px; margin-top: 3px; border-radius: 13px; font-size: 33px; line-height: 1; font-weight: 650; }
.mark-spanish { background: #fff0e5; color: #9b4921; }
.mark-logos { background: #eeedff; color: #5140a8; font-family: Georgia, serif; }
.mark-espanol { background: #e7f5ee; color: #1f6b46; font-family: Georgia, serif; }
.mark-engine { background: #e7f1fb; color: #27547c; font: 650 23px/1 ui-monospace, monospace; }
.mark-assets { background: #e9f3eb; color: #326243; }
.mark-anarchy { border-radius: 0; }
.mark-graft { background: #f5eaf7; color: #854b8e; }
.mark-pdfreader { background: #e4f2f1; color: #1f6b66; }
.mark-pdfeditor { background: #fbefe0; color: #9a5a14; }
.mark-blog { background: #f0f0f6; color: #565979; }
.home-game-image { object-fit: cover; image-rendering: pixelated; }
.home-product-kind { display: block; font-size: .75rem; color: var(--muted); margin-bottom: 4px; }
.home-product h3 { font-size: 1.2rem; letter-spacing: -.025em; line-height: 1.3; margin: 0 0 8px; }
.home-product p { margin: 0 0 13px; font-size: .9rem; color: var(--muted); line-height: 1.65; max-width: 43ch; }
.home-product-link { font-size: .8rem; font-weight: 600; color: var(--accent); }
.home-product:hover h3, .home-product:hover .home-product-link { text-decoration: underline; text-underline-offset: 4px; }
.home-colophon { display: grid; grid-template-columns: 1fr 1.35fr; gap: 12px 40px; margin: 54px 0 50px; padding: 30px 0 0; }
.home-colophon h2 { font-size: 1.5rem; letter-spacing: -.04em; margin: 0; }
.home-colophon p { font-size: .9rem; color: var(--muted); margin: 0; max-width: 62ch; }
.home-colophon a { grid-column: 2; font-size: .85rem; color: var(--accent); text-underline-offset: 4px; }
.home-footer { max-width: 1104px; margin: 0 auto; border-top: 1px solid var(--border); padding: 24px 0 30px; display: flex; align-items: center; gap: 24px; color: var(--muted); font-size: .8rem; }
.home-footer a { color: var(--muted); text-decoration: none; }
.home-footer a:first-child { color: var(--fg); font-weight: 650; }
.home-footer a:last-child { margin-left: auto; }
@media (max-width: 900px) {
  .home-intro h1 { font-size: 3.3rem; }
  .home-catalog { column-gap: 28px; }
  .home-product { gap: 16px; grid-template-columns: 48px minmax(0, 1fr); }
  .home-product-mark { width: 48px; height: 48px; font-size: 28px; }
  .mark-engine { font-size: 20px; }
  .home-footer { margin-inline: 28px; }
}
@media (max-width: 640px) {
  .home-wrap { padding-inline: 20px; }
  .home-intro { padding: 32px 0 40px; }
  .home-intro h1 { font-size: clamp(2.8rem, 10vw, 4rem); }
  .home-membership { padding: 24px; }
  .home-member-symbol { display: none; }
  .home-membership > p { max-width: none; }
  .home-catalog { grid-template-columns: 1fr; }
  .home-section-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
  .home-product { padding-block: 25px; }
  .home-colophon { grid-template-columns: 1fr; gap: 16px; margin-top: 36px; }
  .home-colophon a { grid-column: auto; }
  .home-footer { margin-inline: 20px; flex-wrap: wrap; gap: 10px 20px; }
  .home-footer span { display: none; }
}

/* Home hero: carousel (left) + membership offer (right). Mobile first. */
.home-hero { display: grid; grid-template-columns: 1fr; gap: 20px; padding: 20px 0 0; }
.home-hero .home-membership { align-self: stretch; }
.home-carousel { position: relative; min-width: 0; }
.slides { list-style: none; margin: 0; padding: 0; position: relative; aspect-ratio: 4 / 3; border-radius: 13px; overflow: hidden; border: 1px solid var(--border); background: #0f1424; }
.slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .5s ease, visibility .5s; }
.slide.is-active { opacity: 1; visibility: visible; }
.slide a { display: block; height: 100%; color: #fff; text-decoration: none; }
.slide-media, .slide-media img { display: block; width: 100%; height: 100%; }
.slide-media img { object-fit: cover; }
.slide-caption { position: absolute; inset: auto 0 0 0; display: grid; gap: 2px; padding: 40px 16px 14px; background: linear-gradient(to top, rgba(8,12,24,.92), rgba(8,12,24,0)); font-size: .85rem; line-height: 1.45; }
.slide-caption strong { font-size: 1.15rem; letter-spacing: -.02em; }
.slide-kind { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; opacity: .8; }
.slide-art { display: grid; place-content: center; justify-items: center; gap: 10px; height: 100%; background: linear-gradient(135deg, #c60b1e, #ffc400); color: #3a0510; text-align: center; }
.slide-art span { font-size: 4.5rem; font-weight: 700; line-height: 1; }
.slide-art b { font-size: 1.05rem; }
.carousel-dots { display: flex; justify-content: center; gap: 4px; margin-top: 6px; }
.carousel-dots button { width: 28px; height: 28px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.carousel-dots button::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--border); }
.carousel-dots button[aria-current="true"]::before { background: var(--accent); }
.carousel-dots button:focus-visible { outline: 2px solid var(--accent); border-radius: 6px; }
@media (min-width: 760px) {
  .home-hero { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 28px; padding-top: 36px; align-items: stretch; }
  .slides { aspect-ratio: 16 / 10; }
  .slide-caption { padding: 56px 24px 20px; font-size: .95rem; }
  .slide-caption strong { font-size: 1.4rem; }
}
@media (prefers-reduced-motion: reduce) { .slide { transition: none; } }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.home-group { margin: 34px 0 0; padding-bottom: 6px; font-size: .8rem; font-weight: 650; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); }
.home-group + .home-catalog > li:last-child:nth-child(odd) { border-bottom: 1px solid var(--border); }
