/* The child project's own landing rules (issue #448, LD-831). `assets/styles/landing.css` is a
   template file (docs/UPSTREAM.md §2) — every class this project's own blocks need and the
   template does not already provide lives here instead, loaded only by the landing's own
   blocks (`templates/landing/app/hero.html.twig`, the first one the page renders) so no other
   screen pays for it. Same rules the earlier rounds of #448 had appended directly to the
   template file; moved here byte-for-byte so `assets/styles/landing.css` matches
   `symfony-bootapp` v14.0.3 again. Same conventions as the template file: every value is a
   `--color-*`/`--font-*`/`--text-*` token already defined there (or a mix of one), never a hex
   literal, and every selector sits in the `components` layer so a utility class still wins. */

@layer components {
  /* LD-833: quiet open-source / trademark line under the final CTA. */
  .lp-disclaimer {
    max-width: 62ch;
    margin: 18px auto 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-secondary);
  }

  /* A not-yet-real diagram element (issue #448, round 4: regions and the dedicated server on
     `infrastructure`) — paired with `.lp-d-dash` on its own box/path and the
     word "soon" in its own label, never opacity alone: a diagram that only dims something
     could read as "drawn carelessly" rather than "not built yet". */
  .lp-d-soon {
    opacity: 0.6;
  }

  /* The child's own `hero` window body (issue #448): one column instead of the template's own
     side+main split, reusing `.lp-main`/`.lp-main-head`/`.lp-dev` as they already are. */
  .lp-win-body-single {
    grid-template-columns: 1fr;
  }

  /* Round 2 (owner review): the sample deployment card was too empty — a small logo badge, a
     right-aligned status pill, decorative CPU/RAM bars and the rollout log below all fill it
     out, reusing `.lp-codes` (already the "timestamp, event" idiom of the product-foundation
     audit card) for the log. */
  .lp-win-logo {
    display: grid;
    width: 28px;
    height: 28px;
    flex: none;
    place-items: center;
    overflow: hidden;
    border-radius: 8px;
    background: var(--color-base-200);
    font: 700 13px/1 var(--font-sans);
    color: var(--color-primary);
  }

  .lp-win-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .lp-main-head .lp-pill {
    margin-left: auto;
  }

  .lp-win-metrics {
    display: flex;
    gap: 24px;
  }

  .lp-win-meter {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
  }

  .lp-win-meter-label {
    font: 500 11px/1 var(--font-mono);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
  }

  .lp-win-bars {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 36px;
  }

  .lp-win-bar {
    flex: 1;
    min-width: 4px;
    border-radius: 2px;
    background: color-mix(in oklab, var(--color-primary) 55%, transparent);
  }

  .lp-win-bars-ram .lp-win-bar {
    background: color-mix(in oklab, var(--color-brand-gradient-end) 55%, transparent);
  }

  .lp-win-bar:nth-child(1) {
    height: 35%;
  }

  .lp-win-bar:nth-child(2) {
    height: 58%;
  }

  .lp-win-bar:nth-child(3) {
    height: 42%;
  }

  .lp-win-bar:nth-child(4) {
    height: 72%;
  }

  .lp-win-bar:nth-child(5) {
    height: 50%;
  }

  .lp-win-bar:nth-child(6) {
    height: 64%;
  }

  .lp-win-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
  }

  .lp-win-actions .lp-btn {
    min-height: 40px;
    padding: 0 16px;
    font-size: 14px;
  }

  /* The child's own `apps` grid (issue #448): small, logo-led tiles rather than the heavy
     `.lp-card` (built for a kicker + a picture), since an application here is identified by
     its mark and its name alone. */
  .lp-appgrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
    margin-top: 40px;
  }

  a.lp-app,
  div.lp-app {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 24px 16px;
    border-radius: 20px;
    background: var(--color-base-100);
    text-align: center;
    text-decoration: none;
    color: var(--color-base-content);
  }

  .lp-app-soon {
    opacity: 0.64;
  }

  .lp-app-logo {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    overflow: hidden;
    border-radius: 14px;
    background: var(--color-base-200);
    font-weight: 700;
    color: var(--color-primary);
  }

  .lp-app-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .lp-app-name {
    font-size: 15px;
    font-weight: 600;
  }

  .lp-app-desc {
    font-size: 13px;
    line-height: 1.45;
    color: var(--text-secondary);
  }

  @media (prefers-reduced-motion: no-preference) {
    a.lp-app {
      transition: transform 0.2s;
    }

    a.lp-app:hover {
      transform: translateY(-3px);
    }
  }

  /* The child's own `features-intro` replacement (issue #448): the same `.lp-list` checklist
     the template uses next to a diagram, here standing on its own with six items instead of
     three — wide enough to earn a second column. */
  @media (min-width: 760px) {
    .lp-list-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      column-gap: 40px;
    }
  }

  /* The child's own `languages` replacement (issue #448): the template's `.lp-lang` pill,
     wrapped in a static flex grid instead of `.lp-marq-track`'s scrolling one — there is
     nothing here that benefits from motion. */
  .lp-langgrid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 28px;
  }

  /* The child's own `roadmap` block (issue #448, round 2): cards carry a "Soon" pill
     (`.lp-pill-wait`, the same one the `apps` grid uses for "Coming soon") so nothing here
     reads as already shipped. */
  .lp-roadmap {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    margin-top: 40px;
  }

  .lp-roadmap-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px;
    border-radius: 18px;
    background: var(--color-base-100);
  }

  .lp-roadmap-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .lp-roadmap-text {
    color: var(--text-secondary);
    font-size: 14px;
  }

  /* `.lp-dev` on its own is `width: min(250px, 100%)` — sized for the small decorative widget
     inside `.lp-art` (product-foundation's cards), not for a label/value panel across the
     hero's full-width window body. `.lp-dev-wide` (issue #448, round 4) lifts both that cap
     and the smaller font-size the same rule sets, only where the hero opts in. */
  .lp-dev-wide {
    width: 100%;
    font-size: 14px;
  }

  /* The hero's richer deployment card (issue #448, round 4): a `.lp-dev-row` can carry more
     than a label and a bare value — `.lp-dev-value` groups a value with a checkmark, a pill or
     a small action so `justify-content: space-between` still only sees two children. */
  .lp-dev-value {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .lp-dev-ok {
    font-weight: 700;
    color: var(--color-success);
  }

  .lp-dev-caret {
    color: var(--text-muted);
  }

  .lp-dev-action {
    flex: none;
    padding: 2px 10px;
    border-radius: 999px;
    background: color-mix(in oklab, var(--color-primary) 12%, transparent);
    color: var(--color-primary);
    font: 600 11px/1 var(--font-sans);
  }

  /* The public page of one application (issue #483, `templates/application/show.html.twig`):
     a large logo and a smaller title than the landing's hero, a price line, feature cards with
     an icon, plan cards, a licence line. Nothing here is a new colour — tokens only. */
  .lp-app-logo-lg {
    width: 72px;
    height: 72px;
    margin-inline: auto;
    border-radius: 20px;
    background: var(--color-base-100);
    box-shadow: var(--shadow-paper);
    font-size: 30px;
  }

  .lp-hero-eyebrow {
    margin-top: 22px;
  }

  .lp-app-title {
    font-size: clamp(40px, 7vw, 84px);
  }

  .lp-app-from {
    margin-top: 14px;
    font-size: 14px;
    color: var(--text-muted);
  }

  .lp-win-address {
    margin-left: 12px;
    padding: 3px 12px;
    border-radius: 999px;
    background: var(--color-base-200);
    font-size: 12px;
    color: var(--text-muted);
  }

  .lp-card-icon {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 12px;
    background: color-mix(in oklab, var(--color-primary) 12%, transparent);
    color: var(--color-primary);
  }

  .lp-plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 360px));
    justify-content: center;
    gap: 18px;
    margin-top: 48px;
  }

  .lp-plan {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 28px;
    border-radius: 24px;
    background: var(--color-base-100);
    box-shadow: var(--shadow-paper);
  }

  .lp-plan-name {
    font-size: 20px;
    font-weight: 700;
  }

  .lp-plan-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
  }

  .lp-plan-amount {
    font-size: 44px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
  }

  .lp-plan-per {
    color: var(--text-muted);
    font-size: 15px;
  }

  .lp-plan-limits {
    display: grid;
    flex: 1;
    gap: 10px;
    font-size: 15px;
    color: var(--text-secondary);
  }

  .lp-plan-limits li {
    display: grid;
    grid-template-columns: 22px 1fr;
    align-items: center;
    gap: 12px;
  }

  .lp-plans-note {
    margin-top: 24px;
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
  }

  .lp-licence {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 15px;
    color: var(--text-secondary);
  }

  /* The sample interface in the hero window: one shared frame (`.lp-mock`), then the few
     shapes the three applications need. Bar heights and widths come from :nth-child, not from
     inline styles — the page's CSP has no `style-src 'unsafe-inline'` for them. */
  .lp-mock {
    min-height: 360px;
  }

  .lp-mock-head {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 700;
  }

  .lp-mock-chip,
  .lp-mock-search {
    margin-left: auto;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--color-base-200);
    font: 500 12px/1.2 var(--font-sans);
    color: var(--text-muted);
  }

  .lp-mock-search {
    min-width: 40%;
    border-radius: 10px;
    padding: 8px 12px;
  }

  .lp-mock-tiles {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
  }

  .lp-mock-tile,
  .lp-mock-panel {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--color-base-200);
  }

  .lp-mock-label {
    font: 500 11px/1.2 var(--font-mono);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
  }

  .lp-mock-value {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1;
  }

  .lp-mock-delta {
    font: 600 12px/1 var(--font-mono);
    color: var(--color-success);
  }

  .lp-mock-chart {
    display: flex;
    align-items: flex-end;
    gap: 5px;
    height: 96px;
    padding: 12px 14px 0;
    border-radius: 12px;
    background: var(--color-base-200);
  }

  .lp-mock-chart-bar {
    flex: 1;
    min-width: 3px;
    border-radius: 3px 3px 0 0;
    background: color-mix(in oklab, var(--color-primary) 60%, transparent);
  }

  .lp-mock-chart-bar:nth-child(3n) {
    height: 52%;
  }

  .lp-mock-chart-bar:nth-child(3n + 1) {
    height: 74%;
  }

  .lp-mock-chart-bar:nth-child(3n + 2) {
    height: 40%;
  }

  .lp-mock-chart-bar:nth-child(5n) {
    height: 88%;
  }

  .lp-mock-chart-bar:nth-child(7n) {
    height: 30%;
  }

  .lp-mock-cols {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .lp-mock-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 40%;
    align-items: center;
    gap: 10px;
    font-size: 12px;
  }

  .lp-mock-track {
    height: 6px;
    overflow: hidden;
    border-radius: 3px;
    background: var(--color-base-300);
  }

  .lp-mock-track > i {
    display: block;
    height: 100%;
    border-radius: 3px;
    background: var(--color-primary);
  }

  .lp-mock-row:nth-child(2) .lp-mock-track > i {
    width: 100%;
  }

  .lp-mock-row:nth-child(3) .lp-mock-track > i {
    width: 70%;
  }

  .lp-mock-row:nth-child(4) .lp-mock-track > i {
    width: 45%;
  }

  .lp-mock-row:nth-child(5) .lp-mock-track > i {
    width: 25%;
  }

  .lp-mock-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    background: color-mix(in oklab, var(--color-success) 14%, transparent);
    font-weight: 700;
  }

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

  .lp-mock-dot-warn {
    background: var(--color-warning);
  }

  .lp-mock-monitor {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr) minmax(0, 1.2fr) 64px;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--color-base-200);
    font-size: 14px;
  }

  .lp-mock-monitor-name {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    font-weight: 600;
  }

  .lp-mock-kind {
    font: 500 11px/1 var(--font-mono);
    color: var(--text-muted);
  }

  .lp-mock-beats {
    display: flex;
    gap: 3px;
    height: 24px;
  }

  .lp-mock-beats > i {
    flex: 1;
    border-radius: 2px;
    background: var(--color-success);
  }

  .lp-mock-beats > i.lp-mock-beat-down {
    background: var(--color-error);
  }

  .lp-mock-uptime {
    text-align: right;
    font-size: 13px;
    color: var(--text-secondary);
  }

  .lp-mock-vault {
    display: grid;
    gap: 8px;
  }

  .lp-mock-item {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 11px 14px;
    border-radius: 12px;
    background: var(--color-base-200);
    font-size: 15px;
    font-weight: 600;
  }

  .lp-mock-title {
    font-size: 16px;
  }

  .lp-mock-item-name {
    min-width: 0;
  }

  .lp-mock-pw {
    color: var(--text-muted);
    letter-spacing: 0.1em;
  }

  @media (max-width: 620px) {
    .lp-mock-tiles {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lp-mock-cols {
      grid-template-columns: 1fr;
    }

    .lp-mock-monitor {
      grid-template-columns: 10px minmax(0, 1fr) 56px;
    }

    .lp-mock-beats {
      display: none;
    }

    .lp-mock-search {
      min-width: 0;
    }

    .lp-mock-pw {
      display: none;
    }
  }
}
