/* =========================================================
   Likhi (লিখি) — pages.css
   Page-specific layout and hero styles
   ========================================================= */

/* ----------------------------------------------------------
   Home: Hero
   ---------------------------------------------------------- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: var(--nav-height);
  background: radial-gradient(ellipse 80% 60% at 50% -20%, rgb(26 111 219 / 0.08) 0%, transparent 70%),
              var(--color-bg);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-border), transparent);
}

.hero-inner {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-6);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
  padding-block: var(--space-20);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--color-primary-bg);
  color: var(--color-primary-dark);
  border: 1px solid rgb(26 111 219 / 0.2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-6);
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  background: var(--color-primary);
  border-radius: 50%;
  animation: pingDot 2s ease-in-out infinite;
}

@keyframes pingDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
}

.hero-headline {
  font-family: var(--font-bn);
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: var(--weight-extrabold);
  line-height: 1.25;
  color: var(--color-text);
  margin-bottom: var(--space-4);
  letter-spacing: -0.01em;
}

.hero-headline-highlight {
  color: var(--color-primary);
}

.hero-subheadline {
  font-size: var(--text-xl);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-2);
  font-weight: var(--weight-medium);
}

.hero-desc {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 45ch;
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-8);
}

.hero-actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-8);
}

.hero-social-proof {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.hero-proof-icons {
  display: flex;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.hero-proof-text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* Hero right column — demo */
.hero-demo {
  position: relative;
}

.hero-demo-card {
  background: #0F172A;
  border-radius: var(--radius-2xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-xl), 0 0 80px -20px rgb(26 111 219 / 0.3);
  position: relative;
  z-index: 1;
}

.hero-demo-glow {
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-gold-light), var(--color-primary));
  border-radius: calc(var(--radius-2xl) + 2px);
  z-index: 0;
  filter: blur(0px);
  opacity: 0.5;
  animation: glowRotate 4s linear infinite;
}

@keyframes glowRotate {
  0%   { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

/* Floating mini badges around demo */
.hero-float-badge {
  position: absolute;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--color-text);
  box-shadow: var(--shadow-md);
  white-space: nowrap;
  z-index: 2;
}

.hero-float-badge.badge-tl {
  top: -16px;
  left: -16px;
}

.hero-float-badge.badge-br {
  bottom: -16px;
  right: -16px;
}

/* Stats below hero */
.hero-stats {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  padding-block: var(--space-8);
}

.hero-stats-inner {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-6);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-12);
  flex-wrap: wrap;
}

.hero-stat {
  text-align: center;
}

.hero-stat-value {
  font-size: var(--text-3xl);
  font-weight: var(--weight-extrabold);
  color: var(--color-primary);
  letter-spacing: -0.03em;
  line-height: 1;
}

.hero-stat-label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

.hero-stat-divider {
  width: 1px;
  height: 40px;
  background: var(--color-border);
}

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--space-12);
  }

  .hero-desc {
    max-width: none;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-social-proof {
    justify-content: center;
  }

  .hero-demo {
    max-width: 500px;
    margin-inline: auto;
  }
}

@media (max-width: 560px) {
  .hero-inner {
    padding-block: var(--space-12);
  }

  .hero-stat-divider {
    display: none;
  }

  .hero-stats-inner {
    gap: var(--space-8);
  }
}

/* ----------------------------------------------------------
   Home: Why Likhi benefits section
   ---------------------------------------------------------- */
.benefits-section {
  background: var(--color-bg-alt);
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--space-5);
  margin-top: var(--space-12);
}

.benefit-card {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-6);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.benefit-card:hover {
  border-color: var(--color-primary-light);
  box-shadow: var(--shadow-md);
}

.benefit-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-top: 0.1em;
}

.benefit-text {}

.benefit-title {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

.benefit-desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
}

/* ----------------------------------------------------------
   Home: Typing demo section
   ---------------------------------------------------------- */
.demo-section-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: center;
}

@media (max-width: 900px) {
  .demo-section-inner {
    grid-template-columns: 1fr;
  }
}

/* ----------------------------------------------------------
   Home: How it works section
   ---------------------------------------------------------- */
.how-section {
  background: var(--color-bg-alt);
}

.how-inner {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--space-16);
  align-items: flex-start;
}

@media (max-width: 900px) {
  .how-inner {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
}

/* ----------------------------------------------------------
   Home: Works with
   ---------------------------------------------------------- */
.works-with-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-8);
}

.works-with-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-4);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text);
}

.works-with-icon {
  font-size: 1.25rem;
}

/* ----------------------------------------------------------
   Performance section
   ---------------------------------------------------------- */
.perf-section {
  background: #0F172A;
  color: #E2E8F0;
}

.perf-section .section-label {
  color: var(--color-primary-light);
}

.perf-section .section-label::before {
  background: var(--color-primary-light);
}

.perf-section .section-title {
  color: #F8FAFF;
}

.perf-section .section-subtitle {
  color: #94A3B8;
}

.perf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-12);
}

.perf-card {
  background: #1E293B;
  border: 1px solid #334155;
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.perf-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-gold-light));
}

.perf-value {
  font-size: var(--text-4xl);
  font-weight: var(--weight-extrabold);
  color: var(--color-primary-light);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: var(--space-1);
}

.perf-unit {
  font-size: var(--text-lg);
  font-weight: var(--weight-normal);
  color: #64748B;
  margin-left: var(--space-1);
}

.perf-label {
  font-size: var(--text-sm);
  color: #94A3B8;
  margin-bottom: var(--space-3);
}

.perf-pass {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: #4ADE80;
  background: rgb(74 222 128 / 0.1);
  border: 1px solid rgb(74 222 128 / 0.2);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
}

.perf-note {
  margin-top: var(--space-8);
  text-align: center;
  font-size: var(--text-sm);
  color: #64748B;
}

.perf-note a { color: #94A3B8; text-decoration: underline; }

/* ----------------------------------------------------------
   How-it-works page
   ---------------------------------------------------------- */
.hiw-flow {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.hiw-flow::before {
  content: '';
  position: absolute;
  left: 27px;
  top: 56px;
  bottom: 56px;
  width: 2px;
  background: linear-gradient(to bottom, var(--color-primary), var(--color-gold-light));
}

.hiw-step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: var(--space-6);
  padding-bottom: var(--space-10);
  position: relative;
}

.hiw-step:last-child {
  padding-bottom: 0;
}

.hiw-step-num {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: var(--color-primary);
  color: white;
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  border-radius: var(--radius-xl);
  flex-shrink: 0;
}

.hiw-step-content {
  padding-top: var(--space-3);
}

.hiw-example {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin-top: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}

/* ----------------------------------------------------------
   Privacy page
   ---------------------------------------------------------- */
.privacy-principle {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-6);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-4);
}

.privacy-principle-icon {
  font-size: 1.75rem;
  flex-shrink: 0;
  margin-top: 0.1em;
}

.privacy-principle-title {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.privacy-principle-desc {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
}

/* ----------------------------------------------------------
   About page
   ---------------------------------------------------------- */
.tech-stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-4);
}

.tech-pill {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text);
}

.tech-icon {
  font-size: 1.5rem;
}

/* ----------------------------------------------------------
   404 page
   ---------------------------------------------------------- */
.notfound-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-8);
  background: radial-gradient(ellipse 60% 40% at 50% 30%, var(--color-primary-bg), var(--color-bg));
}

.notfound-code {
  font-size: clamp(6rem, 20vw, 12rem);
  font-weight: var(--weight-extrabold);
  line-height: 1;
  color: var(--color-primary);
  opacity: 0.15;
  letter-spacing: -0.05em;
  user-select: none;
  margin-bottom: -2rem;
}

.notfound-title {
  font-size: var(--text-4xl);
  font-weight: var(--weight-extrabold);
  margin-bottom: var(--space-4);
}
