/* Complete redesign with American vintage poster aesthetic */

@import url("https://fonts.googleapis.com/css2?family=Roboto+Condensed:wght@400;700;900&family=Source+Serif+4:ital,wght@0,400;0,600;0,700;1,400&display=swap");

/* CSS Variables - American Cream Palette */
:root {
  --paper: #fffdf6;
  --ink: #141414;
  --navy: #0a214a;
  --red: #c03a2b;
  --gold: #d7b36a;
  --rule: #e6e4de;
  --gray: #efede8;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Source Serif 4", Georgia, serif;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--paper);
  overflow-x: hidden;
}

/* Typography */
.font-sans {
  font-family: "Roboto Condensed", "Franklin Gothic", Arial, sans-serif;
}

.font-serif {
  font-family: "Source Serif 4", Georgia, serif;
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Paper Texture (Very Subtle) */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.01) 2px,
    rgba(0, 0, 0, 0.01) 4px
  );
  pointer-events: none;
  z-index: 1;
  opacity: 0.06;
}

/* Header Sticky Shadow */
header {
  transition: all 0.3s ease;
}

header.shadow-lg {
  box-shadow: 0 4px 20px rgba(10, 33, 74, 0.15);
}

/* Mobile Menu Transition */
#mobileMenu {
  transition: all 0.3s ease;
}

/* Scroll Reveal Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeInUp 0.5s ease-out forwards;
}

/* Vintage Poster Frame Utility */
.poster-frame {
  border-radius: 0.75rem;
  border: 2px solid var(--paper);
  box-shadow: inset 0 0 0 1px rgba(215, 179, 106, 0.7), 0 10px 30px rgba(0, 0, 0, 0.12);
}

/* Details Element Smooth Animation */
details {
  transition: all 0.3s ease;
}

details summary {
  cursor: pointer;
  user-select: none;
}

details[open] summary {
  margin-bottom: 1rem;
}

details summary::-webkit-details-marker {
  display: none;
}

/* Form Input Focus Styles */
input:focus,
textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(10, 33, 74, 0.1);
}

/* Button Hover Effects */
button,
a[class*="bg-"] {
  transition: all 0.3s ease;
}

/* Card Hover Effects */
.shadow-lg {
  transition: all 0.3s ease;
}

.shadow-lg:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Image Transitions */
img {
  transition: all 0.3s ease;
}

/* Cookie Popup Animation */
#cookiePopup {
  animation: slideUpCookie 0.5s ease-out;
}

@keyframes slideUpCookie {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--gray);
}

::-webkit-scrollbar-thumb {
  background: var(--navy);
  border-radius: 6px;
  border: 2px solid var(--gray);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--red);
}

/* Intersection Observer Targets */
section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Form Validation Styles */
input.border-red-500,
textarea.border-red-500 {
  border-color: var(--red) !important;
}

input.border-green-500,
textarea.border-green-500 {
  border-color: #10b981 !important;
}

/* Navigation Link Underline Effect */
nav a {
  position: relative;
}

nav a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--gold);
  transition: width 0.3s ease;
}

nav a:hover::after {
  width: 100%;
}

/* Footer Link Hover */
footer a {
  transition: all 0.3s ease;
}

/* Star Decorations Pulse */
@keyframes starPulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.1);
  }
}

/* Responsive Typography */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  h3 {
    font-size: 1.5rem;
  }
}

/* Print Styles */
@media print {
  header,
  footer,
  #cookiePopup {
    display: none;
  }

  section {
    page-break-inside: avoid;
  }
}

/* Accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus,
details:focus {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  :root {
    --paper: #ffffff;
    --ink: #000000;
    --navy: #000080;
    --red: #8b0000;
  }
}

/* Loading State for Images */
img[src*="placeholder"] {
  background: linear-gradient(90deg, var(--gray) 25%, var(--rule) 50%, var(--gray) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Team Grid Perfect Centering */
.grid[class*="auto-fit"] {
  display: grid;
  justify-items: center;
}

/* Details Arrow Rotation */
details summary span {
  display: inline-block;
  transition: transform 0.3s ease;
}

details[open] summary span {
  transform: rotate(90deg);
}

/* Vintage Border Utilities */
.border-vintage {
  border: 2px solid var(--paper);
  box-shadow: inset 0 0 0 1px rgba(215, 179, 106, 0.7), 0 10px 30px rgba(0, 0, 0, 0.12);
}

/* Rule Line Utility */
.rule-line {
  border-top: 1px solid var(--rule);
}

/* Masthead Gradient */
.bg-gradient-to-r {
  background: linear-gradient(to right, var(--red), var(--navy));
}

/* Map Container */
iframe {
  display: block;
}

/* Terms Checkbox Flag Style */
#termsAcknowledged:checked {
  background-color: var(--gold);
  border-color: var(--gold);
}

/* Smooth Transitions for All Interactive Elements */
a,
button,
input,
textarea,
select,
details {
  transition: all 0.3s ease;
}
