/* Everyday tools: a ruled list of features beside one simplified view of
   Concloud (DESIGN.md, No-Template-Grammar Rule). The views share one grid
   cell once js/landing/platform.js enhances the explorer, so switching never
   moves the section or the chapters below it. The only moving mark is the
   active feature's rule filling as the tour's timer. */

.landing-platform {
  --lp-platform-dwell: 6s;
}

.landing-platform__heading {
  display: grid;
  gap: 1.25rem;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

.landing-platform__heading .landing__sub {
  max-width: 40ch;
  margin: 0;
}

.landing-platform__explorer {
  display: grid;
  gap: 2.5rem;
}

/* ---- The ruled list ---- */

.landing-platform__features {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--lp-line);
}

.landing-platform__feature {
  position: relative;
  padding-block: .75rem 1.25rem;
  border-bottom: 1px solid var(--lp-line);
}

.landing-platform__feature-name {
  margin: 0;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-stretch: var(--lp-display-stretch);
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -.01em;
  text-wrap: balance;
}

.landing-platform__feature-button {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: .5rem 0;
  border: 0;
  background: none;
  color: var(--lp-ink-strong);
  font: inherit;
  letter-spacing: inherit;
  text-align: start;
  cursor: pointer;
}

.landing-platform__feature-button:focus-visible {
  outline: 2px solid var(--lp-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.landing-platform__feature-line {
  max-width: 46ch;
  margin: 0;
  color: var(--lp-mute);
  font-size: 1rem;
  line-height: 1.6;
  text-wrap: pretty;
}

/* The selected feature keeps full ink; the others step back a shade so the
   list still reads in full but says which view is showing. */
.is-enhanced .landing-platform__feature-button[aria-pressed="false"] {
  color: var(--lp-ink);
}

.is-enhanced .landing-platform__feature-button[aria-pressed="false"]:hover {
  color: var(--lp-accent);
}

/* The timer: the selected feature's bottom rule, drawn over the hairline. */
.landing-platform__timer {
  position: absolute;
  inset-inline: 0;
  bottom: -1px;
  height: 2px;
  background: var(--lp-accent);
  transform: scaleX(0);
  transform-origin: left center;
}

.is-enhanced .landing-platform__feature:has([aria-pressed="true"]) .landing-platform__timer {
  transform: scaleX(1);
}

.is-touring .landing-platform__feature:has([aria-pressed="true"]) .landing-platform__timer {
  animation: lp-platform-dwell var(--lp-platform-dwell) linear both;
}

.is-touring.is-paused .landing-platform__timer {
  animation-play-state: paused;
}

@keyframes lp-platform-dwell {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* ---- The views ---- */

.landing-platform__views {
  display: grid;
  gap: 2.5rem;
}

/* On a phone the view leads, so choosing a feature changes what is just above it. */
.is-enhanced .landing-platform__views {
  order: -1;
}

.is-enhanced .landing-platform__view {
  grid-area: 1 / 1;
}

.is-enhanced .landing-platform__view[hidden] {
  display: flex;
  visibility: hidden;
  opacity: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .is-enhanced .landing-platform__view {
    transition: opacity 240ms ease, visibility 240ms;
  }
}

/* Flat technical illustrations: one idea per view, with no application chrome. */
.landing-platform__view {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  margin: 0;
}

.landing-platform__drawing {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  font-family: var(--lp-ui-font);
  stroke-linecap: round;
  stroke-linejoin: round;
}

.landing-platform__view figcaption {
  max-width: 46ch;
  align-self: center;
  margin-top: 1rem;
  color: var(--lp-mute);
  font-size: .875rem;
  line-height: 1.5;
  text-align: center;
}

.lp-art__paper {
  fill: var(--lp-bg);
  stroke: var(--lp-line-strong);
  stroke-width: 1.5px;
}

.lp-art__device {
  fill: var(--lp-hull);
  stroke: var(--lp-hull);
}

.lp-art__display {
  fill: var(--lp-bg);
  stroke: var(--lp-shoal);
  stroke-width: 1.5px;
}

.lp-art__detail {
  stroke: var(--lp-bg);
  stroke-width: 2px;
}

.lp-art__indicator {
  fill: var(--lp-cyan);
}

.lp-art__guide,
.lp-art__rule {
  stroke: var(--lp-line-strong);
  stroke-width: 1.5px;
}

.lp-art__connection {
  stroke: var(--lp-accent);
  stroke-width: 1.5px;
  stroke-dasharray: 3 7;
}

.lp-art__accent {
  stroke: var(--lp-accent);
  stroke-width: 2px;
}

.lp-art__accent-fill {
  fill: var(--lp-accent);
}

.lp-art__knob {
  fill: var(--lp-bg);
  stroke: var(--lp-accent);
  stroke-width: 2px;
}

.lp-art__wash {
  fill: color-mix(in srgb, var(--lp-hull) 6%, var(--lp-bg));
}

.lp-art__tint {
  fill: color-mix(in srgb, var(--lp-accent) 5%, var(--lp-bg));
  stroke: color-mix(in srgb, var(--lp-accent) 35%, var(--lp-bg));
}

.lp-art__selection {
  fill: color-mix(in srgb, var(--lp-accent) 6%, transparent);
  stroke: var(--lp-accent);
  stroke-width: 1px;
  stroke-dasharray: 3 5;
}

.lp-art__label {
  fill: var(--lp-ink-strong);
  font-size: 20px;
  font-weight: 500;
}

.lp-art__small {
  fill: var(--lp-ink);
  font-size: 17px;
}

.lp-art__filetype {
  fill: var(--lp-ink-strong);
  font-size: 28px;
  font-weight: 600;
}

.landing-platform__also {
  margin: 2.5rem 0 0;
  color: var(--lp-mute);
  font-size: .9375rem;
  line-height: 1.6;
}

@media (width >= 56rem) {
  .landing-platform__heading,
  .landing-platform__explorer {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    column-gap: clamp(2rem, 5vw, 5rem);
  }

  .landing-platform__heading {
    align-items: end;
  }

  .landing-platform__heading .landing__sub {
    padding-bottom: .25rem;
  }

  .landing-platform__explorer {
    align-items: center;
  }

  .is-enhanced .landing-platform__views {
    order: 0;
  }
}
