/* 
   Convite São Cristóvão - Modern CSS Stylesheet
   Created with Rich Aesthetics & Scroll-driven Animations
*/

:root {
  /* Colors */
  --bg-primary: #07151a;
  --bg-darker: #040d10;
  --primary-teal: #0d2830;
  --accent-gold: #f4c430;
  --accent-sunset: #e07a5f;
  --text-white: #ffffff;
  --text-muted: #a0c0c8;
  
  /* Glassmorphism */
  --glass-bg: rgba(13, 40, 48, 0.45);
  --glass-border: rgba(244, 196, 48, 0.18);
  --glass-shadow: 0 16px 48px 0 rgba(0, 0, 0, 0.4);
  
  /* Aura Shadows */
  --glow-gold: 0 0 25px rgba(244, 196, 48, 0.3);
  --glow-gold-strong: 0 0 40px rgba(244, 196, 48, 0.55);

  /* Fonts */
  --font-title: 'Bebas Neue', sans-serif;
  --font-body: 'Outfit', sans-serif;
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-primary);
  color: var(--text-white);
  font-family: var(--font-body);
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  line-height: 1.6;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-teal);
  border: 2px solid var(--bg-darker);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-gold);
}

/* Global Typography */
h1, h2, h3, .brand-title {
  font-family: var(--font-title);
  letter-spacing: 2px;
  font-weight: normal;
}

.glow-text {
  text-shadow: 0 0 10px rgba(244, 196, 48, 0.4);
}

/* Hero Section */
.hero {
  position: relative;
  height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  overflow: hidden;
  padding: 2rem 1.5rem 4rem 1.5rem;
  background: radial-gradient(circle at top, #143d4a 0%, var(--bg-primary) 70%);
}

/* Star background */
.stars {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 60%;
  background-image: 
    radial-gradient(white, rgba(255,255,255,.2) 2px, transparent 40px),
    radial-gradient(white, rgba(255,255,255,.15) 1px, transparent 30px),
    radial-gradient(white, rgba(255,255,255,.1) 2px, transparent 40px);
  background-size: 550px 550px, 350px 350px, 250px 250px;
  background-position: 0 0, 40px 60px, 130px 270px;
  opacity: 0.4;
  z-index: 1;
  pointer-events: none;
}

/* Background/Saint Art Layer */
.saint-layer {
  position: absolute;
  top: 10%;
  width: 100%;
  max-width: 480px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: url('assets/sao_cristovao.png') no-repeat center center;
  background-size: cover;
  z-index: 2;
  box-shadow: var(--glow-gold), inset 0 0 100px rgba(7, 21, 26, 0.8);
  border: 3px solid rgba(244, 196, 48, 0.3);
  animation: float 6s ease-in-out infinite;
  opacity: 0.85;
}

/* Golden Aura surrounding Saint */
.saint-layer::before {
  content: '';
  position: absolute;
  top: -20px;
  left: -20px;
  right: -20px;
  bottom: -20px;
  border-radius: 50%;
  box-shadow: 0 0 60px 10px rgba(244, 196, 48, 0.2);
  z-index: -1;
  animation: pulse-aura 3s ease-in-out infinite alternate;
}

/* Top Navigation or Subtitle */
.hero-header {
  z-index: 5;
  text-align: center;
}

.subtitle-top {
  font-size: 0.9rem;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

/* Main Hero Typography */
.hero-title-container {
  z-index: 5;
  text-align: center;
  margin-top: auto;
  margin-bottom: 2rem;
}

.main-title {
  font-size: 4.5rem;
  line-height: 0.95;
  text-transform: uppercase;
  color: var(--text-white);
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.8);
  font-weight: normal;
}

.main-date {
  font-size: 1.5rem;
  color: var(--accent-gold);
  margin-top: 0.5rem;
  letter-spacing: 4px;
}

/* Road Parallax Floor */
.road-layer {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 38%;
  background: linear-gradient(to top, rgba(7, 21, 26, 0) 80%, rgba(7, 21, 26, 1) 100%), 
              url('assets/road_bg.png') no-repeat center bottom;
  background-size: cover;
  z-index: 3;
  mask-image: linear-gradient(to bottom, transparent 0%, black 15%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%);
  transform-origin: bottom center;
}

/* Interactive Semi-Truck SVG Container */
.truck-container {
  position: absolute;
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  z-index: 4;
  pointer-events: none;
  animation: rumble 0.2s infinite alternate;
}

/* Glowing headlights/taillights */
.truck-glow {
  position: absolute;
  bottom: 12px;
  width: 12px;
  height: 12px;
  background: var(--accent-sunset);
  border-radius: 50%;
  filter: blur(5px);
  box-shadow: 0 0 15px 5px var(--accent-sunset);
}

.truck-glow-left { left: 18px; }
.truck-glow-right { right: 18px; }

/* Scroll Down Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 1.5rem;
  z-index: 5;
  color: var(--text-white);
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.8rem;
  letter-spacing: 2px;
  opacity: 0.85;
}

.scroll-indicator i {
  font-size: 1.2rem;
  margin-top: 0.5rem;
  animation: bounce 2s infinite;
  color: var(--accent-gold);
}

/* Animations */
@keyframes float {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(0.5deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}

@keyframes pulse-aura {
  from { box-shadow: 0 0 50px 5px rgba(244, 196, 48, 0.15); }
  to { box-shadow: 0 0 80px 20px rgba(244, 196, 48, 0.35); }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-6px); }
  60% { transform: translateY(-3px); }
}

@keyframes rumble {
  0% { transform: translate(-50%, 0px); }
  100% { transform: translate(-50%, -1px); }
}

/* Content Container */
.content-wrapper {
  max-width: 900px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
  position: relative;
  z-index: 6;
}

/* Grid layout for Cards */
.info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .info-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Glassmorphism Card styling */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  box-shadow: var(--glass-shadow);
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
  border-color: rgba(244, 196, 48, 0.35);
  box-shadow: 0 20px 60px 0 rgba(244, 196, 48, 0.1);
  transform: translateY(-6px);
}

.card-title {
  font-size: 1.8rem;
  color: var(--accent-gold);
  border-bottom: 2px dashed rgba(244, 196, 48, 0.25);
  padding-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.card-title i {
  font-size: 1.4rem;
}

/* Custom List / Info blocks */
.info-block {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.info-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent-sunset);
  font-weight: 600;
}

.info-value {
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text-white);
}

.info-value-large {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent-gold);
  line-height: 1;
}

/* Countdown Styles */
.countdown-container {
  display: flex;
  justify-content: space-around;
  text-align: center;
  gap: 0.5rem;
}

.countdown-box {
  background: rgba(4, 13, 16, 0.5);
  border-radius: 16px;
  padding: 1rem 0.5rem;
  min-width: 70px;
  flex: 1;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.countdown-number {
  font-size: 2rem;
  font-weight: 700;
  font-family: var(--font-title);
  color: var(--accent-gold);
  line-height: 1;
}

.countdown-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

/* Timeline Route Step Design */
.timeline {
  display: flex;
  flex-direction: column;
  position: relative;
  margin-top: 1rem;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent-gold), var(--accent-sunset));
  opacity: 0.5;
}

.timeline-step {
  position: relative;
  padding-bottom: 2rem;
}

.timeline-step:last-child {
  padding-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: -26px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 3px solid var(--accent-gold);
  z-index: 2;
  box-shadow: 0 0 10px rgba(244, 196, 48, 0.6);
  transition: all 0.3s ease;
}

.timeline-step:last-child .timeline-marker {
  border-color: var(--accent-sunset);
  box-shadow: 0 0 10px rgba(224, 122, 95, 0.6);
}

.timeline-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-white);
  margin-bottom: 0.25rem;
}

.timeline-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.timeline-step:hover .timeline-marker {
  transform: scale(1.3);
  background-color: var(--accent-gold);
}

/* Devotional Quote Container */
.quote-card {
  text-align: center;
  padding: 3rem 2rem;
  border-color: rgba(244, 196, 48, 0.25);
  background: radial-gradient(circle at center, rgba(13, 40, 48, 0.65) 0%, rgba(7, 21, 26, 0.8) 100%);
  position: relative;
  overflow: hidden;
}

.quote-card::before {
  content: '"';
  position: absolute;
  font-family: var(--font-title);
  font-size: 10rem;
  opacity: 0.05;
  color: var(--accent-gold);
  top: -2rem;
  left: 2rem;
  line-height: 1;
}

.devotional-quote {
  font-size: 1.8rem;
  font-style: italic;
  color: var(--accent-gold);
  line-height: 1.4;
  margin-bottom: 1.5rem;
  text-shadow: 0 0 15px rgba(244, 196, 48, 0.2);
}

.devotional-author {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
}

/* Button & Action styling */
.action-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

@media (min-width: 480px) {
  .action-group {
    flex-direction: row;
  }
}

.btn {
  flex: 1;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  padding: 1.1rem 1.8rem;
  border-radius: 16px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border: none;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-gold) 0%, #e8b01b 100%);
  color: #07151a;
  box-shadow: 0 4px 15px rgba(244, 196, 48, 0.2);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(244, 196, 48, 0.4);
  background: linear-gradient(135deg, #ffd34d 0%, var(--accent-gold) 100%);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-white);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-3px);
}

.btn-whatsapp {
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.2);
}

.btn-whatsapp:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
}

.footer {
  text-align: center;
  padding: 3rem 1.5rem 2rem 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 2rem;
}

.footer-text {
  margin-bottom: 0.5rem;
}

/* --- Native Scroll-Driven Animations --- */
@supports ((animation-timeline: scroll()) and (animation-range: 0% 100%)) {
  .road-layer {
    animation: zoom-road linear both;
    animation-timeline: scroll(root);
    animation-range: 0px 600px;
  }
  
  .truck-container {
    animation: drive-truck linear both;
    animation-timeline: scroll(root);
    animation-range: 0px 600px;
  }
  
  .saint-layer {
    animation: fade-saint linear both;
    animation-timeline: scroll(root);
    animation-range: 0px 500px;
  }
  
  .hero-title-container {
    animation: fade-title linear both;
    animation-timeline: scroll(root);
    animation-range: 0px 400px;
  }
}

@keyframes zoom-road {
  from { transform: scale(1) translateY(0); }
  to { transform: scale(1.3) translateY(-10%); }
}

@keyframes drive-truck {
  0% { 
    transform: translateX(-50%) translateY(0) scale(1);
    bottom: 10%;
    opacity: 1;
  }
  100% { 
    transform: translateX(-50%) translateY(-100px) scale(0.4);
    bottom: 25%;
    opacity: 0.8;
  }
}

@keyframes fade-saint {
  from { 
    opacity: 0.85; 
    transform: translateY(0) scale(1);
  }
  to { 
    opacity: 0.3; 
    transform: translateY(-50px) scale(0.9);
  }
}

@keyframes fade-title {
  from { 
    opacity: 1; 
    transform: translateY(0);
  }
  to { 
    opacity: 0; 
    transform: translateY(-30px);
  }
}

/* Reduced Motion Safety */
@media (prefers-reduced-motion: reduce) {
  .saint-layer, .truck-container, .scroll-indicator i, .road-layer, .hero-title-container {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  
  .truck-container {
    left: 50% !important;
    transform: translateX(-50%) !important;
  }
}

/* --- Downloadable Poster Preview --- */
.poster-preview-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.poster-canvas {
  width: 100%;
  max-width: 380px;
  aspect-ratio: 9 / 16;
  background: radial-gradient(circle at top, #143d4a 0%, #07151a 80%);
  border: 4px solid var(--accent-gold);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--glass-shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2.2rem 1.2rem;
  color: white;
  text-align: center;
}

.poster-stars {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 60%;
  background-image: 
    radial-gradient(white, rgba(255,255,255,.2) 1.5px, transparent 30px),
    radial-gradient(white, rgba(255,255,255,.15) 1px, transparent 20px);
  background-size: 300px 300px, 200px 200px;
  opacity: 0.3;
  pointer-events: none;
}

.poster-saint {
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: url('assets/sao_cristovao.png') no-repeat center center;
  background-size: cover;
  border: 2.5px solid rgba(244, 196, 48, 0.4);
  box-shadow: 0 0 25px rgba(244, 196, 48, 0.25);
  z-index: 1;
}

.poster-road {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 32%;
  background: linear-gradient(to top, rgba(7, 21, 26, 0) 80%, rgba(7, 21, 26, 1) 100%), 
              url('assets/road_bg.png') no-repeat center bottom;
  background-size: cover;
  z-index: 2;
  mask-image: linear-gradient(to bottom, transparent 0%, black 15%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%);
}

.poster-content-top {
  z-index: 3;
}

.poster-tagline {
  font-size: 0.7rem;
  letter-spacing: 4px;
  color: var(--accent-gold);
  text-transform: uppercase;
  font-weight: 700;
}

.poster-event-title {
  font-family: var(--font-title);
  font-size: 2rem;
  line-height: 1;
  margin-top: 0.4rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}

.poster-content-middle {
  z-index: 3;
  margin-top: auto;
  margin-bottom: auto;
}

.poster-main-date {
  font-family: var(--font-title);
  font-size: 3.2rem;
  color: var(--text-white);
  line-height: 0.9;
  text-shadow: 0 2px 10px rgba(0,0,0,0.9);
  letter-spacing: 1px;
}

.poster-main-time {
  font-size: 1.3rem;
  color: var(--accent-gold);
  font-weight: 700;
  letter-spacing: 2px;
  margin-top: 0.25rem;
  text-shadow: 0 2px 6px rgba(0,0,0,0.8);
}

.poster-content-bottom {
  z-index: 3;
  background: rgba(4, 13, 16, 0.85);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.8rem;
  margin-top: auto;
  backdrop-filter: blur(4px);
}

.poster-info-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.poster-info-highlight {
  color: var(--accent-gold);
  font-weight: 600;
}

.poster-devotional {
  font-size: 0.72rem;
  color: var(--text-white);
  font-style: italic;
  margin-top: 0.5rem;
  border-top: 1px dashed rgba(244, 196, 48, 0.2);
  padding-top: 0.4rem;
}
