/* ============================================================================
   landing.css — public marketing pages (Home/Index landing + Billing/Plans).
   Layers on arndly-tokens.css + console.css; loaded per-view via the _Layout
   "Styles" section (same pattern as dashboard.css / tutorial.css).
   ========================================================================== */

/* ---------- shared section scaffolding ---------- */

html {
  scroll-behavior: smooth;
}

/* Anchored sections land below the sticky header. */
#demo,
#how-it-works,
#pricing {
  scroll-margin-top: 84px;
}

.landing-section {
  padding: var(--space-16) 0;
}

.landing-section + .landing-section {
  border-top: 1px solid var(--border);
}

.landing-section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto var(--space-10);
}

.landing-section-head h2 {
  font-family: var(--font-display);
  font-weight: var(--w-bold);
  margin: 0 0 var(--space-3);
}

.landing-section-head .landing-section-sub {
  color: var(--fg2);
  font-size: var(--text-base);
  margin: 0;
}

/* ---------- media placeholder (graceful when the asset is missing) ---------- */

.landing-media {
  position: relative;
  border-radius: var(--radius-lg);
  background: linear-gradient(150deg, var(--green-50), var(--neutral-100));
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.landing-media > i,
.landing-media > svg {
  width: 42px;
  height: 42px;
  color: var(--green-300, #7fb99a);
  opacity: .8;
}

.landing-media > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.landing-media.ratio-4x3 { aspect-ratio: 4 / 3; }
.landing-media.ratio-16x10 { aspect-ratio: 16 / 10; }
.landing-media.ratio-1x1 { aspect-ratio: 1 / 1; }

/* ---------- hero ---------- */

.landing-hero {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: var(--space-12);
  align-items: center;
  padding: var(--space-16) 0;
}

/* Brand lockup in place of the old "Arndly Live" overline. Height tracks the
   h1 font-size below so the logo reads at the same optical scale as the headline. */
.landing-hero-logo {
  display: block;
  width: auto;
  height: clamp(2rem, 4.5vw, 3.4rem);
  margin-bottom: var(--space-3);
}

.landing-hero h1 {
  font-family: var(--font-display);
  font-weight: var(--w-extrabold);
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  line-height: var(--leading-tight);
  margin: 0 0 var(--space-4);
  color: var(--green-700);
}

.landing-hero .landing-hero-sub {
  color: var(--fg2);
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  margin: 0 0 var(--space-6);
  max-width: 56ch;
}

.landing-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}

.landing-trust {
  margin-top: var(--space-4);
  color: var(--fg3);
  font-size: var(--text-sm);
}

/* Same underlined-link treatment as .landing-cta-secondary, in dark text
   for the light hero background. */
.landing-hero-secondary {
  color: var(--fg1);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.landing-hero-secondary:hover {
  color: var(--green-700);
}

/* ---------- demo widget ---------- */

.landing-demo {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-10);
  align-items: center;
  border-radius: var(--radius-xl);
  background: linear-gradient(150deg, var(--green-500), var(--green-700));
  color: var(--fg-on-green);
  padding: var(--space-10) var(--space-12);
  box-shadow: var(--shadow-green);
}

.landing-demo .overline {
  color: var(--orange-300, #ffc966);
  display: block;
  margin-bottom: var(--space-2);
}

.landing-demo h2 {
  font-family: var(--font-display);
  font-weight: var(--w-bold);
  color: #fff;
  margin: 0 0 var(--space-3);
}

.landing-demo p {
  color: var(--fg-on-green);
  opacity: .92;
  max-width: 52ch;
  margin: 0 0 var(--space-5);
}

.landing-demo-qr {
  text-align: center;
}

.landing-demo-qr .qr-box {
  margin: 0 auto;
}

.landing-demo-qr .landing-qr-caption {
  display: block;
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  color: var(--fg-on-green);
  opacity: .85;
}

/* ---------- dual-audience split ---------- */

.landing-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  align-items: stretch;
}

.landing-audience {
  display: flex;
  flex-direction: column;
}

.landing-audience .landing-media {
  margin-bottom: var(--space-5);
}

.landing-audience h3 {
  font-family: var(--font-display);
  font-weight: var(--w-bold);
  color: var(--green-700);
  margin: 0 0 var(--space-2);
}

.landing-audience .landing-audience-tag {
  color: var(--orange-600);
  font-size: var(--text-xs);
  font-weight: var(--w-semibold);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: var(--space-2);
}

.landing-check-list {
  list-style: none;
  padding: 0;
  margin: var(--space-3) 0 0;
}

.landing-check-list li {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  padding: var(--space-2) 0;
  color: var(--fg2);
}

.landing-check-list li i,
.landing-check-list li svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  color: var(--success, #2c7b50);
}

/* ---------- how it works ---------- */

.landing-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}

.landing-step {
  display: flex;
  flex-direction: column;
}

.landing-step .landing-media {
  margin-bottom: var(--space-5);
}

.landing-step-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.landing-step-num {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--orange-500);
  color: var(--fg-on-orange);
  font-family: var(--font-display);
  font-weight: var(--w-bold);
  display: flex;
  align-items: center;
  justify-content: center;
}

.landing-step h3 {
  font-family: var(--font-display);
  font-weight: var(--w-bold);
  font-size: var(--text-lg);
  margin: 0;
  color: var(--green-700);
}

.landing-step p {
  color: var(--fg2);
  margin: 0;
}

.landing-steps-cta {
  text-align: center;
  margin-top: var(--space-10);
}

/* ---------- metrics / social proof ---------- */

.landing-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
}

.landing-stat {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-8) var(--space-6);
  text-align: center;
  box-shadow: var(--shadow-xs);
}

.landing-stat-value {
  font-family: var(--font-display);
  font-weight: var(--w-extrabold);
  font-size: var(--text-4xl);
  color: var(--arndly-green);
  line-height: 1;
  margin-bottom: var(--space-3);
}

.landing-stat-label {
  color: var(--fg2);
  font-size: var(--text-sm);
  margin: 0;
}

.landing-stat-note {
  text-align: center;
  color: var(--fg3);
  font-size: var(--text-xs);
  margin-top: var(--space-6);
}

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

.landing-cta {
  border-radius: var(--radius-xl);
  background: linear-gradient(150deg, var(--green-500), var(--green-700));
  color: var(--fg-on-green);
  text-align: center;
  padding: var(--space-16) var(--space-10);
  box-shadow: var(--shadow-green);
  margin: var(--space-16) 0;
}

.landing-cta h2 {
  font-family: var(--font-display);
  font-weight: var(--w-bold);
  color: #fff;
  margin: 0 0 var(--space-3);
}

.landing-cta p {
  color: var(--fg-on-green);
  opacity: .92;
  max-width: 58ch;
  margin: 0 auto var(--space-6);
}

.landing-cta .landing-cta-secondary {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ============================================================================
   Pricing card primitives — shared by the homepage pricing section and
   /Billing/Plans (which previously carried these as an inline <style> block
   with raw hex colors; now rewritten on the brand tokens).
   ========================================================================== */

.pricing-head {
  text-align: center;
  margin: var(--space-12) 0 var(--space-8);
}

.pricing-head h1,
.pricing-head h2 {
  font-family: var(--font-display);
  font-weight: var(--w-bold);
  margin: 0 0 var(--space-2);
}

.pricing-head p {
  color: var(--fg2);
  max-width: 680px;
  margin: var(--space-2) auto 0;
}

.interval-toggle {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: var(--space-8);
}

.interval-toggle button {
  border: 1px solid var(--border-strong);
  background: var(--bg-elev);
  color: var(--fg1);
  padding: .45rem 1.2rem;
  font-weight: var(--w-semibold);
  font-size: var(--text-sm);
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}

.interval-toggle button:first-child { border-radius: var(--radius-pill) 0 0 var(--radius-pill); }
.interval-toggle button:last-child { border-radius: 0 var(--radius-pill) var(--radius-pill) 0; }

.interval-toggle button.active {
  background: var(--arndly-green);
  color: var(--fg-on-green);
  border-color: var(--arndly-green);
}

.plan-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg-elev);
  box-shadow: var(--shadow-xs);
}

.plan-card.highlight {
  border-color: var(--arndly-green);
  box-shadow: var(--shadow-green);
}

.plan-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--orange-500);
  color: var(--fg-on-orange);
  border-radius: var(--radius-pill);
  padding: 2px 14px;
  font-size: var(--text-xs);
  font-weight: var(--w-bold);
  white-space: nowrap;
}

.plan-card .plan-name {
  font-family: var(--font-display);
  font-weight: var(--w-bold);
  font-size: var(--text-base);
}

.plan-card .plan-price {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--w-bold);
  margin: .4rem 0 0;
  color: var(--green-700);
}

.plan-card .plan-price small {
  font-size: var(--text-sm);
  font-weight: var(--w-medium);
  color: var(--fg3);
  font-family: var(--font-body);
}

.plan-card .plan-sub {
  font-size: var(--text-xs);
  color: var(--fg3);
  min-height: 2.2em;
}

.plan-card ul {
  list-style: none;
  padding: 0;
  margin: var(--space-4) 0;
  font-size: var(--text-sm);
  flex: 1;
}

.plan-card ul li {
  padding: .3rem 0;
  border-bottom: 1px dashed var(--neutral-100, #f0ece4);
  color: var(--fg2);
}

.plan-cta {
  margin-top: auto;
}

.current-chip {
  display: inline-block;
  background: var(--green-50);
  color: var(--green-700);
  border-radius: var(--radius-pill);
  padding: 2px 12px;
  font-size: var(--text-xs);
  font-weight: var(--w-semibold);
  margin-left: 8px;
}

.honest-note {
  max-width: 760px;
  margin: var(--space-10) auto var(--space-4);
  font-size: var(--text-sm);
  color: var(--fg2);
  background: var(--green-50);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
}

.pricing-positioning {
  text-align: center;
  font-family: var(--font-display);
  font-weight: var(--w-semibold);
  color: var(--green-700);
  margin: var(--space-8) auto 0;
  max-width: 640px;
}

.pricing-compare-link {
  text-align: center;
  margin-top: var(--space-6);
}

/* ---------- responsive ---------- */

@media (max-width: 992px) {
  .landing-stats { grid-template-columns: repeat(2, 1fr); }
  .landing-steps { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .landing-hero {
    grid-template-columns: 1fr;
    padding-top: var(--space-10);
  }

  .landing-split { grid-template-columns: 1fr; }

  .landing-demo {
    grid-template-columns: 1fr;
    padding: var(--space-8) var(--space-6);
    text-align: center;
  }

  .landing-demo p { margin-left: auto; margin-right: auto; }
  .landing-cta-row { justify-content: center; }
  .landing-hero { text-align: center; }
  .landing-hero .landing-hero-sub { margin-left: auto; margin-right: auto; }
  .landing-hero-logo { margin-left: auto; margin-right: auto; }
}

@media (max-width: 576px) {
  .landing-stats { grid-template-columns: 1fr; }
}

/* ---------- Floating live-chat CTA ----------------------------------------
   Fixed bottom-right of the anonymous landing page. Always-visible pill (icon +
   label) rather than a hover-expand bubble: the label has to be readable without
   interaction, including on touch where there is no hover. */

.live-chat-fab {
  position: fixed;
  right: var(--space-5);
  bottom: var(--space-5);
  z-index: 1030;                      /* above .console-header (1020) */
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  background: var(--arndly-green);
  color: #fff;
  font-family: var(--font-body);
  font-weight: var(--w-bold);
  line-height: 1;
  text-decoration: none;
  box-shadow: var(--shadow-green);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.live-chat-fab:hover,
.live-chat-fab:focus-visible {
  color: #fff;
  background: var(--green-800);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.live-chat-fab:focus-visible {
  outline: 3px solid var(--arndly-orange);
  outline-offset: 3px;
}

.live-chat-fab i,
.live-chat-fab svg { width: 20px; height: 20px; flex-shrink: 0; }

@media (max-width: 480px) {
  .live-chat-fab {
    right: var(--space-3);
    bottom: var(--space-3);
    gap: 8px;
    padding: 10px 16px;
    font-size: var(--text-sm);
  }
}

@media (prefers-reduced-motion: reduce) {
  .live-chat-fab { transition: none; }
  .live-chat-fab:hover, .live-chat-fab:focus-visible { transform: none; }
}

@media print { .live-chat-fab { display: none; } }
