:root {
  --primary-navy: #0D1F3D;
  --secondary-blue: #2E7BFF;
  --secondary-blue-hover: #1A66EA;
  --accent-green: #36B37E;
  --warm-yellow: #FFC043;
  --cream: #FFFDF5;
  --surface: #FFFFFF;
  --surface-alt: #F8FAFC;
  --border: #E2E8F0;
  --border-light: #EDF2F7;
  --text-main: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --shadow-sm: 0 2px 4px rgba(13, 31, 61, 0.04), 0 1px 2px rgba(13, 31, 61, 0.06);
  --shadow-md: 0 10px 25px -5px rgba(13, 31, 61, 0.08), 0 8px 10px -6px rgba(13, 31, 61, 0.04);
  --shadow-lg: 0 20px 35px -10px rgba(13, 31, 61, 0.12), 0 10px 15px -5px rgba(13, 31, 61, 0.06);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
}

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

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Offset for sticky header on all anchor targets */
section[id],
.section[id],
#download,
[id] {
  scroll-margin-top: 110px;
}

body {
  background-color: var(--cream);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Header & Nav */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 253, 245, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.logo-img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.logo-text {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary-navy);
  letter-spacing: -0.5px;
}

.logo-tag {
  font-size: 0.75rem;
  background: #DCFCE7;
  color: #166534;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 700;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--secondary-blue);
}

.btn-primary {
  background-color: var(--secondary-blue);
  color: #ffffff;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(46, 123, 255, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary:hover {
  background-color: var(--secondary-blue-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(46, 123, 255, 0.35);
}

/* Container */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Hero Section */
.hero {
  padding: 5rem 0 3.5rem;
  text-align: center;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  color: var(--secondary-blue);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: 3.25rem;
  font-weight: 850;
  color: var(--primary-navy);
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: 1.25rem;
}

.hero h1 span.highlight {
  color: var(--secondary-blue);
  background: linear-gradient(135deg, #2E7BFF 0%, #36B37E 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 2.25rem;
}

.hero-cta {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
}

.app-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 185px;
  height: 58px;
  padding: 0 1.35rem;
  background: linear-gradient(180deg, #1A2538 0%, #0A111F 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(13, 31, 61, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.app-badge:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.32);
  box-shadow: 0 12px 26px -4px rgba(13, 31, 61, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.app-badge:active {
  transform: translateY(0);
}

.badge-svg-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.badge-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.badge-text-sub {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94A3B8;
  line-height: 1.15;
}

.badge-text-main {
  font-size: 1.12rem;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.15;
  letter-spacing: -0.2px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Glass variant for dark CTA banners */
.app-badge-glass {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.app-badge-glass:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.38);
  box-shadow: 0 14px 30px -4px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

/* Pulse animation triggered when clicking Get App */
@keyframes badgeGlowPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 4px 14px rgba(13, 31, 61, 0.18);
  }
  40% {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(46, 123, 255, 0.5), 0 0 0 2px rgba(46, 123, 255, 0.6);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 4px 14px rgba(13, 31, 61, 0.18);
  }
}

.pulse-highlight .app-badge {
  animation: badgeGlowPulse 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Interactive Collocation Blocks */
.collocation-hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  max-width: 800px;
  margin: 0 auto;
  box-shadow: var(--shadow-lg);
}

.block-demo-title {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 800;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.blocks-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.word-block {
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 1.35rem;
  box-shadow: var(--shadow-sm);
}

.word-block.verb {
  background: #EFF6FF;
  border: 2px solid var(--secondary-blue);
  color: var(--secondary-blue);
}

.word-block.noun {
  background: #ECFDF5;
  border: 2px solid var(--accent-green);
  color: var(--accent-green);
}

.block-plus {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-muted);
}

.block-wrong {
  display: inline-block;
  background: #FEF2F2;
  border: 1px dashed #EF4444;
  color: #DC2626;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 0.5rem;
}

/* Features Grid */
.section {
  padding: 4.5rem 0;
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 3rem;
}

.section-header h2 {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--primary-navy);
  margin-bottom: 0.75rem;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.feature-icon-box {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-navy);
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Legal Page Content */
.legal-wrapper {
  max-width: 820px;
  margin: 3rem auto 5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  box-shadow: var(--shadow-sm);
}

.legal-wrapper h1 {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--primary-navy);
  margin-bottom: 0.5rem;
}

.legal-updated {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-light);
}

.legal-wrapper h2 {
  font-size: 1.35rem;
  font-weight: 750;
  color: var(--primary-navy);
  margin: 2rem 0 0.75rem;
}

.legal-wrapper p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: 1rem;
}

.legal-wrapper ul {
  margin: 0.75rem 0 1.25rem 1.5rem;
  color: var(--text-secondary);
}

.legal-wrapper li {
  margin-bottom: 0.5rem;
}

/* Footer */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 3.5rem 0 2rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer-col h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-navy);
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.65rem;
}

.footer-col a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--secondary-blue);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
  font-size: 0.85rem;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.35rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .legal-wrapper {
    padding: 2rem 1.5rem;
    margin: 1.5rem auto;
  }
}
