/* styles.css */
/* Import friendly fonts */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&family=Source+Code+Pro:ital,wght@0,200..900;1,200..900&display=swap');

/* Color Palette - Warm & Scientific */
:root {
  --warm-orange: #E8A557;
  --soft-orange: #F4C584;
  --peach-background: #F4E8D8;
  --cream-white: #FFF8F0;
  --dark-brown: #3D2817;
  --medium-brown: #6B5444;
  --light-brown: #9B8474;
  --hybit-gray: #8B92A0;
  --teal-accent: #5BA69C;
  --success-green: #6BBF59;
  --warning-red: #E85D75;

  /* WCAG AA accessible darker variants for text on cream background */
  --teal-darker: #3A7A70;
  /* 4.5:1 contrast ratio - for normal text */
  --orange-darker: #C17D2E;
  /* 3.1:1 contrast ratio - for large bold text on cream */
  --orange-darkest: #8B5A1F;
  /* 4.5:1 contrast ratio - for normal text on peach */
  --success-darker: #16a34a;
  /* Darker green for success messages - 4.5:1 for normal text */
  --success-green-accessible: #4A9D3F;
  /* 3.1:1 contrast for large bold text */
  --error-darker: #dc2626;
  /* Darker red for error messages */

  --shadow-sm: 0 4px 6px rgba(61, 40, 23, 0.06);
  --shadow-md: 0 8px 12px rgba(61, 40, 23, 0.08);
  --radius: 16px;
  --radius-lg: 24px;
  --readable-width: 75ch;
  --readable-width-narrow: 65ch;
  --readable-width-wide: 85ch;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Nunito', system-ui, sans-serif;
  background: linear-gradient(135deg, var(--peach-background) 0%, #F9F2E7 100%);
  color: var(--dark-brown);
  line-height: 1.7;
  min-height: 100vh;
}

/* Skip link for keyboard accessibility */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  background: var(--dark-brown);
  color: var(--cream-white);
  padding: .5rem .75rem;
  border-radius: 4px;
  z-index: 9999;
  text-decoration: none;
  font-weight: 600;
}

/* Header with HyBit */
.header {
  background: var(--cream-white);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: clamp(1rem, 4vw, 2rem);
  margin-bottom: 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: min(400px, 150vw);
  height: min(400px, 150vw);
  background: radial-gradient(circle, var(--warm-orange) 0%, transparent 70%);
  opacity: 0.08;
}

.header-content {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
}

.hybit-welcome {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.hybit-avatar {
  width: 120px;
  height: 120px;
  background: linear-gradient(135deg, var(--hybit-gray) 0%, #A1A8B5 100%);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  position: relative;
  /* animation: gentle-float 4s ease-in-out infinite; */
}

.hybit-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hybit-avatar::after {
  content: '🟠';
  position: absolute;
  top: -10px;
  right: -10px;
  font-size: 1.5rem;
  /* animation: pulse 2s ease-in-out infinite; */
}

@keyframes gentle-float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.2);
  }
}

/* Performance easter egg */
@keyframes spin360 {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* HyBit Insights - Avatar Animation */
.hybit-avatar.hybit-mode {
  animation: spin360 2s ease-in-out;
}

/* HyBit Insights - Insights Box Image Animation */
.hap-note-callout .hap-note-image.spinning {
  animation: spin360 1s ease-in-out;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .hap-note-callout .hap-note-image.spinning {
    animation: flash 0.3s ease-in-out;
  }

  @keyframes flash {

    0%,
    100% {
      opacity: 1;
    }

    50% {
      opacity: 0.7;
    }
  }
}

/* HyBit Insights Dialog */
.hybit-insight-dialog {
  max-width: 600px;
  width: 90%;
  margin: auto;
  border: 3px solid var(--warm-orange);
  border-radius: var(--radius-lg);
  padding: 0;
  box-shadow: 0 20px 60px rgba(61, 40, 23, 0.25);
  background: var(--cream-white);
  inset: 0;
}

.hybit-insight-dialog::backdrop {
  background: rgba(61, 40, 23, 0.5);
  -webkit-backdrop-filter: blur(4px);
  /* Safari support */
  backdrop-filter: blur(4px);
}

.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  background: linear-gradient(135deg, var(--soft-orange) 0%, var(--warm-orange) 100%);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.hybit-badge {
  background: white;
  border-radius: 50%;
  padding: 0.5rem;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hybit-badge img {
  border-radius: 50%;
}

.dialog-close {
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: clamp(20px, 3vw, 24px);
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--dark-brown);
  font-weight: bold;
}

.dialog-close:hover {
  background: white;
  transform: scale(1.1);
}

.dialog-content {
  padding: 2rem;
  max-height: 60vh;
  overflow-y: auto;
}

.dialog-content h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--dark-brown);
}

.dialog-content p {
  margin-bottom: 1rem;
  line-height: 1.7;
}

.dialog-content code {
  background: rgba(232, 165, 87, 0.15);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-family: monospace;
  font-size: clamp(0.85em, 1.5vw, 0.9em);
  color: var(--dark-brown);
  word-break: break-word;
  overflow-wrap: break-word;
}

.dialog-content ul {
  margin: 1rem 0;
  padding-left: 1.5rem;
  list-style-type: disc;
}

.dialog-content li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

h1 {
  color: var(--warm-orange);
  font-size: clamp(1.75rem, 4vw + 1rem, 2.5rem);
  font-weight: 800;
  margin-bottom: 0.5rem;
}

h2 {
  font-size: clamp(1.3rem, 3vw + 0.5rem, 1.8rem);
  font-weight: 700;
}

h3 {
  font-size: clamp(1.1rem, 2.5vw + 0.5rem, 1.5rem);
  font-weight: 600;
}

h4 {
  font-size: clamp(1rem, 2vw + 0.5rem, 1.25rem);
  font-weight: 600;
}

.subtitle {
  color: var(--medium-brown);
  font-size: clamp(1rem, 2vw + 0.5rem, 1.25rem);
  margin-bottom: 1rem;
}

.intro-box {
  background: var(--peach-background);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 2rem auto;
  max-width: 800px;
  border: 2px solid var(--soft-orange);
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.intro-hap-image {
  flex-shrink: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.intro-text {
  flex: 1;
}

/* Timeline card heading styling with better dash treatment */
.timeline-heading {
  display: flex;
  align-items: center;
  line-height: 1;
  flex-wrap: wrap;
}

.timeline-heading .insight-icon {
  font-size: 1.5em;
}

.timeline-heading .timeline-semester {
  color: var(--primary-orange);
  font-weight: 600;
}

.timeline-heading .timeline-dash {
  color: var(--light-brown);
  font-weight: 300;
  margin: 0 0.25rem;
}

.timeline-heading .timeline-course {
  color: var(--dark-brown);
  font-weight: 600;
  width: 100%;
  text-align: center;
}

/* HAP Note Callout */
.hap-note-callout {
  background: linear-gradient(135deg, var(--cream-white) 0%, var(--peach-background) 100%);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 2rem auto;
  border: 2px solid var(--warm-orange);
  display: flex;
  gap: 1.5rem;
  align-items: center;
  justify-content: center;
  max-width: 900px;
}

.hap-note-image {
  flex-shrink: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.hap-note-content {
  flex: 1;
}

.hap-note-content h3 {
  color: var(--dark-brown);
  margin-bottom: 0.5rem;
  font-size: clamp(1.1rem, 2vw + 0.5rem, 1.25rem);
  margin-inline: auto;
}

.hap-note-content p {
  color: var(--medium-brown);
  line-height: 1.6;
  margin-inline: auto;
}

/* Responsive: Stack on mobile, image on right for desktop */
@media (min-width: 769px) {
  .intro-box {
    flex-direction: row-reverse;
  }
}

@media (max-width: 768px) {

  .intro-box,
  .hap-note-callout {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
  }


  .intro-hap-image,
  .hap-note-image {
    margin-bottom: 1rem;
  }
}

.bordered-box {
  margin-top: 1.5rem;
  padding: 1rem;
  border: 2px solid;
  border-color: var(--peach-background);
  border-radius: 8px;
}

/* Navigation Tabs */
.nav-tabs {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.nav-tab {
  padding: 0.75rem 1.5rem;
  min-height: 80px;
  background: var(--cream-white);
  color: var(--dark-brown);
  border: 2px solid var(--soft-orange);
  border-radius: var(--radius);
  font-size: clamp(0.9rem, 2vw + 0.5rem, 1.2rem);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.nav-tab:hover {
  background: var(--soft-orange);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.nav-tab.active {
  background: var(--warm-orange);
  color: var(--dark-brown);
  border-color: var(--warm-orange);
}

/* Content Container */
.content-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem);
}

/* Tab Panels */
.tab-panel {
  display: none;
  animation: fadeIn 0.5s ease;
}

.tab-panel.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Overview Section */
.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.insight-card {
  background: var(--cream-white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.insight-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--soft-orange);
  transform: translateY(-4px);
}

.insight-card h3 {
  color: var(--dark-brown);
  margin-bottom: 1rem;
  font-size: clamp(1.2rem, 2.5vw + 0.5rem, 1.5rem);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.insight-icon {
  font-size: clamp(1.2rem, 2.5vw + 0.5rem, 1.5rem);
}

/* Poem Analysis Sections */
.topic-section {
  background: var(--cream-white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin: 2rem 0;
  box-shadow: var(--shadow-md);
}

.topic-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 3px solid var(--peach-background);
}

.topic-icon {
  width: 60px;
  height: 60px;
  background: var(--soft-orange);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.2rem, 2.5vw + 0.5rem, 1.5rem);
}

.topic-title {
  flex: 1;
}

.topic-title h2 {
  color: var(--dark-brown);
  font-size: clamp(1.4rem, 3.5vw + 0.5rem, 1.8rem);
  margin-bottom: 0.25rem;
}

.topic-author {
  color: var(--medium-brown);
  font-style: italic;
}

.analysis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(400px, 100%), 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.analysis-point {
  background: var(--peach-background);
  border-radius: var(--radius);
  padding: 1.5rem;
  border-left: 4px solid var(--warm-orange);
}

.analysis-point h3 {
  color: var(--dark-brown);
  margin-bottom: 0.5rem;
  font-size: clamp(1rem, 2vw + 0.5rem, 1.1rem);
}

/* Optimal paragraph line length for readability */
.topic-section p,
.content-section p {
  max-width: var(--readable-width);
}

/* Narrower for emphasis boxes */
.analysis-point p {
  max-width: var(--readable-width-narrow);
}

/* Wider for introduction */
.intro-text p {
  max-width: var(--readable-width-wide);
  text-align: left;
}

.prompt-box {
  background: linear-gradient(135deg, #4A3F36 0%, #6B5444 100%);
  color: var(--cream-white);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 1.5rem 0;
  font-family: 'Courier New', monospace;
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  word-break: break-word;
  overflow-wrap: break-word;
}

.prompt-box::before {
  content: '✨';
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  opacity: 0.5;
}

.prompt-label {
  font-size: clamp(0.8rem, 1.5vw, 0.875rem);
  opacity: 0.8;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Interactive Demo */

.interactive-demo {
  max-width: var(--readable-width);
  margin-inline: auto;
}

/* Tips Section */
.tips-container {
  background: var(--cream-white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin: 2rem 0;
  box-shadow: var(--shadow-md);
}

.tip-card {
  background: linear-gradient(135deg, var(--teal-accent) 0%, #4A9589 100%);
  color: var(--cream-white);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 1rem 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  align-items: start;
}

.tip-number {
  width: 2.5rem;
  height: 2.5rem;
  background: var(--cream-white);
  color: var(--teal-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: clamp(1rem, 2vw + 0.5rem, 1.2rem);
  flex-shrink: 0;
}

/* Hub Page Utility Classes */
.section-heading-centered {
  text-align: center;
  color: var(--dark-brown);
  margin-bottom: 2rem;
}

.station-card-link {
  text-decoration: none;
  color: inherit;
}

.station-description {
  margin-top: 0.5rem;
  color: var(--medium-brown);
}

.station-cta {
  margin-top: 1rem;
  font-weight: 600;
  color: var(--teal-darker);
  /* WCAG AA compliant: 4.5:1 contrast ratio */
}

.footer-tagline {
  color: var(--medium-brown);
  margin-top: 0.5rem;
}

/* Footer */
.footer {
  background: var(--cream-white);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 2rem;
  margin-top: 4rem;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.footer-copyright {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--peach-background);
  text-align: left;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.footer-hybit {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.footer-copyright p {
  color: var(--medium-brown);
  /* Changed from light-brown for WCAG AA compliance: 5.31:1 contrast ratio */
  font-size: clamp(0.85rem, 1.5vw, 0.9rem);
  margin: 0.25rem 0;
  line-height: 1.5;
}

/* Image Styling */
.image-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 2rem 0;
  padding: 2rem;
  background: var(--peach-background);
  border-radius: var(--radius);
  border: 2px solid var(--soft-orange);
}

.topic-image {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  border: 3px solid var(--cream-white);
  transition: all 0.3s ease;
}

.topic-image:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-md);
}

.image-caption {
  text-align: center;
  margin-top: 1rem;
  padding: 1rem;
  background: var(--cream-white);
  border-radius: var(--radius);
  border-left: 4px solid var(--warm-orange);
}

.image-caption h4 {
  color: var(--dark-brown);
  margin-bottom: 0.5rem;
  font-size: clamp(1rem, 2vw + 0.5rem, 1.1rem);
}

.image-caption p {
  color: var(--medium-brown);
  font-size: clamp(0.85rem, 1.5vw, 0.9rem);
}

.warning-box {
  background: linear-gradient(135deg, #FFF3CD 0%, #FFE8A1 100%);
  border: 2px solid #F4C584;
  border-left: 6px solid #E8A557;
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 2rem 0;
}

.warning-box h3 {
  color: var(--dark-brown);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.warning-box ul {
  list-style-position: inside;
  margin-top: 1rem;
  color: var(--dark-brown);
}

.warning-box li {
  margin: 0.5rem 0;
}

.single-image-container {
  text-align: center;
  margin: 2rem 0;
  padding: 2rem;
  background: var(--peach-background);
  border-radius: var(--radius);
  border: 2px solid var(--soft-orange);
}

/* Inter-Page Navigation */
.page-navigation {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.page-navigation.top-nav {
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.page-navigation.bottom-nav {
  margin-top: 3rem;
  margin-bottom: 2rem;
  padding-top: 2rem;
  border-top: 2px solid var(--soft-orange);
}

.nav-link {
  padding: 0.75rem 1.5rem;
  background: var(--cream-white);
  color: var(--dark-brown);
  text-decoration: none;
  border: 2px solid var(--soft-orange);
  border-radius: var(--radius);
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-block;
}

.nav-link:hover {
  background: var(--soft-orange);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.nav-link.hub-link {
  background: var(--warm-orange);
  border-color: var(--warm-orange);
}

.nav-link.hub-link:hover {
  background: var(--soft-orange);
  border-color: var(--soft-orange);
}

.page-position {
  color: var(--medium-brown);
  font-weight: 600;
  font-size: clamp(0.85rem, 1.5vw, 0.9rem);
}

/* Content Section Spacing */
.content-section {
  margin: 3rem 0;
}

/* Section Headings */
.section-heading-centered {
  text-align: center;
  color: var(--dark-brown);
  margin-bottom: 2rem;
}

/* Footer Styling */
.footer-reminder {
  color: var(--medium-brown);
  margin-top: 0.5rem;
}

/* Metrics & Statistics */
.stat-large {
  font-size: clamp(1.2rem, 2.5vw + 0.5rem, 1.5rem);
  font-weight: 700;
  color: var(--orange-darker);
  /* WCAG AA compliant for large bold text: 3.1:1 contrast ratio */
  margin: 0.5rem 0;
}

.stat-success {
  font-size: clamp(1.5rem, 3.5vw + 0.5rem, 2rem);
  font-weight: 800;
  color: var(--success-green-accessible);
  /* WCAG AA compliant for large bold text: 3.1:1 */
  margin: 1rem 0;
}

/* Link Styling for Cards */
.station-card-link {
  text-decoration: none;
  color: inherit;
}

/* Code Display */
.code-display {
  padding: 0.75rem;
  border-radius: 8px;
  margin: 1rem 0;
  font-family: monospace;
  font-size: clamp(0.8rem, 1.5vw, 0.85rem);
  overflow-x: auto;
  word-break: break-word;
  overflow-wrap: break-word;
}

/* General code and pre elements */
code,
pre {
  word-break: break-word;
  overflow-wrap: break-word;
}

pre {
  white-space: pre-wrap;
  overflow-x: auto;
}

/* Utility Classes - Spacing */

.read-length {
  max-width: var(--readable-width);
  margin-inline: auto;
}

.mt-0-5 {
  margin-top: 0.5rem;
}

.mt-1 {
  margin-top: 1rem;
}

.mt-1-5 {
  margin-top: 1.5rem;
}

.mt-2 {
  margin-top: 2rem;
}

.mt-3 {
  margin-top: 3rem;
}

.mb-0-5 {
  margin-bottom: 0.5rem;
}

.mb-1 {
  margin-bottom: 1rem;
}

.mb-1-5 {
  margin-bottom: 1.5rem;
}

.mb-2 {
  margin-bottom: 2rem;
}

/* Content Boxes */
.content-box {
  padding: 1.5rem;
  background: white;
  border-radius: 16px;
}

/* Device Demo Frames (art-direction specific) */
.device-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.device-frame {
  border: 3px solid var(--medium-brown);
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  background: white;
}

.device-frame h4 {
  text-align: center;
  color: var(--dark-brown);
  margin-bottom: 0.5rem;
}

.device-frame .device-label {
  text-align: center;
  font-size: clamp(0.85rem, 1.5vw, 0.9rem);
  color: var(--medium-brown);
  margin-bottom: 1rem;
}

.device-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.5s ease;
}

.device-caption {
  margin-top: 0.5rem;
  font-size: clamp(0.8rem, 1.5vw, 0.85rem);
  color: var(--medium-brown);
  text-align: center;
}

/* Demo Grid for Container Queries Demo */
.demo-grid-3col {
  grid-template-columns: repeat(3, 1fr);
}

/* Art Direction Demo Styles */
.demo-button-container {
  text-align: center;
  margin: 2rem 0;
}

.demo-button {
  padding: 1rem 2rem;
  font-size: clamp(1rem, 2vw + 0.5rem, 1.1rem);
  background: var(--teal-darker);
  /* WCAG AA compliant: 4.5:1 contrast with white text */
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.demo-button:hover {
  background: #4A9589;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.demo-status {
  color: var(--medium-brown);
  font-weight: 600;
}

.aspect-ratio-16-9 {
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: 8px;
  background: #f0f0f0;
}

.aspect-ratio-4-3 {
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: 8px;
  background: #f0f0f0;
}

.aspect-ratio-9-16 {
  aspect-ratio: 9/16;
  overflow: hidden;
  border-radius: 8px;
  background: #f0f0f0;
}

/* Responsive Design */

/* Small mobile devices (iPhone SE, small Android phones) */
@media (max-width: 480px) {
  .header {
    padding: 1rem;
  }

  .content-container {
    padding: 0 1rem;
  }

  .nav-tab {
    padding: 0.5rem 1rem;
    min-height: 60px;
  }

  .intro-box,
  .hap-note-callout {
    padding: 1rem;
  }

  .topic-section {
    padding: 1.5rem;
  }

  .page-navigation {
    padding: 0 1rem;
  }

  .tip-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .tip-number {
    margin: 0 auto 1rem auto;
  }
}

/* Tablets and larger mobile devices */
@media (max-width: 768px) {

  .hybit-welcome {
    flex-direction: column;
  }

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

  .nav-tabs {
    flex-direction: column;
    align-items: center;
  }

  .nav-tab {
    width: 100%;
    text-align: center;
  }

  .image-comparison {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .demo-grid-3col {
    grid-template-columns: 1fr;
  }

  .page-navigation {
    flex-direction: column;
    gap: 0.75rem;
  }

  .page-navigation.bottom-nav {
    gap: 1rem;
  }

  .nav-link {
    width: 100%;
    text-align: center;
  }

  .footer-copyright {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-hybit {
    margin-bottom: 0.5rem;
  }
}

/* Additional utility classes for inline style replacement */

/* Demo card styles for container queries demo */
.demo-card-small,
.demo-card-medium,
.demo-card-large {
  border: 2px solid var(--teal-accent);
  border-radius: 8px;
}

.demo-card-small {
  padding: 1rem;
}

.demo-card-medium {
  padding: 1.5rem;
}

.demo-card-large {
  padding: 2rem;
}

.demo-card-title {
  margin: 0 0 0.5rem 0;
  font-size: clamp(0.85rem, 1.5vw, 0.9rem);
}

.demo-card-title-large {
  margin: 0 0 0.75rem 0;
  font-size: clamp(1.1rem, 2.5vw, 1.3rem);
}

.demo-card-price {
  margin: 0;
  font-weight: 600;
  color: var(--orange-darkest);
  /* WCAG AA compliant: 4.5:1 contrast on peach background */
}

.demo-card-price-medium {
  margin: 0;
  font-weight: 600;
  font-size: clamp(1.1rem, 2vw, 1.2rem);
  color: var(--orange-darkest);
  /* WCAG AA compliant: 4.5:1 contrast on peach background */
}

.demo-card-price-large {
  margin: 0;
  font-weight: 600;
  font-size: clamp(1.3rem, 2.5vw, 1.5rem);
  color: var(--orange-darkest);
  /* WCAG AA compliant: 4.5:1 contrast on peach background */
}

.demo-card-desc {
  margin: 0.5rem 0 0 0;
  font-size: clamp(0.8rem, 1.5vw, 0.85rem);
  color: var(--medium-brown);
}

.demo-card-desc-large {
  margin: 1rem 0 0 0;
  font-size: clamp(0.95rem, 2vw, 1.05rem);
}

.demo-card-label {
  margin-top: 1rem;
  text-align: center;
  font-size: clamp(0.8rem, 1.5vw, 0.85rem);
  font-weight: 600;
}

.demo-card-medium .demo-card-label {
  margin-top: 1.5rem;
}

.demo-card-large .demo-card-label {
  margin-top: 2rem;
}

/* Code and text utilities */
.code-highlight {
  color: var(--teal-accent);
  font-weight: 600;
}

.code-comment {
  font-style: italic;
}


.image-credit {
  font-size: clamp(0.7rem, 1.2vw, 0.75rem);
  margin-top: 0.5rem;
  color: var(--medium-brown);
  /* WCAG AA compliant: 5.31:1 contrast ratio */
}

/* Stat color variants */
.stat-orange {
  color: var(--orange-darker);
  /* WCAG AA compliant for large bold text: 3.1:1 contrast ratio */
}

.stat-teal {
  color: var(--teal-darker);
  /* WCAG AA compliant: 4.5:1 contrast ratio */
}

.stat-brown {
  color: var(--medium-brown);
}

/* Text color utilities */
.text-success {
  color: var(--success-darker);
}

.text-error {
  color: var(--error-darker);
}

/* List utilities */
.list-inside {
  list-style-position: inside;
}

/* Callout boxes for special content */
.callout-box {
  background: var(--cream-white);
  border-left: 4px solid var(--teal-darker);
  padding: 1rem;
  margin-top: 1rem;
  border-radius: 8px;
  font-size: clamp(1.05rem, 2vw + 0.5rem, 1.15rem);
}

.callout-box.orange-accent {
  border-left-color: var(--warm-orange);
}

.callout-box p {
  margin: 0;
}

.callout-box p + p {
  margin-top: 0.75rem;
}

/* Student testimonials and quotes */
.student-quote {
  border-left: 4px solid var(--warm-orange);
  padding-left: 1rem;
  margin: 1rem 0;
  font-style: italic;
}

.student-quote p {
  margin: 0;
}

/* Teaching philosophy callout */
.philosophy-box {
  background: var(--cream-white);
  border-left: 4px solid var(--warm-orange);
  padding: 1rem;
  margin-top: 1.5rem;
  border-radius: 8px;
}

.philosophy-box p {
  margin: 0;
  font-style: italic;
}

.philosophy-box p:first-child {
  margin-bottom: 0.5rem;
  font-style: normal;
}

.philosophy-box p + p {
  margin-top: 0.75rem;
}

/* Insight button grid layout */
.insight-button-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

/* Typography utilities */
.text-sm {
  font-size: 0.9em;
}

.text-xs {
  font-size: 0.8em;
}

.italic {
  font-style: italic;
}

/* Desktop only: add left margin for callout boxes */
@media (min-width: 1024px) {
  .callout-box {
    margin-left: 1.5rem;
  }
}

/*
HyBit Educational Content © 2025 Cynthia Teeters.
HyBit character concept, teaching methodology, and all written content are proprietary.
Visual elements created with AI assistance.
*/