/* ========================================
   HERO SECTION
   ======================================== */

.hero {
  background: transparent;
  color: var(--deep-blue);
  padding: clamp(100px, 9vw, 120px) 0 clamp(40px, 4vw, 55px);
  position: relative;
  overflow: visible;
  z-index: 1;
  width: 100%;
  margin: 0;
}

.hero-container {
  max-width: 1320px;
  margin: 0 max(40px, calc((100% - 1320px) / 2));
  padding: clamp(40px, 5vw, 60px) clamp(40px, 6vw, 80px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(50px, 7vw, 80px);
  align-items: center;
  position: relative;
  
  /* Glass morphism effect */
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 28px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08),
              0 2px 8px rgba(0, 0, 0, 0.04);
}
html.dark-mode .hero-container {
  background: rgba(36, 36, 36, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4),
              inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
/* Left Column - Text Content */
.hero-left {
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 2.5vw, 28px);
  min-width: 0; /* Prevent grid child from overflowing its cell */
  max-width: 600px;
}

.hero-left h1 {
  font-size: clamp(2.5rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 clamp(6px, 0.8vw, 10px) 0;
  color: var(--deep-blue);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  white-space: nowrap;
}

.hero-left .tagline {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  line-height: 1.7;
  color: #4a5568;
  margin: 0 0 clamp(4px, 1vw, 8px) 0;
  max-width: 520px;
}

.hero-left .audience-tagline {
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  line-height: 1.6;
  color: #4a5568;
  margin: 0 0 clamp(8px, 1.5vw, 16px) 0;
  max-width: 520px;
}

.btn-note {
  font-size: 0.8em;
  font-weight: 400;
  opacity: 0.75;
  white-space: nowrap;
}

/* Wraps the demo button + note below it */
.demo-cta-wrap {
  display: contents;
}

#demoCta {
  position: relative;
}

.demo-cta-note {
  position: absolute;
  top: calc(100% + 5px);
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.8rem;
  color: #9aa0ac;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

html.dark-mode .demo-cta-note {
  color: #6b7280;
}

/* Feature List with Checkmarks */
.feature-list {
  list-style: none;
  padding: 0 0 0 8px;
  margin: clamp(6px, 1vw, 12px) 0;
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 1.8vw, 20px);
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(0.95rem, 1.6vw, 1.1rem);
  color: var(--deep-blue);
  line-height: 1.6;
  position: relative;
}

.feature-list li span {
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
}

.checkmark {
  width: 24px;
  height: 24px;
  min-width: 24px;
  color: var(--bright-orange);
  margin: 0;
  stroke-width: 3;
  flex-shrink: 0;
  fill: none;
  display: block;
}

/* Hero Buttons */
.hero-buttons {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: clamp(12px, 2vw, 20px);
}

.cta-primary {
  background: var(--bright-orange);
  color: white;
  padding: clamp(14px, 1.8vw, 18px) clamp(32px, 4vw, 48px);
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: clamp(0.95rem, 1.6vw, 1.1rem);
  transition: all 0.3s ease;
  box-shadow: 0 4px 14px rgba(242, 138, 99, 0.3);
  border: none;
}

.cta-primary:hover {
  background: var(--dark-orange);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(242, 138, 99, 0.4);
}

.cta-secondary {
  background: transparent;
  color: var(--deep-blue);
  padding: clamp(14px, 1.8vw, 18px) clamp(32px, 4vw, 48px);
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: clamp(0.95rem, 1.6vw, 1.1rem);
  transition: all 0.3s ease;
  border: 2px solid rgba(242, 138, 99, 0.3);
}

.cta-secondary:hover {
  border-color: var(--bright-orange);
  background: rgba(242, 138, 99, 0.05);
}

/* Platform Info */
.platform-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(0.85rem, 1.4vw, 0.95rem);
  color: #718096;
  flex-wrap: nowrap;
  margin-top: clamp(10px, 1.5vw, 16px);
}

.trial-info {
  white-space: nowrap;
}

.platform-os {
  white-space: nowrap;
}

.platform-icons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.platform-icons svg {
  width: 20px;
  height: 20px;
  color: #4a5568;
}

.platform-divider {
  font-weight: 500;
  color: #4a5568;
  margin: 0 2px;
}

.divider {
  color: #4a5568;
  margin: 0 6px;
}

/* Right Column - App Mockup */
.hero-right {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  gap: 20px;
}

/* Hero Tabs - Oblong Bubbles */
.hero-tabs {
  display: flex;
  gap: 12px;
  justify-content: center;
  width: 100%;
  max-width: 500px;
}

.hero-tab {
  flex: 1;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.6);
  border: 2px solid rgba(242, 138, 99, 0.2);
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--deep-blue);
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
  white-space: nowrap;
  text-align: center;
}

html.dark-mode .hero-tab {
  background: rgba(40, 40, 40, 0.6);
  border: 2px solid rgba(255, 154, 112, 0.3);
  color: var(--deep-blue);
}

.hero-tab:hover {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(242, 138, 99, 0.4);
  transform: translateY(-2px);
}

html.dark-mode .hero-tab:hover {
  background: rgba(50, 50, 50, 0.8);
  border-color: rgba(255, 154, 112, 0.5);
}

.hero-tab.active {
  background: var(--bright-orange);
  color: white;
  border-color: var(--bright-orange);
  box-shadow: 0 4px 12px rgba(242, 138, 99, 0.3);
}

/* Hero View Container */
.hero-view-container {
  position: relative;
  width: 100%;
  border-radius: 24px;
  display: grid;
}

/* Glowing border effect on view container */
.hero-view-container::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 24px;
  border: 2px solid transparent;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
  z-index: 10;
}

.hero-view-container.glow-active::after {
  animation: featureBorderGlow 2.5s ease-in-out forwards;
}

@keyframes featureBorderGlow {
  0% {
    opacity: 0;
    border-color: var(--mockup-accent1, rgba(242, 138, 99, 0));
    box-shadow: 0 0 0 0 var(--mockup-accent1, rgba(242, 138, 99, 0)),
                0 0 0 0 var(--mockup-accent1, rgba(242, 138, 99, 0));
  }
  50% {
    opacity: 1;
    border-color: var(--mockup-accent1, rgba(242, 138, 99, 0.3));
    box-shadow: 0 0 20px 0 var(--mockup-accent1, rgba(242, 138, 99, 0.15)),
                0 0 40px 0 var(--mockup-accent1, rgba(242, 138, 99, 0.08));
  }
  100% {
    opacity: 0;
    border-color: var(--mockup-accent1, rgba(242, 138, 99, 0));
    box-shadow: 0 0 0 0 var(--mockup-accent1, rgba(242, 138, 99, 0)),
                0 0 0 0 var(--mockup-accent1, rgba(242, 138, 99, 0));
  }
}

.hero-view {
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  height: 100%;
  border-radius: 24px;
  overflow: hidden;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  transition: none;
}

.hero-view.active {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
  transition: none;
}

/* Themes View */
.themes-container {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-radius: 16px;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}

.themes-container h3 {
  margin: 0 0 20px 0;
  font-size: 1.4rem;
  color: var(--deep-blue);
  text-align: center;
}

.themes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
  max-height: 350px;
  overflow-y: auto;
  padding: 10px;
  flex: 1;
}

/* Custom scrollbar for themes grid */
.themes-grid::-webkit-scrollbar {
  width: 8px;
}

.themes-grid::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 10px;
}

.themes-grid::-webkit-scrollbar-thumb {
  background: rgba(242, 138, 99, 0.4);
  border-radius: 10px;
}

.themes-grid::-webkit-scrollbar-thumb:hover {
  background: rgba(242, 138, 99, 0.6);
}

.theme-card {
  background: rgba(255, 255, 255, 0.8);
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  position: relative;
}

.theme-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.theme-card.selected {
  border-color: var(--bright-orange);
  border-width: 3px;
  box-shadow: 0 0 0 3px rgba(242, 138, 99, 0.2);
  animation: pulseTheme 0.5s ease;
}

@keyframes pulseTheme {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.theme-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--deep-blue);
  margin-bottom: 10px;
  text-transform: capitalize;
}

.theme-swatches {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin-bottom: 8px;
}

.theme-swatch {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.theme-mode {
  font-size: 0.75rem;
  color: #666;
  margin-top: 4px;
}

/* AI Assistant View */
.ai-container {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-radius: 16px;
  padding: 24px 30px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  text-align: center;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  box-sizing: border-box;
}

/* Features Showcase View */
.features-showcase-container {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-radius: 16px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  box-sizing: border-box;
}

.hero-features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 100%;
}

/* Hero Flip Cards */
.hero-card {
  perspective: 1000px;
  cursor: pointer;
  aspect-ratio: 1 / 1;
  position: relative;
}

.hero-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 12px;
}

.hero-card.flipped .hero-card-inner {
  transform: rotateY(180deg);
}

.hero-card-front,
.hero-card-back {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 20px;
  overflow: hidden;
  box-sizing: border-box;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  transition: box-shadow 0.3s ease;
}

.hero-card:hover .hero-card-front:not(.hero-card.flipped .hero-card-front) {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.hero-card.flipped:hover .hero-card-back {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.hero-card-front img {
  width: 44px;
  height: 44px;
  margin-bottom: 10px;
  flex-shrink: 0;
}

.hero-card-front h4,
.hero-card-back h4 {
  font-size: 1.05rem;
  margin: 0 0 10px 0;
  text-align: center;
  color: var(--deep-blue);
  font-weight: 600;
  line-height: 1.3;
}

.hero-card-front p {
  font-size: 0.875rem;
  text-align: center;
  color: #64748b;
  line-height: 1.5;
  margin: 0;
}

.hero-card-back p {
  font-size: 0.85rem;
  text-align: center;
  color: #4a5568;
  line-height: 1.55;
  margin: 0;
}

.hero-card-back {
  transform: rotateY(180deg);
}

.ai-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 16px;
  overflow: visible;
}

.ai-icon {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  object-fit: contain;
}

.ai-container h3 {
  margin: 0;
  font-size: 2rem;
  color: var(--deep-blue);
  white-space: nowrap;
}

.ai-description {
  font-size: 1.05rem;
  color: #4a5568;
  margin: 0 0 30px 0;
  line-height: 1.6;
}

.ai-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 500px;
  margin: 0 auto;
}

.ai-feature {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 12px;
  font-size: 0.95rem;
  color: var(--deep-blue);
  font-weight: 500;
  text-align: left;
}

.ai-feature-icon {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}

.hero-showcase-floating {
  display: flex;
  justify-content: center;
  align-items: center;
  transform-style: preserve-3d;
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 700px;
  height: 100%;
}

.browser-frame {
  background: transparent;
  border-radius: 0;
  padding: 0;
  width: 100%;
}

.hero-slideshow {
  border-radius: clamp(12px, 1.5vw, 16px);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  position: relative;
  width: 100%;
  height: auto;
  box-shadow: none;
}

.hero-slideshow .slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  z-index: 3;
  pointer-events: none;
  display: block;
}

.hero-slideshow .slide.active {
  opacity: 1;
  z-index: 4;
  pointer-events: auto;
}

/* Glow layers for hero images */
.glow-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  pointer-events: none;
  z-index: 0;
  transition: opacity 1s ease-in-out;
  display: none;
}

.glow-layer.orange {
  background: linear-gradient(135deg, rgba(242, 138, 99, 0.3), rgba(255, 165, 0, 0.2));
  opacity: 0;
}

.glow-layer.blue {
  background: linear-gradient(225deg, rgba(19, 42, 76, 0.3), rgba(0, 123, 255, 0.2));
  opacity: 0;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/*
  Right column uses CSS zoom for perfect proportional scaling.
  Fine-grained steps every ~50px so it feels continuous.
  Left column uses clamp() for natural text reflow.
  At 950px, content stacks and zoom resets to 1.
*/

@media (max-width: 1300px) {
  .hero-right { zoom: 0.96; }
}
@media (max-width: 1250px) {
  .hero-right { zoom: 0.92; }
}

/* Scale down flip-card content between 1251–1355px where cards are large but content clips */
@media (min-width: 1251px) and (max-width: 1355px) {
  .hero-card-front,
  .hero-card-back {
    padding: clamp(13px, 1.5vw, 18px);
  }

  .hero-card-front img {
    width: clamp(34px, 3.2vw, 42px);
    height: clamp(34px, 3.2vw, 42px);
    margin-bottom: clamp(7px, 0.7vw, 10px);
  }

  .hero-card-front h4,
  .hero-card-back h4 {
    font-size: clamp(0.88rem, 1vw, 1.02rem);
    margin-bottom: clamp(5px, 0.6vw, 9px);
  }

  .hero-card-front p,
  .hero-card-back p {
    font-size: clamp(0.76rem, 0.85vw, 0.86rem);
    line-height: 1.45;
  }

  .hero-features-grid {
    gap: clamp(10px, 1.1vw, 15px);
  }
}
@media (max-width: 1200px) {
  .hero-right { zoom: 0.88; }
}
@media (max-width: 1150px) {
  .hero-right { zoom: 0.84; }
}
@media (max-width: 1100px) {
  .hero-right { zoom: 0.80; }
}
@media (max-width: 1050px) {
  .hero-right { zoom: 0.76; }
}
@media (max-width: 1000px) {
  .hero-right { zoom: 0.73; }
}

/* Left column text scaling — smooth shrink */
@media (max-width: 1250px) {
  .hero {
    padding: clamp(80px, 9vw, 100px) 0 clamp(30px, 3vw, 45px);
  }

  .hero-container {
    padding: clamp(30px, 4vw, 50px) clamp(30px, 5vw, 60px);
    gap: clamp(24px, 3.5vw, 50px);
    margin: 0 20px;
  }

  .hero-left h1 {
    font-size: clamp(2rem, 4.2vw, 3.4rem);
  }

  .hero-left .tagline {
    font-size: clamp(0.95rem, 1.6vw, 1.2rem);
  }

  .feature-list {
    gap: clamp(10px, 1.4vw, 18px);
  }

  .feature-list li {
    font-size: clamp(0.85rem, 1.4vw, 1.05rem);
    gap: 8px;
  }

  .hero-left {
    gap: clamp(14px, 2vw, 24px);
  }

  .hero-buttons {
    gap: clamp(10px, 1.4vw, 16px);
    margin-top: clamp(8px, 1.5vw, 18px);
  }

  .cta-primary,
  .cta-secondary {
    padding: clamp(11px, 1.5vw, 17px) clamp(22px, 3vw, 44px);
    font-size: clamp(0.88rem, 1.4vw, 1.08rem);
  }

  .checkmark {
    width: clamp(18px, 2vw, 24px);
    height: clamp(18px, 2vw, 24px);
    min-width: clamp(18px, 2vw, 24px);
  }

  .platform-info {
    font-size: clamp(0.78rem, 1.2vw, 0.92rem);
  }

  .platform-icons svg {
    width: clamp(16px, 1.6vw, 20px);
    height: clamp(16px, 1.6vw, 20px);
  }
}

/* Stack: right column moves below left column at 950px */
@media (max-width: 950px) {
  .hero {
    padding: clamp(70px, 10vw, 85px) 0 30px;
  }

  .hero-container {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: clamp(28px, 5.5vw, 38px) clamp(24px, 5vw, 32px);
    margin: 0 20px;
  }

  /* Left column (text + download) stays on top */
  .hero-left {
    max-width: 100%;
    text-align: center;
    align-items: center;
    gap: 16px;
    order: 1;
  }

  .hero-left h1 {
    font-size: clamp(1.9rem, 5.5vw, 2.8rem);
    margin-bottom: 8px;
  }

  .hero-left .tagline {
    font-size: clamp(0.98rem, 2.2vw, 1.15rem);
  }

  .feature-list {
    gap: 12px;
    margin: 10px 0;
  }

  .feature-list li {
    font-size: 1rem;
    gap: 10px;
  }

  .checkmark {
    width: 22px;
    height: 22px;
    min-width: 22px;
  }

  .hero-buttons {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-top: 14px;
  }

  .cta-primary,
  .cta-secondary {
    padding: 14px 32px;
    font-size: 1rem;
  }

  .platform-info {
    justify-content: center;
    margin-top: 11px;
    font-size: 0.9rem;
  }

  .platform-icons svg {
    width: 18px;
    height: 18px;
  }

  /* Right column goes below — full width, reset zoom */
  .hero-right {
    zoom: 1;
    order: 2;
    padding: 0;
    max-width: 520px;
    width: 100%;
    margin: 0 auto;
  }

  .hero-tabs {
    max-width: 100%;
    gap: 8px;
  }

  .hero-tab {
    padding: 9px 14px;
    font-size: 0.82rem;
  }

  .hero-view-container {
    min-height: auto;
    aspect-ratio: 1 / 1;
    overflow: hidden;
  }

  .hero-view {
    height: 100%;
    overflow: hidden;
  }

  .themes-container,
  .ai-container,
  .features-showcase-container {
    height: 100%;
    overflow: hidden;
    box-sizing: border-box;
  }

  .themes-container,
  .ai-container,
  .features-showcase-container {
    min-height: auto;
    padding: 16px;
  }

  .hero-features-grid {
    gap: 10px;
  }

  .hero-card-front,
  .hero-card-back {
    padding: 12px;
  }

  .hero-card-front img {
    width: 32px;
    height: 32px;
    margin-bottom: 6px;
  }

  .hero-card-front h4,
  .hero-card-back h4 {
    font-size: 0.82rem;
    margin-bottom: 5px;
  }

  .hero-card-front p,
  .hero-card-back p {
    font-size: 0.72rem;
    line-height: 1.4;
  }

  .ai-container h3 {
    font-size: 1.5rem;
    white-space: normal;
  }

  .ai-description {
    font-size: 0.92rem;
    margin-bottom: 18px;
    text-align: center;
  }

  .ai-features {
    gap: 12px;
    max-width: 100%;
  }

  .ai-feature {
    padding: 12px;
    font-size: 0.9rem;
    gap: 10px;
  }

  .ai-feature-icon {
    width: 34px;
    height: 34px;
  }

  .ai-icon {
    width: 42px;
    height: 42px;
  }

  .themes-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    flex: 1;
    overflow-y: auto;
    max-height: none;
  }

  .theme-card {
    padding: 10px;
  }

  .theme-name {
    font-size: 0.78rem;
  }
}

/* Mobile */
@media (max-width: 900px) {
  .cta-secondary {
    display: none;
  }
}

@media (max-width: 768px) {
  .hero-container {
    padding: clamp(24px, 5vw, 32px) clamp(20px, 4.5vw, 28px);
    margin: 0 14px;
    overflow: hidden; /* Clip any child that would exceed the card */
  }

  .hero-left .tagline,
  .hero-left .audience-tagline {
    max-width: 100%; /* Don't let 520px fixed width push outside the card */
  }

  .feature-list {
    gap: 8px;
    margin: 6px 0;
    padding-left: 0;
  }

  .feature-list li {
    font-size: clamp(0.82rem, 3.5vw, 0.95rem);
    gap: 8px;
    align-items: flex-start;
  }

  .checkmark {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin-top: 3px; /* Align with first line of text when it wraps */
  }

  .hero-left h1 {
    font-size: clamp(1.7rem, 7vw, 2.4rem);
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }

  .cta-primary,
  .cta-secondary {
    width: 100%;
    text-align: center;
  }
}

/* Mid-range phones — AI single column, fills the square */
@media (max-width: 640px) {
  .platform-info {
    flex-wrap: wrap;
  }

  .trial-info {
    flex-basis: 100%; /* Drop to its own row below macOS + Windows */
  }

  .ai-container {
    text-align: center;
    align-items: center;
    justify-content: center;
    padding: 24px 20px;
    overflow-y: auto;
  }

  .ai-header {
    justify-content: center;
    margin-bottom: 14px;
    gap: 12px;
  }

  .ai-container h3 {
    font-size: 1.4rem;
    text-align: center;
  }

  .ai-icon {
    width: 40px;
    height: 40px;
  }

  .ai-description {
    text-align: center;
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.5;
  }

  .ai-features {
    grid-template-columns: 1fr;
    max-width: 100%;
    margin: 0;
    gap: 10px;
  }

  .ai-feature {
    justify-content: flex-start;
    text-align: left;
    padding: 12px 16px;
    font-size: 0.95rem;
    gap: 12px;
    border-radius: 10px;
  }

  .ai-feature-icon {
    width: 30px;
    height: 30px;
  }
}

/* Small phones — tighter spacing */
@media (max-width: 480px) {
  .hero-container {
    padding: 24px 18px;
    margin: 0 12px;
    gap: 24px;
  }

  .hero-left h1 {
    font-size: clamp(1.6rem, 7vw, 2.2rem);
  }

  .hero-features-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .themes-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  /* AI: scale down from 640px values to fit the smaller square */
  .ai-container {
    padding: 16px 14px;
  }

  .ai-header {
    margin-bottom: 10px;
    gap: 10px;
  }

  .ai-icon {
    width: 32px;
    height: 32px;
  }

  .ai-container h3 {
    font-size: 1.1rem;
  }

  .ai-description {
    font-size: 0.82rem;
    margin-bottom: 12px;
  }

  .ai-features {
    gap: 8px;
  }

  .ai-feature {
    padding: 9px 12px;
    font-size: 0.85rem;
    gap: 10px;
  }

  .ai-feature-icon {
    width: 24px;
    height: 24px;
  }
}

/* Very small phones */
@media (max-width: 400px) {
  /* Tighten overall hero spacing */
  .hero-container {
    padding: 14px 12px;
    gap: 14px;
  }

  .hero-left {
    gap: 10px;
  }

  .feature-list {
    gap: 6px;
    margin: 4px 0;
  }

  .feature-list li {
    font-size: 0.78rem;
    gap: 8px;
  }

  .checkmark {
    width: 16px;
    height: 16px;
    min-width: 16px;
  }

  .platform-info {
    font-size: 0.75rem;
    gap: 6px;
    margin-top: 6px;
  }

  .trial-info {
    white-space: normal;
  }

  /* Tabs: shrink to fit all 3 on one row */
  .hero-tabs {
    gap: 4px;
  }

  .hero-tab {
    padding: 6px 8px;
    font-size: 0.7rem;
  }

  /* View container: fixed height so all three tabs match */
  .hero-view-container {
    aspect-ratio: unset;
    min-height: unset;
    height: 300px;
    width: 100%;
  }

  .hero-view {
    height: 100%;
    overflow: hidden;
  }

  /* All panels fill the container equally */
  .features-showcase-container,
  .ai-container,
  .themes-container {
    height: 100%;
    box-sizing: border-box;
    padding: 10px 8px;
  }

  /* Features: clip overflow so cards don't push outside */
  .features-showcase-container {
    overflow: hidden;
  }

  /* AI: scrollable if content overflows */
  .ai-container {
    justify-content: flex-start;
    overflow-y: auto;
    gap: 6px;
  }

  /* Themes: scrollable grid */
  .themes-container {
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  /* Features: 2×2 grid that fills the container height */
  .features-showcase-container {
    justify-content: flex-start;
  }

  .hero-features-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    flex: 1;
    min-height: 0;
    gap: 6px;
  }

  .hero-card {
    aspect-ratio: unset;
    height: 100%;
    min-height: 0;
  }

  .hero-card-inner {
    position: relative;
    height: 100%;
  }

  .hero-card-front,
  .hero-card-back {
    position: absolute;
    padding: 8px 6px;
    height: 100%;
  }

  .hero-card-front img {
    width: 22px;
    height: 22px;
    margin-bottom: 4px;
  }

  .hero-card-front h4,
  .hero-card-back h4 {
    font-size: 0.6rem;
    margin-bottom: 2px;
  }

  .hero-card-front p,
  .hero-card-back p {
    font-size: 0.56rem;
    line-height: 1.3;
  }

  /* AI assistant */
  .ai-container {
    text-align: center;
    align-items: center;
    justify-content: center;
    padding: 10px 8px;
  }

  .ai-header {
    margin-bottom: 6px;
    gap: 8px;
    justify-content: center;
  }

  .ai-icon {
    width: 26px;
    height: 26px;
  }

  .ai-container h3 {
    font-size: 0.88rem;
    white-space: normal;
    text-align: center;
  }

  .ai-description {
    font-size: 0.68rem;
    margin: 0 0 8px 0;
    line-height: 1.4;
    text-align: center;
  }

  .ai-features {
    grid-template-columns: 1fr;
    gap: 4px;
    max-width: 100%;
    margin: 0;
  }

  .ai-feature {
    padding: 5px 8px;
    font-size: 0.68rem;
    gap: 8px;
    justify-content: flex-start;
    text-align: left;
    border-radius: 8px;
  }

  .ai-feature-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
  }

  .themes-container h3 {
    font-size: 0.85rem;
    margin-bottom: 6px;
    flex-shrink: 0;
  }

  .themes-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
  }

  .theme-card {
    padding: 6px;
  }

  .theme-name {
    font-size: 0.62rem;
  }
}

/* ========================================
   DARK MODE HERO STYLES
   ======================================== */
html.dark-mode .themes-container {
  background: rgba(26, 26, 26, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

html.dark-mode .themes-container h3 {
  color: #ffffff;
  font-weight: 600;
}

html.dark-mode .themes-grid::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

html.dark-mode .themes-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 154, 112, 0.4);
}

html.dark-mode .themes-grid::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 154, 112, 0.6);
}

html.dark-mode .theme-card {
  background: rgba(50, 50, 50, 0.7);
  border: 2px solid rgba(255, 255, 255, 0.1);
}

html.dark-mode .theme-card:hover {
  background: rgba(60, 60, 60, 0.8);
}

html.dark-mode .theme-card.selected {
  border-color: #ff9a70;
  box-shadow: 0 0 0 3px rgba(255, 154, 112, 0.2);
}

html.dark-mode .theme-name {
  color: #e4e4e4;
}

html.dark-mode .theme-mode {
  color: #b4b4b4;
}

html.dark-mode .ai-container {
  background: rgba(26, 26, 26, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

html.dark-mode .ai-container h3 {
  color: #ffffff;
  font-weight: 600;
}

html.dark-mode .ai-icon {
  color: #ff9a70;
}

html.dark-mode .ai-description {
  color: #d4d4d4;
}

html.dark-mode .ai-feature {
  background: rgba(45, 45, 45, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

html.dark-mode .ai-feature-icon {
  color: #ff9a70;
}

html.dark-mode .features-showcase-container {
  background: rgba(26, 26, 26, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

html.dark-mode .hero-card-front,
html.dark-mode .hero-card-back {
  background: rgba(50, 50, 50, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

html.dark-mode .hero-card-front h4,
html.dark-mode .hero-card-back h4 {
  color: #ffffff;
  font-weight: 600;
}

html.dark-mode .hero-card-front p,
html.dark-mode .hero-card-back p {
  color: #d4d4d4;
}

html.dark-mode .hero-left h1 {
  color: #e4e4e4;
}

html.dark-mode .hero-left .tagline {
  color: #a0aec0;
}

html.dark-mode .hero-left .audience-tagline {
  color: #a0aec0;
}

html.dark-mode .feature-list li {
  color: #e4e4e4;
}

html.dark-mode .cta-secondary {
  color: #e4e4e4;
  border: 2px solid rgba(255, 154, 112, 0.4);
}

html.dark-mode .cta-secondary:hover {
  border-color: #ff9a70;
  background: rgba(255, 154, 112, 0.1);
}

html.dark-mode .platform-info {
  color: #999;
}

html.dark-mode .platform-icons svg {
  color: #b4b4b4;
}

html.dark-mode .platform-divider {
  color: #cbd5e0;
}

html.dark-mode .divider {
  color: #cbd5e0;
}
