/* Issac & Co — studio site, "Quiet Gallery".
   A calm cream page, one display face (Bricolage Grotesque) used with care, and every game on a card of
   the same size in its own colours. Each game brings --t-bg / --t-fg /
   --t-ac / --t-soft from src/games.json. */

@font-face { font-family: "Bricolage Grotesque"; src: url("/assets/fonts/BricolageGrotesque.woff2") format("woff2");
  font-weight: 200 800; font-display: swap; }

:root {
  --paper: #F7F5F0; --paper-2: #EFEBE2;
  --ink: #292C2B; --muted: #5B605C; --line: rgba(41, 44, 43, .13);
  --forest: #26352E; --gold: #A8834A;
  --display: "Bricolage Grotesque", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", Helvetica, Arial, sans-serif;
  --max: 1200px; --gutter: clamp(16px, 4vw, 32px);
  --radius: clamp(20px, 2.4vw, 28px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --space: clamp(88px, 12vw, 144px);
  color-scheme: light;
}

@view-transition { navigation: auto; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased; overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { list-style: none; padding: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); }
.narrow { max-width: calc(760px + 2 * var(--gutter)); }
.center { text-align: center; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: var(--paper);
  padding: 10px 16px; border-radius: 999px; font-weight: 600; text-decoration: none; transition: top .2s; }
.skip:focus { top: 12px; }

h1, h2, .logo, .card-title { font-family: var(--display); font-optical-sizing: auto; font-weight: 700; }
h1 em, h2 em { font-style: normal; font-weight: 500; color: var(--forest); }
html[lang="zh-Hant"] h1 em, html[lang="zh-Hant"] h2 em { font-style: normal; }
html[lang="zh-Hant"] :is(.hero h1, .studio h2, .contact h2, .g-section h2) { letter-spacing: .02em !important; }
[lang="zh-Hant"] { word-break: keep-all; overflow-wrap: anywhere; }
:is(h1, h2, h3) [lang="zh-Hant"] { letter-spacing: .02em; }

.eyebrow { font: 600 12px/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: 18px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 24px;
  border-radius: 999px; background: var(--ink); color: var(--paper); font: 600 15px/1 var(--sans); text-decoration: none;
  transition: transform .25s var(--ease), opacity .25s; }
.btn:hover { opacity: .88; } .btn:active { transform: scale(.97); }
.btn svg { width: 18px; height: 18px; }
.arrow { display: inline-block; transition: transform .25s var(--ease); }
a:hover .arrow { transform: translateX(3px); }
.text-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 600; font-size: 15px; text-underline-offset: 5px; }

/* ---- Navigation ---- */

.nav { position: sticky; top: 0; z-index: 30; padding-top: env(safe-area-inset-top, 0px);
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(16px); backdrop-filter: saturate(160%) blur(16px); view-transition-name: nav; }
.nav-row { display: flex; align-items: center; gap: 28px; min-height: 72px; }
.logo { font-size: 20px; font-weight: 800; letter-spacing: -.01em; text-decoration: none; white-space: nowrap; margin-right: auto; }
.logo em { font-style: normal; font-weight: 500; color: var(--gold); padding: 0 1px; }
.nav-links { display: flex; gap: 4px; }
.nav-links a, .menu-panel nav > a { text-decoration: none; font-size: 15px; padding: 10px 12px; border-radius: 999px; transition: background-color .2s; }
.nav-links a:hover { background: rgba(41, 44, 43, .06); }
.lang { display: inline-flex; padding: 3px; border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(41, 44, 43, .18); }
.lang a { font: 600 13px/1 var(--sans); padding: 8px 11px; border-radius: 999px; text-decoration: none; min-width: 40px; text-align: center; }
.lang a[aria-current] { background: var(--ink); color: var(--paper); }
.menu-btn { display: none; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; border: 0; border-radius: 999px;
  background: rgba(41, 44, 43, .07); color: inherit; font: 600 15px/1 var(--sans); cursor: pointer; }
.menu-btn i { position: relative; width: 16px; height: 10px; }
.menu-btn i::before, .menu-btn i::after { content: ""; position: absolute; left: 0; right: 0; height: 1.6px; background: currentColor;
  border-radius: 2px; transition: transform .3s var(--ease), top .3s var(--ease); }
.menu-btn i::before { top: 1px; } .menu-btn i::after { top: 7px; }
.menu-btn[aria-expanded="true"] i::before { top: 4px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] i::after { top: 4px; transform: rotate(-45deg); }
.menu-panel { border-top: 1px solid var(--line); background: var(--paper); }
.menu-panel nav { display: grid; gap: 2px; padding-block: 12px 24px; }
.menu-panel nav > a { font-family: var(--display); font-weight: 700; letter-spacing: -.02em; font-size: 28px; padding: 10px 0; border-radius: 0; }
.menu-panel .lang { justify-self: start; margin-top: 14px; }
@media (max-width: 760px) {
  .nav-links, .nav-row > .lang { display: none; }
  .menu-btn { display: inline-flex; }
  html:not(.js) .menu-btn { display: none; }
  html:not(.js) .nav-row > .lang { display: inline-flex; }
}
@media (min-width: 761px) { .menu-panel { display: none !important; } }

/* ---- Hero ---- */

.hero { text-align: center; padding-block: clamp(72px, 12vw, 136px) clamp(64px, 9vw, 112px); }
.hero h1 { font-size: clamp(48px, 8vw, 104px); line-height: .98; letter-spacing: -.03em; max-width: 12ch; margin-inline: auto; text-wrap: balance; }
html[lang="zh-Hant"] .hero h1 { font-size: clamp(42px, 7vw, 88px); line-height: 1.15; max-width: none; }
.hero-p { margin: 28px auto 0; font-size: clamp(17px, 1.6vw, 19px); line-height: 1.65; color: var(--muted); max-width: 34em; text-wrap: pretty; }
.hero .btn { margin-top: 32px; }
.hero-small { padding-bottom: clamp(48px, 7vw, 80px); }

/* ---- Game cards: one size for every game ---- */

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr)); gap: 20px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.card { display: flex; flex-direction: column; gap: 28px; padding: 20px 20px 36px; border-radius: var(--radius);
  background: var(--t-bg); color: var(--t-fg); text-decoration: none; transition: translate .5s var(--ease), box-shadow .5s var(--ease); }
.card:hover { translate: 0 -4px; box-shadow: 0 30px 50px -36px rgba(0, 0, 0, .45); }
.card-frame { display: block; overflow: hidden; border-radius: calc(var(--radius) - 8px); background: var(--t-soft); }
.card-art { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform 1.2s var(--ease); }
.card:hover .card-art { transform: scale(1.04); }
.card-art-empty { display: grid; place-items: center; aspect-ratio: 16 / 10; }
.card-art-empty img { width: 112px; border-radius: 23%; }
.card-body { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding-inline: 16px; flex: 1; }
.card-status { font: 600 12px/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--t-ac); }
.card-title { font-size: clamp(34px, 3.4vw, 44px); line-height: 1.05; letter-spacing: -.02em; text-wrap: balance; }
.alt-title { font: 500 17px/1.3 var(--display); letter-spacing: .1em; opacity: .7; }
.alt-title:lang(en) { letter-spacing: 0; }
.card-tag { font-size: 16px; line-height: 1.55; opacity: .82; max-width: 26em; }
.card-note { font-size: 13px; font-weight: 500; opacity: .7; }
.card-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 22px; border-radius: 999px;
  background: var(--t-fg); color: var(--t-bg); font: 600 15px/1 var(--sans); margin-top: auto; }
.card-body > :nth-last-child(2) { margin-bottom: 14px; }
.card-compact { gap: 20px; padding: 14px 14px 26px; }
.card-compact .card-title { font-size: 28px; }
.card-compact .alt-title { font-size: 15px; }
.card-compact .card-btn { min-height: 42px; font-size: 14px; }

/* ---- Studio + contact ---- */

.games { padding-bottom: var(--space); }
.studio, .contact { text-align: center; padding-block: 0 var(--space); }
.studio h2, .contact h2 { font-size: clamp(38px, 5vw, 56px); line-height: 1.08; letter-spacing: -.02em; text-wrap: balance; }
.studio-p { margin-top: 24px; font-size: 18px; line-height: 1.75; color: var(--muted); text-wrap: pretty; }
.contact p { margin-top: 18px; color: var(--muted); }
.mail { display: inline-block; margin-top: 28px; font: 600 clamp(22px, 2.6vw, 28px)/1.2 var(--display); text-underline-offset: 7px;
  text-decoration-thickness: 1px; overflow-wrap: anywhere; }
.mail:hover { text-decoration-thickness: 2px; }

/* ---- Footer ---- */

.foot { border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); font-size: 14px; }
.foot-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 40px; padding-block: 56px 40px; }
.foot-brand .logo { font-size: 20px; }
.foot-brand p { font: 500 16px/1.4 var(--display); color: var(--muted); margin-top: 8px; }
.foot-mail { display: inline-block; margin-top: 14px; color: var(--muted); text-underline-offset: 4px; }
.foot-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 20px; }
.foot h2 { font: 600 11px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.foot-cols a { display: inline-block; padding: 4px 0; text-decoration: none; color: var(--ink); }
.foot-cols a:hover { text-decoration: underline; text-underline-offset: 3px; }
.social a { display: inline-flex; align-items: center; gap: 7px; }
.social svg { width: 16px; height: 16px; }
.foot-base { border-top: 1px solid var(--line); padding-block: 20px 28px; color: var(--muted); }
@media (max-width: 900px) { .foot-top { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---- Game pages ---- */

.g-hero { padding-block: 8px 0; }
.crumbs { display: flex; gap: 10px; font-size: 14px; color: var(--muted); margin: 8px 0 20px; }
.crumbs a { text-decoration: none; } .crumbs a:hover { text-decoration: underline; }
.panel { border-radius: var(--radius); padding: 20px 20px clamp(40px, 5vw, 64px); background: var(--t-bg); color: var(--t-fg); }
.panel-art { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; border-radius: calc(var(--radius) - 8px); background: var(--t-soft); }
.panel-body { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px;
  max-width: 640px; margin: -40px auto 0; padding-inline: 12px; position: relative; }
.panel-body .app-icon { width: 80px; height: 80px; border-radius: 23%; box-shadow: 0 0 0 5px var(--t-bg), 0 18px 30px -16px rgba(0, 0, 0, .5); margin-bottom: 8px; }
.panel h1 { font-size: clamp(46px, 6.4vw, 84px); line-height: 1; letter-spacing: -.03em; text-wrap: balance; }
.panel .alt-title { font-size: clamp(18px, 2vw, 24px); }
.g-genre { font: 600 18px/1.4 var(--display); color: var(--t-ac); }
.g-tagline { font: 600 clamp(20px, 2.2vw, 26px)/1.35 var(--display); margin-top: 12px; text-wrap: balance; }
.g-desc { font-size: 17px; line-height: 1.65; opacity: .82; text-wrap: pretty; }
.pricing { margin-top: 6px; font-weight: 600; font-size: 14px; letter-spacing: .02em; padding: 9px 16px; border-radius: 999px;
  background: color-mix(in srgb, var(--t-ac) 13%, transparent); }
.laurels { display: grid; gap: 4px; font-size: 14px; }
.laurels span { opacity: .65; margin-left: 8px; }
.stores { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 10px; }
.store { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 18px 8px 14px; border-radius: 13px;
  background: #121212; color: #fff; text-decoration: none; transition: transform .25s var(--ease); }
.store:hover { transform: translateY(-2px); }
.store svg { width: 24px; height: 24px; fill: currentColor; flex: none; }
.store span { display: grid; line-height: 1.1; text-align: left; }
.store small { font-size: 11px; opacity: .8; }
.store b { font-size: 17px; font-weight: 600; }
.store-note { font-size: 12px; opacity: .6; }

.g-facts { padding-block: 28px 0; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); border-block: 1px solid var(--line); }
.facts > div { padding: 20px 16px 20px 0; }
.facts dt { font: 600 11px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.facts dd { font-size: 15px; font-weight: 500; }

.g-section { padding-top: var(--space); }
.g-tight { padding-top: 56px; }
.g-section h2 { font-size: clamp(34px, 4.4vw, 52px); line-height: 1.08; letter-spacing: -.02em; text-wrap: balance; }
.g-section .center p { margin-top: 16px; color: var(--muted); font-size: 17px; text-wrap: pretty; }
.g-section .center .btn { margin-top: 28px; }

.shot-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px);
  max-width: calc(var(--max) + 2 * var(--gutter)); margin: 48px auto 0; padding-inline: var(--gutter); }
.phone { border-radius: clamp(18px, 2.2vw, 28px); padding: 6px; background: #1b1a18; box-shadow: 0 26px 44px -30px rgba(0, 0, 0, .55); }
.phone img { border-radius: clamp(13px, 1.8vw, 22px); width: 100%; aspect-ratio: 600 / 1304; object-fit: cover; }
.shot figcaption { display: grid; gap: 4px; margin-top: 16px; text-align: center; }
.shot .when { font: 600 11px/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--t-ac); }
.shot b { font: 700 19px/1.3 var(--display); }
.shot figcaption > span:last-child { font-size: 14px; line-height: 1.55; color: var(--muted); }
@media (max-width: 1000px) {
  .shot-row { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); padding-bottom: 8px; scrollbar-width: none; }
  .shot-row::-webkit-scrollbar { display: none; }
  .shot { flex: 0 0 min(62vw, 250px); scroll-snap-align: start; }
}

.art-fig { max-width: 440px; margin-inline: auto; }
.art-fig img { width: 100%; border-radius: var(--radius); background: #2a1a16; }
.art-fig figcaption { text-align: center; font-size: 13px; letter-spacing: .06em; margin-top: 14px; color: var(--muted); }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; margin-top: 48px; }
.features li { padding: 28px; border-radius: 20px; background: var(--paper-2); }
.features h3 { font: 700 21px/1.3 var(--display); margin-bottom: 8px; }
.features p { font-size: 15px; color: var(--muted); }

.promises { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.promises li { font: 600 clamp(18px, 2vw, 24px)/1 var(--display); padding: 16px 24px; border-radius: 999px; background: var(--paper-2); }

.g-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 24px; padding-top: 72px; font-size: 14px; }
.g-links a { padding: 8px 0; color: var(--muted); text-underline-offset: 4px; }
.g-links a:hover { color: var(--ink); }
.g-related { padding-bottom: var(--space); }
.g-related h2 { text-align: center; margin-bottom: 40px; font-size: clamp(30px, 3.6vw, 40px); }

/* ---- Motion: gentle, once, and none if less motion is asked for ---- */

@media (prefers-reduced-motion: no-preference) {
  @keyframes rise { from { opacity: 0; transform: translateY(24px); } }
  .hero h1 { animation: rise 1s var(--ease) both; }
  .hero-p { animation: rise 1s .12s var(--ease) both; }
  .panel { animation: rise .9s var(--ease) both; }
  .js [data-reveal] { opacity: 0; transform: translateY(28px);
    transition: opacity .9s var(--ease), transform .9s var(--ease), translate .5s var(--ease), box-shadow .5s var(--ease); }
  .js [data-reveal].in { opacity: 1; transform: none; }
  .grid > :nth-child(2) { transition-delay: .06s; } .grid > :nth-child(3) { transition-delay: .12s; } .grid > :nth-child(4) { transition-delay: .18s; }
  .shot:nth-child(2) { transition-delay: .06s; } .shot:nth-child(3) { transition-delay: .12s; } .shot:nth-child(4) { transition-delay: .18s; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
}
