/* ====================================================
   myPBD Assistant — Official Tutorial Design System
   Style: Modern Professional (shadcn Rose & Slate Warm)
   Typography: Poppins (Headings) & Open Sans (Body)
   ==================================================== */

/* ── Custom Properties & Tokens ───────── */
:root {
  --primary: #be123c;          /* Deep Rose 700 */
  --primary-light: #e11d48;    /* Rose 600 */
  --primary-dark: #9f1239;     /* Rose 800 */
  --primary-glow: rgba(190, 18, 60, 0.15);

  --secondary: #0f172a;        /* Slate 900 */
  --secondary-light: #334155;  /* Slate 700 */

  --bg: #f8fafc;               /* Slate 50 */
  --card: #ffffff;
  --border: #e2e8f0;           /* Slate 200 */
  --text: #0f172a;             /* Slate 900 */
  --text-muted: #64748b;       /* Slate 500 */
  --text-light: #ffffff;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  
  --t-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset & Base Styles ───────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* Offset for sticky nav */
}

body {
  font-family: 'Open Sans', -apple-system, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Poppins', -apple-system, sans-serif;
  font-weight: 700;
  color: var(--secondary);
  line-height: 1.25;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--t-fast);
}

a:hover {
  color: var(--primary-light);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Typography & Section Headers ───────── */
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 60px;
}

.section-header h2 {
  font-size: 2.25rem;
  margin-bottom: 16px;
  position: relative;
  display: inline-block;
}

.section-header h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--primary);
  border-radius: 2px;
}

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

/* ── Buttons ───────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--r-md);
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-fast);
}

.btn-primary {
  background: var(--primary);
  color: var(--text-light);
  border: 1px solid var(--primary-dark);
  box-shadow: 0 4px 12px rgba(190, 18, 60, 0.2);
}

.btn-primary:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(190, 18, 60, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: transparent;
  color: var(--secondary-light);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: #f1f5f9;
  border-color: var(--secondary-light);
  color: var(--secondary);
}

/* ── Sticky Navbar ───────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  transition: all var(--t-fast);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
}

.brand-name {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--secondary);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--secondary-light);
  transition: color var(--t-fast);
}

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

.btn-github {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--secondary);
  color: var(--text-light);
  padding: 8px 16px;
  border-radius: var(--r-md);
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
}

.btn-github:hover {
  background: var(--secondary-light);
  color: var(--text-light);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  width: 24px;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--secondary);
  transition: all var(--t-fast);
}

/* ── Hero Section ───────── */
.hero {
  padding: 80px 0 100px;
  background: radial-gradient(circle at 80% -20%, rgba(190, 18, 60, 0.04) 0%, transparent 60%);
  overflow: hidden;
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 60px;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.badge-new {
  display: inline-block;
  background: var(--primary-glow);
  color: var(--primary);
  border: 1px solid rgba(190, 18, 60, 0.2);
  border-radius: var(--r-pill);
  padding: 4px 16px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero-content h1 {
  font-size: 3rem;
  line-height: 1.15;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.hero-desc {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-bottom: 36px;
  max-width: 540px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ── Device/Browser Mockup Frame ───────── */
.browser-frame {
  background: var(--card);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.12);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.browser-header {
  background: #f1f5f9;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.browser-header .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.browser-header .dot:nth-child(1) { background: #ef4444; }
.browser-header .dot:nth-child(2) { background: #eab308; }
.browser-header .dot:nth-child(3) { background: #22c55e; }

.address-bar {
  flex-grow: 1;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 4px 12px;
  font-family: inherit;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  margin-left: 12px;
}

.browser-content {
  width: 100%;
  height: auto;
  display: block;
}

/* ── Features Section ───────── */
.features-section {
  padding: 100px 0;
  background-color: #ffffff;
  border-top: 1px solid var(--border);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 36px 28px;
  transition: all var(--t-normal);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: rgba(190, 18, 60, 0.2);
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.05), 0 10px 10px -5px rgba(0,0,0,0.02);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.feature-icon.p1-icon { background: #fdf2f8; color: #db2777; }
.feature-icon.p2-icon { background: #fff1f2; color: #e11d48; }
.feature-icon.p3-icon { background: #f5f3ff; color: #7c3aed; }
.feature-icon.pk-icon { background: #eff6ff; color: #2563eb; }

.feature-card h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ── Setup Section & Timeline ───────── */
.setup-section {
  padding: 100px 0;
  background-color: var(--bg);
  border-top: 1px solid var(--border);
}

.setup-timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px 0;
}

.setup-timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 24px;
  height: 100%;
  width: 2px;
  background: var(--border);
  z-index: 1;
}

.setup-step {
  position: relative;
  margin-bottom: 60px;
  padding-left: 80px;
  z-index: 2;
}

.setup-step:last-child {
  margin-bottom: 0;
}

.step-number {
  position: absolute;
  left: 0;
  top: 0;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--secondary);
  color: var(--text-light);
  font-family: 'Poppins', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 4px solid var(--bg);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transition: all var(--t-fast);
  z-index: 3;
}

.setup-step:hover .step-number {
  background: var(--primary);
  transform: scale(1.1);
}

.step-content {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 30px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.step-content h3 {
  font-size: 1.35rem;
  margin-bottom: 12px;
}

.step-content p {
  color: var(--text-muted);
  margin-bottom: 20px;
  font-size: 1rem;
}

.step-media {
  max-width: 100%;
  margin-top: 16px;
}

.step-media.sm-media {
  max-width: 320px;
}

.inline-link {
  font-weight: 600;
  border-bottom: 1px dashed var(--primary);
}

.info-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #fff8f8;
  border-left: 4px solid var(--primary);
  padding: 16px;
  border-radius: var(--r-sm);
  margin-top: 16px;
}

.alert-icon {
  color: var(--primary);
  flex-shrink: 0;
}

.info-alert span {
  font-size: 0.9rem;
  color: var(--primary-dark);
}

/* ── Substeps inside step 6 ───────── */
.sub-steps {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  border-left: 2px dashed var(--border);
  padding-left: 20px;
}

.sub-step {
  display: flex;
  gap: 16px;
}

.sub-step-num {
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  background: #f1f5f9;
  color: var(--secondary-light);
  border-radius: var(--r-sm);
  height: 28px;
  min-width: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sub-step h4 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.sub-step p {
  font-size: 0.9rem;
  margin-bottom: 0;
}

.highlight-info {
  background: #fffdf5;
  border: 1px solid #fef3c7;
  padding: 12px;
  border-radius: var(--r-sm);
  font-size: 0.9rem !important;
  color: #b45309 !important;
  margin-top: 10px;
}

/* ── CTA Section ───────── */
.cta-section {
  padding: 100px 0;
  background: linear-gradient(135deg, var(--secondary), var(--secondary-light));
  color: var(--text-light);
  text-align: center;
}

.cta-section h2 {
  color: var(--text-light);
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.cta-section p {
  color: #cbd5e1;
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto 36px;
}

.btn-large {
  padding: 16px 36px;
  font-size: 1.1rem;
}

/* ── Footer ───────── */
.footer {
  background-color: #0b0f19;
  color: #94a3b8;
  padding: 80px 0 20px;
  border-top: 1px solid #1e293b;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: 60px;
  margin-bottom: 60px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-logo-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-logo {
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
}

.footer-logo-wrap span {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-light);
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.5;
}

.footer-links h4, .footer-source h4 {
  color: var(--text-light);
  font-size: 1rem;
  margin-bottom: 24px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  color: #94a3b8;
  font-size: 0.95rem;
}

.footer-links a:hover {
  color: var(--primary-light);
}

.footer-source p {
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.footer-github-link {
  display: inline-block;
  color: var(--text-light);
  font-weight: 600;
  border-bottom: 1px solid var(--primary);
  padding-bottom: 2px;
}

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 20px;
  text-align: center;
  font-size: 0.85rem;
}

/* ── Responsive Styling ───────── */
@media (max-width: 968px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  
  .hero-content {
    align-items: center;
  }
  
  .hero-content h1 {
    font-size: 2.25rem;
  }
  
  .hero-actions {
    justify-content: center;
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
  
  .footer-brand {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 12px 0;
  }
  
  .nav-menu {
    display: none; /* Controlled by mobile JS */
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--card);
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
  }
  
  .nav-menu.active {
    display: flex;
  }
  
  .nav-toggle {
    display: flex;
  }
  
  .nav-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  
  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .nav-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
  
  .section-header h2 {
    font-size: 1.75rem;
  }
  
  .setup-timeline::before {
    left: 16px;
  }
  
  .setup-step {
    padding-left: 50px;
  }
  
  .step-number {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
  
  .step-content {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 1.85rem;
  }
  
  .hero-actions .btn {
    width: 100%;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-brand {
    grid-column: span 1;
  }
}
