/* PP Studio (ppstudio.dev): an independent game studio in Hong Kong. Warm paper, ink and one vermilion seal, so its
   very different games (a pink wedding farce, a dark pixel-art fantasy) both sit well in it. Light and dark. */
:root {
  --paper: #F6F1EA;
  --paper-2: #EFE7DC;
  --card: #FFFFFF;
  --ink: #1E1B18;
  --ink-soft: #6B635A;
  --line: #E2D9CE;
  --seal: #D9402E;
  --seal-ink: #FFFFFF;
  --shadow: 0 18px 40px rgba(40, 28, 18, .14), 0 3px 8px rgba(40, 28, 18, .08);
  --display: "Bricolage Grotesque", "Noto Sans TC", system-ui, sans-serif;
  --text: "Figtree", "Noto Sans TC", system-ui, sans-serif;
  --max: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #141210; --paper-2: #1B1815; --card: #1F1C19; --ink: #F3EDE4; --ink-soft: #A79E92; --line: #2E2925;
    --seal: #EE5640; --shadow: 0 18px 40px rgba(0, 0, 0, .45), 0 3px 8px rgba(0, 0, 0, .3); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #141210; --paper-2: #1B1815; --card: #1F1C19; --ink: #F3EDE4; --ink-soft: #A79E92; --line: #2E2925;
  --seal: #EE5640; --shadow: 0 18px 40px rgba(0, 0, 0, .45), 0 3px 8px rgba(0, 0, 0, .3); color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.65 var(--text); overflow-x: hidden; }
:lang(zh-Hant) body, body:lang(zh-Hant) { line-height: 1.8; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.08; letter-spacing: -.02em; margin: 0; text-wrap: balance; }
:lang(zh-Hant) h1, :lang(zh-Hant) h2, :lang(zh-Hant) h3 { letter-spacing: .02em; line-height: 1.25; }
p { margin: 0; text-wrap: pretty; }
.shell { width: 100%; max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--card); padding: 8px 14px; border-radius: 999px; z-index: 9; }
.skip:focus { left: 12px; }
:focus-visible { outline: 3px solid var(--seal); outline-offset: 3px; border-radius: 6px; }

/* the seal */
.seal { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 9px; background: var(--seal); color: var(--seal-ink);
  font: 800 17px/1 var(--display); letter-spacing: -.04em; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .28), inset 0 0 0 4px var(--seal); rotate: -4deg; }
.seal.big { width: clamp(84px, 11vw, 120px); height: clamp(84px, 11vw, 120px); border-radius: 20px; font-size: clamp(36px, 5vw, 52px);
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, .3), inset 0 0 0 8px var(--seal), var(--shadow); }

/* header */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--paper) 86%, transparent); backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.top .shell { display: flex; align-items: center; gap: 18px; min-height: 66px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font: 800 19px/1 var(--display); letter-spacing: -.01em; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { text-decoration: none; color: var(--ink-soft); font-size: 15px; padding: 6px 12px; border-radius: 999px; }
.nav a:hover { color: var(--ink); background: var(--paper-2); }
.langs { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; flex: none; }
.langs a { text-decoration: none; color: var(--ink-soft); font-size: 13px; font-weight: 600; padding: 3px 11px; border-radius: 999px; }
.langs a[aria-current] { background: var(--ink); color: var(--paper); }
@media (max-width: 720px) { .nav { display: none; } .langs { margin-left: auto; } }

/* hero */
.hero { padding-block: clamp(48px, 8vw, 110px) clamp(56px, 8vw, 110px); }
.hero .shell { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(36px, 6vw, 80px); align-items: center; }
@media (max-width: 900px) { .hero .shell { grid-template-columns: minmax(0, 1fr); } }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--seal); }
:lang(zh-Hant) .eyebrow { letter-spacing: .2em; text-transform: none; }
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; border-radius: 2px; }
.hero h1 { font-size: clamp(44px, 6.6vw, 84px); margin: 18px 0 22px; }
.hero h1 em { font-style: normal; color: var(--seal); }
.hero .lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-soft); max-width: 32em; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.btn { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 600; font-size: 16px; padding: 12px 22px; border-radius: 999px; }
.btn.solid { background: var(--ink); color: var(--paper); }
.btn.solid:hover { background: var(--seal); color: #fff; }
.btn.line { border: 1.5px solid var(--line); }
.btn.line:hover { border-color: var(--ink); }

/* the two games, as cards on the table */
.stack { position: relative; aspect-ratio: 1 / .92; max-width: 560px; justify-self: center; width: 100%; }
.stack .card { position: absolute; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); text-decoration: none; transition: rotate .3s ease, translate .3s ease; }
.stack .wedding { left: 0; top: 0; width: 80%; aspect-ratio: 4 / 3; rotate: -5deg; z-index: 1; }
.stack .c4h { right: 0; bottom: 0; width: 46%; aspect-ratio: 3 / 4; rotate: 6deg; z-index: 2; }
.stack .card:hover { rotate: 0deg; translate: 0 -6px; z-index: 3; }
.stack .stamp { position: absolute; left: 6%; bottom: 2%; z-index: 4; rotate: -10deg; }

/* a game's art panels, drawn from its own pieces */
.art-wedding { position: relative; width: 100%; height: 100%; background: #FDF1EC; overflow: hidden; isolation: isolate; }
.art-wedding::before { content: ""; position: absolute; inset: -60%; z-index: -2;
  background: repeating-conic-gradient(from 0deg at 50% 50%, rgba(212, 63, 87, .07) 0deg 4deg, transparent 4deg 8deg); }
.art-wedding .xi { position: absolute; inset: 0; display: grid; place-items: center; z-index: -1; font: 900 min(60vw, 420px)/1 "Noto Sans TC", sans-serif; color: rgba(212, 63, 87, .1); }
.art-wedding .logo { position: absolute; left: 50%; top: 6%; width: 58%; translate: -50% 0; filter: drop-shadow(0 8px 14px rgba(126, 28, 46, .2)); }
.art-wedding .guests { position: absolute; left: 0; right: 0; bottom: -6%; display: flex; justify-content: center; align-items: flex-end; height: 40%; }
.art-wedding .guests img { height: 100%; width: auto; margin-inline: -5%; }
.art-wedding .guests img:nth-child(odd) { height: 90%; }
.art-c4h { position: relative; width: 100%; height: 100%; overflow: hidden; isolation: isolate;
  background: radial-gradient(ellipse at 50% 85%, #6B2A12 0%, #2A1736 55%, #120D1C 100%); image-rendering: pixelated; }
.art-c4h .boss { position: absolute; left: 50%; bottom: 2%; width: 86%; translate: -50% 0; z-index: -1; filter: drop-shadow(0 0 24px rgba(255, 120, 40, .45)); }
.art-c4h .word { position: absolute; left: 50%; top: 7%; width: 88%; translate: -50% 0; }

/* sections */
section { padding-block: clamp(64px, 9vw, 120px); }
.alt { background: var(--paper-2); }
.head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: clamp(32px, 5vw, 56px); }
.head h2 { font-size: clamp(34px, 4.6vw, 56px); }
.head p { color: var(--ink-soft); max-width: 30em; }

.game { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.game + .game { margin-top: clamp(56px, 8vw, 96px); }
.game.flip { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
.game.flip .panel { order: 2; }
@media (max-width: 880px) { .game, .game.flip { grid-template-columns: minmax(0, 1fr); } .game.flip .panel { order: 0; } }
.panel { border-radius: 26px; overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 16 / 11; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; list-style: none; padding: 0; }
.chips li { font-size: 13px; font-weight: 600; padding: 4px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--ink-soft); }
.chips li.live { background: var(--seal); border-color: var(--seal); color: #fff; }
.game h3 { font-size: clamp(30px, 3.6vw, 44px); }
.game .sub { font: 600 16px/1.4 var(--text); color: var(--ink-soft); margin: 8px 0 16px; }
.game p.desc { font-size: 17px; }
.game .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.game .icon { width: 64px; height: 64px; border-radius: 15px; box-shadow: var(--shadow); margin-bottom: 18px; }

/* what we care about */
.values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 28px); list-style: none; padding: 0; margin: 0; }
@media (max-width: 760px) { .values { grid-template-columns: minmax(0, 1fr); } }
.values li { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 24px; }
.values svg { width: 34px; height: 34px; color: var(--seal); margin-bottom: 14px; }
.values b { display: block; font: 700 20px/1.3 var(--display); margin-bottom: 6px; }
.values span { color: var(--ink-soft); font-size: 15px; }

/* contact */
.contact { text-align: center; }
.contact h2 { font-size: clamp(36px, 5.4vw, 68px); margin: 22px 0 14px; }
.contact p { color: var(--ink-soft); }
.mail { display: inline-flex; margin-top: 28px; font: 700 clamp(20px, 2.6vw, 30px)/1.2 var(--display); text-decoration: none;
  border-bottom: 3px solid var(--seal); padding-bottom: 4px; word-break: break-all; }
.mail:hover { color: var(--seal); }

footer { border-top: 1px solid var(--line); padding-block: 32px; font-size: 14px; color: var(--ink-soft); }
footer .shell { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 28px; }
footer nav span { display: flex; gap: 14px; }
footer a { color: var(--ink-soft); }
footer a.name { color: var(--ink); font-weight: 600; text-decoration: none; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } html { scroll-behavior: auto; } }
