/* aimaker.site — shared stylesheet for the zh (/) and en (/en/) pages.
   Single source of truth: both locales load this file, so a design change
   never has to be made twice. */

*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}

:root{
  --ground:#0B0D11;
  --surface:#12161C;
  --ink:#F3F1ED;
  --ink-2:#A2AAB7;
  --ink-3:#6C7684;
  --line:rgba(243,241,237,.10);
  --line-2:rgba(243,241,237,.18);

  /* Type scale. Chinese needs more size than Latin to stay legible, so the
     small end starts at ~13px rather than the 10–11px a Latin-only page
     could get away with. */
  --fs-micro:.8rem;      /* badges, language toggle        ~12.8px */
  --fs-eyebrow:.8rem;    /* section eyebrows               ~12.8px */
  --fs-label:.86rem;     /* chips, facts, footer, latin    ~13.8px */
  --fs-nav:.98rem;       /* top nav                        ~15.7px */
  --fs-body:1.06rem;     /* card + about paragraphs        ~17px   */
  --fs-cta:1.04rem;      /* buttons                        ~16.6px */

  --font-display:'Bricolage Grotesque','PingFang SC','Hiragino Sans GB','Microsoft YaHei',system-ui,sans-serif;
  --font-body:'PingFang SC','Hiragino Sans GB','Microsoft YaHei',system-ui,-apple-system,sans-serif;
  --font-mono:'DM Mono',ui-monospace,SFMono-Regular,Menlo,monospace;

  --pad:clamp(20px,5vw,64px);
  --maxw:1180px;
}

/* The English page leads with Latin text, so put the Latin face first in the
   body stack there — otherwise PingFang renders the Latin and it looks off. */
html[lang^="en"]{
  --font-body:'Bricolage Grotesque',system-ui,-apple-system,'Segoe UI',sans-serif;
}

html{scroll-behavior:smooth}

body{
  background:var(--ground);
  color:var(--ink);
  font-family:var(--font-body);
  font-size:var(--fs-body);
  line-height:1.75;
  -webkit-font-smoothing:antialiased;
}

/* film grain — keeps the dark ground from reading as flat CSS black */
body::after{
  content:"";position:fixed;inset:0;z-index:99;pointer-events:none;opacity:.038;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

.wrap{max-width:var(--maxw);margin:0 auto;padding-inline:var(--pad)}

a{color:inherit;text-decoration:none}
:focus-visible{outline:2px solid #38BDF8;outline-offset:3px;border-radius:4px}

.eyebrow{
  font-family:var(--font-mono);font-size:var(--fs-eyebrow);letter-spacing:.18em;
  text-transform:uppercase;color:var(--ink-3);
}

/* ---------- top bar ---------- */
.topbar{
  position:sticky;top:0;z-index:50;
  backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);
  background:color-mix(in srgb,var(--ground) 82%,transparent);
  border-bottom:1px solid var(--line);
}
.topbar .wrap{display:flex;align-items:center;justify-content:space-between;height:66px;gap:16px}
.mark{
  font-family:var(--font-display);font-weight:800;font-size:1.12rem;
  letter-spacing:-.012em;text-transform:uppercase;
  display:flex;align-items:center;gap:11px;flex:none;
}
.mark svg{width:28px;height:28px;flex:none;display:block}
@media(max-width:600px){.mark svg{width:24px;height:24px}}

.topright{display:flex;align-items:center;gap:24px;margin-left:auto}
.topnav{display:flex;gap:24px;font-size:var(--fs-nav);color:var(--ink-2)}
.topnav a:hover{color:var(--ink)}

/* language toggle */
.lang{
  display:flex;align-items:center;flex:none;
  border:1px solid var(--line-2);border-radius:100px;overflow:hidden;
}
.lang a{
  font-family:var(--font-mono);font-size:var(--fs-micro);letter-spacing:.06em;
  padding:6px 14px;color:var(--ink-3);line-height:1.6;
  transition:color .2s ease,background .2s ease;
}
.lang a:hover{color:var(--ink)}
.lang a[aria-current="true"]{color:var(--ground);background:var(--ink-2)}
.lang a:focus-visible{outline-offset:-2px}

/* ---------- hero ---------- */
/* overflow:clip contains the bleeding glow below — without it the ::before
   extends 20% past each edge and gives the page a real horizontal scroll
   (468px wide on a 390px phone). */
.hero{padding:clamp(64px,13vw,132px) 0 clamp(48px,8vw,80px);position:relative;overflow:clip}
.hero::before{
  content:"";position:absolute;inset:-10% -20% 40% -20%;z-index:-1;pointer-events:none;
  background:
    radial-gradient(46% 60% at 22% 30%,rgba(229,168,60,.13),transparent 70%),
    radial-gradient(46% 60% at 80% 20%,rgba(56,189,248,.13),transparent 70%);
  filter:blur(8px);
}
.hero h1{
  font-family:var(--font-display);
  font-size:clamp(2.5rem,7.4vw,4.8rem);
  font-weight:700;line-height:1.08;letter-spacing:-.035em;
  margin:20px 0 0;text-wrap:balance;max-width:16ch;
}
.hero h1 em{
  font-style:normal;
  background:linear-gradient(96deg,#E5A83C 12%,#38BDF8 88%);
  -webkit-background-clip:text;background-clip:text;color:transparent;
}
.lede{
  margin:24px 0 0;max-width:44ch;
  font-size:clamp(1.14rem,2.1vw,1.36rem);line-height:1.66;
  color:var(--ink-2);text-wrap:pretty;
}
.facts{
  display:flex;flex-wrap:wrap;gap:10px 12px;margin:36px 0 0;
  font-family:var(--font-mono);font-size:var(--fs-label);letter-spacing:.05em;color:var(--ink-2);
}
.facts span{
  border:1px solid var(--line-2);border-radius:100px;padding:6px 15px;
  background:rgba(243,241,237,.02);
}

/* ---------- game cards ---------- */
.games{display:grid;gap:clamp(48px,9vw,104px);padding:clamp(32px,7vw,64px) 0}

.game{
  --accent:#E5A83C;
  display:grid;grid-template-columns:1.06fr .94fr;
  gap:clamp(26px,4.4vw,54px);align-items:center;
}
/* even rows flip the image to the right — mirror the column ratio too,
   otherwise the image lands in the narrower column and the two covers
   render at different widths (529px vs 469px). */
.game:nth-child(even){grid-template-columns:.94fr 1.06fr}
.game:nth-child(even) .shot{order:2}
@media(max-width:900px){
  .game,.game:nth-child(even){grid-template-columns:1fr;gap:26px}
  .game:nth-child(even) .shot{order:0}
}

.shot{
  position:relative;display:block;
  aspect-ratio:16/9;border-radius:12px;overflow:hidden;
  border:1px solid var(--line-2);
  background:var(--surface);
  isolation:isolate;
}
.shot img{
  width:100%;height:100%;object-fit:cover;display:block;
  transition:transform .7s cubic-bezier(.2,.7,.2,1);
}
.shot::after{
  content:"";position:absolute;inset:0;pointer-events:none;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.05),
             inset 0 -70px 90px -50px rgba(11,13,17,.9);
}
.game:hover .shot img,.shot:focus-visible img{transform:scale(1.035)}
.shot::before{
  content:"";position:absolute;inset:-2px;z-index:-1;border-radius:14px;
  background:var(--accent);opacity:0;filter:blur(22px);
  transition:opacity .5s ease;
}
.game:hover .shot::before{opacity:.30}

.badge{
  position:absolute;left:14px;top:14px;z-index:2;
  font-family:var(--font-mono);font-size:var(--fs-micro);letter-spacing:.1em;
  padding:6px 13px;border-radius:100px;
  color:#0B0D11;background:var(--accent);font-weight:500;
}

.game h2{
  font-family:var(--font-display);
  font-size:clamp(1.65rem,3.6vw,2.35rem);
  font-weight:700;line-height:1.2;letter-spacing:-.02em;
  margin:14px 0 0;text-wrap:balance;
}
.latin{
  font-family:var(--font-mono);font-size:var(--fs-label);letter-spacing:.16em;
  text-transform:uppercase;color:var(--accent);margin:10px 0 0;
}
.game p:not(.latin):not(.eyebrow){
  margin:18px 0 0;color:var(--ink-2);max-width:42ch;text-wrap:pretty;line-height:1.72;
}

.chips{display:flex;flex-wrap:wrap;gap:9px;margin:22px 0 0;list-style:none}
.chips li{
  font-family:var(--font-mono);font-size:var(--fs-label);color:var(--ink-2);
  border:1px solid var(--line);border-radius:6px;padding:5px 12px;
  background:var(--surface);
}

/* CTA + price sit on one line; the price wraps under the button on narrow cards */
.cta-row{display:flex;flex-wrap:wrap;align-items:center;gap:14px 18px;margin:28px 0 0}
.cta{
  display:inline-flex;align-items:center;gap:9px;
  font-size:var(--fs-cta);font-weight:600;
  padding:13px 24px;border-radius:8px;
  color:#0B0D11;background:var(--accent);
  transition:transform .2s ease,filter .2s ease;
}
.cta:hover{transform:translateY(-2px);filter:brightness(1.08)}
.cta svg{transition:transform .2s ease}
.cta:hover svg{transform:translateX(3px)}

.price{
  font-family:var(--font-mono);font-size:var(--fs-label);
  color:var(--ink-3);letter-spacing:.02em;
}
.price b{color:var(--ink-2);font-weight:500}

/* ---------- about ---------- */
.about{border-top:1px solid var(--line);padding:clamp(48px,8vw,88px) 0}
.about-grid{display:grid;grid-template-columns:.8fr 1.2fr;gap:clamp(24px,5vw,64px)}
@media(max-width:760px){.about-grid{grid-template-columns:1fr;gap:20px}}
.about h3{
  font-family:var(--font-display);font-size:1.72rem;font-weight:700;
  letter-spacing:-.02em;margin:14px 0 0;
}
.about p{color:var(--ink-2);margin:0 0 18px;max-width:52ch;text-wrap:pretty;line-height:1.75}
.about p:last-child{margin-bottom:0}
.about strong{color:var(--ink);font-weight:600}

/* ---------- footer ---------- */
footer{border-top:1px solid var(--line);padding:32px 0 48px}
footer .wrap{
  display:flex;flex-wrap:wrap;gap:14px 28px;
  align-items:center;justify-content:space-between;
  font-family:var(--font-mono);font-size:var(--fs-label);color:var(--ink-3);
}
footer a:hover{color:var(--ink-2)}
.flinks{display:flex;gap:24px}

/* ---------- legal / document pages ---------- */
.doc{padding:clamp(44px,8vw,88px) 0 clamp(56px,9vw,96px)}
.doc .inner{max-width:70ch}
.doc h1{
  font-family:var(--font-display);font-size:clamp(1.9rem,4.6vw,2.7rem);
  font-weight:700;letter-spacing:-.025em;line-height:1.18;margin:14px 0 0;
}
.doc .updated{
  font-family:var(--font-mono);font-size:var(--fs-label);
  color:var(--ink-3);margin:14px 0 0;
}
.doc h2{
  font-family:var(--font-display);font-size:1.34rem;font-weight:700;
  letter-spacing:-.015em;margin:44px 0 0;padding-top:22px;
  border-top:1px solid var(--line);
}
.doc h3{
  font-family:var(--font-display);font-size:1.06rem;font-weight:700;
  letter-spacing:-.01em;margin:28px 0 0;
}
.doc table{
  width:100%;margin:16px 0 0;border-collapse:collapse;
  font-size:.92em;color:var(--ink-2);
}
.doc th,.doc td{
  text-align:left;vertical-align:top;
  padding:10px 12px;border:1px solid var(--line);
}
.doc th{color:var(--ink);font-weight:600;background:var(--surface)}
.doc td strong{color:var(--ink)}
.doc p{color:var(--ink-2);margin:14px 0 0;line-height:1.8}
.doc ul{margin:14px 0 0;padding-left:1.3em;color:var(--ink-2)}
.doc li{margin:8px 0 0;line-height:1.8}
.doc li::marker{color:var(--ink-3)}
.doc strong{color:var(--ink);font-weight:600}
.doc a:not(.cta):not(.mark){
  color:#5CC6F5;border-bottom:1px solid rgba(92,198,245,.35);
}
.doc a:not(.cta):not(.mark):hover{border-bottom-color:#5CC6F5}
.doc .note{
  margin:20px 0 0;padding:16px 20px;border-radius:8px;
  background:var(--surface);border-left:3px solid var(--ink-3);
}
.doc .note p{margin:0}
.doc .back{
  display:inline-flex;align-items:center;gap:8px;margin:40px 0 0;
  font-family:var(--font-mono);font-size:var(--fs-label);color:var(--ink-3);
}
.doc .back:hover{color:var(--ink-2)}

/* ---------- touch / small-screen behaviour ----------
   Separated from the desktop rules on purpose: a phone has no hover, so the
   card lift and glow never resolve there and can leave a stuck hover state
   after a tap. Tap targets also need real height, not just readable text. */
@media (hover:none),(pointer:coarse){
  .game:hover .shot img,.shot:focus-visible img{transform:none}
  .game:hover .shot::before{opacity:0}
  .cta:hover{transform:none}
  .cta:hover svg{transform:none}
  .cta{padding:15px 26px}          /* ≥48px tall tap target */
  .lang a{padding:9px 16px}
  .topnav a,.flinks a{padding:6px 0}
}

@media(max-width:600px){
  /* Keep the nav on phones rather than hiding it — the 作品 / 关于 links are
     the only in-page navigation, and dropping them leaves a dead top bar. */
  .topbar .wrap{height:60px;gap:12px}
  .topnav{gap:16px;font-size:var(--fs-label)}
  .mark{font-size:1.04rem}
  .footlinks{gap:14px 18px}
  footer .wrap{flex-direction:column;align-items:flex-start;gap:16px}
}

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