@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400&family=DM+Mono:wght@400;500&family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&display=swap');

:root {
  --gold: #c9a84c;
  --gold-light: #e8c96d;
  --gold-dark: #8a6a2a;
  --black: #0d0a06;
  --black-2: #12100c;
  --black-3: #1a1710;
  --border: rgba(201,168,76,0.15);
  --cream: #f5edd8;
  --cream-dim: #c8bfa8;
  --muted: #6a6255;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--black);
  color: var(--cream);
  font-family: 'Libre Baskerville', serif;
  overflow-x: hidden;
}

/* CENSUS TEXTURE */
body::before {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 28px, rgba(201,168,76,0.025) 28px, rgba(201,168,76,0.025) 29px),
    repeating-linear-gradient(90deg, transparent, transparent 120px, rgba(201,168,76,0.015) 120px, rgba(201,168,76,0.015) 121px);
}

/* NAV */
.deed-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: 56px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.5rem;
  background: rgba(13,10,6,0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}

.deed-nav-brand {
  display: flex; align-items: center; gap: 0.6rem;
  text-decoration: none;
}

.deed-nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 20px; font-weight: 900;
  letter-spacing: 0.12em; color: var(--gold);
}

.deed-nav-links {
  display: flex; gap: 1.75rem; list-style: none;
}

.deed-nav-links a {
  font-family: 'DM Mono', monospace;
  font-size: 9px; letter-spacing: 0.25em;
  text-transform: uppercase; color: var(--muted);
  text-decoration: none; transition: color 0.2s;
}

.deed-nav-links a:hover, .deed-nav-links a.active { color: var(--gold); }

.deed-nav-sub {
  font-family: 'DM Mono', monospace;
  font-size: 9px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--black);
  background: var(--gold); padding: 7px 16px;
  text-decoration: none; transition: background 0.2s;
  white-space: nowrap;
}

.deed-nav-sub:hover { background: var(--gold-light); }

/* HOUSE PIN SVG */
.house-pin { display: block; }

/* BUTTONS */
.btn-gold {
  font-family: 'DM Mono', monospace;
  font-size: 10px; letter-spacing: 0.25em;
  text-transform: uppercase; color: var(--black);
  background: var(--gold); padding: 13px 32px;
  text-decoration: none; display: inline-block;
  border: none; cursor: pointer; transition: background 0.2s;
}
.btn-gold:hover { background: var(--gold-light); }

.btn-outline {
  font-family: 'DM Mono', monospace;
  font-size: 10px; letter-spacing: 0.25em;
  text-transform: uppercase; color: var(--cream);
  background: transparent; padding: 13px 32px;
  text-decoration: none; display: inline-block;
  border: 1px solid rgba(245,237,216,0.25);
  transition: all 0.2s;
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }

/* FADE IN ANIMATIONS */
.fade-up { opacity: 0; animation: fadeUp 0.9s ease forwards; }
.d1 { animation-delay: 0.2s; }
.d2 { animation-delay: 0.5s; }
.d3 { animation-delay: 0.8s; }
.d4 { animation-delay: 1.1s; }
.d5 { animation-delay: 1.4s; }
.d6 { animation-delay: 1.8s; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

/* TICKER */
.deed-ticker {
  background: var(--gold); color: var(--black);
  padding: 9px 0; overflow: hidden; white-space: nowrap;
  position: relative; z-index: 1;
}
.deed-ticker-inner { display: inline-flex; animation: ticker 45s linear infinite; }
.deed-ticker-item {
  font-family: 'DM Mono', monospace;
  font-size: 9px; letter-spacing: 0.2em;
  text-transform: uppercase; padding: 0 2.5rem;
}
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* SCROLLYTELLING SECTIONS */
.scroll-section {
  position: relative; overflow: hidden;
  min-height: 80vh;
  display: flex; flex-direction: column; justify-content: center;
}

.scroll-section-inner {
  position: relative; z-index: 2;
  padding: 5rem 1.5rem;
  max-width: 760px; margin: 0 auto; width: 100%;
}

/* RECORD CARD */
.record-card {
  background: var(--cream); color: #1a1a1a;
  border: 1px solid #d4c9a8;
  max-width: 520px; margin: 2rem auto 0;
}

.record-card-header {
  background: var(--black-3); padding: 0.85rem 1.25rem;
  border-bottom: 1px solid #d4c9a8;
  display: flex; align-items: center; justify-content: space-between;
}

.record-card-title {
  font-family: 'Playfair Display', serif;
  font-size: 16px; font-weight: 700; color: var(--cream);
}

.record-card-badge {
  font-family: 'DM Mono', monospace;
  font-size: 7px; letter-spacing: 0.15em;
  text-transform: uppercase; background: var(--gold);
  color: #1a1710; padding: 2px 7px;
}

.record-card-doc {
  border-bottom: 1px solid #d4c9a8;
  cursor: pointer; overflow: hidden;
  background: #f9f4e8; position: relative;
  min-height: 120px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}

.record-card-doc img {
  width: 100%; max-height: 160px;
  object-fit: cover; display: block;
  transition: opacity 0.3s;
}

.record-card-doc-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: rgba(26,23,16,0.88);
  padding: 5px 10px;
  font-family: 'DM Mono', monospace;
  font-size: 7px; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--gold);
  text-align: center;
}

.record-card-doc-placeholder {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 0.5rem; padding: 1.5rem;
}

.record-card-body {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #d4c9a8;
  background: #f9f4e8;
}

.record-card-label {
  font-family: 'DM Mono', monospace;
  font-size: 7px; letter-spacing: 0.2em;
  text-transform: uppercase; color: #8a6a2a;
  margin-bottom: 0.4rem; display: block;
}

.record-card-table { width: 100%; border-collapse: collapse; }
.record-card-table tr { border-bottom: 1px solid rgba(201,168,76,0.12); }
.record-card-table td { padding: 3px 0; font-size: 11px; color: #2a2218; line-height: 1.4; vertical-align: top; }
.record-card-table td:first-child {
  font-family: 'DM Mono', monospace;
  font-size: 7px; letter-spacing: 0.1em;
  text-transform: uppercase; color: #8a6a2a;
  padding-right: 8px; width: 36%; white-space: nowrap;
}

.record-card-footer {
  padding: 0.65rem 1.25rem; background: #f0e8d4;
  font-family: 'DM Mono', monospace;
  font-size: 7px; letter-spacing: 0.1em;
  color: #6a5a3a; line-height: 1.6;
}

/* STORY NAV */
.story-nav-bar {
  border-top: 1px solid var(--border);
  padding: 1.5rem;
  display: flex; justify-content: space-between; align-items: center;
  position: relative; z-index: 1;
  background: var(--black-2);
}

.story-nav-link {
  font-family: 'DM Mono', monospace;
  font-size: 9px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--muted);
  text-decoration: none; transition: color 0.2s;
  display: flex; align-items: center; gap: 0.5rem;
}
.story-nav-link:hover { color: var(--gold); }

/* FOOTER */
.deed-footer {
  background: var(--black-2);
  border-top: 1px solid var(--border);
  padding: 3rem 1.5rem;
  position: relative; z-index: 1;
}

.deed-footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 3rem; align-items: start;
}

.deed-footer-logo {
  font-family: 'Playfair Display', serif;
  font-size: 32px; font-weight: 900;
  color: var(--gold); letter-spacing: 0.1em;
}

.deed-footer-tag {
  font-family: 'DM Mono', monospace;
  font-size: 8px; letter-spacing: 0.25em;
  text-transform: uppercase; color: var(--muted);
  margin-top: 0.35rem;
}

.deed-footer-nav-title {
  font-family: 'DM Mono', monospace;
  font-size: 8px; letter-spacing: 0.25em;
  text-transform: uppercase; color: var(--gold-dark);
  margin-bottom: 0.85rem;
}

.deed-footer-nav { list-style: none; }
.deed-footer-nav li { margin-bottom: 0.4rem; }
.deed-footer-nav a {
  font-family: 'DM Mono', monospace;
  font-size: 9px; letter-spacing: 0.1em;
  color: var(--muted); text-decoration: none;
  transition: color 0.2s;
}
.deed-footer-nav a:hover { color: var(--gold); }

.deed-footer-copy {
  font-family: 'DM Mono', monospace;
  font-size: 7px; letter-spacing: 0.12em;
  color: rgba(42,34,24,0.8); text-transform: uppercase;
  line-height: 1.8; margin-top: 2rem;
  grid-column: 1 / -1;
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}

/* LIGHTBOX */
.deed-lightbox {
  display: none; position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.97);
  flex-direction: column; align-items: center; justify-content: center;
  padding: 2rem;
}
.deed-lightbox.open { display: flex; }
.deed-lightbox img {
  max-width: 92vw; max-height: 78vh;
  object-fit: contain; border: 1px solid var(--border);
}
.deed-lightbox-cap {
  font-family: 'DM Mono', monospace;
  font-size: 8px; letter-spacing: 0.12em;
  color: var(--muted); margin-top: 1rem;
  text-align: center; max-width: 700px;
  line-height: 1.7; text-transform: uppercase;
}
.deed-lightbox-close {
  position: absolute; top: 1.25rem; right: 1.25rem;
  font-family: 'DM Mono', monospace;
  font-size: 9px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--gold);
  cursor: pointer; padding: 7px 14px;
  border: 1px solid var(--gold); background: none;
}

/* SCROLL REVEAL */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal.d1 { transition-delay: 0.1s; }
.reveal.d2 { transition-delay: 0.2s; }
.reveal.d3 { transition-delay: 0.35s; }
.reveal.d4 { transition-delay: 0.5s; }

/* PULL QUOTE */
.pull-quote {
  border-left: 3px solid var(--gold);
  padding-left: 1.25rem;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(16px, 2.2vw, 22px);
  color: var(--cream); line-height: 1.5;
  margin: 2rem 0;
}

/* STAT CALLOUT */
.stat-callout {
  border-left: 3px solid var(--gold);
  padding: 0.9rem 1.25rem;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(15px, 2vw, 20px);
  color: var(--cream); line-height: 1.5;
  margin: 1.5rem 0;
}

/* ANIMATED STATS GRID */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem; padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 2rem 0;
}

.stat-item { text-align: center; padding: 0 0.5rem; }

.stat-number {
  font-family: 'Playfair Display', serif;
  font-size: clamp(36px, 8vw, 72px);
  font-weight: 700; line-height: 1;
  display: block;
}

.stat-label {
  font-family: 'DM Mono', monospace;
  font-size: clamp(7px, 1.2vw, 9px);
  letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(245,237,216,0.5);
  margin-top: 0.4rem; display: block; line-height: 1.5;
}

/* PHOTO SLOT */
.photo-slot {
  width: 100%; position: relative;
  margin-bottom: 2rem; overflow: hidden;
  border: 1px solid var(--border);
}

.photo-slot img {
  width: 100%; display: block;
  max-height: 420px; object-fit: cover;
  transition: opacity 0.4s;
}

.photo-slot-cap {
  background: rgba(13,10,6,0.88);
  padding: 0.5rem 0.85rem;
  font-family: 'DM Mono', monospace;
  font-size: 8px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--gold-dark);
  border-top: 1px solid var(--border);
}

.photo-slot-ph {
  min-height: 220px; background: var(--black-3);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 0.5rem;
}

.photo-slot-ph span {
  font-family: 'DM Mono', monospace;
  font-size: 8px; letter-spacing: 0.2em;
  text-transform: uppercase; color: rgba(201,168,76,0.25);
}

/* PROGRESS BAR */
.story-progress {
  height: 2px; background: rgba(201,168,76,0.1);
  margin: 1.5rem 0; border-radius: 1px;
}

/* BADGE */
.deed-badge {
  font-family: 'DM Mono', monospace;
  font-size: 8px; letter-spacing: 0.15em;
  text-transform: uppercase;
  border: 1px solid var(--gold);
  color: var(--gold); padding: 3px 9px;
  display: inline-block;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .deed-nav-links { display: none; }
  .deed-footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .deed-footer-copy { grid-column: 1; }
  .stats-grid { grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* Mobile nav */
@media (max-width: 768px) {
  .deed-desktop-links { display: none !important; }
}

/* Force gold nav links — override browser defaults */
nav ul a, nav ul a:link, nav ul a:visited, nav ul a:hover, nav ul a:active {
  color: #c9a84c !important;
  text-decoration: none !important;
}
/* Subscribe button stays dark text on gold */
nav > a:last-child, nav > a:last-child:link, nav > a:last-child:visited, nav > a:last-child:hover {
  color: #0d0a06 !important;
  background: #c9a84c !important;
  text-decoration: none !important;
}
/* Registry specific nav override */
.site-nav-links a, .site-nav-links a:link, .site-nav-links a:visited {
  color: #c9a84c !important;
  text-decoration: none !important;
}
