/* Homepage only. Content width — keep --ld-max-width in sync with site.css .container and viewer .pd-shell */
:root {
  --ld-max-width: 600px;
  --ld-accent: #ff890e;
  --ld-bg: #000000;
  /* Same as site.css .container — main column on black viewport */
  --ld-column-bg: rgb(16, 16, 16);
  --ld-surface: #101010;
  --ld-surface-elevated: #161616;
  --ld-text: rgba(255, 255, 255, 0.92);
  --ld-muted: rgba(255, 255, 255, 0.55);
  --ld-border: rgba(255, 255, 255, 0.08);
  --ld-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  --ld-shadow-soft: 0 4px 24px rgba(0, 0, 0, 0.35);
  --ld-radius: 14px;
  --ld-radius-sm: 10px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body.ld {
  margin: 0;
  min-height: 100vh;
  padding: 20px 16px;
  box-sizing: border-box;
  background: var(--ld-bg);
  color: var(--ld-text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 500;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* Centered column: dark grey on pure black sides (matches legacy .container) */
.ld-column {
  width: 100%;
  max-width: var(--ld-max-width);
  margin: 0 auto;
  background: var(--ld-column-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
  /* Vertical rails linking top + bottom orange bars (index only) */
  border-left: 3px solid var(--ld-accent);
  border-right: 3px solid var(--ld-accent);
}

/* Brand bar — only as wide as .ld-column */
.ld-topbar {
  width: 100%;
  background: var(--ld-accent);
  text-align: center;
  padding: 14px 20px;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.06);
}

.ld-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-decoration: none;
  color: #0c0c0c;
}

.ld-brand-icon {
  display: block;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 10px;
}

.ld-wordmark {
  font-family: "DM Serif Display", Georgia, "Times New Roman", serif;
  font-size: clamp(1.45rem, 3.5vw, 1.85rem);
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0.03em;
  color: #0c0c0c;
  display: inline-block;
}

.ld-brand:hover {
  opacity: 0.9;
}

/* Mirror of top bar at end of homepage only */
.ld-topbar--flip {
  box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.08);
}

.ld-brand--flip {
  transform: scaleY(-1);
  transform-origin: center;
  cursor: default;
  pointer-events: none;
}

.ld-wrap {
  padding: 0 20px 48px;
}

/* —— Hero —— */
.ld-hero {
  padding: 40px 0 48px;
  text-align: center;
}

.ld-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(1.65rem, 4.2vw + 1rem, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--ld-text);
}

.ld-hero .ld-lead {
  margin: 0 auto 32px;
  max-width: 34em;
  font-size: clamp(1rem, 0.25vw + 0.95rem, 1.125rem);
  font-weight: 500;
  color: var(--ld-muted);
  line-height: 1.6;
}

.ld-store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  justify-content: center;
  align-items: center;
}

.ld-store-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  text-decoration: none;
  border-radius: 8px;
  transition: opacity 0.15s ease, transform 0.15s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(255, 137, 14, 0.25);
  /* Same box width for both stores; image height follows each SVG’s aspect ratio */
  width: min(218px, calc(50% - 10px));
  max-width: 100%;
  flex: 0 1 auto;
  min-width: 0;
}

.ld-store-badge:hover {
  opacity: 0.9;
}

.ld-store-badge:focus-visible {
  outline: 2px solid var(--ld-accent);
  outline-offset: 4px;
}

.ld-store-badge img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* Narrow viewports: stack; full width of column, still one shared width for both */
@media (max-width: 480px) {
  .ld-store-row {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 10px;
    align-items: stretch;
  }

  .ld-store-badge {
    width: min(240px, 100%);
    max-width: 100%;
    margin-inline: auto;
  }
}

/* —— Section rhythm —— */
.ld-section {
  padding: 40px 0;
}

.ld-section-title {
  margin: 0 0 28px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ld-muted);
  text-align: center;
}

/* —— How it works —— */
.ld-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.ld-step {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 16px 18px;
  align-items: start;
  padding: 20px 0;
  border-bottom: 1px solid var(--ld-border);
}

.ld-step:first-child {
  padding-top: 0;
}

.ld-step:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.ld-step-num {
  grid-row: 1 / span 2;
  align-self: start;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--ld-surface-elevated);
  border: 1px solid var(--ld-border);
  color: var(--ld-accent);
  font-size: 0.875rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--ld-shadow-soft);
}

.ld-step h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ld-text);
}

.ld-step p {
  margin: 0;
  grid-column: 2;
  font-size: 0.9375rem;
  color: var(--ld-muted);
  font-weight: 500;
  line-height: 1.55;
}

/* —— Phone mockups —— */
.ld-preview {
  padding: 32px 0 48px;
}

.ld-phones {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  align-items: end;
}

@media (max-width: 520px) {
  .ld-phones {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .ld-phone {
    max-width: 220px;
  }
}

.ld-phone {
  border-radius: 22px;
  background: var(--ld-surface);
  border: 1px solid var(--ld-border);
  box-shadow: var(--ld-shadow);
  overflow: hidden;
  aspect-ratio: 9 / 18.5;
  max-height: 320px;
  display: flex;
  flex-direction: column;
}

.ld-phone--tall {
  max-height: 340px;
}

.ld-phone-notch {
  height: 22px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #1a1a1a 0%, #121212 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ld-phone-notch span {
  width: 56px;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.12);
}

.ld-phone-body {
  flex: 1;
  padding: 10px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}

.ld-ph-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ld-muted);
  text-align: center;
  margin-bottom: 2px;
}

/* Placeholder “editing” screen */
.ld-mock-lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 4px;
}

.ld-mock-line {
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
}

.ld-mock-line--short {
  width: 72%;
}

.ld-mock-line--accent {
  width: 45%;
  background: rgba(255, 137, 14, 0.35);
}

.ld-mock-block {
  margin-top: 6px;
  flex: 1;
  min-height: 48px;
  border-radius: 8px;
  background: rgba(255, 137, 14, 0.12);
  border: 1px dashed rgba(255, 137, 14, 0.25);
}

/* Placeholder “published” screen */
.ld-mock-card {
  flex: 1;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--ld-border);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ld-mock-title {
  height: 12px;
  width: 55%;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.18);
}

.ld-mock-p {
  height: 7px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.07);
}

.ld-mock-p:last-of-type {
  width: 80%;
}

/* Third phone — share */
.ld-mock-share {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 0;
}

.ld-mock-link {
  font-size: 0.65rem;
  color: var(--ld-accent);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.ld-mock-qr {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  background: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.12) 0px 4px,
    transparent 4px 8px
  ),
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.12) 0px 4px,
      transparent 4px 8px
    );
  opacity: 0.6;
}

/* —— Value bullets —— */
.ld-values {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.ld-values li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--ld-radius-sm);
  background: var(--ld-surface);
  border: 1px solid var(--ld-border);
  box-shadow: var(--ld-shadow-soft);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ld-text);
}

.ld-values li::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-top: 0.45em;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--ld-accent);
  box-shadow: 0 0 12px rgba(255, 137, 14, 0.45);
}

/* —— Final CTA —— */
.ld-cta {
  padding: 48px 0 32px;
  text-align: center;
}

.ld-cta h2 {
  margin: 0 0 24px;
  font-size: clamp(1.35rem, 2.5vw + 1rem, 1.65rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ld-text);
}

/* —— Footer —— */
.ld-footer {
  padding: 28px 0 8px;
  border-top: 1px solid var(--ld-border);
  text-align: center;
}

.ld-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: center;
  margin-bottom: 16px;
}

.ld-footer a {
  color: var(--ld-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.ld-footer a:hover {
  color: var(--ld-text);
}

.ld-footer small {
  display: block;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.35);
  font-weight: 500;
}
