/* =============================================
   ILAW Lesson Plan Generator — Design System CSS
   Tokens match 06-design/02-design-system.md
   ============================================= */

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #0F172A;
  background: #FFFFFF;
  -webkit-font-smoothing: antialiased;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4 { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; line-height: 1.3; }
a { color: #2563EB; text-decoration: none; }
a:hover { color: #1D4ED8; text-decoration: underline; }

.section-title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
  color: #0F172A;
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
  text-decoration: none !important;
}
.btn--primary { background: #2563EB; color: #FFFFFF; }
.btn--primary:hover { background: #1D4ED8; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3); }
.btn--accent { background: #EA580C; color: #FFFFFF; }
.btn--accent:hover { background: #C2410C; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(234, 88, 12, 0.3); }
.btn--ghost { background: transparent; color: #0F172A; border: 2px solid #E2E8F0; }
.btn--ghost:hover { background: #F8FAFC; border-color: #CBD5E1; }
.btn--outline { background: transparent; color: #2563EB; border: 1px solid #E2E8F0; }
.btn--outline:hover { background: #DBEAFE; border-color: #2563EB; }
.btn--lg { padding: 1rem 2rem; font-size: 1.125rem; }
.btn--sm { padding: 0.5rem 1rem; font-size: 0.875rem; }
.btn--full { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* === NAVIGATION === */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #E2E8F0;
  height: 64px;
}
.nav__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__logo { display: flex; align-items: center; gap: 8px; text-decoration: none !important; }
.nav__logo-icon { font-size: 1.5rem; }
.nav__logo-text { font-size: 1.25rem; font-weight: 700; color: #0F172A; }
.nav__logo-accent { color: #2563EB; }
.nav__links { display: flex; align-items: center; gap: 24px; }
.nav__link { font-size: 0.875rem; font-weight: 500; color: #475569; text-decoration: none; transition: color 0.15s; }
.nav__link:hover { color: #0F172A; text-decoration: none; }
.nav__link--login { padding: 0.5rem 1rem; border: 1px solid #E2E8F0; border-radius: 8px; }
.nav__link--login:hover { background: #F8FAFC; }
.nav__btn { font-size: 0.875rem; padding: 0.5rem 1.25rem; }
.nav__hamburger { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: #0F172A; }

/* === HERO === */
.hero {
  padding: 5rem 0;
  background: linear-gradient(135deg, #F8FAFC 0%, #FFFFFF 50%, #F8FAFC 100%);
}
.hero__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 55% 42%;
  gap: 3%;
  align-items: center;
}
.hero__title { font-size: 2.5rem; font-weight: 700; line-height: 1.2; color: #0F172A; margin-bottom: 1rem; }
.hero__subtitle { font-size: 1.125rem; color: #475569; line-height: 1.6; margin-bottom: 2rem; }
.hero__actions { display: flex; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.hero__trust { display: flex; gap: 0.5rem; align-items: center; font-size: 0.875rem; color: #16A34A; font-weight: 500; flex-wrap: wrap; }

/* Hero preview mockup */
.hero__visual { position: relative; }
.hero__preview {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
  overflow: hidden;
}
.hero__preview-header {
  background: #F8FAFC;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #E2E8F0;
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.hero__preview-body { padding: 1rem; display: flex; flex-direction: column; gap: 0.75rem; }
.hero__preview-section { display: flex; flex-direction: column; gap: 0.25rem; }
.hero__preview-label { font-size: 0.75rem; font-weight: 600; color: #2563EB; text-transform: uppercase; letter-spacing: 0.03em; }
.hero__preview-value { font-size: 0.8125rem; color: #475569; line-height: 1.4; }
.hero__preview-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #16A34A;
  color: #FFFFFF;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
}

/* === BENEFITS === */
.benefits { padding: 4rem 0; background: #FFFFFF; }
.benefits__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.benefits__item { text-align: center; padding: 1.5rem; }
.benefits__icon { font-size: 2.5rem; margin-bottom: 1rem; }
.benefits__title { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.5rem; color: #0F172A; }
.benefits__desc { font-size: 0.9375rem; color: #475569; line-height: 1.6; }

/* === HOW IT WORKS === */
.how-it-works { padding: 4rem 0; background: #F8FAFC; }
.how-it-works__inner { max-width: 900px; margin: 0 auto; padding: 0 24px; }
.steps { display: flex; align-items: flex-start; justify-content: center; gap: 1rem; }
.steps__item { text-align: center; flex: 1; }
.steps__number {
  width: 48px; height: 48px;
  margin: 0 auto 1rem;
  background: #2563EB;
  color: #FFFFFF;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; font-weight: 700;
}
.steps__title { font-size: 1.125rem; font-weight: 600; margin-bottom: 0.5rem; color: #0F172A; }
.steps__desc { font-size: 0.875rem; color: #475569; line-height: 1.6; }
.steps__arrow { font-size: 2rem; color: #CBD5E1; padding-top: 1.5rem; flex-shrink: 0; }

/* === TOOL SECTION === */
.tool { padding: 5rem 0; background: #FFFFFF; }
.tool__inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.tool__layout {
  display: grid;
  grid-template-columns: 55% 42%;
  gap: 3%;
  align-items: start;
}

/* Form */
.tool__form { background: #F8FAFC; border: 1px solid #E2E8F0; border-radius: 12px; padding: 2rem; }
.form__group { margin-bottom: 1.25rem; }
.form__label { display: block; font-size: 0.875rem; font-weight: 600; color: #0F172A; margin-bottom: 0.375rem; }
.form__required { color: #DC2626; }
.form__select, .form__input, .form__textarea {
  width: 100%;
  height: 44px;
  padding: 0 0.75rem;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 0.9375rem;
  color: #0F172A;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 4px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form__select:focus, .form__input:focus, .form__textarea:focus {
  outline: none;
  border-color: #2563EB;
  box-shadow: 0 0 0 3px #DBEAFE;
}
.form__textarea { height: auto; padding: 0.75rem; resize: vertical; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form__checkboxes { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.form__checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #475569;
  cursor: pointer;
}
.form__checkbox input { width: 16px; height: 16px; accent-color: #2563EB; }

/* Preview panel */
.tool__preview {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  overflow: hidden;
  position: sticky;
  top: 80px;
}
.tool__preview-header {
  background: #F8FAFC;
  padding: 1rem;
  border-bottom: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  font-weight: 600;
  color: #475569;
}
.tool__preview-actions { display: flex; gap: 0.5rem; }
.tool__preview-body { padding: 2rem; min-height: 300px; }
.tool__preview-empty { text-align: center; padding: 3rem 1rem; }
.tool__empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.tool__empty-text { font-size: 0.9375rem; color: #94A3B8; max-width: 240px; margin: 0 auto; }
.tool__preview-loading { text-align: center; padding: 3rem; display: none; }
.tool__loader {
  width: 32px; height: 32px;
  border: 3px solid #E2E8F0;
  border-top: 3px solid #2563EB;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}
@keyframes spin { to { transform: rotate(360deg); } }
.tool__preview-error { text-align: center; padding: 3rem; display: none; }
.tool__error-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }
.tool__error-text { font-size: 0.9375rem; color: #DC2626; margin-bottom: 1rem; }

/* === AD SECTION === */
.ad-section { padding: 2rem 0; background: #F8FAFC; text-align: center; }
.ad-placeholder {
  max-width: 728px; margin: 0 auto;
  background: #E2E8F0; border-radius: 8px;
  padding: 1.5rem;
  color: #94A3B8;
  font-size: 0.875rem;
}

/* === FAQ === */
.faq { padding: 4rem 0; background: #FFFFFF; }
.faq__inner { max-width: 800px; margin: 0 auto; padding: 0 24px; }
.faq__list { display: flex; flex-direction: column; gap: 0.5rem; }
.faq__item {
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  overflow: hidden;
  background: #FFFFFF;
}
.faq__question {
  width: 100%;
  padding: 1rem 1.25rem;
  background: none;
  border: none;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #0F172A;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq__question:hover { background: #F8FAFC; }
.faq__icon { font-size: 1.25rem; color: #94A3B8; transition: transform 0.2s; }
.faq__question[aria-expanded="true"] .faq__icon { transform: rotate(45deg); }
.faq__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding: 0 1.25rem;
}
.faq__answer p { padding-bottom: 1.25rem; font-size: 0.9375rem; color: #475569; line-height: 1.7; }

/* === FINAL CTA === */
.final-cta { padding: 4rem 0; background: #F8FAFC; text-align: center; }
.final-cta__inner { max-width: 600px; margin: 0 auto; padding: 0 24px; }
.final-cta__title { font-size: 1.75rem; font-weight: 700; margin-bottom: 1.5rem; color: #0F172A; }
.final-cta__note { margin-top: 1rem; font-size: 0.9375rem; color: #475569; }
.final-cta__link { color: #EA580C; font-weight: 600; }

/* === SUPPORTER BANNER === */
.supporter-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #FFF7ED;
  border-top: 2px solid #EA580C;
  z-index: 200;
  padding: 0.75rem 0;
}
.supporter-banner__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.supporter-banner p { font-size: 0.875rem; color: #0F172A; }
.supporter-banner__close {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: #94A3B8;
  padding: 0.25rem;
}

/* === FOOTER === */
.footer { padding: 3rem 0 1.5rem; background: #0F172A; color: #94A3B8; }
.footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2rem;
}
.footer__heading { font-size: 1rem; font-weight: 600; color: #FFFFFF; margin-bottom: 1rem; }
.footer__text { font-size: 0.875rem; line-height: 1.6; margin-bottom: 1rem; }
.footer__disclaimer {
  font-size: 0.75rem;
  color: #64748B;
  line-height: 1.5;
  padding: 0.75rem;
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
}
.footer__links { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.footer__links a { color: #94A3B8; font-size: 0.875rem; text-decoration: none; }
.footer__links a:hover { color: #FFFFFF; }
.footer__bottom { border-top: 1px solid #1E293B; padding-top: 1.5rem; text-align: center; }
.footer__bottom p { font-size: 0.75rem; }

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__visual { display: none; }
  .tool__layout { grid-template-columns: 1fr; }
  .tool__preview { position: static; margin-top: 1.5rem; }
  .steps { flex-direction: column; align-items: center; }
  .steps__arrow { transform: rotate(90deg); padding: 0.5rem 0; }
}

@media (max-width: 768px) {
  .nav__links { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: white; padding: 1rem; border-bottom: 1px solid #E2E8F0; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
  .nav__links--open { display: flex; }
  .nav__hamburger { display: block; }
  
  .hero { padding: 3rem 0; }
  .hero__title { font-size: 1.75rem; }
  .hero__actions { flex-direction: column; }
  
  .benefits__inner { grid-template-columns: 1fr; gap: 1rem; }
  
  .form__row { grid-template-columns: 1fr; }
  .form__checkboxes { grid-template-columns: 1fr; }
  
  .faq__question { font-size: 0.9375rem; }
  
  .footer__inner { grid-template-columns: 1fr; gap: 2rem; }
  
  .final-cta__title { font-size: 1.375rem; }
}

@media (max-width: 640px) {
  .hero__title { font-size: 1.5rem; }
  .section-title { font-size: 1.5rem; margin-bottom: 2rem; }
}
