/*
 * Landing page stylesheet (logged-out visitors).
 * Standalone design with its own palette: warm paper, ink, and a deep
 * green accent. Adapts to dark mode via prefers-color-scheme.
 * Deliberately uses no gradients and no hover effects: colors are
 * identical at rest and on hover; interactive elements are always
 * visibly styled so they never rely on hover.
 */

/* The full-bleed hero/bands overflow the app's centered container. */
body:has(.landing) {
  overflow-x: clip;
}

.landing {
  /* Fixed palette — light */
  --lp-paper: #f6f4ec;
  --lp-raised: #fffdf6;
  --lp-ink: #1d1c15;
  --lp-muted: #5f5d4f;
  --lp-hairline: rgba(29, 28, 21, 0.14);
  --lp-line-strong: rgba(29, 28, 21, 0.38);
  --lp-accent: #236b45;
  --lp-accent-soft: rgba(35, 107, 69, 0.09);
  --lp-band: #191811;
  --lp-band-raised: #22201a;
  --lp-band-line: rgba(240, 236, 220, 0.12);
  --lp-band-text: #ece7d4;
  --lp-band-muted: #a19b85;
  --lp-band-accent: #5eb98a;

  width: 100vw;
  margin-left: calc(50% - 50vw);
  background-color: var(--lp-paper);
  color: var(--lp-ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
}

@media (prefers-color-scheme: dark) {
  .landing {
    /* Same design, dark paper */
    --lp-paper: #15140f;
    --lp-raised: #1f1e16;
    --lp-ink: #ece8d6;
    --lp-muted: #a29d89;
    --lp-hairline: rgba(236, 232, 214, 0.16);
    --lp-line-strong: rgba(236, 232, 214, 0.4);
    --lp-accent: #5eb98a;
    --lp-accent-soft: rgba(94, 185, 138, 0.14);
    --lp-band: #100f0a;
    --lp-band-raised: #1a1912;
  }
}

.landing ::selection {
  background-color: rgba(35, 107, 69, 0.22);
}

/* Layout */
.lp-wrap {
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 2.5rem);
}

.lp-section {
  padding-block: clamp(1rem, 5vw, 1rem);
}

.lp-section-head {
  text-align: center;
  margin-bottom: clamp(1.75rem, 3.5vw, 2.5rem);
}

.lp-h2 {
  max-width: 26ch;
  margin: 1rem auto 0;
  font-size: clamp(1.875rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.12;
  color: var(--lp-ink);
  text-wrap: balance;
}

/* Eyebrow labels */
.lp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.95rem;
  border: 1px solid var(--lp-hairline);
  border-radius: 999px;
  background-color: var(--lp-raised);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--lp-muted);
}

.lp-eyebrow::before {
  content: "";
  flex-shrink: 0;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background-color: var(--lp-accent);
}

/* Links */
.landing a:not(.lp-btn) {
  color: var(--lp-accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.landing a:not(.lp-btn):hover {
  color: var(--lp-accent); /* unchanged on hover */
}

.landing :is(a, button):focus-visible {
  outline: 2px solid var(--lp-accent);
  outline-offset: 3px;
}

/* Buttons */
.lp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 2rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1;
  text-align: center;
  text-decoration: none;
}

.lp-btn--primary {
  background-color: var(--lp-ink);
  border-color: var(--lp-ink);
  color: var(--lp-paper);
}

.lp-btn--primary:hover {
  background-color: var(--lp-ink); /* unchanged on hover */
  color: var(--lp-paper);
}

.lp-btn--ghost {
  border-color: var(--lp-line-strong);
  color: var(--lp-ink);
}

.lp-btn--ghost:hover {
  background-color: transparent; /* unchanged on hover */
  color: var(--lp-ink);
}

.lp-btn--cream {
  background-color: #f6f3e7;
  color: #17251b;
}

.lp-btn--cream:hover {
  background-color: #f6f3e7; /* unchanged on hover */
  color: #17251b;
}

/* Hero */
.lp-hero {
  padding-block: clamp(1rem, 6vw, 1rem) clamp(1rem, 6vw, 1rem);
  text-align: center;
}

.lp-hero-title {
  max-width: 18ch;
  margin: 1.25rem auto 1rem;
  font-size: clamp(2.75rem, 8vw, 5.5rem);
  font-weight: 700;
  line-height: 1.04;
  color: var(--lp-ink);
  text-wrap: balance;
}

.lp-hero-title em {
  position: relative;
  font-style: italic;
  white-space: nowrap;
}

.lp-hero-title em svg {
  position: absolute;
  left: 1%;
  bottom: -0.24em;
  width: 98%;
  height: 0.32em;
  color: var(--lp-accent);
  pointer-events: none;
}

.lp-hero-sub {
  max-width: 44ch;
  margin: 0 auto clamp(1.5rem, 3vw, 2rem);
  font-size: clamp(1.125rem, 2.2vw, 1.375rem);
  line-height: 1.55;
  color: var(--lp-muted);
}

.landing-hero__cta {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  max-width: 22rem;
  margin-inline: auto;
}

/* Dark demo band (fixed palette — the "input/output" contrast is
   intentional in both themes) */
.lp-band {
  background-color: var(--lp-band);
  color: var(--lp-band-text);
  padding-block: clamp(3rem, 6vw, 4.5rem);
}

.lp-band .lp-eyebrow {
  background-color: transparent;
  border-color: var(--lp-band-line);
  color: var(--lp-band-muted);
}

.lp-band .lp-eyebrow::before {
  background-color: var(--lp-band-accent);
}

.lp-band .lp-h2 {
  color: var(--lp-band-text);
}

.lp-demo {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: stretch;
}

.lp-demo-panel {
  border-radius: 1rem;
  border: 1px solid var(--lp-band-line);
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}

.lp-demo-panel--source {
  background-color: var(--lp-band-raised);
}

.lp-demo-panel--output {
  background-color: #fffdf6;
  border-color: rgba(29, 28, 21, 0.14);
  color: #1d1c15;
}

.lp-demo-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--lp-band-muted);
  border-bottom: 1px solid var(--lp-band-line);
}

.lp-demo-panel--output .lp-demo-bar {
  color: #6b6858;
  border-bottom-color: rgba(29, 28, 21, 0.12);
}

.lp-demo-dots {
  display: flex;
  gap: 0.35rem;
  flex-shrink: 0;
}

.lp-demo-dots span {
  width: 0.55rem;
  height: 0.55rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  opacity: 0.55;
}

.lp-demo-chip {
  margin-left: auto;
  padding: 0.15rem 0.55rem;
  border: 1px solid rgba(35, 107, 69, 0.55);
  border-radius: 999px;
  font-size: 0.62rem;
  text-transform: uppercase;
  color: #236b45;
}

.lp-src {
  margin: 0;
  padding: 1.25rem 1.25rem 1.4rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.75;
  color: #d9d3bd;
  white-space: pre;
  overflow-x: auto;
}

.lp-src .m {
  color: var(--lp-band-accent);
}

.lp-src .c {
  color: #847f6a;
}

.lp-demo-arrow {
  align-self: center;
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  margin-inline: auto;
  border-radius: 999px;
  background-color: #2e7d52;
  color: #f6f3e7;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
}

.lp-demo-arrow svg {
  width: 1.35rem;
  height: 1.35rem;
}

.lp-out {
  padding: 1.25rem 1.5rem 1.5rem;
}

.lp-out h3 {
  margin: 0 0 0.55rem;
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.2;
  color: #1d1c15;
}

.lp-out p {
  margin: 0 0 1.1rem;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: #3f3d33;
}

.lp-out-code {
  margin: 0 0 1.1rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid rgba(29, 28, 21, 0.12);
  border-radius: 0.5rem;
  background-color: #f1efe4;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #1d1c15;
  white-space: pre;
  overflow-x: auto;
}

.lp-out table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.lp-out th {
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid rgba(29, 28, 21, 0.2);
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  text-transform: uppercase;
  color: #6b6858;
}

.lp-out td {
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid rgba(29, 28, 21, 0.08);
  color: #3f3d33;
}

.lp-out tr:last-child td {
  border-bottom: 0;
}

.lp-demo-caption {
  margin: 1.5rem auto 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--lp-band-muted);
}

/* How it works */
.lp-steps-list {
  display: grid;
  gap: 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lp-step-num {
  display: block;
  font-size: clamp(2.5rem, 5vw, 3.25rem);
  font-weight: 700;
  line-height: 1;
  color: var(--lp-ink);
}

.lp-step-num i {
  font-style: normal;
  color: var(--lp-accent);
}

.lp-step h3 {
  margin: 0.85rem 0 0.4rem;
  font-size: 1.1875rem;
  font-weight: 700;
  color: var(--lp-ink);
}

.lp-step p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--lp-muted);
}

.landing code {
  padding: 0.08rem 0.35rem;
  border-radius: 0.3rem;
  background-color: var(--lp-accent-soft);
  font-family: var(--font-mono);
  font-size: 0.84em;
  color: var(--lp-ink);
}

/* Use cases */
.lp-uses {
  border-top: 1px solid var(--lp-hairline);
}

.lp-uses-grid {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lp-card {
  position: relative;
  padding: 1.5rem;
  background-color: var(--lp-raised);
  border: 1px solid var(--lp-hairline);
  border-radius: 1rem;
}

.lp-card-index {
  position: absolute;
  top: 1.4rem;
  right: 1.6rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--lp-muted);
  opacity: 0.75;
}

.lp-card-icon {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 1rem;
  border-radius: 0.75rem;
  background-color: var(--lp-accent-soft);
  color: var(--lp-accent);
}

.lp-card-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.lp-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--lp-ink);
}

.lp-card p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--lp-muted);
}

/* Final call to action (fixed palette) */
.lp-cta-band {
  background-color: #236b45;
  color: #f2efdf;
  text-align: center;
  padding-block: clamp(3.5rem, 7vw, 5rem);
}

.lp-cta-band h2 {
  max-width: 20ch;
  margin: 0 auto 1.1rem;
  font-size: clamp(2.125rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.08;
  color: #f6f3e7;
  text-wrap: balance;
}

.lp-cta-sub {
  max-width: 40ch;
  margin: 0 auto 1.75rem;
  font-size: 1.1875rem;
  line-height: 1.55;
  color: rgba(242, 239, 223, 0.85);
}

.lp-cta-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  max-width: 22rem;
  margin-inline: auto;
}

.lp-cta-signin {
  margin: 1.5rem 0 0;
  font-size: 0.9375rem;
  color: rgba(242, 239, 223, 0.8);
}

.landing .lp-cta-signin a {
  color: #f6f3e7;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(246, 243, 231, 0.55);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.landing .lp-cta-signin a:hover {
  color: #f6f3e7; /* unchanged on hover */
}

.lp-cta-band :focus-visible {
  outline: 2px solid #f6f3e7;
  outline-offset: 3px;
}

/* Footer line */
.lp-foot {
  margin: 0;
  padding: 1.5rem 0 0.75rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--lp-muted);
}

/* Responsive breakpoints */
@media (min-width: 640px) {
  .landing-hero__cta,
  .lp-cta-actions {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    max-width: none;
  }

  .lp-uses-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 860px) {
  .lp-demo {
    grid-template-columns: 1fr auto 1fr;
    gap: 1.25rem;
  }

  .lp-steps-list {
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
  }

  .lp-steps-list li {
    padding-inline: 2.25rem;
    border-left: 1px solid var(--lp-hairline);
  }

  .lp-steps-list li:first-child {
    border-left: 0;
    padding-left: 0;
  }
}

@media (max-width: 859.98px) {
  .lp-demo-arrow {
    transform: rotate(90deg);
  }

  .lp-steps-list li + li {
    border-top: 1px solid var(--lp-hairline);
    padding-top: 1.75rem;
  }
}

@media (min-width: 980px) {
  .lp-uses-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
