/* FLUXA landing page. Same palette as the app (src/theme.css). */
:root {
  color-scheme: light;
  --bg: #f5f3ee;
  --bg-alt: #edeae3;
  --surface: #ffffff;
  --surface-2: #fbfaf7;
  --primary: #2d5a3d;
  --primary-lt: #e8f2ec;
  --on-primary: #ffffff;
  --text: #1c1c1a;
  --muted: #62625e;
  --border: #e0ddd6;
  --amber: #8b5e0a;
  --amber-lt: #f6ecd9;
  --card-back: #f1f7f2;
  --shadow: 0 1px 2px rgba(28, 28, 26, 0.06), 0 12px 32px rgba(28, 28, 26, 0.08);
  --radius: 14px;
  --radius-lg: 20px;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #141613;
    --bg-alt: #181b17;
    --surface: #1d201c;
    --surface-2: #242823;
    --primary: #7cc394;
    --primary-lt: #213528;
    --on-primary: #0f1a13;
    --text: #ecebe6;
    --muted: #a8a8a1;
    --border: #33382f;
    --amber: #d39a3a;
    --amber-lt: #3a2d17;
    --card-back: #1a2a1f;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 14px 36px rgba(0, 0, 0, 0.35);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img,
svg {
  display: block;
}
a {
  color: inherit;
}
code {
  font-family: ui-monospace, 'Cascadia Code', Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--primary-lt);
  color: var(--primary);
  padding: 1px 6px;
  border-radius: 6px;
}
h1,
h2,
h3 {
  line-height: 1.15;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}
h1 {
  font-size: clamp(2.3rem, 6vw, 3.8rem);
  font-weight: 750;
  letter-spacing: -0.025em;
}
h2 {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 700;
}
h3 {
  font-size: 1.1rem;
  font-weight: 650;
}
p {
  margin: 0 0 12px;
}

.wrap {
  width: min(1120px, 100% - 40px);
  margin-inline: auto;
}
.skip {
  position: absolute;
  left: -999px;
}
.skip:focus {
  left: 16px;
  top: 12px;
  z-index: 100;
  background: var(--surface);
  padding: 8px 12px;
  border-radius: 8px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 12px;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 650;
  text-decoration: none;
  border: 1px solid var(--primary);
  transition: transform 150ms ease, box-shadow 150ms ease;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(45, 90, 61, 0.25);
}
.btn:focus-visible,
a:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover {
  box-shadow: none;
  border-color: var(--primary);
}
.btn-small {
  min-height: 38px;
  padding: 0 14px;
  font-size: 0.92rem;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0 14px;
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-decoration: none;
  color: var(--primary);
}
.brand img {
  border-radius: 7px;
}
.nav nav {
  display: flex;
  gap: 22px;
  margin-left: auto;
  font-size: 0.95rem;
}
.nav nav a {
  text-decoration: none;
  color: var(--muted);
}
.nav nav a:hover {
  color: var(--text);
}
@media (max-width: 760px) {
  .nav nav {
    display: none;
  }
  .nav .btn-small {
    margin-left: auto;
  }
}

/* Hero */
.hero {
  padding: 72px 0 88px;
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.eyebrow {
  font-size: 0.85rem;
  font-weight: 650;
  color: var(--primary);
  letter-spacing: 0.02em;
  margin-bottom: 14px;
}
.lead {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 34em;
}
.fine {
  font-size: 0.88rem;
  color: var(--muted);
}
@media (max-width: 900px) {
  .hero {
    padding: 48px 0 64px;
  }
  .hero-inner {
    grid-template-columns: 1fr;
  }
}

/* Hero demo card */
.hero-visual {
  position: relative;
  min-height: 380px;
  display: grid;
  place-items: center;
}
.demo-stack {
  position: relative;
  width: min(360px, 88vw);
  height: 300px;
  perspective: 1400px;
}
.demo-card,
.demo-face {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
}
.demo-under {
  transform: translateY(12px) scale(0.955);
  opacity: 0.8;
}
.demo-under2 {
  transform: translateY(24px) scale(0.91);
  opacity: 0.5;
}
.demo-flip {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  animation: demo-flip 7s cubic-bezier(0.3, 0.7, 0.25, 1) infinite;
}
.demo-face {
  display: flex;
  flex-direction: column;
  padding: 18px 22px;
  box-shadow: var(--shadow);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.demo-back {
  background: var(--card-back);
  transform: rotateY(180deg);
}
.face-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--muted);
}
.pill {
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-weight: 650;
}
.pill-answer {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}
.demo-word {
  margin: auto 0 4px;
  text-align: center;
  font-size: 2.6rem;
  font-weight: 700;
}
.demo-hint {
  margin-bottom: auto;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}
.demo-echo {
  margin-top: 14px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}
.demo-answer {
  margin: auto 0;
  font-size: 1.2rem;
  line-height: 1.5;
}
@keyframes demo-flip {
  0%,
  38% {
    transform: rotateY(0deg);
  }
  48%,
  88% {
    transform: rotateY(180deg);
  }
  98%,
  100% {
    transform: rotateY(360deg);
  }
}
.demo-chip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}
.chip-video {
  top: 6%;
  right: 2%;
  color: var(--primary);
}
.chip-video .dot {
  width: 0;
  height: 0;
  border-left: 9px solid currentColor;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}
.chip-audio {
  bottom: 4%;
  left: 0;
  color: var(--amber);
}
.bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}
.bars i {
  width: 3px;
  background: currentColor;
  border-radius: 2px;
  animation: bars 1.1s ease-in-out infinite;
}
.bars i:nth-child(2) {
  animation-delay: -0.3s;
}
.bars i:nth-child(3) {
  animation-delay: -0.6s;
}
.bars i:nth-child(4) {
  animation-delay: -0.15s;
}
@keyframes bars {
  0%,
  100% {
    height: 30%;
  }
  50% {
    height: 100%;
  }
}
@media (max-width: 520px) {
  .chip-video {
    right: -4px;
    top: 0;
  }
}

/* Sections */
.section {
  padding: 84px 0;
}
.section-alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--border);
}
.section-lead {
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 40em;
  margin-bottom: 32px;
}
.grid {
  display: grid;
  gap: 16px;
}
.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}
.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}
.grid-5 {
  grid-template-columns: repeat(5, 1fr);
}
@media (max-width: 1000px) {
  .grid-4,
  .grid-5 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .grid-4,
  .grid-2,
  .grid-5 {
    grid-template-columns: 1fr;
  }
  .section {
    padding: 60px 0;
  }
}

.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.feature p,
.why-item p {
  color: var(--muted);
  margin: 0;
}
.icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--primary-lt);
  color: var(--primary);
  margin-bottom: 16px;
}
.icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.why {
  gap: 36px 48px;
  margin-top: 28px;
}
.why-item {
  border-left: 3px solid var(--primary);
  padding-left: 18px;
}

/* Community */
.community {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 900px) {
  .community {
    grid-template-columns: 1fr;
  }
}
.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 14px;
}
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  align-items: start;
}
.steps li::before {
  content: counter(step);
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 700;
  font-size: 0.9rem;
}
.library-preview {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.library-head {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  font-weight: 650;
}
.library-empty {
  padding: 28px 20px;
  color: var(--muted);
  background: repeating-linear-gradient(
    -45deg,
    transparent 0 14px,
    color-mix(in srgb, var(--border) 35%, transparent) 14px 15px
  );
}
.library-empty strong {
  color: var(--text);
}

/* Downloads */
.downloads {
  margin-bottom: 18px;
}
.dl {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color 150ms ease, transform 150ms ease;
}
a.dl:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}
.dl-name {
  font-weight: 700;
  font-size: 1.1rem;
}
.dl-desc {
  color: var(--muted);
  font-size: 0.9rem;
  flex: 1;
}
.dl-action {
  color: var(--primary);
  font-weight: 650;
  font-size: 0.92rem;
}
.dl.recommended {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}
.dl.recommended .dl-name::after {
  content: 'Your device';
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--primary-lt);
  color: var(--primary);
  font-size: 0.7rem;
  font-weight: 650;
  vertical-align: 3px;
}
.dl-soon {
  opacity: 0.8;
}
.dl-soon .dl-action {
  color: var(--amber);
}

/* Open source */
.oss {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px 48px;
  align-items: center;
}
@media (max-width: 800px) {
  .oss {
    grid-template-columns: 1fr;
  }
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: 0.9rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
}
.footer p {
  margin: 0;
}
.footer nav {
  display: flex;
  gap: 18px;
  margin-left: auto;
}
.footer nav a {
  text-decoration: none;
}
.footer nav a:hover {
  color: var(--text);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .demo-flip,
  .bars i {
    animation: none;
  }
  .btn,
  .dl {
    transition: none;
  }
}

/* Demo: video + screenshots in phone frames */
.hero {
  padding-bottom: 48px;
}
.demo {
  padding-top: 40px;
}
.demo-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: center;
  margin-bottom: 64px;
}
@media (max-width: 800px) {
  .demo-inner {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: left;
  }
  .demo-copy {
    justify-self: stretch;
  }
}
.phone {
  position: relative;
  border-radius: 34px;
  padding: 10px;
  background: #111311;
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.phone img,
.phone video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 390 / 844;
  border-radius: 25px;
  background: var(--bg);
}
.phone-video {
  width: min(300px, 78vw);
}
.shots {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.shot {
  margin: 0;
}
.shot .phone {
  border-radius: 28px;
  padding: 8px;
}
.shot .phone img {
  border-radius: 21px;
}
.shot figcaption {
  margin-top: 12px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
}
@media (max-width: 900px) {
  /* Swipeable strip on phones and tablets */
  .shots {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: min(220px, 62vw);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
    margin-inline: -20px;
    padding-inline: 20px;
    scrollbar-width: none;
  }
  .shots::-webkit-scrollbar {
    display: none;
  }
  .shot {
    scroll-snap-align: center;
  }
}

/* Community steps: keep each step's text in one column */
.steps li > span {
  min-width: 0;
  padding-top: 3px;
}
