/* ═══════════════════════════════════════════
   HOME PAGE STYLES — index.html only
   Shared base styles: styles.css
═══════════════════════════════════════════ */

/* ===== BASE LAYOUT ===== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ===== HEADER ===== */
header {
  display: flex;
}

/* ===== MOBILE WARNING BANNER ===== */
.mobile-warning {
  background-color: #f0f7ff;
  border-bottom: 2px solid #3498db;
  padding: 0.75rem 1rem;
  display: none;
  width: 100%;
  box-sizing: border-box;
  animation: slideDown 0.3s ease-out;
}

.mobile-warning .warning-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.95rem;
  color: #2c3e50;
}

.mobile-warning .warning-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.mobile-warning .warning-text {
  flex: 1;
  line-height: 1.4;
}

.mobile-warning .warning-dismiss {
  background: none;
  border: none;
  color: #64748b;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.mobile-warning .warning-dismiss:hover {
  background-color: #e2e8f0;
  color: #1e293b;
}

.warning-dismiss:active {
  animation: shake 0.3s;
}

.mobile-warning.active + header {
  margin-top: 0;
}

@media (max-width: 480px) {
  .mobile-warning .warning-content {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .mobile-warning .warning-text {
    width: calc(100% - 2rem);
    order: 1;
  }

  .mobile-warning .warning-dismiss {
    order: 2;
    margin-left: auto;
  }
}

/* ===== ANIMATIONS ===== */
@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ===== STICKY NAVIGATION ===== */
.section-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  margin-bottom: 2rem;
  padding: 0.8rem 0;
  box-shadow: var(--bs-medium);
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.nav-logo {
  font-family: "Fraunces", serif;
  font-weight: 300;
  font-size: var(--fs-lg);
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.nav-logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links li {
  margin: 0;
}

.nav-link {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  border-radius: 30px;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-family: "Source Sans Pro", sans-serif;
  background: var(--lightblue-bg);
  box-shadow: var(--bs-medium);
}

.nav-link:hover {
  background: var(--cream-bg);
  color: var(--ink);
}

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

/* ===== GLOBAL HTML SETTINGS ===== */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

/* ===== SERIES INTRO ===== */
.series-intro {
  text-align: center;
  margin-bottom: 3.5rem;
  padding-bottom: 2.5rem;
}

.series-intro .kicker {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-huge);
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
  display: block;
}

.series-intro h2 {
  font-family: "Fraunces", serif;
  font-weight: 300;
  font-size: var(--fs-2xl);
  color: var(--accent-warm);
  letter-spacing: var(--ls-tighter);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.series-intro p {
  max-width: 600px;
  letter-spacing: var(--ls-massive);
  text-transform: uppercase;
  margin: 0 auto;
  font-size: var(--fs-xs);
  color: var(--muted);
  line-height: 1.8;
}

/* ===== ACCORDION / COLLAPSIBLE SECTIONS ===== */
.section-container {
  margin-bottom: 3rem;
  scroll-margin-top: 80px;
}

.section-header {
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border);
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}

.section-header:hover {
  background: var(--cream-bg);
  border-color: var(--accent);
}

.section-number {
  background: var(--primary);
  color: var(--background);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: var(--ls-widest);
  padding: 0.4rem 0.8rem;
  border-radius: 25px;
  flex-shrink: 0;
  margin-top: 2px;
}

.section-header h3 {
  font-family: "Fraunces", serif;
  font-weight: 300;
  font-size: var(--fs-xl);
  letter-spacing: var(--ls-tight);
  color: var(--primary);
  margin-bottom: 0.3rem;
}

.section-header h3 span {
  color: var(--accent);
}

.section-description {
  font-size: var(--fs-sm);
  color: var(--muted);
  line-height: 1.6;
  max-width: 500px;
}

.accordion-icon {
  margin-left: auto;
  font-size: 1.4rem;
  font-weight: 300;
  transition: transform 0.25s ease;
  color: var(--accent);
  flex-shrink: 0;
}

.section-header[aria-expanded="true"] .accordion-icon {
  transform: rotate(180deg);
}

.section-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.33, 1, 0.68, 1);
}

.section-content.open {
  max-height: 3000px;
}

.section-content .notes-grid {
  padding-top: 1.2rem;
  margin-bottom: 0.5rem;
}

/* ===== NOTES GRID ===== */
.notes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.8rem;
  margin-bottom: 2rem;
  counter-reset: card;
}

/* ===== NOTE CARD ===== */
.note-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--bs-heavy);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  position: relative;
  transition:
    transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.25s;
}

.note-card:hover {
  transform: translateY(-5px);
  border-color: var(--ink);
  box-shadow: var(--bs-heavy);
}

.card-head {
  background: color-mix(in srgb, var(--lightblue-bg) 90%, transparent);
  padding: 1.6rem 1.8rem 1.4rem;
  position: relative;
  overflow: hidden;
  counter-increment: card;
}

.card-head::after {
  content: counter(card, decimal-leading-zero);
  position: absolute;
  right: 1rem;
  bottom: -1rem;
  font-family: "Fraunces", serif;
  font-size: var(--fs-10xl);
  font-weight: 600;
  color: rgba(26, 26, 26, 0.04);
  pointer-events: none;
  line-height: 1;
}

.card-head h3 {
  font-family: "Fraunces", serif;
  font-weight: 300;
  font-size: var(--fs-lg);
  letter-spacing: var(--ls-tight);
  line-height: 1.25;
}

.card-head h3 span {
  color: var(--accent);
}

.card-subtitle {
  font-size: var(--fs-xs);
  color: var(--primary);
  font-weight: 600;
  text-transform: uppercase;
  margin-top: 0.4rem;
  letter-spacing: var(--ls-wider);
  line-height: 1.5;
}

.card-body {
  padding: 1.4rem 1.8rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.card-description {
  font-size: var(--fs-sm);
  color: var(--muted);
  line-height: 1.75;
}

/* ===== RESPONSIVE STYLES (ordered from largest to smallest) ===== */

/* Tablets and small desktops (max-width: 900px) */
@media (max-width: 900px) {
  .container {
    padding: 0 1.5rem;
  }

  .section-header h3 {
    font-size: var(--fs-2xl);
  }

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
  }

  .nav-links::-webkit-scrollbar {
    height: 3px;
  }

  .nav-links::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 12px;
  }

  .section-container {
    scroll-margin-top: 120px;
  }
}

/* Mobile landscape and tablets portrait (max-width: 750px) */
@media (max-width: 750px) {
  .container {
    padding: 0 1.2rem;
  }

  .notes-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .coming-grid {
    grid-template-columns: 1fr;
  }

  .principle-strip {
    gap: 1rem;
    padding: 1.5rem;
  }

  header h1 {
    font-size: var(--fs-3xl);
    line-height: 1.2;
  }

  .hero-tagline {
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
  }

  .hero-tagline span {
    display: block;
    text-align: center;
  }

  .section-header {
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.8rem 1rem;
    margin-bottom: 1rem;
  }

  .section-header h3 {
    font-size: var(--fs-xl);
  }

  .section-number {
    align-self: flex-start;
  }

  .section-description {
    font-size: var(--fs-xs);
  }

  .accordion-icon {
    font-size: 1.2rem;
  }

  .card-head {
    padding: 1.2rem 1.4rem;
  }

  .card-head h3 {
    font-size: var(--fs-xl);
  }

  .card-head::after {
    font-size: var(--fs-10xl);
    right: 0.5rem;
    bottom: -0.5rem;
  }

  .card-body {
    padding: 1.2rem 1.4rem;
  }

  .card-description {
    font-size: var(--fs-sm);
  }

  .card-subtitle {
    font-size: var(--fs-xs);
  }

  .ps-quote blockquote {
    font-size: var(--fs-md);
  }

  .ps-quote small {
    font-size: var(--fs-xs);
  }

  .principle-strip::before {
    font-size: var(--fs-10xl);
    right: 0.5rem;
  }

  .series-intro h2 {
    font-size: var(--fs-3xl);
  }

  .series-intro p {
    font-size: var(--fs-sm);
    padding: 0 1rem;
  }

  .section-container {
    scroll-margin-top: 140px;
  }
}

/* Small mobile devices (max-width: 480px) */
@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  header h1 {
    font-size: var(--fs-3xl);
  }

  header p {
    font-size: var(--fs-sm);
  }

  .hero-tagline span {
    font-size: var(--fs-xs);
  }

  .series-intro h2 {
    font-size: var(--fs-2xl);
  }

  .series-intro .kicker {
    font-size: var(--fs-xs);
  }

  .section-header h3 {
    font-size: var(--fs-xl);
  }

  .section-number {
    font-size: var(--fs-xs);
    padding: 0.3rem 0.6rem;
  }

  .accordion-icon {
    font-size: 1rem;
  }

  .card-head {
    padding: 1rem 1.2rem;
  }

  .card-head h3 {
    font-size: var(--fs-lg);
  }

  .card-head::after {
    font-size: var(--fs-5xl);
  }

  .card-body {
    padding: 1rem 1.2rem;
  }

  .card-description {
    font-size: var(--fs-xs);
    line-height: 1.6;
  }

  .card-subtitle {
    font-size: var(--fs-xs);
  }

  .principle-strip {
    padding: 1.2rem;
  }

  .ps-quote blockquote {
    font-size: var(--fs-sm);
  }

  .coming-card {
    padding: 1rem;
  }

  footer p {
    font-size: var(--fs-xxs);
  }

  .section-container {
    scroll-margin-top: 160px;
  }
}

/* Very small devices (max-width: 360px) */
@media (max-width: 360px) {
  .card-head h3 {
    font-size: var(--fs-md);
  }

  .card-head::after {
    font-size: var(--fs-5xl);
  }

  .series-intro h2 {
    font-size: var(--fs-xl);
  }
}

/* Mobile touch-friendly enhancements */
@media (max-width: 768px) {
  .section-header {
    -webkit-tap-highlight-color: rgba(196, 69, 54, 0.1);
  }

  .nav-link {
    -webkit-tap-highlight-color: transparent;
  }
}
