/* ========================================
   UFO TIMELINE — MAJESTIC DOSSIER THEME
   Typewriter / Classified Document Style
   ======================================== */

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

:root {
  --bg-paper: #F5F0E1;
  --bg-paper-light: #FAF6EB;
  --bg-paper-dark: #EDE8D5;
  --bg-card: #FAF6EB;
  --accent: #33691E;
  --accent-hover: #2E7D32;
  --accent-olive: #827717;
  --stamp-red: #C62828;
  --ink: #1A1A18;
  --ink-dark: #2C2C28;
  --ink-faded: #5D5A4E;
  --coffee: #BCAAA4;
  --coffee-light: #D7CCC8;
  --border: #BCAAA4;
  --radius: 4px;
  --font-title: 'Special Elite', cursive;
  --font-body: 'Courier Prime', 'Courier New', monospace;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg-paper);
  color: var(--ink);
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
}

/* Paper ruled lines */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 28px,
      rgba(188, 170, 164, 0.06) 28px,
      rgba(188, 170, 164, 0.06) 29px
    );
}

/* Paper grain noise */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --- Navbar --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 2rem;
  background: var(--bg-paper-dark);
  border-bottom: 2px solid var(--coffee);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.nav-brand {
  display: flex;
  align-items: center;
}

.nav-title {
  font-family: var(--font-title);
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  color: var(--ink-dark);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--accent);
}

.nav-cta {
  background: var(--accent) !important;
  color: var(--bg-paper) !important;
  padding: 0.4rem 1rem;
  border-radius: var(--radius);
  transition: background 0.3s !important;
}

.nav-cta:hover {
  background: var(--accent-hover) !important;
}

/* --- Language Selector --- */
.lang-selector {
  position: relative;
}

.lang-btn {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink-dark);
  background: none;
  border: 2px solid var(--coffee);
  border-radius: var(--radius);
  padding: 0.3rem 0.7rem;
  cursor: pointer;
  transition: border-color 0.3s, color 0.3s;
}

.lang-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--bg-paper-light);
  border: 2px solid var(--coffee);
  border-radius: var(--radius);
  box-shadow: 4px 4px 0 var(--coffee-light), 0 8px 20px rgba(0, 0, 0, 0.08);
  min-width: 160px;
  max-height: 320px;
  overflow-y: auto;
  z-index: 200;
  scrollbar-width: thin;
  scrollbar-color: var(--coffee) var(--bg-paper-light);
}

.lang-dropdown.open {
  display: block;
}

.lang-dropdown a {
  display: block;
  padding: 0.45rem 0.9rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-dark);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  letter-spacing: 0.03em;
}

.lang-dropdown a:hover {
  background: var(--bg-paper-dark);
  color: var(--accent);
}

.lang-dropdown a.lang-active {
  color: var(--accent);
  background: rgba(51, 105, 30, 0.06);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
}

/* --- Section Base --- */
.section {
  position: relative;
  z-index: 1;
  padding: 5rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.section-dark {
  max-width: 100%;
  background: var(--bg-paper-dark);
  border-top: 2px solid var(--coffee);
  border-bottom: 2px solid var(--coffee);
}

.section-dark > * {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

.section-badge {
  font-family: var(--font-title);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--stamp-red);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  text-align: center;
}

.section-title {
  font-family: var(--font-title);
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  text-align: center;
  margin-bottom: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.section-subtitle {
  text-align: center;
  color: var(--ink-faded);
  font-size: 0.95rem;
  max-width: 560px;
  margin: 0 auto 2.5rem;
  line-height: 1.8;
}

/* --- Hero --- */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 7rem 2rem 4rem;
  gap: 2.5rem;
}

/* CLASSIFIED watermark */
.hero::before {
  content: 'CLASSIFIED';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-18deg);
  font-family: var(--font-title);
  font-size: clamp(4rem, 14vw, 11rem);
  color: var(--stamp-red);
  opacity: 0.04;
  pointer-events: none;
  letter-spacing: 0.08em;
  white-space: nowrap;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-badge {
  font-family: var(--font-title);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--stamp-red);
  border: 2px solid var(--stamp-red);
  display: inline-block;
  padding: 0.3rem 1rem;
  margin-bottom: 1.5rem;
  transform: rotate(-1.5deg);
}

.hero h1 {
  font-family: var(--font-title);
  font-size: clamp(2rem, 5.5vw, 3.8rem);
  line-height: 1.2;
  letter-spacing: 0.03em;
  margin-bottom: 1.5rem;
  color: var(--ink);
}

.accent-text {
  color: var(--accent);
}

.hero-subtitle {
  font-size: 1rem;
  color: var(--ink-faded);
  max-width: 540px;
  margin: 0 auto 2rem;
  line-height: 1.9;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-paper);
  border: 2px solid var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(51, 105, 30, 0.25);
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--coffee);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.btn-large {
  padding: 0.85rem 1.8rem;
  font-size: 0.85rem;
}

/* --- Phone Mockups --- */
.hero-screenshots {
  width: 100%;
  max-width: 620px;
}

.screenshot-stack {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.phone-frame {
  background: var(--bg-card);
  border: 2px solid var(--coffee);
  border-radius: 6px;
  overflow: hidden;
  box-shadow:
    4px 4px 0 var(--coffee-light),
    8px 8px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              opacity 0.4s ease,
              box-shadow 0.4s ease,
              border-color 0.4s ease;
  cursor: pointer;
}

.phone-frame:hover {
  border-color: var(--accent);
}

.phone-center {
  width: 210px;
  height: 420px;
  z-index: 3;
}

.phone-center:hover {
  transform: translateY(-12px) scale(1.04);
  box-shadow:
    0 6px 0 var(--coffee),
    0 20px 40px rgba(51, 105, 30, 0.12),
    0 0 0 3px rgba(51, 105, 30, 0.08);
}

.phone-left {
  width: 175px;
  height: 350px;
  z-index: 2;
  transform: translateX(22px) rotate(-3deg);
  opacity: 0.65;
}

.phone-left:hover {
  transform: translateX(22px) rotate(0deg) translateY(-10px) scale(1.05);
  opacity: 1;
  z-index: 4;
  box-shadow:
    0 6px 0 var(--coffee),
    0 18px 36px rgba(51, 105, 30, 0.12),
    0 0 0 3px rgba(51, 105, 30, 0.08);
}

.phone-right {
  width: 175px;
  height: 350px;
  z-index: 2;
  transform: translateX(-22px) rotate(3deg);
  opacity: 0.65;
}

.phone-right:hover {
  transform: translateX(-22px) rotate(0deg) translateY(-10px) scale(1.05);
  opacity: 1;
  z-index: 4;
  box-shadow:
    0 6px 0 var(--coffee),
    0 18px 36px rgba(51, 105, 30, 0.12),
    0 0 0 3px rgba(51, 105, 30, 0.08);
}

.phone-screen {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.placeholder-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg-paper-dark);
  width: 100%;
  height: 100%;
  justify-content: center;
  transition: background 0.4s ease;
  border: 1px dashed var(--coffee);
}

.placeholder-icon {
  font-size: 2.2rem;
  color: var(--ink-faded);
  transition: transform 0.4s ease, color 0.4s ease;
}

.phone-frame:hover .placeholder-icon {
  transform: scale(1.2);
  color: var(--accent);
}

.placeholder-text {
  font-family: var(--font-title);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  color: var(--accent);
  transition: letter-spacing 0.4s ease;
}

.phone-frame:hover .placeholder-text {
  letter-spacing: 0.2em;
}

.phone-frame:hover .placeholder-screen {
  background: var(--bg-card);
}

/* --- Features Grid --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.feature-card {
  background: var(--bg-card);
  border: 2px solid var(--coffee);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: all 0.3s ease;
  position: relative;
  box-shadow: 3px 3px 0 var(--coffee-light);
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 5px 5px 0 var(--coffee);
}

/* corner dog-ear */
.feature-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 18px;
  height: 18px;
  background: linear-gradient(135deg, var(--bg-paper) 50%, var(--coffee-light) 50%);
}

.feature-icon {
  font-size: 1.8rem;
  margin-bottom: 0.6rem;
  color: var(--ink-faded);
}

.feature-card h3 {
  font-family: var(--font-title);
  font-size: 1rem;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
  color: var(--accent);
}

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.feature-list li {
  color: var(--ink-dark);
  font-size: 0.85rem;
  padding-left: 1.1rem;
  position: relative;
}

.feature-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* --- Case Cards --- */
.cases-scroll {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  padding: 1rem 0 2rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--coffee) var(--bg-paper-dark);
}

.cases-scroll::-webkit-scrollbar {
  height: 5px;
}

.cases-scroll::-webkit-scrollbar-track {
  background: var(--bg-paper-dark);
}

.cases-scroll::-webkit-scrollbar-thumb {
  background: var(--coffee);
  border-radius: 3px;
}

.case-card {
  min-width: 270px;
  max-width: 270px;
  flex-shrink: 0;
  background: var(--bg-card);
  border: 2px solid var(--coffee);
  border-radius: var(--radius);
  padding: 1.5rem;
  scroll-snap-align: start;
  transition: all 0.3s ease;
  box-shadow: 3px 3px 0 var(--coffee-light);
  position: relative;
}

.case-card:hover {
  transform: translateY(-3px);
  box-shadow: 5px 5px 0 var(--coffee);
}

.case-stamp {
  font-family: var(--font-title);
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  color: var(--stamp-red);
  border: 1.5px solid var(--stamp-red);
  display: inline-block;
  padding: 0.15rem 0.5rem;
  margin-bottom: 0.75rem;
  transform: rotate(-2deg);
  opacity: 0.7;
}

.case-year {
  font-family: var(--font-title);
  font-size: 2rem;
  color: var(--stamp-red);
  margin-bottom: 0.3rem;
  letter-spacing: 0.04em;
}

.case-card h3 {
  font-family: var(--font-title);
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  margin-bottom: 0.5rem;
  border-bottom: 1px dashed var(--coffee);
  padding-bottom: 0.4rem;
}

.case-card p {
  color: var(--ink-faded);
  font-size: 0.82rem;
  line-height: 1.7;
  margin-bottom: 0.7rem;
}

.case-tag {
  display: inline-block;
  font-family: var(--font-title);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(51, 105, 30, 0.07);
  border: 1px solid rgba(51, 105, 30, 0.2);
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
}

/* --- Classifications Grid --- */
.classifications-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.class-item {
  text-align: center;
  padding: 1.25rem 0.75rem;
  background: var(--bg-card);
  border: 2px solid var(--coffee);
  border-radius: var(--radius);
  transition: all 0.3s ease;
  box-shadow: 2px 2px 0 var(--coffee-light);
}

.class-item:hover {
  transform: translateY(-2px);
  box-shadow: 4px 4px 0 var(--coffee);
}

.class-item h4 {
  font-family: var(--font-title);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  margin-bottom: 0.4rem;
  color: var(--accent);
}

.class-item p {
  color: var(--ink-faded);
  font-size: 0.78rem;
}

/* --- Themes Row --- */
.themes-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 1rem;
}

.theme-card {
  border-radius: var(--radius);
  padding: 2rem;
  border: 2px solid var(--coffee);
  transition: all 0.3s ease;
  box-shadow: 3px 3px 0 var(--coffee-light);
}

.theme-card:hover {
  transform: translateY(-3px);
  box-shadow: 5px 5px 0 var(--coffee);
}

.theme-cosmic {
  background: linear-gradient(135deg, #0e1425, #111827);
  border-color: #2a3344;
  color: #E8E8F0;
}

.theme-cosmic:hover {
  box-shadow: 5px 5px 0 #2a3344;
}

.theme-cosmic p {
  color: #B0B3C5;
}

.theme-majestic {
  background: var(--bg-card);
}

.theme-card h3 {
  font-family: var(--font-title);
  font-size: 1.15rem;
  letter-spacing: 0.12em;
  margin-bottom: 0.75rem;
}

.theme-cosmic h3 {
  color: #00BCD4;
}

.theme-majestic h3 {
  color: var(--accent);
}

.theme-card p {
  font-size: 0.88rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.theme-colors {
  display: flex;
  gap: 0.5rem;
}

.color-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--coffee);
}

.theme-cosmic .color-dot {
  border-color: #2a3344;
}

/* --- Audience Grid --- */
.audience-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  max-width: 820px;
  margin: 0 auto;
}

.audience-item {
  background: var(--bg-card);
  border: 2px solid var(--coffee);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  font-size: 0.88rem;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 2px 2px 0 var(--coffee-light);
  color: var(--ink-dark);
}

.audience-item:hover {
  transform: translateY(-2px);
  box-shadow: 4px 4px 0 var(--coffee);
}

/* --- Languages Row --- */
.languages-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  max-width: 700px;
  margin: 0 auto;
}

.languages-row span {
  background: var(--bg-card);
  border: 1px solid var(--coffee);
  border-radius: var(--radius);
  padding: 0.4rem 0.9rem;
  font-size: 0.8rem;
  color: var(--ink-dark);
  font-weight: 700;
  letter-spacing: 0.03em;
}

/* --- CTA Section --- */
.section-cta {
  text-align: center;
  max-width: 100%;
  background: var(--bg-paper-dark);
  border-top: 2px solid var(--coffee);
  padding: 6rem 2rem;
  position: relative;
}

/* TOP SECRET watermark */
.section-cta::before {
  content: 'TOP SECRET';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-12deg);
  font-family: var(--font-title);
  font-size: clamp(3rem, 11vw, 8rem);
  color: var(--stamp-red);
  opacity: 0.035;
  pointer-events: none;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.section-cta > * {
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 1;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

/* --- Footer --- */
.footer {
  position: relative;
  z-index: 1;
  border-top: 2px solid var(--coffee);
  padding: 2rem 2rem;
  background: var(--bg-paper-dark);
}

.footer-content {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer-brand {
  font-family: var(--font-title);
  letter-spacing: 0.1em;
  color: var(--ink-faded);
  font-size: 0.95rem;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  color: var(--ink-faded);
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-copy {
  color: var(--ink-faded);
  font-size: 0.72rem;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .classifications-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 48px;
    left: 0;
    right: 0;
    background: var(--bg-paper-dark);
    flex-direction: column;
    padding: 1.5rem 2rem;
    gap: 1.25rem;
    border-bottom: 2px solid var(--coffee);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  }

  .nav-links.active {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    padding: 6rem 1.5rem 3rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .classifications-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .themes-row {
    grid-template-columns: 1fr;
  }

  .audience-grid {
    grid-template-columns: 1fr;
  }

  .phone-left,
  .phone-right {
    display: none;
  }

  .phone-center {
    width: 230px;
    height: 460px;
  }

  .section {
    padding: 3.5rem 1.5rem;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.7rem;
  }

  .hero-subtitle {
    font-size: 0.9rem;
  }

  .classifications-grid {
    grid-template-columns: 1fr;
  }

  .btn-large {
    padding: 0.7rem 1.2rem;
    font-size: 0.78rem;
  }
}

/* --- Scroll Reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
