/* ═══════════════════════════════════════════════════════════════
   Nano Banana Pro — Design System
   ═══════════════════════════════════════════════════════════════ */

/* 1. Tokens
   2. Reset & Base
   3. Layout
   4. Navigation
   5. Buttons
   6. Hero
   7. Sections & Typography
   8. Feature Cards
   9. Gallery (Masonry)
  10. Before / After
  11. Steps
  12. FAQ
  13. Footer
  14. Media Queries
  15. Accessibility
   ═══════════════════════════════════════════════════════════════ */


/* ── 1. Tokens ─────────────────────────────────────────────── */

:root {
  /* Background layers */
  --bg:          #070910;
  --bg-raised:   #0b0e18;
  --surface:     #0f1320;
  --card:        #121728;

  /* Text */
  --text:        #edf0f8;
  --muted:       #6e7a90;
  --subtle:      #3a4156;

  /* Brand */
  --primary:     #6b5fff;
  --primary-lo:  rgba(107, 95, 255, 0.15);
  --primary-md:  rgba(107, 95, 255, 0.25);
  --accent:      #3fc4f0;
  --accent-lo:   rgba(63, 196, 240, 0.12);

  /* Shadows */
  --shadow:      0 40px 80px rgba(0, 0, 0, 0.65);
  --shadow-card: 0 8px 28px rgba(0, 0, 0, 0.4);
  --shadow-sm:   0 4px 14px rgba(0, 0, 0, 0.3);

  /* Geometry */
  --radius:      20px;
  --radius-sm:   14px;
  --radius-xs:   8px;
  --max-width:   1160px;

  /* Borders */
  --border:      1px solid rgba(255, 255, 255, 0.07);
  --border-hi:   1px solid rgba(255, 255, 255, 0.13);
}


/* ── 2. Reset & Base ───────────────────────────────────────── */

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", "SF Pro Display", -apple-system, "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background:
    radial-gradient(ellipse 1600px 800px at 72% -8%,  rgba(107, 95, 255, 0.22) 0%, transparent 58%),
    radial-gradient(ellipse 900px  700px at -8% 88%,  rgba(63, 196, 240, 0.10) 0%, transparent 55%),
    radial-gradient(ellipse 600px  400px at 50% 110%, rgba(107, 95, 255, 0.08) 0%, transparent 60%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

h1, h2, h3, h4 {
  margin: 0;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

p {
  margin: 0;
}


/* ── 3. Layout ─────────────────────────────────────────────── */

.container {
  width: min(100% - 40px, var(--max-width));
  margin: 0 auto;
}


/* ── 4. Navigation ─────────────────────────────────────────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  background: rgba(7, 9, 16, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  color: var(--text);
}

.logo-mark {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 20px;
  font-size: 0.875rem;
  font-weight: 450;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.nav-links a {
  transition: color 0.18s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--text);
}


/* ── 5. Buttons ────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    background 0.22s ease,
    border-color 0.22s ease;
  white-space: nowrap;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.btn-primary {
  background: linear-gradient(135deg, #7b6dff 0%, #5a49ff 100%);
  color: #fff;
  box-shadow: 0 6px 20px rgba(107, 95, 255, 0.32);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(107, 95, 255, 0.44);
}

.btn-ghost {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.05);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.18);
}


/* ── 6. Hero ───────────────────────────────────────────────── */

.hero {
  padding: 112px 0 88px;
}

.hero-grid {
  display: grid;
  gap: 56px;
  align-items: center;
  grid-template-columns: 1fr 1fr;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  margin-bottom: 20px;
}

.hero-copy h1 {
  font-size: clamp(2.4rem, 3.8vw, 3.8rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin-bottom: 20px;
  color: var(--text);
}

.subhead {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 480px;
  font-weight: 400;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 32px 0 32px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.mock-card {
  background: var(--card);
  border-radius: var(--radius);
  border: var(--border);
  overflow: hidden;
  box-shadow: var(--shadow), 0 0 0 1px rgba(255,255,255,0.04) inset;
  max-width: 380px;
  width: 100%;
  position: relative;
}

.mock-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(107,95,255,0.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: 1;
}

.mock-images {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

.mock-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.mock-img.active {
  opacity: 1;
}

.mock-header {
  display: flex;
  gap: 7px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mock-header span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}

.mock-footer {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px 14px;
  font-size: 0.78rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  letter-spacing: 0.02em;
}


/* ── 7. Sections & Typography ──────────────────────────────── */

.section {
  padding: 104px 0;
}

.section.muted {
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(11, 14, 24, 0.6) 10%,
    rgba(11, 14, 24, 0.6) 90%,
    transparent
  );
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 56px;
}

.section-head h2 {
  font-size: clamp(1.8rem, 2.6vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  color: var(--text);
}

.section-head p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 500px;
}

/* What is Nano Banana — centered block */
.what-is__block {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  padding: 2rem 2.5rem;
  background: linear-gradient(135deg, rgba(107, 95, 255, 0.06) 0%, rgba(63, 196, 240, 0.04) 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
}

.what-is__title {
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 1rem;
}

.what-is__lead {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 1rem;
}

.what-is__lead strong {
  color: var(--primary);
}

.what-is__note {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--muted);
}


/* ── 8. Feature Cards ──────────────────────────────────────── */

.grid {
  display: grid;
  gap: 20px;
}

.features-grid {
  grid-template-columns: repeat(3, 1fr);
}

.card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.042) 0%,
    rgba(255, 255, 255, 0.015) 60%,
    transparent 100%
  );
  border-radius: var(--radius);
  border: var(--border);
  padding: 30px 32px;
  transition:
    border-color 0.28s ease,
    transform    0.28s ease,
    box-shadow   0.28s ease;
}

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

.card:hover {
  border-color: rgba(255, 255, 255, 0.11);
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px rgba(107, 95, 255, 0.12),
    0 20px 48px rgba(0, 0, 0, 0.45);
}

.card h3 {
  margin: 0 0 10px;
  font-size: 0.975rem;
  font-weight: 640;
  letter-spacing: -0.015em;
  color: var(--text);
  line-height: 1.3;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
}


/* ── 9. Gallery (Masonry) ──────────────────────────────────── */

.masonry {
  column-count: 4;
  column-gap: 14px;
}

.tile {
  break-inside: avoid;
  margin-bottom: 14px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
}

.tile::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.35) 0%, transparent 44%);
  opacity: 0;
  transition: opacity 0.32s ease;
  pointer-events: none;
}

.tile:hover::after {
  opacity: 1;
}

.tile img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0;
  transition: transform 0.42s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

.tile:hover img {
  transform: scale(1.04);
}

@media (max-width: 1020px) {
  .masonry { column-count: 3; }
}

@media (max-width: 680px) {
  .masonry { column-count: 2; }
}

@media (max-width: 420px) {
  .masonry { column-count: 1; }
}


/* ── 10. Before / After ────────────────────────────────────── */

.ba-section {
  padding: 104px 0 120px;
}

.ba-section-head {
  align-items: center;
  text-align: center;
  margin-bottom: 56px;
}

.ba-section-head h2 {
  font-size: clamp(1.8rem, 2.6vw, 2.8rem);
  letter-spacing: -0.035em;
  color: var(--text);
}

.ba-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
}

.ba-slider {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  touch-action: none;
  cursor: ew-resize;
  box-shadow: var(--shadow);
  transition:
    box-shadow 0.35s ease,
    transform  0.35s ease;
  -webkit-user-select: none;
  user-select: none;
  border: var(--border);
}

.ba-slider:hover {
  box-shadow: 0 48px 100px rgba(0, 0, 0, 0.72), 0 0 0 1px rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

.ba-slider img {
  border-radius: 0;
}

.ba-before {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ba-after {
  position: absolute;
  inset: 0;
  overflow: hidden;
  clip-path: inset(0 0 0 var(--split, 50%));
}

.ba-after img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Handle line */
.ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: rgba(255, 255, 255, 0.35);
  cursor: ew-resize;
  outline: none;
  z-index: 3;
  transition: background 0.2s ease;
}

.ba-slider:hover .ba-handle {
  background: rgba(255, 255, 255, 0.55);
}

/* Knob */
.ba-handle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: rgba(12, 14, 22, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition:
    transform  0.22s ease,
    box-shadow 0.22s ease;
}

.ba-slider:hover .ba-handle::after {
  transform: translate(-50%, -50%) scale(1.2);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.6), 0 0 0 5px rgba(255, 255, 255, 0.05);
}

.ba-handle:focus-visible {
  background: rgba(255, 255, 255, 0.7);
}

.ba-handle:focus-visible::after {
  box-shadow: 0 0 0 3px rgba(63, 196, 240, 0.5), 0 4px 16px rgba(0, 0, 0, 0.4);
}

/* Labels */
.ba-label {
  position: absolute;
  bottom: 14px;
  z-index: 4;
  padding: 3px 9px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  pointer-events: none;
  user-select: none;
  line-height: 1.5;
}

.ba-label-left  { left: 14px; }
.ba-label-right { right: 14px; }


/* ── 11. Steps ─────────────────────────────────────────────── */

.steps-grid {
  grid-template-columns: repeat(3, 1fr);
}

.step-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.step-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-lo);
  color: var(--accent);
  border: 1px solid rgba(107, 95, 255, 0.18);
  flex-shrink: 0;
}

.step-icon svg {
  width: 24px;
  height: 24px;
}


/* ── 12. FAQ ───────────────────────────────────────────────── */

.faq {
  display: grid;
  gap: 10px;
}

.faq-item {
  border-radius: var(--radius-sm);
  border: var(--border);
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.03) 0%,
    transparent 100%
  );
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.faq-item[open] {
  border-color: rgba(255, 255, 255, 0.11);
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.94rem;
  padding: 20px 24px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  color: var(--text);
  letter-spacing: -0.01em;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-size: 1.25rem;
  line-height: 1;
  color: var(--subtle);
  font-weight: 300;
  flex-shrink: 0;
  transition: transform 0.2s ease, color 0.2s ease;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
  color: var(--muted);
}

.faq-item p {
  color: var(--muted);
  padding: 0 24px 22px;
  font-size: 0.92rem;
  line-height: 1.7;
}


/* ── 13. Footer ────────────────────────────────────────────── */

.footer {
  padding: 56px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-inner {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  color: var(--muted);
  font-size: 0.875rem;
}

.footer-inner strong {
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: -0.01em;
  display: block;
  margin-bottom: 6px;
}

.footer-inner p {
  color: var(--muted);
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: var(--muted);
  font-size: 0.875rem;
  transition: color 0.18s ease;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--text);
}

.footer-meta {
  text-align: right;
  color: var(--subtle);
  font-size: 0.8rem;
  align-self: end;
}


/* ── 14. Media Queries ─────────────────────────────────────── */

@media (max-width: 1000px) {
  .hero-grid {
    grid-template-columns: 1fr;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
  }

  .subhead {
    max-width: 100%;
  }

  .cta-row {
    justify-content: center;
  }

  .chip-row {
    justify-content: center;
  }

  .hero-visual {
    order: -1;
  }

  .mock-card {
    max-width: 320px;
  }
}

@media (max-width: 900px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 880px) {
  .nav-links {
    display: none;
  }

  .footer-meta {
    text-align: left;
  }
}

@media (max-width: 560px) {
  .features-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 80px 0;
  }

  .hero {
    padding: 80px 0 64px;
  }

  .card {
    padding: 24px;
  }

  .ba-section {
    padding: 80px 0 88px;
  }

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


/* ── 15. Accessibility ─────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .tile img {
    transition: none;
  }

  .ba-slider,
  .ba-slider:hover {
    transition: none;
    transform: none;
  }

  .ba-handle,
  .ba-handle::after {
    transition: none;
    transform: translate(-50%, -50%);
  }
}
