:root {
  --pl-red: #c8102e;
  --pl-red-dark: #9b0c24;
  --pl-red-soft: #fde8ec;
  --pl-white: #ffffff;
  --pl-black: #1a1a1a;
  --pl-gray: #6b7280;
  --pl-gray-light: #f3f4f6;
  --pl-gray-mid: #e5e7eb;
  --bg: var(--pl-gray-light);
  --surface: var(--pl-white);
  --text: var(--pl-black);
  --muted: var(--pl-gray);
  --accent: var(--pl-red);
  --accent-soft: var(--pl-red-soft);
  --border: var(--pl-gray-mid);
  --radius: 8px;
  --radius-sm: 6px;
  --container-max: 1120px;
  --container-pad: clamp(16px, 3vw, 24px);
  --page-gutter: max(var(--container-pad), calc((100vw - var(--container-max)) / 2));
  --header-h: 56px;
  --footer-h: 44px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html,
body.landing-page {
  height: 100%;
  overflow: hidden;
}

body.landing-page {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

button {
  font-family: inherit;
}

.landing-viewport {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  padding-inline: var(--page-gutter);
}

.landing-header {
  flex-shrink: 0;
  background: var(--pl-white);
  border-bottom: 1px solid var(--border);
  box-shadow: inset 0 -2px 0 var(--pl-red);
  margin-inline: calc(-1 * var(--page-gutter));
  padding-inline: var(--page-gutter);
}

.landing-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 16px;
  max-width: var(--container-max);
  margin-inline: auto;
  width: 100%;
}

.landing-brand {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.landing-header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.landing-nav-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: none;
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.landing-nav-link:hover {
  color: var(--text);
  background: var(--bg);
  border-color: var(--border);
}

.landing-main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(16px, 2.5vh, 28px);
  max-width: var(--container-max);
  margin-inline: auto;
  width: 100%;
  padding-block: clamp(12px, 2vh, 24px);
}

.landing-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(20px, 3vw, 40px);
  align-items: center;
}

.landing-eyebrow {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 10px;
}

.landing-hero-copy h1 {
  font-size: clamp(24px, 3.8vw, 38px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin-bottom: 12px;
}

.landing-lead {
  font-size: clamp(14px, 1.8vw, 17px);
  color: var(--muted);
  max-width: 52ch;
  margin-bottom: 18px;
}

.landing-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.landing-hero-note {
  font-size: 12px;
  color: var(--muted);
  max-width: 48ch;
}

.landing-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.landing-btn-sm {
  padding: 8px 14px;
  font-size: 13px;
}

.landing-btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.landing-btn-primary:hover {
  background: var(--pl-red-dark);
  border-color: var(--pl-red-dark);
}

.landing-btn-secondary {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

.landing-btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.landing-btn-block {
  width: 100%;
  margin-top: 4px;
}

.landing-hero-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.landing-preview-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(14px, 2vh, 20px);
}

.landing-preview-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent);
  margin-bottom: 10px;
}

.landing-preview-ru {
  font-size: clamp(16px, 2vw, 18px);
  font-weight: 600;
  margin-bottom: 12px;
}

.landing-preview-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.landing-slot {
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-weight: 600;
  font-size: 14px;
}

.landing-slot-empty {
  border-style: dashed;
  color: var(--muted);
  font-weight: 500;
}

.landing-preview-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.landing-preview-stats div {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  text-align: center;
}

.landing-preview-stats b {
  display: block;
  font-size: 16px;
  color: var(--accent);
  margin-bottom: 2px;
}

.landing-preview-stats span {
  font-size: 11px;
  color: var(--muted);
}

.landing-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.landing-feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(12px, 1.8vh, 16px);
}

.landing-feature h3 {
  font-size: 14px;
  margin-bottom: 4px;
}

.landing-feature p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.landing-footer {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px 12px;
  min-height: var(--footer-h);
  font-size: 12px;
  color: var(--muted);
  max-width: var(--container-max);
  margin-inline: auto;
  width: 100%;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.landing-footer .account-feedback {
  flex: 1 1 280px;
  order: 2;
}

.landing-footer > span:first-child {
  order: 1;
}

.landing-footer .landing-footer-link {
  order: 3;
}

.landing-footer-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.landing-footer-link:hover {
  color: var(--accent);
}

/* ---------- auth modal ---------- */

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.auth-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 26, 0.45);
  backdrop-filter: blur(4px);
}

.auth-modal-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  max-height: min(92dvh, 640px);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 22px 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
}

.auth-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.auth-modal-close:hover {
  color: var(--text);
  border-color: var(--accent);
}

.auth-modal-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  padding-right: 36px;
}

.auth-modal-lead {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
  line-height: 1.45;
}

.landing-auth-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.auth-tab {
  font-size: 14px;
  font-weight: 600;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.auth-tab.active {
  background: var(--bg);
  color: var(--accent);
  border-color: var(--border);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-label {
  font-size: 13px;
  font-weight: 600;
  margin-top: 8px;
}

.auth-label:first-child {
  margin-top: 0;
}

.auth-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
  background: var(--surface);
  color: var(--text);
}

.auth-input:focus {
  outline: 2px solid rgba(200, 16, 46, 0.2);
  border-color: var(--accent);
}

.auth-feedback {
  margin-top: 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
}

.auth-feedback.is-error {
  color: var(--accent);
}

.auth-footnote {
  margin-top: 12px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.45;
}

.auth-hint {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

.auth-verify-lead {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 12px;
}

.auth-input-code {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-align: center;
}

.auth-verify-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.auth-link-btn {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.auth-link-btn:hover {
  text-decoration: underline;
}

.hidden { display: none !important; }

body.auth-modal-open {
  overflow: hidden;
}

@media (max-width: 900px) {
  .landing-hero-grid,
  .landing-feature-grid {
    grid-template-columns: 1fr;
  }

  .landing-hero-panel {
    display: none;
  }

  .landing-feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .landing-hero-copy h1 {
    font-size: 22px;
  }

  .landing-lead {
    font-size: 14px;
    margin-bottom: 14px;
  }

  .landing-feature-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .landing-feature {
    padding: 10px 12px;
  }

  .landing-feature h3 {
    font-size: 13px;
  }

  .landing-feature p {
    font-size: 11px;
  }

  .landing-header-nav .landing-nav-link {
    display: none;
  }
}

@media (max-height: 700px) {
  .landing-feature-grid {
    display: none;
  }

  .landing-hero-copy h1 {
    font-size: clamp(20px, 4vh, 28px);
  }

  .landing-lead {
    display: none;
  }
}
