/* World Masterpiece Art Gallery — Louvre midnight theme */
:root {
  --bg: #14171E;
  --bg-2: #1C2029;
  --bg-3: #252A35;
  --bg-deep: #0E1015;
  --ink: #EEE9DF;
  --ink-2: #D8D1C4;
  --ink-3: #B3AC9F;
  --ink-4: #9A9386;
  --gold: #C6A15B;
  --gold-hi: #E2C384;
  --line: rgba(238, 233, 223, 0.14);
  --serif: 'Source Serif 4', Georgia, serif;
  --sans: 'Work Sans', system-ui, sans-serif;
  --zh: 'Noto Serif SC', serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 130px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.6; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--gold); }
button { font: inherit; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.narrow { max-width: 780px; margin: 0 auto; padding-left: 32px; padding-right: 32px; }
.center { text-align: center; }
.section { padding-top: 120px; }
.section-sm { padding-top: 100px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 30; background: rgba(20, 23, 30, 0.86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); transition: padding .4s var(--ease); }
.header-inner { max-width: 1200px; margin: 0 auto; padding: 22px 32px 16px; display: flex; flex-direction: column; align-items: center; gap: 16px; transition: padding .4s var(--ease), gap .4s var(--ease); }
.site-header.scrolled .header-inner { padding-top: 12px; padding-bottom: 10px; gap: 8px; }
.logo { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.logo-name { font-family: var(--serif); font-size: 30px; letter-spacing: .06em; transition: font-size .4s var(--ease); }
.site-header.scrolled .logo-name { font-size: 24px; }
.logo-sub { font-size: 10px; letter-spacing: .36em; color: var(--ink-4); }
.main-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 34px; font-size: 13px; letter-spacing: .14em; }
.main-nav a { position: relative; }
.main-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: var(--gold); transform: scaleX(0); transition: transform .5s var(--ease); }
.main-nav a:hover::after { transform: scaleX(1); }
.menu-toggle { display: none; }

/* ---------- Type ---------- */
.eyebrow { margin: 0 0 18px; font-size: 12px; letter-spacing: .3em; color: var(--gold); }
.h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.4; }
.h2-lg { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 4vw, 48px); line-height: 1.2; }
.h3 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 24px; line-height: 1.4; }
.zh-sub { margin: 10px 0 0; font-family: var(--zh); font-size: 18px; color: var(--ink-2); }
.zh-sub.small { font-size: 15px; color: var(--ink-4); margin-top: 8px; }
.zh-sub.spaced { letter-spacing: .16em; font-size: 16px; color: var(--ink-3); }
.serif-body { margin: 28px 0 0; font-family: var(--serif); font-size: 18px; line-height: 1.9; color: #E4DED2; }
.zh-body { margin: 18px 0 0; font-family: var(--zh); font-size: 15px; line-height: 2.1; color: var(--ink-3); }
.lead { margin: 30px auto 0; max-width: 520px; font-size: 15px; line-height: 1.8; color: var(--ink-3); }
.note { margin: 26px 0 0; font-size: 13px; line-height: 1.7; color: var(--ink-4); }
.rule { border: 0; border-top: 1px solid rgba(238, 233, 223, .16); margin: 70px 0; }
.rule.top { margin-top: 0; }
.gold-italic { font-style: italic; color: var(--gold); }

/* ---------- Buttons ---------- */
.btn-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 40px; }
.btn { display: inline-block; padding: 16px 32px; font-size: 12px; letter-spacing: .22em; transition: background .4s, color .4s, border-color .4s, transform .4s var(--ease); }
.btn:hover { transform: translateY(-2px); }
.btn-gold { background: var(--gold); color: var(--bg); }
.btn-gold:hover { background: var(--gold-hi); color: var(--bg); }
.btn-line { border: 1px solid rgba(238, 233, 223, .5); color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--bg); }

/* ---------- Hero ---------- */
.hero { padding-top: 90px; }
.hero-title { margin: 0 auto; max-width: 900px; font-family: var(--serif); font-weight: 400; font-size: clamp(38px, 5vw, 64px); line-height: 1.12; }
.hero-zh { margin: 22px auto 0; font-family: var(--zh); font-size: 20px; letter-spacing: .14em; color: var(--ink-2); }
.hero-lead { margin: 22px auto 0; max-width: 640px; line-height: 1.9; color: var(--ink-3); }
.hero-photo { position: relative; margin-top: 80px; overflow: hidden; }
.hero-photo img { width: 100%; height: clamp(360px, 56vw, 860px); object-fit: cover; object-position: 50% 40%; transform-origin: 50% 40%; animation: heroIn 3.4s var(--ease) both, approach 26s 3.4s ease-in-out infinite alternate; will-change: transform; }
.hero-fade { position: absolute; inset: 0 0 auto 0; height: 120px; background: linear-gradient(var(--bg), rgba(20, 23, 30, 0)); pointer-events: none; }
.caption-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-top: 14px; font-size: 12px; letter-spacing: .08em; color: #8E8779; }

/* ---------- Process ---------- */
.process { padding-top: 70px; max-width: 1100px; }
.process-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 60px; align-items: center; }
.detail-box { position: relative; overflow: hidden; aspect-ratio: 16 / 10; }
.kenburns { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; animation: kenburns 20s ease-in-out infinite alternate; }
.detail-tag { position: absolute; left: 0; bottom: 0; padding: 10px 16px; background: var(--bg); font-size: 11px; letter-spacing: .22em; }
.step { padding: 26px 0; }
.step-row { display: flex; gap: 24px; align-items: baseline; }
.step-n { font-family: var(--serif); font-size: 44px; line-height: 1; color: var(--gold); min-width: 60px; }
.step-t { font-family: var(--serif); font-size: 23px; }
.step-zh { margin-top: 4px; font-family: var(--zh); font-size: 14px; color: var(--ink-4); }
.step-d { margin-top: 10px; line-height: 1.75; color: var(--ink-3); }
.step-line { height: 1px; background: rgba(238, 233, 223, .16); margin-top: 26px; transform: scaleX(0); transform-origin: left; transition: transform 1.6s var(--ease) .3s; }
.step.in .step-line { transform: scaleX(1); }

/* ---------- Name ---------- */
.name-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; margin-top: 34px; }
.name-cell { border-top: 1px solid var(--ink); padding-top: 16px; }
.name-word { font-family: var(--serif); font-size: 32px; }
.name-def { margin-top: 6px; font-size: 14px; line-height: 1.7; color: var(--ink-3); }

/* ---------- Marquee ---------- */
.marquee { margin-top: 120px; padding: 40px 0; background: var(--bg-2); overflow: hidden; }
.marquee-track { display: flex; gap: 36px; width: max-content; align-items: center; animation: marquee 80s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track img { height: 180px; width: auto; box-shadow: 0 10px 24px rgba(0, 0, 0, .35); }

/* ---------- Collection ---------- */
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 28px; margin: 34px 0 60px; border-bottom: 1px solid var(--line); }
.chip { background: none; border: 0; border-bottom: 1px solid transparent; cursor: pointer; min-height: 44px; padding: 10px 4px; font-size: 13px; letter-spacing: .08em; color: var(--ink-4); transition: color .3s, border-color .3s; }
.chip:hover { color: var(--ink); }
.chip.on { color: var(--ink); border-bottom-color: var(--gold); }
.chip:focus-visible, .card:focus-visible { outline: 1px solid var(--gold); outline-offset: 4px; }
.works-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 56px 32px; }
.card { background: none; border: 0; padding: 0; color: inherit; text-align: center; cursor: pointer; display: flex; flex-direction: column; opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.card.in { opacity: 1; transform: none; }
.card.wide { grid-column: span 2; }
.card-ph { background: var(--bg-2); height: 420px; display: flex; align-items: center; justify-content: center; padding: 40px; overflow: hidden; transition: background .6s; }
.card:hover .card-ph { background: var(--bg-3); }
.card-ph img { max-width: 100%; max-height: 100%; width: auto; height: auto; box-shadow: 0 18px 40px rgba(0, 0, 0, .45), 0 2px 6px rgba(0, 0, 0, .3); transition: transform 1.2s var(--ease); }
.card:hover .card-ph img { transform: translateY(-8px) scale(1.02); }
.card-ph img.round { border-radius: 50%; }
.card-artist { margin-top: 18px; font-size: 11px; letter-spacing: .2em; color: var(--ink-4); }
.card-title { margin-top: 6px; font-family: var(--serif); font-size: 22px; }
.card-meta { margin-top: 4px; font-family: var(--zh); font-size: 13px; color: #8E8779; }

/* ---------- Values ---------- */
.values-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; margin-top: 26px; }
.value { border-top: 1px solid var(--line); padding: 22px 0 26px; }
.value-t { font-family: var(--serif); font-size: 18px; }
.value-d { margin-top: 8px; font-size: 14px; line-height: 1.75; color: var(--ink-3); }

/* ---------- Certificate ---------- */
.cert { border: 1px solid rgba(198, 161, 91, .6); padding: 10px; }
.cert-inner { border: 1px solid rgba(198, 161, 91, .28); padding: 56px 40px; text-align: center; }
.cert-brand { font-family: var(--serif); font-size: 26px; letter-spacing: .12em; color: var(--gold); }
.cert-line { width: 70px; height: 1px; background: rgba(198, 161, 91, .6); margin: 20px auto; }
.cert-label { font-size: 12px; letter-spacing: .3em; color: var(--ink-3); }
.cert-company { margin-top: 30px; font-family: var(--serif); font-size: 32px; }
.cert-reg { margin-top: 6px; font-size: 14px; color: var(--ink-4); }
.cert-text { margin: 26px auto 0; max-width: 520px; line-height: 1.8; color: var(--ink-2); }
.cert-zh { margin: 14px auto 0; font-family: var(--zh); font-size: 14px; color: #A49D90; }
.cert-date { margin-top: 26px; font-size: 12px; letter-spacing: .2em; color: var(--gold); }

/* ---------- Visit ---------- */
.visit-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 60px; align-items: center; }
.visit-block { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line); }
.visit-addr { margin-top: 10px; font-style: normal; font-family: var(--serif); font-size: 20px; line-height: 1.6; }
.visit-text { margin: 10px 0 0; color: var(--ink-3); }
.btn-row.left { justify-content: flex-start; }
.map-frame { position: relative; aspect-ratio: 4 / 3; border: 1px solid rgba(198, 161, 91, .45); padding: 8px; background: var(--bg-2); }
.map-frame iframe { width: 100%; height: 100%; border: 0; display: block; filter: invert(.9) hue-rotate(180deg) saturate(.6) contrast(.92); transition: filter .6s var(--ease); }
.map-frame:hover iframe { filter: none; }
@media (max-width: 860px) { .visit-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; } .map-frame { aspect-ratio: 1 / 1; } }

/* ---------- Contact cards ---------- */
.contact-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 44px; text-align: left; }
.contact-card { display: flex; flex-direction: column; gap: 10px; padding: 24px 26px; border: 1px solid rgba(198, 161, 91, .4); background: var(--bg-2); transition: border-color .4s, background .4s, transform .4s var(--ease); }
.contact-card:hover { border-color: var(--gold); background: var(--bg-3); transform: translateY(-3px); color: var(--ink); }
.contact-val { font-family: var(--serif); font-size: 22px; overflow-wrap: anywhere; }
@media (max-width: 860px) { .contact-cards { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Contact / Footer ---------- */
.contact { padding-top: 130px; padding-bottom: 140px; }
.site-footer { background: var(--bg-deep); color: #D6D6D6; }
.footer-grid { padding-top: 60px; padding-bottom: 30px; display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 40px; }
.footer-brand { font-family: var(--serif); font-size: 24px; letter-spacing: .06em; color: var(--ink); }
.footer-small { margin: 12px 0 0; font-size: 13px; line-height: 1.8; color: #AAAAAA; }
.footer-links { display: flex; flex-direction: column; gap: 10px; font-size: 13px; letter-spacing: .1em; }
.footer-links a { color: #D6D6D6; }
.footer-links a:hover { color: var(--gold); }
.footer-bottom { padding-top: 20px; padding-bottom: 34px; border-top: 1px solid #23262E; font-size: 12px; color: #8C8C8C; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(6, 7, 10, .78); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); animation: fade .4s ease both; }
.modal-sheet { position: relative; width: 100%; max-width: 1080px; max-height: 90vh; overflow: auto; background: #1A1E27; display: flex; flex-wrap: wrap; animation: up .7s var(--ease) both; }
.modal.closing .modal-backdrop { animation: fadeOut .35s ease both; }
.modal.closing .modal-sheet { animation: down .35s ease both; }
.modal-img { flex: 1 1 420px; min-width: 0; background: var(--bg-2); display: flex; align-items: center; justify-content: center; padding: 48px; }
.modal-img img { max-width: 100%; max-height: 70vh; width: auto; height: auto; box-shadow: 0 18px 40px rgba(0, 0, 0, .45); }
.modal-img img.round { border-radius: 50%; }
.modal-body { flex: 1 1 420px; min-width: 0; padding: 52px 46px; }
.modal-artist { margin: 0 0 12px; font-size: 11px; letter-spacing: .26em; color: var(--gold); }
.modal-title { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 40px; line-height: 1.1; }
.modal-zh { margin-top: 8px; font-family: var(--zh); font-size: 17px; color: #A49D90; }
.modal-story { margin: 24px 0 0; font-family: var(--serif); font-size: 16px; line-height: 1.85; color: var(--ink-2); }
.facts { margin: 28px 0 32px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 26px; border-top: 1px solid var(--line); padding-top: 24px; }
.fact-k { font-size: 11px; letter-spacing: .22em; color: var(--ink-4); }
.fact-v { margin-top: 6px; font-size: 14px; line-height: 1.6; }
.modal-close { position: absolute; top: 12px; right: 12px; z-index: 2; width: 44px; height: 44px; border: 1px solid rgba(238, 233, 223, .16); background: var(--bg); color: var(--ink); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .3s; }
.modal-close:hover { background: var(--bg-3); }
body.modal-open { overflow: hidden; }

/* ---------- Animations ---------- */
@keyframes up { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes down { to { opacity: 0; transform: translateY(20px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes heroIn { from { transform: scale(1.14); } to { transform: scale(1); } }
@keyframes approach { from { transform: scale(1); } to { transform: scale(1.09); } }
@keyframes kenburns { 0% { transform: scale(1.02) translate(0, 0); } 100% { transform: scale(1.14) translate(-2%, -1.5%); } }
@keyframes marquee { to { transform: translateX(-50%); } }

.up { animation: up 1.3s var(--ease) both; }
.d1 { animation-delay: .12s; } .d2 { animation-delay: .24s; } .d3 { animation-delay: .36s; } .d4 { animation-delay: .48s; }
.rv { opacity: 0; transform: translateY(26px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.rv.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .header-inner { flex-direction: row; justify-content: space-between; padding: 14px 20px; }
  .logo { align-items: flex-start; }
  .logo-name { font-size: 18px; letter-spacing: .03em; }
  .logo-sub { font-size: 8px; letter-spacing: .24em; }
  .menu-toggle { display: flex; flex-direction: column; justify-content: center; gap: 7px; width: 44px; height: 44px; background: none; border: 0; cursor: pointer; padding: 10px; }
  .menu-toggle span { display: block; height: 1px; background: var(--ink); transition: transform .4s var(--ease); }
  .menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .main-nav { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: center; gap: 22px; padding: 30px 20px 36px; background: var(--bg); border-bottom: 1px solid var(--line); opacity: 0; transform: translateY(-10px); pointer-events: none; transition: opacity .4s var(--ease), transform .4s var(--ease); }
  .main-nav.open { opacity: 1; transform: none; pointer-events: auto; }
  .container, .narrow { padding-left: 20px; padding-right: 20px; }
  .hero { padding-top: 60px; }
  .hero-photo { margin-top: 50px; }
  .process-grid, .name-grid, .values-grid, .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .works-grid { grid-template-columns: minmax(0, 1fr); }
  .card.wide { grid-column: auto; }
  .card-ph { height: 360px; padding: 28px; }
  .modal { padding: 0; }
  .modal-sheet { max-height: 100vh; height: 100%; }
  .modal-img { padding: 32px; }
  .modal-body { padding: 32px 24px 40px; }
  .modal-title { font-size: 32px; }
  .section { padding-top: 90px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .rv, .card { opacity: 1; transform: none; }
}
