/* =============================================================================
 * Vinetas — main.css
 * Design system for the marketing site at https://vinetas.app
 *
 * Section structure (in order):
 *   1.  Design tokens (CSS custom properties, palette, type scale)
 *   2.  Dark-mode token overrides (@media prefers-color-scheme: dark)
 *   3.  Base resets & typography
 *   4.  Layout primitives (container, section, link, button)
 *   5.  Header & navigation (incl. mobile hamburger + .nav-open body class)
 *   6.  Hero
 *   7.  Features (six-card grid)
 *   8.  Free vs Pro comparison table
 *   9.  Style gallery (tile grid + "sample coming soon" placeholders)
 *   10. Screenshots row
 *   11. Pricing teaser
 *   12. FAQ accordion
 *   13. Lightbox overlay
 *   14. Footer
 *   15. Coming-soon overlay
 *   16. Responsive breakpoints (900px, 768px, 480px)
 * ========================================================================== */


/* -----------------------------------------------------------------------------
 * 1. Design tokens — palette, typography, spacing
 * --------------------------------------------------------------------------- */

:root {
  /* Palette — mid-century modern (Produciesta-derived) */
  --color-primary:        #2a7b8c;   /* teal */
  --color-primary-dark:   #1f5d6a;
  --color-primary-light:  #3a96aa;
  --color-secondary:      #c17f4a;   /* rust */
  --color-secondary-dark: #9c6238;
  --color-accent:         #d4a853;   /* gold */
  --color-accent-dark:    #b88c3a;
  --color-bg:             #faf8f5;   /* off-white */
  --color-bg-alt:         #f1ece2;   /* warm cream for alternating sections */
  --color-surface:        #ffffff;
  --color-text:           #1f2326;   /* near-black for body */
  --color-text-muted:     #5a6168;
  --color-border:         #e3ddd1;
  --color-overlay:        rgba(20, 22, 24, 0.86);
  --color-shadow:         rgba(31, 35, 38, 0.10);

  /* Typography */
  --font-body:    'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Roboto Condensed', 'Roboto', system-ui, sans-serif;

  --fs-base:  16px;
  --fs-sm:    0.875rem;
  --fs-md:    1rem;
  --fs-lg:    1.125rem;
  --fs-xl:    1.375rem;
  --fs-2xl:   1.75rem;
  --fs-3xl:   2.25rem;
  --fs-4xl:   3rem;
  --fs-5xl:   3.75rem;

  --lh-tight: 1.15;
  --lh-snug:  1.35;
  --lh-base:  1.55;

  /* Spacing scale */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.5rem;
  --space-6:  2rem;
  --space-7:  3rem;
  --space-8:  4rem;
  --space-9:  6rem;

  /* Layout */
  --container-max:   1180px;
  --container-pad:   1.5rem;
  --radius-sm:       4px;
  --radius-md:       8px;
  --radius-lg:       14px;
  --header-height:   72px;

  --shadow-sm: 0 1px 2px var(--color-shadow);
  --shadow-md: 0 4px 14px var(--color-shadow);
  --shadow-lg: 0 18px 48px rgba(31, 35, 38, 0.18);

  --transition-fast: 120ms ease-out;
  --transition-base: 200ms ease-out;
}


/* -----------------------------------------------------------------------------
 * 2. Dark mode token overrides
 * --------------------------------------------------------------------------- */

@media (prefers-color-scheme: dark) {
  :root {
    --color-primary:        #4fb0c4;
    --color-primary-dark:   #2a7b8c;
    --color-primary-light:  #7dcad8;
    --color-secondary:      #e09766;
    --color-secondary-dark: #c17f4a;
    --color-accent:         #e8c277;
    --color-accent-dark:    #d4a853;
    --color-bg:             #16191b;
    --color-bg-alt:         #1d2124;
    --color-surface:        #22272b;
    --color-text:           #ece8df;
    --color-text-muted:     #a3a8ad;
    --color-border:         #2f353a;
    --color-overlay:        rgba(0, 0, 0, 0.92);
    --color-shadow:         rgba(0, 0, 0, 0.55);
  }
}


/* -----------------------------------------------------------------------------
 * 3. Base resets & typography
 * --------------------------------------------------------------------------- */

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

html {
  font-size: var(--fs-base);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: var(--lh-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.nav-open { overflow: hidden; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--lh-tight);
  margin: 0 0 var(--space-4);
  letter-spacing: -0.01em;
}

h1 { font-size: var(--fs-5xl); }
h2 { font-size: var(--fs-4xl); }
h3 { font-size: var(--fs-2xl); }
h4 { font-size: var(--fs-xl); }
h5 { font-size: var(--fs-lg); }
h6 { font-size: var(--fs-md); text-transform: uppercase; letter-spacing: 0.08em; }

p { margin: 0 0 var(--space-4); }

img, picture, video { max-width: 100%; height: auto; display: block; }

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover, a:focus { color: var(--color-secondary); text-decoration: underline; }

:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

hr {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin: var(--space-7) 0;
}

code, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.95em;
}


/* -----------------------------------------------------------------------------
 * 4. Layout primitives
 * --------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}

.site-main { min-height: 60vh; }

.section {
  padding: var(--space-9) 0;
}

.section--alt { background-color: var(--color-bg-alt); }
.section--primary { background-color: var(--color-primary); color: #fff; }
.section--primary a { color: var(--color-accent); }

.section-head {
  text-align: center;
  max-width: 740px;
  margin: 0 auto var(--space-7);
}

.section-head p {
  color: var(--color-text-muted);
  font-size: var(--fs-lg);
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: var(--fs-sm);
  color: var(--color-secondary);
  margin-bottom: var(--space-3);
}

.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-md);
  letter-spacing: 0.04em;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  background: var(--color-primary);
  color: #fff;
  transition: background var(--transition-base), color var(--transition-base),
              border-color var(--transition-base), transform var(--transition-fast);
  text-decoration: none;
}

.btn:hover, .btn:focus {
  background: var(--color-primary-dark);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.btn--secondary {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn--secondary:hover, .btn--secondary:focus {
  background: var(--color-primary);
  color: #fff;
}

.btn--accent {
  background: var(--color-secondary);
}

.btn--accent:hover, .btn--accent:focus {
  background: var(--color-secondary-dark);
}


/* -----------------------------------------------------------------------------
 * 5. Header & navigation
 * --------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: saturate(180%) blur(6px);
}

.site-header-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-3) var(--container-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  min-height: var(--header-height);
}

.site-brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--color-text);
  line-height: 1.05;
}

.site-brand:hover { text-decoration: none; }

.site-brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-2xl);
  color: var(--color-primary);
  letter-spacing: -0.01em;
}

.site-brand-sub {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

.site-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.site-nav-list a {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--color-text);
  font-size: var(--fs-md);
  letter-spacing: 0.02em;
  padding: var(--space-2) var(--space-1);
}

.site-nav-list a:hover,
.site-nav-list a:focus {
  color: var(--color-primary);
  text-decoration: none;
  border-bottom: 2px solid var(--color-secondary);
}

/* Hamburger (mobile only). Bar styles share both states. */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: 0;
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text);
  border-radius: 1px;
  transition: transform var(--transition-base), opacity var(--transition-fast);
}

/* When the nav is open, animate the hamburger into a close icon. */
body.nav-open .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }


/* -----------------------------------------------------------------------------
 * 6. Hero
 * --------------------------------------------------------------------------- */

.hero {
  position: relative;
  padding: var(--space-9) 0 var(--space-8);
  background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-alt) 100%);
  overflow: hidden;
}

.hero-inner {
  display: grid;
  gap: var(--space-7);
  align-items: center;
}

.hero-banner {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.hero-headline {
  font-size: var(--fs-5xl);
  margin-bottom: var(--space-4);
}

.hero-sub {
  font-size: var(--fs-xl);
  color: var(--color-text-muted);
  max-width: 60ch;
  margin-bottom: var(--space-6);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}


/* -----------------------------------------------------------------------------
 * 7. Features — six-card grid
 * --------------------------------------------------------------------------- */

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-5);
}

.feature-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-bg-alt);
  color: var(--color-secondary);
  font-size: 1.75rem;
  margin-bottom: var(--space-4);
}

.feature-title {
  font-size: var(--fs-xl);
  margin-bottom: var(--space-3);
}

.feature-body {
  color: var(--color-text-muted);
  margin: 0;
}


/* -----------------------------------------------------------------------------
 * 8. Free vs Pro comparison table
 * --------------------------------------------------------------------------- */

.free-vs-pro {
  background: var(--color-bg-alt);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-6) 0;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.compare-table th,
.compare-table td {
  text-align: left;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}

.compare-table thead th {
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: var(--fs-sm);
}

.compare-table tbody tr:last-child td { border-bottom: 0; }

.compare-table .col-row-label {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-text);
  width: 40%;
}

.compare-table .check { color: var(--color-primary); font-weight: 700; }
.compare-table .dash  { color: var(--color-text-muted); }


/* -----------------------------------------------------------------------------
 * 9. Style gallery — tile grid + "sample coming soon" placeholder treatment
 * --------------------------------------------------------------------------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-5);
}

.gallery-tile {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

a.gallery-tile,
.gallery-tile[data-lightbox] {
  cursor: zoom-in;
  text-decoration: none;
  color: var(--color-text);
}

a.gallery-tile:hover,
a.gallery-tile:focus,
.gallery-tile[data-lightbox]:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

.gallery-tile img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--color-bg-alt);
}

.gallery-tile-body {
  padding: var(--space-4) var(--space-5) var(--space-5);
}

.gallery-tile-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-lg);
  margin: 0 0 var(--space-1);
  color: var(--color-text);
}

.gallery-tile-caption {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  margin: 0;
}

/* Placeholder tiles — not clickable. */
.gallery-tile--placeholder {
  cursor: default;
  opacity: 0.82;
}

.gallery-tile--placeholder .gallery-tile-img-wrap {
  position: relative;
  background:
    repeating-linear-gradient(
      45deg,
      var(--color-bg-alt) 0,
      var(--color-bg-alt) 12px,
      var(--color-border) 12px,
      var(--color-border) 13px
    );
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-tile--placeholder .gallery-tile-img-wrap::after {
  content: "Sample coming soon";
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  background: var(--color-surface);
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}


/* -----------------------------------------------------------------------------
 * 10. Screenshots row
 * --------------------------------------------------------------------------- */

.screenshots-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-5);
}

.screenshot-thumb {
  display: block;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  cursor: zoom-in;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.screenshot-thumb:hover,
.screenshot-thumb:focus {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

.screenshot-thumb img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.screenshot-caption {
  padding: var(--space-3) var(--space-4);
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}


/* -----------------------------------------------------------------------------
 * 11. Pricing teaser
 * --------------------------------------------------------------------------- */

.pricing-teaser {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  margin-top: var(--space-6);
}

.price-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-7);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.price-card--featured {
  border-color: var(--color-primary);
  border-width: 2px;
  box-shadow: var(--shadow-md);
  position: relative;
}

.price-card--featured::before {
  content: "Pro";
  position: absolute;
  top: -14px;
  right: var(--space-5);
  background: var(--color-secondary);
  color: #fff;
  padding: 0.25rem 0.75rem;
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
}

.price-amount {
  font-family: var(--font-display);
  font-size: var(--fs-4xl);
  font-weight: 700;
  color: var(--color-primary);
  margin: var(--space-3) 0;
  line-height: 1;
}

.price-amount-unit {
  font-size: var(--fs-md);
  color: var(--color-text-muted);
  font-weight: 400;
}

.price-list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-5);
}

.price-list li {
  padding: var(--space-2) 0;
  border-bottom: 1px dashed var(--color-border);
}

.price-list li:last-child { border-bottom: 0; }


/* -----------------------------------------------------------------------------
 * 12. FAQ accordion
 *     JS toggles aria-expanded + .is-open on .faq-item / .faq-question.
 * --------------------------------------------------------------------------- */

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

.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-item:first-child { border-top: 1px solid var(--color-border); }

.faq-question {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: var(--space-5) 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-lg);
  color: var(--color-text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
}

.faq-question::after {
  content: "+";
  font-size: var(--fs-2xl);
  color: var(--color-primary);
  transition: transform var(--transition-base);
  line-height: 1;
}

.faq-item.is-open .faq-question::after {
  content: "–";
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-base) ease-out, padding var(--transition-base);
  color: var(--color-text-muted);
}

.faq-item.is-open .faq-answer {
  max-height: 1000px;
  padding-bottom: var(--space-5);
}


/* -----------------------------------------------------------------------------
 * 13. Lightbox overlay
 * --------------------------------------------------------------------------- */

.lightbox {
  position: fixed;
  inset: 0;
  background: var(--color-overlay);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: var(--space-5);
}

.lightbox.is-open {
  display: flex;
}

.lightbox-content {
  max-width: min(96vw, 1400px);
  max-height: 92vh;
  position: relative;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 92vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

.lightbox-close {
  position: absolute;
  top: -48px;
  right: 0;
  background: transparent;
  border: 0;
  color: #fff;
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  cursor: pointer;
  padding: var(--space-2) var(--space-3);
}

.lightbox-close:hover,
.lightbox-close:focus {
  color: var(--color-accent);
}


/* -----------------------------------------------------------------------------
 * 14. Footer
 * --------------------------------------------------------------------------- */

.site-footer {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  padding: var(--space-7) 0 var(--space-6);
  margin-top: var(--space-9);
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
}

.site-footer-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-5);
}

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

.site-footer-links {
  display: flex;
  gap: var(--space-5);
  list-style: none;
  margin: 0;
  padding: 0;
}


/* -----------------------------------------------------------------------------
 * 15. Coming-soon overlay
 * --------------------------------------------------------------------------- */

.coming-soon-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  pointer-events: none;
}

.coming-soon-stamp {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 3rem;
  border: 8px solid #c41e3a;
  border-radius: 8px;
  transform: rotate(-15deg);
  background: rgba(255, 255, 255, 0.85);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 4px 16px rgba(0, 0, 0, 0.2),
    0 2px 8px rgba(0, 0, 0, 0.15);
  position: relative;
}

.coming-soon-stamp::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  right: 4px;
  bottom: 4px;
  border: 3px solid #c41e3a;
  border-radius: 4px;
}

.coming-soon-text {
  font-family: 'Impact', 'Arial Black', 'Helvetica Neue', sans-serif;
  font-size: clamp(3rem, 10vw, 7rem);
  font-weight: 900;
  color: #c41e3a;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  line-height: 1;
  text-shadow:
    2px 2px 0 rgba(196, 30, 58, 0.3),
    -1px -1px 0 rgba(196, 30, 58, 0.1);
  -webkit-text-stroke: 1px #c41e3a;
}

@media (max-width: 768px) {
  .coming-soon-stamp {
    padding: 1rem 2rem;
    border-width: 6px;
    transform: rotate(-12deg);
  }

  .coming-soon-stamp::before {
    border-width: 2px;
  }

  .coming-soon-text {
    font-size: clamp(2rem, 8vw, 4rem);
    letter-spacing: 0.1em;
  }
}

@media (max-width: 480px) {
  .coming-soon-stamp {
    padding: 0.5rem 1rem;
    border-width: 3px;
    transform: rotate(-10deg);
    max-width: 90vw;
  }

  .coming-soon-stamp::before {
    border-width: 2px;
  }
}


/* -----------------------------------------------------------------------------
 * 16. Responsive breakpoints
 *     900px — collapse 3-col grids to 2-col
 *     768px — engage mobile hamburger; stack hero
 *     480px — single-column everywhere; smaller type
 * --------------------------------------------------------------------------- */

@media (max-width: 900px) {
  :root {
    --fs-5xl: 3rem;
    --fs-4xl: 2.5rem;
  }

  .features-grid,
  .gallery-grid,
  .screenshots-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section { padding: var(--space-8) 0; }

  .hero { padding: var(--space-8) 0; }
}

@media (max-width: 768px) {
  :root {
    --fs-5xl: 2.5rem;
    --fs-4xl: 2.1rem;
    --fs-3xl: 1.9rem;
    --container-pad: 1.25rem;
  }

  /* Hamburger appears; nav becomes a slide-down panel toggled via .nav-open. */
  .nav-toggle { display: flex; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-base) ease-out;
  }

  body.nav-open .site-nav {
    max-height: 80vh;
  }

  .site-nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--space-3) 0;
  }

  .site-nav-list li {
    border-top: 1px solid var(--color-border);
  }

  .site-nav-list li:first-child { border-top: 0; }

  .site-nav-list a {
    display: block;
    padding: var(--space-4) var(--container-pad);
  }

  .site-nav-list a:hover,
  .site-nav-list a:focus {
    border-bottom: 0;
    background: var(--color-bg-alt);
  }

  .pricing-teaser {
    grid-template-columns: 1fr;
  }

  .site-footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .site-footer-links {
    justify-content: center;
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  :root {
    --fs-5xl: 2.1rem;
    --fs-4xl: 1.85rem;
    --fs-3xl: 1.6rem;
    --fs-2xl: 1.4rem;
    --space-9: 4rem;
    --space-8: 3rem;
    --container-pad: 1rem;
  }

  .features-grid,
  .gallery-grid,
  .screenshots-row {
    grid-template-columns: 1fr;
  }

  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { text-align: center; }

  .compare-table th,
  .compare-table td {
    padding: var(--space-3);
    font-size: var(--fs-sm);
  }

  .price-card { padding: var(--space-5); }

  .lightbox-close { top: -40px; }
}

/* ==========================================================================
 * 9. QA test plan page (layout: qa) — fixed ~800px reading column
 * ========================================================================== */
.qa-main {
  padding: var(--space-7) 0 var(--space-8);
}

.qa-doc {
  width: 800px;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 var(--container-pad);
  font-size: var(--fs-md);
  line-height: var(--lh-base);
  color: var(--color-text);
}

/* Headings */
.qa-doc h1 { font-size: var(--fs-3xl); margin: 0 0 var(--space-5); }
.qa-doc h2 {
  font-size: var(--fs-2xl);
  margin: var(--space-7) 0 var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 2px solid var(--color-border);
}
.qa-doc h3 { font-size: var(--fs-xl);  margin: var(--space-6) 0 var(--space-2); }
.qa-doc h4 { font-size: var(--fs-lg);  margin: var(--space-5) 0 var(--space-2); }

/* Body copy */
.qa-doc p,
.qa-doc ul,
.qa-doc ol { margin: 0 0 var(--space-4); }
.qa-doc li { margin-bottom: var(--space-2); }
.qa-doc strong { font-weight: 700; }

/* Rules between sections */
.qa-doc hr {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin: var(--space-6) 0;
}

/* Inline code + code blocks */
.qa-doc code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.875em;
  background: var(--color-bg-alt);
  padding: 0.1rem 0.35rem;
  border-radius: var(--radius-sm);
}
.qa-doc pre {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  overflow-x: auto;
  margin: 0 0 var(--space-4);
}
.qa-doc pre code { background: none; padding: 0; }

/* Blockquotes — used for "Note"/"Tester instruction" callouts */
.qa-doc blockquote {
  margin: 0 0 var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: var(--color-bg-alt);
  border-left: 4px solid var(--color-primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--color-text);
}
.qa-doc blockquote > :last-child { margin-bottom: 0; }

/* Tables — the plan is table-heavy; allow horizontal scroll if a row is wide */
.qa-doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 var(--space-5);
  font-size: var(--fs-sm);
}
.qa-doc th,
.qa-doc td {
  border: 1px solid var(--color-border);
  padding: var(--space-2) var(--space-3);
  text-align: left;
  vertical-align: top;
}
.qa-doc thead th {
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
}
.qa-doc tbody tr:nth-child(even) { background: var(--color-bg-alt); }

@media (max-width: 600px) {
  .qa-main { padding: var(--space-6) 0; }
  .qa-doc { font-size: var(--fs-sm); }
}

/* ---------------------------------------------------------------------------
 * Genre gallery carousels
 * Bootstrap's carousel *plugin* drives these (bootstrap.bundle.min.js); we do
 * NOT load Bootstrap's CSS (it would collide with .container / .btn). Instead
 * the slide mechanics + chrome are reproduced here, scoped to .genre-carousel,
 * using the site's own design tokens. Each tile slides FLUX.2 <-> PixArt.
 * --------------------------------------------------------------------------- */
.genre-tile { position: relative; }
.genre-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.genre-carousel { position: relative; }
.genre-carousel .carousel-inner { position: relative; width: 100%; overflow: hidden; }
.genre-carousel .carousel-item {
  position: relative;
  display: none;
  float: left;
  width: 100%;
  margin-right: -100%;
  backface-visibility: hidden;
  transition: transform 0.6s ease-in-out;
}
.genre-carousel .carousel-item.active,
.genre-carousel .carousel-item-next,
.genre-carousel .carousel-item-prev { display: block; }
.genre-carousel .carousel-item-next:not(.carousel-item-start),
.genre-carousel .active.carousel-item-end { transform: translateX(100%); }
.genre-carousel .carousel-item-prev:not(.carousel-item-end),
.genre-carousel .active.carousel-item-start { transform: translateX(-100%); }
@media (prefers-reduced-motion: reduce) {
  .genre-carousel .carousel-item { transition: none; }
}

/* The clickable image area (opens full-size PNG in the lightbox). */
.genre-slide {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--color-bg-alt);
  cursor: zoom-in;
}
.genre-slide img {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
  display: block;
}

/* White model indicator, bottom-right (HTML caption, not baked into the PNG). */
.model-badge {
  position: absolute;
  right: 0.55rem;
  bottom: 0.55rem;
  z-index: 2;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  padding: 0.18rem 0.5rem;
  border-radius: var(--radius-sm);
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

/* PixArt slide before its panels have landed. */
.genre-slide--pending {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  background:
    repeating-linear-gradient(
      45deg,
      var(--color-bg-alt) 0,
      var(--color-bg-alt) 12px,
      var(--color-border) 12px,
      var(--color-border) 13px
    );
}
.genre-pending-label {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  background: var(--color-surface);
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}

/* Prev/next controls — reveal on hover/focus. */
.genre-carousel .carousel-control-prev,
.genre-carousel .carousel-control-next {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 14%;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--transition-base);
}
.genre-carousel .carousel-control-prev { left: 0; }
.genre-carousel .carousel-control-next { right: 0; }
.genre-carousel:hover .carousel-control-prev,
.genre-carousel:hover .carousel-control-next,
.genre-carousel:focus-within .carousel-control-prev,
.genre-carousel:focus-within .carousel-control-next { opacity: 1; }
.genre-carousel .carousel-control-prev-icon,
.genre-carousel .carousel-control-next-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
}
.genre-carousel .carousel-control-prev-icon::before { content: "\2039"; }
.genre-carousel .carousel-control-next-icon::before { content: "\203A"; }

/* Slide indicators (which AI Model). */
.genre-carousel .carousel-indicators {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.55rem;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.genre-carousel .carousel-indicators [data-bs-target] {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: background var(--transition-base);
}
.genre-carousel .carousel-indicators .active { background: #fff; }

/* -----------------------------------------------------------------------------
 * Prose pages (layout: page) — hero band styled with brand tokens so it reads
 * correctly in both light and dark mode. Bootstrap (loaded only on these pages)
 * supplies the grid/containment; the brand color comes from here.
 * --------------------------------------------------------------------------- */

.page-hero {
  background-color: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
}

.page-hero-title {
  color: var(--color-primary);
  font-size: var(--fs-5xl);
  letter-spacing: -0.01em;
}

.page-hero-sub {
  color: var(--color-text-muted);
  font-size: var(--fs-lg);
}

/* Scoped copy of Bootstrap's a11y helper (we don't load Bootstrap CSS). */
.genre-carousel .visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
