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

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background: #f5e6c8;
  color: #262117;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: #262117;
  background: #f5e6c8;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

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

@keyframes grain-shift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2px, 1px); }
  50% { transform: translate(1px, -1px); }
  75% { transform: translate(-1px, 2px); }
  100% { transform: translate(2px, 0); }
}

.light-leak {
  position: fixed;
  top: -20%;
  right: -10%;
  width: 50vw;
  height: 70vh;
  z-index: 9997;
  pointer-events: none;
  background: radial-gradient(ellipse at 70% 30%, rgba(255, 210, 120, 0.18) 0%, rgba(212, 165, 116, 0.08) 40%, transparent 70%);
  animation: light-leak-pulse 6s ease-in-out infinite alternate;
}

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

/* ============================================================
   Layout: Left Fixed Nav + Main Content
   ============================================================ */
.site-footer-nav {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 220px;
  background: #262117;
  border-right: 2px solid #d4a574;
  display: flex;
  flex-direction: column;
  padding: 2rem 0 1.5rem;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
}

.brand-block {
  padding: 0 1.5rem 1.5rem;
  border-bottom: 1px solid rgba(212, 165, 116, 0.3);
  margin-bottom: 1rem;
}

.brand-link {
  display: block;
  text-decoration: none;
  margin-bottom: 0.5rem;
  padding: 0.5rem 0;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.logo-img {
  width: 100%;
  max-width: 140px;
  height: auto;
  display: block;
  filter: sepia(0.3) contrast(1.1);
}

.logo-text {
  font-size: 1rem;
  font-weight: 700;
  color: #f5e6c8;
  letter-spacing: 0.02em;
  line-height: 1.3;
  display: block;
  white-space: normal;
  word-break: break-all;
}

.brand-tagline {
  font-size: 0.72rem;
  color: rgba(245, 230, 200, 0.55);
  line-height: 1.4;
  margin-top: 0.4rem;
}

/* Nav: footer > nav > dl > dt/dd > a */
.main-nav {
  flex: 1;
  padding: 0 0.5rem;
}

.nav-list {
  list-style: none;
}

.nav-item {
  opacity: 0;
  animation: stagger-in 0.4s ease forwards;
  animation-delay: calc(var(--i) * 0.07s + 0.1s);
}

@keyframes stagger-in {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

.nav-item a {
  padding: 0.65rem 1rem;
  color: rgba(245, 230, 200, 0.8);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  border-left: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.nav-item a:hover,
.nav-item a:focus {
  color: #d4a574;
  border-left-color: #d4a574;
  background: rgba(212, 165, 116, 0.08);
}

.nav-contact {
  margin-top: 1.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid rgba(212, 165, 116, 0.2);
}

.contact-label {
  font-size: 0.75rem;
  color: rgba(212, 165, 116, 0.7);
  letter-spacing: 0.05em;
}

.footer-address {
  padding: 1rem 1.5rem 0;
  border-top: 1px solid rgba(212, 165, 116, 0.2);
  margin-top: auto;
  font-style: normal;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
}

.footer-links a {
  font-size: 0.72rem;
  color: rgba(245, 230, 200, 0.45);
  text-decoration: none;
  min-height: 44px;
  display: flex;
  align-items: center;
}

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

.copyright {
  font-size: 0.65rem;
  color: rgba(245, 230, 200, 0.3);
  line-height: 1.4;
}

/* ============================================================
   Main Content Area
   ============================================================ */
.site-main {
  margin-left: 220px;
  min-height: 100vh;
  position: relative;
}

.wrap {
  max-width: 960px;
  padding: 0;
}

/* ============================================================
   Hero Section
   ============================================================ */
.hero-section {
  min-height: 70vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 4rem 3rem 3rem;
  background:
    radial-gradient(circle at 80% 50%, rgba(212, 165, 116, 0.12) 0%, transparent 60%),
    #f5e6c8;
}

/* Dot grid background */
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(38, 33, 23, 0.12) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  z-index: 0;
}

/* VHS tracking line */
.hero-section::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(212, 165, 116, 0.5), transparent);
  animation: vhs-track 4s linear infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes vhs-track {
  0% { top: 0%; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

.hero-article {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 3rem;
  width: 100%;
}

.hero-inner {
  flex: 1;
  min-width: 0;
}

.hero-eyebrow {
  margin-bottom: 1rem;
}

.film-badge {
  display: inline-block;
  background: #262117;
  color: #d4a574;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.75rem;
  border: 1px solid #d4a574;
}

.hero-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.25;
  color: #262117;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.hero-sub {
  font-size: 1rem;
  color: rgba(38, 33, 23, 0.7);
  max-width: 480px;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.6rem 1.5rem;
  background: #262117;
  color: #f5e6c8;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  border: 2px solid #262117;
  transition: background 0.2s, color 0.2s, transform 0.15s;
  letter-spacing: 0.02em;
}

.btn-primary:hover {
  background: #d4a574;
  border-color: #d4a574;
  color: #262117;
  transform: translateY(-2px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.6rem 1.5rem;
  background: transparent;
  color: #262117;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  border: 2px solid #d4a574;
  transition: background 0.2s, color 0.2s, transform 0.15s;
  letter-spacing: 0.02em;
}

.btn-secondary:hover {
  background: #d4a574;
  color: #262117;
  transform: translateY(-2px);
}

/* Polaroid decoration */
.hero-deco {
  flex-shrink: 0;
}

.polaroid {
  background: #fff;
  padding: 0.75rem 0.75rem 2rem;
  border: 1px solid rgba(38, 33, 23, 0.15);
  box-shadow: 4px 6px 20px rgba(38, 33, 23, 0.2);
  transform: rotate(-4deg);
  transition: transform 0.3s ease;
  width: 160px;
  animation: polaroid-shake 6s ease-in-out infinite;
}

@keyframes polaroid-shake {
  0%, 100% { transform: rotate(-4deg); }
  50% { transform: rotate(-2deg) translateY(-4px); }
}

.polaroid:hover { transform: rotate(0deg) scale(1.03); }

.polaroid-inner {
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(135deg, #d4a574 0%, #f5e6c8 50%, #d4a574 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  filter: sepia(0.4) contrast(1.1) saturate(0.85);
}

.polaroid-caption {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: #262117;
  margin-top: 0.5rem;
  letter-spacing: 0.05em;
}

/* ============================================================
   Content Section: main > div.wrap > section > article
   ============================================================ */
.content-section {
  padding: 3rem 3rem 4rem;
  border-top: 2px solid #d4a574;
  position: relative;
}

.content-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #262117, #d4a574, #262117);
  opacity: 0.3;
}

.content-article {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
}

/* ============================================================
   Aside (left of content)
   ============================================================ */
.content-aside {
  flex-shrink: 0;
  width: 180px;
  position: sticky;
  top: 1.5rem;
}

.aside-inner {
  background: #262117;
  padding: 1.25rem;
  border: 1px solid #d4a574;
}

.aside-heading {
  font-size: 0.8rem;
  font-weight: 700;
  color: #d4a574;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.aside-heading span {
  display: block;
}

.aside-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.aside-nav a {
  color: rgba(245, 230, 200, 0.7);
  text-decoration: none;
  font-size: 0.78rem;
  padding: 0.4rem 0.5rem;
  border-left: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  min-height: 44px;
  display: flex;
  align-items: center;
  line-height: 1.3;
}

.aside-nav a:hover {
  color: #d4a574;
  border-left-color: #d4a574;
}

.aside-badge {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(212, 165, 116, 0.3);
  text-align: center;
}

.badge-text {
  font-size: 0.7rem;
  color: #d4a574;
  letter-spacing: 0.1em;
  font-weight: 600;
}

/* ============================================================
   Content Body (page.content injected here)
   ============================================================ */
.content-body {
  flex: 1;
  min-width: 0;
}

/* Prose Styles for page.content */
.content-body h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #262117;
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #d4a574;
  letter-spacing: -0.01em;
  scroll-margin-top: 80px;
}

.content-body h2 span {
  display: inline;
}

.content-body h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: #262117;
  margin: 2rem 0 0.75rem;
  scroll-margin-top: 80px;
}

.content-body h3 span {
  display: inline;
}

.content-body h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #262117;
  margin: 1.5rem 0 0.5rem;
}

.content-body p {
  margin-bottom: 1.1rem;
  color: rgba(38, 33, 23, 0.88);
  font-size: 1rem;
  line-height: 1.75;
}

.content-body a {
  color: #8b5e2a;
  text-decoration: underline;
  text-decoration-color: rgba(212, 165, 116, 0.5);
  transition: color 0.2s;
}

.content-body a:hover {
  color: #262117;
  text-decoration-color: #d4a574;
}

.content-body ul,
.content-body ol {
  padding-left: 1.5rem;
  margin-bottom: 1.1rem;
}

.content-body li {
  margin-bottom: 0.4rem;
  line-height: 1.7;
  color: rgba(38, 33, 23, 0.88);
}

.content-body strong {
  font-weight: 700;
  color: #262117;
}

.content-body blockquote {
  border-left: 3px solid #d4a574;
  padding: 0.75rem 1.25rem;
  background: rgba(212, 165, 116, 0.1);
  margin: 1.5rem 0;
  font-style: italic;
  color: rgba(38, 33, 23, 0.75);
}

.content-body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.content-body th {
  background: #262117;
  color: #f5e6c8;
  padding: 0.6rem 0.75rem;
  text-align: left;
  font-weight: 600;
}

.content-body td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid rgba(212, 165, 116, 0.3);
}

.content-body tr:nth-child(even) td {
  background: rgba(212, 165, 116, 0.07);
}

/* Section scroll anchors from page.content */
.content-body div {
  scroll-margin-top: 80px;
  padding-top: 1rem;
}

/* ============================================================
   Bottom Footer
   ============================================================ */
.site-footer-bottom {
  margin-left: 220px;
  background: #262117;
  border-top: 2px solid #d4a574;
  padding: 1.25rem 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

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

.footer-main-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-main-links li a {
  color: rgba(245, 230, 200, 0.55);
  text-decoration: none;
  font-size: 0.8rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: color 0.2s;
}

.footer-main-links li a:hover { color: #d4a574; }

.footer-copy {
  font-size: 0.75rem;
  color: rgba(245, 230, 200, 0.35);
  text-align: center;
  line-height: 1.5;
}

/* ============================================================
   Sepia / vintage filter on images in content
   ============================================================ */
.content-body img {
  max-width: 100%;
  height: auto;
  display: block;
  filter: sepia(0.2) contrast(1.05) saturate(0.85);
  border: 3px solid #f5e6c8;
  outline: 1px solid rgba(212, 165, 116, 0.4);
}

/* ============================================================
   Scroll margin for sections (single page nav)
   ============================================================ */
div[id] {
  scroll-margin-top: 80px;
}

/* ============================================================
   Fade-in animation
   ============================================================ */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-inner {
  animation: fade-up 0.6s ease both;
}

.hero-deco {
  animation: fade-up 0.6s ease 0.2s both;
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .grain-overlay { animation: none; }
  .light-leak { animation: none; }
  .polaroid { animation: none; }
  .hero-section::after { animation: none; }
}

/* ============================================================
   Mobile: ≤ 768px
   ============================================================ */
@media (max-width: 768px) {
  .site-footer-nav {
    position: static;
    width: 100%;
    flex-direction: column;
    border-right: none;
    border-bottom: 2px solid #d4a574;
    padding: 1rem 0;
    min-height: unset;
  }

  .brand-block {
    padding: 0 1rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid rgba(212, 165, 116, 0.3);
  }

  .brand-link {
    min-height: 44px;
    padding: 0.25rem 0;
  }

  .logo-text {
    font-size: 0.95rem;
  }

  .brand-tagline { display: none; }

  .main-nav { padding: 0.5rem; }

  .nav-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.25rem;
  }

  .nav-item { opacity: 1; animation: none; }

  .nav-item a {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    min-height: 44px;
    border-left: none;
    border-bottom: 2px solid transparent;
  }

  .nav-item a:hover {
    border-left-color: transparent;
    border-bottom-color: #d4a574;
  }

  .nav-contact { display: none; }

  .footer-address {
    padding: 0.75rem 1rem 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
  }

  .footer-links {
    flex-direction: row;
    gap: 0.75rem;
    margin-bottom: 0;
  }

  .footer-links a {
    min-height: 44px;
  }

  .copyright { font-size: 0.6rem; }

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

  .hero-section {
    min-height: auto;
    padding: 2.5rem 1.25rem 2rem;
  }

  .hero-article {
    flex-direction: column;
    gap: 2rem;
  }

  .hero-deco { order: -1; align-self: center; }

  .polaroid { width: 120px; }

  .hero-title { font-size: 1.6rem; }

  .content-section {
    padding: 2rem 1.25rem 3rem;
  }

  .content-article {
    flex-direction: column;
    gap: 2rem;
  }

  .content-aside {
    width: 100%;
    position: static;
  }

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

  .aside-heading { width: 100%; margin-bottom: 0.5rem; }

  .aside-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.25rem;
  }

  .aside-nav a {
    min-height: 44px;
    padding: 0.3rem 0.6rem;
    border-left: none;
    border-bottom: 2px solid transparent;
    font-size: 0.8rem;
  }

  .aside-badge { width: 100%; }

  .site-footer-bottom {
    margin-left: 0;
    padding: 1rem 1.25rem;
  }

  .footer-main-links { gap: 1rem; }

  div[id] { scroll-margin-top: 20px; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 1.35rem; }
  .btn-primary, .btn-secondary { width: 100%; justify-content: center; }
  .hero-actions { flex-direction: column; }
}
