/*
 * Landing page (`/`, templates/landing/index.html).
 *
 * No colour is written here: every value is a token app.css already declares on :root
 * (input.css @theme static), and night mode redefines those same tokens — so this page
 * follows the day/night switch without a single dark rule of its own. Classes carry an
 * `lp-` prefix because app.css has its own .btn/.card/.nav-link.
 *
 * Mobile first: 360px, then 768px (48rem), then 1280px (80rem).
 */

:root {
  --lp-shadow: color-mix(in srgb, var(--color-scrim) 8%, transparent);
  --lp-shadow-strong: color-mix(in srgb, var(--color-scrim) 14%, transparent);
  --lp-radius-badge: 6px;
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .lp *, .lp *::before, .lp *::after { transition: none !important; animation: none !important; }
}

.lp-body { background: var(--color-bg); }

.lp {
  font-family: var(--font-sans);
  font-size: 1.0625rem; /* 17px */
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}
.lp h1, .lp h2, .lp h3 { margin: 0; color: var(--color-text); text-wrap: balance; }
.lp h1 { font-size: 2.125rem; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; }
.lp h2 { font-size: 1.625rem; line-height: 1.2; font-weight: 700; letter-spacing: -0.015em; }
.lp h3 { font-size: 1.25rem; line-height: 1.3; font-weight: 600; }
.lp p { margin: 0; }
.lp ol, .lp ul { margin: 0; padding: 0; list-style: none; }

.lp-wrap { max-width: 70rem; margin: 0 auto; padding: 0 1rem; }
.lp-stack { display: flex; flex-direction: column; gap: 2.5rem; }
.lp-section { padding: 3.5rem 0; }
.lp-subtle { background: var(--color-bg-subtle); }
.lp-head { max-width: 40rem; display: flex; flex-direction: column; gap: 0.75rem; }
.lp-lead { font-size: 1.125rem; color: var(--color-text-muted); text-wrap: pretty; }
.lp-sub { color: var(--color-text-muted); text-wrap: pretty; }
.lp-small { font-size: 0.9375rem; }
.lp-link { color: var(--color-primary); font-weight: 600; text-decoration: none; border-radius: 4px; }
.lp-link:hover { color: var(--color-primary-hover); }

/* Icons: {% icon name "lp-ic" %} draws currentColor strokes. */
.lp-ic { width: 1.25rem; height: 1.25rem; flex: none; }
.lp-ic-sm { width: 1rem; height: 1rem; flex: none; }
.lp-ic-xs { width: 0.875rem; height: 0.875rem; flex: none; }
.lp-ic-lg { width: 1.5rem; height: 1.5rem; flex: none; }
.lp-ic-success { color: var(--color-success); }
.lp-ic-primary { color: var(--color-primary); }

/* Buttons — 48px tall (52px from tablet), never under the 44px touch target. */
.lp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 3rem; padding: 0 1.25rem;
  border-radius: var(--radius-btn); border: 1px solid transparent;
  font: 600 1rem/1.2 var(--font-sans); text-decoration: none; white-space: nowrap;
  cursor: pointer;
  transition: background-color 150ms, border-color 150ms, color 150ms, box-shadow 150ms;
}
.lp-btn:focus-visible, .lp-link:focus-visible, .lp summary:focus-visible, .lp-brand:focus-visible {
  outline: 2px solid var(--color-primary); outline-offset: 3px;
}
.lp-btn-primary { background: var(--color-primary-fill); color: var(--color-on-primary); }
.lp-btn-primary:hover { background: var(--color-primary-fill-hover); }
.lp-btn-primary:active { background: var(--color-primary-fill-hover); transform: translateY(1px); }
.lp-btn-secondary { background: var(--color-bg); color: var(--color-text); border-color: var(--color-border-muted); }
.lp-btn-secondary:hover { background: var(--color-bg-subtle); border-color: var(--color-border-strong); }
.lp-btn-secondary:active { transform: translateY(1px); }
.lp-btn-ghost { background: transparent; color: var(--color-text); }
.lp-btn-ghost:hover { background: var(--color-bg-subtle); }
.lp-btn-ghost:active { background: var(--color-neutral-soft); }

/* Navbar: both buttons stay visible on a phone, they only get tighter. */
.lp-nav {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--color-bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}
.lp-nav-row { min-height: 4rem; display: flex; align-items: center; gap: 0.25rem; }
.lp-brand { display: flex; align-items: center; gap: 0.625rem; margin-right: auto; text-decoration: none; color: var(--color-text-muted); border-radius: 8px; min-height: 2.75rem; }
.lp-brand img { height: 1.625rem; width: auto; }
.lp-brand-word { display: none; font-weight: 600; font-size: 1.0625rem; }
.lp-nav-actions { display: flex; align-items: center; gap: 0.25rem; }
.lp-btn-nav { min-height: 2.75rem; padding: 0 0.75rem; font-size: 0.9375rem; }
@media (min-width: 26rem) {
  .lp-brand img { height: 2rem; }
  .lp-brand-word { display: inline; }
  .lp-nav-actions { gap: 0.5rem; }
  .lp-btn-nav { padding: 0 1rem; font-size: 1rem; }
}

/* Hero */
.lp-hero {
  padding: 3rem 0 3.5rem;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--color-primary) 9%, transparent),
    color-mix(in srgb, var(--color-accent) 8%, transparent) 60%,
    transparent);
}
.lp-hero-grid { display: grid; gap: 2.5rem; }
.lp-hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 1.5rem; }
.lp-eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.875rem; font-weight: 600; line-height: 1.4;
  color: var(--color-primary); background: var(--color-primary-soft);
  padding: 0.375rem 0.75rem; border-radius: var(--lp-radius-badge);
}
.lp-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.lp-trust { display: flex; flex-wrap: wrap; gap: 0.25rem 0.625rem; font-size: 0.9375rem; color: var(--color-text-muted); }

/* The hero mockup — the one decorative element on the page. */
.lp-mock {
  display: flex; flex-direction: column; gap: 0.875rem;
  width: 100%; max-width: 27.5rem;
  padding: 1.25rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: 0 24px 60px var(--lp-shadow-strong);
}
.lp-mock-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.75rem; flex-wrap: wrap; }
.lp-mock-hello { font-size: 0.875rem; color: var(--color-text-muted); }
.lp-mock-today { font-size: 1.25rem; font-weight: 700; line-height: 1.3; }
.lp-chip {
  display: inline-flex; align-items: center; gap: 0.375rem;
  font-size: 0.8125rem; font-weight: 600; line-height: 1.3;
  padding: 0.375rem 0.625rem; border-radius: var(--lp-radius-badge);
}
.lp-chip-warning { color: var(--color-warning-strong); background: var(--color-warning-soft); }
.lp-mock-progress-row { display: flex; justify-content: space-between; font-size: 0.875rem; margin-bottom: 0.375rem; }
.lp-mock-progress-row span { color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.lp-bar { height: 0.5rem; border-radius: 99px; background: var(--color-bg-subtle); overflow: hidden; }
.lp-bar > span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--color-primary), var(--color-accent)); }
.lp-bar-thin { height: 0.25rem; margin-top: 0.375rem; background: var(--color-bg); }
.lp-days { display: flex; flex-direction: column; gap: 0.375rem; }
.lp-day {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.625rem 0.75rem; border-radius: var(--radius-btn);
  border: 1px solid var(--color-border);
}
.lp-day.is-current { border-color: var(--color-primary); background: var(--color-primary-soft); }
.lp-day.is-locked { color: var(--color-text-muted); }
.lp-day-n {
  width: 2rem; height: 2rem; flex: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8125rem; font-weight: 700; background: var(--color-bg-subtle);
}
.lp-day-n.is-done { background: var(--color-success-soft); color: var(--color-success-strong); }
.lp-day-n.is-current { background: var(--color-primary-fill); color: var(--color-on-primary); }
.lp-day-title { flex: 1; min-width: 0; font-weight: 600; font-size: 0.9375rem; }
.lp-day-body { flex: 1; min-width: 0; }
.lp-day-line { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 0.9375rem; }
.lp-day-state { font-size: 0.8125rem; font-weight: 600; white-space: nowrap; }
.lp-day-state.is-done { color: var(--color-success-strong); }
.lp-day-state.is-current { color: var(--color-primary); }

/* How it works */
.lp-steps { display: grid; gap: 1.5rem; counter-reset: none; }
.lp-steps li { display: flex; flex-direction: column; gap: 0.75rem; }
.lp-step-n {
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-primary-fill); color: var(--color-on-primary); font-weight: 700;
}

/* Cards — hover only touches the border and the shadow, nothing lifts. */
.lp-grid { display: grid; gap: 1rem; }
.lp-grid-wide { gap: 2rem; }
.lp-card {
  display: flex; flex-direction: column; gap: 0.875rem;
  padding: 1.5rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  transition: border-color 150ms, box-shadow 150ms;
}
.lp-card:hover { border-color: var(--color-border-muted); box-shadow: 0 4px 16px var(--lp-shadow); }
.lp-icbox {
  width: 3rem; height: 3rem; flex: none; border-radius: var(--radius-btn);
  display: flex; align-items: center; justify-content: center;
  background: var(--color-primary-soft); color: var(--color-primary);
}
.lp-icbox-sm { width: 2.25rem; height: 2.25rem; border-radius: 10px; }
.lp .lp-h3-sm { font-size: 1.125rem; }
.lp-note { display: flex; gap: 0.625rem; align-items: flex-start; font-size: 0.9375rem; color: var(--color-text-muted); max-width: 48rem; }
.lp-note-ic { color: var(--color-primary); margin-top: 0.1875rem; width: 1.125rem; height: 1.125rem; }

/* Who it is for */
.lp-list-block { display: flex; flex-direction: column; gap: 1rem; }
.lp-list-title { display: flex; align-items: center; gap: 0.625rem; }
.lp-list { display: flex; flex-direction: column; gap: 0.75rem; }
.lp-list li { display: flex; gap: 0.75rem; }
.lp-list .lp-ic { margin-top: 0.1875rem; }

/* FAQ — <details>, so it works without JS. */
.lp-faq { max-width: 47.5rem; border-top: 1px solid var(--color-border); }
.lp-faq details { border-bottom: 1px solid var(--color-border); }
.lp-faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  min-height: 3.5rem; padding: 1rem 0;
  font-weight: 600; font-size: 1.125rem; line-height: 1.4;
  border-radius: 4px;
}
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq-ic { color: var(--color-primary); transition: transform 200ms; }
.lp-faq details[open] .lp-faq-ic { transform: rotate(45deg); }
.lp-faq details p { margin: 0 0 1.125rem; color: var(--color-text-muted); max-width: 40rem; }

/* Final call to action */
.lp-cta { background: var(--color-primary-soft); }
.lp-cta-inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1.25rem; }

/* Footer */
.lp-foot { padding: 2.5rem 0; border-top: 1px solid var(--color-border); color: var(--color-text-muted); font-size: 0.9375rem; }
.lp-foot-row { display: flex; flex-direction: column; gap: 1rem; }
.lp-foot-brand { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.lp-foot-brand img { height: 1.75rem; width: auto; }
.lp-foot-links { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.lp-foot-tg { display: inline-flex; align-items: center; gap: 0.375rem; min-height: 2.75rem; }

/* Sertifikatni tekshirish: one box and a button, side by side from the tablet up. */
.lp-cert { display: flex; flex-direction: column; align-items: flex-start; gap: 1.25rem; max-width: 46rem; }
.lp-cert-form { display: flex; flex-direction: column; gap: 0.75rem; width: 100%; }
.lp-input {
  min-height: 3rem; width: 100%; padding: 0 1rem; border: 1px solid var(--color-border-muted); border-radius: 12px;
  background: var(--color-bg); color: var(--color-text); font: 500 1.125rem/1 var(--font-sans); letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}
.lp-input::placeholder { color: var(--color-text-muted); letter-spacing: 0; }
.lp-input:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; border-color: var(--color-primary); }
.lp-cert-form .lp-btn { gap: 0.5rem; }
/* The header link only where there is room for it; the section and the footer link are always there. */
.lp-nav-cert { display: none; }

/* Tablet */
@media (min-width: 48rem) {
  .lp-cert-form { flex-direction: row; }
  .lp-cert-form .lp-input { flex: 1; min-height: 3.25rem; }
  .lp-nav-cert { display: inline-flex; }
  .lp-wrap { padding: 0 1.5rem; }
  .lp-section { padding: 5rem 0; }
  .lp-hero { padding: 4.5rem 0 5rem; }
  .lp h1 { font-size: 2.75rem; }
  .lp h2 { font-size: 2.125rem; }
  .lp h3 { font-size: 1.375rem; }
  .lp-btn { min-height: 3.25rem; padding: 0 1.5rem; }
  .lp-btn-nav { min-height: 2.75rem; padding: 0 1rem; }
  .lp-grid-2 { grid-template-columns: 1fr 1fr; }
  .lp-grid-3 { grid-template-columns: 1fr 1fr; }
  .lp-grid-4 { grid-template-columns: 1fr 1fr; }
  .lp-steps { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .lp-foot-row { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* Desktop */
@media (min-width: 80rem) {
  .lp-section { padding: 6rem 0; }
  .lp-hero { padding: 5.5rem 0 6.5rem; }
  .lp-hero-grid { grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 3.5rem; }
  .lp-mock { margin-left: auto; max-width: none; }
  .lp h1 { font-size: 3.25rem; }
  .lp-grid-3 { grid-template-columns: repeat(3, 1fr); }
  .lp-grid-4 { grid-template-columns: repeat(4, 1fr); }
  .lp-steps { grid-template-columns: repeat(4, 1fr); }
}
