/* ============================================
   Daily Sensei — Landing Page Styles
   ============================================ */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0c0c0f;
  --surface: #16161a;
  --surface-glass: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.08);
  --text: #e8e6e3;
  --text-muted: #8a8a8e;
  --accent: #f0a030;
  --accent-warm: #e8832a;
  --accent-glow: rgba(240, 160, 48, 0.25);
  --gradient: linear-gradient(135deg, #f0a030 0%, #e8832a 100%);
  --radius: 14px;
  --radius-sm: 10px;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* --- Layout --- */
.landing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  min-height: 100dvh;
  max-width: 430px;
  margin: 0 auto;
  padding: 16px 20px env(safe-area-inset-bottom, 16px);
  gap: 6px;
}

/* --- Top Bar --- */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 4px 0;
}

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

.logo-icon {
  font-size: 1.4rem;
}

.logo-text {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.badge {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--surface-glass);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* --- Hero --- */
.hero {
  text-align: center;
  padding: 0 4px;
}

.hero h1 {
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--text);
}

.hero .highlight {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .subtitle {
  margin-top: 6px;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-muted);
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

.hero .subtitle-line2 {
  margin-top: 4px;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text);
  font-weight: 500;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Mockup --- */
.mockup-section {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-height: 340px;
}

.mockup-glow {
  position: absolute;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(40px);
  z-index: 0;
  animation: pulse-glow 4s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.15); }
}

.mockup-img {
  position: relative;
  z-index: 1;
  max-height: 100%;
  max-width: 200px;
  object-fit: contain;
  border-radius: 22px;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.5));
  animation: float 5s ease-in-out infinite;
}

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

/* --- How It Works (Pills) --- */
.how-it-works {
  width: 100%;
}

.day-pills {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-glass);
  border: 1px solid var(--border);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.25;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.pill small {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.62rem;
}

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

.pill-arrow {
  color: var(--text-muted);
  font-size: 0.8rem;
  opacity: 0.5;
}

/* --- CTA Section --- */
.cta-section {
  width: 100%;
  text-align: center;
}

.email-form {
  width: 100%;
}

.input-row {
  display: flex;
  gap: 8px;
  width: 100%;
}

.input-row input {
  flex: 1;
  padding: 12px 16px;
  font-size: 0.88rem;
  font-family: inherit;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-row input::placeholder {
  color: var(--text-muted);
}

.input-row input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.input-row button {
  padding: 12px 20px;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: inherit;
  border: none;
  border-radius: var(--radius);
  background: var(--gradient);
  color: #0c0c0f;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}

.input-row button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--accent-glow);
}

.input-row button:active {
  transform: translateY(0);
}

/* Loading spinner */
.btn-loader {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(12, 12, 15, 0.3);
  border-top-color: #0c0c0f;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.btn-loader[hidden] {
  display: none;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Form feedback */
.form-message {
  margin-top: 8px;
  font-size: 0.78rem;
  min-height: 1.2em;
  transition: opacity 0.3s ease;
}

.form-message.success {
  color: #4ade80;
}

.form-message.error {
  color: #f87171;
}

.footer-note {
  margin-top: 8px;
  font-size: 0.68rem;
  color: var(--text-muted);
  opacity: 0.6;
  padding-bottom: 4px;
}

/* --- Responsive: Tablet --- */
@media (min-width: 500px) {
  .landing {
    max-width: 560px;
    padding: 24px 32px 24px;
    gap: 14px;
  }

  .logo-icon { font-size: 1.6rem; }
  .logo-text { font-size: 1.3rem; }
  .badge { font-size: 0.72rem; padding: 5px 12px; }

  .hero h1 { font-size: 2rem; }
  .hero .subtitle { font-size: 0.92rem; max-width: 420px; }
  .hero .subtitle-line2 { font-size: 0.92rem; max-width: 420px; }

  .input-row input { padding: 14px 18px; font-size: 0.95rem; }
  .input-row button { padding: 14px 24px; font-size: 0.92rem; }

  .mockup-img { max-width: 260px; }
  .mockup-section { max-height: 400px; }
  .mockup-glow { width: 260px; height: 260px; }

  .pill { padding: 10px 14px; font-size: 0.8rem; gap: 8px; }
  .pill small { font-size: 0.68rem; }
  .pill-icon { font-size: 1.15rem; }
  .pill-arrow { font-size: 0.9rem; }

  .form-message { font-size: 0.85rem; }
  .footer-note { font-size: 0.75rem; }
}

/* --- Responsive: Desktop --- */
@media (min-width: 900px) {
  .landing {
    max-width: 720px;
    padding: 32px 48px 32px;
    gap: 20px;
  }

  .logo-icon { font-size: 1.8rem; }
  .logo-text { font-size: 1.5rem; }
  .badge { font-size: 0.78rem; padding: 6px 14px; }

  .hero h1 { font-size: 2.6rem; }
  .hero .subtitle { font-size: 1.05rem; max-width: 520px; margin-top: 10px; }
  .hero .subtitle-line2 { font-size: 1.05rem; max-width: 520px; margin-top: 6px; }

  .input-row input { padding: 16px 20px; font-size: 1rem; border-radius: 16px; }
  .input-row button { padding: 16px 32px; font-size: 1rem; border-radius: 16px; }

  .mockup-img { max-width: 300px; border-radius: 28px; }
  .mockup-section { max-height: 440px; }
  .mockup-glow { width: 300px; height: 300px; }

  .pill { padding: 12px 18px; font-size: 0.88rem; gap: 10px; border-radius: 12px; }
  .pill small { font-size: 0.75rem; }
  .pill-icon { font-size: 1.3rem; }
  .pill-arrow { font-size: 1rem; }
  .day-pills { gap: 12px; }

  .form-message { font-size: 0.9rem; }
  .footer-note { font-size: 0.8rem; margin-top: 12px; }
}

/* --- Responsive: Large Desktop --- */
@media (min-width: 1200px) {
  .landing {
    max-width: 860px;
    padding: 40px 64px 40px;
    gap: 24px;
  }

  .logo-icon { font-size: 2rem; }
  .logo-text { font-size: 1.7rem; }
  .badge { font-size: 0.82rem; padding: 7px 16px; }

  .hero h1 { font-size: 3.2rem; }
  .hero .subtitle { font-size: 1.15rem; max-width: 600px; margin-top: 12px; }
  .hero .subtitle-line2 { font-size: 1.15rem; max-width: 600px; margin-top: 8px; }

  .input-row { max-width: 520px; margin: 0 auto; }
  .input-row input { padding: 18px 24px; font-size: 1.05rem; }
  .input-row button { padding: 18px 36px; font-size: 1.05rem; }

  .mockup-img { max-width: 340px; }
  .mockup-section { max-height: 500px; }
  .mockup-glow { width: 340px; height: 340px; }

  .pill { padding: 14px 22px; font-size: 0.95rem; }
  .pill small { font-size: 0.8rem; }
  .pill-icon { font-size: 1.45rem; }
  .day-pills { gap: 16px; }

  .form-message { font-size: 0.95rem; }
  .footer-note { font-size: 0.85rem; }
}

/* --- Very small screens --- */
@media (max-height: 700px) {
  .hero h1 {
    font-size: 1.35rem;
  }

  .hero .subtitle {
    font-size: 0.75rem;
  }

  .mockup-section {
    max-height: 240px;
  }

  .mockup-img {
    max-width: 160px;
  }

  .pill {
    padding: 6px 8px;
    font-size: 0.65rem;
  }
}

/* --- Entrance animation --- */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.top-bar { animation: fade-up 0.5s ease both; }
.hero { animation: fade-up 0.5s 0.1s ease both; }
.hero .subtitle-line2 { animation: fade-up 0.5s 0.15s ease both; }
.mockup-section { animation: fade-up 0.6s 0.2s ease both; }
.how-it-works { animation: fade-up 0.5s 0.35s ease both; }
.cta-section { animation: fade-up 0.5s 0.45s ease both; }
