/* =============================================================
   魔方娱乐汇 / magiccube-mofang.com.cn
   /assets/site.css — 共享外壳与基础组件
   母题：九宫格骨架 · 六面色块 · 轻微旋转位移
   ============================================================= */

/* ---------- 01 Reset ---------- */
*,
*::before,
*::after{box-sizing:border-box;}

html{
  -webkit-text-size-adjust:100%;
  scroll-behavior:smooth;
  scroll-padding-top:120px;
}

body,h1,h2,h3,h4,h5,p,figure,blockquote,dl,dd{margin:0;}
ul,ol{margin:0;padding:0;list-style:none;}
img,svg,picture{display:block;max-width:100%;}
table{border-collapse:collapse;width:100%;}
button{font:inherit;color:inherit;background:none;border:0;}
a{color:inherit;text-decoration:none;}
[hidden]{display:none !important;}

/* ---------- 02 Tokens ---------- */
:root{
  --indigo:#1B2A6B;
  --midnight:#0B1230;
  --magenta:#D6145F;
  --yellow:#FFC93C;
  --teal:#0E9C8A;
  --orange:#E84A1F;
  --blue:#2F5BFF;
  --paper:#F7F4EC;
  --paper-deep:#EDE8DA;
  --ink:#171A21;
  --ink-soft:#454B5C;
  --silver:#C6CBD8;
  --white:#FFFFFF;

  --shell-w:1180px;
  --gutter:clamp(16px,4vw,44px);
  --radius:16px;
  --radius-sm:10px;
  --tilt:-2.2deg;

  --font-display:"Archivo Black","Noto Sans SC","Source Han Sans SC","PingFang SC","Microsoft YaHei",system-ui,sans-serif;
  --font-body:"Noto Sans SC","Source Han Sans SC","PingFang SC","Microsoft YaHei",system-ui,-apple-system,"Segoe UI",sans-serif;
  --font-mono:"IBM Plex Mono","JetBrains Mono",ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;

  --ease:cubic-bezier(0.22,1,0.36,1);
  --shadow-hard:4px 4px 0 var(--midnight);
}

/* ---------- 03 Base typography ---------- */
body{
  font-family:var(--font-body);
  font-size:clamp(16px,1.05vw,17px);
  line-height:1.7;
  color:var(--ink);
  background-color:var(--paper);
  background-image:
    repeating-linear-gradient(to right,rgba(27,42,107,.045) 0 1px,transparent 1px 88px),
    repeating-linear-gradient(to bottom,rgba(27,42,107,.045) 0 1px,transparent 1px 88px);
  -webkit-font-smoothing:antialiased;
}

h1,h2,h3,h4{
  font-family:var(--font-display);
  font-weight:900;
  line-height:1.14;
  letter-spacing:-.015em;
  color:var(--midnight);
}
h1{font-size:clamp(2.2rem,5.2vw,4rem);}
h2{font-size:clamp(1.6rem,3.3vw,2.6rem);}
h3{font-size:clamp(1.15rem,1.9vw,1.45rem);}
h4{font-size:1rem;}
strong{font-weight:900;}
code,kbd,samp{font-family:var(--font-mono);font-size:.92em;}

/* ---------- 04 Layout ---------- */
.shell{
  width:100%;
  max-width:var(--shell-w);
  margin-inline:auto;
  padding-inline:var(--gutter);
}

.section{padding-block:clamp(44px,7vw,88px);}

.section__head{
  display:flex;
  flex-wrap:wrap;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  margin-bottom:clamp(24px,3.4vw,40px);
}

.grid{display:grid;gap:clamp(14px,2vw,24px);}
.grid--2{grid-template-columns:repeat(2,minmax(0,1fr));}
.grid--3{grid-template-columns:repeat(3,minmax(0,1fr));}

/* ---------- 05 Utilities ---------- */
.visually-hidden{
  position:absolute !important;
  width:1px;height:1px;
  margin:-1px;padding:0;
  overflow:hidden;
  clip:rect(0 0 0 0);
  clip-path:inset(50%);
  white-space:nowrap;
  border:0;
}

.eyebrow{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-family:var(--font-mono);
  font-size:11.5px;
  font-weight:700;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:var(--magenta);
}
.eyebrow::before{
  content:"";
  width:18px;height:3px;
  background:currentColor;
  transform:rotate(-3deg);
}

.band{display:flex;width:100%;height:10px;}
.band > span{flex:1;}
.band > span:nth-child(1){background:var(--magenta);}
.band > span:nth-child(2){background:var(--yellow);}
.band > span:nth-child(3){background:var(--teal);}
.band > span:nth-child(4){background:var(--orange);}
.band > span:nth-child(5){background:var(--blue);}
.band > span:nth-child(6){background:var(--silver);}

/* ---------- 06 Buttons ---------- */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  font-family:var(--font-body);
  font-weight:700;
  font-size:15px;
  line-height:1;
  padding:13px 22px;
  border-radius:999px;
  border:2px solid transparent;
  cursor:pointer;
  text-align:center;
  transition:transform .18s var(--ease),box-shadow .18s var(--ease),background-color .18s var(--ease),color .18s var(--ease);
}
.btn--primary{background:var(--magenta);color:var(--white);box-shadow:var(--shadow-hard);}
.btn--primary:hover{transform:translate(-2px,-2px);box-shadow:6px 6px 0 var(--midnight);}
.btn--primary:active{transform:translate(2px,2px);box-shadow:1px 1px 0 var(--midnight);}
.btn--ghost{background:transparent;color:var(--indigo);border-color:var(--indigo);}
.btn--ghost:hover{background:var(--indigo);color:var(--white);}
.btn--teal{background:var(--teal);color:var(--midnight);box-shadow:4px 4px 0 var(--midnight);}
.btn--teal:hover{transform:translate(-2px,-2px);box-shadow:6px 6px 0 var(--midnight);}
.btn--sm{font-size:13.5px;padding:10px 16px;}

/* ---------- 07 Tags ---------- */
.tag{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-family:var(--font-mono);
  font-size:11.5px;
  letter-spacing:.05em;
  padding:5px 11px;
  border-radius:999px;
  background:var(--paper-deep);
  color:var(--ink);
  border:1px solid var(--silver);
}
.tag--magenta{background:var(--magenta);color:var(--white);border-color:transparent;}
.tag--yellow{background:var(--yellow);color:var(--midnight);border-color:transparent;}
.tag--teal{background:var(--teal);color:#06231F;border-color:transparent;}
.tag--orange{background:var(--orange);color:var(--white);border-color:transparent;}
.tag--blue{background:var(--blue);color:var(--white);border-color:transparent;}

/* ---------- 08 Cards ---------- */
.card{
  position:relative;
  background:var(--white);
  border:1px solid var(--silver);
  border-radius:var(--radius);
  padding:clamp(18px,2.4vw,26px);
  box-shadow:6px 6px 0 rgba(27,42,107,.08);
}
.card__title{
  font-family:var(--font-display);
  font-size:clamp(1.05rem,1.6vw,1.25rem);
  line-height:1.3;
  margin-bottom:8px;
  color:var(--midnight);
}

/* ---------- 09 Media frame ---------- */
.media-frame{
  position:relative;
  overflow:hidden;
  isolation:isolate;
  border-radius:var(--radius);
  background:var(--midnight);
  aspect-ratio:16 / 10;
}
.media-frame > img,
.media-frame > picture > img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.media-frame::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:linear-gradient(205deg,rgba(214,20,95,.20),transparent 52%,rgba(14,156,138,.18));
}
.media-frame--square{aspect-ratio:1 / 1;}
.media-frame--tall{aspect-ratio:4 / 5;}

/* ---------- 10 Prose ---------- */
.prose{max-width:42em;}
.prose > * + *{margin-top:1.05em;}
.prose p{max-width:42em;}
.prose h2,.prose h3{margin-top:1.9em;}
.prose a{color:var(--blue);border-bottom:1px solid currentColor;font-weight:600;}
.prose ul,.prose ol{padding-left:1.25em;list-style:disc;}
.prose ol{list-style:decimal;}
.prose li + li{margin-top:.45em;}

/* ---------- 11 Breadcrumb ---------- */
.breadcrumb{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  padding-block:18px;
  font-family:var(--font-mono);
  font-size:12px;
  letter-spacing:.03em;
  color:var(--ink-soft);
}
.breadcrumb__sep{
  width:5px;height:5px;
  flex:0 0 auto;
  background:var(--silver);
  transform:rotate(45deg);
}
.breadcrumb a{border-bottom:1px solid var(--silver);}
.breadcrumb a:hover{color:var(--magenta);border-bottom-color:var(--magenta);}
.breadcrumb [aria-current="page"]{color:var(--ink);font-weight:700;}

/* ---------- 12 Filters ---------- */
.filter-bar{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
}
.filter-btn{
  font-family:var(--font-mono);
  font-size:12px;
  letter-spacing:.05em;
  padding:7px 14px;
  border-radius:999px;
  border:1.5px solid var(--silver);
  background:var(--white);
  color:var(--ink);
  cursor:pointer;
  transition:background-color .18s var(--ease),color .18s var(--ease),border-color .18s var(--ease),transform .18s var(--ease);
}
.filter-btn:hover{border-color:var(--indigo);transform:translateY(-1px);}
.filter-btn[aria-pressed="true"]{
  background:var(--indigo);
  border-color:var(--indigo);
  color:var(--white);
  font-weight:700;
}
.filter-status{
  font-family:var(--font-mono);
  font-size:11.5px;
  letter-spacing:.03em;
  color:var(--ink-soft);
}
.is-filtered-in{animation:cubeFilterIn .18s ease both;}
@keyframes cubeFilterIn{
  from{opacity:0;}
  to{opacity:1;}
}

/* ---------- 13 Reveal ---------- */
[data-reveal]{transition:opacity .55s var(--ease),translate .55s var(--ease);}
html.js [data-reveal]{opacity:0;translate:0 16px;}
html.js [data-reveal].is-visible{opacity:1;translate:0 0;}

/* ---------- 14 Skip link ---------- */
.skip-link{
  position:absolute;
  left:var(--gutter);
  top:0;
  z-index:999;
  display:inline-block;
  padding:10px 18px;
  background:var(--yellow);
  color:var(--midnight);
  font-weight:700;
  border-radius:0 0 10px 10px;
  transform:translateY(-160%);
  transition:transform .2s var(--ease);
}
.skip-link:focus{transform:translateY(0);}

/* ---------- 15 Header ---------- */
.site-header{
  position:sticky;
  top:0;
  z-index:200;
  background:var(--paper);
  border-bottom:1px solid var(--silver);
}

.header-top{
  background:var(--indigo);
  color:var(--white);
  max-height:80px;
  overflow:hidden;
  transition:max-height .36s var(--ease),opacity .22s ease;
}
.header-top__inner{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:6px 20px;
  min-height:34px;
  padding-block:6px;
  font-family:var(--font-mono);
  font-size:11.5px;
  letter-spacing:.04em;
  color:rgba(255,255,255,.78);
}
.header-top__note{display:flex;flex-wrap:wrap;align-items:center;gap:9px;}
.header-top__badge{color:var(--yellow);font-weight:700;letter-spacing:.08em;}
.header-top__dot{
  width:6px;height:6px;
  flex:0 0 auto;
  background:var(--magenta);
  transform:rotate(45deg);
}
.header-top__mail{color:rgba(255,255,255,.72);}
.header-top__addr{color:var(--white);}
.site-header[data-stuck="true"] .header-top{max-height:0;opacity:0;}

.header-main{position:relative;background:var(--paper);}
.header-main__inner{
  display:flex;
  align-items:center;
  gap:clamp(12px,2vw,26px);
  min-height:78px;
}

/* brand */
.brand{
  display:inline-flex;
  align-items:center;
  gap:12px;
  flex:0 0 auto;
}
.brand__cube{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  grid-template-rows:repeat(3,1fr);
  gap:2px;
  width:38px;height:38px;
  padding:3px;
  background:var(--midnight);
  border-radius:7px;
  transform:rotate(-3deg);
  transition:transform .5s var(--ease);
}
.brand:hover .brand__cube{transform:rotate(6deg) scale(1.04);}
.brand__cube i{display:block;background:var(--indigo);border-radius:1.5px;}
.brand__cube i:nth-child(1){background:var(--magenta);}
.brand__cube i:nth-child(5){background:var(--yellow);}
.brand__cube i:nth-child(9){background:var(--teal);}
.brand__text{display:flex;flex-direction:column;gap:2px;}
.brand__name{
  font-family:var(--font-display);
  font-weight:900;
  font-size:19px;
  line-height:1.1;
  letter-spacing:.01em;
  color:var(--midnight);
}
.brand__tagline{
  font-family:var(--font-mono);
  font-size:10.5px;
  letter-spacing:.08em;
  color:var(--ink-soft);
}

/* toggle */
.nav-toggle{
  display:none;
  margin-left:auto;
  width:48px;height:46px;
  flex:0 0 auto;
  align-items:center;
  justify-content:center;
  border:2px solid var(--indigo);
  border-radius:12px;
  background:var(--paper);
  cursor:pointer;
  transition:background-color .2s var(--ease),border-color .2s var(--ease);
}
.nav-toggle:hover{background:var(--yellow);}
.nav-toggle__bars{
  display:grid;
  grid-template-columns:repeat(3,6px);
  grid-auto-rows:6px;
  gap:2px;
  transition:transform .4s var(--ease);
}
.nav-toggle__bars i{display:block;background:var(--indigo);border-radius:1px;}
.nav-toggle__bars i:nth-child(1){background:var(--magenta);}
.nav-toggle__bars i:nth-child(5){background:var(--yellow);}
.nav-toggle__bars i:nth-child(9){background:var(--teal);}
.site-header[data-open="true"] .nav-toggle__bars{transform:rotate(45deg);}

/* nav */
.primary-nav{margin-left:auto;}
.primary-nav__list{display:flex;align-items:center;gap:2px;}
.primary-nav__link{
  position:relative;
  display:inline-block;
  padding:9px 11px;
  font-size:15px;
  font-weight:500;
  line-height:1.2;
  color:var(--ink);
  border-radius:8px;
  transition:background-color .2s var(--ease),color .2s var(--ease),transform .2s var(--ease);
}
.primary-nav__link:hover{background:rgba(27,42,107,.08);}
.primary-nav__link--spot::after{
  content:"";
  position:absolute;
  top:5px;right:5px;
  width:5px;height:5px;
  background:var(--magenta);
  transform:rotate(45deg);
}
.primary-nav__link[aria-current="page"]{
  background:var(--yellow);
  color:var(--midnight);
  font-weight:900;
  transform:rotate(-2deg);
  box-shadow:2px 2px 0 var(--indigo);
}

.header-cta{flex:0 0 auto;font-size:14px;padding:11px 18px;}

/* scroll progress */
.scroll-progress{
  position:absolute;
  left:0;right:0;bottom:-1px;
  height:3px;
  z-index:4;
  background:rgba(27,42,107,.10);
  pointer-events:none;
}
.scroll-progress__bar{
  display:block;
  width:100%;height:100%;
  transform:scaleX(0);
  transform-origin:0 50%;
  background:linear-gradient(90deg,var(--magenta) 0%,var(--yellow) 34%,var(--teal) 66%,var(--blue) 100%);
  transition:transform .1s linear;
}

/* ---------- 16 Mobile navigation ---------- */
@media (max-width:1040px){
  .header-cta{display:none;}
  .brand__tagline{display:none;}
  .nav-toggle{display:inline-flex;}

  .primary-nav{
    position:absolute;
    left:0;right:0;top:100%;
    margin-left:0;
    background:var(--indigo);
    color:var(--white);
    max-height:0;
    overflow:hidden;
    opacity:0;
    visibility:hidden;
    z-index:5;
    box-shadow:0 18px 34px rgba(11,18,48,.28);
    transition:max-height .42s var(--ease),opacity .22s ease,visibility .22s;
  }
  .site-header[data-open="true"] .primary-nav{
    max-height:min(76vh,520px);
    overflow-y:auto;
    opacity:1;
    visibility:visible;
  }
  .primary-nav__list{
    flex-direction:column;
    align-items:stretch;
    gap:0;
    padding:8px var(--gutter) 18px;
  }
  .primary-nav__item + .primary-nav__item{border-top:1px solid rgba(255,255,255,.14);}
  .primary-nav__link{
    display:block;
    padding:15px 4px;
    border-radius:0;
    color:var(--white);
    font-size:16.5px;
    font-weight:600;
  }
  .primary-nav__link:hover{background:rgba(255,255,255,.10);}
  .primary-nav__link--spot::after{
    top:50%;right:8px;
    transform:rotate(45deg) translateY(-50%);
  }
  .primary-nav__link[aria-current="page"]{
    background:var(--yellow);
    color:var(--midnight);
    transform:none;
    box-shadow:none;
    border-radius:8px;
    padding-inline:12px;
    margin-block:4px;
  }
}

@media (max-width:640px){
  .header-main__inner{min-height:64px;gap:10px;}
  .brand__cube{width:32px;height:32px;}
  .brand__name{font-size:17px;}
  .header-top__inner{font-size:10.5px;}
  .header-top__mail{display:none;}
  .nav-toggle{width:44px;height:42px;}
}

/* ---------- 17 Footer ---------- */
.site-footer{
  position:relative;
  overflow:hidden;
  margin-top:clamp(48px,8vw,96px);
  background-color:var(--indigo);
  background-image:linear-gradient(155deg,rgba(11,18,48,0) 38%,rgba(11,18,48,.58) 100%);
  color:var(--white);
}
.site-footer::before{
  content:"";
  position:absolute;
  right:-140px;top:40px;
  width:min(420px,60vw);height:min(420px,60vw);
  border-radius:60px;
  background:var(--magenta);
  opacity:.16;
  transform:rotate(18deg);
  pointer-events:none;
}
.site-footer::after{
  content:"";
  position:absolute;
  left:-90px;bottom:-120px;
  width:260px;height:260px;
  border-radius:40px;
  background:var(--teal);
  opacity:.14;
  transform:rotate(-12deg);
  pointer-events:none;
}

.footer-band{display:flex;height:9px;}
.footer-band span{flex:1;}
.footer-band span:nth-child(1){background:var(--magenta);}
.footer-band span:nth-child(2){background:var(--yellow);}
.footer-band span:nth-child(3){background:var(--teal);}
.footer-band span:nth-child(4){background:var(--orange);}
.footer-band span:nth-child(5){background:var(--blue);}
.footer-band span:nth-child(6){background:var(--silver);}

.footer__inner{
  position:relative;
  z-index:2;
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1.35fr);
  gap:clamp(28px,4vw,60px);
  padding-block:clamp(36px,5.6vw,64px);
}

.footer__lead{max-width:40ch;}

.brand--footer .brand__cube{background:rgba(255,255,255,.14);}
.brand--footer .brand__cube i{background:rgba(255,255,255,.22);}
.brand--footer .brand__cube i:nth-child(1){background:var(--magenta);}
.brand--footer .brand__cube i:nth-child(5){background:var(--yellow);}
.brand--footer .brand__cube i:nth-child(9){background:var(--teal);}
.brand--footer .brand__name{color:var(--white);}
.brand--footer .brand__tagline{color:rgba(255,255,255,.60);}

.footer__summary{
  margin-top:18px;
  font-size:14.5px;
  line-height:1.75;
  color:rgba(255,255,255,.82);
}
.footer__note{
  margin-top:16px;
  padding-left:14px;
  border-left:3px solid var(--magenta);
  font-size:12.5px;
  line-height:1.75;
  color:rgba(255,255,255,.62);
}

.footer__cols{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:clamp(18px,2.4vw,30px);
}
.footer-col__title{
  font-family:var(--font-mono);
  font-size:11px;
  font-weight:700;
  letter-spacing:.18em;
  text-transform:uppercase;
  color:var(--yellow);
  margin-bottom:14px;
}
.footer-col__list{
  display:grid;
  gap:11px;
  font-size:13.5px;
  line-height:1.5;
}
.footer-col__list a{
  color:rgba(255,255,255,.80);
  word-break:break-word;
  transition:color .18s var(--ease);
}
.footer-col__list a:hover,
.footer-col__list a:focus-visible{
  color:var(--yellow);
  text-decoration:underline;
  text-underline-offset:4px;
}

.footer__legal{
  position:relative;
  z-index:2;
  border-top:1px solid rgba(255,255,255,.16);
  padding-block:18px;
  font-family:var(--font-mono);
  font-size:11.5px;
  letter-spacing:.02em;
  color:rgba(255,255,255,.62);
}
.footer__legal-inner{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:10px 24px;
}
.footer__copy{margin:0;}
.footer__legal-links{display:flex;flex-wrap:wrap;gap:6px 18px;}
.footer__legal-links a{
  color:rgba(255,255,255,.72);
  border-bottom:1px solid rgba(255,255,255,.24);
  transition:color .18s var(--ease),border-color .18s var(--ease);
}
.footer__legal-links a:hover{color:var(--yellow);border-bottom-color:var(--yellow);}

@media (max-width:900px){
  .footer__inner{grid-template-columns:1fr;}
  .footer__lead{max-width:none;}
  .footer__cols{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media (max-width:600px){
  .footer__cols{grid-template-columns:1fr;}
  .site-footer::before{right:-180px;}
}

/* ---------- 18 Main / focus ---------- */
#main-content{display:block;scroll-margin-top:110px;}
#main-content:focus{outline:none;}

:focus-visible{
  outline:3px solid var(--blue);
  outline-offset:3px;
  border-radius:4px;
}
.header-top :focus-visible,
.site-footer :focus-visible,
.site-header[data-open="true"] .primary-nav :focus-visible{
  outline-color:var(--yellow);
}

/* ---------- 19 Responsive grid ---------- */
@media (max-width:900px){
  .grid--3{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media (max-width:600px){
  .grid--2,
  .grid--3{grid-template-columns:1fr;}
  .breadcrumb{padding-block:14px;}
}

/* ---------- 20 Reduced motion ---------- */
@media (prefers-reduced-motion: reduce){
  html{scroll-behavior:auto;}
  *,
  *::before,
  *::after{
    animation-duration:.001ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.001ms !important;
    transition-delay:0ms !important;
  }
  html.js [data-reveal]{opacity:1;translate:0 0;}
  .brand:hover .brand__cube{transform:rotate(-3deg);}
  .site-header[data-open="true"] .nav-toggle__bars{transform:none;}
  .primary-nav__link[aria-current="page"]{transform:none;}
}
