/* Landing page only (linked from src/views/landing/LandingPage.tsx). Builds on styles.css tokens.
   Idea: the header's faceplate continues into a big "screen" — the brand mark scaled up — and plans
   are rack units under a navy plate. Prefix lp- keeps these rules away from the rest of the site. */

:root {
  --lp-screen: #0b1226;
  --lp-screen-line: rgba(233, 237, 245, 0.12);
  --lp-stand: #5d6c94;
}
@media (prefers-color-scheme: dark) {
  :root {
    --lp-screen: #050a17;
    --lp-screen-line: rgba(233, 237, 245, 0.1);
    --lp-stand: #3a4769;
  }
}

/* Landing takes <main> edge to edge; sections bring their own .wrap. */
.main:has(> .lp) {
  max-width: none;
  padding: 0;
}
.main:has(> .lp) > .flash {
  width: calc(100% - 2 * var(--gutter));
  max-width: calc(1080px - 2 * var(--gutter));
  margin: 16px auto;
}

/* ---------- hero: the screen ---------- */

.lp-hero {
  background: var(--panel);
  color: var(--panel-ink);
  padding-block: 28px 44px;
}

.lp-screen {
  background: var(--lp-screen);
  border: 2px solid var(--sodium);
  border-radius: 12px;
  overflow: hidden;
}

.lp-desk {
  padding: 28px 20px 32px;
}

.lp-hero__title {
  font-weight: 700;
  font-size: clamp(1.75rem, 7.2vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  max-width: 15ch;
  margin: 0 0 20px;
  hyphens: manual;
}

/* The lit cursor from the logo. Blinks a few times on load, then stays on. */
.lp-cursor {
  display: inline-block;
  width: 0.5em;
  height: 0.78em;
  margin-left: 0.12em;
  background: var(--sodium);
  border-radius: 0.06em;
  vertical-align: -0.02em;
  animation: lp-blink 1.1s steps(1, end) 5;
}
@keyframes lp-blink {
  50% { opacity: 0; }
}

.lp-hero__lead {
  color: var(--panel-ink-2);
  font-size: var(--fs-md);
  line-height: 1.5;
  max-width: 50ch;
  margin: 0 0 28px;
}

.lp-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.lp-btn-ghost {
  background: transparent;
  color: var(--panel-ink);
  border-color: rgba(233, 237, 245, 0.35);
}
.lp-btn-ghost:hover {
  background: rgba(233, 237, 245, 0.08);
  border-color: var(--panel-ink-2);
}
.lp-hero :focus-visible {
  outline-color: var(--sodium);
}

/* Bottom strip of the screen: what is installed, like a taskbar. */
.lp-taskbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 12px 20px;
  border-top: 1px solid var(--lp-screen-line);
  background: rgba(233, 237, 245, 0.03);
}
.lp-taskbar__label {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--panel-ink-2);
}
.lp-taskbar__list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.lp-taskbar__item {
  padding: 3px 10px;
  border: 1px solid var(--lp-screen-line);
  border-radius: 4px;
  background: rgba(233, 237, 245, 0.05);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--panel-ink);
}

.lp-stand {
  width: 22%;
  min-width: 90px;
  height: 10px;
  margin: 14px auto 0;
  border-radius: 5px;
  background: var(--lp-stand);
}

@media (min-width: 720px) {
  .lp-hero { padding-block: 44px 56px; }
  .lp-screen { border-radius: 16px; }
  .lp-desk { padding: 56px 56px 64px; }
  .lp-taskbar { padding: 14px 56px; }
}

/* ---------- sections ---------- */

.lp-section {
  padding-block: 56px;
}
.lp-section--sunken {
  background: var(--sunken);
  border-block: 1px solid var(--line);
}
.lp-section h2 {
  margin-bottom: 20px;
}

/* Heading column on the left, content on the right (desktop). */
.lp-split {
  display: grid;
  gap: 8px 48px;
}
.lp-split__head > :last-child { margin-bottom: 0; }
@media (min-width: 860px) {
  .lp-section { padding-block: 80px; }
  .lp-split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
}

/* ---------- what's inside ---------- */

.lp-tools {
  margin: 16px 0 0;
}
@media (min-width: 860px) {
  .lp-tools { margin-top: 0; }
}
.lp-tools__row {
  display: grid;
  gap: 2px 24px;
  padding-block: 14px;
  border-top: 1px solid var(--line);
}
.lp-tools__row:last-child { border-bottom: 1px solid var(--line); }
.lp-tools dt { font-weight: 600; }
.lp-tools dd { margin: 0; color: var(--ink-2); }
@media (min-width: 560px) {
  .lp-tools__row { grid-template-columns: 9.5rem 1fr; }
}

/* ---------- steps: a real sequence, numbered; the last LED is lit ---------- */

.lp-steps {
  counter-reset: lp-step;
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 0;
}
.lp-step {
  counter-increment: lp-step;
  position: relative;
  max-width: none;
  padding: 0 0 28px 60px;
}
.lp-step:last-child { padding-bottom: 0; }
.lp-step::before {
  content: counter(lp-step);
  position: absolute;
  left: 0;
  top: 0;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--panel);
  color: var(--sodium);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  z-index: 1;
}
.lp-step:last-child::before {
  background: var(--sodium);
  color: var(--on-sodium);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--sodium) 28%, transparent);
}
/* The cable between steps. */
.lp-step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 19px;
  top: 40px;
  bottom: 0;
  width: 2px;
  background: var(--line-strong);
}
.lp-step__title {
  font-size: var(--fs-md);
  margin: 6px 0 6px;
}
.lp-step__text {
  margin: 0;
  color: var(--ink-2);
}

@media (min-width: 900px) {
  .lp-steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 32px;
  }
  .lp-step { padding: 60px 0 0; }
  .lp-step:not(:last-child)::after {
    left: 40px;
    right: -32px;
    top: 19px;
    bottom: auto;
    width: auto;
    height: 2px;
  }
}

/* ---------- plans: racks of units ---------- */

.lp-racks {
  display: grid;
  gap: 28px;
}

.lp-rack {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  overflow: hidden;
}

.lp-rack__plate {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 16px;
  padding: 14px 20px;
  background: var(--panel);
  color: var(--panel-ink);
  border-bottom: 3px solid var(--sodium);
}
.lp-rack__title {
  margin: 0;
  font-size: var(--fs-md);
  font-weight: 700;
}
.lp-rack__note {
  margin: 0;
  color: var(--panel-ink-2);
  font-size: 0.9375rem;
}

.lp-rack__units {
  list-style: none;
  margin: 0;
  padding: 0;
}

.lp-plan {
  max-width: none;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "name  price"
    "specs specs"
    "btn   btn";
  gap: 14px 16px;
  align-items: start;
  padding: 20px;
}
.lp-plan + .lp-plan { border-top: 1px solid var(--line); }

.lp-plan__name { grid-area: name; min-width: 0; }
.lp-plan__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-md);
  line-height: 1.2;
  margin: 0 0 4px;
}
.lp-plan__desc {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--ink-2);
}

.lp-plan__specs {
  grid-area: specs;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}
.lp-spec {
  display: flex;
  flex-direction: column-reverse; /* value above its label; dt still comes first for screen readers */
  padding: 8px 10px;
  border-radius: var(--r-sm);
  background: var(--sunken);
}
.lp-spec__label {
  font-size: var(--fs-sm);
  color: var(--ink-2);
}
.lp-spec__value {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-md);
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.lp-spec__unit {
  font-family: var(--font-text);
  font-size: 0.8em;
  font-weight: 500;
  color: var(--ink-2);
}

.lp-plan__price {
  grid-area: price;
  margin: 0;
  display: grid;
  justify-items: end;
  text-align: right;
}
.lp-plan__amount {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-md);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.lp-plan__per {
  font-size: var(--fs-sm);
  color: var(--ink-2);
}

.lp-plan__btn { grid-area: btn; }

@media (min-width: 900px) {
  .lp-plan {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.6fr) minmax(0, 0.8fr) auto;
    grid-template-areas: "name specs price btn";
    align-items: center;
    gap: 24px;
    padding: 18px 24px;
  }
  .lp-spec { background: none; padding: 0; }
  .lp-plan__amount { font-size: var(--fs-lg); }
  .lp-plan__btn { min-width: 128px; }
}

.lp-plans__note {
  margin: 20px 0 0;
  font-size: 0.9375rem;
}

/* ---------- FAQ ---------- */

.lp-faq {
  border-top: 1px solid var(--line-strong);
}
.lp-faq__item {
  border-bottom: 1px solid var(--line-strong);
}
.lp-faq__q {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 2px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.lp-faq__q::-webkit-details-marker { display: none; }
/* Plus that turns into a minus when open. */
.lp-faq__q::after {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  margin-top: 6px;
  background:
    linear-gradient(currentColor, currentColor) center / 14px 2px no-repeat,
    linear-gradient(currentColor, currentColor) center / 2px 14px no-repeat;
  color: var(--ink-2);
}
.lp-faq__item[open] > .lp-faq__q::after {
  background: linear-gradient(currentColor, currentColor) center / 14px 2px no-repeat;
  color: var(--sodium-strong);
}
.lp-faq__q:hover { color: var(--link); }
.lp-faq__a {
  padding: 0 2px 18px;
  color: var(--ink-2);
}
.lp-faq__a > :last-child { margin-bottom: 0; }
