/* ══════════════════════════════════════
   Apus — GPS Logging App Landing Page
   ══════════════════════════════════════ */

/* ── Variables ── */
:root {
  --cream: #F5F0E8;
  --parchment: #EDE6D8;
  --dark-brown: #3C2A1E;
  --medium-brown: #6B5344;
  --light-brown: #9C8574;
  --deep-red: #A0402D;
  --gold: #C49A3C;
  --compass-blue: #4A6E7F;
  --ink-black: #1A1410;
  --faded-ink: #8B7D6B;
  --outline: #D4C9B8;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Source Serif 4', Georgia, serif;
  color: var(--dark-brown);
  background-color: var(--cream);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── Parchment Texture Overlay ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.03;
  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.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

/* ── Typography ── */
h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ══════════════════════════════════════
   Animations
   ══════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes heroVisualIn {
  from { opacity: 0; transform: translateY(32px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes drawTrail {
  to { stroke-dashoffset: 0; }
}

@keyframes dotAppear {
  from { opacity: 0; transform: scale(0); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes compassSpin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ══════════════════════════════════════
   Navigation
   ══════════════════════════════════════ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(245, 240, 232, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--outline);
  transition: box-shadow 0.3s ease;
}
.nav.scrolled {
  box-shadow: 0 2px 20px rgba(60, 42, 30, 0.08);
}

.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--dark-brown);
  text-decoration: none;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.nav-logo svg {
  width: 28px;
  height: 28px;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  font-family: 'Source Serif 4', serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--medium-brown);
  text-decoration: none;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: color 0.25s ease;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--gold);
  transition: width 0.3s ease;
}
.nav-links a:hover { color: var(--dark-brown); }
.nav-links a:hover::after { width: 100%; }

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--dark-brown);
  border-radius: 1px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ══════════════════════════════════════
   Section Divider
   ══════════════════════════════════════ */
.section-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 0;
  gap: 1rem;
  opacity: 0.35;
}
.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  max-width: 120px;
  height: 1px;
  background: var(--light-brown);
}
.section-divider svg {
  width: 18px;
  height: 18px;
  color: var(--light-brown);
}

/* ══════════════════════════════════════
   Hero
   ══════════════════════════════════════ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--outline) 1px, transparent 1px),
    linear-gradient(90deg, var(--outline) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.25;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 20%, transparent 70%);
}

.hero-inner {
  max-width: 1120px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-text {
  animation: heroFadeIn 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--compass-blue);
  border: 1px solid var(--compass-blue);
  padding: 0.35rem 1rem;
  border-radius: 2px;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  line-height: 1.2;
  margin-bottom: 1.25rem;
  color: var(--dark-brown);
}
.hero h1 em {
  font-style: italic;
  color: var(--deep-red);
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--medium-brown);
  line-height: 1.7;
  margin-bottom: 2.25rem;
  max-width: 440px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Source Serif 4', serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--cream);
  background: var(--dark-brown);
  padding: 1rem 2.2rem;
  border: none;
  border-radius: 2px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}
.hero-cta:hover {
  background: var(--ink-black);
  transform: translateY(-1px);
}
.hero-cta svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}
.hero-cta:hover svg {
  transform: translateX(3px);
}

/* ══════════════════════════════════════
   Phone Mockup
   ══════════════════════════════════════ */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  animation: heroVisualIn 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

.hero-phone {
  width: 240px;
  background: var(--dark-brown);
  border-radius: 24px;
  overflow: hidden;
  padding: 6px;
  box-shadow: 0 8px 32px rgba(60, 42, 30, 0.15);
}
.hero-phone img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 18px;
}

.phone-mockup {
  width: 280px;
  height: 560px;
  background: var(--cream);
  border-radius: 36px;
  border: 3px solid var(--dark-brown);
  position: relative;
  overflow: hidden;
  box-shadow:
    0 4px 6px rgba(60, 42, 30, 0.06),
    0 20px 60px rgba(60, 42, 30, 0.12),
    inset 0 0 0 1px rgba(212, 201, 184, 0.5);
}
.phone-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 28px;
  background: var(--dark-brown);
  border-radius: 0 0 18px 18px;
  z-index: 2;
}
.phone-screen {
  position: absolute;
  inset: 8px;
  border-radius: 28px;
  overflow: hidden;
  background: var(--parchment);
}
.phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.phone-map {
  width: 100%;
  height: 100%;
  position: relative;
}
.phone-map svg {
  width: 100%;
  height: 100%;
}

/* GPS trail animation */
.trail-path {
  stroke-dasharray: 800;
  stroke-dashoffset: 800;
  animation: drawTrail 3s cubic-bezier(0.4, 0, 0.2, 1) 1s forwards;
}

.trail-dot {
  opacity: 0;
  animation: dotAppear 0.4s ease forwards;
}
.trail-dot:nth-child(1) { animation-delay: 2s; }
.trail-dot:nth-child(2) { animation-delay: 2.3s; }
.trail-dot:nth-child(3) { animation-delay: 2.6s; }
.trail-dot:nth-child(4) { animation-delay: 2.9s; }

/* Compass rose */
.compass-container {
  position: absolute;
  width: 400px;
  height: 400px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: -1;
  opacity: 0.08;
  animation: compassSpin 120s linear infinite;
}

/* ══════════════════════════════════════
   Philosophy
   ══════════════════════════════════════ */
.philosophy {
  padding: 6rem 2rem;
  background: var(--parchment);
  position: relative;
}
.philosophy::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 39px,
      var(--light-brown) 39px,
      var(--light-brown) 40px
    );
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
  position: relative;
}
.section-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 0.75rem;
}
.section-header h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  line-height: 1.3;
  margin-bottom: 1rem;
}
.section-header p {
  font-size: 1rem;
  color: var(--medium-brown);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 960px;
  margin: 0 auto 3.5rem;
  position: relative;
}

.pillar {
  text-align: center;
  padding: 2.5rem 1.5rem;
  background: rgba(245, 240, 232, 0.7);
  border: 1px solid var(--outline);
  border-radius: 4px;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.pillar:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(60, 42, 30, 0.08);
}

.pillar-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1.25rem;
  color: var(--compass-blue);
}

.pillar h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}
.pillar p {
  font-size: 0.9rem;
  color: var(--medium-brown);
  line-height: 1.6;
}

.philosophy-footer {
  text-align: center;
  position: relative;
}
.philosophy-footer blockquote {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-style: italic;
  color: var(--medium-brown);
  border-left: 3px solid var(--gold);
  padding: 0.75rem 0 0.75rem 1.5rem;
  display: inline-block;
  text-align: left;
}

/* ══════════════════════════════════════
   Features
   ══════════════════════════════════════ */
.features {
  padding: 6rem 2rem;
  position: relative;
}

.features-grid {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.feature-row.reverse {
  direction: rtl;
}
.feature-row.reverse > * {
  direction: ltr;
}

.feature-content {
  padding: 1rem 0;
}
.feature-number {
  font-family: 'Playfair Display', serif;
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--outline);
  line-height: 1;
  margin-bottom: 0.5rem;
}
.feature-content h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  line-height: 1.3;
}
.feature-content p {
  font-size: 0.95rem;
  color: var(--medium-brown);
  line-height: 1.7;
  margin-bottom: 1rem;
}
.feature-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--deep-red);
  background: rgba(160, 64, 45, 0.08);
  padding: 0.3rem 0.8rem;
  border-radius: 2px;
}
.feature-tag-upcoming {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--faded-ink);
  background: rgba(139, 125, 107, 0.1);
  padding: 0.3rem 0.8rem;
  border-radius: 2px;
}

.feature-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}
.feature-illustration {
  width: 200px;
  background: var(--dark-brown);
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  padding: 6px;
  box-shadow: 0 8px 32px rgba(60, 42, 30, 0.15);
}
.feature-illustration svg {
  width: 100%;
  height: 100%;
}
.feature-illustration img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 18px;
}

/* (screenshot-image img is handled below) */

/* ══════════════════════════════════════
   Screenshots
   ══════════════════════════════════════ */
.screenshots {
  padding: 6rem 2rem;
  background: var(--parchment);
  position: relative;
}

.screenshots-scroll {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.screenshot-card {
  background: var(--cream);
  border: 1px solid var(--outline);
  border-radius: 6px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.screenshot-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(60, 42, 30, 0.1);
}
.screenshot-image {
  background: var(--dark-brown);
  position: relative;
  overflow: hidden;
  padding: 4px;
  border-radius: 6px 6px 0 0;
}
.screenshot-image svg {
  width: 100%;
  height: 100%;
}
.screenshot-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px 4px 0 0;
}
.screenshot-label {
  padding: 1rem 1.25rem;
  text-align: center;
}
.screenshot-label h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.screenshot-label p {
  font-size: 0.8rem;
  color: var(--faded-ink);
}

/* ══════════════════════════════════════
   CTA
   ══════════════════════════════════════ */
.cta {
  padding: 5rem 2rem;
  background: var(--dark-brown);
  color: var(--cream);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(196, 154, 60, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(196, 154, 60, 0.05) 1px, transparent 1px);
  background-size: 60px 60px;
}
.cta-inner {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
}
.cta h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--cream);
  margin-bottom: 1rem;
}
.cta p {
  color: var(--light-brown);
  font-size: 1rem;
  margin-bottom: 2.25rem;
  line-height: 1.7;
}
.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Source Serif 4', serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--dark-brown);
  background: var(--gold);
  padding: 1rem 2.5rem;
  border: none;
  border-radius: 2px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}
.cta-button:hover {
  background: #d4a94c;
  transform: translateY(-1px);
}
.cta-stores {
  margin-top: 1.25rem;
  font-size: 0.8rem;
  color: var(--faded-ink);
}

/* ══════════════════════════════════════
   Footer
   ══════════════════════════════════════ */
.footer {
  padding: 2.5rem 2rem;
  background: var(--ink-black);
  color: var(--faded-ink);
  text-align: center;
}
.footer-inner {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-left {
  font-size: 0.8rem;
}
.footer-links {
  display: flex;
  gap: 1.5rem;
}
.footer-links a {
  font-size: 0.8rem;
  color: var(--faded-ink);
  text-decoration: none;
  transition: color 0.25s ease;
}
.footer-links a:hover {
  color: var(--cream);
}

/* ══════════════════════════════════════
   Mobile Menu
   ══════════════════════════════════════ */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(245, 240, 232, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.mobile-menu.open {
  opacity: 1;
  pointer-events: auto;
}
.mobile-menu a {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--dark-brown);
  text-decoration: none;
  transition: color 0.2s;
}
.mobile-menu a:hover { color: var(--deep-red); }
.mobile-menu-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.mobile-menu-close svg {
  width: 24px;
  height: 24px;
  color: var(--dark-brown);
}

/* ══════════════════════════════════════
   Responsive
   ══════════════════════════════════════ */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .mobile-menu { display: flex; }

  .hero { padding: 5rem 1.5rem 3rem; min-height: auto; }
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }
  .hero-sub { margin: 0 auto 2rem; }
  .hero-visual { order: -1; }
  .phone-mockup { width: 220px; height: 440px; }
  .compass-container { width: 300px; height: 300px; }

  .pillars { grid-template-columns: 1fr; gap: 1.25rem; }
  .pillar { padding: 2rem 1.25rem; }

  .feature-row,
  .feature-row.reverse {
    grid-template-columns: 1fr;
    direction: ltr;
    gap: 2rem;
  }
  .feature-visual { order: -1; }

  .screenshots-scroll {
    grid-template-columns: 1fr;
    max-width: 300px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 1rem;
  }

  .philosophy, .features, .screenshots, .cta {
    padding: 4rem 1.5rem;
  }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.8rem; }
  .phone-mockup { width: 190px; height: 380px; }
}
