@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600;700&family=Poppins:wght@400;500;600;700&display=swap');

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --cream: #f5e6c8;
  --gold: #d4a574;
  --dark: #262117;
  --gold-light: #e8c49a;
  --gold-deep: #b8834a;
  --cream-dark: #e8d4aa;
  --dark-mid: #3a2e1a;
  --dark-soft: #4a3c26;
  --text-main: #262117;
  --text-muted: #6b5540;
  --sidebar-w: 240px;
  --border: 1px solid #d4a574;
  --radius: 4px;
  --radius-pill: 999px;
  --font-main: 'Poppins', 'Open Sans', sans-serif;
  --font-body: 'Open Sans', 'Poppins', sans-serif;
  --nav-top-h: 36px;
  --transition: 0.22s ease;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body.vintage-body {
  background-color: var(--cream);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

/* =============================================
   FILM GRAIN OVERLAY
   ============================================= */
.grain-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23g)' opacity='1'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  animation: grain-shift 0.18s steps(1) infinite;
}

@keyframes grain-shift {
  0%   { background-position: 0 0; }
  25%  { background-position: -40px 20px; }
  50%  { background-position: 30px -15px; }
  75%  { background-position: -20px -30px; }
  100% { background-position: 10px 40px; }
}

/* =============================================
   LIGHT LEAKS
   ============================================= */
.light-leak {
  position: fixed;
  z-index: 9998;
  pointer-events: none;
  border-radius: 50%;
  opacity: 0.13;
  animation: leak-pulse 8s ease-in-out infinite alternate;
}

.leak-tl {
  width: 420px;
  height: 420px;
  top: -120px;
  left: -80px;
  background: radial-gradient(circle, #f5c870 0%, #e8956040 50%, transparent 75%);
}

.leak-br {
  width: 360px;
  height: 360px;
  bottom: -80px;
  right: -60px;
  background: radial-gradient(circle, #d4a57480 0%, #b8642040 55%, transparent 78%);
  animation-delay: 3s;
  animation-direction: alternate-reverse;
}

@keyframes leak-pulse {
  from { opacity: 0.08; transform: scale(0.95); }
  to   { opacity: 0.18; transform: scale(1.08); }
}

/* =============================================
   SITE WRAPPER / LAYOUT
   ============================================= */
.site-wrapper {
  display: flex;
  min-height: 100vh;
  position: relative;
}

/* =============================================
   SIDEBAR NAV
   ============================================= */
.sidebar-nav {
  width: var(--sidebar-w);
  min-height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  background: var(--dark);
  border-right: 2px solid var(--gold);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 28px 16px 24px;
  min-height: 100%;
}

.brand-block {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--dark-soft);
}

.brand-link {
  display: block;
  text-decoration: none;
  margin-bottom: 8px;
}

.brand-logo,
.brand-mark {
  max-width: 140px;
  height: auto;
  display: block;
}

.brand-text-logo {
  display: block;
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--gold);
  letter-spacing: 0.04em;
  line-height: 1.3;
  word-break: break-all;
}

.brand-slogan {
  font-size: 0.7rem;
  color: var(--gold-light);
  opacity: 0.7;
  line-height: 1.4;
  margin-top: 4px;
  font-family: var(--font-body);
}

/* NAV PILLS */
.pill-nav { flex: 1; }

.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-pill {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--dark-soft);
  background: transparent;
  color: var(--cream);
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 44px;
  line-height: 1.2;
}

.nav-pill:hover,
.nav-pill:focus-visible {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--dark);
  transform: translateX(4px);
}

.sidebar-footer-note {
  margin-top: auto;
  padding-top: 20px;
  text-align: center;
}

.film-badge {
  display: inline-block;
  font-size: 0.68rem;
  color: var(--gold);
  opacity: 0.6;
  letter-spacing: 0.12em;
  font-family: var(--font-main);
}

/* =============================================
   MAIN WRAP
   ============================================= */
.main-wrap {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* =============================================
   TOP BANNER
   ============================================= */
.top-banner {
  background: var(--dark);
  border-bottom: 1px solid var(--gold);
  padding: 8px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  height: var(--nav-top-h);
}

.banner-text {
  font-size: 0.72rem;
  color: var(--gold-light);
  font-family: var(--font-main);
  letter-spacing: 0.06em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.banner-dot {
  color: var(--gold);
  font-size: 0.55rem;
  flex-shrink: 0;
}

/* =============================================
   MAIN CONTENT
   ============================================= */
.main-content {
  flex: 1;
  padding: 0;
}

.page-article {
  min-height: 60vh;
}

/* =============================================
   HERO SECTION
   ============================================= */
.hero-section {
  position: relative;
  min-height: 45vh;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  background: var(--dark);
  border-bottom: 2px solid var(--gold);
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(0.4) contrast(0.85) saturate(0.75) brightness(0.6);
  display: block;
}

.hero-text-layer {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  padding: 40px 48px 40px 32px;
  background: linear-gradient(135deg, rgba(38,33,23,0.3) 0%, rgba(38,33,23,0.72) 100%);
  text-align: right;
}

.polaroid-badge {
  display: inline-block;
  background: var(--gold);
  color: var(--dark);
  font-family: var(--font-main);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 16px;
  border: 1.5px solid var(--dark);
  animation: polaroid-shake 4s ease-in-out infinite;
}

@keyframes polaroid-shake {
  0%,100% { transform: rotate(-1deg); }
  50%      { transform: rotate(1.2deg); }
}

.hero-h1 {
  font-family: var(--font-main);
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--cream);
  line-height: 1.25;
  margin-bottom: 14px;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 12px rgba(38,33,23,0.7);
}

.hero-sub {
  font-size: 0.92rem;
  color: var(--gold-light);
  max-width: 440px;
  line-height: 1.6;
  margin-bottom: 24px;
}

.hero-cta-btn {
  display: inline-flex;
  align-items: center;
  background: var(--gold);
  color: var(--dark);
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 12px 32px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--dark);
  text-decoration: none;
  letter-spacing: 0.06em;
  transition: background var(--transition), transform var(--transition), color var(--transition);
  min-height: 44px;
}

.hero-cta-btn:hover,
.hero-cta-btn:focus-visible {
  background: var(--cream);
  color: var(--dark);
  transform: translateY(-2px);
}

/* VHS SCANLINE */
.vhs-scanline {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(38,33,23,0.06) 3px,
    rgba(38,33,23,0.06) 4px
  );
  animation: vhs-track 6s linear infinite;
}

@keyframes vhs-track {
  0%   { transform: skewX(0deg) translateY(0); }
  2%   { transform: skewX(-0.5deg) translateY(-2px); }
  4%   { transform: skewX(0.3deg) translateY(1px); }
  6%   { transform: skewX(0deg) translateY(0); }
  100% { transform: skewX(0deg) translateY(0); }
}

/* =============================================
   CONTENT SECTIONS (page.content 插入区)
   ============================================= */
.content-sections {
  padding: 0;
}

.content-sections section {
  scroll-margin-top: calc(var(--nav-top-h) + 16px);
  padding: 56px 48px;
  border-bottom: 1px solid var(--cream-dark);
  position: relative;
}

.content-sections section:nth-child(even) {
  background: rgba(212,165,116,0.07);
}

.content-sections section:last-child {
  border-bottom: none;
}

.content-sections h2 {
  font-family: var(--font-main);
  font-size: clamp(1.25rem, 3vw, 1.9rem);
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 20px;
  line-height: 1.3;
  letter-spacing: 0.02em;
}

.content-sections h3 {
  font-family: var(--font-main);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--dark-mid);
  margin: 24px 0 10px;
}

.content-sections p {
  margin-bottom: 16px;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-main);
  max-width: 72ch;
}

.content-sections ul,
.content-sections ol {
  padding-left: 1.6em;
  margin-bottom: 16px;
}

.content-sections li {
  margin-bottom: 8px;
  line-height: 1.7;
}

.content-sections a {
  color: var(--gold-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition);
}

.content-sections a:hover {
  color: var(--dark);
}

.content-sections small {
  display: block;
  font-size: 0.7rem;
  font-family: var(--font-main);
  letter-spacing: 0.14em;
  color: var(--gold-deep);
  margin-bottom: 6px;
  font-weight: 600;
}

.content-sections .card,
.content-sections [class*="card"] {
  border: var(--border);
  border-radius: var(--radius);
  background: transparent;
  box-shadow: none;
  padding: 20px;
  transition: border-color var(--transition), transform var(--transition);
}

.content-sections .card:hover,
.content-sections [class*="card"]:hover {
  border-color: var(--gold-deep);
  transform: translateY(-2px);
}

.content-sections img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: var(--border);
  filter: sepia(0.15) contrast(0.92) saturate(0.82);
  display: block;
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  background: var(--dark);
  border-top: 2px solid var(--gold);
  color: var(--cream);
  padding: 0;
}

.footer-top {
  padding: 32px 48px 0;
  border-bottom: 1px solid var(--dark-soft);
}

.footer-brand-super {
  font-family: var(--font-main);
  font-size: clamp(2.2rem, 6vw, 5rem);
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.04em;
  line-height: 1;
  padding-bottom: 24px;
  opacity: 0.85;
  word-break: break-all;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  padding: 40px 48px;
}

.footer-col {
  padding: 0 24px 0 0;
}

.footer-col:last-child {
  padding-right: 0;
}

.footer-col-title {
  font-family: var(--font-main);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 16px;
}

.footer-col-text {
  font-size: 0.82rem;
  color: var(--cream-dark);
  opacity: 0.75;
  line-height: 1.7;
}

.footer-nav-dl {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-nav-dl dt,
.footer-nav-dl dd {
  margin: 0;
  padding: 0;
}

.footer-nav-dl a {
  color: var(--cream-dark);
  text-decoration: none;
  font-size: 0.83rem;
  font-family: var(--font-body);
  opacity: 0.8;
  transition: color var(--transition), opacity var(--transition);
  display: inline-flex;
  align-items: center;
  min-height: 40px;
}

.footer-nav-dl a:hover,
.footer-nav-dl a:focus-visible {
  color: var(--gold);
  opacity: 1;
}

.footer-address {
  font-style: normal;
}

.footer-contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-contact-list li a {
  color: var(--cream-dark);
  text-decoration: none;
  font-size: 0.83rem;
  opacity: 0.8;
  transition: color var(--transition), opacity var(--transition);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 4px 0;
}

.footer-contact-list li a:hover,
.footer-contact-list li a:focus-visible {
  color: var(--gold);
  opacity: 1;
}

.footer-bottom {
  border-top: 1px solid var(--dark-soft);
  padding: 16px 48px;
  text-align: center;
}

.footer-copy {
  font-size: 0.72rem;
  color: var(--cream);
  opacity: 0.45;
  line-height: 1.6;
  font-family: var(--font-body);
}

/* =============================================
   SCROLL MARGIN FOR SECTIONS
   ============================================= */
section[id] {
  scroll-margin-top: calc(var(--nav-top-h) + 12px);
}

/* =============================================
   PREFERS REDUCED MOTION
   ============================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* =============================================
   RESPONSIVE: TABLET
   ============================================= */
@media (max-width: 1024px) {
  :root { --sidebar-w: 200px; }

  .footer-columns {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px 0;
  }

  .content-sections section {
    padding: 44px 32px;
  }

  .hero-text-layer {
    padding: 32px 32px 32px 24px;
  }

  .footer-top,
  .footer-columns,
  .footer-bottom {
    padding-left: 32px;
    padding-right: 32px;
  }
}

/* =============================================
   RESPONSIVE: MOBILE
   ============================================= */
@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }

  .sidebar-nav {
    width: 100%;
    min-height: auto;
    position: static;
    border-right: none;
    border-bottom: 2px solid var(--gold);
  }

  .sidebar-inner {
    padding: 20px 16px 16px;
    flex-direction: column;
  }

  .pill-nav .nav-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }

  .nav-pill {
    font-size: 0.75rem;
    padding: 10px 12px;
    min-height: 44px;
    transform: none !important;
  }

  .brand-block {
    margin-bottom: 14px;
    padding-bottom: 14px;
  }

  .sidebar-footer-note {
    display: none;
  }

  .site-wrapper {
    flex-direction: column;
  }

  .main-wrap {
    margin-left: 0;
  }

  .hero-section {
    min-height: 50vh;
  }

  .hero-text-layer {
    padding: 28px 20px;
    align-items: flex-end;
  }

  .hero-h1 {
    font-size: 1.55rem;
  }

  .hero-sub {
    font-size: 0.85rem;
    max-width: 100%;
  }

  .content-sections section {
    padding: 36px 20px;
  }

  .footer-columns {
    grid-template-columns: 1fr 1fr;
    padding: 28px 20px;
    gap: 24px;
  }

  .footer-top {
    padding: 24px 20px 0;
  }

  .footer-bottom {
    padding: 14px 20px;
  }

  .footer-brand-super {
    font-size: 2rem;
  }

  .top-banner {
    padding: 8px 16px;
  }

  .banner-text {
    font-size: 0.67rem;
  }
}

@media (max-width: 480px) {
  .footer-columns {
    grid-template-columns: 1fr;
  }

  .hero-cta-btn {
    font-size: 0.85rem;
    padding: 11px 24px;
  }

  .content-sections h2 {
    font-size: 1.2rem;
  }

  .pill-nav .nav-list {
    gap: 5px;
  }

  .nav-pill {
    font-size: 0.72rem;
    padding: 10px 10px;
    min-height: 44px;
  }
}
