/* ==========================================================================
   StoryLab Design System
   Dark theme CSS for nonprofit podcast studio websites
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Custom Properties
   -------------------------------------------------------------------------- */

:root {
  --color-bg: #1C1917;
  --color-surface: #292524;
  --color-primary: #C2634E;
  --color-secondary: #D4A853;
  --color-text: #F5F0EB;
  --color-muted: #A8A29E;
  --color-border: #44403C;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 1120px;
  --radius: 10px;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* --------------------------------------------------------------------------
   2. Reset & Base
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-family);
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --------------------------------------------------------------------------
   3. Typography
   -------------------------------------------------------------------------- */

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--color-text);
  margin-top: 0;
  margin-bottom: 0.5em;
  line-height: 1.2;
}

h1 {
  font-size: 1.8rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.4rem;
}

h4 {
  font-size: 1.15rem;
}

p {
  margin-top: 0;
  margin-bottom: 1rem;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   4. Layout
   -------------------------------------------------------------------------- */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 3rem 0;
}

.section-alt {
  background-color: var(--color-surface);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.grid-3,
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

/* --------------------------------------------------------------------------
   5. Navigation
   -------------------------------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
}

.nav-logo img {
  height: 25px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.nav-link {
  display: inline-block;
  padding: 0.5rem 0.5rem;
  color: var(--color-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.2s;
  border-radius: var(--radius);
}

.nav-link:hover {
  color: var(--color-text);
  text-decoration: none;
}

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

/* Last nav-link styled as CTA button */
.nav-links li:last-child .nav-link {
  background-color: var(--color-primary);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-weight: 600;
}

.nav-links li:last-child .nav-link:hover {
  filter: brightness(1.15);
}

/* Mobile hamburger toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-text);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

@media (max-width: 1023px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    background-color: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 1.5rem;
    gap: 0;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-link {
    display: block;
    padding: 0.75rem 0;
    width: 100%;
  }

  .nav-links li:last-child .nav-link {
    display: inline-block;
    width: auto;
    margin-top: 0.5rem;
  }
}

/* --------------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------------- */

.hero {
  text-align: center;
  padding: 2rem 0 3rem;
}

.hero-logo {
  max-width: 420px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 1.5rem;
}

.hero h1 {
  margin-bottom: 0.5rem;
}

.hero .badge {
  display: inline-block;
  background-color: var(--color-secondary);
  color: #1C1917;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.hero .subhead {
  color: var(--color-muted);
  font-size: 1.15rem;
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.hero-image {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* --------------------------------------------------------------------------
   7. Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
  line-height: 1.4;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background-color: var(--color-primary);
  color: #fff;
}

.btn-primary:hover {
  filter: brightness(1.15);
  color: #fff;
}

.btn-secondary {
  background-color: transparent;
  border: 2px solid var(--color-primary);
  color: var(--color-text);
}

.btn-secondary:hover {
  background-color: var(--color-primary);
  color: #fff;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

/* --------------------------------------------------------------------------
   8. Cards
   -------------------------------------------------------------------------- */

.card {
  background-color: var(--color-surface);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  padding: 1.5rem;
  transition: border-color 0.2s, transform 0.2s;
}

.card:hover {
  border-color: var(--color-muted);
  transform: translateY(-2px);
}

.card h3 {
  margin-top: 0;
}

.card p {
  color: var(--color-muted);
}

/* --------------------------------------------------------------------------
   9. Steps
   -------------------------------------------------------------------------- */

.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: step-counter;
}

.step {
  position: relative;
  padding-left: 3.5rem;
  margin-bottom: 2rem;
  counter-increment: step-counter;
}

.step::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 0;
  width: 2.5rem;
  height: 2.5rem;
  background-color: var(--color-primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
}

.step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 1.2rem;
  top: 2.5rem;
  bottom: -0.5rem;
  width: 2px;
  background-color: var(--color-border);
}

.step h3 {
  margin-top: 0;
}

.step p {
  color: var(--color-muted);
}

/* --------------------------------------------------------------------------
   10. FAQ Accordion
   -------------------------------------------------------------------------- */

.faq-item {
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 0;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  background: none;
  border: none;
  color: var(--color-text);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.5rem 0;
  text-align: left;
  font-family: inherit;
  line-height: 1.4;
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--color-muted);
  transition: transform 0.2s;
  flex-shrink: 0;
  margin-left: 1rem;
}

.faq-item.open .faq-question::after {
  content: '\2212';
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.open .faq-answer {
  max-height: 500px;
}

.faq-answer p {
  color: var(--color-muted);
  padding-bottom: 0.5rem;
}

/* --------------------------------------------------------------------------
   11. Pricing
   -------------------------------------------------------------------------- */

.pricing-tier {
  background-color: var(--color-surface);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  overflow: hidden;
}

.pricing-tier.featured {
  border-color: var(--color-secondary);
}

.pricing-header {
  padding: 1.5rem;
  text-align: center;
}

.pricing-tier.featured .pricing-header {
  border-bottom: 3px solid var(--color-secondary);
}

.pricing-price {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.2;
}

.pricing-price span {
  font-size: 1rem;
  color: var(--color-muted);
  font-weight: 400;
}

.pricing-features {
  padding: 0 1.5rem 1.5rem;
  list-style: none;
  margin: 0;
}

.pricing-features li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-muted);
}

.pricing-features li:last-child {
  border-bottom: none;
}

.pricing-features li::before {
  content: '\2713';
  color: var(--color-primary);
  margin-right: 0.5rem;
  font-weight: 700;
}

.pricing-cta {
  padding: 0 1.5rem 1.5rem;
  text-align: center;
}

.pricing-cta .btn {
  width: 100%;
  justify-content: center;
}

/* --------------------------------------------------------------------------
   12. Add-on List
   -------------------------------------------------------------------------- */

.add-on-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.add-on-item {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-border);
}

.add-on-item:last-child {
  border-bottom: none;
}

.add-on-price {
  color: var(--color-muted);
  white-space: nowrap;
  margin-left: 1rem;
}

/* --------------------------------------------------------------------------
   13. Stats
   -------------------------------------------------------------------------- */

.stat-counter {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--color-muted);
}

/* --------------------------------------------------------------------------
   14. Photo Grid
   -------------------------------------------------------------------------- */

.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.photo-placeholder {
  aspect-ratio: 16 / 9;
  background-color: var(--color-surface);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--color-muted);
  font-size: 0.9rem;
}

.photo-placeholder svg {
  width: 48px;
  height: 48px;
  opacity: 0.5;
  margin-bottom: 0.5rem;
}

.photo-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
}

/* --------------------------------------------------------------------------
   14b. People Grid
   -------------------------------------------------------------------------- */

.people-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.person-card {
  background-color: var(--color-surface);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  padding: 2rem 1.5rem;
  text-align: center;
}

.person-photo {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1.25rem;
  display: block;
}

.person-placeholder {
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.person-card h3 {
  margin-bottom: 0.25rem;
}

.person-title {
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.person-bio {
  color: var(--color-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.person-linkedin {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
}

@media (max-width: 639px) {
  .people-grid {
    grid-template-columns: 1fr;
  }
}

.photo-card {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
}

.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.5rem 0.75rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  color: var(--color-text);
  font-size: 0.85rem;
}

/* --------------------------------------------------------------------------
   15. Forms
   -------------------------------------------------------------------------- */

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--color-text);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--color-muted);
  opacity: 0.7;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(194, 99, 78, 0.2);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23A8A29E' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 400;
  cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
  width: auto;
  accent-color: var(--color-primary);
}

.form-status {
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: var(--radius);
}

.form-status.success {
  background-color: rgba(76, 175, 80, 0.15);
  color: #81c784;
}

.form-status.error {
  background-color: rgba(244, 67, 54, 0.15);
  color: #e57373;
}

/* --------------------------------------------------------------------------
   16. Footer
   -------------------------------------------------------------------------- */

.footer {
  background-color: #141211;
  border-top: 1px solid var(--color-border);
  padding: 3rem 0 2rem;
  margin-top: 4rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.footer-brand {
  /* First column: logo and tagline */
}

.footer-brand img {
  height: 32px;
  width: auto;
  margin-bottom: 0.75rem;
}

.footer-tagline {
  color: var(--color-muted);
  font-size: 0.9rem;
}

.footer-heading {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-muted);
  margin-bottom: 1rem;
  font-weight: 600;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--color-muted);
  transition: color 0.2s;
  font-size: 0.95rem;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--color-text);
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid var(--color-border);
  margin-top: 2rem;
  padding-top: 1.5rem;
  text-align: center;
  color: var(--color-muted);
  font-size: 0.85rem;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* --------------------------------------------------------------------------
   17. Utilities
   -------------------------------------------------------------------------- */

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

.text-muted {
  color: var(--color-muted);
}

.text-accent {
  color: var(--color-primary);
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 2rem; }
.mt-4 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 2rem; }
.mb-4 { margin-bottom: 3rem; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   18. Responsive Breakpoints
   -------------------------------------------------------------------------- */

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

  .form-row {
    grid-template-columns: 1fr 1fr;
  }

  .photo-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Desktop (1024px) */
@media (min-width: 1024px) {
  h1 {
    font-size: 2.8rem;
  }

  .hero h1 {
    font-size: 2.8rem;
  }

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

  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-inner {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}
