/* ===================================================
   EiGO! Landing Page — style.css
   Color system: primary = white/black, secondary = blue,
   tertiary = red (US-flag palette)
   =================================================== */

:root {
  --white:        #FFFFFF;
  --black:        #0A0A0A;
  --blue:         #002868;
  --blue-dark:    #001A45;
  --red:          #BF0A30;
  --red-dark:     #96082A;
  --saffron:      #FF9933;
  --india-green:  #138808;
  --text-body:    #3A3A3A;
  --text-muted:   #6B7280;
  --border:       #E5E7EB;
  --bg-alt:       #F7F7F8;
  --radius-sm:    8px;
  --radius-md:    16px;
  --radius-lg:    28px;
  --max-w:        1200px;
  --header-h:     84px;
  --section-py:   110px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
img, video { display: block; max-width: 100%; }

/* Images are not selectable, draggable, or save-able via context menu / long-press */
img {
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}
button { cursor: pointer; font: inherit; border: none; background: none; }
a { color: inherit; text-decoration: none; }

body {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: #fff;
  overflow-x: hidden;
  background-color: #0a0a1a;
  background-image:
    radial-gradient(circle at 15% 25%, rgba(0, 40, 104, 0.85), transparent 55%),
    radial-gradient(circle at 85% 15%, rgba(191, 10, 48, 0.8), transparent 55%),
    radial-gradient(circle at 30% 85%, rgba(91, 33, 182, 0.85), transparent 60%),
    radial-gradient(circle at 80% 75%, rgba(0, 40, 104, 0.7), transparent 55%),
    radial-gradient(circle at 55% 50%, rgba(147, 51, 234, 0.5), transparent 65%);
  background-size: 180% 180%;
  background-repeat: no-repeat;
  background-attachment: fixed;
  animation: mesh-shift 26s ease-in-out infinite alternate;
}

@keyframes mesh-shift {
  0%   { background-position: 10% 20%, 90% 10%, 20% 90%, 85% 80%, 50% 50%; }
  50%  { background-position: 40% 45%, 60% 35%, 45% 65%, 55% 55%, 35% 60%; }
  100% { background-position: 70% 15%, 25% 75%, 75% 25%, 20% 40%, 65% 45%; }
}

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

.mobile-br { display: none; }

h1, h2 {
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

h2 { font-size: clamp(1.7rem, 3.5vw, 2.6rem); }

p { color: rgba(255, 255, 255, 0.85); font-size: 1rem; line-height: 1.8; }

/* ---------- Buttons ---------- */
.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 13px 28px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn-cta:hover { transform: translateY(-2px); }
.btn-cta:active { transform: translateY(0); }

.btn-primary,
.btn-full,
#success-close {
  background: var(--red);
  color: #fff;
  box-shadow: 0 4px 16px rgba(191, 10, 48, 0.3);
}
.btn-primary:hover,
.btn-full:hover { background: var(--red-dark); box-shadow: 0 6px 24px rgba(191, 10, 48, 0.4); }

.btn-header {
  background: #fff;
  color: var(--red);
  font-size: 0.85rem;
  padding: 10px 20px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.btn-header:hover { background: #f2f2f2; }

.btn-outline {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  padding: 11px 26px;
}
.btn-outline:hover { background: #fff; color: var(--blue); }

.btn-full { width: 100%; padding: 15px; font-size: 1rem; }

.feature-tag {
  display: inline-block;
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 5px 12px;
  border-radius: 100px;
}

/* ---------- Header ---------- */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  height: var(--header-h);
  background: transparent;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

#site-header.header-hidden {
  opacity: 0;
  transform: translateY(-16px);
  pointer-events: none;
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 140px;
  width: auto;
  display: block;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.35));
}

/* ---------- Section 1: Hero (App Icon) ---------- */
#app-showcase {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: var(--section-py) 0;
}

.app-showcase-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 64px;
}

.logo-3d-stage {
  display: flex;
  justify-content: center;
}

.logo-3d-img {
  width: 100%;
}

.app-icon-wrap {
  position: relative;
  width: min(60%, 320px);
  filter: drop-shadow(0 30px 70px rgba(0, 0, 0, 0.5));
}

.app-showcase-text h2 { margin-bottom: 16px; }
.app-showcase-text p { max-width: 460px; margin-bottom: 28px; }

/* ---------- Section 4: App Demo ---------- */
#app-demo {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: var(--section-py) 0;
}

.app-demo-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 64px;
}

.demo-media { display: flex; justify-content: center; }

.demo-phone {
  position: relative;
  width: 250px;
  height: 520px;
  border: 10px solid var(--black);
  border-radius: 44px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

.demo-phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 34px;
  overflow: hidden;
  background: var(--black);
}

.demo-phone-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.demo-text h2 { margin-bottom: 16px; }
.demo-text p { color: rgba(255, 255, 255, 0.85); max-width: 460px; margin-bottom: 28px; }

/* ---------- Section 5: Voice Pairs (Accents) ---------- */
#voice-pairs {
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding: var(--section-py) 0;
}

.voice-pairs-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 64px;
}

.voice-pairs-text h2 { margin-bottom: 16px; }
.voice-pairs-text p { color: rgba(255, 255, 255, 0.85); max-width: 480px; }

.accent-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}

.accent-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  animation-name: accent-crossfade;
  animation-duration: 16s;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

.accent-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.accent-flag {
  position: absolute;
  right: 20px;
  bottom: 20px;
  font-size: 4.2rem;
  line-height: 1;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.5));
  z-index: 2;
}

.accent-slide-1 { animation-delay: 0s; }
.accent-slide-2 { animation-delay: 4s; }
.accent-slide-3 { animation-delay: 8s; }
.accent-slide-4 { animation-delay: 12s; }

@keyframes accent-crossfade {
  0%   { opacity: 0; }
  4%   { opacity: 1; }
  21%  { opacity: 1; }
  29%  { opacity: 0; }
  100% { opacity: 0; }
}

/* ---------- Section 7: CEFR & Topics ---------- */
#cefr-topics {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: var(--section-py) 0;
}

.cefr-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 64px;
}

.cefr-text { order: 2; }
.cefr-orbit-wrap { order: 1; }

.cefr-text h2 { margin-bottom: 16px; }
.cefr-text p { color: rgba(255, 255, 255, 0.85); max-width: 480px; }

.cefr-orbit-wrap {
  --orbit-radius: 195px;
  position: relative;
  width: 460px;
  height: 460px;
  margin: 0 auto;
}

.orbit-center {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 168px; height: 168px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px;
  z-index: 3;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
  transition: background 0.4s ease;
}

#orbit-center-text {
  font-family: 'Inter', sans-serif;
  font-weight: 900;
  font-size: 5rem;
  letter-spacing: -0.03em;
  line-height: 1;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.5);
  transition: opacity 0.35s ease;
}

#orbit-center-text.fade-out { opacity: 0; }

.orbit {
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  animation-name: orbit-rotate;
  animation-duration: 42s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.orbit-1 { animation-delay: 0s; }
.orbit-2 { animation-delay: -7s; }
.orbit-3 { animation-delay: -14s; }
.orbit-4 { animation-delay: -21s; }
.orbit-5 { animation-delay: -28s; }
.orbit-6 { animation-delay: -35s; }

@keyframes orbit-rotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.orbit-item {
  position: absolute;
  left: var(--orbit-radius);
  top: 0;
  width: 132px;
  transform: translate(-50%, -50%);
  animation-name: orbit-counter;
  animation-duration: 42s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.orbit-1 .orbit-item { animation-delay: 0s; }
.orbit-2 .orbit-item { animation-delay: -7s; }
.orbit-3 .orbit-item { animation-delay: -14s; }
.orbit-4 .orbit-item { animation-delay: -21s; }
.orbit-5 .orbit-item { animation-delay: -28s; }
.orbit-6 .orbit-item { animation-delay: -35s; }

@keyframes orbit-counter {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(-360deg); }
}

.orbit-emoji {
  display: block;
  text-align: center;
  font-size: 3.2rem;
  line-height: 1.3;
}

.orbit-emoji small {
  display: block;
  font-size: 1.3rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.8);
}

/* ---------- Footer ---------- */
#footer {
  position: relative;
  background: var(--red);
  padding: 120px 0 72px;
}

.footer-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.footer-download {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  margin-bottom: 52px;
}

.footer-download-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.footer-download-icon {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}

.footer-download-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 64px;
  gap: 4px;
}

.footer-download-wordmark {
  height: 40px;
  width: auto;
  align-self: flex-start;
}

.footer-download-tagline {
  color: #fff;
  font-size: 0.72rem;
  line-height: 1.3;
  white-space: nowrap;
}

.footer-download-btn {
  width: 100%;
}

.footer-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 28px;
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #9CA3AF;
  font-size: 0.9rem;
  transition: color 0.2s;
}
.footer-nav a:hover { color: #fff; }

.footer-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.footer-copy {
  color: #9CA3AF;
  font-size: 0.8rem;
  text-align: center;
}

/* ---------- Modal ---------- */
#modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

#modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: #fff;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 420px;
  position: relative;
  padding: 48px 40px 40px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.25);
  transform: translateY(16px) scale(0.97);
  transition: transform 0.25s ease;
}

#modal-overlay.open .modal {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 18px; right: 18px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg-alt);
  color: var(--text-muted);
  font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.modal-close:hover { background: var(--border); color: var(--black); }

.modal-body { text-align: center; }

.modal-body h2 { color: var(--black); font-size: 1.4rem; margin-bottom: 8px; }
.modal-body p { color: var(--text-body); }
.modal-sub { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 28px; }

.modal-body form { text-align: left; }

.modal-body label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-body);
  margin-bottom: 6px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.modal-body input[type="email"] {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 1rem;
  color: var(--black);
  background: #fff;
  margin-bottom: 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.modal-body input[type="email"]:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 40, 104, 0.15);
}

.form-error {
  color: var(--red);
  font-size: 0.83rem;
  margin-top: -8px;
  margin-bottom: 12px;
  text-align: left;
}

#modal-success h2 { margin-bottom: 24px; }

/* ---------- Scroll-in Animations ---------- */
[data-animate] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
[data-animate][data-delay="100"] { transition-delay: 0.1s; }
[data-animate].in-view { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  :root { --section-py: 72px; --header-h: 72px; }
  .mobile-br { display: inline; }

  /* Hero: icon top (larger), headline centered below, button centered below that */
  .app-showcase-inner { grid-template-columns: 1fr; gap: 32px; text-align: center; }
  .app-icon-wrap { width: min(78%, 300px); }
  .app-showcase-text p { max-width: 100%; margin-left: auto; margin-right: auto; }

  /* App demo: image top, text bottom */
  .app-demo-inner { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .demo-text p { max-width: 100%; margin-left: auto; margin-right: auto; }

  /* Voice pairs: image top (full width), text bottom (full width) */
  .voice-pairs-inner { grid-template-columns: 1fr; gap: 32px; text-align: center; }
  .accent-stage { order: -1; }
  .voice-pairs-text p { max-width: 100%; margin: 0 auto; }

  /* CEFR: image/orbit top, text bottom */
  .cefr-inner { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .cefr-orbit-wrap { order: -1; --orbit-radius: 115px; width: 320px; height: 320px; margin-top: 20px; }
  .orbit-center { width: 132px; height: 132px; }
  #orbit-center-text { font-size: 2.6rem; }
  .orbit-item { width: 112px; }
  .orbit-emoji { font-size: 2.5rem; }
  .orbit-emoji small { font-size: 1rem; }
  .cefr-text p { max-width: 100%; margin: 0 auto; }

  /* Footer: full-width download card */
  #footer { padding: 88px 0 40px; }
  .footer-download { width: 100%; margin-bottom: 48px; }
  .footer-download-row { justify-content: flex-start; }
  .footer-download-info { flex: 1; min-width: 0; }
  .footer-download-tagline { white-space: normal; }
}

@media (max-width: 560px) {
  .demo-phone { width: 210px; height: 440px; }
}
