/* ViewZensei — Coming Soon
   Bamboo Study theme tokens mirrored from the main site
   (dev/frontend/src/assets/styles/main.css) so this promo matches on sight.

   Theme resolution order (later wins):
   1. :root            — dark, hard default
   2. prefers-color-scheme: light  — auto light for OS light mode
   3. [data-theme]     — explicit user choice via the toggle (always wins;
                          the attribute selector out-specifies the media query) */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@300;400;500;600;700;800&family=Noto+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,500&display=swap');

:root {
  --color-brand: #76C46E;
  --color-brand-light: #8FD488;
  --color-accent: #FFD166;
  --color-accent-teal: #2DD4BF;

  --color-text-primary: #F0F5F1;
  --color-text-secondary: #B8C4BC;
  --color-bg-primary: #0D1B13;
  --color-bg-secondary: #142A1D;
  --color-border: rgba(240, 245, 241, 0.12);

  --font-sans: 'Noto Sans', 'Noto Sans Thai', -apple-system, BlinkMacSystemFont, sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --color-brand: #3A6B35;
    --color-brand-light: #4A8B45;
    --color-accent: #E3B505;
    --color-accent-teal: #0F969C;

    --color-text-primary: #141414;
    --color-text-secondary: #4B5563;
    --color-bg-primary: #FFFFFF;
    --color-bg-secondary: #F0F5F1;
    --color-border: rgba(20, 20, 20, 0.1);
  }
}

:root[data-theme='dark'] {
  --color-brand: #76C46E;
  --color-brand-light: #8FD488;
  --color-accent: #FFD166;
  --color-accent-teal: #2DD4BF;

  --color-text-primary: #F0F5F1;
  --color-text-secondary: #B8C4BC;
  --color-bg-primary: #0D1B13;
  --color-bg-secondary: #142A1D;
  --color-border: rgba(240, 245, 241, 0.12);
}

:root[data-theme='light'] {
  --color-brand: #3A6B35;
  --color-brand-light: #4A8B45;
  --color-accent: #E3B505;
  --color-accent-teal: #0F969C;

  --color-text-primary: #141414;
  --color-text-secondary: #4B5563;
  --color-bg-primary: #FFFFFF;
  --color-bg-secondary: #F0F5F1;
  --color-border: rgba(20, 20, 20, 0.1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--color-bg-primary);
  color: var(--color-text-primary);
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

#app {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.bg-glow {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 0%, rgba(45, 212, 191, 0.16), transparent 55%),
    radial-gradient(circle at 85% 20%, rgba(255, 209, 102, 0.10), transparent 45%),
    radial-gradient(circle at 10% 80%, rgba(118, 196, 110, 0.14), transparent 50%);
}

.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 0;
  width: 480px;
  height: 480px;
  margin: -240px 0 0 -240px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.16), transparent 70%);
  transition: transform 0.2s ease-out, opacity 0.3s ease;
  will-change: transform;
}

.topbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-mark {
  display: block;
  border-radius: 50%;
}

.brand-word {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lang-toggle,
.icon-toggle {
  font-family: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--color-text-primary);
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.lang-toggle {
  padding: 0.4rem 0.9rem;
}

.icon-toggle {
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  padding: 0;
}

.lang-toggle:hover,
.icon-toggle:hover {
  border-color: var(--color-brand);
  background: rgba(118, 196, 110, 0.1);
  transform: translateY(-1px);
}

.lang-toggle:focus-visible,
.icon-toggle:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 2px;
}

.hero {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1.5rem 3rem;
  max-width: 640px;
  margin: 0 auto;
}

.mascot {
  width: 140px;
  height: 140px;
  margin-top: 1rem;
  filter: drop-shadow(0 12px 28px rgba(45, 212, 191, 0.25));
  animation: float 5s ease-in-out infinite;
}

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

.badge {
  margin-top: 1.5rem;
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #16213e;
  background: linear-gradient(135deg, var(--color-accent), var(--color-brand-light));
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
}

.kicker {
  margin: 0.85rem 0 0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-teal);
  min-height: 1.2em;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.kicker-fading {
  opacity: 0;
  transform: translateY(6px);
}

.title {
  margin: 0.4rem 0 0.5rem;
  font-size: clamp(2.25rem, 6vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--color-brand-light), var(--color-accent-teal));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tagline {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-text-primary);
}

.sub {
  margin: 0.6rem 0 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--color-text-secondary);
  max-width: 30rem;
}

.features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

.feature {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-primary);
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.feature:hover {
  border-color: var(--color-brand);
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 1rem;
}

.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 1.5rem;
  font-size: 0.8rem;
  color: var(--color-text-secondary);
}

@media (min-width: 640px) {
  .mascot { width: 180px; height: 180px; }
}

@media (prefers-reduced-motion: reduce) {
  .mascot { animation: none; }
  .cursor-glow { display: none; }
  .word-enter-active,
  .word-leave-active,
  body { transition: none; }
}
