/* ==========================================================================
   Vibe Code AI — multi-product download site (VibeSplit + VibeShift EU)
   DougState Spring2 · dark (default) + light buff · Helvetica
   ========================================================================== */

:root,
[data-theme="dark"] {
  color-scheme: dark;

  --ds-burgundy: #400101;
  --ds-red: #f22f31;
  --ds-gold: #d3a567;
  --ds-teal: #038c8c;

  /* Fallback solid if gradient unsupported */
  --ds-bg: #3ab498;
  --ds-bg-image: linear-gradient(
    180deg,
    rgba(58, 180, 152, 1) 0%,
    rgba(253, 29, 122, 1) 50%,
    rgba(252, 176, 69, 1) 100%
  );
  --ds-card: rgba(0, 0, 0, 0.28);
  --ds-border: rgba(255, 255, 255, 0.22);
  --ds-text: #f7efe8;
  --ds-muted: #f0e4d8;

  --ds-code-bg: rgba(0, 0, 0, 0.45);
  --ds-code-inline-bg: rgba(0, 0, 0, 0.35);
  --ds-header-bg: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.35) 0%,
    rgba(0, 0, 0, 0.18) 100%
  );
  --ds-cta-band: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.32),
    rgba(0, 0, 0, 0.12) 40%,
    rgba(0, 0, 0, 0.22)
  );
  --ds-shot-img-bg: rgba(0, 0, 0, 0.25);
  --ds-secondary-hover: rgba(255, 255, 255, 0.12);

  --ds-gradient: linear-gradient(
    90deg,
    #400101 0%,
    #f22f31 38%,
    #d3a567 70%,
    #038c8c 100%
  );

  --font: Helvetica, "Helvetica Neue", Arial, sans-serif;
  --max: 1080px;
  --radius: 10px;
  --header-h: 72px;
}

/* Light mode — warm buff / parchment surface (DougState cream family) */
[data-theme="light"] {
  color-scheme: light;

  --ds-bg: #e8dcc8; /* buff */
  --ds-bg-image:
    radial-gradient(ellipse 60% 40% at 10% 0%, rgba(242, 47, 49, 0.08), transparent 55%),
    radial-gradient(ellipse 50% 35% at 90% 10%, rgba(3, 140, 140, 0.08), transparent 50%);
  --ds-card: rgba(255, 252, 245, 0.72);
  --ds-border: rgba(64, 1, 1, 0.14);
  --ds-text: #1a0c0c;
  --ds-muted: #5c4a42;

  --ds-code-bg: rgba(255, 252, 245, 0.9);
  --ds-code-inline-bg: rgba(64, 1, 1, 0.08);
  --ds-header-bg: linear-gradient(
    180deg,
    rgba(247, 239, 232, 0.96) 0%,
    rgba(232, 220, 200, 0.94) 100%
  );
  --ds-cta-band: linear-gradient(
    135deg,
    rgba(247, 239, 232, 0.95),
    rgba(232, 220, 200, 0.55) 45%,
    rgba(3, 140, 140, 0.08)
  );
  --ds-shot-img-bg: #d4c4ae;
  --ds-secondary-hover: rgba(211, 165, 103, 0.28);

  /* Gold reads darker on buff for labels/links */
  --ds-gold: #9a7340;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ds-text);
  background-color: var(--ds-bg);
  background-image: var(--ds-bg-image);
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: cover;
  min-height: 100vh;
  transition: background-color 0.2s ease, color 0.2s ease;
}

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

a {
  color: var(--ds-gold);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--ds-teal);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  color: var(--ds-gold);
  background: var(--ds-code-inline-bg);
  padding: 0.12em 0.4em;
  border-radius: 4px;
}

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Spring2 hero accent bar */
.accent-bar {
  height: 3px;
  background: var(--ds-gradient);
  position: sticky;
  top: 0;
  z-index: 50;
}

/* Header ------------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 3px;
  z-index: 40;
  backdrop-filter: blur(10px);
  background: var(--ds-header-bg);
  border-bottom: 1px solid var(--ds-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem 1rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Theme toggle ------------------------------------------------------------- */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--ds-gold);
  border-radius: 999px;
  background: transparent;
  color: var(--ds-text);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  line-height: 1;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.theme-toggle:hover {
  background: var(--ds-secondary-hover);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--ds-teal);
  outline-offset: 2px;
}

.theme-toggle-icon {
  display: inline-flex;
  width: 1.1em;
  height: 1.1em;
  position: relative;
}

.theme-toggle-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

/* Show sun in dark mode (action = go light); moon in light mode */
.theme-toggle .icon-sun {
  display: none;
}
.theme-toggle .icon-moon {
  display: block;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}
[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

[data-theme="light"] .theme-toggle .icon-sun {
  display: none;
}
[data-theme="light"] .theme-toggle .icon-moon {
  display: block;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: inherit;
  text-decoration: none;
}

.brand:hover {
  color: inherit;
}

.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--ds-border);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.brand-name {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-sub {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ds-gold);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1rem;
}

.nav a {
  color: var(--ds-muted);
  text-decoration: none;
  font-size: 0.92rem;
}

.nav a:hover {
  color: var(--ds-text);
}

.nav-github {
  color: var(--ds-text) !important;
  border: 1px solid var(--ds-gold);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
}

.nav-github:hover {
  background: var(--ds-secondary-hover);
  color: var(--ds-text) !important;
}

/* Hero -------------------------------------------------------------------- */
.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 2rem;
  padding: 3rem 0 2.5rem;
  align-items: start;
}

.eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ds-gold);
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.lede {
  margin: 0 0 1.5rem;
  font-size: 1.12rem;
  color: var(--ds-muted);
  max-width: 36rem;
}

.hero-meta {
  margin: 1rem 0 0;
  font-size: 0.85rem;
  color: var(--ds-muted);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: stretch;
}

.cta-row.tight {
  margin-top: 1rem;
}

.btn {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 0.15rem;
  padding: 0.85rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  line-height: 1.2;
}

.btn-sm {
  padding: 0.55rem 0.9rem;
  font-size: 0.92rem;
}

.btn-primary {
  background: var(--ds-red);
  color: #fff;
}

.btn-primary:hover {
  background: #d41f21;
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--ds-text);
  border-color: var(--ds-gold);
}

.btn-secondary:hover {
  background: var(--ds-secondary-hover);
  color: var(--ds-text);
}

.btn-meta {
  font-size: 0.72rem;
  font-weight: 500;
  opacity: 0.9;
}

.hero-card,
.panel,
.feature {
  background: var(--ds-card);
  border: 1px solid var(--ds-border);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
}

.hero-card {
  padding: 1.35rem 1.4rem;
  border-left: 4px solid var(--ds-gold);
}

.card-title {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ds-gold);
}

.steps {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
  color: var(--ds-muted);
}

.steps li + li {
  margin-top: 0.4rem;
}

.steps.compact {
  margin-bottom: 0;
}

.steps strong {
  color: var(--ds-text);
}

.code-block {
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  overflow-x: auto;
  background: var(--ds-code-bg);
  border: 1px solid var(--ds-border);
  border-radius: 8px;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--ds-text);
}

.code-block code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

.link-inline {
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

/* Sections ---------------------------------------------------------------- */
.section {
  padding: 2.5rem 0;
}

.section-head {
  margin-bottom: 1.5rem;
  max-width: 40rem;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.015em;
}

.section-lede {
  margin: 0.65rem 0 0;
  color: var(--ds-muted);
  max-width: 36rem;
}

/* Product catalog cards --------------------------------------------------- */
.product-glance {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.product-glance li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.35rem 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px dashed var(--ds-border);
  color: var(--ds-muted);
  font-size: 0.95rem;
}

.product-glance li:last-child {
  border-bottom: none;
}

.product-glance a {
  text-decoration: none;
  color: var(--ds-text);
}

.product-glance a:hover {
  color: var(--ds-teal);
}

.product-glance strong {
  font-size: 1rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.15rem;
}

.product-card {
  background: var(--ds-card);
  border: 1px solid var(--ds-border);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
  padding: 1.4rem 1.45rem 1.5rem;
  border-top: 3px solid var(--ds-gold);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.product-card h3 {
  margin: 0;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}

.product-tag {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ds-gold);
}

.product-lede {
  margin: 0;
  color: var(--ds-muted);
  font-size: 0.98rem;
}

.product-points {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--ds-muted);
  font-size: 0.92rem;
  flex: 1;
}

.product-points li + li {
  margin-top: 0.35rem;
}

.product-card .cta-row {
  margin-top: 0.25rem;
}

/* Per-product detail blocks ----------------------------------------------- */
.product-section {
  border-top: 1px solid var(--ds-border);
  scroll-margin-top: calc(var(--header-h) + 1.25rem);
}

.product-section-head {
  max-width: none;
}

.product-section-head .section-lede {
  max-width: 40rem;
}

.subsection {
  margin-top: 2.25rem;
}

.subsection-title {
  margin: 0;
  font-size: clamp(1.2rem, 2.5vw, 1.55rem);
  letter-spacing: -0.015em;
}

.panel-subhead {
  margin: 1.15rem 0 0.65rem !important;
  font-size: 0.95rem !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ds-gold);
}

.footer-links {
  text-align: right;
}

/* Screenshots gallery ----------------------------------------------------- */
.shot-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.1rem;
}

.shot {
  margin: 0;
  background: var(--ds-card);
  border: 1px solid var(--ds-border);
  border-radius: var(--radius);
  overflow: hidden;
  backdrop-filter: blur(8px);
}

.shot a {
  display: block;
  text-decoration: none;
  color: inherit;
}

.shot img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top left;
  border-bottom: 1px solid var(--ds-border);
  background: var(--ds-shot-img-bg);
  transition: opacity 0.15s ease;
}

.shot a:hover img {
  opacity: 0.92;
}

.shot figcaption {
  padding: 0.85rem 1rem 1rem;
  font-size: 0.9rem;
  color: var(--ds-muted);
  line-height: 1.4;
}

.shot figcaption strong {
  display: block;
  color: var(--ds-text);
  margin-bottom: 0.2rem;
  font-size: 0.95rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.feature {
  padding: 1.2rem 1.25rem;
}

.feature h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
}

.feature p {
  margin: 0;
  color: var(--ds-muted);
  font-size: 0.95rem;
}

.install-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.panel {
  padding: 1.25rem 1.35rem;
}

.panel h3 {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
}

.panel p {
  margin: 0;
  color: var(--ds-muted);
}

.two-col {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1rem;
}

.meta-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.meta-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px dashed var(--ds-border);
  color: var(--ds-text);
  font-size: 0.95rem;
}

.meta-list li span {
  color: var(--ds-gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  font-weight: 600;
  flex-shrink: 0;
  align-self: center;
}

.note {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ds-muted);
}

/* CTA band ---------------------------------------------------------------- */
.cta-band {
  padding-bottom: 3rem;
}

.cta-band-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 1.5rem;
  padding: 1.5rem 1.6rem;
  background-color: var(--ds-card);
  border: 1px solid var(--ds-border);
  border-radius: var(--radius);
  background-image: var(--ds-cta-band);
}

.cta-logo {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--ds-border);
}

.cta-band-inner h2 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
}

.cta-band-inner p {
  margin: 0;
  color: var(--ds-muted);
}

.cta-band-inner > div:nth-child(2) {
  flex: 1 1 14rem;
}

/* Footer ------------------------------------------------------------------ */
.site-footer {
  border-top: 1px solid var(--ds-border);
  padding: 1.5rem 0 2rem;
  color: var(--ds-muted);
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ds-text);
}

.footer-brand img {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--ds-border);
}

.site-footer p {
  margin: 0;
}

/* Responsive -------------------------------------------------------------- */
@media (max-width: 900px) {
  .hero,
  .feature-grid,
  .install-grid,
  .two-col,
  .shot-grid,
  .product-grid {
    grid-template-columns: 1fr;
  }

  .nav {
    display: none;
  }

  /* Keep theme control available when nav collapses */
  .theme-toggle {
    flex-shrink: 0;
  }

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

@media (max-width: 520px) {
  .btn {
    width: 100%;
    align-items: center;
    text-align: center;
  }

  .meta-list li {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
}
