/* 浮光社 · public site. Visual design lives here and in templates/*.php. */

/* ---------- tokens ---------- */
:root {
  --bg: #f6f2ec; --bg-2: #efe8de; --surface: #fffdf9; --line: rgba(60, 40, 20, .11);
  --fg: #1c1916; --muted: #6e655c; --faint: #a0968b;
  --accent: #9a7442; --accent-ink: #fffaf2; --heart: #c4485b;
  --shadow: 0 18px 50px -20px rgba(60, 40, 20, .35);
  --serif: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "Noto Serif SC", "STSong", "SimSun", serif;
  --sans: system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --radius: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #100f0e; --bg-2: #161412; --surface: #1c1a17; --line: rgba(255, 236, 210, .09);
    --fg: #f2ece4; --muted: #a59b90; --faint: #6f675e;
    --accent: #d8b98a; --accent-ink: #1a140c; --heart: #e8798a;
    --shadow: 0 24px 60px -24px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.75 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; letter-spacing: .02em; line-height: 1.25; margin: 0; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1240px; margin: 0 auto; padding-inline: clamp(16px, 4vw, 40px); }
.kicker { font-size: 12px; letter-spacing: .28em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.heart { color: var(--heart); }
.empty { color: var(--muted); padding: 40px 0; text-align: center; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff6e4, var(--accent) 55%, transparent 72%); box-shadow: 0 0 18px 2px color-mix(in srgb, var(--accent) 55%, transparent); }
.brand-name { font-family: var(--serif); font-size: 20px; font-weight: 700; letter-spacing: .18em; }
.brand-en { font-size: 10px; letter-spacing: .32em; color: var(--faint); padding-top: 3px; }
.site-nav { display: flex; gap: clamp(14px, 3vw, 32px); font-size: 14px; color: var(--muted); }
.site-nav a { position: relative; padding: 6px 0; transition: color .2s; }
.site-nav a:hover { color: var(--fg); }
.site-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--accent); transform: scaleX(0); transition: transform .25s; }
.site-nav a:hover::after { transform: scaleX(1); }

/* ---------- buttons, chips ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 24px; border-radius: 999px; font-size: 15px; transition: transform .2s, box-shadow .2s, background .2s; }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 30px -12px color-mix(in srgb, var(--accent) 80%, transparent); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 34px -12px var(--accent); }
.chip { position: absolute; left: 12px; top: 12px; font-size: 12px; padding: 3px 10px; border-radius: 999px; color: #fff; background: rgba(15, 12, 10, .45); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, .14); }

/* ---------- blurred hero backdrop (home, persona, series) ---------- */
.hero, .profile-hero, .series-hero { position: relative; overflow: hidden; isolation: isolate; }
.hero-bg { position: absolute; inset: -80px; z-index: -2; background-size: cover; background-position: center; filter: blur(70px) saturate(1.3); opacity: .45; transform: scale(1.1); }
.hero::after, .profile-hero::after, .series-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 35%, transparent) 0%, var(--bg) 100%); }

/* ---------- home hero ---------- */
.hero-row { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(28px, 5vw, 72px); align-items: center; padding-block: clamp(40px, 8vw, 100px) clamp(36px, 6vw, 72px); }
.hero-title { font-size: clamp(38px, 5.4vw, 68px); letter-spacing: .06em; }
.hero-persona { margin: 14px 0 0; font-size: 17px; color: var(--muted); }
.hero-persona a { border-bottom: 1px solid var(--line); transition: color .2s, border-color .2s; }
.hero-persona a:hover { color: var(--accent); border-color: var(--accent); }
.hero-caption { margin-top: 22px; max-width: 34em; color: var(--muted); font-size: 16px; line-height: 1.9; }
.hero-actions { display: flex; align-items: center; gap: 22px; margin-top: 32px; flex-wrap: wrap; }
.hero-stats { color: var(--muted); font-size: 14px; }

.hero-collage { position: relative; display: block; aspect-ratio: 5 / 5.2; }
.hero-collage img { position: absolute; object-fit: cover; aspect-ratio: 3 / 4; border-radius: 18px; box-shadow: var(--shadow); transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
.hero-collage .c0 { right: 4%; top: 0; width: 58%; z-index: 2; }
.hero-collage .c1 { left: 0; bottom: 0; width: 40%; z-index: 3; }
.hero-collage .c2 { left: 10%; top: 4%; width: 30%; z-index: 1; opacity: .8; }
.hero-collage.n1 .c0 { right: 18%; width: 64%; }
.hero-collage:hover .c0 { transform: translateY(-6px) rotate(-.6deg); }
.hero-collage:hover .c1 { transform: translate(-6px, 4px) rotate(-1.4deg); }
.hero-collage:hover .c2 { transform: translate(-4px, -6px) rotate(1.2deg); }

/* ---------- sections ---------- */
.section { padding-block: clamp(36px, 6vw, 72px) 0; }
.section[id] { scroll-margin-top: 72px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(22px, 2.4vw, 28px); display: flex; align-items: center; gap: 14px; }
.section-head h2::before { content: ""; width: 28px; height: 1px; background: var(--accent); }
.section-head p, .section-head .more { color: var(--muted); font-size: 14px; }
.section-head .more:hover { color: var(--accent); }

/* ---------- people ---------- */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.person { display: flex; gap: 18px; padding: 14px; border-radius: calc(var(--radius) + 4px); background: var(--surface); border: 1px solid var(--line); transition: transform .3s, box-shadow .3s, border-color .3s; }
.person:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.person-photo { flex: 0 0 104px; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; background: var(--bg-2); }
.person-photo img { width: 100%; height: 100%; object-fit: cover; }
.person-body { display: flex; flex-direction: column; min-width: 0; padding-block: 4px; }
.person-body h3 { font-size: 20px; }
.person-bio { margin-top: 6px; color: var(--muted); font-size: 13.5px; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.person-stats { margin-top: auto; padding-top: 8px; font-size: 12.5px; color: var(--faint); }

/* ---------- series cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: clamp(16px, 2vw, 26px); }
.card { display: block; }
.card-media { position: relative; aspect-ratio: 3 / 4; border-radius: var(--radius); overflow: hidden; background: var(--bg-2); box-shadow: 0 1px 0 var(--line); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2, .7, .2, 1); }
.card:hover .card-media img { transform: scale(1.05); }
.card-overlay { position: absolute; inset: auto 0 0 0; padding: 60px 18px 16px; color: #fff; background: linear-gradient(180deg, transparent, rgba(10, 8, 6, .78)); }
.card-persona { font-size: 12px; letter-spacing: .2em; opacity: .8; }
.card-title { font-size: 21px; margin-top: 2px; }
.card-meta { display: flex; justify-content: space-between; gap: 10px; padding: 10px 4px 0; font-size: 12.5px; color: var(--faint); }
.card-stats .dot { margin: 0 2px; }

/* ---------- persona page ---------- */
.profile-row { display: grid; grid-template-columns: minmax(200px, 300px) 1fr; gap: clamp(24px, 5vw, 64px); align-items: center; padding-block: clamp(36px, 7vw, 88px) clamp(24px, 4vw, 48px); }
.profile-photo { aspect-ratio: 3 / 4; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); background: var(--bg-2); }
.profile-photo img { width: 100%; height: 100%; object-fit: cover; }
.profile-name { font-size: clamp(40px, 5.6vw, 72px); letter-spacing: .12em; }
.profile-bio { margin-top: 18px; max-width: 34em; color: var(--muted); font-size: 16px; line-height: 1.9; }
.profile-stats { display: flex; gap: clamp(24px, 4vw, 48px); margin-top: 30px; }
.profile-stats div { display: flex; flex-direction: column; }
.profile-stats b { font-family: var(--serif); font-size: 30px; line-height: 1.1; }
.profile-stats span { font-size: 12px; color: var(--faint); letter-spacing: .12em; }

/* ---------- series page ---------- */
.series-head { text-align: center; padding-block: clamp(36px, 6vw, 80px) clamp(28px, 4vw, 44px); display: flex; flex-direction: column; align-items: center; }
.persona-chip { display: inline-flex; align-items: center; gap: 10px; padding: 4px 16px 4px 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; transition: border-color .2s; }
.persona-chip:hover { border-color: var(--accent); }
.persona-chip img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.series-title { font-size: clamp(34px, 4.8vw, 60px); margin-top: 22px; letter-spacing: .08em; }
.series-caption { margin-top: 18px; max-width: 40em; color: var(--muted); font-size: 16px; line-height: 1.95; }
.tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 20px; }
.tag { font-size: 12.5px; color: var(--accent); padding: 3px 12px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.tag::before { content: "#"; opacity: .6; margin-right: 1px; }
.series-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; margin-top: 28px; }
.meta-pill { font-size: 13px; color: var(--muted); padding: 7px 14px; border-radius: 999px; background: color-mix(in srgb, var(--surface) 70%, transparent); border: 1px solid var(--line); }
button.like { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; padding: 8px 20px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 15px; transition: background .25s, border-color .25s, color .25s, transform .15s; }
button.like svg { width: 18px; height: 18px; fill: none; stroke: var(--heart); stroke-width: 2; transition: fill .25s; }
button.like:hover { border-color: var(--heart); }
button.like:active { transform: scale(.96); }
button.like.on { background: var(--heart); border-color: var(--heart); color: #fff; }
button.like.on svg { fill: #fff; stroke: #fff; }
button.like.pop svg { animation: pop .45s cubic-bezier(.3, 1.6, .5, 1); }
button.like:disabled { opacity: .7; cursor: default; }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.45); } 100% { transform: scale(1); } }

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(10px, 1.4vw, 18px); }
.tile { position: relative; padding: 0; border: 0; cursor: zoom-in; aspect-ratio: 3 / 4; border-radius: var(--radius); overflow: hidden; background: var(--bg-2); }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2, .7, .2, 1), filter .4s; }
.tile:hover img { transform: scale(1.035); }
.tile-lead { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.tile-video { cursor: pointer; }
.tile-video .chip { top: auto; bottom: 12px; }
.play { position: absolute; inset: 0; display: grid; place-items: center; }
.play svg { width: 64px; height: 64px; padding: 18px 16px 18px 20px; border-radius: 50%; fill: #fff; background: rgba(15, 12, 10, .42); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, .25); transition: transform .3s, background .3s; }
.tile-video:hover .play svg { transform: scale(1.08); background: rgba(15, 12, 10, .6); }

/* ---------- lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(8, 7, 6, .94); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .25s ease; }
.lightbox[hidden] { display: none; }
.lb-stage { margin: 0; display: grid; place-items: center; width: 100vw; height: 100dvh; padding: 56px 72px; }
.lb-stage img, .lb-stage video { width: auto; height: auto; max-width: calc(100vw - 144px); max-height: calc(100vh - 112px); max-height: calc(100dvh - 112px); object-fit: contain; border-radius: 10px; box-shadow: 0 30px 80px -20px #000; background: #000; }
.lightbox button { position: absolute; border: 0; cursor: pointer; color: #f2ece4; background: rgba(255, 255, 255, .08); border-radius: 50%; width: 48px; height: 48px; font-size: 30px; line-height: 1; display: grid; place-items: center; transition: background .2s; }
.lightbox button:hover { background: rgba(255, 255, 255, .18); }
.lightbox button[hidden] { display: none; }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); color: #a59b90; font-size: 13px; letter-spacing: .15em; }
@keyframes fade { from { opacity: 0; } }

/* ---------- text pages ---------- */
.doc { max-width: 760px; padding-block: clamp(40px, 7vw, 88px) 0; }
.doc h1 { font-size: clamp(30px, 4vw, 44px); }
.doc .lead { font-size: 17px; color: var(--muted); margin-top: 18px; }
.doc h2 { font-size: 20px; margin: 40px 0 12px; }
.doc p { color: var(--muted); line-height: 1.95; margin-bottom: 10px; }
.notfound { text-align: center; padding-block: 120px 40px; }
.notfound h1 { font-size: clamp(28px, 4vw, 44px); }
.notfound p:not(.kicker) { color: var(--muted); margin: 14px 0 30px; }

/* ---------- footer ---------- */
.site-footer { margin-top: clamp(56px, 9vw, 120px); border-top: 1px solid var(--line); background: var(--bg-2); }
.footer-row { display: flex; justify-content: space-between; gap: 24px; padding-block: 40px; flex-wrap: wrap; }
.brand-small .brand-name { font-size: 17px; }
.footer-tag { margin-top: 10px; color: var(--muted); font-size: 13px; }
.footer-meta { color: var(--faint); font-size: 12.5px; text-align: right; }
.footer-meta a { border-bottom: 1px solid var(--line); }
.footer-meta a:hover { color: var(--accent); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-row { grid-template-columns: 1fr; }
  .hero-collage { max-width: 520px; width: 100%; margin-inline: auto; order: -1; }
  .profile-row { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .profile-photo { width: min(260px, 70vw); }
  .profile-bio { margin-inline: auto; }
  .profile-stats { justify-content: center; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .footer-meta { text-align: left; }
}
@media (max-width: 560px) {
  body { font-size: 14.5px; }
  .brand-en { display: none; }
  .header-row { height: 56px; }
  .hero-caption, .series-caption { font-size: 15px; }
  .people { grid-template-columns: 1fr; }
  .cards { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card-overlay { padding: 40px 12px 10px; }
  .card-title { font-size: 16px; }
  .card-meta { flex-direction: column; gap: 0; font-size: 11.5px; }
  .gallery { grid-template-columns: 1fr; }
  .tile-lead { grid-column: auto; grid-row: auto; aspect-ratio: 3 / 4; }
  .lb-stage { padding: 56px 8px; }
  .lb-stage img, .lb-stage video { max-width: calc(100vw - 16px); max-height: calc(100dvh - 140px); }
  .lb-prev, .lb-next { top: auto; bottom: 12px; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
