/* Avalinx Studios shared stylesheet */

/* Fonts: self-hosted WOFF2 (Grandstander and Nunito variable, Open Sans static 600), licences in assets/fonts (Grandstander-OFL.txt, OpenSans-OFL.txt, Nunito-OFL.txt) */
/* latin-ext */
@font-face {
  font-family: 'Grandstander';
  font-style: normal;
  font-weight: 800 900;
  font-display: swap;
  src: url(/assets/fonts/grandstander-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Grandstander';
  font-style: normal;
  font-weight: 800 900;
  font-display: swap;
  src: url(/assets/fonts/grandstander-latin.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;
}
/* latin-ext */
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/assets/fonts/opensans-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/assets/fonts/opensans-latin.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;
}
/* latin-ext */
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/assets/fonts/nunito-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/assets/fonts/nunito-latin.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;
}


:root {
  --bg: #F0F3F8;
  --surface: #FFFFFF;
  --ink: #1E2733;
  --ink-2: #566175;
  --lynx: #FA7400;
  --lynx-deep: #D95F00;
  --lynx-soft: #FFE6CF;
  --felt: #0F5A3C;
  --felt-deep: #0A3D29;
  --gold: #E9B030;
  --gold-soft: #FFE7A3;
  --red: #D7263D;
  --ivory: #FBF4E2;
  --sky: #DCEBFF;
  --sky-deep: #B9D6FF;
  --navy: #14213A;
  --line: #D9DEE7;
  --focus: #2459C4;

  /* A title page overrides these four to wear its own colors */
  --t-bg: var(--sky);
  --t-bg2: var(--sky-deep);
  --t-ink: var(--ink);
  --t-accent: var(--lynx);

  --font-display: 'Grandstander', 'Arial Rounded MT Bold', system-ui, sans-serif;
  --font-eyebrow: 'Open Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius-pill: 999px;
  --radius-tile: 20px;
  --radius-panel: 28px;
  --radius-thumb: 12px;
  --shadow: 0 10px 30px rgba(30,39,51,.10);
  --shadow-hover: 0 22px 50px rgba(30,39,51,.18);
  --pop: 0 6px 0 var(--ink);
  --content: 1200px;
  --tap: 44px;
  --space: 8px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body); font-weight: 400; font-size: max(16px, 1.0625rem); line-height: 1.6;
  color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, video { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

h1, h2, h3, h4 { font-family: var(--font-display); color: inherit; }
h1 { font-size: clamp(2.6rem, 7vw, 5rem); font-weight: 900; line-height: 1; letter-spacing: -0.01em; }
h2 { font-size: clamp(2rem, 4.4vw, 3.25rem); font-weight: 900; line-height: 1.05; }
h3 { font-size: 1.4rem; font-weight: 800; line-height: 1.2; }
h4 { font-size: 1.1rem; font-weight: 800; line-height: 1.25; }

a { color: var(--focus); font-weight: 700; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 12px 16px; border-radius: 12px; z-index: 50; }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { width: 100%; max-width: var(--content); margin: 0 auto; padding: 0 calc(var(--space) * 3); }
.narrow { max-width: 800px; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }
.eyebrow { font-family: var(--font-eyebrow); font-weight: 600; letter-spacing: 0.3em; text-transform: uppercase; font-size: 0.8125rem; color: var(--ink-2); }
.lead { color: var(--ink-2); font-size: 1.1875rem; margin-top: calc(var(--space) * 2); max-width: 60ch; }

/* A marker swash under the words that matter */
.swash { position: relative; white-space: nowrap; z-index: 0; }
.swash::after {
  content: ""; position: absolute; left: -2%; right: -2%; bottom: 0.04em; height: 0.34em; z-index: -1;
  background: var(--lynx); border-radius: 0.3em 0.12em 0.34em 0.1em; transform: rotate(-1.2deg); opacity: .9;
}

/* Buttons: chunky, pressable */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space);
  min-height: 52px; padding: 0 calc(var(--space) * 3.5);
  border: 3px solid var(--ink); border-radius: var(--radius-pill); box-shadow: 0 5px 0 var(--ink);
  font-family: var(--font-display); font-size: 1.125rem; font-weight: 800; line-height: 1.1; letter-spacing: .01em;
  text-decoration: none; cursor: pointer; color: var(--ink); background: var(--surface);
  transition: transform 120ms ease-out, box-shadow 120ms ease-out, background-color 160ms ease-out;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--ink); color: var(--ink); }
.btn:active { transform: translateY(5px); box-shadow: 0 0 0 var(--ink); }
.btn-primary { background: var(--lynx); }
.btn-primary:hover { background: #FF8A1F; }
.btn-gold { background: var(--gold); }
.btn-small { min-height: var(--tap); padding: 0 calc(var(--space) * 2.5); font-size: 1rem; box-shadow: 0 4px 0 var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: calc(var(--space) * 2); align-items: center; }
.center .btn-row { justify-content: center; }
.store-badge { display: inline-block; border-radius: 14px; transition: transform 160ms ease-out; }
.store-badge:hover { transform: translateY(-3px) rotate(-1deg); }
.store-badge img { width: 204px; height: auto; }

/* Stickers and pills */
.sticker {
  display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px; border-radius: var(--radius-pill);
  background: var(--gold); color: var(--ink); border: 3px solid var(--ink); box-shadow: 0 3px 0 var(--ink);
  font-family: var(--font-display); font-weight: 800; font-size: .9375rem; line-height: 1; white-space: nowrap; transform: rotate(-3deg);
}
.sticker-soon { background: #FFD84D; }
.sticker-flat { transform: none; }
.badges, .chips { display: flex; flex-wrap: wrap; gap: var(--space); }
.badge {
  display: inline-flex; align-items: center; min-height: 34px; padding: 0 calc(var(--space) * 1.75);
  border-radius: var(--radius-pill); background: var(--gold-soft); color: var(--ink); font-weight: 800; font-size: .9375rem;
}
.chips li { padding: 4px 12px; border-radius: var(--radius-pill); background: var(--bg); border: 1px solid var(--line); font-weight: 700; font-size: .9375rem; }
.chips a { color: inherit; text-decoration: none; }
.chips li:has(a):hover { background: var(--lynx-soft); border-color: var(--lynx); }

/* Header */
.site-header { background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom: 3px solid var(--ink); position: sticky; top: 0; z-index: 30; }
.site-header .container { display: flex; flex-wrap: wrap; align-items: center; gap: 4px calc(var(--space) * 2); padding-top: 6px; padding-bottom: 6px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; text-decoration: none; }
.brand-head { position: relative; width: 46px; height: 48px; flex: none; transition: transform 200ms ease-out; }
.brand-head img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.brand-wink { opacity: 0; }
.brand:hover .brand-head { transform: rotate(-8deg) scale(1.08); }
.brand:hover .brand-wink { opacity: 1; }
.brand:hover .brand-smirk { opacity: 0; }
.brand-word { height: 34px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 14px; border-radius: var(--radius-pill);
  color: var(--ink); font-family: var(--font-display); font-weight: 800; font-size: 1.0625rem; text-decoration: none; white-space: nowrap;
}
.site-nav a:hover { background: var(--lynx-soft); }
.site-nav a[aria-current] { background: var(--ink); color: #fff; }

/* Footer */
.site-footer { background: var(--navy); color: #DCE4F2; padding: calc(var(--space) * 8) 0 calc(var(--space) * 4); }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: calc(var(--space) * 5); }
.footer-logo { display: inline-block; background: #fff; border-radius: 24px; padding: 14px 18px; border: 3px solid var(--ink); box-shadow: 0 5px 0 #000; transform: rotate(-3deg); }
.footer-logo img { width: 104px; height: auto; }
.footer-brand p { margin-top: calc(var(--space) * 3); color: #AEBBD0; max-width: 26ch; }
.site-footer h2 { font-size: 1.125rem; color: #fff; margin-bottom: var(--space); }
.site-footer li a { display: inline-flex; align-items: center; min-height: 36px; color: #DCE4F2; font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.site-footer li a:hover { color: var(--gold); text-decoration: underline; }
.footer-copy { color: #93A2BA; font-size: .9375rem; margin-top: calc(var(--space) * 6); padding-top: calc(var(--space) * 3); border-top: 1px solid rgba(255,255,255,.12); }

/* Bands */
.band { position: relative; padding: calc(var(--space) * 11) 0; }
.band-tight { padding: calc(var(--space) * 7) 0; }
.band-white { background: var(--surface); }
.band-sky { background: var(--sky); }
.band-ivory { background: var(--ivory); }
.band-sun { background: var(--lynx-soft); }
.band-felt { background: radial-gradient(120% 90% at 50% 0%, #17734E 0%, var(--felt) 45%, var(--felt-deep) 100%); color: var(--ivory); }
.band-navy { background: radial-gradient(120% 90% at 50% 0%, #22365C 0%, var(--navy) 60%); color: #EEF3FB; }
.band-title { background: linear-gradient(165deg, var(--t-bg), var(--t-bg2)); color: var(--t-ink); }
.band-felt .lead, .band-navy .lead, .band-title .lead { color: inherit; opacity: .92; }
.band-felt .eyebrow, .band-navy .eyebrow, .band-title .eyebrow { color: inherit; }
.band-head { margin-bottom: calc(var(--space) * 6); }
.wave { display: block; width: 100%; height: 44px; margin-bottom: -1px; }
.wave-flip { transform: scaleY(-1); margin: -1px 0 0; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: calc(var(--space) * 7); align-items: center; }

/* Cards that pop */
.pop { background: var(--surface); color: var(--ink); border: 3px solid var(--ink); border-radius: var(--radius-tile); box-shadow: var(--pop); }
.panel { background: var(--surface); color: var(--ink); border-radius: var(--radius-panel); box-shadow: var(--shadow); padding: calc(var(--space) * 5); }
.tile { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-tile); padding: calc(var(--space) * 3); }
.lift { transition: transform 200ms ease-out, box-shadow 200ms ease-out; }
.lift:hover { transform: translateY(-6px) rotate(-.6deg); box-shadow: 0 12px 0 var(--ink); }

/* Home hero */
.hero { position: relative; padding: calc(var(--space) * 8) 0 0; text-align: center; overflow: hidden; }
.hero h1 { max-width: 13ch; margin: calc(var(--space) * 2) auto 0; }
.hero .lead { margin: calc(var(--space) * 3) auto calc(var(--space) * 4); font-size: 1.25rem; }
.hero .btn-row { justify-content: center; }
.floaters { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.hero > .container { position: relative; z-index: 1; }
.suit { width: 48px; height: 48px; fill: currentColor; }
.floaters .suit { position: absolute; opacity: .9; }
.floaters .suit-heart, .floaters .suit-diamond { color: var(--red); }
.floaters .suit-spade, .floaters .suit-club { color: var(--ink); }
.f1 { left: 6%; top: 14%; width: 64px; height: 64px; transform: rotate(-18deg); }
.f2 { right: 8%; top: 10%; width: 54px; height: 54px; transform: rotate(14deg); }
.f3 { left: 13%; top: 46%; width: 40px; height: 40px; transform: rotate(10deg); }
.f4 { right: 14%; top: 42%; width: 70px; height: 70px; transform: rotate(-12deg); }
.f5 { left: 24%; top: 6%; width: 30px; height: 30px; transform: rotate(24deg); opacity: .5 !important; }
.f6 { right: 26%; top: 24%; width: 28px; height: 28px; transform: rotate(-20deg); opacity: .5 !important; }
@keyframes drift { 0%, 100% { translate: 0 0; } 50% { translate: 0 -16px; } }
.js .floaters .suit { animation: drift 7s ease-in-out infinite; }
.js .f2, .js .f5 { animation-duration: 9s; animation-delay: -3s; }
.js .f3, .js .f6 { animation-duration: 8s; animation-delay: -5s; }

/* The deck: a fanned, scrollable row of game cards */
.deck-wrap { position: relative; margin-top: calc(var(--space) * 5); }
.deck {
  display: flex; gap: calc(var(--space) * 2.5); padding: 34px max(24px, calc((100vw - var(--content)) / 2 + 24px)) 56px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.deck::-webkit-scrollbar { display: none; }
.gamecard {
  position: relative; flex: 0 0 258px; display: flex; flex-direction: column; scroll-snap-align: center; text-align: left; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 3px solid var(--ink); border-radius: 24px; box-shadow: var(--pop); overflow: visible;
  transition: transform 220ms cubic-bezier(.2,.9,.3,1.3), box-shadow 220ms ease-out;
}
.gamecard:nth-child(odd) { transform: rotate(-2.5deg); }
.gamecard:nth-child(even) { transform: rotate(2deg) translateY(12px); }
.gamecard:hover, .gamecard:focus-visible { transform: rotate(0) translateY(-12px) scale(1.03); box-shadow: 0 16px 0 var(--ink); z-index: 2; color: var(--ink); }
.gamecard-art { display: block; flex: none; aspect-ratio: 4 / 3; border-radius: 20px 20px 0 0; overflow: hidden; background: linear-gradient(165deg, var(--t-bg), var(--t-bg2)); border-bottom: 3px solid var(--ink); }
.gamecard-art img { width: 100%; height: 100%; object-fit: cover; }
.gamecard-art.contain img { object-fit: contain; padding: 14px; }
.gamecard-icon { position: absolute; left: 16px; top: calc(258px * .75 - 46px); width: 68px; height: 68px; border-radius: 17px; border: 3px solid var(--ink); background: #fff; overflow: hidden; }
.gamecard-icon img { width: 100%; height: 100%; object-fit: cover; }
.gamecard-body { display: flex; flex-direction: column; flex: 1; padding: 34px 18px 18px; }
.gamecard-body .gamecard-more { margin-top: auto; padding-top: 12px; }
.gamecard-body h2 { font-size: 1.25rem; font-weight: 800; line-height: 1.2; }
.gamecard-body p { color: var(--ink-2); font-size: .9688rem; line-height: 1.4; margin-top: 6px; }
.gamecard .sticker { position: absolute; right: -10px; top: -14px; z-index: 3; }
.gamecard-more { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font-family: var(--font-display); font-weight: 800; color: var(--lynx-deep); }
.gamecard-more::after { content: "\2192"; transition: transform 160ms ease-out; }
.gamecard:hover .gamecard-more::after { transform: translateX(5px); }
.deck-nav { display: none; }
.js .deck-nav { display: flex; justify-content: center; gap: 12px; margin-top: -20px; position: relative; z-index: 2; }
.deck-nav button { width: 52px; height: 52px; border-radius: 50%; padding: 0; font-size: 1.5rem; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: calc(var(--space) * 3); }
.stat { padding: calc(var(--space) * 3) calc(var(--space) * 2); text-align: center; }
.stat:nth-child(odd) { transform: rotate(-1.5deg); }
.stat:nth-child(even) { transform: rotate(1.2deg) translateY(10px); }
.stat b { display: block; font-family: var(--font-display); font-weight: 900; font-size: clamp(2.4rem, 5vw, 3.75rem); line-height: 1; }
.stat b::after { content: ""; display: block; width: 44px; height: 6px; border-radius: 3px; background: var(--lynx); margin: 10px auto 10px; }
.stat span { font-weight: 700; color: var(--ink-2); line-height: 1.3; display: block; }

/* A mascot that breaks out of its band */
.breakout { position: relative; }
.breakout-art { width: min(100%, 560px); margin: 0 auto; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.js .bob { animation: bob 6s ease-in-out infinite; }
@keyframes wiggle { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
.js .wiggle:hover { animation: wiggle 500ms ease-in-out 2; }

/* Marquee of game marks */
.marquee { overflow: hidden; padding: calc(var(--space) * 2) 0; -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent); }
/* Without motion the strip is a plain row you can scroll; the second copy of the marks exists only for the loop */
.marquee { overflow-x: auto; scrollbar-width: none; }
.marquee::-webkit-scrollbar { display: none; }
.marquee-track { display: flex; gap: calc(var(--space) * 3); width: max-content; padding: 0 calc(var(--space) * 3); }
.marquee-track > span { display: none; }
.js .marquee { overflow: hidden; }
.js .marquee-track > span { display: contents; }
.marquee-track img { height: 104px; width: auto; border-radius: 14px; }
@keyframes scroll-x { to { transform: translateX(-50%); } }
.js .marquee-track { animation: scroll-x 60s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }

/* Posters: coming soon and feature tiles */
.poster-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: calc(var(--space) * 4); }
.poster { position: relative; display: flex; flex-direction: column; text-decoration: none; color: var(--ink); overflow: visible; }
.poster-art { aspect-ratio: 16 / 10; overflow: hidden; border-radius: 17px 17px 0 0; border-bottom: 3px solid var(--ink); background: linear-gradient(165deg, var(--t-bg), var(--t-bg2)); }
.poster-art img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms ease-out; }
.poster-art.contain img { object-fit: contain; padding: 18px; }
.poster:hover .poster-art img { transform: scale(1.06); }
.poster-body { padding: calc(var(--space) * 3); display: flex; flex-direction: column; gap: var(--space); flex: 1; }
.poster-body p { color: var(--ink-2); }
.poster .sticker { position: absolute; right: -8px; top: -14px; z-index: 2; }
.poster .gamecard-more { margin-top: auto; padding-top: var(--space); }

/* Catalog grid */
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: calc(var(--space) * 3); }
.app-tile { position: relative; display: flex; gap: calc(var(--space) * 2); align-items: flex-start; padding: calc(var(--space) * 2.5); }
.app-tile .app-icon { flex: 0 0 84px; width: 84px; border-radius: 20px; border: 3px solid var(--ink); }
.app-body { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; align-self: stretch; }
.app-body p { color: var(--ink-2); font-size: .9688rem; line-height: 1.45; }
.tile-link { color: inherit; text-decoration: none; }
.tile-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.tile-link:focus-visible { outline: none; }
.app-tile:has(.tile-link:focus-visible), .poster:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.rating { font-weight: 800; font-size: .9688rem; }
.rating .star { color: var(--gold); }
.rating-count { color: var(--ink-2); font-weight: 600; }

/* Title pages */
.title-hero { position: relative; overflow: hidden; background: linear-gradient(165deg, var(--t-bg), var(--t-bg2)); color: var(--t-ink); padding: calc(var(--space) * 3) 0 0; }
.title-hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: calc(var(--space) * 5); align-items: center; padding-bottom: calc(var(--space) * 8); }
.title-hero h1 { font-size: clamp(2.4rem, 5.6vw, 4.25rem); margin-top: calc(var(--space) * 2); }
.title-hero .lead { color: inherit; opacity: .94; margin-bottom: calc(var(--space) * 3); }
.title-hero .badges { margin-bottom: calc(var(--space) * 3); }
.title-logo { width: min(280px, 60%); height: auto; filter: drop-shadow(0 8px 14px rgba(0,0,0,.25)); }
.title-icon { width: 112px; border-radius: 26px; border: 3px solid var(--ink); box-shadow: 0 5px 0 var(--ink); }
.title-hero-art img { width: 100%; height: auto; }
.title-hero-art.framed img { border-radius: 24px; border: 3px solid var(--ink); box-shadow: var(--pop); }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-weight: 800; font-size: .9688rem; }
.crumbs a { display: inline-flex; align-items: center; min-height: var(--tap); color: inherit; text-decoration: underline; text-decoration-color: transparent; }
.crumbs a:hover { text-decoration-color: currentColor; }
.crumbs span[aria-hidden] { opacity: .5; }
.soon-note { display: inline-flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 800; font-size: 1.125rem; }

.feature-rows { display: grid; gap: calc(var(--space) * 9); }
.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: calc(var(--space) * 7); align-items: center; }
.feature-row:nth-child(even) > .feature-art { order: 2; }
.feature-art img { width: 100%; height: auto; border-radius: 22px; }
.feature-art.framed img { border: 3px solid var(--ink); box-shadow: var(--pop); }
.feature-copy h3 { font-size: clamp(1.6rem, 3vw, 2.25rem); font-weight: 900; margin-bottom: calc(var(--space) * 2); }
.feature-copy p + p { margin-top: calc(var(--space) * 2); }
.ticks { display: grid; gap: 10px; margin-top: calc(var(--space) * 2); }
.ticks li { position: relative; padding-left: 34px; font-weight: 600; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .2em; width: 22px; height: 22px; border-radius: 50%; background: var(--t-accent, var(--lynx)); border: 2px solid var(--ink);
  -webkit-mask: none; }
.ticks li::after { content: ""; position: absolute; left: 7px; top: calc(.2em + 4px); width: 6px; height: 11px; border: solid var(--ink); border-width: 0 3px 3px 0; transform: rotate(40deg); }

.inside-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: calc(var(--space) * 3); }
.inside { position: relative; display: flex; flex-direction: column; text-decoration: none; color: var(--ink); overflow: hidden; }
.inside-art { aspect-ratio: 3 / 2; background: linear-gradient(165deg, var(--t-bg), var(--t-bg2)); border-bottom: 3px solid var(--ink); overflow: hidden; }
.inside-art img { width: 100%; height: 100%; object-fit: cover; transition: transform 300ms ease-out; }
.inside-art.contain img { object-fit: contain; padding: 12px; }
.inside:hover .inside-art img { transform: scale(1.07); }
.inside-body { padding: calc(var(--space) * 2) calc(var(--space) * 2.5) calc(var(--space) * 2.5); display: flex; flex-direction: column; gap: 4px; flex: 1; }
.inside-body p { color: var(--ink-2); font-size: .9375rem; line-height: 1.4; }
.family-head { display: flex; align-items: center; gap: 12px; margin: calc(var(--space) * 7) 0 calc(var(--space) * 3); }
.family-head:first-of-type { margin-top: 0; }
.family-head .suit { width: 34px; height: 34px; flex: none; }
.family-head .suit-heart, .family-head .suit-diamond { color: var(--red); }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: calc(var(--space) * 2); }
.fact { padding: calc(var(--space) * 2) calc(var(--space) * 2.5); border-radius: 18px; background: var(--surface); color: var(--ink); border: 3px solid var(--ink); }
.fact dt { font-family: var(--font-eyebrow); font-weight: 600; letter-spacing: .2em; text-transform: uppercase; font-size: .75rem; color: var(--ink-2); }
.fact dd { font-family: var(--font-display); font-weight: 800; font-size: 1.1875rem; line-height: 1.25; margin-top: 4px; }

/* Devices and screenshot shelves */
.shots-label { display: flex; align-items: center; gap: 12px; margin: calc(var(--space) * 6) 0 calc(var(--space) * 2); }
.shots { display: flex; align-items: flex-end; gap: calc(var(--space) * 3); overflow-x: auto; scroll-snap-type: x proximity; padding: 12px 4px 28px; scrollbar-width: thin; }
.shots > li { flex: 0 0 auto; scroll-snap-align: start; }
.device { position: relative; display: block; background: #10151D; border: 3px solid #10151D; box-shadow: 0 0 0 2px #3A4658 inset, var(--shadow); }
.device img { display: block; width: auto; }
.device-iphone { border-radius: 34px; padding: 8px; }
.device-iphone img { height: 460px; border-radius: 26px; }
.device-iphone.land img { height: 230px; }
.device-ipad { border-radius: 26px; padding: 12px; }
.device-ipad img { height: 380px; border-radius: 14px; }
.device-ipad.port img { height: 460px; }
.device-duo { border-radius: 30px; padding: 9px; }
.device-duo img { height: 400px; border-radius: 22px; }
.device-duo::after { content: ""; position: absolute; top: 9px; bottom: 9px; left: 50%; width: 2px; margin-left: -1px; background: linear-gradient(to right, rgba(0,0,0,.28), rgba(255,255,255,.14)); pointer-events: none; }
.device-duo.closed::after { display: none; }
/* An iPhone Duo standing half open: two leaves cut from one capture, the far leaf tilted back at the hinge.
   --h is the capture's full height on screen; upright captures are 0.7036 as wide as tall, sideways 1.4208. */
.duo-fold { --h: 440px; --ratio: .7036; --pad: 9px; display: inline-flex; flex-direction: column; align-items: center; perspective: 1300px; filter: drop-shadow(0 18px 22px rgba(10, 20, 35, .35)); }
.duo-fold.side { --h: 400px; --ratio: 1.4208; flex-direction: row; perspective: 1500px; }
.duo-fold .leaf { display: block; background: #10151D; border: 3px solid #10151D; box-shadow: 0 0 0 2px #3A4658 inset; padding: var(--pad); }
.duo-fold .clip { display: block; position: relative; overflow: hidden; height: calc(var(--h) / 2); width: calc(var(--h) * var(--ratio)); }
.duo-fold.side .clip { height: var(--h); width: calc(var(--h) * var(--ratio) / 2); }
.duo-fold .clip img { display: block; height: var(--h); width: calc(var(--h) * var(--ratio)); max-width: none; }
.duo-fold .leaf-near .clip img { margin-top: calc(var(--h) / -2); }
.duo-fold.side .leaf-near .clip img { margin-top: 0; margin-left: calc(var(--h) * var(--ratio) / -2); }
.duo-fold .leaf-far { border-radius: 30px 30px 8px 8px; padding-bottom: 3px; transform-origin: 50% 100%; transform: rotateX(28deg); }
.duo-fold .leaf-far .clip { border-radius: 22px 22px 0 0; }
.duo-fold .leaf-near { border-radius: 8px 8px 30px 30px; padding-top: 3px; }
.duo-fold .leaf-near .clip { border-radius: 0 0 22px 22px; }
.duo-fold.side .leaf-far { border-radius: 30px 8px 8px 30px; padding: var(--pad) 3px var(--pad) var(--pad); transform-origin: 100% 50%; transform: rotateY(24deg); }
.duo-fold.side .leaf-far .clip { border-radius: 22px 0 0 22px; }
.duo-fold.side .leaf-near { border-radius: 8px 30px 30px 8px; padding: var(--pad) var(--pad) var(--pad) 3px; }
.duo-fold.side .leaf-near .clip { border-radius: 0 22px 22px 0; }
.duo-fold .leaf-far .clip::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,.18)); pointer-events: none; }
.duo-fold.side .leaf-far .clip::after { background: linear-gradient(to right, rgba(0,0,0,0), rgba(0,0,0,.18)); }
.device-mac { border-radius: 16px 16px 0 0; padding: 12px 12px 14px; margin-bottom: 18px; }
.device-mac img { height: 340px; border-radius: 4px; }
.device-mac::after { content: ""; position: absolute; left: -9%; right: -9%; bottom: -18px; height: 16px; background: linear-gradient(#C9CFD8, #9AA3B0); border-radius: 0 0 16px 16px; border: 2px solid #10151D; }
.device-plain { background: none; border: 0; box-shadow: none; }
.device-plain img { height: 340px; border-radius: var(--radius-thumb); border: 3px solid var(--ink); box-shadow: var(--pop); }
.shot-cap { display: block; text-align: center; margin-top: 10px; font-weight: 700; font-size: .875rem; color: inherit; opacity: .8; }

/* Timeline */
.timeline { position: relative; display: grid; gap: calc(var(--space) * 4); padding-left: 44px; }
.timeline::before { content: ""; position: absolute; left: 13px; top: 8px; bottom: 8px; width: 8px; border-radius: 4px; background: linear-gradient(#FFD84D, var(--lynx), var(--red), #B04BD8, #4B7BEC, #2CC7A0); }
.tl { position: relative; }
.tl::before { content: ""; position: absolute; left: -44px; top: 10px; width: 34px; height: 34px; border-radius: 50%; background: var(--surface); border: 6px solid var(--ink); }
.tl-year { font-family: var(--font-display); font-weight: 900; font-size: 2rem; line-height: 1; }
.tl-card { margin-top: 10px; padding: calc(var(--space) * 3); display: grid; grid-template-columns: auto 1fr; gap: calc(var(--space) * 2.5); align-items: center; }
.tl-icons { display: flex; }
.tl-icons img { width: 72px; height: 72px; border-radius: 17px; border: 3px solid var(--ink); background: #fff; }
.tl-icons img + img { margin-left: -22px; }
.tl-card p { color: var(--ink-2); margin-top: 4px; }

/* Promise cards */
.promise-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: calc(var(--space) * 3); }
.promise { padding: calc(var(--space) * 3); }
.promise h3 { display: flex; align-items: center; gap: 10px; margin-bottom: var(--space); }
.promise .suit { width: 28px; height: 28px; flex: none; color: var(--red); }
.promise p { color: var(--ink-2); }

/* Call to action band */
.cta { text-align: center; }
.cta .container { display: flex; flex-direction: column; align-items: center; gap: calc(var(--space) * 3); }
.cta-icon { width: 128px; border-radius: 30px; border: 3px solid var(--ink); box-shadow: var(--pop); }
.neighbors { display: grid; grid-template-columns: 1fr 1fr; gap: calc(var(--space) * 3); }
.neighbor { display: flex; align-items: center; gap: 14px; padding: calc(var(--space) * 2); text-decoration: none; color: var(--ink); }
.neighbor img { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; border: 3px solid var(--ink); flex: none; }
.neighbor small { display: block; font-family: var(--font-eyebrow); letter-spacing: .2em; text-transform: uppercase; font-size: .6875rem; color: var(--ink-2); }
.neighbor b { font-family: var(--font-display); font-size: 1.125rem; }
.neighbor.next { flex-direction: row-reverse; text-align: right; }

/* Long-form text (policy pages) and forms */
.page { padding: calc(var(--space) * 7) 0 calc(var(--space) * 10); }
.page-head { margin-bottom: calc(var(--space) * 4); }
.page-head .eyebrow { margin-top: var(--space); }
.prose h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-top: calc(var(--space) * 6); margin-bottom: calc(var(--space) * 2); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: calc(var(--space) * 4); margin-bottom: var(--space); }
.prose p, .prose ul { margin-bottom: calc(var(--space) * 2); }
.prose ul { padding-left: calc(var(--space) * 3); list-style: disc; }
.prose li { margin-bottom: var(--space); }
.prose strong { font-weight: 800; }
.prose a { position: relative; padding: calc(var(--tap) / 2 - 0.5em) 0; }
.prose .tile { background: var(--ivory); border: 3px solid var(--ink); margin: calc(var(--space) * 3) 0; }
.prose .tile p { margin-bottom: 0; }
.form-group { margin-bottom: calc(var(--space) * 3); }
.form-group label { display: block; font-weight: 800; margin-bottom: var(--space); }
.form-group input, .form-group textarea {
  width: 100%; min-height: var(--tap); padding: calc(var(--space) * 1.5) calc(var(--space) * 2);
  background: var(--surface); color: var(--ink); border: 3px solid var(--ink); border-radius: 14px; font: inherit;
}
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--ink-2); }
.form-group textarea { min-height: 180px; resize: vertical; }

/* Scroll reveal: only once site.js has opted the page in, so no-JS visitors see everything */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 600ms ease-out, transform 600ms cubic-bezier(.2,.8,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }

@media (max-width: 1000px) {
  .poster-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .split, .feature-row, .title-hero-grid { grid-template-columns: 1fr; gap: calc(var(--space) * 4); }
  .feature-row:nth-child(even) > .feature-art { order: 0; }
  .title-hero-art { max-width: 460px; margin: 0 auto; }
  .band { padding: calc(var(--space) * 8) 0; }
  .promise-grid { grid-template-columns: 1fr; }
  .site-nav { order: 3; width: 100%; margin-left: -10px; overflow-x: auto; scrollbar-width: none; }
  .site-nav::-webkit-scrollbar { display: none; }
  .header-cta { margin-left: auto; }
}
@media (max-width: 640px) {
  .container { padding: 0 calc(var(--space) * 2); }
  .brand-word { height: 28px; }
  .brand-head { width: 38px; height: 40px; }
  .poster-grid, .neighbors { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: calc(var(--space) * 4); }
  .panel { padding: calc(var(--space) * 3); }
  .gamecard { flex-basis: 232px; }
  .gamecard-icon { top: calc(232px * .75 - 46px); }
  .app-grid { grid-template-columns: 1fr; }
  .app-tile .app-icon { flex-basis: 64px; width: 64px; border-radius: 16px; }
  .device-iphone img { height: 380px; }
  .device-iphone.land img { height: 170px; }
  .device-ipad img { height: 230px; }
  .device-ipad.port img { height: 340px; }
  .device-duo img { height: 250px; }
  .duo-fold { --h: 340px; }
  .duo-fold.side { --h: 220px; }
  .device-mac img { height: 190px; }
  .device-plain img { height: 220px; }
  .floaters .f1, .floaters .f4 { width: 40px; height: 40px; }
  .floaters .f3, .floaters .f5, .floaters .f6 { display: none; }
  .tl-card { grid-template-columns: 1fr; }
  .marquee-track img { height: 76px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
  .js .marquee { overflow-x: auto; }
  .js .marquee-track > span { display: none; }
}

/* Home: flagship panel, classics header, help card */
.flagship { display: grid; grid-template-columns: 1fr 1.1fr; gap: calc(var(--space) * 5); align-items: center; padding: calc(var(--space) * 6) calc(var(--space) * 6) 0; border-radius: var(--radius-panel); overflow: hidden; color: var(--ivory); background: radial-gradient(120% 90% at 30% 0%, #17734E 0%, var(--felt) 45%, var(--felt-deep) 100%); }
.flagship .title-logo { width: 190px; margin-bottom: calc(var(--space) * 2); }
.flagship .lead { color: var(--ivory); }
.flagship .ticks { color: var(--ivory); }
.flagship-art img { width: 100%; filter: drop-shadow(0 18px 24px rgba(0,0,0,.35)); }
.flagship .marquee { grid-column: 1 / -1; margin: 0 calc(var(--space) * -6); padding: calc(var(--space) * 3) 0; background: rgba(0,0,0,.22); border-top: 3px solid var(--ink); }
.classics-head { margin-bottom: calc(var(--space) * 6); grid-template-columns: 1.5fr 1fr; }
.classics-art { width: min(100%, 300px); margin: 0 auto; }
.promise-art { width: min(100%, 360px); margin: 0 auto; }
.help-card { display: grid; grid-template-columns: 240px 1fr; gap: calc(var(--space) * 5); align-items: center; padding: calc(var(--space) * 4) calc(var(--space) * 6); background: var(--sky); overflow: visible; }
.help-art { width: 240px; margin: calc(var(--space) * -9) 0 calc(var(--space) * -4); }
@media (max-width: 860px) {
  .flagship { grid-template-columns: 1fr; padding: calc(var(--space) * 4) calc(var(--space) * 3) 0; }
  .flagship .marquee { margin: 0 calc(var(--space) * -3); }
  .classics-head { grid-template-columns: 1fr; }
  .classics-art, .promise-art { max-width: 220px; }
  .help-card { grid-template-columns: 1fr; padding: calc(var(--space) * 3); text-align: center; }
  .help-art { width: 180px; margin: calc(var(--space) * -8) auto 0; }
  .help-card .btn-row { justify-content: center; }
}

/* Cards Royale: game tiles, cast, steps, moments */
.inside-name { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; line-height: 1.2; }
.inside-body .eyebrow { margin-top: auto; padding-top: 8px; font-size: .6875rem; letter-spacing: .2em; }
.cast { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.cast li { text-align: center; font-family: var(--font-display); font-weight: 800; font-size: .9375rem; }
.cast img { width: 100%; border-radius: 50%; border: 3px solid var(--ink); background: var(--sky); box-shadow: 0 4px 0 var(--ink); margin-bottom: 6px; }
.cast li:nth-child(odd) img { transform: rotate(-3deg); }
.cast li:nth-child(even) img { transform: rotate(3deg); }
.game-logo { max-width: 440px; margin: calc(var(--space) * 2) 0 calc(var(--space) * 2); }
.game-logo img { width: 100%; filter: drop-shadow(0 10px 16px rgba(0,0,0,.35)); }
.game-hero h1 { font-size: clamp(2rem, 4.2vw, 3.25rem); }
.game-hero .eyebrow { margin-bottom: 4px; }
.title-hero-art figure { margin: 0; }
.title-hero-art .device { display: block; }
.title-hero-art .device img { height: auto; width: 100%; }
.title-hero .fineprint { margin-top: calc(var(--space) * 2); opacity: .85; }
.fineprint { font-size: .9375rem; color: inherit; opacity: .8; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: calc(var(--space) * 3); counter-reset: none; }
.step { position: relative; padding: calc(var(--space) * 5) calc(var(--space) * 3) calc(var(--space) * 3); }
.step:nth-child(2) { transform: translateY(14px) rotate(.6deg); }
.step-n { position: absolute; left: 20px; top: -22px; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--lynx); border: 3px solid var(--ink); box-shadow: 0 3px 0 var(--ink); font-family: var(--font-display); font-weight: 900; font-size: 1.5rem; }
.step p { font-size: 1.0625rem; }
.didyouknow { margin-top: calc(var(--space) * 6); display: flex; flex-wrap: wrap; gap: 12px; align-items: center; color: var(--ink-2); font-weight: 600; }
.moments { display: grid; grid-template-columns: repeat(3, 1fr); gap: calc(var(--space) * 3); }
.moment { padding: calc(var(--space) * 3); }
.moment h3 { margin-bottom: var(--space); }
.moment p { color: var(--ink-2); }
.shots-wall { align-items: center; gap: calc(var(--space) * 4); padding-bottom: 36px; }
.shots figure { margin: 0; }
.chips-big li { font-size: 1.0625rem; padding: 0; background: var(--surface); border: 3px solid var(--ink); box-shadow: 0 3px 0 var(--ink); }
.chips-big a { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 18px; font-family: var(--font-display); font-weight: 800; }
.neighbor-logo { flex: 0 0 132px; height: 72px; border-radius: 14px; border: 3px solid var(--ink); background: linear-gradient(165deg, var(--t-bg), var(--t-bg2)); display: grid; place-items: center; padding: 6px; }
.neighbor .neighbor-logo img { width: 100%; height: 100%; object-fit: contain; border: 0; border-radius: 0; }
.duo-promo { margin-top: calc(var(--space) * 5); }
.duo-promo img { width: 100%; border-radius: 24px; }
@media (max-width: 860px) {
  .steps, .moments { grid-template-columns: 1fr; }
  .step:nth-child(2) { transform: none; }
  .cast { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .neighbor-logo { flex-basis: 96px; height: 56px; }
}

/* Classic title pages */
.moments-auto { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.world-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: calc(var(--space) * 3); }
.world { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px 12px 14px; text-align: center; }
.world img { width: 110px; height: auto; border-radius: 10px; }
.world b { font-family: var(--font-display); font-weight: 800; line-height: 1.2; }
.chips-static li span { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 18px; font-family: var(--font-display); font-weight: 800; }
.quote { padding: calc(var(--space) * 3); }
.quote p { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; line-height: 1.3; }
.quote p::before { content: "\201C"; }
.quote p::after { content: "\201D"; }
.quote footer { margin-top: 12px; color: var(--ink-2); font-size: .9375rem; font-weight: 700; }
.quote footer::before { content: "\2605\2605\2605\2605\2605  "; color: var(--gold); letter-spacing: 2px; }
.title-hero .rating { margin: 0 0 calc(var(--space) * 3); }
.title-hero .rating-count { color: inherit; opacity: .85; }
.title-hero-art:not(.framed) img { max-height: 520px; width: auto; margin: 0 auto; filter: drop-shadow(0 18px 24px rgba(0,0,0,.3)); }
.title-hero-art.framed img { max-height: 520px; width: auto; margin: 0 auto; }

/* Casino Royale floor */
.casino-floor { background: radial-gradient(120% 60% at 50% 0%, #5A1220 0%, var(--t-bg) 30%, var(--t-bg2) 100%); }
.casino-floor .chips-big li { background: #FFF3D6; }
.casino-grid .inside { background: #FFF8E7; }
.casino-grid .inside-art { background: radial-gradient(90% 90% at 50% 30%, #5A1220, #1C070B); aspect-ratio: 4 / 3; }
.casino-game-logo { max-width: 400px; }
.casino-game-logo img { max-height: 300px; width: auto; }
.casino-hero .title-hero-art > img { max-height: 420px; }
.casino-logo { background: radial-gradient(90% 90% at 50% 30%, #5A1220, #1C070B); }

/* Tilian Wars */
.tw-hero { padding-bottom: 0; background: linear-gradient(180deg, #2A1F47, #120E24); }
.tw-splash { margin-top: calc(var(--space) * 2); }
/* Crop from the top when the window is short: the logo sits at the bottom of the painting and must stay whole */
.tw-splash img { width: 100%; max-height: 82vh; object-fit: cover; object-position: 50% 100%; border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink); }
.tw-hero-copy { display: grid; grid-template-columns: 1.25fr 1fr; gap: calc(var(--space) * 6); align-items: center; padding-top: calc(var(--space) * 6); padding-bottom: calc(var(--space) * 8); }
.tw-story { padding: calc(var(--space) * 4); transform: rotate(1.5deg); background: #FFF6DA; }
.tw-story p { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; line-height: 1.35; color: var(--ink); }
.keyart { margin: calc(var(--space) * 7) 0 0; overflow: hidden; border-radius: var(--radius-panel); }
.keyart img { width: 100%; }
.tw-band { background: radial-gradient(120% 70% at 50% 0%, #3A2C63 0%, var(--t-bg) 40%, var(--t-bg2) 100%); }
.tw-field { background: #7FA650 url(/images/titles/tilian-wars/ground.webp) center / 432px; }
.tw-field .band-head { background: rgba(255,255,255,.92); border: 3px solid var(--ink); box-shadow: var(--pop); border-radius: var(--radius-tile); padding: calc(var(--space) * 3) calc(var(--space) * 4); display: inline-block; }
.unit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: calc(var(--space) * 3); }
.unit { padding: calc(var(--space) * 3); display: flex; flex-direction: column; gap: 6px; }
.unit p { color: var(--ink-2); font-size: .9688rem; }
.unit .eyebrow { font-size: .6875rem; }
.unit-art { height: 150px; display: flex; align-items: flex-end; justify-content: center; gap: 10px; margin-bottom: 10px; padding: 12px; border-radius: 14px; background: #7FA650 url(/images/titles/tilian-wars/ground.webp) center / 300px; border: 3px solid var(--ink); }
.unit-art img { width: auto; max-height: 124px; max-width: 100%; image-rendering: auto; filter: drop-shadow(0 6px 4px rgba(0,0,0,.35)); transition: transform 200ms cubic-bezier(.2,.9,.3,1.4); }
.unit-art.levels img { max-height: 112px; max-width: 30%; }
.unit:hover .unit-art img { transform: translateY(-6px) scale(1.06); }
.unit-ally { background: var(--sky); }
.tw-icon { width: min(100%, 260px); margin: 0 auto; border-radius: 58px; border: 3px solid var(--ink); box-shadow: var(--pop); transform: rotate(-4deg); }
@media (max-width: 860px) {
  .tw-hero-copy { grid-template-columns: 1fr; gap: calc(var(--space) * 3); }
  .tw-story { transform: none; }
}

/* Scrapbook Solitaire: paper, stitches and stickers */
.sb-hero { background: linear-gradient(180deg, #BFD9EA 0%, #DCEAF2 55%, #F6EEDD 100%); }
.sb-hero-art img { max-height: 560px; width: auto; margin: 0 auto; filter: drop-shadow(0 10px 0 rgba(92,107,128,.18)); }
.sb-paper { background-color: #F6EEDD; background-image: radial-gradient(#F0B8B8 2.5px, transparent 3px); background-size: 34px 34px; }
.sb-sky { background: #BFD9EA; }
.sb-stickers { display: flex; flex-wrap: wrap; justify-content: center; gap: calc(var(--space) * 4) calc(var(--space) * 5); }
.sb-sticker { width: 190px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; transition: transform 220ms cubic-bezier(.2,.9,.3,1.4); }
.sb-sticker:nth-child(odd) { transform: rotate(-4deg); }
.sb-sticker:nth-child(even) { transform: rotate(3deg) translateY(10px); }
.sb-sticker:hover { transform: rotate(0) scale(1.1); }
.sb-sticker img { width: 100%; height: 130px; object-fit: contain; filter: drop-shadow(0 5px 3px rgba(92,107,128,.35)); }
.sb-sticker b { font-family: var(--font-display); color: #3A4658; }
.sb-sticker span { font-size: .9375rem; color: #5C6B80; font-style: italic; }

/* Slots of Treasure worlds */
.world-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: calc(var(--space) * 4); }
.world-card { position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr; }
.world-scene img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: 3px solid var(--ink); }
.world-copy { padding: calc(var(--space) * 3); }
.world-copy p:last-child { color: var(--ink-2); margin-top: 6px; }

/* Catalog header and flagship tile */
.games-head { padding-top: calc(var(--space) * 6); overflow: hidden; }
.games-head-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: calc(var(--space) * 4); align-items: end; }
.games-head-grid > div:first-child { padding-bottom: calc(var(--space) * 7); }
.games-head-art { width: min(100%, 300px); margin: 0 auto calc(var(--space) * -3); }
.feature-tile { display: grid; grid-template-columns: 150px 1.2fr 1fr; gap: calc(var(--space) * 4); align-items: center; padding: calc(var(--space) * 4); border-radius: var(--radius-panel); color: var(--t-ink); background: linear-gradient(165deg, var(--t-bg), var(--t-bg2)); overflow: hidden; }
.feature-tile .app-icon { width: 150px; border-radius: 34px; border: 3px solid var(--ink); }
.feature-tile .lead, .feature-tile .eyebrow { color: inherit; }
.feature-tile h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
.feature-tile-art img { width: 100%; filter: drop-shadow(0 12px 16px rgba(0,0,0,.35)); }

/* About, support, not found */
.about-hero { padding-top: calc(var(--space) * 8); padding-bottom: calc(var(--space) * 6); }
.about-hero h1 { font-size: clamp(2.3rem, 5vw, 3.75rem); }
.history-art { width: 220px; margin: 0 auto calc(var(--space) * 2); }
.support-art { width: 190px; margin: 0 0 calc(var(--space) * -3) auto; position: relative; z-index: 1; }
.notfound-art { width: min(100%, 360px); margin: 0 auto calc(var(--space) * 3); }
.notfound h1 { font-size: clamp(2.2rem, 5vw, 3.75rem); }
.band-navy .poster, .band-navy .pop { color: var(--ink); }
@media (max-width: 860px) {
  .world-cards, .games-head-grid { grid-template-columns: 1fr; }
  .games-head-grid > div:first-child { padding-bottom: 0; }
  .games-head-art { max-width: 200px; }
  .feature-tile { grid-template-columns: 1fr; }
  .feature-tile .app-icon { width: 110px; border-radius: 26px; }
  .sb-sticker { width: 140px; }
  .sb-hero-art img { max-height: 380px; }
}

/* Small type and spacing corrections */
.title-hero .eyebrow, .band-title .eyebrow { color: inherit; }
.eyebrow + h1, .eyebrow + h2, .eyebrow + h3 { margin-top: 10px; }
.family-head { align-items: flex-start; }
.family-head .suit { margin-top: 2px; }
.family-head .lead { margin-top: 4px; font-size: 1.0625rem; }

/* Review pass */
.inside-grid { grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); gap: calc(var(--space) * 2.5); }
.device { display: inline-block; vertical-align: bottom; }
.feature-art figure { margin: 0; text-align: center; }
.feature-art .device img { width: auto; height: auto; max-width: 100%; max-height: 480px; border-radius: 14px; }
.feature-art .device-iphone img { border-radius: 26px; }
.feature-art > img { max-height: 520px; width: auto; max-width: 100%; margin: 0 auto; }
.feature-art.framed > img { width: 100%; max-height: none; }
@media (max-width: 640px) {
  .site-nav .nav-wide { display: none; }
  .floaters .f1 { left: 5%; top: 14px; }
  .floaters .f2 { right: 6%; top: 10px; width: 34px; height: 34px; }
  .floaters .f4 { right: 4%; top: auto; bottom: 46%; }
}
.title-logo-wide { width: min(420px, 90%); }
.warmed-up { margin-top: calc(var(--space) * 7); }
.warmed-up .lead { font-family: var(--font-display); font-weight: 800; color: var(--ink); font-size: 1.4rem; }
.gamecard-more { color: #B34700; }
.band-navy .gamecard-more { color: #B34700; }
.poster-body .eyebrow { color: var(--ink-2); opacity: 1; }
.inside-body .inside-name { margin: 0; }
@media (max-width: 640px) {
  .inside-grid { grid-template-columns: 1fr 1fr; gap: calc(var(--space) * 1.5); }
  .inside-body { padding: 10px 12px 14px; }
  .inside-name { font-size: 1.0625rem; }
}
/* The two-row header would cover too much of a phone screen if it stayed pinned */
@media (max-width: 860px) { .site-header { position: static; } }

/* Focus rings stay visible on dark bands */
.band-navy :focus-visible, .band-felt :focus-visible, .band-title :focus-visible, .title-hero :focus-visible,
.flagship :focus-visible, .site-footer :focus-visible, .feature-tile :focus-visible { outline-color: #FFD84D; }
.sb-hero :focus-visible { outline-color: var(--focus); }

/* The marquee can be stopped: it rests while hovered or focused, and its button pauses it for good */
.marquee { position: relative; }
.marquee:hover .marquee-track, .marquee:focus-within .marquee-track, .marquee.paused .marquee-track { animation-play-state: paused; }
.marquee-toggle { display: none; }
.js .marquee-toggle {
  display: inline-flex; align-items: center; position: absolute; right: 16px; bottom: 10px; min-height: 36px; padding: 0 14px;
  border-radius: var(--radius-pill); border: 2px solid var(--ink); background: var(--ivory); color: var(--ink);
  font-family: var(--font-display); font-weight: 800; font-size: .875rem; cursor: pointer;
}

/* Very narrow phones: the header button gives way to the Cards Royale link */
@media (max-width: 380px) {
  .header-cta { display: none; }
  .site-nav .nav-wide { display: inline-flex; }
  .site-nav a { padding: 0 9px; font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) { .js .marquee-toggle { display: none; } }
.keyart figcaption { padding: 12px 20px; font-weight: 700; color: var(--ink-2); background: var(--surface); border-top: 3px solid var(--ink); }
.unit-art-big { height: 190px; }
.unit-art-big img { max-height: 164px; }

/* The lynx joins the home hero where there is room beside the headline */
.hero-lynx { display: none; }
@media (min-width: 1180px) {
  .hero-lynx {
    display: block; position: absolute; z-index: 1; width: 236px; height: auto; top: 64px; right: max(14px, calc((100vw - 1420px) / 2));
    /* the felt table edge in the art fades out at both ends; the lynx above it stays whole */
    -webkit-mask-image: linear-gradient(#000 0 76%, transparent 76%), linear-gradient(to right, transparent 2%, #000 22%, #000 78%, transparent 98%);
    mask-image: linear-gradient(#000 0 76%, transparent 76%), linear-gradient(to right, transparent 2%, #000 22%, #000 78%, transparent 98%);
  }
  .hero .lead { max-width: 50ch; }
  .floaters .f2 { right: 31%; top: 30px; }
  .floaters .f4 { right: auto; left: 20%; top: 60%; }
  .floaters .f6 { display: none; }
}
@media (min-width: 1440px) { .hero-lynx { width: 300px; top: 48px; } }

/* Cards Royale: the App Store header art, and the iPhone Duo's three postures */
.showcase-band { padding-top: calc(var(--space) * 6); padding-bottom: calc(var(--space) * 6); }
.showcase { margin: 0; border-radius: 24px; overflow: hidden; border: 3px solid var(--ink); }
.showcase img { display: block; width: 100%; height: auto; }
.duo-postures { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end; gap: calc(var(--space) * 4); margin: calc(var(--space) * 5) 0; }
.duo-postures figure { margin: 0; }
.duo-postures .device-duo img { height: 300px; }
.duo-postures .device-duo.closed img { height: 180px; }
.duo-postures .duo-fold { --h: 430px; }
@media (max-width: 640px) {
  .duo-postures .device-duo img { height: 200px; }
  .duo-postures .device-duo.closed img { height: 140px; }
  .duo-postures .duo-fold { --h: 360px; }
}
.flagship-art img.flagship-store { border-radius: 18px; border: 3px solid var(--ink); }

/* Cards Royale: how to play pages */
.rules-more { margin-top: calc(var(--space) * 5); }
.rules-players { font-weight: 700; margin: calc(var(--space) * 1.5) 0 calc(var(--space) * 3); opacity: .9; }
.rules-toc { margin-bottom: calc(var(--space) * 4); }
.rules-toc .chips { justify-content: center; }
.rules .rules-chapter { scroll-margin-top: 90px; }
.rules .rules-chapter + .rules-chapter, .rules .rules-lesson + .rules-chapter { margin-top: calc(var(--space) * 5); }
.rules p { font-size: 1.0625rem; line-height: 1.65; }
.rules-source { margin-top: calc(var(--space) * 2); text-align: center; }

/* Lesson videos: a still image until pressed, then YouTube */
.yt { margin: 0; }
.yt-play, .yt iframe { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 20px; overflow: hidden; border: 3px solid var(--ink); box-shadow: var(--pop); background: #000; }
.yt-play img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yt-button { position: absolute; left: 50%; top: 50%; width: 96px; height: 68px; transform: translate(-50%, -50%); border-radius: 18px; background: #FA7400; border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink); transition: transform .15s; }
.yt-button::after { content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-35%, -50%); border-style: solid; border-width: 15px 0 15px 26px; border-color: transparent transparent transparent #fff; }
.yt-play:hover .yt-button, .yt-play:focus-visible .yt-button { transform: translate(-50%, -50%) scale(1.08); }
.yt figcaption { margin-top: 12px; text-align: center; font-weight: 600; opacity: .85; }
.watch .yt { margin-top: calc(var(--space) * 3); }
.watch-inline { max-width: 820px; margin: calc(var(--space) * 5) auto 0; }

/* Lesson shelf on the Cards Royale page */
.vids { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: calc(var(--space) * 3); }
.vid { display: block; background: var(--surface); color: var(--ink); border-radius: 20px; overflow: hidden; text-decoration: none; border: 3px solid var(--ink); }
.vid-art { position: relative; display: block; aspect-ratio: 16 / 9; background: #000; }
.vid-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yt-button-sm { width: 64px; height: 46px; border-radius: 13px; }
.yt-button-sm::after { border-width: 10px 0 10px 17px; }
.vid:hover .yt-button, .vid:focus-visible .yt-button { transform: translate(-50%, -50%) scale(1.08); }
.vid-len { position: absolute; right: 10px; bottom: 10px; padding: 2px 8px; border-radius: 6px; background: rgba(0,0,0,.75); color: #fff; font-weight: 700; font-size: .8125rem; }
.vid-body { display: block; padding: 14px 16px 16px; }
.vid-body b { display: block; font-family: var(--font-display); font-size: 1.2rem; }
.vid-body small { display: block; margin-top: 4px; opacity: .75; font-weight: 600; }
.vids-more { margin-top: calc(var(--space) * 4); text-align: center; }
