:root {
  --deep: #111d19;
  --deepest: #0d1815;
  --green: #253c32;
  --moss: #385043;
  --paper: #fbf9f1;
  --paper-shade: #eff3eb;
  --ink: #1a2620;
  --muted: #515e53;
  --rule: #d4dacf;
  --gold: #efdcaa;
  --control: #e8eee4;
  --text: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  --display: "Songti SC", "Noto Serif CJK SC", "SimSun", serif;
  --header-height: 70px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-height); }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.7 var(--text); }
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--moss); outline-offset: 4px; }
.wrap { width: min(1200px, calc(100% - 100px)); margin-inline: auto; }
.skip { position: fixed; z-index: 20; top: 8px; left: 8px; padding: 8px 12px; background: var(--paper); transform: translateY(-160%); }
.skip:focus { transform: none; }

.hero, .poster-dialog {
  color-scheme: dark;
  color: var(--paper);
  background-color: var(--deep);
}
:is(.hero, .poster-dialog) :focus-visible { outline-color: var(--gold); }

.site-header {
  --brand-caption: #eef0e7;
  --nav-hover: var(--gold);
  --nav-control: #fbf9f125;
  --nav-control-hover: #fbf9f13d;
  position: fixed;
  inset: 0 0 auto;
  z-index: 5;
  color: var(--paper);
  background-color: transparent;
  transition: background-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.site-header.is-scrolled {
  --brand-caption: var(--muted);
  --nav-hover: var(--moss);
  --nav-control: var(--control);
  --nav-control-hover: #dce8db;
  color: var(--ink);
  background-color: var(--paper);
  box-shadow: 0 4px 20px #13231b0c;
}
.site-header:not(.is-scrolled) :is(.brand, .canvas-link, .toggle, nav:not(.open) a):focus-visible { outline-color: var(--gold); }
.nav { position: relative; display: grid; grid-template-columns: 1fr auto 1fr; place-items: center start; gap: 24px; min-height: var(--header-height); }
.brand { display: inline-flex; align-items: center; gap: 10px; line-height: 1.18; font-size: 1.125rem; font-weight: 750; letter-spacing: .06em; white-space: nowrap; }
.brand-mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  aspect-ratio: 1;
  border-radius: 11px;
  background: #f4f1e6;
}
.brand-mark img { display: block; width: 91%; height: auto; mix-blend-mode: multiply; }
.brand small { display: block; margin-top: 4px; color: var(--brand-caption); font: 600 .65rem/1.2 system-ui, sans-serif; letter-spacing: .16em; }
nav { display: flex; align-items: center; gap: clamp(18px, 3.3vw, 46px); font-size: .9375rem; }
nav a, .footer a { transition: color .18s ease; }
nav a:hover { color: var(--nav-hover); }
.footer a:hover { color: var(--moss); text-decoration: underline; text-underline-offset: 4px; }
.canvas-link, .toggle { border: 0; border-radius: 999px; font-size: .875rem; white-space: nowrap; transition: background-color .18s ease; }
.canvas-link { justify-self: end; display: inline-flex; align-items: center; min-height: 42px; padding: 0 17px; background: var(--nav-control); font-weight: 700; }
.canvas-link:hover, .toggle:hover, .toggle[aria-expanded="true"] { background-color: var(--nav-control-hover); }
.toggle { display: none; min-height: 44px; padding: 0 9px; background: transparent; }

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  min-height: 100svh;
}
.hero-art, .hero::after { position: absolute; inset: 0; }
.hero-art { z-index: -2; display: block; overflow: hidden; }
.hero-art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 43%; }
.hero::after { z-index: -1; content: ""; background: linear-gradient(180deg, #0d1e1ae3 0%, #0d1e1a96 58px, transparent 154px), linear-gradient(90deg, #10261fe8 0%, #10261fb8 28%, #10261f24 62%, transparent 84%), linear-gradient(0deg, #10261f59, transparent 40%); }
.hero-content { padding-block: calc(var(--header-height) + clamp(34px, 6vh, 74px)) clamp(54px, 9vh, 106px); }
.hero h1, h2 { margin: 0; font-family: var(--display); font-weight: 700; }
.hero h1 { font-size: clamp(2.875rem, 7.3vw, 6.375rem); line-height: 1.12; letter-spacing: -.057em; }
.hero h1 span { display: block; color: var(--gold); }
.lead { max-width: 46ch; margin: 27px 0; color: #eef0e7; font-size: clamp(1rem, 1.7vw, 1.1875rem); text-wrap: pretty; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.primary, .secondary { display: inline-flex; min-height: 46px; justify-content: center; align-items: center; padding: 9px 20px; border: 0; border-radius: 999px; font-size: .9375rem; line-height: 1.4; font-weight: 700; transition: background-color .18s ease; }
.primary { background: var(--gold); color: var(--deepest); }
.primary:hover { background: #f7e7bd; }
.secondary { color: inherit; background: var(--control); }
.secondary:hover { background: #dce8db; }
.hero .secondary { background: #fbf9f12a; }
.hero .secondary:hover { background: #fbf9f141; }

.section { padding-block: clamp(70px, 8.2vw, 118px); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 32px; }
h2 { font-size: clamp(2.125rem, 4.6vw, 3.625rem); line-height: 1.14; letter-spacing: -.047em; }
h3 { margin: 0; font-size: 1.32rem; line-height: 1.4; }
.section-head > p { max-width: 30ch; margin: 0; color: var(--muted); }

.work-section, .services, .contact { position: relative; isolation: isolate; }
.work-section::before, .services::before, .contact::before { position: absolute; z-index: -1; content: ""; pointer-events: none; }
.work-section { background: radial-gradient(ellipse at 95% 0%, #eef1e7, transparent 38%), var(--paper); }
.work-section::before {
  inset: 0 0 auto auto;
  width: min(54%, 590px);
  height: 190px;
  background: radial-gradient(circle, #57725d56 .75px, transparent 1.15px) 0 0 / 8px 8px;
  mask-image: radial-gradient(ellipse at 100% 0%, #000 15%, transparent 74%);
}
.work-section .section { padding-block: clamp(58px, 6.1vw, 88px) clamp(74px, 7.6vw, 108px); }
.work-head { margin-bottom: 30px; }
.work-controls { display: flex; align-items: center; gap: 8px; }
.icon-button { display: inline-grid; flex: none; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: var(--control); color: var(--green); transition: background-color .18s ease, color .18s ease; }
.icon-button:hover { background: var(--green); color: var(--paper); }
.chevron { width: 9px; height: 9px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; }
.chevron-prev { transform: translateX(2px) rotate(-135deg); }
.chevron-next { transform: translateX(-2px) rotate(45deg); }
.play-icon { width: 0; height: 0; border-block: 5px solid transparent; border-left: 8px solid currentColor; margin-left: 2px; }
.pause-icon { display: none; width: 9px; height: 11px; border-inline: 2px solid currentColor; }
.play-button[aria-pressed="true"] .play-icon { display: none; }
.play-button[aria-pressed="true"] .pause-icon { display: block; }

.work-track {
  --gap: clamp(12px, 1.5vw, 22px);
  --card: calc((100% - 3 * var(--gap)) / 4);
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: var(--card);
  gap: var(--gap);
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--rule) transparent;
  list-style: none;
  margin: 0;
  padding: 0;
}
.work-carousel:has([data-work-footer]:not([hidden])) .work-track { scrollbar-width: none; }
.work-track > li { min-width: 0; scroll-snap-align: start; }
.poster { display: block; width: 100%; height: 100%; padding: 0; border: 0; border-radius: 12px; background: transparent; text-align: left; cursor: zoom-in; }
.poster:focus-visible { outline-offset: -3px; }
.poster-frame { display: block; overflow: hidden; aspect-ratio: 2 / 3; border-radius: 12px; background: var(--mat, var(--deep)); }
.poster-frame img { display: block; width: 100%; height: 100%; object-fit: contain; }
.poster:hover .poster-title { color: var(--moss); text-decoration: underline; text-underline-offset: 4px; }
.poster-title { display: block; min-height: 3.5em; padding: 11px 0 7px; color: var(--ink); font-size: clamp(.9375rem, 1.65vw, 1.15rem); line-height: 1.38; font-weight: 700; overflow-wrap: anywhere; }
.mat-return { --mat: #182735; }
.mat-godfather { --mat: #221a14; }
.mat-exchange { --mat: #201c18; }
.mat-standstill { --mat: #202935; }
.mat-swapped { --mat: #48302e; }
.mat-sword { --mat: #121d2b; }
.mat-medical { --mat: #271a16; }
.mat-believe { --mat: #24362f; }
.work-footer { position: relative; display: flex; align-items: center; min-height: 42px; margin-top: 2px; }
.work-pagination { display: flex; align-items: center; }
.work-pagination button { display: inline-grid; place-items: center; width: 25px; height: 28px; padding: 0; border: 0; border-radius: 999px; background: transparent; }
.work-pagination button::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: #aab1a4; transition: width .18s, background-color .18s; }
.work-pagination button:hover::before { background: var(--moss); }
.work-pagination button[aria-current="true"]::before { width: 15px; background: var(--green); }
.work-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); margin: 0; white-space: nowrap; }

.services { background: radial-gradient(ellipse at 90% 100%, #dce9df, transparent 64%), var(--paper-shade); }
.services::before {
  inset: 0;
  background-image: linear-gradient(90deg, #617d6d25 1px, transparent 1px), linear-gradient(#617d6d25 1px, transparent 1px);
  background-size: 21px 21px;
  mask-image: radial-gradient(ellipse at 96% 38%, #000 3%, transparent 63%);
}
.service-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: clamp(16px, 2.1vw, 30px); }
.service-grid article {
  display: flex;
  flex-direction: column;
  min-height: 224px;
  padding: clamp(20px, 2.35vw, 34px);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: 0 5px 18px #274b3710;
  transition: transform .24s ease, box-shadow .24s ease;
}
.service-grid p { margin: 9px 0 14px; color: var(--muted); }
.service-mark { display: block; width: 46px; height: 46px; padding: 11px; margin-bottom: 17px; border-radius: 14px; background: #e6ede1; color: var(--moss); transition: background-color .24s ease; }
.service-grid .text-link { align-self: start; margin-top: auto; color: var(--moss); font-size: .9375rem; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.service-grid article:focus-within { box-shadow: 0 11px 26px #274b3729; }
@media (hover: hover) {
  .service-grid article:hover { box-shadow: 0 11px 26px #274b3729; }
  .service-grid article:hover .service-mark { background: #d7e7d9; }
}
@media (prefers-reduced-motion: no-preference) {
  .service-grid.has-entered article { animation: service-enter .45s ease-out backwards; }
  .service-grid.has-entered article:nth-child(2) { animation-delay: 65ms; }
  .service-grid.has-entered article:nth-child(3) { animation-delay: 130ms; }
  .service-grid article:focus-within { transform: translateY(-4px); }
  @media (hover: hover) {
    .service-grid article:hover { transform: translateY(-4px); }
  }
}
@keyframes service-enter {
  from { opacity: .4; transform: translateY(12px); }
}

.news {
  position: relative;
  isolation: isolate;
  background: #f7f4ea;
}
.news::before {
  position: absolute;
  z-index: -1;
  bottom: 0;
  left: 0;
  width: min(450px, 48vw);
  height: 128px;
  background: radial-gradient(circle, #51665336 .7px, transparent 1.2px) 0 0 / 8px 8px;
  mask-image: radial-gradient(ellipse at bottom left, black, transparent 72%);
  content: "";
}
.news-inner { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: start; gap: clamp(38px, 7vw, 100px); }
.news-intro p { max-width: 42ch; margin: 18px 0 0; color: var(--muted); }
.news-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.news-card {
  display: grid;
  grid-template: "headline action" auto "source action" auto / minmax(0, 1fr) auto;
  align-items: center;
  gap: 3px 12px;
  padding: 15px clamp(14px, 2vw, 23px);
  border: 1px solid #d9ded3;
  border-radius: 14px;
  background: var(--paper);
  transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.news-card h3 { grid-area: headline; font-size: clamp(1.0625rem, 1.7vw, 1.25rem); }
.news-source { grid-area: source; color: var(--muted); font-size: .875rem; }
.news-action {
  grid-area: action;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--control);
  color: var(--moss);
  font-size: .8125rem;
  font-weight: 700;
  white-space: nowrap;
  transition: background-color .2s ease, color .2s ease;
}
.news-card:is(:hover, :focus-visible) {
  border-color: #a8baaa;
  background-color: #fffef8;
  box-shadow: 0 8px 20px #253c3210;
  transform: translateY(-2px);
}
.news-card:is(:hover, :focus-visible) .news-action { background-color: var(--moss); color: var(--paper); }
.contact { background: radial-gradient(ellipse at 100% 0%, #edf2e5, transparent 66%), #e4ede2; }
.contact::before {
  inset: 0 0 0 auto;
  width: min(68%, 790px);
  background: repeating-radial-gradient(ellipse at 100% 105%, #4d6c5638 0 1px, transparent 1px 16px);
  mask-image: radial-gradient(ellipse at 100% 100%, #000 6%, transparent 72%);
}
.contact p { margin: 15px 0 0; color: var(--muted); }
.contact-email { color: var(--green); font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.site-footer { background: linear-gradient(180deg, #f1f4e9, var(--paper)); }
.footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px; padding-block: 25px; color: var(--muted); font-size: .875rem; }
.footer-identity { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.footer-identity img { width: 36px; height: auto; mix-blend-mode: multiply; }
.footer-icp { white-space: nowrap; }

dialog { padding: 0; max-width: calc(100% - 24px); max-height: calc(100dvh - 24px); border: 0; border-radius: 18px; overscroll-behavior: contain; }
dialog::backdrop { background: #09110dda; backdrop-filter: blur(5px); }
.poster-dialog { width: min(100%, 490px); }
.poster-dialog[data-orientation="landscape"] { width: min(100%, 890px); }
.poster-dialog-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; }
.poster-dialog-bar h2 { font: 700 clamp(1rem, 2.6vw, 1.25rem)/1.4 var(--text); }
.poster-dialog .close { width: 40px; height: 40px; background: #fbf9f125; color: var(--paper); }
.poster-dialog .close:hover { background: var(--gold); color: var(--deep); }
.close-icon { position: relative; width: 16px; height: 16px; }
.close-icon::before, .close-icon::after { content: ""; position: absolute; width: 16px; height: 1.5px; left: 0; top: 7px; background: currentColor; transform: rotate(45deg); }
.close-icon::after { transform: rotate(-45deg); }
.poster-display { display: grid; place-items: center; min-height: 100px; padding: 10px; background: var(--deepest); }
.poster-display img { display: block; max-width: 100%; max-height: min(70dvh, calc(100dvh - 169px)); object-fit: contain; }
.poster-variants { display: flex; justify-content: center; gap: 8px; padding: 10px; }
.poster-variants button { min-height: 38px; padding: 5px 14px; border: 0; border-radius: 999px; background: #fbf9f125; font-size: .875rem; }
.poster-variants button:hover, .poster-variants button[aria-pressed="true"] { background: var(--gold); color: var(--deepest); }

@media (max-width: 920px) {
  .wrap { width: calc(100% - 64px); }
  .work-track { --card: calc((100% - 2 * var(--gap)) / 3); }
  .service-grid article { padding-inline: 18px; }
}

@media (max-width: 720px) {
  :root { --header-height: 62px; }
  .wrap { width: calc(100% - 40px); }
  .nav { grid-template-columns: 1fr auto auto; gap: 10px; }
  .brand-mark { width: 36px; }
  .toggle { display: block; }
  nav {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 16px;
    padding: 8px 16px;
    background: var(--paper);
    color: var(--ink);
    border-radius: 16px;
    box-shadow: 0 8px 26px #0d181538;
    --nav-hover: var(--moss);
  }
  nav.open { display: grid; }
  nav a { min-height: 44px; display: flex; align-items: center; }
  .hero { align-items: end; }
  .hero-art img { object-position: 83% 37%; }
  .hero::after { background: linear-gradient(180deg, #0d1e1af2, #0d1e1aa3 55px, transparent 138px), linear-gradient(0deg, #10261ff5 4%, #10261fc9 30%, #10261f4f 61%, #10261f0d 84%); }
  .hero-content { padding-block: calc(var(--header-height) + 34px) 51px; }
  .hero h1 { font-size: clamp(3rem, 10.5vw, 5rem); }
  .lead { max-width: 28ch; }
  .work-track { --card: calc((100% - var(--gap)) / 2); }
  .service-head { display: block; }
  .service-head > p { margin-top: 10px; }
  .service-grid { grid-template-columns: 1fr; }
  .news-inner { grid-template-columns: 1fr; gap: 26px; }
}

@media (max-width: 490px) {
  .canvas-link { min-height: 40px; padding-inline: 12px; }
  .work-head { gap: 12px; margin-bottom: 24px; }
  .work-head h2 { font-size: clamp(1.88rem, 7.8vw, 2.3rem); }
  .work-controls { gap: 5px; }
  .work-controls .icon-button { width: 36px; height: 36px; }
  .work-track { --card: 74%; }
  .work-footer { margin-top: 0; }
  .poster-title { min-height: 2.75em; }
  .footer-icp { flex-basis: 100%; }
}

@media (max-width: 360px) {
  .wrap { width: calc(100% - 32px); }
  .nav { gap: 6px; }
  .brand { gap: 6px; font-size: 1rem; }
  .brand-mark { width: 32px; }
  .canvas-link { padding-inline: 9px; }
  .hero h1 { font-size: clamp(2.25rem, 11vw, 2.75rem); }
  .work-head h2 { font-size: 1.625rem; }
}

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