/* ----------------------------------------
   Accessible Books Project Page
   Extends style.css design system
---------------------------------------- */

/* ----------------------------------------
   Section spacing
---------------------------------------- */
.ab-section { padding: 4.5rem 0; }

/* ----------------------------------------
   Hero
---------------------------------------- */
.ab-hero {
  padding: 4rem 0 4.5rem;
  background:
    radial-gradient(ellipse 80% 60% at 80% 10%, rgba(5, 150, 105, 0.07), transparent),
    radial-gradient(ellipse 50% 40% at 10% 90%, rgba(37, 99, 235, 0.06), transparent),
    #fff;
}

.ab-hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

/* Status badge */
.ab-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(5, 150, 105, 0.25);
  background: rgba(5, 150, 105, 0.08);
  color: #059669;
  font-weight: 900;
  font-size: 0.82rem;
  margin-bottom: 1.25rem;
  letter-spacing: 0.02em;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #059669;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.25);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.25); }
  50%       { box-shadow: 0 0 0 6px rgba(5, 150, 105, 0.1);  }
}

/* Hero text */
.ab-hero-title {
  font-size: 2.6rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 1.1rem;
}

.ab-title-accent {
  background: linear-gradient(135deg, #059669, #0d9488);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.ab-hero-lead {
  font-size: 1.08rem;
  line-height: 1.75;
  color: var(--text);
  font-weight: 500;
  max-width: 62ch;
  margin-bottom: 0.85rem;
  padding-left: 1rem;
  border-left: 3px solid #059669;
}

.ab-hero-sub {
  font-size: 1rem;
  color: var(--subtext);
  line-height: 1.7;
  max-width: 60ch;
  margin-bottom: 1.75rem;
}

.ab-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Terminal-style visual card */
.ab-visual-card {
  background: #0f172a;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
  border: 1px solid rgba(255,255,255,0.06);
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

.av-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.av-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.av-dot.red    { background: #ef4444; }
.av-dot.yellow { background: #f59e0b; }
.av-dot.green  { background: #10b981; }

.av-title {
  font-size: 0.78rem;
  color: #64748b;
  margin-left: 0.5rem;
}

.av-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.av-line {
  font-size: 0.85rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.av-line.dim    { color: #475569; font-style: italic; }
.av-line.success { color: #34d399; }

.av-key {
  color: #60a5fa;
  font-weight: 700;
  min-width: 4rem;
}

.av-val { color: #e2e8f0; }

/* Fake audio player */
.av-player {
  margin-top: 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 0.85rem;
}

.av-player-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  padding: 0.65rem 0.9rem;
}

.av-play {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #059669, #0d9488);
  border: none;
  color: #fff;
  font-size: 0.75rem;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.18s;
}

.av-play:hover { transform: scale(1.1); }

.av-waveform {
  display: flex;
  align-items: center;
  gap: 3px;
  flex: 1;
}

.av-waveform span {
  display: block;
  width: 3px;
  background: #334155;
  border-radius: 99px;
  animation: wave 1.2s ease-in-out infinite;
}

.av-waveform span:nth-child(1)  { height: 8px;  animation-delay: 0.0s; }
.av-waveform span:nth-child(2)  { height: 16px; animation-delay: 0.1s; }
.av-waveform span:nth-child(3)  { height: 12px; animation-delay: 0.2s; }
.av-waveform span:nth-child(4)  { height: 20px; animation-delay: 0.3s; }
.av-waveform span:nth-child(5)  { height: 10px; animation-delay: 0.4s; }
.av-waveform span:nth-child(6)  { height: 18px; animation-delay: 0.5s; }
.av-waveform span:nth-child(7)  { height: 8px;  animation-delay: 0.6s; }
.av-waveform span:nth-child(8)  { height: 14px; animation-delay: 0.7s; }
.av-waveform span:nth-child(9)  { height: 22px; animation-delay: 0.8s; }
.av-waveform span:nth-child(10) { height: 10px; animation-delay: 0.9s; }
.av-waveform span:nth-child(11) { height: 16px; animation-delay: 1.0s; }
.av-waveform span:nth-child(12) { height: 8px;  animation-delay: 1.1s; }
.av-waveform span:nth-child(13) { height: 12px; animation-delay: 0.5s; }

@keyframes wave {
  0%, 100% { background: #334155; transform: scaleY(1); }
  50%       { background: #10b981; transform: scaleY(1.6); }
}

.av-time {
  font-size: 0.75rem;
  color: #475569;
  white-space: nowrap;
}

/* ----------------------------------------
   Problem Grid
---------------------------------------- */
.problem-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
}

.problem-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.problem-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.problem-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #ef4444;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.problem-card h3 {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--text);
}

.problem-card p {
  font-size: 0.93rem;
  color: var(--subtext);
  line-height: 1.65;
}

/* ----------------------------------------
   Pipeline
---------------------------------------- */
.pipeline {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: stretch;
}

.pipeline-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.2rem;
  transform: rotate(90deg);
}

.pipeline-step {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  position: relative;
  overflow: hidden;
}

.pipeline-step::before {
  content: attr(data-num);
  position: absolute;
  top: -0.5rem;
  right: 1rem;
  font-size: 5rem;
  font-weight: 900;
  color: rgba(10, 102, 194, 0.04);
  line-height: 1;
  pointer-events: none;
}

.pipeline-num {
  font-size: 0.75rem;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: 0.08em;
}

.pipeline-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}

.pipeline-step h3 {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--text);
}

.pipeline-step p {
  font-size: 0.92rem;
  color: var(--subtext);
  line-height: 1.65;
}

.pipeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.ptag {
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: rgba(10, 102, 194, 0.08);
  border: 1px solid rgba(10, 102, 194, 0.18);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
}

/* ----------------------------------------
   Accessibility Features Grid
---------------------------------------- */
.a11y-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
}

.a11y-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.a11y-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.a11y-icon-wrap {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.a11y-icon-wrap.blue   { background: rgba(10,102,194,0.1);  color: var(--primary); border: 1px solid rgba(10,102,194,0.2);  }
.a11y-icon-wrap.purple { background: rgba(124,58,237,0.1);  color: #7c3aed;         border: 1px solid rgba(124,58,237,0.2);  }
.a11y-icon-wrap.green  { background: rgba(5,150,105,0.1);   color: #059669;         border: 1px solid rgba(5,150,105,0.2);   }
.a11y-icon-wrap.orange { background: rgba(234,88,12,0.1);   color: #ea580c;         border: 1px solid rgba(234,88,12,0.2);   }
.a11y-icon-wrap.teal   { background: rgba(13,148,136,0.1);  color: #0d9488;         border: 1px solid rgba(13,148,136,0.2);  }
.a11y-icon-wrap.red    { background: rgba(239,68,68,0.1);   color: #ef4444;         border: 1px solid rgba(239,68,68,0.2);   }

.a11y-card h3 {
  font-size: 1.02rem;
  font-weight: 900;
  color: var(--text);
}

.a11y-card p {
  font-size: 0.9rem;
  color: var(--subtext);
  line-height: 1.65;
}

.a11y-card code {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.83em;
  background: rgba(10,102,194,0.08);
  color: var(--primary);
  padding: 0.1em 0.4em;
  border-radius: 4px;
}

/* ----------------------------------------
   Tech Stack
---------------------------------------- */
.stack-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.stack-column {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow);
}

.stack-layer-title {
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--subtext);
  margin-bottom: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border);
}

.stack-layer-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.stack-layer-dot.frontend { background: var(--primary); }
.stack-layer-dot.backend  { background: #7c3aed; }
.stack-layer-dot.tts      { background: #059669; }

.stack-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.stack-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.stack-item i {
  font-size: 1.4rem;
  color: var(--primary);
  margin-top: 0.1rem;
  width: 1.5rem;
  text-align: center;
  flex-shrink: 0;
}

.stack-item strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.stack-item span {
  font-size: 0.85rem;
  color: var(--subtext);
  line-height: 1.5;
}

/* ----------------------------------------
   Personal Note
---------------------------------------- */
.ab-personal-section {
  background: var(--text);
}

.personal-note {
  max-width: 760px;
  margin: 0 auto;
  position: relative;
  padding: 1rem 0;
}

.personal-note-quote {
  font-size: 3rem;
  color: rgba(255,255,255,0.1);
  margin-bottom: 1rem;
  line-height: 1;
}

.personal-note blockquote p {
  font-size: 1.12rem;
  color: #cbd5e1;
  line-height: 1.85;
  margin-bottom: 1.1rem;
  font-style: italic;
}

.personal-note-footer {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.personal-note-footer strong {
  display: block;
  color: #f1f5f9;
  font-size: 0.95rem;
  font-weight: 900;
}

.personal-note-footer span {
  font-size: 0.82rem;
  color: #64748b;
}

/* ----------------------------------------
   Roadmap
---------------------------------------- */
.roadmap-list {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-left: 2rem;
}

.roadmap-list::before {
  content: '';
  position: absolute;
  left: 0.55rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: var(--border);
}

.roadmap-item {
  position: relative;
  padding: 0 0 1.5rem 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.roadmap-marker {
  position: absolute;
  left: -1.45rem;
  top: 0.1rem;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  color: #94a3b8;
  z-index: 1;
}

.roadmap-item.done .roadmap-marker {
  background: #059669;
  border-color: #059669;
  color: #fff;
}

.roadmap-item.active .roadmap-marker {
  background: #fff;
  border-color: var(--primary);
}

.roadmap-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  animation: pulse-dot 1.5s infinite;
  display: block;
}

.roadmap-content h4 {
  font-size: 1rem;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.roadmap-item.done .roadmap-content h4  { color: #059669; }
.roadmap-item.active .roadmap-content h4 { color: var(--primary); }

.roadmap-content p {
  font-size: 0.88rem;
  color: var(--subtext);
  line-height: 1.6;
}

/* ----------------------------------------
   CTA Section
---------------------------------------- */
.ab-cta-section {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
}

.ab-cta-inner {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.ab-cta-inner h2 {
  font-size: 2rem;
  font-weight: 900;
  color: #f1f5f9;
  letter-spacing: -0.03em;
  margin-bottom: 0.85rem;
}

.ab-cta-inner p {
  color: #94a3b8;
  font-size: 1rem;
  line-height: 1.7;
  max-width: 52ch;
  margin: 0 auto;
}

/* ----------------------------------------
   Responsive
---------------------------------------- */
@media (min-width: 640px) {
  .problem-grid   { grid-template-columns: repeat(2, 1fr); }
  .a11y-grid      { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
  .ab-hero-title  { font-size: 3.2rem; }
  .stack-layout   { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
  .ab-hero-inner {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3rem;
  }

  .pipeline {
    flex-direction: row;
    align-items: stretch;
  }

  .pipeline-arrow {
    transform: none;
    flex-shrink: 0;
  }

  .pipeline-step { flex: 1; }

  .a11y-grid { grid-template-columns: repeat(3, 1fr); }
}
