/* Ensemble — marketing landing page styles.
 *
 * Self-contained. Brand tokens mirror brand/ensemble-tokens.css so the page
 * matches the app and re-themes from one place. See docs/design/landing-page.md.
 */

:root {
  /* Brand */
  --ensemble-violet: #7c3aed;
  --ensemble-cyan: #06b6d4;
  --ensemble-rose: #f43f5e;

  /* Ink & surface */
  --ensemble-ink: #0f172a;
  --ensemble-surface: #ffffff;

  /* Neutral scale */
  --ensemble-slate-50: #f8fafc;
  --ensemble-slate-100: #f1f5f9;
  --ensemble-slate-200: #e2e8f0;
  --ensemble-slate-300: #cbd5e1;
  --ensemble-slate-400: #94a3b8;
  --ensemble-slate-500: #64748b;
  --ensemble-slate-600: #475569;
  --ensemble-slate-700: #334155;
  --ensemble-slate-800: #1e293b;
  --ensemble-slate-900: #0f172a;

  /* Semantic */
  --ensemble-primary: var(--ensemble-violet);
  --ensemble-success: #10b981;
  --ensemble-warning: #f59e0b;
  --ensemble-danger: var(--ensemble-rose);

  /* Radius */
  --ensemble-radius-sm: 8px;
  --ensemble-radius-md: 12px;
  --ensemble-radius-lg: 16px;
  --ensemble-radius-xl: 24px;

  /* Page design vars */
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Helvetica, Arial,
    sans-serif;
  --container: 1120px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06),
    0 1px 3px rgba(15, 23, 42, 0.1);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08),
    0 2px 4px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 18px 40px rgba(15, 23, 42, 0.16),
    0 6px 12px rgba(15, 23, 42, 0.08);
  --violet-50: #f5f3ff;
  --violet-100: #ede9fe;
  --violet-200: #ddd6fe;
}

/* --- Base ---------------------------------------------------------------- */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ensemble-ink);
  background: var(--ensemble-surface);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 700;
}

h3 {
  font-size: 1.2rem;
  font-weight: 600;
}

p {
  margin: 0 0 1rem;
}

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

a:hover {
  text-decoration: underline;
}

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

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

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ensemble-violet);
  margin: 0 0 12px;
}

.lead {
  font-size: 1.15rem;
  color: var(--ensemble-slate-600);
}

.muted {
  color: var(--ensemble-slate-500);
}

.section {
  padding: 88px 0;
}

.section--alt {
  background: var(--ensemble-slate-50);
}

.section__head {
  max-width: 720px;
  margin: 0 auto 56px;
  text-align: center;
}

/* --- Buttons ------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-weight: 600;
  border-radius: var(--ensemble-radius-md);
  padding: 12px 22px;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 0.06s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
  white-space: nowrap;
}

.btn:hover {
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--ensemble-primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: #6d28d9;
  box-shadow: var(--shadow-md);
}

.btn-ghost {
  background: transparent;
  color: var(--ensemble-slate-700);
  border-color: var(--ensemble-slate-200);
}

.btn-ghost:hover {
  border-color: var(--ensemble-slate-300);
  background: var(--ensemble-slate-50);
}

.btn-lg {
  padding: 15px 28px;
  font-size: 1.05rem;
}

.btn-block {
  width: 100%;
}

.btn-on-dark {
  background: #fff;
  color: var(--ensemble-violet);
}

.btn-on-dark:hover {
  background: var(--ensemble-slate-100);
}

/* --- Nav ----------------------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--ensemble-slate-200);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--ensemble-ink);
}

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

.brand__mark {
  width: 30px;
  height: 30px;
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* --- Hero ---------------------------------------------------------------- */

.hero {
  padding: 84px 0 72px;
  background:
    radial-gradient(
      60% 60% at 85% 10%,
      rgba(124, 58, 237, 0.08),
      transparent 60%
    ),
    radial-gradient(
      50% 50% at 10% 90%,
      rgba(6, 182, 212, 0.08),
      transparent 60%
    );
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.hero h1 .accent {
  color: var(--ensemble-violet);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 26px 0 14px;
}

.hero__note {
  font-size: 0.9rem;
  color: var(--ensemble-slate-500);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.check-dot {
  color: var(--ensemble-success);
  font-weight: 700;
}

/* --- Photo + overlaid UI card ------------------------------------------- */

/* .photo frames a real lifestyle photograph (`.photo__img`). The brand gradient
 * below remains as a graceful fallback if the image fails to load. The
 * `--rose/--cyan/--warm` variants tint that fallback per section. */
.photo {
  position: relative;
  border-radius: var(--ensemble-radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 3;
  background:
    linear-gradient(135deg, rgba(124, 58, 237, 0.9), rgba(6, 182, 212, 0.85)),
    var(--ensemble-slate-300);
  isolation: isolate;
}

.photo--rose {
  background:
    linear-gradient(135deg, rgba(244, 63, 94, 0.88), rgba(124, 58, 237, 0.85)),
    var(--ensemble-slate-300);
}

.photo--cyan {
  background:
    linear-gradient(135deg, rgba(6, 182, 212, 0.9), rgba(16, 185, 129, 0.82)),
    var(--ensemble-slate-300);
}

.photo--warm {
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.85), rgba(244, 63, 94, 0.82)),
    var(--ensemble-slate-300);
}

/* Real photograph filling the .photo frame (the gradient remains as a
 * fallback if the image fails to load). */
.photo__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 0;
}

/* Floating UI card overlaid on a photo. */
.ui-card {
  position: absolute;
  background: #fff;
  border-radius: var(--ensemble-radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 14px 16px;
  width: min(300px, 82%);
  font-size: 0.85rem;
  z-index: 2;
}

.ui-card--br {
  right: -14px;
  bottom: 22px;
}

.ui-card--bl {
  left: -14px;
  bottom: 26px;
}

.ui-card--tr {
  right: -14px;
  top: 24px;
}

.ui-card__title {
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--ensemble-slate-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

.checkrow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
}

.checkrow + .checkrow {
  border-top: 1px solid var(--ensemble-slate-100);
}

.tick {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  display: inline-grid;
  place-items: center;
  font-size: 11px;
  color: #fff;
  background: var(--ensemble-success);
  flex: none;
}

.tick--empty {
  background: #fff;
  border: 1.5px solid var(--ensemble-slate-300);
}

.checkrow .who {
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--violet-50);
  color: var(--ensemble-violet);
}

.chip {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
}

.chip--violet {
  background: var(--violet-50);
  color: var(--ensemble-violet);
}

.chip--cyan {
  background: #ecfeff;
  color: #0e7490;
}

.chip--rose {
  background: #fff1f2;
  color: #be123c;
}

.chip--warn {
  background: #fffbeb;
  color: #b45309;
}

/* --- How it works -------------------------------------------------------- */

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

.step {
  background: #fff;
  border: 1px solid var(--ensemble-slate-200);
  border-radius: var(--ensemble-radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
}

.step__num {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--violet-50);
  color: var(--ensemble-violet);
  font-weight: 700;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}

/* --- Feature rows -------------------------------------------------------- */

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

.feature + .feature {
  margin-top: 96px;
}

.feature--flip .feature__media {
  order: -1;
}

.feature ul {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
}

.feature li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 12px;
  color: var(--ensemble-slate-700);
}

.feature li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 1px;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: var(--violet-50);
  color: var(--ensemble-violet);
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

/* --- Pricing ------------------------------------------------------------- */

.toggle {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--ensemble-slate-100);
  border-radius: 999px;
  margin: 0 auto 40px;
}

.toggle button {
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  background: transparent;
  color: var(--ensemble-slate-600);
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
}

.toggle button[aria-pressed="true"] {
  background: #fff;
  color: var(--ensemble-ink);
  box-shadow: var(--shadow-sm);
}

.plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 380px));
  gap: 28px;
  justify-content: center;
  align-items: stretch;
}

.plan {
  background: #fff;
  border: 1px solid var(--ensemble-slate-200);
  border-radius: var(--ensemble-radius-xl);
  padding: 32px;
  display: flex;
  flex-direction: column;
}

.plan--pro {
  border-color: var(--ensemble-violet);
  box-shadow: 0 0 0 1px var(--ensemble-violet), var(--shadow-md);
  position: relative;
}

.plan__badge {
  position: absolute;
  top: -12px;
  right: 24px;
  background: var(--ensemble-violet);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.plan__name {
  font-weight: 700;
  font-size: 1.3rem;
}

.plan__price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 14px 0 2px;
}

.plan__amount {
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.plan__per {
  color: var(--ensemble-slate-500);
  font-weight: 600;
}

.plan__sub {
  min-height: 20px;
  font-size: 0.88rem;
  color: var(--ensemble-slate-500);
  margin-bottom: 18px;
}

.plan ul {
  list-style: none;
  padding: 0;
  margin: 4px 0 26px;
  flex: 1;
}

.plan li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 11px;
  color: var(--ensemble-slate-700);
  font-size: 0.94rem;
}

.plan li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--ensemble-success);
  font-weight: 700;
}

.plan__foot {
  font-size: 0.8rem;
  color: var(--ensemble-slate-500);
  text-align: center;
  margin-top: 14px;
}

/* --- FAQ ----------------------------------------------------------------- */

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

.faq details {
  border-bottom: 1px solid var(--ensemble-slate-200);
  padding: 6px 0;
}

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 40px 18px 0;
  font-weight: 600;
  font-size: 1.05rem;
  position: relative;
}

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

.faq summary::after {
  content: "+";
  position: absolute;
  right: 6px;
  top: 15px;
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--ensemble-slate-400);
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq p {
  margin: 0 0 18px;
  color: var(--ensemble-slate-600);
}

/* --- CTA band ------------------------------------------------------------ */

.cta-band {
  background:
    radial-gradient(80% 120% at 100% 0%, rgba(6, 182, 212, 0.35), transparent 55%),
    linear-gradient(120deg, #6d28d9, #7c3aed);
  color: #fff;
  text-align: center;
  border-radius: var(--ensemble-radius-xl);
  padding: 64px 32px;
}

.cta-band h2 {
  color: #fff;
}

.cta-band p {
  color: rgba(255, 255, 255, 0.9);
  max-width: 560px;
  margin: 0 auto 28px;
  font-size: 1.1rem;
}

.cta-band .cta-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-band .btn-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}

.cta-band .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* --- Footer -------------------------------------------------------------- */

.footer {
  background: var(--ensemble-slate-900);
  color: var(--ensemble-slate-300);
  padding: 56px 0 40px;
}

.footer__grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
}

.footer .brand {
  color: #fff;
}

.footer__tag {
  margin: 12px 0 0;
  color: var(--ensemble-slate-400);
  font-size: 0.92rem;
}

.footer__links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer__links a {
  color: var(--ensemble-slate-300);
}

.footer__links a:hover {
  color: #fff;
}

.footer__legal {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--ensemble-slate-700);
  font-size: 0.85rem;
  color: var(--ensemble-slate-500);
}

/* --- Responsive ---------------------------------------------------------- */

@media (max-width: 900px) {
  .section {
    padding: 64px 0;
  }

  .hero__grid,
  .feature {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .feature--flip .feature__media {
    order: 0;
  }

  .feature + .feature {
    margin-top: 64px;
  }

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

  .plans {
    grid-template-columns: minmax(0, 420px);
  }

  .hero__media {
    margin-bottom: 8px;
  }
}

@media (max-width: 560px) {
  .nav__actions .btn-ghost {
    display: none;
  }

  .ui-card {
    position: static;
    width: 100%;
    margin-top: 14px;
    box-shadow: var(--shadow-md);
  }

  .photo {
    box-shadow: none;
    background: var(--ensemble-slate-100);
  }

  .hero__media,
  .feature__media {
    display: flex;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
  }
}
