/* FLUX AI website — colors mirror lib/app_constant/kontext_theme_color.dart */
:root {
  --primary: #4600AF;
  --accent: #C14BEC;
  --gradient: linear-gradient(135deg, #4600AF 0%, #C14BEC 100%);
  --bg: #000000;
  --surface: #121212;
  --elevated: #1C1C1E;
  --border: #2A2A2E;
  --text: #FFFFFF;
  --text-2: #B0B0B5;
  --muted: #6B6B73;
  --nav-bg: rgba(0, 0, 0, 0.78);
  --glow-1: rgba(70, 0, 175, 0.55);
  --glow-2: rgba(193, 75, 236, 0.35);
  --nav-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  --radius: 18px;
  --max: 1120px;
  color-scheme: dark;
}

/* ===== LIGHT THEME (test) =====
   Delete this whole block to go back to the dark theme
   (and set <meta name="theme-color"> back to #000000 in the HTML files). */
:root {
  --accent: #A935D6;
  --bg: #F7F5FB;
  --surface: #FFFFFF;
  --elevated: #FFFFFF;
  --border: #E4DEEE;
  --text: #15121C;
  --text-2: #4D4858;
  --muted: #827C8E;
  --nav-bg: rgba(255, 255, 255, 0.82);
  --glow-1: rgba(70, 0, 175, 0.22);
  --glow-2: rgba(193, 75, 236, 0.20);
  --nav-shadow: 0 8px 24px rgba(40, 20, 80, 0.14);
  color-scheme: light;
}
/* ===== end LIGHT THEME ===== */

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

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

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: var(--nav-bg);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav .container { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 18px; letter-spacing: 0.5px; }
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--border); }
.nav-links { display: flex; gap: 26px; }
.nav-links a { color: var(--text-2); font-size: 15px; font-weight: 500; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--gradient); color: #fff; font-weight: 600; font-size: 15px;
  padding: 10px 18px; border-radius: 12px; white-space: nowrap;
}
.btn:hover { text-decoration: none; filter: brightness(1.1); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 88px 0 72px; text-align: center; }
.hero::before {
  content: ""; position: absolute; inset: -40% -20% auto; height: 640px; z-index: -1;
  background:
    radial-gradient(closest-side at 35% 50%, var(--glow-1), transparent),
    radial-gradient(closest-side at 65% 45%, var(--glow-2), transparent);
  filter: blur(20px);
}
.hero-icon { width: 104px; height: 104px; border-radius: 24px; margin: 0 auto 28px; border: 1px solid var(--border); box-shadow: 0 20px 60px rgba(70, 0, 175, 0.45); }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.hero h1 { font-size: clamp(36px, 6.4vw, 64px); line-height: 1.08; font-weight: 800; letter-spacing: -1.5px; margin: 0 auto 20px; max-width: 820px; }
.hero p.lead { font-size: clamp(17px, 2.2vw, 20px); color: var(--text-2); max-width: 640px; margin: 0 auto 34px; }
.play-badge { display: inline-block; }
.play-badge img { height: 72px; width: auto; }
.hero-note { margin-top: 14px; font-size: 14px; color: var(--muted); }

/* ---------- Sections ---------- */
section { padding: 80px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-head h2 { font-size: clamp(28px, 4.4vw, 42px); line-height: 1.15; letter-spacing: -1px; margin: 0 0 12px; font-weight: 800; }
.section-head p { color: var(--text-2); margin: 0; font-size: 17px; }

/* Features */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 24px;
}
.feature-icon {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  background: var(--gradient); margin-bottom: 18px;
}
.feature-icon svg { width: 24px; height: 24px; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.feature h3 { margin: 0 0 8px; font-size: 19px; font-weight: 700; }
.feature p { margin: 0; color: var(--text-2); font-size: 15px; }

/* Screenshots */
.showcase-wrap { position: relative; }
.showcase {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * 20px) / 4);
  gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding-block: 8px 32px;
  scrollbar-width: none;
}
.showcase::-webkit-scrollbar { display: none; }
.shot { margin: 0; scroll-snap-align: start; }
.shot img {
  width: 100%; height: auto; aspect-ratio: 621 / 1344;
  border-radius: 22px; background: var(--surface);
  box-shadow: 0 18px 50px rgba(70, 0, 175, 0.28);
}
.shot-nav {
  position: absolute; top: calc(50% - 12px); transform: translateY(-50%); z-index: 2;
  width: 48px; height: 48px; border-radius: 50%; padding: 0;
  display: grid; place-items: center; cursor: pointer;
  background: var(--elevated); color: var(--text);
  border: 1px solid var(--border); box-shadow: var(--nav-shadow);
  transition: opacity .2s, transform .15s;
}
.shot-nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.shot-nav:hover { transform: translateY(-50%) scale(1.06); border-color: var(--accent); }
.shot-nav.prev { left: -24px; }
.shot-nav.next { right: -24px; }
.shot-nav[disabled] { opacity: 0; pointer-events: none; }

/* FAQ */
.faq { max-width: 780px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 0 22px; }
.faq details[open] { border-color: rgba(193, 75, 236, 0.5); }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 28px 18px 0; position: relative;
  font-weight: 600; font-size: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  font-size: 22px; font-weight: 400; color: var(--accent);
}
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 18px; color: var(--text-2); font-size: 15px; }

/* CTA */
.cta {
  text-align: center; border-radius: 28px; padding: 56px 24px;
  background:
    radial-gradient(closest-side at 50% 0%, rgba(193, 75, 236, 0.35), transparent),
    var(--surface);
  border: 1px solid var(--border);
}
.cta h2 { font-size: clamp(26px, 4vw, 38px); margin: 0 0 10px; letter-spacing: -0.8px; }
.cta p { color: var(--text-2); margin: 0 0 28px; }

/* ---------- Footer ---------- */
.footer { background: var(--surface); border-top: 1px solid var(--border); padding: 40px 0; color: var(--muted); font-size: 14px; }
.footer-top {
  display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 24px; }
.footer-links a { color: var(--text-2); }
.footer-links a:hover { color: var(--text); text-decoration: none; }

/* ---------- Legal pages ---------- */
.legal { padding: 56px 0 80px; }
.legal .container { max-width: 800px; }
.legal h1 { font-size: clamp(32px, 5vw, 44px); letter-spacing: -1px; margin: 0 0 6px; }
.legal .updated { color: var(--muted); margin: 0 0 36px; font-size: 14px; }
.legal h2 { font-size: 22px; margin: 40px 0 12px; }
.legal h3 { font-size: 17px; margin: 24px 0 8px; }
.legal p, .legal li { color: var(--text-2); font-size: 15.5px; }
.legal strong { color: var(--text); }
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: 6px; }
.legal .callout { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 12px; padding: 16px 20px; margin: 20px 0; }
.legal .callout p { margin: 0; }
.legal .table-wrap { overflow-x: auto; }
.legal table { width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 12px 0 8px; }
.legal th, .legal td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; color: var(--text-2); }
.legal th { color: var(--text); font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .showcase { grid-auto-columns: calc((100% - 2 * 16px) / 2.6); gap: 16px; }
}
@media (max-width: 900px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .shot-nav { display: none; }
  .showcase {
    grid-auto-columns: 68%;
    margin-inline: -20px; padding-inline: 20px; scroll-padding-inline: 20px;
  }
}
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .nav-links { display: none; }
  .features-grid { grid-template-columns: 1fr; }
  section { padding: 60px 0; }
  .hero { padding: 64px 0 52px; }
  .play-badge img { height: 64px; }
  .showcase { margin-inline: -16px; padding-inline: 16px; scroll-padding-inline: 16px; }
  .footer-top { flex-direction: column; align-items: flex-start; }
}
