/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  position: relative;
  width: 100dvw;
  height: 100dvh;
  overflow: visible;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(72px, 15vh, 140px) 0 clamp(64px, 10vh, 120px);
  /* Always dark — immune to any light-mode overrides */
  color-scheme: dark;
  background-color: #0a0a0a;
  color: #ffffff;
  --bg-primary: #000000;
  --bg-secondary: #000000;
  --bg-card: rgba(255, 255, 255, 0.03);
  --text-primary: #ffffff;
  --text-secondary: #a0a0b0;
  --accent: #0ea5e9;
  --accent-purple: #3576C5;
  --accent-glow: rgba(100, 220, 255, 0.15);
}

.site-header {
  position: fixed;
  top: clamp(12px, 2vh, 20px);
  left: 0;
  right: 0;
  z-index: 6;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.navbar {
  width: min(1200px, 92vw);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0;
  position: relative;
  pointer-events: auto;
  margin-top: 0rem;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0rem 0rem;
  transition: transform 0.3s ease;
}

.nav-brand img {
  height: 1.8rem;
  width: auto;
  display: block;
  opacity: 0.9;
  transition: opacity 0.8s ease, filter 0.8s ease;
}

/* Hide mobile logo on desktop */
.nav-brand .logo-mobile {
  display: none;
}

.site-header.scrolled .nav-brand img {
  opacity: 0;
}

.nav-toggle {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border-radius: .3rem;
  padding: .1rem .3rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  overflow-x: auto;
  font-family: inherit;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.nav-toggle.nav-bright-bg {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.site-header.scrolled .nav-toggle {
  background: rgba(0, 0, 0, 0.9);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), 0 4px 12px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
}

/* Add border to nav-toggle container with colors matching the nav container */
.nav-toggle::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.08) 30%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0.08) 70%,
    transparent 100%
  );
  opacity: 1;
  border-radius: .3rem .3rem 0 0;
}

.nav-toggle::-webkit-scrollbar {
  display: none;
}

.nav-toggle {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.toggle-indicator {
  position: absolute;
  height: calc(100% - 12px);
  background: rgba(255, 255, 255, 0.9);
  border-radius: .2rem;
  z-index: 1;
  transition: left 0.15s ease-out, width 0.15s ease-out;
}

/* Add the same sick border from the cards to the active nav option */
.toggle-indicator::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(53, 118, 197, 0.4) 30%,
    rgba(53, 118, 197, 0.6) 50%,
    rgba(53, 118, 197, 0.4) 70%,
    transparent 100%
  );
  opacity: 1;
  border-radius: .4rem .4rem 0 0;
}

.toggle-indicator.bounce {
  animation: navBounce 0.25s ease-out;
}

@keyframes navBounce {
  0% { transform: scale(1, 1); }
  30% { transform: scale(1.18, 0.82); }
  50% { transform: scale(0.9, 1.12); }
  75% { transform: scale(1.08, 0.92); }
  100% { transform: scale(1, 1); }
}

.toggle-item {
  position: relative;
  z-index: 2;
  background: none;
  border: none;
  padding: 8px 18px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s ease;
  text-decoration: none;
  flex-shrink: 0;
  font-family: inherit;
}

.toggle-item svg {
  stroke: currentColor;
}


.toggle-item:hover {
  color: var(--text-primary);
}


.toggle-item.active {
  color: #000;
  opacity: .8;
}

.toggle-item.toggle-user {
  margin-left: auto;
  width: 42px;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--text-secondary);
}

.toggle-item.toggle-user:hover {
  color: var(--text-primary);
}

@media (max-width: 900px) {
  .navbar {
    gap: 12px;
    padding: 8px 10px;
  }

  .nav-brand img {
    height: 26px;
  }

  .toggle-item {
    padding: 8px 14px;
    font-size: 0.85rem;
  }

}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(1200px, 92vw);
  display: flex;
  flex-direction: column;
  gap: clamp(18px, 3vw, 28px);
  align-items: flex-start;
}

.hero-row {
  display: flex;
  align-items: flex-start;
  gap: clamp(24px, 5vw, 56px);
  width: 100%;
}

.hero-row > * {
  flex: 1 1 0;
  min-width: 0;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  flex: 0 1 33.3333%;
}

.hero-code {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: flex-start;
  width: 100%;
  flex: 0 1 66.6667%;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(100, 220, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(100, 220, 255, 0.04) 1px, transparent 1px);
  background-size: 80px 80px, 80px 80px;
  opacity: 0.25;
  mask-image: radial-gradient(circle at 50% 30%, rgba(0, 0, 0, 0.9) 0%, transparent 70%);
  z-index: 1;
  pointer-events: none;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(0px);
  opacity: 0.6;
  mix-blend-mode: screen;
  z-index: 1;
  pointer-events: none;
}

.orb-1 {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(100, 220, 255, 0.05) 0%, rgba(100, 220, 255, 0) 70%);
  top: 8%;
  left: 12%;
  opacity: 0;
}

.orb-2 {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(53, 118, 197, 0.35) 0%, rgba(53, 118, 197, 0) 70%);
  bottom: 10%;
  right: 6%;
  opacity: 0;
}

.orb-3 {
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 70%);
  top: 45%;
  right: 30%;
  opacity: 0;
}

.hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.8) contrast(1.08) grayscale(0.6);
  z-index: 0;
  opacity: 0;
  transition: opacity 1.5s ease;
}

.hero-media.loaded {
  opacity: 1;
}

/* .hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.8) 0%,
    rgba(0, 0, 0, 0.6) 50%,
    rgba(0, 0, 0, 0.8) 100%
  );
  z-index: 1;
} */

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.1) 2px,
    rgba(0, 0, 0, 0.1) 4px
  );
  pointer-events: none;
  z-index: 0;
}

.hero-image-credit {
  position: absolute;
  bottom: clamp(16px, 3vh, 32px);
  left: 1rem;
  width: min(420px, 92vw);
  z-index: 4;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.7rem;
  line-height: 1.45;

}

.hero-image-credit p {
  margin: 0;
}

.hero-image-credit p + p {
  margin-top: 4px;
}

.hero-image-credit-title {
  font-weight: 600;
  color: #fff;
}

.hero-image-credit-more {
  appearance: none;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  padding: 2px;
  margin-left: 4px;
  vertical-align: middle;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.hero-image-credit-more:hover {
  opacity: 1;
}

/* Showcase mode: image + credit only */
.hero.hero-showcase .hero-inner,
.hero.hero-showcase .hero-grid,
.hero.hero-showcase .hero-orb,
.hero.hero-showcase .hero-overlay,
.hero.hero-showcase .scroll-indicator,
.hero.hero-showcase::after {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.hero.hero-showcase .site-header {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.hero.hero-showcase .hero-media {
  filter: brightness(0.85) contrast(1.05) grayscale(0.15);
}

.hero.hero-showcase .hero-image-credit {
  left: 50%;
  bottom: clamp(24px, 4vh, 48px);
  transform: translateX(-50%);
  width: min(560px, 88vw);
  text-align: center;
  font-size: 0.85rem;
  line-height: 1.6;
  z-index: 10;
  transition: all 0.4s ease;
}

.hero.hero-showcase .hero-image-credit-title {
  font-size: 1.2rem;
  margin-bottom: 4px;
}

.hero.hero-showcase .hero-image-credit-more-text {
  display: inline !important;
}

.hero.hero-showcase .hero-image-credit-more {
  display: none;
}

/* Close button for showcase mode */
.hero-showcase-close {
  display: none;
  position: absolute;
  top: clamp(16px, 2vh, 24px);
  right: clamp(16px, 2vw, 24px);
  z-index: 10;
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  line-height: 1;
  padding: 0;
  padding-bottom: 2px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.hero-showcase-close:hover {
  background: rgba(0, 0, 0, 0.7);
  border-color: rgba(255, 255, 255, 0.3);
}

.hero.hero-showcase .hero-showcase-close {
  display: flex;
}

.code-container {
  position: relative;
  z-index: 20;
  width: min(800px, 100%);
  background: rgba(10, 10, 10, 0.95);
  border: 1px solid rgba(53, 118, 197, 0.3);
  border-radius: 16px;
  box-shadow:
    0 0 20px rgba(0, 0, 0, 0.4),
    0 10px 20px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(53, 118, 197, 0.1);
  border: 1px solid rgba(53, 118, 197, 0.3);
  color: var(--accent);
  width: fit-content;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(53, 118, 197, 0.8);
}

.badge-pill {
  font-size: 0.65rem;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(53, 118, 197, 0.2);
  border: 1px solid rgba(53, 118, 197, 0.4);
  color: #e9d5ff;
}

.hero-title {
  font-size: clamp(2.6rem, 5vw, 4.2rem);
  line-height: 1.05;
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff 0%, #d7d7ef 45%, #9adcfb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
  margin: 0 auto;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: rgba(255, 255, 255, 0.85)!important;
  max-width: 700px;
  line-height: 1.5;
  text-align: center;
  margin: 0 auto clamp(22px, 3vw, 66px);
}

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

.hero-btn {
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hero-primary {
  background: linear-gradient(135deg, rgba(53, 118, 197, 0.9), rgba(53, 118, 197, 0.7));
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(53, 118, 197, 0.3);
}

.hero-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(53, 118, 197, 0.4);
}

.hero-secondary {
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(15, 18, 28, 0.6);
}

.hero-secondary:hover {
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}

.hero-features {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
}

.feature-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.feature-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(53, 118, 197, 0.8);
  box-shadow: 0 0 8px rgba(53, 118, 197, 0.6);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 0px 0;
}

.metric {
  padding: .5rem 1rem;
  border-radius: .25rem;
  background: rgba(10, 10, 10, 0.8);
  border: 1px solid rgba(53, 118, 197, 0.3);
}

.metric-value {
  display: block;
  font-size: .9rem !important;
  font-weight: 400;
  color: #f8fafc;
  white-space: nowrap;
  word-break: keep-all;
}

.metric-label {
  display: block;
  font-size: 0.75rem !important;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 4px;
  white-space: nowrap;
  word-break: keep-all;
}

.hero-preview-card {
  width: 100%;
  padding: .5rem 1rem;
  border-radius: .25rem;
  background: rgba(10, 10, 10, 0.8);
  border: 1px solid rgba(53, 118, 197, 0.3);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
}

.hero-preview-left {
  margin-top: 8px;
  align-self: flex-start;
}

.preview-label {
  font-size: 0.75rem;
  letter-spacing: .10625em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 12px;
}

.preview-row-group {
  display: flex;
  align-items: stretch;
}

.preview-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0rem;
  padding: .0rem 1rem;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.8rem;
  flex: 1;
}

.preview-row:last-child {
  border-right: none;
}

.hero-preview-card {
  display: flex;
  flex-direction: column;
  gap: 0rem;
}

.preview-tag {
  color: #f8fafc;
  font-weight: 600;
  white-space: nowrap;
  word-break: keep-all;
}

.preview-time {
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
  word-break: keep-all;
}

@media (max-width: 980px) {
  .hero-inner {
    padding-top: 80px;
    padding-bottom: 80px;
  }

  .hero-row {
    flex-direction: column;
  }

  .hero {
    height: auto;
    min-height: 100dvh;
  }

  .hero-code {
    align-items: flex-start;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-preview-card {
    width: 100%;
  }

  .preview-row-group {
    flex-direction: column;
  }

  .preview-row {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .preview-row:last-child {
    border-bottom: none;
  }
}

/* ============================================
   SCROLL DOWN INDICATOR
   ============================================ */
.scroll-indicator {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  cursor: pointer;
  transition: opacity 0.5s ease;
  margin-top: clamp(2rem, 15vh, 10rem);
}

.scroll-indicator:hover {
  opacity: 0.8;
}

.scroll-text {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
  animation: scrollTextPulse 2.5s ease-in-out infinite;
}

@keyframes scrollTextPulse {
  0%, 100% {
    opacity: 0.5;
  }
  50% {
    opacity: 0.7;
  }
}

.scroll-arrows {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: -4px;
  position: relative;
  height: 50px;
  width: 24px;
}

.scroll-arrow {
  width: 20px;
  height: 20px;
  color: rgba(53, 118, 197, 0.7);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  animation: scrollArrowFloat 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  filter: drop-shadow(0 0 6px rgba(53, 118, 197, 0.5));
  transition: color 0.3s ease, filter 0.3s ease;
}

.scroll-indicator:hover .scroll-arrow {
  color: rgba(53, 118, 197, 0.9);
  filter: drop-shadow(0 0 10px rgba(53, 118, 197, 0.6));
}

.arrow-1 {
  top: 0;
  animation-delay: 0s;
}

.arrow-2 {
  top: 14px;
  animation-delay: 0.15s;
}

.arrow-3 {
  top: 28px;
  animation-delay: 0.3s;
}

@keyframes scrollArrowFloat {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(-8px);
  }
  30% {
    opacity: 0.9;
  }
  70% {
    opacity: 0.9;
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(12px);
  }
}

.scroll-line {
  width: 1px;
  height: 50px;
  background: rgba(53, 118, 197, 0.15);
  border-radius: 1px;
  overflow: hidden;
  position: relative;
}

.scroll-line-inner {
  width: 100%;
  height: 20px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(53, 118, 197, 0.8) 50%,
    transparent 100%
  );
  border-radius: 1px;
  animation: scrollLineFlow 2s ease-in-out infinite;
}

@keyframes scrollLineFlow {
  0% {
    transform: translateY(-20px);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    transform: translateY(50px);
    opacity: 0;
  }
}

/* Hide scroll indicator on smaller screens where layout stacks */
@media (max-width: 980px) {
  .scroll-indicator {
    display: none;
  }
}

.code-container::before {
  content: '';
  display: block;
  height: 40px;
  background: rgba(30, 35, 45, 0.95);
  border-bottom: 1px solid rgba(100, 220, 255, 0.1);
}

.code-container::after {
  content: '';
  position: absolute;
  top: 14px;
  left: 16px;
  width: 12px;
  height: 12px;
  background: #ff5f57;
  border-radius: 50%;
  box-shadow: 20px 0 0 #febc2e, 40px 0 0 #28c840;
}

.code-block {
  padding: 28px 32px;
  font-family: 'Fira Code', monospace;
  font-size: clamp(0.8rem, 1.6vw, .7rem);
  line-height: 1.8;
  overflow-x: auto;
}

.code-block code {
  display: block;
  white-space: pre;
}

/* Code block: dim syntax, bright words */
.cd { color: rgba(255,255,255,0.22); }   /* dim  — brackets, keywords, punctuation */
.cm { color: rgba(255,255,255,0.35); }   /* mid  — property names */
.cb { color: #ffffff; }                  /* bright — strings, brand names */

/* CTA button span colors — scoped to hero so light mode can't override them */
.hero .variable,    .variable    { color: #9cdcfe; }
.hero .punctuation, .punctuation { color: rgba(255,255,255,0.4); }
.hero .function,    .function    { color: #dcdcaa; }
.hero .paren,       .paren       { color: rgba(255,255,255,0.4); }

.cursor {
  display: inline-block;
  width: 10px;
  height: 1.2em;
  background: var(--accent);
  animation: blink 1s step-end infinite;
  vertical-align: text-bottom;
  margin-left: 2px;
  box-shadow: 0 0 10px rgba(100, 220, 255, 0.5);
}

@keyframes blink {
  50% { opacity: 0; }
}

.function {
  text-shadow: 0 0 10px currentColor;
}


/* Hero CTA Buttons */
.cta-buttons {
  display: flex;
  gap: 16px;
  padding: 0 2rem 2rem;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.cta-buttons.visible {
  opacity: 1;
  transform: translateY(0);
}

.cta-code {
  font-family: 'Fira Code', monospace;
  font-size: clamp(0.75rem, 1.3vw, 0.9rem);
  padding: .5rem 1rem;
  background: rgba(100, 220, 255, 0.1);
  border: 1px solid rgba(100, 220, 255, 0.4);
  border-radius: 0.25rem;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.cta-code::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(100, 220, 255, 0.2), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.cta-code:hover::before {
  transform: translateX(100%);
}

.cta-code:hover {
  background: rgba(100, 220, 255, 0.2);
  border-color: rgba(100, 220, 255, 0.7);
  box-shadow: 0 0 30px rgba(100, 220, 255, 0.3);
}

.cta-secondary {
  background: rgba(150, 150, 150, 0.1);
  border-color: rgba(150, 150, 150, 0.3);
}

.cta-secondary:hover {
  background: rgba(150, 150, 150, 0.2);
  border-color: rgba(150, 150, 150, 0.6);
  box-shadow: 0 0 20px rgba(150, 150, 150, 0.2);
}

/* ============================================
   MOBILE HERO OPTIMIZATION
   ============================================ */
@media (max-width: 768px) {
  /* Hide metrics and delivery snapshot completely */
  .hero-content {
    display: none !important;
  }

  /* Hide code block typing animation completely */
  .code-block {
    display: none !important;
  }

  /* Remove terminal header/dots */
  .code-container::before,
  .code-container::after {
    display: none !important;
  }

  /* Strip code-container styling completely */
  .code-container {
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    width: 100%;
    padding: 0;
    border-radius: 0;
  }

  /* Hero inner: center everything vertically */
  .hero-inner {
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 0;
    padding-bottom: 0;
  }

  /* Hero row: only CTAs visible, centered */
  .hero-row {
    justify-content: center;
    align-items: center;
    width: 100%;
  }

  /* Make hero-code the CTA wrapper, centered */
  .hero-code {
    flex: 1 1 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
  }

  /* CTA buttons: flex row, centered */
  .cta-buttons {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 0;
    gap: 12px;
    width: auto;
  }

  /* Ensure CTA buttons are visible immediately on mobile */
  .cta-buttons,
  .cta-buttons.visible {
    opacity: 1;
    transform: none;
    margin-top: 1.5rem;
  }

  /* Title centered + smaller on mobile */
  .hero-title {
    text-align: center;
    width: 100%;
    font-size: clamp(2.2rem, 8vw, 3rem);
  }

  /* Subtitle centered */
  .hero-subtitle {
    text-align: center;
    width: 100%;
  }

  /* CTA buttons: blur background for visibility */
  .cta-code {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  .cta-code.cta-secondary {
    background: rgba(0, 0, 0, 0.25);
  }

  /* Image credit: single line with Title | Credits */
  .hero-image-credit {
    display: flex;
    align-items: center;
    gap: 6px;
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    width: auto;
    max-width: calc(100% - 2rem);
    box-sizing: border-box;
    overflow: hidden;
    font-size: 0.65rem;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 8px 12px;
    border-radius: 6px;
  }

  /* Title inline, truncate if needed */
  .hero-image-credit-title {
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.65rem;
    margin: 0;
  }

  /* Separator pipe after title */
  .hero-image-credit-title::after {
    content: ' |';
    color: rgba(255, 255, 255, 0.5);
    margin-left: 6px;
  }

  /* Hide date and description text */
  .hero-image-credit p:nth-child(3) {
    display: none !important;
  }

  /* Show source (credit) inline */
  .hero-image-credit p:nth-child(2) {
    display: inline;
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 0.65rem;
    margin: 0;
    max-width: 40%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Hide the "Image Credit:" label */
  .hero-image-credit p:nth-child(2) strong {
    display: none;
  }

  /* Description paragraph - hide text but keep button */
  .hero-image-credit-description {
    display: flex !important;
    align-items: center;
    margin: 0 !important;
    margin-left: auto !important;
    flex-shrink: 0;
  }

  /* Hide the short and more description text */
  #hero-credit-short,
  #hero-credit-more {
    display: none !important;
  }

  /* Expand button stays visible */
  .hero-image-credit-more {
    flex-shrink: 0;
    margin: 0;
    padding: 4px;
  }

  /* Hero respects safe areas */
  .hero {
    height: 110vh;
    padding-top: max(env(safe-area-inset-top), clamp(72px, 15vh, 140px));
    padding-bottom: max(env(safe-area-inset-bottom), clamp(64px, 10vh, 120px));
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }

  /* Image credit respects bottom safe area + moved up 6rem */
  .hero-image-credit {
    bottom: max(calc(1rem + 6rem), calc(env(safe-area-inset-bottom, 1rem) + 6rem));
  }

  /* Hide main logo on mobile */
  .nav-brand .logo-main {
    display: none;
  }

  /* Show favicon logo on mobile */
  .nav-brand .logo-mobile {
    display: block;
    height: 1.2rem;
    width: auto;
  }

  /* Nav-toggle becomes the main container with logo inside */
  .nav-toggle {
    position: relative;
    left: auto;
    transform: none;
    display: flex;
    align-items: center;
    gap: 0;
    padding-left: .5rem;
  }

  /* Hide standalone nav-brand, we'll use pseudo positioning */
  .navbar {
    justify-content: center;
  }
  
  .nav-brand {
    position: absolute;
    left: 0;
    display: none;
  }

  /* Add logo inside nav-toggle as first element visually */
  .nav-toggle::before {
    content: '';
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    display: block;
    width: 1.35rem;
    height: 1.35rem;
    background: url('../images/MOATIZE.png') center/contain no-repeat;
    border-radius: 0;
    opacity: 1;
    margin-right: 8px;
    flex-shrink: 0;
  }

  /* Move nav higher on mobile */
  .site-header {
    top: 0;
  }

  /* ============================================
     SHOWCASE MODE - MOBILE
     ============================================ */
  .hero.hero-showcase .hero-image-credit {
    /* Reset mobile compact styles for showcase */
    display: block;
    flex-direction: column;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: min(560px, calc(100% - 2rem));
    max-width: calc(100% - 2rem);
    bottom: max(1.5rem, calc(env(safe-area-inset-bottom) + 1rem));
    text-align: center;
    font-size: 0.8rem;
    line-height: 1.5;
    padding: 16px 20px;
    overflow: visible;
  }

  /* Show all paragraphs in showcase mode */
  .hero.hero-showcase .hero-image-credit p,
  .hero.hero-showcase .hero-image-credit p:nth-child(2),
  .hero.hero-showcase .hero-image-credit p:nth-child(3) {
    display: block !important;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    max-width: none;
    margin: 4px 0;
  }

  /* Show the Image Credit label */
  .hero.hero-showcase .hero-image-credit p:nth-child(2) strong {
    display: inline;
  }

  /* Title in showcase */
  .hero.hero-showcase .hero-image-credit-title {
    font-size: 1rem;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    margin-bottom: 8px;
  }

  /* Remove pipe separator in showcase */
  .hero.hero-showcase .hero-image-credit-title::after {
    content: none;
  }

  /* Show description text in showcase */
  .hero.hero-showcase .hero-image-credit-description {
    display: block !important;
    margin: 4px 0 !important;
    margin-left: 0 !important;
  }

  .hero.hero-showcase #hero-credit-short,
  .hero.hero-showcase #hero-credit-more {
    display: inline !important;
  }

  /* Hide expand button in showcase (close button handles exit) */
  .hero.hero-showcase .hero-image-credit-more {
    display: none !important;
  }

  /* Close button respects safe area */
  .hero.hero-showcase .hero-showcase-close {
    top: max(1rem, env(safe-area-inset-top, 1rem));
    right: max(1rem, env(safe-area-inset-right, 1rem));
  }
}
