/**
 * ====================================================================
 * TEMPLATE 03: THE TRAVEL DUO / WANDERLUST JOURNAL - STYLESHEET
 * ====================================================================
 * Compass Bronze, Antique Parchment, Interactive 3D Compass,
 * Scratch-off Boarding Pass, Passport Stamping, Campfire Blowout.
 */

:root {
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Outfit', sans-serif;
  --font-handwriting: 'Caveat', cursive;

  --bg-deep: #0c1222;
  --bg-card: rgba(19, 29, 51, 0.8);
  
  --accent-bronze: #d97706;
  --accent-gold: #f59e0b;
  --accent-emerald: #059669;
  --accent-rust: #ea580c;
  
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;

  --border-brass: rgba(217, 119, 6, 0.4);
  --border-glass: rgba(255, 255, 255, 0.1);

  --shadow-card: 0 20px 45px rgba(0, 0, 0, 0.6);
  --shadow-brass: 0 10px 30px rgba(217, 119, 6, 0.35);

  --transition-smooth: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  line-height: 1.65;
}

/* Background Topographic Contour Lines */
.topo-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(circle at 80% 20%, rgba(217, 119, 6, 0.15) 0%, transparent 50%),
                    radial-gradient(circle at 10% 80%, rgba(5, 150, 105, 0.12) 0%, transparent 50%);
}

.site-wrapper {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ====================================================================
   PASSPORT GATE & PASSCODE (Flight BD-0210)
   ==================================================================== */
.passcode-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, #1e293b 0%, #090d16 90%);
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  transition: opacity 0.6s ease, transform 0.6s ease, visibility 0.6s;
}

.passcode-overlay.unlocked {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.05);
  pointer-events: none;
}

.passport-passcode-card {
  background: #1e293b;
  border: 2px solid var(--accent-bronze);
  border-radius: 24px;
  padding: 2.25rem 2rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), var(--shadow-brass);
  text-align: center;
  max-width: 380px;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.passport-stamp-seal {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 70px;
  height: 70px;
  border: 3px dashed #ef4444;
  border-radius: 50%;
  color: #ef4444;
  font-weight: 800;
  font-size: 0.65rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: rotate(-15deg);
  opacity: 0.85;
}

.passcode-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.3rem;
}

.passcode-sub {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.passcode-dots-wrapper {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 1.5rem;
}

.passcode-dot-box {
  width: 46px;
  height: 52px;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: var(--accent-gold);
}

.passcode-dot-box.filled {
  border-color: var(--accent-bronze);
  background: rgba(217, 119, 6, 0.25);
  box-shadow: 0 0 15px rgba(217, 119, 6, 0.4);
}

.passcode-dots-wrapper.error .passcode-dot-box {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.2);
}

.passcode-dots-wrapper.success .passcode-dot-box {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.25);
}

.passcode-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  max-width: 270px;
  margin: 0 auto;
}

.keypad-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  padding: 0.75rem 0;
  cursor: pointer;
  transition: all 0.2s ease;
}

.keypad-btn:hover {
  background: rgba(217, 119, 6, 0.25);
  border-color: var(--accent-bronze);
}

.passcode-error-msg {
  color: #f87171;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 0.85rem;
  min-height: 1.2rem;
  opacity: 0;
}

.passcode-error-msg.visible {
  opacity: 1;
}

/* ====================================================================
   HERO & 3D MAGNETIC BRASS COMPASS
   ==================================================================== */
.hero-section {
  padding: 6.5rem 0 3.5rem;
  text-align: center;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1.25rem;
  background: rgba(217, 119, 6, 0.18);
  border: 1px solid var(--border-brass);
  border-radius: 999px;
  color: var(--accent-gold);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.3rem, 6.5vw, 4.2rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.title-glow {
  background: linear-gradient(135deg, #ffffff 10%, #fde047 50%, #d97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 30px rgba(217, 119, 6, 0.5));
}

.hero-sub {
  color: var(--text-secondary);
  font-size: 1.15rem;
  max-width: 640px;
  margin: 0 auto 2.5rem;
}

/* 3D Interactive Compass */
.compass-container {
  width: 200px;
  height: 200px;
  margin: 0 auto 2rem;
  position: relative;
  perspective: 800px;
}

.compass-casing {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #78350f 0%, #451a03 100%);
  border: 8px solid #b45309;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7), inset 0 0 15px rgba(0, 0, 0, 0.9), 0 0 25px rgba(217, 119, 6, 0.4);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Cardinal Directions */
.cardinal {
  position: absolute;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.85rem;
  color: #fde047;
}

.cardinal.north { top: 8px; left: calc(50% - 6px); color: #ef4444; }
.cardinal.south { bottom: 8px; left: calc(50% - 6px); }
.cardinal.east  { right: 10px; top: calc(50% - 8px); }
.cardinal.west  { left: 10px; top: calc(50% - 8px); }

/* Rotating Magnetic Needle */
.compass-needle {
  position: absolute;
  width: 12px;
  height: 150px;
  transform-origin: center center;
  transition: transform 0.15s ease-out;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.6));
}

.needle-north {
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 75px solid #ef4444;
}

.needle-south {
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 75px solid #e2e8f0;
}

.compass-center-pivot {
  position: absolute;
  width: 18px;
  height: 18px;
  background: #fde047;
  border: 2px solid #78350f;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
  z-index: 5;
}

.compass-hint {
  font-size: 0.85rem;
  color: var(--accent-gold);
  font-weight: 600;
}

/* ====================================================================
   DELAYED FLIGHT ADVISORY
   ==================================================================== */
.late-apology-banner {
  max-width: 780px;
  margin: 1.5rem auto 4.5rem;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid var(--border-brass);
  border-radius: 20px;
  padding: 1.5rem 2rem;
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  box-shadow: var(--shadow-card);
}

.late-icon {
  font-size: 2.2rem;
  flex-shrink: 0;
}

.late-content h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--accent-gold);
  margin-bottom: 0.25rem;
}

.late-content p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ====================================================================
   EXPEDITION JOURNAL LETTER
   ==================================================================== */
.section {
  padding: 4.5rem 0;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3rem;
}

.section-eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent-gold);
  margin-bottom: 0.5rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 800;
  color: #ffffff;
}

.journal-paper {
  background: #fbf9f4;
  color: #262626;
  border-radius: 20px;
  padding: clamp(2rem, 5vw, 3.5rem);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.65);
  position: relative;
  border: 2px solid #e7e5e4;
  max-width: 800px;
  margin: 0 auto;
}

/* Brass Paperclip at top corner */
.paperclip {
  position: absolute;
  top: -15px;
  right: 40px;
  width: 24px;
  height: 55px;
  border: 4px solid #d97706;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.journal-header {
  display: flex;
  justify-content: space-between;
  border-bottom: 2px dashed #d6d3d1;
  padding-bottom: 1.25rem;
  margin-bottom: 2rem;
}

.journal-coord {
  font-family: monospace;
  font-weight: 700;
  color: var(--accent-bronze);
  font-size: 0.9rem;
}

.journal-body {
  font-size: 1.12rem;
  line-height: 1.9;
  color: #292524;
}

.journal-body p {
  margin-bottom: 1.5rem;
}

.journal-signature {
  font-family: var(--font-handwriting);
  font-size: 2.2rem;
  font-weight: 700;
  color: #1c1917;
  text-align: right;
  margin-top: 2rem;
}

/* ====================================================================
   INTERACTIVE SCRATCH-OFF BOARDING PASS
   ==================================================================== */
.scratch-card-container {
  max-width: 600px;
  margin: 3rem auto 0;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 2px solid var(--accent-bronze);
  border-radius: 20px;
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
  text-align: center;
  position: relative;
}

.ticket-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
  padding-bottom: 0.85rem;
  margin-bottom: 1.25rem;
}

.ticket-flight-code {
  font-weight: 800;
  color: var(--accent-gold);
  letter-spacing: 1.5px;
}

.scratch-area-wrapper {
  position: relative;
  width: 100%;
  height: 120px;
  margin: 1rem 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.6);
}

.secret-message-box {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
  color: #fef08a;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.5;
  text-align: center;
  border-radius: 12px;
}

#scratch-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: grab;
  z-index: 5;
}

.scratch-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ====================================================================
   CAMPFIRE BLOWOUT
   ==================================================================== */
.campfire-stage {
  text-align: center;
  margin: 2.5rem auto;
  max-width: 260px;
  cursor: pointer;
}

.campfire-wrapper {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.fire-flames {
  position: relative;
  width: 80px;
  height: 90px;
}

.flame-base {
  position: absolute;
  bottom: 0;
  left: calc(50% - 25px);
  width: 50px;
  height: 75px;
  background: radial-gradient(ellipse at bottom, #fef08a 0%, #f59e0b 50%, #dc2626 100%);
  border-radius: 50% 50% 20% 20% / 60% 60% 40% 40%;
  box-shadow: 0 0 25px #f59e0b, 0 0 50px #dc2626;
  animation: fireFlicker 1.2s infinite alternate ease-in-out;
  transform-origin: center bottom;
  transition: opacity 0.5s ease;
}

@keyframes fireFlicker {
  0% { transform: scale(1) rotate(-3deg); }
  100% { transform: scale(1.1) rotate(3deg); }
}

.campfire-wrapper.blown .flame-base {
  opacity: 0;
}

.wood-logs {
  width: 120px;
  height: 25px;
  background: #78350f;
  border-radius: 8px;
  position: relative;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.6);
  margin-top: -10px;
}

.btn-blow-campfire {
  margin-top: 2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 2rem;
  background: linear-gradient(135deg, var(--accent-rust) 0%, #b45309 100%);
  color: #ffffff;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: var(--shadow-brass);
}

.campfire-wish-banner {
  margin-top: 1.5rem;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-gold);
  display: none;
}

.campfire-wish-banner.active {
  display: block;
}

/* ====================================================================
   CTA & FOOTER
   ==================================================================== */
.cta-box {
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid var(--border-brass);
  border-radius: 28px;
  padding: 3rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-card);
  max-width: 760px;
  margin: 0 auto;
}

.cta-box h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 800;
  margin-bottom: 0.8rem;
}

.cta-box p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.reply-buttons-wrapper {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.btn-wa {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 2rem;
  background: #25d366;
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  text-decoration: none;
  border-radius: 999px;
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
}

.btn-ig {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 2rem;
  background: linear-gradient(135deg, #f09433 0%, #dc2743 50%, #bc1888 100%);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  text-decoration: none;
  border-radius: 999px;
  box-shadow: 0 10px 25px rgba(220, 39, 67, 0.4);
}

.site-footer {
  text-align: center;
  padding: 3rem 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border-glass);
  margin-top: 4rem;
}

/* ====================================================================
   MOBILE & TABLET VIEWPORT RESPONSIVENESS
   ==================================================================== */
@media (max-width: 768px) {
  .stage-content, .container, .hero-section {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
  }
  .hero-heading, .hero-title, .hero-giant-name {
    font-size: clamp(1.8rem, 6vw, 2.8rem) !important;
    line-height: 1.2 !important;
  }
  .hero-desc, .hero-sub {
    font-size: 1rem !important;
    padding: 0 0.5rem !important;
  }
  .letter-paper, .letter-card, .scroll-letter, .letter-parchment, .notebook-card, .boarding-pass, .manifesto-card, .mixtape-card {
    padding: 1.75rem 1.25rem !important;
  }
  .timeline-grid, .memories-grid, .grid-2 {
    grid-template-columns: 1fr !important;
  }
  .cta-row, .btn-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.85rem !important;
  }
  .btn-cta, .btn-wa, .btn-ig {
    width: 100% !important;
    justify-content: center !important;
  }
}

@media (max-width: 480px) {
  .hero-heading, .hero-title, .hero-giant-name {
    font-size: 1.75rem !important;
  }
  .heart-card, .passcode-card, .pin-card {
    padding: 1.75rem 1.25rem !important;
  }
  .cake-tier {
    width: 160px !important;
    height: 65px !important;
    font-size: 1rem !important;
  }
}
