/* ============================================
   SnapGPT — Global Styles (UI 2.0)
   ============================================ */

:root {
  --primary-gradient: linear-gradient(90deg, #ff4a36 0%, #dd98ff 100%);
  --primary-gradient-hover: linear-gradient(90deg, #ff6a56 0%, #e5acff 100%);
  --text-gradient: linear-gradient(90deg, #ffffff 0%, rgba(255, 255, 255, 0.7) 100%);
  --background: #09090b;
  --surface-1: rgba(255, 255, 255, 0.03);
  --surface-2: rgba(255, 255, 255, 0.06);
  --card-bg: rgba(255, 255, 255, 0.04);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-border-hover: rgba(255, 255, 255, 0.16);
  --text-primary: #fafafa;
  --text-secondary: rgba(255, 255, 255, 0.6);
  --text-dim: rgba(255, 255, 255, 0.35);
  --header-height: 72px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---- Reset & Base ---- */
html { scroll-behavior: smooth; }

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
  word-wrap: break-word;
  letter-spacing: -0.02em;
}

/* ---- Header ---- */
.header {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(9, 9, 11, 0.6);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--header-height);
  position: relative;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.logo-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
  margin-right: 8px;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  font-family: 'Inter', sans-serif;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.03em;
}

.nav-links {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
}

.nav-links a:not(.static-gradient-button):not(.login-button):not(.dashboard-button):hover {
  color: var(--text-primary);
  background: var(--surface-1);
}

/* ---- Buttons ---- */
.cta-button,
.primary-button,
.static-gradient-button {
  background: var(--primary-gradient);
  color: #fff;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.25s var(--ease-out);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  letter-spacing: -0.01em;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.static-gradient-button::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.1), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.static-gradient-button:hover::before {
  transform: translateX(100%);
}

.static-gradient-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(255, 74, 54, 0.25), 0 1px 3px rgba(0, 0, 0, 0.3);
}

.static-gradient-button:active {
  transform: translateY(0);
}

.firefox-button {
  background: linear-gradient(135deg, #ff9500 0%, #ff5e3a 100%);
  color: white;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.25s var(--ease-out);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.firefox-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(255, 148, 0, 0.3);
}

.firefox-button:active {
  transform: translateY(0);
}

/* ---- Hero Section ---- */
.hero {
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 2rem;
  margin-top: var(--header-height);
  position: relative;
}

/* Hero ambient glow */
.hero::before {
  content: '';
  position: absolute;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(224, 64, 251, 0.08) 0%, rgba(255, 74, 54, 0.04) 40%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.hero-content {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.hero .gradient-text {
  font-size: 4rem;
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.gradient-text {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: 1.125rem;
  line-height: 1.7;
  max-width: 540px;
  margin: 0;
}

.download-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

/* ---- Demo Video ---- */
.demo-video-section {
  padding: 2rem 2rem 6rem;
  background: var(--background);
}

.hero-video-container {
  max-width: 900px;
  margin: 0 auto;
}

.video-wrapper {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--card-bg);
  aspect-ratio: 16/9;
  border: 1px solid var(--card-border);
  box-shadow: 0 32px 64px -16px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.demo-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-xl);
}

.video-poster {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 50% 42%, rgba(221, 152, 255, 0.22), transparent 42%),
    linear-gradient(135deg, rgba(255, 74, 54, 0.2), rgba(9, 9, 11, 0.96) 42%, rgba(221, 152, 255, 0.16));
  color: var(--text-primary);
  cursor: pointer;
  display: grid;
  place-items: center;
  font: inherit;
}

.video-poster-icon {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s var(--ease-out), background 0.2s var(--ease-out);
}

.video-poster:hover .video-poster-icon {
  transform: scale(1.05);
  background: rgba(255, 255, 255, 0.2);
}

.video-poster-icon::before {
  content: '';
  width: 0;
  height: 0;
  border-top: 13px solid transparent;
  border-bottom: 13px solid transparent;
  border-left: 20px solid currentColor;
  margin-left: 5px;
}

/* ---- Text Reveal Animation ---- */
.reveal-text {
  position: relative;
  overflow: hidden;
}

.reveal-text span {
  display: inline-block;
  transform: translateY(30px);
  opacity: 0;
  animation: revealText 1s var(--ease-out) forwards;
  background: var(--primary-gradient) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

@keyframes revealText {
  0% { transform: translateY(30px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

/* ---- Features / Why Choose Section ---- */
.features {
  padding: 6rem 2rem;
  position: relative;
  margin: 0 auto;
  max-width: 1200px;
}

.section-title.gradient-text {
  font-size: 2.75rem;
  margin-bottom: 3rem;
  text-align: center;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.generating-text {
  font-size: 2.5rem;
  line-height: 1.5;
  max-width: 900px;
  margin: 0 auto;
  font-weight: 600;
  text-align: center;
  letter-spacing: -0.02em;
}

.generating-text span {
  transition: color 0.4s var(--ease-out);
  color: var(--text-dim);
}

.generating-text span.active {
  color: var(--text-primary);
}

/* ---- How It Works ---- */
.how-it-works {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.how-it-works::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 100vw;
  height: 100%;
  margin-left: -50vw;
  background: linear-gradient(180deg, transparent 0%, rgba(224, 64, 251, 0.03) 40%, rgba(224, 64, 251, 0.03) 60%, transparent 100%);
  pointer-events: none;
  z-index: -1;
}

.steps-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.step {
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--surface-1);
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  transition: all 0.3s var(--ease-out);
  position: relative;
}

.step:hover {
  transform: translateY(-4px);
  background: var(--surface-2);
  border-color: var(--card-border-hover);
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.4);
}

.step-number {
  background: var(--primary-gradient);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
  box-shadow: 0 4px 12px rgba(255, 74, 54, 0.2);
}

.step h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
  -webkit-text-fill-color: initial;
  font-weight: 600;
}

.step p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.6;
}

/* ---- Features Showcase ---- */
.features-showcase {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.feature-block {
  margin-bottom: 8rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.feature-block:last-child {
  margin-bottom: 0;
}

.feature-block.right {
  direction: rtl;
}

.feature-block.right .feature-content {
  direction: ltr;
}

.feature-content {
  max-width: 480px;
}

.feature-content h3 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  opacity: 1;
}

.feature-content p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.7;
  opacity: 1;
}

.feature-media {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  opacity: 0;
  transition: all 0.6s var(--ease-out);
}

.feature-media.slide-in-right {
  transform: translateX(40px);
  animation: slideInRight 0.8s var(--ease-out) 0.3s forwards;
}

.feature-media.slide-in-left {
  transform: translateX(-40px);
  animation: slideInLeft 0.8s var(--ease-out) 0.3s forwards;
}

.feature-media:hover {
  transform: translateY(-6px);
  border-color: var(--card-border-hover);
  box-shadow: 0 24px 48px -16px rgba(0, 0, 0, 0.4);
}

.feature-media img,
.placeholder-gif img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.placeholder-gif {
  width: 100%;
  height: 100%;
}

/* ---- Testimonials ---- */
.testimonials {
  padding: 6rem 2rem;
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden;
  position: relative;
  background-color: var(--background);
}

.testimonials .section-title {
  font-size: 2.75rem;
  margin-bottom: 3rem;
}

.testimonials::before,
.testimonials::after {
  content: '';
  position: absolute;
  top: 0;
  width: 12%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.testimonials::before {
  left: 0;
  background: linear-gradient(90deg, var(--background) 0%, transparent 100%);
}

.testimonials::after {
  right: 0;
  background: linear-gradient(270deg, var(--background) 0%, transparent 100%);
}

.testimonials-grid {
  display: flex;
  gap: 1rem;
  position: relative;
}

.testimonials-row-1 {
  animation: slideRight 50s linear infinite;
}

.testimonials-row-2 {
  margin-top: 1rem;
  animation: slideLeft 50s linear infinite;
}

@keyframes slideRight {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(-300px * 6 - 1rem * 6)); }
}

@keyframes slideLeft {
  0% { transform: translateX(calc(-300px * 6 - 1rem * 6)); }
  100% { transform: translateX(0); }
}

.testimonial-card {
  background: var(--surface-1);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
  width: 300px;
  flex-shrink: 0;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s var(--ease-out);
}

.testimonial-card:hover {
  border-color: var(--card-border-hover);
  background: var(--surface-2);
  transform: translateY(-2px);
  z-index: 3;
}

.testimonial-card p {
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.testimonial-card cite {
  color: var(--text-dim);
  display: block;
  margin-top: 0.75rem;
  font-style: normal;
  font-size: 0.8rem;
  font-weight: 500;
}

/* ---- FAQ ---- */
.faq {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.faq-grid {
  max-width: 720px;
  margin: 0 auto;
}

.faq-item {
  background: transparent;
  border: 1px solid var(--card-border);
  margin-bottom: 0.75rem;
  border-radius: var(--radius-md);
  transition: border-color 0.2s ease;
}

.faq-item:hover {
  border-color: var(--card-border-hover);
}

.faq-item.active {
  border-color: var(--card-border-hover);
  background: var(--surface-1);
}

.faq-header {
  padding: 1.25rem 1.5rem;
  display: flex;
  outline: none;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.faq-header h3 {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s ease;
  letter-spacing: -0.01em;
}

.faq-item.active .faq-header h3 {
  color: var(--text-primary);
}

.faq-content {
  display: block;
  padding: 0 1.5rem;
  color: var(--text-dim);
  line-height: 1.7;
}

.faq-content p {
  margin: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.35s ease-out, opacity 0.25s ease-out, padding 0.35s ease-out;
  padding: 0;
  font-size: 0.9rem;
}

.faq-item.active .faq-content p {
  max-height: 1000px;
  opacity: 1;
  padding-bottom: 1.25rem;
}

.faq-toggle {
  width: 20px;
  height: 20px;
  position: relative;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.faq-toggle::before,
.faq-toggle::after {
  content: '';
  position: absolute;
  background: var(--text-secondary);
  border-radius: 1px;
  transition: all 0.3s ease;
}

.faq-toggle::before {
  width: 2px;
  height: 14px;
  left: 9px;
  top: 3px;
}

.faq-toggle::after {
  width: 14px;
  height: 2px;
  left: 3px;
  top: 9px;
}

.faq-item.active .faq-toggle::before {
  transform: rotate(90deg);
  opacity: 0;
}

/* ---- Footer ---- */
.footer {
  background: var(--surface-1);
  padding: 5rem 2rem 2rem;
  margin-top: 4rem;
  border-top: 1px solid var(--card-border);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 4rem;
  margin-bottom: 4rem;
}

.footer-section.brand {
  max-width: 280px;
}

.footer-section.brand .logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  font-family: 'Inter', sans-serif;
  margin-bottom: 0;
  display: block;
  line-height: 1;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  line-height: 1;
}

.footer-logo-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.footer-description {
  color: var(--text-secondary);
  margin: 0.75rem 0 1.5rem;
  font-size: 0.875rem;
  line-height: 1.7;
}

.footer-section.links h3 {
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.footer-section.links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-section.links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
  font-size: 0.875rem;
}

.footer-section.links a:hover {
  color: var(--text-primary);
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  color: var(--text-dim);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--surface-1);
  border: 1px solid var(--card-border);
}

.social-links a:hover {
  color: var(--text-primary);
  border-color: var(--card-border-hover);
  background: var(--surface-2);
  transform: translateY(-1px);
}

.social-links a svg {
  width: 18px;
  height: 18px;
}

.social-links .social-disabled {
  color: var(--text-dim);
  opacity: 0.5;
  cursor: not-allowed;
}

.footer-section.links span.social-disabled {
  color: var(--text-dim);
  opacity: 0.5;
  cursor: not-allowed;
}

.footer-bottom {
  border-top: 1px solid var(--card-border);
  padding-top: 2rem;
  text-align: center;
}

.copyright {
  color: var(--text-dim);
  font-size: 0.8rem;
  margin: 0;
  line-height: 38px;
}

.climate-badge-container {
  display: flex;
  align-items: center;
}

.climate-badge-container iframe {
  display: block;
}

/* ---- Animations ---- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-content,
.feature-card,
.step,
.testimonial-card {
  animation: fadeIn 0.6s var(--ease-out) forwards;
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: all 0.7s var(--ease-out);
}

.reveal-on-scroll.active {
  opacity: 1;
  transform: translateY(0);
}

@keyframes slideInRight {
  from { transform: translateX(40px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInLeft {
  from { transform: translateX(-40px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ---- Typing / Text Gen ---- */
.typing-text {
  display: inline-block;
  width: 0;
  white-space: pre-wrap;
  overflow: hidden;
  animation: none;
  border-right: 2px solid transparent;
}

.typing-text.active {
  animation: typing 2s steps(40, end) forwards;
  border-right: 2px solid var(--text-primary);
}

@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

.feature-card p {
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.feature-card.active p {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Get Started Section ---- */
.get-started {
  padding: 10rem 2rem;
  background: linear-gradient(180deg, var(--background) 0%, rgba(224, 64, 251, 0.06) 100%);
  position: relative;
}

.get-started::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
}

.get-started-content {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.get-started .subtitle {
  font-size: 1.5rem;
  color: var(--text-secondary);
  margin: 1.5rem 0 3rem;
}

.email-signup { opacity: 1; }

.email-input-container {
  display: flex;
  gap: 0.5rem;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  background: var(--surface-1);
  padding: 0.375rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
  transition: all 0.3s ease;
}

.email-input-container:focus-within {
  border-color: var(--card-border-hover);
  box-shadow: 0 0 0 4px rgba(224, 64, 251, 0.06);
}

.email-input-container input {
  flex: 1;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  background: transparent;
  border: none;
  color: var(--text-primary);
  outline: none;
  font-family: 'Inter', sans-serif;
}

.email-input-container input::placeholder {
  color: var(--text-dim);
}

.email-input-container button {
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  white-space: nowrap;
  border-radius: var(--radius-sm);
}

/* ---- Logo in other pages ---- */
.hero-image {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--card-bg);
  aspect-ratio: 16/9;
  border: 1px solid var(--card-border);
  width: 100%;
  height: auto;
  max-height: 550px;
}

.placeholder-video {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

/* Hidden demo showcase */
.demo-showcase { display: none; }

/* ---- Hamburger Menu ---- */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  cursor: pointer;
  z-index: 1005;
  position: relative;
  background: transparent;
  border: none;
  padding: 0;
  outline: none;
  border-radius: var(--radius-sm);
  transition: background 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.mobile-menu-toggle:hover {
  background: var(--surface-2);
}

.mobile-menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background-color: var(--text-secondary);
  border-radius: 2px;
  position: absolute;
  left: 12px;
  transform-origin: center;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-menu-toggle span:nth-child(1) { top: 14px; }
.mobile-menu-toggle span:nth-child(2) { top: 21px; }
.mobile-menu-toggle span:nth-child(3) { top: 28px; }

.mobile-menu-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.mobile-menu-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-menu-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---- Mobile Nav Overlay ---- */
.mobile-nav-overlay {
  display: none;
}

@media (max-width: 768px) {
  .mobile-nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .mobile-nav-overlay.active {
    opacity: 1;
    pointer-events: auto;
  }
}

/* ============================================
   Responsive — Tablet
   ============================================ */
@media (max-width: 1024px) {
  .steps-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .header {
    background: rgba(9, 9, 11, 0.92);
    overflow: visible;
  }

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

  .mobile-menu-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: rgba(9, 9, 11, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 1rem 1rem;
    gap: 0.25rem;
    border-bottom: 1px solid var(--card-border);
    z-index: 999;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.2s ease,
                visibility 0s linear 0.3s;
  }

  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.2s ease,
                visibility 0s linear 0s;
  }

  .nav-links a {
    display: block;
    width: 100%;
    text-align: center;
    padding: 0.75rem;
    font-size: 1rem;
    border-radius: var(--radius-sm);
  }

  .nav-links a:not(.static-gradient-button):not(.login-button):not(.dashboard-button):active {
    background: var(--surface-2);
  }

  .nav-links .static-gradient-button {
    margin-top: 0.5rem;
  }

  .hero .gradient-text {
    font-size: 2.5rem;
    white-space: normal;
    letter-spacing: -0.03em;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-subtitle br {
    display: none;
  }

  .section-title.gradient-text {
    font-size: 2rem;
  }

  .generating-text {
    font-size: 1.4rem;
    padding: 0 0.5rem;
  }

  .steps-container {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .feature-block {
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 4rem;
  }

  .feature-block.right { direction: ltr; }

  .feature-content {
    max-width: 100%;
    text-align: center;
  }

  .feature-content h3 { font-size: 1.75rem; }
  .feature-content p { font-size: 1rem; }

  .feature-media {
    margin: 0 auto;
    max-width: 90%;
    border-radius: var(--radius-lg);
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .footer-section.brand { max-width: 100%; text-align: center; }
  .social-links { justify-content: center; }
  .footer-section.links { text-align: center; }

  .download-buttons {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .download-buttons .static-gradient-button,
  .download-buttons .firefox-button {
    width: 100%;
    max-width: 280px;
    margin: 0;
  }

  .features, .how-it-works, .testimonials, .get-started, .faq {
    padding: 4rem 1rem;
  }

  .features-showcase {
    padding: 4rem 1rem;
  }

  .footer {
    padding: 3rem 1rem 1.5rem;
  }

  /* Touch targets */
  button, .static-gradient-button, .firefox-button, .faq-header {
    min-height: 44px;
  }

  /* Testimonials mobile */
  .testimonials .section-title { font-size: 2rem; }

  .testimonial-card {
    width: 260px;
    padding: 1.25rem;
  }

  .testimonials-row-1, .testimonials-row-2 {
    animation-duration: 35s;
  }

  @keyframes slideRight {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-260px * 6 - 1rem * 6)); }
  }

  @keyframes slideLeft {
    0% { transform: translateX(calc(-260px * 6 - 1rem * 6)); }
    100% { transform: translateX(0); }
  }

  /* All content within viewport */
  .feature-block, .hero-content, .hero, .features, .how-it-works,
  .features-showcase, .testimonials, .faq, .get-started, .footer {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
  }

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

  .gradient-text,
  .section-title.gradient-text,
  .hero .gradient-text {
    white-space: normal;
    word-wrap: break-word;
    display: inline-block;
    width: 100%;
  }

  .email-input-container {
    flex-direction: column;
    background: transparent;
    border: none;
    padding: 0;
    gap: 0.75rem;
  }

  .email-input-container input,
  .email-input-container button {
    width: 100%;
  }

  .get-started { padding: 4rem 1rem; }

}

/* ============================================
   Responsive — Small Mobile
   ============================================ */
@media (max-width: 480px) {
  .hero .gradient-text {
    font-size: 2rem;
    white-space: normal;
  }

  .section-title.gradient-text {
    font-size: 1.75rem;
  }

  .steps-container {
    grid-template-columns: 1fr;
  }

  .step { padding: 1.5rem 1rem; }

  .testimonial-card {
    width: 240px;
    padding: 1rem;
  }

  .testimonials-row-1, .testimonials-row-2 {
    animation-duration: 30s;
    gap: 0.75rem;
  }

  @keyframes slideRight {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-240px * 6 - 0.75rem * 6)); }
  }

  @keyframes slideLeft {
    0% { transform: translateX(calc(-240px * 6 - 0.75rem * 6)); }
    100% { transform: translateX(0); }
  }

  .hero, .features, .how-it-works, .features-showcase, .testimonials, .faq, .get-started {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .static-gradient-button, .firefox-button {
    padding: 0.6rem 1.2rem;
    font-size: 0.875rem;
  }

  .footer-section.links a {
    display: block;
    padding: 6px 0;
  }
}

/* Ultra-small devices */
@media (max-width: 375px) {
  body { font-size: 14px; }

  .hero .gradient-text { font-size: 1.75rem; }
  .section-title.gradient-text { font-size: 1.5rem; }
  .feature-content h3 { font-size: 1.4rem; }

  .hero, .features, .how-it-works, .features-showcase, .testimonials, .faq, .get-started {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .static-gradient-button, .firefox-button {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }
}
