/* ========================================================
   Blue Lake Net — Time Machine Theme
   Colors: Navy #0a1628, Gold #c9a84c, Parchment #f4e8c1,
           Tech Blue #2d7dd2, Deep Purple #7b2ff7
   ======================================================== */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --navy: #0a1628;
  --navy-light: #111d32;
  --gold: #c9a84c;
  --gold-light: #e8d48b;
  --parchment: #f4e8c1;
  --parchment-dark: #d4c49a;
  --blue: #2d7dd2;
  --blue-light: #5a9de6;
  --purple: #7b2ff7;
  --white: #f8f9fa;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--navy);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.3s;
}

a:hover {
  color: var(--gold-light);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Navbar ─────────────────────────────────────────── */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: background 0.4s, padding 0.4s, box-shadow 0.4s;
}

.navbar.scrolled {
  background: rgba(10, 22, 40, 0.95);
  backdrop-filter: blur(12px);
  padding: 10px 0;
  box-shadow: 0 2px 24px rgba(0, 0, 0, 0.3);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
}

.logo-icon {
  font-size: 1.5rem;
  color: var(--gold);
  text-shadow: 0 0 12px rgba(201, 168, 76, 0.4);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  position: relative;
  padding: 4px 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--blue));
  transition: width 0.3s;
}

.nav-links a:hover {
  color: var(--white);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ── Hero ───────────────────────────────────────────── */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(201, 168, 76, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(45, 125, 210, 0.1) 0%, transparent 50%),
    var(--navy);
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(135deg,
      rgba(201, 168, 76, 0.03) 0%,
      transparent 40%,
      rgba(45, 125, 210, 0.03) 100%
    );
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  max-width: 800px;
  padding: 0 24px;
}

.hero-badge {
  display: inline-block;
  padding: 6px 20px;
  background: rgba(201, 168, 76, 0.1);
  border: 1px solid rgba(201, 168, 76, 0.25);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--gold);
  letter-spacing: 0.05em;
  margin-bottom: 32px;
  font-family: var(--font-mono);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.15;
  margin-bottom: 24px;
}

.title-line {
  display: block;
}

.title-vintage {
  color: var(--parchment);
  text-shadow: 0 2px 20px rgba(244, 232, 193, 0.15);
}

.title-modern {
  background: linear-gradient(135deg, var(--blue), var(--blue-light), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 60px;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 14px 32px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: all 0.3s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold), #b8973e);
  color: var(--navy);
  box-shadow: 0 4px 24px rgba(201, 168, 76, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(201, 168, 76, 0.35);
  color: var(--navy);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-outline:hover {
  border-color: var(--blue);
  color: var(--blue-light);
  background: rgba(45, 125, 210, 0.05);
}

/* Compass */

.hero-compass {
  width: 100px;
  height: 100px;
  margin: 0 auto;
  opacity: 0.6;
  transition: opacity 0.5s;
}

.hero-compass:hover {
  opacity: 1;
}

.compass-svg {
  width: 100%;
  height: 100%;
}

.compass-ring {
  fill: none;
  stroke: var(--gold);
  stroke-width: 1;
  opacity: 0.4;
}

.compass-ring-inner {
  fill: none;
  stroke: var(--gold);
  stroke-width: 0.5;
  opacity: 0.2;
}

.compass-label {
  fill: var(--gold);
  font-family: var(--font-display);
  font-size: 8px;
  text-anchor: middle;
  dominant-baseline: central;
  opacity: 0.6;
}

.needle-north {
  fill: var(--gold);
}

.needle-south {
  fill: var(--blue);
  opacity: 0.7;
}

.compass-center {
  fill: var(--gold);
}

.compass-tech-ring {
  fill: none;
  stroke: var(--blue);
  stroke-width: 0.5;
  stroke-dasharray: 2 4;
  opacity: 0.3;
}

.compass-needle {
  transform-origin: 60px 60px;
  animation: needleSway 8s ease-in-out infinite;
}

@keyframes needleSway {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(8deg); }
  50% { transform: rotate(-5deg); }
  75% { transform: rotate(3deg); }
}

/* Scroll indicator */

.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0.5;
  transition: opacity 0.3s;
}

.scroll-indicator span {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.scroll-arrow {
  width: 16px;
  height: 16px;
  border-right: 1.5px solid var(--gold);
  border-bottom: 1.5px solid var(--gold);
  transform: rotate(45deg);
  animation: bounceArrow 2s ease-in-out infinite;
}

@keyframes bounceArrow {
  0%, 100% { transform: rotate(45deg) translateY(0); opacity: 0.5; }
  50% { transform: rotate(45deg) translateY(6px); opacity: 1; }
}

/* ── Section common ─────────────────────────────────── */

.section {
  position: relative;
  padding: 120px 0;
}

.section-transition {
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 120px;
  z-index: 1;
}

.section-transition svg {
  width: 100%;
  height: 100%;
}

.section-transition path {
  fill: var(--navy);
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
  padding: 4px 12px;
  border: 1px solid rgba(201, 168, 76, 0.2);
  border-radius: 4px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--white);
  margin-bottom: 16px;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
}

/* ── Apps Section ───────────────────────────────────── */

.apps-section {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(45, 125, 210, 0.06) 0%, transparent 50%),
    var(--navy-light);
}

.apps-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.app-card {
  position: relative;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 40px;
  transition: transform 0.4s, box-shadow 0.4s;
  overflow: hidden;
}

.app-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.3);
}

.app-card-featured {
  border-color: rgba(201, 168, 76, 0.15);
}

.app-card-featured:hover {
  border-color: rgba(201, 168, 76, 0.3);
}

.app-card-glow {
  position: absolute;
  top: -100px;
  right: -100px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(201, 168, 76, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.app-card-content {
  position: relative;
  z-index: 1;
}

.app-icon-wrap {
  margin-bottom: 24px;
}

.app-icon {
  width: 64px;
  height: 64px;
}

.app-icon svg {
  width: 100%;
  height: 100%;
}

.app-icon-img {
  width: 72px;
  height: 72px;
}

.app-icon-img img {
  width: 100%;
  height: 100%;
  border-radius: 16px;
  object-fit: cover;
  border: 1px solid rgba(201, 168, 76, 0.3);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.app-name-note {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.app-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--white);
  margin-bottom: 4px;
}

.app-platform {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
}

.app-desc {
  margin: 16px 0 20px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.app-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.tag-ai {
  background: rgba(123, 47, 247, 0.15);
  color: #b380ff;
  border: 1px solid rgba(123, 47, 247, 0.25);
}

.tag-geo {
  background: rgba(45, 125, 210, 0.15);
  color: var(--blue-light);
  border: 1px solid rgba(45, 125, 210, 0.25);
}

.tag-edu {
  background: rgba(201, 168, 76, 0.15);
  color: var(--gold-light);
  border: 1px solid rgba(201, 168, 76, 0.25);
}

.tag-soon {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.app-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.store-badge {
  display: inline-block;
  transition: transform 0.3s, opacity 0.3s;
  opacity: 0.9;
}

.store-badge:hover {
  transform: scale(1.05);
  opacity: 1;
}

.badge-svg {
  height: 44px;
  width: auto;
  border-radius: 8px;
  display: block;
}

/* ── Meme Gallery ───────────────────────────────────── */

.meme-gallery {
  margin-top: 72px;
  text-align: center;
}

.meme-heading {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--white);
  margin-bottom: 8px;
}

.meme-sub {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 36px;
}

.meme-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 820px;
  margin: 0 auto;
}

.meme-figure {
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(201, 168, 76, 0.18);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.3);
  transition: transform 0.4s, box-shadow 0.4s, border-color 0.4s;
}

.meme-figure:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.4);
  border-color: rgba(201, 168, 76, 0.4);
}

.meme-figure img {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 600px) {
  .meme-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
  }
}

/* ── About Section ──────────────────────────────────── */

.about-section {
  background: var(--navy);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.about-timeline {
  position: relative;
  padding-left: 40px;
}

.timeline-track {
  position: absolute;
  left: 12px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--gold), var(--blue), var(--purple));
  opacity: 0.3;
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  padding-bottom: 48px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -34px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--navy);
  border: 2px solid var(--gold);
  z-index: 1;
}

.timeline-dot-active {
  background: var(--gold);
  box-shadow: 0 0 16px rgba(201, 168, 76, 0.4);
}

.timeline-future .timeline-dot {
  border-color: var(--blue);
}

.timeline-era {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 8px;
}

.timeline-future .timeline-era {
  color: var(--blue);
}

.timeline-content h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--white);
  margin-bottom: 8px;
}

.timeline-content p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

/* About visual — morph between parchment and digital */

.about-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.morph-container {
  position: relative;
  width: 300px;
  height: 300px;
}

.morph-layer {
  position: absolute;
  inset: 0;
  transition: opacity 0.6s;
}

.morph-parchment {
  opacity: 0.5;
}

.morph-digital {
  opacity: 0.4;
}

.morph-container:hover .morph-parchment {
  opacity: 0.2;
}

.morph-container:hover .morph-digital {
  opacity: 0.8;
}

.parchment-svg, .digital-svg {
  width: 100%;
  height: 100%;
}

/* ── Tech Section ───────────────────────────────────── */

.tech-section {
  background:
    radial-gradient(ellipse at 80% 50%, rgba(123, 47, 247, 0.05) 0%, transparent 50%),
    var(--navy-light);
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.tech-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 32px 24px;
  text-align: center;
  transition: transform 0.4s, border-color 0.4s, box-shadow 0.4s;
}

.tech-card:hover {
  transform: translateY(-4px);
  border-color: rgba(201, 168, 76, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.tech-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 20px;
}

.tech-icon svg {
  width: 100%;
  height: 100%;
}

.tech-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--white);
  margin-bottom: 10px;
}

.tech-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── Contact Section ────────────────────────────────── */

.contact-section {
  background: var(--navy);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 600px;
  margin: 0 auto;
}

.contact-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  transition: transform 0.3s, border-color 0.3s;
}

.contact-card:hover {
  transform: translateY(-2px);
  border-color: rgba(201, 168, 76, 0.2);
}

.contact-icon {
  width: 32px;
  height: 32px;
  margin: 0 auto 16px;
}

.contact-icon svg {
  width: 100%;
  height: 100%;
}

.contact-card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--white);
  margin-bottom: 8px;
}

.contact-card a {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.contact-card a:hover {
  color: var(--gold);
}

/* ── Footer ─────────────────────────────────────────── */

.footer {
  padding: 48px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: var(--navy);
}

.footer-content {
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 8px;
}

.footer-brand .logo-text {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
}

.footer-tagline {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
}

.footer-divider {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), var(--blue));
  margin: 20px auto;
  opacity: 0.4;
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.6;
}

/* ── Reveal animations ──────────────────────────────── */

[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ─────────────────────────────────────── */

@media (max-width: 1024px) {
  .tech-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(10, 22, 40, 0.98);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  .hero-title {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .apps-grid {
    grid-template-columns: 1fr;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .about-visual {
    order: -1;
  }

  .tech-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .section {
    padding: 80px 0;
  }

  .app-card {
    padding: 28px 20px;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }
}
