/* ═══ Sol DS · landing.css ═══
   Стили для landing + auth + onboarding.
   Использует токены из tokens.css и классы из components.css. */

/* ─── Утилиты ─── */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.fw-bold { font-weight: 600; }
.text-accent { color: var(--accent-fg); }
.text-2 { color: var(--text-2); }
.text-3 { color: var(--text-3); }

.fs-14\/16 { font-size: 14px; line-height: 16px; }
.fs-16\/20 { font-size: 16px; line-height: 20px; }
.fs-20\/24 { font-size: 20px; line-height: 24px; }
.fs-24\/28 { font-size: 24px; line-height: 28px; }
.fs-32\/32 { font-size: 32px; line-height: 32px; }
.fs-32\/36 { font-size: 32px; line-height: 36px; }

.section-padded { max-width: 1080px; margin: 0 auto; padding: var(--s-12) var(--s-6); }
.section-title {
  font-size: var(--fs-32); font-weight: 500; letter-spacing: -0.015em;
  margin: 0 0 var(--s-6); line-height: 1.2;
}

/* ─── Header ─── */
.header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: var(--s-6);
  max-width: 1080px; margin: 0 auto;
  padding: var(--s-3) var(--s-6);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-left { display: flex; align-items: center; gap: var(--s-3); }
.header-left .orb { flex-shrink: 0; }
.header-nav { display: flex; gap: var(--s-5); align-items: center; flex: 1; }
.header-nav a { color: var(--text-2); font-size: var(--fs-14); text-decoration: none; transition: color var(--dur-fast) var(--ease); }
.header-nav a:hover { color: var(--text); }
.header-actions { display: flex; gap: var(--s-2); align-items: center; }

/* ─── Hero ─── */
.hero {
  position: relative; overflow: hidden;
  min-height: auto;
  padding: 120px var(--s-6) var(--s-10);
  display: flex; flex-direction: column;
  align-items: center; justify-content: flex-start;
  text-align: center;
}
.hero::before {
  content: ''; position: absolute; inset: -30% -20% auto -20%;
  height: 80%; pointer-events: none;
  background: radial-gradient(ellipse at 50% 40%,
    color-mix(in srgb, var(--accent) 6%, transparent) 0%,
    transparent 55%);
}
.hero > * { position: relative; z-index: 1; }

.hero-title {
  font-size: clamp(28px, 4vw, 44px); font-weight: 500;
  letter-spacing: -0.01em; line-height: 1.1;
  margin: 0 0 var(--s-6); max-width: 720px;
}
.hero-subtitle {
  font-size: var(--fs-16); color: var(--text-2); line-height: 1.5;
  margin: 0 0 var(--s-6); max-width: 560px;
}
.hero-actions { display: flex; gap: var(--s-3); flex-wrap: wrap; justify-content: center; }
.hero .btn-ghost { color: var(--text-2); }

.presence-orb-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: var(--s-10) auto 0;
  padding-top: 4vh;
  text-align: center;
}
.presence-orb-wrapper .orb {
  margin: 0 auto;
  --orb: 64px;
}

/* ─── Features ─── */
.feature-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--s-4); margin-top: var(--s-6);
}
.feature-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: var(--s-5);
}
.feature-card:hover { border-color: var(--border); }
.feature-card .icon { color: var(--accent-fg); margin-bottom: var(--s-3); }
.feature-card h3 { margin: 0 0 var(--s-2); font-size: var(--fs-16); font-weight: 500; }
.feature-card p { margin: 0; font-size: var(--fs-14); color: var(--text-2); line-height: 1.5; }

/* ─── Steps ─── */
.steps-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--s-5); margin-top: var(--s-6);
}
.step-card { padding: var(--s-5) 0 0; }
.step-number {
  display: block; font-family: var(--font-mono); font-size: var(--fs-14);
  color: var(--text-3); margin-bottom: var(--s-2); font-weight: 500;
}
.step-card h4 { margin: 0 0 var(--s-2); font-size: var(--fs-16); font-weight: 500; }
.step-card p { margin: 0; color: var(--text-2); font-size: var(--fs-14); line-height: 1.5; }

/* ─── Pricing ─── */
.pricing-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--s-4); margin-top: var(--s-6);
}
.pricing-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: var(--s-5);
  display: flex; flex-direction: column;
}
.pricing-card h3 { margin: 0 0 var(--s-2); font-size: var(--fs-16); font-weight: 500; }
.pricing-card .price { font-size: var(--fs-24); font-weight: 500; margin: var(--s-2) 0 var(--s-4); }
.pricing-features { list-style: none; padding: 0; margin: 0 0 var(--s-4); flex: 1; }
.pricing-features li { padding: var(--s-2) 0; font-size: var(--fs-14); color: var(--text-2); border-bottom: 1px solid var(--border); }
.pricing-features li:last-child { border-bottom: 0; }

/* ─── CTA ─── */
.cta-section { text-align: center; padding: var(--s-12) var(--s-6); max-width: 640px; margin: 0 auto; }
.cta-section h2 { font-size: var(--fs-24); font-weight: 500; margin: 0 0 var(--s-3); }
.cta-section p { color: var(--text-2); margin: 0 0 var(--s-6); }
.cta-form { display: flex; gap: var(--s-2); flex-wrap: wrap; justify-content: center; }
.cta-form input { flex: 1; min-width: 240px; }

/* ─── Footer ─── */
.footer { border-top: 1px solid var(--border); margin-top: var(--s-12); padding: var(--s-10) var(--s-6) var(--s-6); max-width: 1080px; margin-inline: auto; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--s-6); margin-bottom: var(--s-8); }
.footer-col h4 { margin: 0 0 var(--s-3); font-size: var(--fs-14); font-weight: 500; color: var(--text-2); }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin: 0 0 var(--s-2); }
.footer-links a { color: var(--text-3); font-size: var(--fs-14); text-decoration: none; }
.footer-links a:hover { color: var(--text); }
.footer-bottom { padding-top: var(--s-5); border-top: 1px solid var(--border); font-size: var(--fs-12); color: var(--text-3); text-align: center; }

/* ─── AUTH ─── */
.auth-card {
  max-width: 400px; margin: var(--s-12) auto; padding: var(--s-8) var(--s-6);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow-md);
}
.auth-logo { display: flex; justify-content: center; margin-bottom: var(--s-5); }
.auth-title { font-size: var(--fs-24); font-weight: 500; text-align: center; margin: 0 0 var(--s-2); }
.auth-card > p { text-align: center; color: var(--text-2); font-size: var(--fs-14); margin: 0 0 var(--s-6); }

.form-group { margin-bottom: var(--s-4); }
.password-field { position: relative; }
.password-field .toggle-password {
  position: absolute; right: var(--s-2); top: 50%; transform: translateY(-50%);
  background: transparent; border: 0; padding: var(--s-2); color: var(--text-3);
  cursor: pointer; display: grid; place-items: center; border-radius: var(--r-sm);
}
.password-field .toggle-password:hover { color: var(--text); }
.password-field .input { padding-right: 44px; }

.options-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--s-4); font-size: var(--fs-14); }

.divider { display: flex; align-items: center; gap: var(--s-3); margin: var(--s-5) 0; color: var(--text-3); font-size: var(--fs-12); }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.oauth-buttons { display: grid; gap: var(--s-2); margin-bottom: var(--s-5); }
.oauth-btn {
  display: flex; align-items: center; justify-content: center; gap: var(--s-2);
  width: 100%; height: 40px; padding: 0 var(--s-4);
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r-sm); color: var(--text); font-size: var(--fs-14);
  font-weight: 500; cursor: pointer; transition: border-color var(--dur-fast) var(--ease);
}
.oauth-btn:hover:not([aria-disabled="true"]) { border-color: var(--border-strong); }
.oauth-btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }

.btn-full { width: 100%; }
.alt-action { text-align: center; font-size: var(--fs-14); color: var(--text-2); margin-top: var(--s-5); }
.alt-action a { color: var(--accent-fg); text-decoration: none; }
.alt-action a:hover { text-decoration: underline; }

.password-strength { display: flex; gap: 4px; margin-top: var(--s-2); }
.strength-segment { flex: 1; height: 3px; background: var(--surface-2); border-radius: var(--r-full); transition: background var(--dur) var(--ease); }
.strength-segment[data-level="1"] { background: var(--error); }
.strength-segment[data-level="2"] { background: var(--warning); }
.strength-segment[data-level="3"] { background: var(--accent); }
.strength-segment[data-level="4"] { background: var(--success); }
.strength-label { font-size: var(--fs-12); color: var(--text-3); margin-top: var(--s-1); }

.info-message {
  padding: var(--s-4);
  background: color-mix(in srgb, var(--success) 10%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--success) 40%, transparent);
  border-radius: var(--r-md); font-size: var(--fs-14); color: var(--text); margin: var(--s-4) 0;
}

/* ─── Адаптив ─── */
@media (max-width: 768px) {
  .header { padding: var(--s-3) var(--s-4); gap: var(--s-3); }
  .header-nav { display: none; }
  .section-padded { padding: var(--s-8) var(--s-4); }
  .hero { min-height: auto; padding: var(--s-8) var(--s-4); }
  .hero-title { font-size: clamp(28px, 7vw, 40px); }
  .hero-subtitle { font-size: var(--fs-16); }
  .auth-card { margin: var(--s-6) var(--s-4); padding: var(--s-6) var(--s-4); }
  .section-title { font-size: var(--fs-24); }
}
@media (max-width: 480px) {
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions > * { width: 100%; }
  .cta-form { flex-direction: column; }
  .cta-form > * { width: 100%; }
}


/* ─── Убираем focus-обводку у кнопок при клике мышью ─── */
.hero .btn:focus:not(:focus-visible),
.cta-form .btn:focus:not(:focus-visible),
.auth-card .btn:focus:not(:focus-visible) {
  outline: none;
}

.auth-subtitle { text-align: center; margin: 0 0 var(--s-6); color: var(--text-2); font-size: var(--fs-14); }

/* ═══ ONBOARDING ═══ */
.onb-wrap {
  min-height: 100vh;
  padding: var(--s-12) var(--s-6) var(--s-10);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; gap: var(--s-6);
  position: relative;
}
.onb-dots { display: flex; gap: var(--s-2); margin-bottom: var(--s-4); }
.onb-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--border);
  transition: background var(--dur) var(--ease);
}
.onb-dot.is-active { background: var(--accent-fg); }
.onb-screen {
  max-width: 640px; width: 100%;
  display: flex; flex-direction: column;
  align-items: center; gap: var(--s-4);
}
.onb-chips {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: var(--s-2); width: 100%; margin: var(--s-4) 0;
}
.onb-chip {
  padding: var(--s-3) var(--s-4);
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--r-md);
  color: var(--text-2); font-size: var(--fs-14);
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease),
              background var(--dur-fast) var(--ease);
}
.onb-chip:hover { border-color: var(--border-strong); color: var(--text); }
.onb-chip.is-selected {
  border-color: var(--accent);
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
}
.onb-examples {
  display: flex; flex-wrap: wrap; gap: var(--s-2);
  justify-content: center; margin: var(--s-4) 0;
}
.onb-progress {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: 2px; background: var(--surface-2);
}
.onb-progress-fill {
  display: block; height: 100%;
  background: var(--accent-fg); width: 25%;
  transition: width var(--dur-slow) var(--ease);
}
.hidden { display: none !important; }

/* ═══ PROFILE ═══ */
.profile-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--s-6);
  max-width: 1080px;
  margin: 0 auto;
  padding: var(--s-6);
  align-items: start;
}
.profile-nav {
  display: flex; flex-direction: column; gap: var(--s-1);
  position: sticky; top: 80px;
}
.profile-nav-link {
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-sm);
  color: var(--text-2);
  text-decoration: none;
  font-size: var(--fs-14);
  transition: all var(--dur-fast) var(--ease);
}
.profile-nav-link:hover { color: var(--text); background: var(--surface); }
.profile-nav-link.is-active {
  color: var(--text);
  background: var(--surface-2);
  border-left: 2px solid var(--accent-fg);
}
.profile-content { display: flex; flex-direction: column; gap: var(--s-6); }
.profile-section {
  display: flex; flex-direction: column; gap: var(--s-4);
  scroll-margin-top: 80px;
}
.profile-section .card + .card { margin-top: 0; }
.profile-section .btn { align-self: flex-start; }

@media (max-width: 768px) {
  .profile-layout { grid-template-columns: 1fr; padding: var(--s-4); }
  .profile-nav {
    flex-direction: row;
    overflow-x: auto;
    position: static;
    padding-bottom: var(--s-2);
  }
  .profile-nav-link { white-space: nowrap; }
}

/* ═══ PRICING ═══ */
.pricing-card.is-featured {
  border-color: var(--accent);
  position: relative;
  box-shadow: 0 0 0 1px var(--accent);
}
.pricing-card.is-featured::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--r-md);
  pointer-events: none;
  box-shadow: 0 0 40px -20px var(--accent);
}
details {
  border-top: 1px solid var(--border);
  padding: var(--s-3) 0;
}
details:first-of-type { border-top: 0; }
details summary {
  cursor: pointer;
  font-weight: 500;
  color: var(--text);
  list-style: none;
  padding: var(--s-2) 0;
}
details summary::-webkit-details-marker { display: none; }
details summary::after {
  content: '+';
  float: right;
  color: var(--text-3);
  font-family: var(--font-mono);
}
details[open] summary::after { content: '−'; }
details p {
  margin: var(--s-2) 0 0;
  color: var(--text-2);
  font-size: var(--fs-14);
  line-height: 1.6;
}

/* ═══ SETTINGS ═══ */
.settings-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--s-6);
  max-width: 1080px;
  margin: 0 auto;
  padding: var(--s-6);
  align-items: start;
}
.settings-nav {
  display: flex; flex-direction: column; gap: var(--s-1);
  position: sticky; top: 80px;
}
.settings-nav-link {
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-sm);
  color: var(--text-2);
  text-decoration: none;
  font-size: var(--fs-14);
  transition: all var(--dur-fast) var(--ease);
}
.settings-nav-link:hover { color: var(--text); background: var(--surface); }
.settings-nav-link.is-active {
  color: var(--text);
  background: var(--surface-2);
  border-left: 2px solid var(--accent-fg);
}
.settings-content { display: flex; flex-direction: column; gap: var(--s-6); }
.settings-section {
  display: flex; flex-direction: column; gap: var(--s-4);
  scroll-margin-top: 80px;
}
.settings-section .btn { align-self: flex-start; }

@media (max-width: 768px) {
  .settings-layout { grid-template-columns: 1fr; padding: var(--s-4); }
  .settings-nav { flex-direction: row; overflow-x: auto; position: static; }
  .settings-nav-link { white-space: nowrap; }
}

/* ═══ MEMORY ═══ */
.memory-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--s-6);
  max-width: 1080px;
  margin: 0 auto;
  padding: var(--s-6);
  align-items: start;
}
.memory-nav {
  display: flex; flex-direction: column; gap: var(--s-1);
  position: sticky; top: 80px;
}
.memory-nav-link {
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-sm);
  color: var(--text-2);
  text-decoration: none;
  font-size: var(--fs-14);
  transition: all var(--dur-fast) var(--ease);
}
.memory-nav-link:hover { color: var(--text); background: var(--surface); }
.memory-nav-link.is-active {
  color: var(--text);
  background: var(--surface-2);
  border-left: 2px solid var(--accent-fg);
}
.memory-content { display: flex; flex-direction: column; gap: var(--s-6); }
.memory-section {
  display: flex; flex-direction: column; gap: var(--s-4);
  scroll-margin-top: 80px;
}
.memory-section .btn { align-self: flex-start; }

.memory-mood-chart {
  display: flex; gap: 4px; align-items: flex-end;
  height: 120px; padding: var(--s-3) 0;
}
.memory-mood-bar {
  flex: 1;
  background: var(--accent-fg);
  border-radius: 2px 2px 0 0;
  min-height: 8px;
  opacity: 0.7;
  transition: opacity var(--dur-fast) var(--ease);
}
.memory-mood-bar:hover { opacity: 1; }

@media (max-width: 768px) {
  .memory-layout { grid-template-columns: 1fr; padding: var(--s-4); }
  .memory-nav { flex-direction: row; overflow-x: auto; position: static; }
  .memory-nav-link { white-space: nowrap; }
}

/* ═══ Hero Section (каркас, ассеты ждут дизайнера) ═══ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(180deg, #0a0a0c 0%, #1a1028 100%); /* CSS fallback */
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
}
.hero-bg img {
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0.6;
}
.hero-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 1;
  opacity: 0; /* Появится, когда poster загрузится (заменим на opacity:1 когда будут ассеты) */
}
.hero-content {
  position: relative; z-index: 2;
  max-width: 800px;
  padding: 0 24px;
  text-align: center;
}
.hero-title {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -1.5px;
}
.hero-lead {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--fg-2);
  line-height: 1.5;
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto; margin-right: auto;
}
.hero-actions {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
}
