/* web/landing/landing.css — LangCity RPG Landing Page — Midnight Cyber Arcade Redesign */

/* ===== Shared App Theme Tokens ===== */
@import url('../theme.css');

/* ===== Google Fonts ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Noto+Sans+JP:wght@300;400;500;700&display=swap');

/* ===== Design Tokens (Mapped to AppTheme) ===== */
:root {
  color-scheme: dark;

  /* Palette Mappings */
  --bg-deep: var(--app-bg-deep, #020611);
  --bg: var(--app-bg, #050814);
  --bg-card: var(--app-surface, #0b1124);
  --surface: var(--app-surface-raised, #131d38);
  --surface-hover: var(--app-surface-highlight, #1f2e59);
  --border: var(--app-border, #1e293b);
  --border-hover: var(--app-border-hover, rgba(0, 240, 255, 0.45));

  /* Accents */
  --primary: var(--app-primary, #00f0ff);
  --primary-bright: var(--app-primary-bright, #38f8ff);
  --primary-glow: var(--app-primary-glow, rgba(0, 240, 255, 0.22));
  
  --secondary: var(--app-secondary, #818cf8);
  --secondary-glow: var(--app-secondary-glow, rgba(129, 140, 248, 0.2));
  
  --sakura: var(--app-sakura, #f472b6);
  --sakura-glow: var(--app-sakura-glow, rgba(244, 114, 182, 0.18));
  
  --green: var(--app-success, #34d399);
  --green-glow: var(--app-success-glow, rgba(52, 211, 153, 0.18));

  --gold: var(--app-gold, #fde047);
  --gold-glow: var(--app-gold-glow, rgba(253, 224, 71, 0.2));

  /* Text */
  --text: var(--app-text-primary, #f8fafc);
  --text-secondary: var(--app-text-secondary, #94a3b8);
  --text-muted: var(--app-text-muted, #64748b);

  /* Layout */
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --maxw: 1200px;

  /* Typography */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-jp: 'Noto Sans JP', sans-serif;

  /* Animation */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  background: var(--bg-deep);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-bright); }

img { max-width: 100%; display: block; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ===== Noise texture overlay ===== */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  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.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: 200px 200px;
}

/* ===== Scroll-triggered animations ===== */
.fade-in {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }

/* ===== Top Navigation ===== */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(5, 8, 20, 0.75);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}
.site-nav.scrolled {
  background: rgba(5, 8, 20, 0.95);
}
.site-nav .container {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 64px;
}
.site-nav .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text);
  letter-spacing: -0.02em;
}
.site-nav .brand img {
  height: 32px;
  width: auto;
  border-radius: 6px;
}
.site-nav .brand .jp {
  font-family: var(--font-jp);
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-left: 4px;
}
.site-nav .nav-links {
  display: flex;
  gap: 32px;
  margin-left: auto;
}
.site-nav .nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  position: relative;
  padding: 4px 0;
  transition: color 0.2s;
}
.site-nav .nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
  transition: width 0.3s var(--ease-out);
}
.site-nav .nav-links a:hover { color: var(--text); }
.site-nav .nav-links a:hover::after { width: 100%; }

.site-nav .nav-cta {
  background: linear-gradient(135deg, var(--primary), #0284c7);
  color: var(--app-on-primary, #020914);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 8px 20px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  transition: all 0.2s var(--ease-out);
  box-shadow: 0 0 20px var(--primary-glow);
}
.site-nav .nav-cta:hover {
  background: linear-gradient(135deg, var(--primary-bright), var(--primary));
  color: var(--app-on-primary, #020914);
  transform: translateY(-1px);
  box-shadow: 0 4px 24px var(--primary-glow);
}

@media (max-width: 768px) {
  .site-nav .nav-links { display: none; }
}

/* ===== Hero Section ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 100px 0 80px;
}

/* Hero background layers */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
  filter: blur(1px);
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 30%, var(--primary-glow) 0%, transparent 70%),
    linear-gradient(180deg, rgba(5, 8, 20, 0.3) 0%, rgba(5, 8, 20, 0.6) 50%, var(--bg-deep) 100%);
}

/* Sakura petals canvas */
#sakura-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
}

.hero .logo-mark {
  width: 140px;
  max-width: 32%;
  margin: 0 auto 24px;
  border-radius: 22%;
  animation: logoFloat 6s ease-in-out infinite;
  filter: drop-shadow(0 8px 32px var(--primary-glow));
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text);
  margin: 0 0 16px;
}
.hero h1 .accent {
  background: linear-gradient(135deg, var(--primary), var(--secondary), var(--sakura));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero .tagline {
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 12px;
  line-height: 1.7;
  font-weight: 400;
}

.hero .jp-tagline {
  font-family: var(--font-jp);
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0 auto 32px;
  letter-spacing: 0.1em;
}

/* Badge pills */
.badges {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid;
}
.badge-free {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-glow);
}
.badge-ai {
  border-color: var(--secondary);
  color: var(--secondary);
  background: var(--secondary-glow);
}
.badge-offline {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-glow);
}

/* ===== Download Buttons ===== */
.downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 14px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  min-width: 170px;
  transition: all 0.25s var(--ease-out);
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}
.dl-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.dl-btn:hover::before { opacity: 1; }
.dl-btn:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
  color: var(--text);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), 0 0 16px var(--primary-glow);
}
.dl-btn .dl-icon { font-size: 1.5rem; line-height: 1; flex: none; }
.dl-btn .platform-logo { width: 28px; height: 28px; display: block; fill: currentColor; }
.dl-btn .brand-button-logo { width: 28px; height: 28px; object-fit: cover; border-radius: 5px; }
.dl-btn .dl-meta { display: flex; flex-direction: column; text-align: left; }
.dl-btn .dl-small { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.dl-btn .dl-name { font-size: 0.95rem; }
.dl-btn.primary {
  background: linear-gradient(135deg, var(--primary), #0284c7);
  color: var(--app-on-primary, #020914);
  border-color: transparent;
  box-shadow: 0 4px 20px var(--primary-glow);
}
.dl-btn.primary .dl-small { color: rgba(2, 9, 20, 0.7); }
.dl-btn.primary:hover {
  background: linear-gradient(135deg, var(--primary-bright), var(--primary));
  box-shadow: 0 8px 32px var(--primary-glow);
}
.dl-btn.recommended { outline: 2px solid var(--primary); outline-offset: 3px; }
.dl-btn.unavailable { opacity: .42; cursor: not-allowed; pointer-events: none; }

.hero-footnote {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 20px;
}
.hero-footnote a { color: var(--text-secondary); }

/* ===== Section Base ===== */
.section {
  position: relative;
  padding: 100px 0;
}
.section-header {
  text-align: center;
  margin-bottom: 60px;
}
.section-header .overline {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 12px;
}
.section-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 12px;
}
.section-header .lead {
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Decorative divider */
.section-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border), transparent);
  margin: 0;
  border: none;
}

/* ===== Features Grid ===== */
.features-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .features-grid { grid-template-columns: 1fr; }
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0;
  overflow: hidden;
  transition: all 0.35s var(--ease-out);
  position: relative;
}
.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at 50% 0%, var(--primary-glow), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s;
}
.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4), 0 0 20px var(--primary-glow);
}
.feature-card:hover::before { opacity: 1; }

.feature-card .card-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-bottom: 1px solid var(--border);
}
.feature-card .card-body {
  padding: 20px;
  position: relative;
  z-index: 1;
}
.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px;
}
.feature-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

/* ===== Locations Showcase ===== */
.locations-showcase {
  display: grid;
  gap: 20px;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: auto auto;
}
.locations-showcase .location-card:first-child {
  grid-row: 1 / 3;
}
@media (max-width: 768px) {
  .locations-showcase {
    grid-template-columns: 1fr;
  }
  .locations-showcase .location-card:first-child {
    grid-row: auto;
  }
}

.location-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.35s var(--ease-out);
}
.location-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4), 0 0 20px var(--primary-glow);
}
.location-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}
.location-card:hover img {
  transform: scale(1.03);
}
.location-card .location-label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 40px 20px 16px;
  background: linear-gradient(to top, rgba(5, 8, 20, 0.95), transparent);
}
.location-card .location-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
}
.location-card .location-jp {
  font-family: var(--font-jp);
  font-size: 0.8rem;
  color: var(--primary);
  margin-top: 2px;
}

/* ===== How It Works ===== */
.steps-timeline {
  display: flex;
  gap: 0;
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}
.steps-timeline::before {
  content: '';
  position: absolute;
  top: 28px;
  left: 28px;
  right: 28px;
  height: 2px;
  background: linear-gradient(to right, var(--primary), var(--secondary), var(--green));
  border-radius: 1px;
}
.step {
  flex: 1;
  text-align: center;
  position: relative;
  padding: 0 16px;
}
.step .step-dot {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  position: relative;
  z-index: 1;
  font-size: 1.3rem;
  transition: all 0.3s var(--ease-out);
}
.step:hover .step-dot {
  background: var(--primary);
  color: var(--app-on-primary, #020914);
  transform: scale(1.1);
  box-shadow: 0 0 24px var(--primary-glow);
}
.step:hover .step-dot .step-emoji {
  transform: scale(1.2);
}
.step .step-emoji {
  transition: transform 0.3s var(--ease-spring);
}
.step h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px;
}
.step p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

@media (max-width: 600px) {
  .steps-timeline {
    flex-direction: column;
    gap: 32px;
  }
  .steps-timeline::before {
    top: 0;
    bottom: 0;
    left: 28px;
    right: auto;
    width: 2px;
    height: auto;
  }
  .step {
    text-align: left;
    padding-left: 80px;
  }
  .step .step-dot {
    position: absolute;
    left: 0;
    top: 0;
    margin: 0;
  }
}

/* ===== Parallax Map Scroll ===== */
.map-scroll {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  height: 320px;
  margin-bottom: 48px;
}
.map-scroll img {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: auto;
  max-width: none;
  animation: scrollMap 40s linear infinite;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
@keyframes scrollMap {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ===== System Requirements ===== */
.req-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  max-width: 900px;
  margin: 0 auto;
}
.req-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  transition: all 0.25s var(--ease-out);
}
.req-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 16px var(--primary-glow);
}
.req-card .req-icon {
  font-size: 1.8rem;
  margin-bottom: 8px;
}
.req-card .req-platform {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 4px;
}
.req-card .req-detail {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ===== CTA Banner ===== */
.cta-banner {
  position: relative;
  padding: 80px 0;
  text-align: center;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 40% at 50% 50%, var(--primary-glow), transparent);
}
.cta-banner .container { position: relative; z-index: 1; }
.cta-banner h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}
.cta-banner .cta-sub {
  color: var(--text-secondary);
  margin-bottom: 32px;
  font-size: 1.05rem;
}
.cta-banner .cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--primary), #0284c7);
  color: var(--app-on-primary, #020914);
  font-weight: 700;
  font-size: 1.1rem;
  padding: 16px 36px;
  border-radius: 999px;
  transition: all 0.3s var(--ease-out);
  box-shadow: 0 4px 24px var(--primary-glow);
}
.cta-banner .cta-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 40px var(--primary-glow);
  color: var(--app-on-primary, #020914);
}

/* ===== Footer ===== */
.site-footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 48px 0;
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}
.site-footer .copyright {
  color: var(--text-muted);
  font-size: 0.82rem;
}
.site-footer .foot-links {
  display: flex;
  gap: 24px;
}
.site-footer .foot-links a {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.2s;
}
.site-footer .foot-links a:hover { color: var(--text); }

/* ===== Responsive Tweaks ===== */
@media (max-width: 480px) {
  .hero { padding: 80px 0 60px; }
  .hero h1 { font-size: 2rem; }
  .downloads { flex-direction: column; align-items: center; }
  .dl-btn { width: 100%; max-width: 300px; justify-content: center; }
  .section { padding: 60px 0; }
}

/* ===== Utility: Image rendering for pixel art ===== */
.pixel-art {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* ===== Custom scrollbar ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--surface-hover); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0, 240, 255, 0.3); }
