/* The game page. Colors follow Wordjack/Views/Theme.swift: Palette (accent, tiles, decks, premium). */
:root {
  --accent: #ffba45;
  --ink: #3b2917;
  --tile-top: #fbebc4;
  --tile-bottom: #edd196;
  --tile-edge: #a8804a;
  --groove-top: #e0c287;
  --groove-bottom: #f2deae;
  --panel: #0f352dcc;
  --panel-stroke: #ffffff1f;
  --rounded: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

html { scroll-behavior: smooth; }
body.home { overflow-x: clip; }
.home h1, .home h2, .home h3 { font-family: var(--rounded); }
.home header.site-header { max-width: 1120px; position: relative; z-index: 1; }
.home a:focus-visible, .home button:focus-visible, .carousel-track:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* The menu artwork and its introduction share a single panel. */
.hero {
  box-sizing: border-box;
  width: calc(100% - 24px);
  max-width: 938px;
  margin: 8px auto 0;
  border: 1px solid var(--panel-stroke);
  border-radius: 24px;
  background: var(--panel);
  overflow: clip;
  text-align: center;
}
.hero-mask { position: absolute; }
.hero-art { margin: 0; line-height: 0; }
.hero-art img {
  display: block;
  width: 100%;
  height: auto;
  clip-path: url(#hero-foreground);
}
@media (max-width: 600px) {
  .hero-art img {
    width: 133.333%;
    margin-inline: -16.6665%;
  }
}

.hero-copy {
  box-sizing: border-box;
  max-width: 660px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 32px) clamp(20px, 4vw, 32px);
}
.intro { color: var(--text-muted); font-size: 1.08rem; line-height: 1.65; margin: 0 auto; }
.hero-actions { margin: 24px 12px 0; text-align: center; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px; }
.cta-row .android-soon { margin: 0; }
.cta-note { margin: 14px 0 0; font-size: .85rem; color: var(--text-muted); }
.hero-gallery {
  display: inline-block;
  margin-top: 16px;
  padding: 14px 26px;
  border: 1px solid #ffffff40;
  border-radius: 999px;
  color: var(--text-light);
  font: 700 1.02rem var(--rounded);
  text-decoration: none;
}
.hero-gallery:hover { background: #ffffff14; }
/* Apple's badge as supplied: 40 pt or taller, unaltered, with clear space around it. */
.store-badge { display: inline-block; line-height: 0; transition: transform .15s ease; }
.store-badge:hover { transform: translateY(-2px); }
.store-badge img { display: block; width: 162px; height: 54px; }
.store-qr { display: block; width: 104px; height: 104px; border-radius: 12px; }
@media (max-width: 600px) { .store-qr { display: none; } }
/* Not a link yet: there is no store page. The same size as Apple's badge, in Android's green. */
.android-soon { display: flex; align-items: center; gap: 10px; width: fit-content; min-width: 162px; min-height: 54px; box-sizing: border-box; margin: 16px auto 0; padding: 6px 16px 6px 12px; border: 1px solid #3ddc84; border-radius: 9px; background: #000; color: #fff; text-align: left; }
.android-soon svg { flex: none; }
.android-soon small { display: block; font-size: .68rem; line-height: 1.2; color: #d6f7e4; }
.android-soon b { display: block; font: 700 1.2rem / 1.15 var(--rounded); }

/* A wooden tile, as on the table. */
.tile {
  --size: 44px;
  position: relative;
  flex: none;
  display: inline-grid;
  place-items: center;
  width: var(--size);
  height: var(--size);
  border-radius: 22%;
  background: linear-gradient(var(--tile-top), var(--tile-bottom));
  box-shadow: 0 calc(var(--size) * .07) 0 var(--tile-edge), 0 calc(var(--size) * .16) calc(var(--size) * .24) #0005;
  color: var(--ink);
  font: 800 calc(var(--size) * .56) / 1 var(--rounded);
}
.tile::before {
  content: "";
  position: absolute;
  inset: 8%;
  border-radius: 18%;
  background: linear-gradient(var(--groove-top), var(--groove-bottom));
  box-shadow: inset 0 0 0 1px #ffefc5aa;
}
.tile > span { position: relative; }
.tile > small { position: absolute; right: 13%; bottom: 10%; font-size: calc(var(--size) * .2); }


/* Sections. */
.band { max-width: 1120px; margin: 72px auto 0; padding: 0 20px; scroll-margin-top: 24px; }
.band-head { max-width: 620px; margin: 0 auto 28px; text-align: center; }
.band-head h2, .plus h2, .closing h2 { font-size: clamp(1.5rem, 4vw, 2rem); margin: 0 0 8px; color: var(--tile-top); }
.band-head p { margin: 0; color: var(--text-muted); line-height: 1.6; }
.tile-word { display: flex; justify-content: center; gap: 6px; margin-bottom: 18px !important; }
.tile-word .tile { --size: min(58px, calc((100vw - 64px) / 5)); }
.tile-word .tile:nth-child(odd) { transform: rotate(-4deg); }
.tile-word .tile:nth-child(even) { transform: rotate(3deg) translateY(3px); }

/* Device frames. The iPhone capture has its own black corners and island. */
.device { display: block; background: #000; line-height: 0; box-shadow: 0 18px 44px #0007; }
.device img, .device video { display: block; width: 100%; height: auto; }
.device-phone { padding: 5px; border-radius: 24px; }
.device-phone img, .device-phone video { border-radius: 19px; }
.device-tablet { padding: 9px; border-radius: 22px; }
.device-tablet img { border-radius: 14px; }
.device-portrait { width: min(100%, 300px); margin: 0 auto; padding: 5px; border-radius: 30px; }
.device-portrait img { border-radius: 25px; }
.device-window { background: none; }
.device-window img { filter: drop-shadow(0 18px 30px #0008); }
.device-window { box-shadow: none; }
.device-window video { border-radius: 14px; filter: drop-shadow(0 18px 30px #0008); }

/* Gallery: a native scroll-snap strip; the buttons and the lightbox come with the script. */
.carousel { position: relative; margin: 0 -20px; }
.carousel-track {
  list-style: none;
  display: flex;
  gap: 18px;
  margin: 0;
  padding: 6px max(20px, calc(50% - 300px)) 26px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track li { flex: 0 0 min(86vw, 600px); scroll-snap-align: center; }
.carousel-track figure { margin: 0; }
.carousel-track a { transition: transform .15s ease; cursor: zoom-in; }
.carousel-track a:hover { transform: translateY(-3px); }
.carousel-track figcaption { margin-top: 12px; text-align: center; font-size: .92rem; line-height: 1.4; color: var(--text-muted); }
.carousel-nav, .lightbox-nav, .lightbox-close {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid #ffffff33;
  border-radius: 50%;
  background: #0b2a24e6;
  color: var(--text-light);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.carousel-nav[hidden] { display: none; }
.carousel-controls { display: flex; justify-content: center; gap: 12px; }
.carousel-nav { border: 0; background: var(--accent); color: #2c1e0c; font-weight: 800; }
.carousel-nav:disabled { opacity: .3; cursor: default; }
.prev::before { content: "‹"; }
.next::before { content: "›"; }
.lightbox-close::before { content: "×"; }
@media (max-width: 760px) { .carousel-nav { display: none; } }

/* The gallery and the video on their own panels, so they don't blend into the lettered wallpaper. */
.band-panel {
  box-sizing: border-box;
  width: calc(100% - 24px);
  padding: 32px 0 28px;
  border: 1px solid var(--panel-stroke);
  border-radius: 24px;
  background: #0f352df2;
  box-shadow: 0 18px 44px #0006;
  overflow: clip;
}
.band-panel .band-head { padding: 0 20px; }
.band-panel .preview { padding: 0 20px; }
.band-panel .carousel { margin: 0; }

.preview { max-width: 760px; margin: 0 auto; }

.lightbox { max-width: none; max-height: none; width: 100vw; height: 100dvh; margin: 0; padding: 0; border: 0; background: #04110ef2; color: var(--text-light); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: #04110ef2; }
.lightbox figure { margin: 0; padding: 0 12px; text-align: center; }
.lightbox img { display: block; max-width: min(100%, 1920px); max-height: calc(100dvh - 90px); margin: 0 auto; border-radius: 18px; }
.lightbox figcaption { margin-top: 12px; font-size: .95rem; }
.lightbox-close, .lightbox-nav { position: fixed; z-index: 1; }
.lightbox-close { top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); }
.lightbox-nav { top: calc(50% - 23px); }
.lightbox-nav.prev { left: max(12px, env(safe-area-inset-left)); }
.lightbox-nav.next { right: max(12px, env(safe-area-inset-right)); }
@media (hover: none) { .lightbox-nav { display: none; } }

/* How to play. */
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; }
.steps li { padding: 22px; border: 1px solid var(--panel-stroke); border-radius: 18px; background: var(--panel); }
.steps h3 { margin: 16px 0 8px; font-size: 1.12rem; color: var(--tile-top); }
.steps p { margin: 0; color: var(--text-muted); line-height: 1.6; font-size: .96rem; }
.news-box .band-head { margin-top: 20px; }
.releases { list-style: none; display: grid; gap: 16px; margin: 0; padding: 0; text-align: start; }
.release { padding: 22px; border: 1px solid var(--panel-stroke); border-radius: 18px; background: var(--panel); }
.release h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 10px; font-size: 1.12rem; color: var(--tile-top); }
.release-status { padding: 3px 10px; border: 1px solid currentColor; border-radius: 999px; font-size: .78rem; font-weight: 600; }
.release-lead { margin: 0 0 10px; line-height: 1.6; font-size: .96rem; }
.release ul { margin: 0; padding-inline-start: 20px; color: var(--text-muted); line-height: 1.6; font-size: .96rem; }
.release ul li + li { margin-top: 6px; }

/* Feature rows, the image on alternating sides. */
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 44px; }
.feature + .feature { margin-top: 64px; }
.feature:nth-child(even) .feature-art { order: 2; }
.feature h2 { font-size: clamp(1.4rem, 3.4vw, 1.8rem); margin: 0 0 12px; color: var(--tile-top); }
.feature p { margin: 0; color: var(--text-muted); line-height: 1.7; }
.decks { list-style: none; display: grid; gap: 10px; margin: 18px 0 0; padding: 0; }
.decks li { padding: 12px 14px; border-left: 4px solid var(--deck); border-radius: 10px; background: var(--panel); color: var(--text-muted); font-size: .94rem; line-height: 1.5; }
.decks b { display: block; margin-bottom: 2px; color: var(--text-light); font-family: var(--rounded); }
.deck-goal { --deck: #cc8024; }
.deck-magic { --deck: #a03a9a; }
.deck-spell { --deck: #1a85a8; }

/* Plus: the game's premium purple with its gold. */
.plus { display: flex; align-items: center; gap: 28px; max-width: 900px; margin: 0 auto; padding: 28px; border: 1px solid #ffba4555; border-radius: 22px; background: linear-gradient(135deg, #4a1b6c, #2a0f40); }
.plus-jack { flex: none; width: 128px; height: auto; }
.plus h2 { color: var(--accent); }
.plus p { margin: 0 0 10px; color: #eadff3; line-height: 1.6; }
.plus p:last-child { margin-bottom: 0; }

/* The paywall's comparison table (PremiumComparisonTable), collapsed inside the Plus panel. */
.plus-compare { display: grid; grid-template-columns: auto minmax(0, 1fr); }
.compare-box { grid-column: 1 / -1; }
.disclosure { text-align: center; }
.disclosure > summary { display: inline-flex; align-items: center; gap: 10px; padding: 12px 22px; border: 1px solid #ffba4588; border-radius: 999px; background: #00000040; color: var(--accent); font: 700 1rem var(--rounded); cursor: pointer; list-style: none; transition: background-color .15s ease; }
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary::after { content: ""; width: 8px; height: 8px; margin-top: -4px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .15s ease; }
.disclosure[open] > summary::after { margin-top: 4px; transform: rotate(-135deg); }
.disclosure > summary:hover { background: #00000066; }
.disclosure > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.compare { width: 100%; margin: 16px auto 0; padding: 12px 16px; border: 1px solid #ffba4566; border-radius: 16px; border-spacing: 0; background: #00000059; font-size: .96rem; line-height: 1.35; }
.compare th, .compare td { padding: 10px 12px; border-top: 1px solid #ffffff26; text-align: left; vertical-align: baseline; }
.compare thead th, .compare thead td { border-top: 0; font: 800 .9rem var(--rounded); }
.compare thead th:nth-child(2) { color: #d9cbe6; text-transform: uppercase; }
.compare tbody th { color: #d9cbe6; font-weight: 700; }
.compare td:nth-child(2) { color: #fff; font-weight: 600; }
.compare td:nth-child(3), .compare thead th:nth-child(3) { background: #732ba8cc; color: var(--accent); font-weight: 600; }
.compare thead th:nth-child(3) { border-radius: 8px 8px 0 0; font-weight: 800; }
.compare tbody tr:last-child td:nth-child(3) { border-radius: 0 0 8px 8px; }
.compare-mark { font-weight: 900; font-size: 1.1em; }
.compare-no { color: #d9cbe6; opacity: .6; }
@media (max-width: 860px) {
  .plus-compare { grid-template-columns: minmax(0, 1fr); }
  .plus-compare .plus-jack { justify-self: center; }
}
@media (max-width: 600px) {
  .plus-compare { padding: 20px 12px; }
  /* Fixed columns: long German words hyphenate instead of pushing the table out of the panel. */
  .compare { padding: 8px; font-size: .82rem; table-layout: fixed; hyphens: auto; overflow-wrap: break-word; }
  .compare th, .compare td { padding: 8px 4px; }
  .compare thead th, .compare thead td { font-size: .78rem; }
  .compare thead td { width: 40%; }
  .compare thead th:nth-child(2) { width: 28%; }
}

.closing { margin: 80px auto 0; padding: 0 20px; max-width: 560px; text-align: center; }
.closing-jack { display: block; width: 150px; height: auto; margin: 0 auto 8px; }
.closing p { margin: 0 0 22px; color: var(--text-muted); line-height: 1.6; }

@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; }
  .feature { grid-template-columns: 1fr; gap: 22px; }
  .feature:nth-child(even) .feature-art { order: 0; }
  .plus { flex-direction: column; text-align: center; }
}
@media (max-width: 380px) {
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .store-badge, .carousel-track a { transition: none; }
  .store-badge:hover, .carousel-track a:hover { transform: none; }
}
