/* ============================================================
   REDOUBT — Continuity Real Estate
   Cartographic design system. Standalone client showcase.
   ============================================================ */

:root {
  --parchment: #f4efe4;
  --parchment-dark: #e8dfd0;
  --ocean-shallow: #6fa8c7;
  --ocean-mid: #3a7ca5;
  --ocean-deep: #1a3a5c;
  --navy: #0d1b2a;
  --terrain-green: #5a7247;
  --terrain-brown: #8b6f47;
  --terrain-tan: #c4a265;
  --annotation-red: #c0392b;
  --contour-line: #7a6b5a;
  --contour-light: #a89a86;
  --grid-line: #c4b8a644;
  --ink: #2c1810;
  --ink-light: #5a4a3a;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--parchment);
  color: var(--ink);
  font-family: 'Cormorant Garamond', Georgia, serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Fine parchment grain — single subtle layer */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent, transparent 2px, #c4b8a608 2px, #c4b8a608 4px),
    repeating-linear-gradient(90deg, transparent, transparent 2px, #c4b8a608 2px, #c4b8a608 4px);
  pointer-events: none;
  z-index: 1;
}

::selection { background: var(--annotation-red); color: var(--parchment); }
a { color: inherit; }
*:focus-visible { outline: 2px solid var(--annotation-red); outline-offset: 3px; }

/* ==================== GRID OVERLAY ==================== */
.grid-overlay {
  position: fixed;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, var(--grid-line) 0px, var(--grid-line) 1px, transparent 1px, transparent 120px),
    repeating-linear-gradient(90deg, var(--grid-line) 0px, var(--grid-line) 1px, transparent 1px, transparent 120px);
  pointer-events: none;
  z-index: 2;
  opacity: 0.4;
}

/* ==================== COORDINATE MARKERS ==================== */
.coord-marker {
  position: fixed;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  color: var(--contour-light);
  pointer-events: none;
  z-index: 3;
  letter-spacing: 0.5px;
  opacity: 0.6;
}
.coord-top { top: 8px; }
.coord-bottom { bottom: 8px; }
.coord-left { left: 10px; }
.coord-right { right: 10px; }

/* ==================== COMPASS ROSE ==================== */
.compass-rose {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 80px;
  height: 80px;
  z-index: 10;
  opacity: 0.35;
  transition: opacity 0.4s;
}
.compass-rose:hover { opacity: 0.7; }
.compass-rose svg { width: 100%; height: 100%; }

/* ==================== NAV ==================== */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(to bottom, var(--parchment) 60%, transparent);
  backdrop-filter: blur(2px);
}

.nav-logo {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 22px;
  color: var(--navy);
  letter-spacing: 4px;
  text-transform: uppercase;
}
.nav-logo span { color: var(--annotation-red); }

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
}
.nav-links a {
  color: var(--ink-light);
  text-decoration: none;
  position: relative;
  padding-bottom: 4px;
  transition: color 0.3s;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: var(--annotation-red);
  transition: width 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}
.nav-links a:hover { color: var(--annotation-red); }
.nav-links a:hover::after { width: 100%; }

/* ==================== HERO ==================== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  padding: 120px 40px 80px;
}
.hero-contour-canvas { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero-contour-canvas svg { width: 100%; height: 100%; }
.hero-content { position: relative; z-index: 5; }

.hero-overline {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: var(--annotation-red);
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeSlideUp 1s 0.3s forwards;
}
.hero-overline::before, .hero-overline::after {
  content: '—';
  margin: 0 12px;
  color: var(--contour-light);
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: clamp(48px, 9vw, 140px);
  line-height: 0.95;
  color: var(--navy);
  margin-bottom: 10px;
  letter-spacing: 0.04em;
  opacity: 0;
  animation: fadeSlideUp 1.2s 0.5s forwards;
}
.hero h1 .accent { color: var(--annotation-red); font-style: italic; display: inline-block; }

.hero-tagline {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(22px, 3vw, 38px);
  font-weight: 300;
  font-style: italic;
  color: var(--ink-light);
  margin-top: 20px;
  margin-bottom: 50px;
  opacity: 0;
  animation: fadeSlideUp 1s 0.9s forwards;
}

.hero-cta {
  display: inline-block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--parchment);
  background: var(--navy);
  padding: 18px 48px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  opacity: 0;
  animation: fadeSlideUp 1s 1.2s forwards;
  border: none;
  cursor: pointer;
}
.hero-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--annotation-red);
  transform: translateX(-101%);
  transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}
.hero-cta:hover::before { transform: translateX(0); }
.hero-cta span { position: relative; z-index: 1; }

.hero-coords {
  position: absolute;
  bottom: 30px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: var(--contour-light);
  letter-spacing: 3px;
  opacity: 0;
  animation: fadeIn 1s 1.8s forwards;
}

.scroll-indicator {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  animation: fadeIn 1s 2s forwards;
}
.scroll-indicator span {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--contour-light);
}
.scroll-line { width: 1px; height: 40px; background: var(--contour-light); position: relative; overflow: hidden; }
.scroll-line::after {
  content: '';
  position: absolute;
  top: -100%;
  width: 100%; height: 100%;
  background: var(--annotation-red);
  animation: scrollPulse 2s infinite;
}

/* ==================== MANIFESTO ==================== */
.manifesto { padding: 120px 40px; position: relative; overflow: hidden; }
.manifesto-inner { max-width: 900px; margin: 0 auto; position: relative; }

.section-number {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 4px;
  color: var(--annotation-red);
  text-transform: uppercase;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-number::after { content: ''; flex: 1; height: 1px; background: var(--contour-light); }

.manifesto h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(32px, 5vw, 64px);
  font-weight: 900;
  color: var(--navy);
  line-height: 1.1;
  margin-bottom: 40px;
}
.manifesto h2 em { color: var(--annotation-red); font-style: italic; }

.manifesto-text {
  font-size: 22px;
  line-height: 1.8;
  color: var(--ink-light);
  font-weight: 300;
  max-width: 700px;
}
.manifesto-text strong { color: var(--ink); font-weight: 600; }

.manifesto-annotation {
  position: absolute;
  right: -20px;
  top: 50%;
  transform: rotate(90deg) translateX(-50%);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  letter-spacing: 3px;
  color: var(--annotation-red);
  opacity: 0.5;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ==================== CONTOUR DIVIDER ==================== */
.contour-divider { width: 100%; height: 200px; position: relative; overflow: hidden; }
.contour-divider svg { width: 100%; height: 100%; }

/* ==================== DATA SECTION ==================== */
.data-section {
  padding: 100px 40px 120px;
  background: var(--navy);
  color: var(--parchment);
  position: relative;
  overflow: hidden;
}
.data-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, #ffffff06 0px, #ffffff06 1px, transparent 1px, transparent 80px),
    repeating-linear-gradient(90deg, #ffffff06 0px, #ffffff06 1px, transparent 1px, transparent 80px);
  pointer-events: none;
}
.data-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  position: relative;
  z-index: 2;
}
.data-card {
  background: #ffffff08;
  border: 1px solid #ffffff12;
  padding: 50px 40px;
  position: relative;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}
.data-card:hover { background: #ffffff14; transform: translateY(-4px); }
.data-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: var(--annotation-red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}
.data-card:hover::before { transform: scaleX(1); }
.data-number {
  font-family: 'Playfair Display', serif;
  font-size: 64px;
  font-weight: 900;
  color: var(--annotation-red);
  line-height: 1;
  margin-bottom: 8px;
}
.data-unit {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ocean-shallow);
  margin-bottom: 20px;
}
.data-description {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  line-height: 1.6;
  color: #ffffffaa;
  font-style: italic;
}

/* ==================== DISPATCHES ==================== */
.whispers { padding: 140px 40px; position: relative; }
.whispers-header { text-align: center; margin-bottom: 80px; }
.whispers h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(36px, 5vw, 72px);
  font-weight: 900;
  color: var(--navy);
  margin-bottom: 16px;
}
.whispers h2 em { color: var(--annotation-red); font-style: italic; }
.whispers-sub {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  font-style: italic;
  color: var(--ink-light);
  font-weight: 300;
}
.whispers-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px 80px;
}
.whisper-item {
  position: relative;
  padding-left: 28px;
  border-left: 2px solid var(--contour-light);
  transition: border-color 0.4s;
}
.whisper-item:hover { border-left-color: var(--annotation-red); }
.whisper-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--annotation-red);
  margin-bottom: 12px;
}
.whisper-title {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 14px;
  line-height: 1.2;
}
.whisper-text { font-size: 17px; line-height: 1.7; color: var(--ink-light); font-weight: 300; }

/* ==================== QUOTE ==================== */
.terrain-quote {
  padding: 100px 40px;
  background: linear-gradient(135deg, var(--ocean-deep), var(--navy));
  text-align: center;
  position: relative;
  overflow: hidden;
}
.terrain-quote blockquote {
  max-width: 800px;
  margin: 0 auto;
  font-family: 'Playfair Display', serif;
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 400;
  font-style: italic;
  color: var(--parchment);
  line-height: 1.4;
  position: relative;
  z-index: 2;
}
.terrain-quote blockquote::before {
  content: '"';
  position: absolute;
  top: -40px; left: -20px;
  font-size: 120px;
  color: var(--annotation-red);
  opacity: 0.4;
  font-style: normal;
  line-height: 1;
}
.terrain-quote .attribution {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--ocean-shallow);
  margin-top: 32px;
  position: relative;
  z-index: 2;
}

/* ==================== HOLDINGS ==================== */
.expeditions { padding: 140px 40px; position: relative; }
.expeditions-header { max-width: 1100px; margin: 0 auto 80px; }
.expeditions h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 900;
  color: var(--navy);
  margin-bottom: 16px;
}
.expeditions-sub {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-style: italic;
  color: var(--ink-light);
  max-width: 600px;
}
.expedition-list { max-width: 1100px; margin: 0 auto; }
.expedition-item {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  align-items: center;
  gap: 40px;
  padding: 36px 0;
  border-bottom: 1px solid var(--contour-light);
  position: relative;
  transition: all 0.3s;
}
.expedition-item:first-child { border-top: 1px solid var(--contour-light); }
.expedition-item:hover { padding-left: 20px; }
.expedition-item::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--annotation-red);
  transform: scaleY(0);
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}
.expedition-item:hover::before { transform: scaleY(1); }
.expedition-year {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--contour-line);
}
.expedition-name {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--navy);
  transition: color 0.3s;
}
.expedition-item:hover .expedition-name { color: var(--annotation-red); }
.expedition-tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ink-light);
  border: 1px solid var(--contour-light);
  padding: 6px 16px;
  white-space: nowrap;
}
.expedition-tag.available { color: var(--terrain-green); border-color: var(--terrain-green); }

/* ==================== ABOUT ==================== */
.about-section { padding: 120px 40px; background: var(--parchment-dark); position: relative; }
.about-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: start;
}
.about-left h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(32px, 4vw, 56px);
  font-weight: 900;
  color: var(--navy);
  margin: 16px 0 30px;
  line-height: 1.1;
}
.about-left h2 em { color: var(--annotation-red); font-style: italic; }
.about-left p { font-size: 20px; line-height: 1.8; color: var(--ink-light); font-weight: 300; }
.about-right { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.team-card {
  background: var(--parchment);
  padding: 32px 24px;
  border: 1px solid var(--contour-light);
  position: relative;
  overflow: hidden;
  transition: all 0.4s;
}
.team-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px #2c181015; }
.team-card-coords {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--contour-light);
  margin-bottom: 16px;
}
.team-card-name {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}
.team-card-role {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--annotation-red);
  margin-bottom: 14px;
}
.team-card-bio { font-size: 15px; line-height: 1.6; color: var(--ink-light); font-style: italic; }

/* ==================== FINAL CTA ==================== */
.final-cta { padding: 160px 40px; text-align: center; position: relative; overflow: hidden; }
.final-cta-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.final-cta-content { position: relative; z-index: 5; }
.final-cta h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(40px, 6vw, 80px);
  font-weight: 900;
  color: var(--navy);
  margin-bottom: 20px;
  line-height: 1.05;
}
.final-cta h2 em { color: var(--annotation-red); font-style: italic; }
.final-cta p {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  font-style: italic;
  color: var(--ink-light);
  max-width: 600px;
  margin: 0 auto 50px;
  line-height: 1.6;
}
.final-cta-btn {
  display: inline-block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--parchment);
  background: var(--annotation-red);
  padding: 22px 60px;
  text-decoration: none;
  transition: all 0.4s;
  border: 2px solid var(--annotation-red);
  cursor: pointer;
}
.final-cta-btn:hover { background: transparent; color: var(--annotation-red); }

/* ==================== PORTFOLIO CREDIT ==================== */
.built-by {
  background: var(--parchment-dark);
  text-align: center;
  padding: 40px;
  border-top: 1px solid var(--contour-light);
}
.built-by a {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-light);
  text-decoration: none;
  transition: color 0.3s;
}
.built-by a:hover { color: var(--annotation-red); }

/* ==================== FOOTER ==================== */
footer { background: var(--navy); color: var(--parchment); padding: 60px 40px 40px; position: relative; }
.footer-inner { max-width: 1100px; margin: 0 auto; display: flex; justify-content: space-between; align-items: start; gap: 40px; }
.footer-brand { font-family: 'Playfair Display', serif; font-weight: 900; font-size: 18px; letter-spacing: 2px; margin-bottom: 12px; }
.footer-brand span { color: var(--annotation-red); }
.footer-tagline { font-family: 'Cormorant Garamond', serif; font-size: 15px; font-style: italic; color: #ffffff66; max-width: 280px; }
.footer-links { display: flex; gap: 40px; }
.footer-col-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ocean-shallow);
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-size: 15px;
  color: #ffffffaa;
  text-decoration: none;
  margin-bottom: 8px;
  transition: color 0.3s;
}
.footer-col a:hover { color: var(--annotation-red); }
.footer-bottom {
  max-width: 1100px;
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid #ffffff15;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 1px;
  color: #ffffff44;
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeSlideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scrollPulse { 0% { top: -100%; } 100% { top: 200%; } }
@keyframes drawContour { from { stroke-dashoffset: 1000; } to { stroke-dashoffset: 0; } }

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.23, 1, 0.32, 1), transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

.contour-path { stroke-dasharray: 1000; stroke-dashoffset: 1000; }
.contour-path.animate { animation: drawContour 3s cubic-bezier(0.23, 1, 0.32, 1) forwards; }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 900px) {
  .data-grid { grid-template-columns: 1fr; }
  .whispers-grid { grid-template-columns: 1fr; }
  .about-inner { grid-template-columns: 1fr; gap: 40px; }
  .about-right { grid-template-columns: 1fr 1fr; }
  .expedition-item { grid-template-columns: 90px 1fr; gap: 20px; }
  .expedition-tag { display: none; }
  .footer-inner { flex-direction: column; gap: 30px; }
  .footer-links { gap: 24px; }
  nav { padding: 16px 20px; }
  .compass-rose { display: none; }
}

@media (max-width: 600px) {
  .about-right { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .manifesto, .whispers, .expeditions, .about-section { padding-left: 22px; padding-right: 22px; }
  .manifesto-annotation { display: none; }
}

/* Respect 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; }
  .reveal { opacity: 1; transform: none; }
  .contour-path { stroke-dashoffset: 0; }
}
