/* Public landing page (apps/accounts/templates/accounts/landing.html) — loaded
 * only on that page, via its own {% block extra_head %}, so none of this
 * marketing-only styling weighs on the app itself.
 *
 * Loads after site.css, so it can rely on .button/.brand-* already being
 * styled and only add what's specific here. Every color reads a tokens.css
 * custom property: the page has no light or dark variant of its own, it just
 * follows the site theme like everything else.
 */

/* Replaces base.html's `.content` (which centres and clamps to 1160px) so
 * section backgrounds can run edge to edge. Each band re-applies the clamp
 * inside itself via .band-inner, keeping text aligned with the rest of the
 * site. */
.landing {
  width: 100%;
}

.band-inner,
.hero-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* ============================= Hero ============================= */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(var(--space-8), 7vw, 5.5rem) 0 clamp(var(--space-8), 6vw, 4.5rem);
  background:
    radial-gradient(
      ellipse 90% 70% at 78% 18%,
      color-mix(in srgb, var(--color-accent) 22%, transparent),
      transparent 62%
    ),
    radial-gradient(
      ellipse 80% 90% at 8% 8%,
      color-mix(in srgb, var(--color-primary) 14%, transparent),
      transparent 60%
    );
  border-bottom: 1px solid var(--color-border);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(var(--space-6), 5vw, var(--space-8));
  align-items: center;
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-accent-strong);
  margin: 0 0 var(--space-3);
}

.hero-title {
  font-size: clamp(2.25rem, 5.6vw, 3.75rem);
  font-weight: 700;
  margin: 0 0 var(--space-4);
  text-wrap: balance;
}

.hero-sub {
  font-size: clamp(1rem, 1.6vw, 1.1875rem);
  color: var(--color-text-muted);
  margin: 0 0 var(--space-6);
  max-width: 46ch;
}

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

/* The landing page is the one place a button should feel like a destination
 * rather than a form control. */
.button-lg {
  padding: var(--space-3) var(--space-6);
  font-size: 1.0625rem;
  border-radius: var(--radius);
}

.hero-note {
  margin: var(--space-4) 0 0;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.hero-art svg {
  display: block;
  width: 100%;
  height: auto;
}

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

.la-board {
  fill: color-mix(in srgb, var(--color-primary) 88%, black);
  stroke: color-mix(in srgb, var(--color-primary) 60%, var(--color-surface));
  stroke-width: 2;
}

.la-pin {
  stroke: var(--color-muted);
  stroke-width: 4;
  stroke-linecap: round;
}

.la-antenna,
.la-chip-line {
  stroke: var(--color-accent);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.la-chip-line {
  opacity: 0.5;
}

.la-usb {
  fill: var(--color-muted);
}

.la-chip {
  fill: color-mix(in srgb, var(--color-primary) 96%, black);
  stroke: var(--color-accent);
  stroke-width: 2;
}

.la-wire {
  stroke: var(--color-accent-strong);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.55;
}

.la-node {
  fill: var(--color-accent-strong);
}

.la-packet {
  fill: var(--color-accent);
  animation: la-pulse 2.4s ease-in-out infinite;
}

/* Stagger, so the dots read as packets travelling rather than one flashing
 * row. -1 is spelled out even though 0s is the default, so the sequence is
 * legible as a set and a future reorder can't silently leave a gap. */
.la-packet-1 { animation-delay: 0s; }
.la-packet-2 { animation-delay: 0.3s; }
.la-packet-3 { animation-delay: 0.6s; }
.la-packet-4 { animation-delay: 0.9s; }

@keyframes la-pulse {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 1; }
}

.la-panel {
  fill: var(--color-surface);
  stroke: var(--color-border);
  stroke-width: 2;
}

.la-panel-rule {
  stroke: var(--color-border);
  stroke-width: 2;
}

.la-dot {
  fill: var(--color-success);
}

.la-panel-title,
.la-stat-label {
  stroke: var(--color-muted);
  stroke-width: 6;
  stroke-linecap: round;
}

.la-stat-label {
  stroke-width: 5;
}

.la-stat-value {
  stroke: var(--color-text);
  stroke-width: 11;
  stroke-linecap: round;
}

.la-card {
  fill: var(--color-bg);
  stroke: var(--color-border);
  stroke-width: 1.5;
}

.la-chart-line {
  stroke: var(--series-1);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.la-chart-area {
  fill: var(--series-1);
  opacity: 0.14;
}

.la-gauge-track {
  stroke: var(--color-border);
  stroke-width: 8;
  stroke-linecap: round;
}

.la-gauge-fill {
  stroke: var(--series-2);
  stroke-width: 8;
  stroke-linecap: round;
}

/* ============================= Bands ============================= */

.band {
  padding: clamp(var(--space-8), 6vw, 4.5rem) 0;
}

.band-alt {
  background: var(--color-surface);
  border-block: 1px solid var(--color-border);
}

.band-head {
  max-width: 62ch;
  margin: 0 0 clamp(var(--space-6), 4vw, var(--space-8));
}

.band-head h2 {
  font-size: clamp(1.625rem, 3.2vw, 2.25rem);
  font-weight: 700;
  margin: 0 0 var(--space-2);
}

.band-head p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 1.0625rem;
}

/* ============================= Features ============================= */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-6);
}

.feature {
  min-width: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}

.band-alt .feature {
  background: var(--color-bg);
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--accent-wash);
  color: var(--color-accent-strong);
  margin-bottom: var(--space-4);
}

.feature-icon svg {
  width: 22px;
  height: 22px;
}

.feature h3 {
  font-size: 1.125rem;
  font-weight: 650;
  margin: 0 0 var(--space-2);
}

.feature p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  line-height: 1.6;
}

/* ============================= Steps ============================= */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-6);
  counter-reset: step;
}

.step {
  min-width: 0;
  position: relative;
  padding-top: var(--space-2);
}

.step-num {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-accent-strong);
  color: var(--color-accent-strong-text);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  margin-bottom: var(--space-4);
}

.step h3 {
  font-size: 1.125rem;
  font-weight: 650;
  margin: 0 0 var(--space-2);
}

.step p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  line-height: 1.6;
}

/* ========================= Product preview ========================= */

.preview-frame {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--color-surface);
}

.preview-chrome {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.preview-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-border);
  flex: none;
}

.preview-addr {
  margin-left: var(--space-3);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-body {
  padding: var(--space-4);
  background: var(--color-bg);
}

.preview-body svg {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- preview marks ---------- */

.pv-card {
  fill: var(--color-surface);
  stroke: var(--color-border);
  stroke-width: 1.5;
}

.pv-label {
  stroke: var(--color-muted);
  stroke-width: 7;
  stroke-linecap: round;
}

.pv-value {
  stroke-width: 15;
  stroke-linecap: round;
  stroke: var(--color-text);
}

.pv-v2 { stroke: var(--series-2); }
.pv-v3 { stroke: var(--series-3); }
.pv-v-on { stroke: var(--color-success); }

.pv-grid path {
  stroke: var(--chart-grid);
  stroke-width: 1.5;
}

.pv-series-1 {
  stroke: var(--series-1);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pv-series-1-area {
  fill: var(--series-1);
  opacity: 0.12;
}

.pv-series-2 {
  stroke: var(--series-2);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pv-key-1 { fill: var(--series-1); }
.pv-key-2 { fill: var(--series-2); }

.pv-gauge-track {
  stroke: var(--color-border);
  stroke-width: 11;
  stroke-linecap: round;
}

.pv-gauge-fill {
  stroke: var(--series-4);
  stroke-width: 11;
  stroke-linecap: round;
}

.pv-gauge-pin {
  fill: var(--color-text-muted);
}

.pv-switch-track {
  fill: var(--color-success);
}

.pv-switch-knob {
  fill: var(--color-surface);
}

/* ========================= Closing CTA ========================= */

.band-cta {
  background:
    radial-gradient(
      ellipse 70% 130% at 50% 0%,
      color-mix(in srgb, var(--color-accent) 18%, transparent),
      transparent 68%
    );
  border-top: 1px solid var(--color-border);
}

.closing {
  text-align: center;
  max-width: 720px;
}

.closing h2 {
  font-size: clamp(1.625rem, 3.2vw, 2.25rem);
  font-weight: 700;
  margin: 0 0 var(--space-3);
  text-wrap: balance;
}

.closing p {
  margin: 0 0 var(--space-6);
  color: var(--color-text-muted);
  font-size: 1.0625rem;
}

.closing .hero-cta {
  justify-content: center;
}

/* ============================= Footer ============================= */

.landing-foot {
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
  padding: var(--space-6) 0;
}

.foot-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
}

.foot-links {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
  font-size: var(--font-size-sm);
}

/* Deliberately quiet links, not buttons. The same two actions already appear
 * as buttons in the topbar and as a full-width CTA in the band directly above
 * this one — a third styled pair would read as three competing asks rather
 * than one. What was wrong before was that they had no rule at all, so they
 * fell through to the browser default: underlined and link-blue, the only
 * undressed text on the page. */
.foot-links a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: 550;
}

.foot-links a:hover {
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.landing-foot .brand-name {
  font-size: var(--font-size-base);
}

/* ============================= Responsive ============================= */

@media (max-width: 880px) {
  /* Single column, and the illustration goes first-to-last so the headline
     and CTA stay above the fold on a phone. */
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-art {
    order: 2;
    max-width: 520px;
  }

  .hero-sub {
    max-width: none;
  }
}

@media (max-width: 640px) {
  .band-inner,
  .hero-inner {
    padding: 0 var(--space-4);
  }

  /* Full-width tap targets read as deliberate at phone size, and stop the two
     buttons from wrapping into a ragged two-line block. */
  .hero-cta .button {
    width: 100%;
    text-align: center;
  }

  .foot-links {
    margin-left: 0;
    gap: var(--space-4);
  }
}

@media (prefers-reduced-motion: reduce) {
  .la-packet {
    animation: none;
    opacity: 0.85;
  }
}
