/* ============================================================
   home.css — Home page styles
   ============================================================ */

/* Page offset for fixed nav */
.page-content {
  padding-top: var(--nav-height);
}

/* ============================================================
   Hero Section
   ============================================================ */
.hero {
  position: relative;
  background: var(--color-navy);
  color: #fff;
  padding: var(--space-20) 0 var(--space-24);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 70% 50%, rgba(245,166,35,0.08) 0%, transparent 70%),
    radial-gradient(ellipse 50% 80% at 10% 80%, rgba(44,74,110,0.6) 0%, transparent 60%);
  pointer-events: none;
}

/* Decorative grid lines */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
  max-width: 780px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px 14px;
  background: rgba(245,166,35,0.15);
  border: 1px solid rgba(245,166,35,0.35);
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-saffron);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: var(--space-6);
  animation: fadeInUp 0.6s ease both;
}

.hero__badge-dot {
  width: 6px;
  height: 6px;
  background: var(--color-saffron);
  border-radius: 50%;
  animation: pulse 2s ease infinite;
}

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

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 4.2rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-6);
  animation: fadeInUp 0.6s 0.1s ease both;
}

.hero__title-accent {
  color: var(--color-saffron);
  position: relative;
  display: inline-block;
}

.hero__title-accent::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--color-saffron);
  opacity: 0.4;
}

.hero__subtitle {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: rgba(255,255,255,0.65);
  line-height: 1.7;
  max-width: 560px;
  margin-bottom: var(--space-10);
  animation: fadeInUp 0.6s 0.2s ease both;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  animation: fadeInUp 0.6s 0.3s ease both;
}

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
  margin-top: var(--space-16);
  padding-top: var(--space-10);
  border-top: 1px solid rgba(255,255,255,0.1);
  animation: fadeInUp 0.6s 0.4s ease both;
}

.hero__stat-value {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-saffron);
  line-height: 1;
  margin-bottom: 4px;
}

.hero__stat-label {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.45);
  font-weight: 500;
}

/* Hero preview card */
.hero__preview {
  display: none;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 380px;
  padding-right: 32px;
  animation: floatIn 0.8s 0.3s ease both;
}

@keyframes floatIn {
  from { opacity: 0; transform: translateY(calc(-50% + 30px)); }
  to { opacity: 1; transform: translateY(-50%); }
}

.hero__preview-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
}

.hero__preview-header {
  background: var(--color-navy-mid);
  padding: var(--space-4) var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.hero__preview-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.hero__preview-body {
  padding: var(--space-5);
  background: var(--color-cream);
}

.hero__preview-sheet {
  background: #fff;
  border-radius: var(--radius-sm);
  padding: var(--space-5);
  border: 1px solid var(--color-border);
}

.hero__preview-sheet-title {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-navy);
  text-align: center;
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border);
}

.preview-bubble-row {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
}

.preview-q-num {
  font-size: 9px;
  color: var(--color-text-muted);
  font-weight: 600;
  width: 16px;
  text-align: right;
  font-family: monospace;
}

.preview-bubble {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid var(--color-border-dark);
  flex-shrink: 0;
  transition: background 0.2s;
}

.preview-bubble.filled {
  background: var(--color-navy);
  border-color: var(--color-navy);
}

@media (min-width: 900px) {
  .hero__preview { display: block; }
  .hero__inner { max-width: 520px; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   Features Section
   ============================================================ */
.features {
  padding: var(--space-24) 0;
}

.section-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-saffron);
  margin-bottom: var(--space-4);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--color-navy);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-5);
}

.section-subtitle {
  font-size: 1rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  max-width: 560px;
}

.features__header {
  margin-bottom: var(--space-16);
}

.features__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}

@media (min-width: 640px) {
  .features__grid { grid-template-columns: 1fr 1fr; }
}

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

.feature-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  border: 1px solid var(--color-border);
  transition: box-shadow var(--transition-med), transform var(--transition-med), border-color var(--transition-med);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-saffron), var(--color-saffron-light));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-med);
}

.feature-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: var(--color-border-dark);
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-icon {
  width: 52px;
  height: 52px;
  background: var(--color-cream);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-5);
  font-size: 1.4rem;
  color: var(--color-navy);
  flex-shrink: 0;
}

.feature-icon i {
  font-size: 1.35rem;
  line-height: 1;
}

.feature-icon .material-symbols-outlined {
  font-size: 1.5rem;
  line-height: 1;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.feature-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: var(--space-3);
}

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

/* ============================================================
   How It Works
   ============================================================ */
.how-it-works {
  padding: var(--space-24) 0;
  background: var(--color-navy);
  color: #fff;
}

.how-it-works .section-title {
  color: #fff;
}

.how-it-works .section-subtitle {
  color: rgba(255,255,255,0.55);
}

.how-it-works__header {
  text-align: center;
  margin-bottom: var(--space-16);
}

.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  position: relative;
}

@media (min-width: 768px) {
  .steps-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .steps-grid::before {
    content: '';
    position: absolute;
    top: 28px;
    left: calc(33.33% + 28px);
    right: calc(33.33% + 28px);
    height: 1px;
    border-top: 2px dashed rgba(245,166,35,0.35);
  }
}

.step-card {
  text-align: center;
  padding: var(--space-8) var(--space-6);
  background: rgba(255,255,255,0.04);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,0.08);
  transition: background var(--transition-med), border-color var(--transition-med);
}

.step-card:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(245,166,35,0.25);
}

.step-number {
  width: 56px;
  height: 56px;
  background: var(--color-saffron);
  color: var(--color-navy);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  margin: 0 auto var(--space-5);
}

.step-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: var(--space-3);
}

.step-desc {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.65;
}

/* ============================================================
   Templates Showcase
   ============================================================ */
.templates-showcase {
  padding: var(--space-24) 0;
}

.templates-showcase__header {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  margin-bottom: var(--space-12);
}

@media (min-width: 768px) {
  .templates-showcase__header {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
}

.templates-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}

@media (min-width: 640px) {
  .templates-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1024px) {
  .templates-grid { grid-template-columns: repeat(4, 1fr); }
}

.template-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  overflow: hidden;
  transition: box-shadow var(--transition-med), transform var(--transition-med);
  display: flex;
  flex-direction: column;
}

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

.template-card__thumb {
  aspect-ratio: 4/3;
  background: var(--color-cream);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
  border-bottom: 1px solid var(--color-border);
  position: relative;
  overflow: hidden;
}

.template-card__thumb-sheet {
  width: 100%;
  background: #fff;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  padding: 10px;
  box-shadow: var(--shadow-sm);
}

.thumb-header-line {
  height: 6px;
  background: var(--color-navy);
  border-radius: 3px;
  margin-bottom: 6px;
}

.thumb-sub-line {
  height: 3px;
  background: var(--color-border);
  border-radius: 2px;
  margin-bottom: 4px;
  width: 70%;
}

.thumb-divider {
  height: 1px;
  background: var(--color-border);
  margin: 6px 0;
}

.thumb-bubble-rows {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.thumb-bubble-row {
  display: flex;
  gap: 3px;
  align-items: center;
}

.thumb-q {
  width: 8px;
  height: 8px;
  background: var(--color-border);
  border-radius: 1px;
  flex-shrink: 0;
}

.thumb-bubble {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid var(--color-border-dark);
  flex-shrink: 0;
}

.thumb-bubble.filled {
  background: var(--color-navy);
  border-color: var(--color-navy);
}

.template-card__badge {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  padding: 3px 8px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.badge--medical { background: #FEE2E2; color: #991B1B; }
.badge--engineering { background: #DBEAFE; color: #1E40AF; }
.badge--government { background: #D1FAE5; color: #065F46; }
.badge--school { background: #FEF3C7; color: #92400E; }
.badge--subjective { background: #F3E8FF; color: #6B21A8; }

.template-card__body {
  padding: var(--space-5);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.template-card__exam {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-saffron);
  margin-bottom: var(--space-2);
}

.template-card__name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: var(--space-2);
  line-height: 1.3;
}

.template-card__desc {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  line-height: 1.55;
  margin-bottom: var(--space-5);
  flex: 1;
}

.template-card__meta {
  font-size: 0.75rem;
  color: var(--color-text-light);
  margin-bottom: var(--space-4);
}

.template-card__action {
  display: block;
  width: 100%;
  padding: 10px;
  text-align: center;
  background: var(--color-navy);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  transition: background var(--transition-fast), transform var(--transition-fast);
  min-height: 44px;
}

.template-card__action:hover {
  background: var(--color-saffron);
  color: var(--color-navy);
  transform: translateY(-1px);
}

/* ============================================================
   CTA Banner
   ============================================================ */
.cta-banner {
  padding: var(--space-20) 0;
  background: var(--color-cream);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.cta-banner__inner {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.cta-banner__title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--color-navy);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-4);
}

.cta-banner__sub {
  font-size: 1rem;
  color: var(--color-text-muted);
  line-height: 1.65;
  margin-bottom: var(--space-8);
}

.cta-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: center;
}
