@import url('https://fonts.googleapis.com/css2?family=Didact+Gothic&family=Poiret+One&display=swap');

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  scroll-padding-top: 96px;
}

body {
  background-color: #f5e6c8;
  color: #262117;
  font-family: 'Didact Gothic', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ===== 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='grain'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23grain)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
  animation: grain-shift 0.15s steps(1) infinite;
}

@keyframes grain-shift {
  0%   { transform: translate(0, 0); }
  10%  { transform: translate(-2%, -3%); }
  20%  { transform: translate(3%, 1%); }
  30%  { transform: translate(-1%, 4%); }
  40%  { transform: translate(2%, -2%); }
  50%  { transform: translate(-3%, 3%); }
  60%  { transform: translate(1%, -1%); }
  70%  { transform: translate(3%, 2%); }
  80%  { transform: translate(-2%, 1%); }
  90%  { transform: translate(2%, -3%); }
  100% { transform: translate(0, 0); }
}

/* ===== LIGHT LEAK ===== */
.lightleak {
  position: fixed;
  top: -20%;
  right: -10%;
  width: 60vw;
  height: 80vh;
  z-index: 9998;
  pointer-events: none;
  background: radial-gradient(ellipse at 70% 20%, rgba(212,165,116,0.18) 0%, rgba(245,230,200,0.08) 50%, transparent 75%);
  animation: leak-pulse 8s ease-in-out infinite alternate;
}

@keyframes leak-pulse {
  0%   { opacity: 0.6; transform: scale(1) rotate(-5deg); }
  100% { opacity: 1; transform: scale(1.1) rotate(3deg); }
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 {
  font-family: 'Poiret One', 'Noto Serif SC', serif;
  line-height: 1.25;
  color: #262117;
  letter-spacing: 0.04em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2.2rem); margin-bottom: 0.4em; }
h3 { font-size: clamp(1.1rem, 2vw, 1.5rem); }

p { margin-bottom: 1em; }
a { color: #d4a574; text-decoration: none; transition: color 0.2s; }
a:hover { color: #262117; }

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: #262117;
  border-bottom: 2px solid #d4a574;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 56px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #f5e6c8;
  flex-shrink: 0;
}

.brand-logo { width: 36px; height: 36px; object-fit: contain; }

.brand-name {
  font-family: 'Poiret One', serif;
  font-size: 1.3rem;
  letter-spacing: 0.1em;
  color: #d4a574;
}

/* PRIMARY NAV: header nav > p > a */
.primary-nav { flex: 1; overflow: hidden; }

.nav-links {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.2rem;
  align-items: center;
  margin: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-links::-webkit-scrollbar { display: none; }

.nav-links a {
  color: #f5e6c8;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  padding: 0.7rem 0.7rem;
  min-height: 44px;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.nav-links a:hover {
  color: #d4a574;
  border-bottom-color: #d4a574;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px 8px;
  min-height: 44px;
  min-width: 44px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #f5e6c8;
  transition: transform 0.3s, opacity 0.3s;
}

/* STICKY ANCHOR NAV */
.sticky-nav {
  background: rgba(38, 33, 23, 0.95);
  border-top: 1px solid rgba(212,165,116,0.3);
  overflow-x: auto;
  scrollbar-width: none;
}

.sticky-nav::-webkit-scrollbar { display: none; }

.sticky-nav-links {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  gap: 0;
  margin-bottom: 0;
}

.sticky-nav-links a {
  display: inline-flex;
  align-items: center;
  color: rgba(245,230,200,0.75);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  padding: 0.5rem 0.8rem;
  min-height: 40px;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.sticky-nav-links a:hover {
  color: #d4a574;
  border-bottom-color: #d4a574;
}

/* ===== HERO ===== */
.hero-section {
  position: relative;
  min-height: 45vh;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  overflow: hidden;
  padding: 3rem 1.5rem;
  background-color: #1a1610;
}

/* dot grid bg */
.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(212,165,116,0.25) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.6;
}

/* collage */
.hero-collage {
  position: absolute;
  left: 2rem;
  top: 50%;
  transform: translateY(-50%);
  width: 48%;
  max-width: 520px;
  height: 90%;
}

.hero-polaroid {
  position: absolute;
  background: #f5e6c8;
  border: 8px solid #f5e6c8;
  border-bottom-width: 28px;
  box-shadow: 4px 6px 20px rgba(0,0,0,0.5);
  overflow: visible;
  transition: transform 0.4s ease;
}

.hero-polaroid-1 {
  width: 52%;
  top: 5%;
  left: 5%;
  transform: rotate(-4deg);
  z-index: 2;
}

.hero-polaroid-2 {
  width: 52%;
  bottom: 5%;
  left: 35%;
  transform: rotate(3.5deg);
  z-index: 3;
}

.hero-polaroid:hover { transform: rotate(0deg) scale(1.04); }

.hero-polaroid .hero-img,
.hero-polaroid img {
  display: block;
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  filter: sepia(0.3) contrast(1.05) saturate(0.85);
}

.hero-img-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  background: linear-gradient(135deg, #3a2e1e 0%, #5a4530 50%, #3a2e1e 100%);
}

.polaroid-tape {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  width: 40px;
  height: 18px;
  background: rgba(212,165,116,0.55);
  border-radius: 2px;
}

/* VHS scanline */
.vhs-scanline {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.03) 2px,
    rgba(0,0,0,0.03) 4px
  );
  animation: vhs-track 6s linear infinite;
  z-index: 10;
}

@keyframes vhs-track {
  0%   { transform: translateY(0) skewX(0deg); }
  92%  { transform: translateY(0) skewX(0deg); }
  93%  { transform: translateY(-3px) skewX(-0.4deg); }
  94%  { transform: translateY(2px) skewX(0.3deg); }
  95%  { transform: translateY(0) skewX(0deg); }
  100% { transform: translateY(0) skewX(0deg); }
}

/* hero copy — right aligned */
.hero-copy {
  position: relative;
  z-index: 20;
  text-align: right;
  max-width: 42%;
  margin-left: auto;
}

.hero-eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  color: #d4a574;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
  font-family: 'Didact Gothic', sans-serif;
}

.hero-h1 {
  font-family: 'Poiret One', serif;
  color: #f5e6c8;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.6);
  margin-bottom: 0.8rem;
  word-break: break-all;
}

.hero-tagline {
  color: rgba(245,230,200,0.8);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #d4a574;
  color: #262117;
  font-family: 'Poiret One', serif;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  padding: 0.7rem 1.8rem;
  min-height: 44px;
  border: 2px solid #d4a574;
  border-radius: 2px;
  transition: background 0.25s, color 0.25s;
}

.hero-cta:hover {
  background: #262117;
  color: #d4a574;
}

/* ===== LAYOUT: MAIN + ASIDE ===== */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
}

/* structural contract: main > div.wrap > section > article */
.wrap {
  flex: 1;
  min-width: 0;
}

/* ===== ASIDE ===== */
.sidebar {
  width: 220px;
  flex-shrink: 0;
  position: sticky;
  top: 100px;
  align-self: flex-start;
}

.aside-inner {
  background: #262117;
  border: 2px solid #d4a574;
  border-radius: 18px;
  padding: 1.4rem 1.2rem;
}

.aside-title {
  font-family: 'Poiret One', serif;
  color: #d4a574;
  font-size: 1rem;
  letter-spacing: 0.1em;
  margin-bottom: 0.2rem;
}

p.subtitle {
  font-size: 0.75rem;
  color: rgba(245,230,200,0.6);
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
}

.aside-nav {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.aside-nav dt {
  border-bottom: 1px solid rgba(212,165,116,0.2);
}

.aside-nav dt:last-child { border-bottom: none; }

.aside-nav dt a {
  display: flex;
  align-items: center;
  color: #f5e6c8;
  font-size: 0.82rem;
  padding: 0.55rem 0.3rem;
  min-height: 44px;
  letter-spacing: 0.05em;
  transition: color 0.2s, padding-left 0.2s;
}

.aside-nav dt a:hover {
  color: #d4a574;
  padding-left: 0.5rem;
}

/* ===== ARTICLE CONTENT STYLES ===== */
.article-content h2 {
  margin-top: 2.5rem;
  margin-bottom: 0.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid #d4a574;
  font-family: 'Poiret One', serif;
}

.article-content h2:first-child { margin-top: 0; }

.article-content h3 {
  margin-top: 1.8rem;
  margin-bottom: 0.5rem;
  color: #5a3e1b;
}

.article-content p {
  font-size: 1rem;
  line-height: 1.75;
  color: #3a2e1a;
}

.article-content ul, .article-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1em;
}

.article-content li { margin-bottom: 0.4em; line-height: 1.7; }

.article-content a { color: #b07b3e; }
.article-content a:hover { color: #262117; text-decoration: underline; }

/* section blocks inside page.content */
.article-content section {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px dashed rgba(212,165,116,0.4);
  scroll-margin-top: 96px;
}

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

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* stagger */
.stagger-item {
  opacity: 0;
  transform: translateX(-16px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.stagger-item.visible {
  opacity: 1;
  transform: translateX(0);
}

/* ===== FOOTER ===== */
.site-footer {
  background: #1a1610;
  border-top: 3px solid #d4a574;
  padding: 0 1.5rem;
}

.footer-brand-block {
  text-align: center;
  padding: 2rem 0 0;
  overflow: hidden;
}

.footer-super-brand {
  font-family: 'Poiret One', serif;
  font-size: clamp(3rem, 10vw, 8rem);
  color: rgba(212,165,116,0.12);
  letter-spacing: 0.15em;
  line-height: 1;
  user-select: none;
  margin-bottom: -0.15em;
}

.footer-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 0 2.5rem;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 2rem;
}

.footer-col-heading {
  font-family: 'Poiret One', serif;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  color: #d4a574;
  margin-bottom: 0.8rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(212,165,116,0.3);
}

.footer-col dd {
  color: rgba(245,230,200,0.7);
  font-size: 0.82rem;
  line-height: 1.6;
  margin-bottom: 0.4rem;
}

.footer-col dd a {
  color: rgba(245,230,200,0.7);
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 0.82rem;
  transition: color 0.2s;
}

.footer-col dd a:hover { color: #d4a574; }

.footer-col-desc {
  color: rgba(245,230,200,0.6);
  font-size: 0.8rem;
  line-height: 1.65;
  margin-bottom: 0.8rem;
}

.footer-logo-img { opacity: 0.8; margin-top: 0.5rem; }
.footer-logo-text {
  font-family: 'Poiret One', serif;
  color: #d4a574;
  font-size: 1.1rem;
  letter-spacing: 0.1em;
}

.footer-host {
  color: rgba(245,230,200,0.35);
  font-size: 0.72rem;
  margin-top: 0.5rem;
}

.footer-bottom {
  border-top: 1px solid rgba(212,165,116,0.2);
  padding: 1.2rem 0;
  text-align: center;
}

.footer-copy {
  font-size: 0.75rem;
  color: rgba(245,230,200,0.4);
  letter-spacing: 0.06em;
  margin: 0;
}

/* ===== CARD BASE ===== */
.card {
  border: 2px solid #d4a574;
  border-radius: 18px;
  padding: 1.4rem;
  background: rgba(245,230,200,0.6);
  box-shadow: none;
  transition: background 0.25s;
}

.card:hover { background: rgba(245,230,200,0.9); }

/* ===== POLAROID ANIMATION ===== */
@keyframes polaroid-shake {
  0%, 100% { transform: rotate(-4deg); }
  25% { transform: rotate(-5deg) scale(1.02); }
  50% { transform: rotate(-3.5deg); }
  75% { transform: rotate(-4.5deg); }
}

.hero-polaroid-1:hover { animation: polaroid-shake 0.5s ease; }
.hero-polaroid-2:hover { animation: none; transform: rotate(0deg) scale(1.04); }

/* ===== FADE IN ===== */
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-copy {
  animation: fade-in-up 0.8s ease 0.2s both;
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .grain-overlay { animation: none; }
  .lightleak { animation: none; }
  .vhs-scanline { animation: none; }
  .reveal, .stagger-item {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  main {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    position: static;
    order: -1;
  }

  .aside-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: flex-start;
  }

  .aside-title, p.subtitle { width: 100%; }

  .aside-nav {
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
  }

  .aside-nav dt {
    border-bottom: none;
    border-right: 1px solid rgba(212,165,116,0.2);
  }

  .aside-nav dt:last-child { border-right: none; }

  .aside-nav dt a {
    min-height: 44px;
    padding: 0.5rem 0.6rem;
  }

  .footer-main {
    grid-template-columns: 1fr 1fr;
  }

  .footer-col-brand {
    grid-column: 1 / -1;
  }

  .hero-collage {
    opacity: 0.35;
    left: 0;
    width: 55%;
  }

  .hero-copy {
    max-width: 70%;
  }
}

@media (max-width: 640px) {
  .site-header { position: sticky; }

  .primary-nav {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: #262117;
    border-bottom: 2px solid #d4a574;
    z-index: 400;
  }

  .primary-nav.open { display: block; }

  .nav-links {
    flex-direction: column;
    padding: 0.5rem 1.5rem;
    align-items: flex-start;
  }

  .nav-links a {
    width: 100%;
    min-height: 44px;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(212,165,116,0.15);
    border-left: none;
  }

  .nav-toggle {
    display: flex;
  }

  .hero-section {
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-end;
    padding: 2rem 1rem 2.5rem;
    min-height: 45vh;
  }

  .hero-collage {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.25;
  }

  .hero-copy {
    max-width: 100%;
    position: relative;
    z-index: 20;
  }

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

  .footer-main {
    grid-template-columns: 1fr;
  }

  .footer-super-brand {
    font-size: clamp(2.5rem, 14vw, 5rem);
  }

  .header-inner {
    padding: 0 1rem;
  }

  main {
    padding: 1.5rem 1rem;
  }

  html {
    scroll-padding-top: 84px;
  }
}
