/* ============================================
   rumbuk — Landing Page Styles
   ============================================ */

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

:root {
  --primary: #6366f1;
  --primary-light: #818cf8;
  --primary-dark: #4f46e5;
  --accent: #06b6d4;
  --accent-light: #22d3ee;
  --bg-dark: #0f172a;
  --bg-darker: #020617;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --radius: 12px;
  --radius-sm: 8px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background: var(--bg-dark);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Fade-in Animation --- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.btn--primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  box-shadow: 0 4px 24px rgba(99, 102, 241, 0.3);
}

.btn--primary:hover {
  box-shadow: 0 4px 32px rgba(99, 102, 241, 0.5);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn--ghost:hover {
  color: var(--text);
  border-color: var(--border-hover);
  background: var(--bg-card);
}

/* --- Nav --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  transition: background 0.3s ease, backdrop-filter 0.3s ease, padding 0.3s ease;
}

.nav--scrolled {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}

.nav__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.nav__logo-text {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nav__phonetic {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-family: 'Courier New', monospace;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 0.9rem;
}

.nav__links a:not(.nav__cta) {
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.nav__links a:not(.nav__cta):hover {
  color: var(--text);
}

.nav__cta {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  color: var(--text) !important;
  transition: all 0.2s ease;
}

.nav__cta:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}

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

.hero__bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, var(--bg-dark) 0%, #1e1b4b 50%, #0f172a 100%);
}

.hero__glow {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

/* Animated calendar grid */
.hero__grid {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.12;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.grid-row {
  display: flex;
  gap: 6px;
}

.grid-cell {
  width: 64px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.4s ease;
}

.grid-cell.active {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
  animation: cellPulse 3s ease-in-out infinite;
}

.gc-1.active { animation-delay: 0s; }
.gc-2.active { animation-delay: 0.6s; }
.gc-3.active { animation-delay: 1.2s; }
.gc-4.active { animation-delay: 1.8s; }
.gc-5.active { animation-delay: 2.4s; }

@keyframes cellPulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.03); }
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 24px;
}

.hero__title {
  margin-bottom: 20px;
}

.hero__title-main {
  display: block;
  font-size: clamp(3.5rem, 8vw, 7rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  background: linear-gradient(135deg, var(--text) 0%, var(--primary-light) 50%, var(--accent-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__title-phonetic {
  display: block;
  font-size: clamp(0.9rem, 2vw, 1.2rem);
  color: var(--text-dim);
  font-family: 'Courier New', monospace;
  margin-top: 8px;
  letter-spacing: 0.08em;
}

.hero__tagline {
  font-size: clamp(1.2rem, 3vw, 1.75rem);
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.hero__description {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: var(--text-dim);
  max-width: 520px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero__scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
}

.hero__scroll-line {
  display: block;
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--text-dim), transparent);
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.3); transform-origin: top; }
}

/* --- Section Titles --- */
.section-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  text-align: center;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  text-align: center;
  max-width: 560px;
  margin: 0 auto 56px;
}

/* --- Features --- */
.features {
  padding: 120px 0;
  position: relative;
}

.features::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 80px;
  background: linear-gradient(to bottom, transparent, var(--border));
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.3s ease;
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-4px);
}

.feature-card__icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, 0.1);
  border-radius: var(--radius-sm);
  color: var(--primary-light);
  margin-bottom: 20px;
}

.feature-card__title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.feature-card__text {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* --- How It Works --- */
.how-it-works {
  padding: 120px 0;
  background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-darker) 100%);
}

.steps {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  position: relative;
}

.step__number {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
}

.step__content {
  padding-top: 4px;
}

.step__title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.step__text {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.step__line {
  position: absolute;
  top: 52px;
  left: 23px;
  width: 2px;
  height: calc(100% - 8px);
  background: linear-gradient(to bottom, var(--primary), transparent);
  opacity: 0.3;
}

/* --- Early Access --- */
.early-access {
  padding: 120px 0;
}

.early-access__card {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  padding: 48px 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}

.early-access__card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary));
}

.early-access__title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.03em;
}

.early-access__text {
  color: var(--text-muted);
  margin-bottom: 28px;
  line-height: 1.65;
}

.early-access__form {
  display: flex;
  gap: 12px;
  max-width: 420px;
  margin: 0 auto;
}

.early-access__input {
  flex: 1;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.95rem;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.2s ease;
}

.early-access__input::placeholder {
  color: var(--text-dim);
}

.early-access__input:focus {
  border-color: var(--primary);
}

.early-access__note {
  margin-top: 16px;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* --- Footer --- */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer__brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.footer__logo {
  font-weight: 700;
  font-size: 1rem;
}

.footer__phonetic {
  font-size: 0.7rem;
  color: var(--text-dim);
  font-family: 'Courier New', monospace;
}

.footer__copy {
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .nav__links {
    gap: 20px;
    font-size: 0.85rem;
  }

  .features__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .step {
    gap: 16px;
  }

  .step__line {
    display: none;
  }

  .early-access__form {
    flex-direction: column;
  }

  .early-access__card {
    padding: 36px 24px;
  }

  .footer__inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .hero__grid {
    transform: translate(-50%, -50%) scale(0.7);
  }
}

@media (max-width: 480px) {
  .nav__links a:not(.nav__cta) {
    display: none;
  }

  .hero__grid {
    transform: translate(-50%, -50%) scale(0.5);
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .features__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
