/*
 * Get-AI home page (phase 10, R7.1; resources/views/pages/home.php, classes .lp-*), loaded with gai-chat.css through
 * the layout's `styles`. Mobile first from 320 px; light and dark from the Kit's tokens, the buyer's brand colour from
 * --brand. The hero's chat card is drawn in CSS: the messages come in one after another, the answers "type" in
 * (a stepped wipe) after the typing dots; with reduced motion everything is shown at once.
 */

.lp { overflow-x: clip; }

/* ---- a buyer's real site: name, tagline, the chat ---- */
.lp-site { padding-block: clamp(2rem, 1rem + 4vw, 4rem) clamp(2rem, 1rem + 3vw, 3.5rem); }
.lp-site h1 { font-size: clamp(2rem, 1.3rem + 3vw, var(--text-5xl)); overflow-wrap: anywhere; text-wrap: balance; }
.lp-site .lead { margin-top: var(--space-4); }
.lp-site-inner { text-align: center; }
.lp-site-links { display: flex; justify-content: center; margin: var(--space-4) 0 0; }
.lp-site .gai-home-chat { padding-block: var(--space-6) 0; text-align: start; }

/* ---- the demo: hero ---- */
.lp-hero {
  text-align: start;
  padding-block: clamp(2.5rem, 1.5rem + 5vw, 5.5rem) clamp(2.5rem, 1.5rem + 4vw, 4.5rem);
}
.lp-hero-inner { display: grid; gap: clamp(2rem, 1rem + 4vw, 4rem); align-items: center; }
@media (min-width: 960px) {
  .lp-hero-inner { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
}
.lp-hero-text { min-width: 0; }
.lp-hero h1 {
  max-width: 18ch;
  margin: 0;
  font-size: clamp(2rem, 1.3rem + 3vw, var(--text-5xl));
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.lp-hero .lead {
  max-width: 60ch;
  margin: var(--space-5) 0 0;
  color: var(--text-muted);
  font-size: clamp(var(--text-base), 0.95rem + 0.4vw, var(--text-lg));
  line-height: 1.6;
}
.lp-eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-2); max-width: 100%;
  margin: 0 0 var(--space-5); padding: var(--space-1) var(--space-3);
  border: 1px solid var(--brand-border); border-radius: var(--radius-lg);
  background: var(--brand-soft); color: var(--brand-text);
  font-size: var(--text-sm); font-weight: 600;
}
.lp-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin: var(--space-8) 0 0; }
.hero-actions { justify-content: flex-start; }
.lp-chips {
  display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5);
  margin: var(--space-8) 0 0; padding: 0; list-style: none;
  color: var(--text-muted); font-size: var(--text-sm);
}
.lp-chips li { display: inline-flex; align-items: center; gap: var(--space-2); }
.lp-chips .icon { color: var(--success); }

/* ---- the chat card drawn in CSS ---- */
.lp-hero-art { display: flex; justify-content: center; min-width: 0; }
.lp-chat {
  display: flex; flex-direction: column;
  width: min(100%, 420px); min-width: 0;
  border: 1px solid var(--border); border-radius: var(--radius-2xl);
  background: var(--surface); box-shadow: var(--shadow-xl);
  overflow: hidden;
}
.lp-chat-head {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
  background: var(--brand-soft);
}
.lp-chat-avatar {
  display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px;
  border-radius: var(--radius-full); background: var(--brand); color: var(--brand-fg);
}
.lp-chat-name { display: grid; min-width: 0; line-height: 1.3; }
.lp-chat-name strong { font-family: var(--font-heading); }
.lp-chat-name small { display: inline-flex; align-items: center; gap: var(--space-1); color: var(--text-muted); font-size: var(--text-xs); }
.lp-chat-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--success); }
.lp-chat-body {
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 19rem; padding: var(--space-4);
  background: var(--bg-subtle);
  font-size: var(--text-sm); line-height: 1.5;
}
.lp-say {
  max-width: 88%; margin: var(--space-3) 0 0; padding: var(--space-2) var(--space-3);
  border-radius: 16px; overflow-wrap: anywhere;
}
.lp-say:first-child { margin-top: 0; }
.lp-say-q { align-self: flex-end; background: var(--brand); color: var(--brand-fg); border-bottom-right-radius: 4px; }
.lp-say-a, .lp-say-dots {
  align-self: flex-start; background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-bottom-left-radius: 4px;
}
.lp-say-a { display: grid; gap: var(--space-2); }
.lp-type { display: block; }
.lp-chip-src {
  display: inline-flex; align-items: center; gap: var(--space-1); justify-self: start; max-width: 100%;
  padding: 2px var(--space-2); border: 1px solid var(--brand-border); border-radius: var(--radius-full);
  background: var(--brand-soft); color: var(--brand-text); font-size: var(--text-xs); font-weight: 600;
}
.lp-say-dots { display: inline-flex; gap: 4px; padding-block: var(--space-3); overflow: hidden; }
.lp-say-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-subtle); animation: gai-dot 1.2s infinite ease-in-out; }
.lp-say-dots i:nth-child(2) { animation-delay: .15s; }
.lp-say-dots i:nth-child(3) { animation-delay: .3s; }
.lp-chat-input {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-2);
  margin: var(--space-3); padding: var(--space-2) var(--space-2) var(--space-2) var(--space-3);
  border: 1px solid var(--border-strong); border-radius: var(--radius-xl);
  color: var(--text-subtle); font-size: var(--text-sm);
}
.lp-chat-send {
  display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px;
  border-radius: var(--radius-lg); background: var(--brand); color: var(--brand-fg);
}

/* The run: question 1 → dots → answer 1 types → question 2 → dots → answer 2 types. */
@keyframes lp-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes lp-type { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes lp-dots {
  0% { opacity: 0; max-height: 0; margin-top: 0; padding-block: 0; border-width: 0; }
  12%, 85% { opacity: 1; max-height: 3rem; margin-top: var(--space-3); padding-block: var(--space-3); border-width: 1px; }
  100% { opacity: 0; max-height: 0; margin-top: 0; padding-block: 0; border-width: 0; }
}
.lp-t1, .lp-t3, .lp-t4, .lp-t6 { animation: lp-in .35s ease-out both; }
.lp-t1 { animation-delay: .4s; }
.lp-t2 { animation: lp-dots 1.3s ease both; animation-delay: 1s; }
.lp-t3 { animation-delay: 2.3s; }
.lp-t3 .lp-type { animation: lp-type 1.8s steps(36, end) both; animation-delay: 2.3s; }
.lp-t3 .lp-chip-src { animation: lp-in .3s ease-out both; animation-delay: 4.1s; }
.lp-t4 { animation-delay: 5s; }
.lp-t5 { animation: lp-dots 1.2s ease both; animation-delay: 5.6s; }
.lp-t6 { animation-delay: 6.8s; }
.lp-t6 .lp-type { animation: lp-type 1.2s steps(24, end) both; animation-delay: 6.8s; }
.lp-t6 .lp-chip-src { animation: lp-in .3s ease-out both; animation-delay: 8s; }
@media (prefers-reduced-motion: reduce) {
  .lp-say, .lp-type, .lp-chip-src, .lp-say-dots i { animation: none !important; }
  .lp-say-dots { display: none; }
}

/* ---- sections ---- */
.lp-section { padding-block: clamp(2.5rem, 1.5rem + 4vw, 5rem); }
.lp-section-last { padding-top: clamp(1rem, 0.5rem + 2vw, 2rem); }
.lp-band { border-block: 1px solid var(--border); background: var(--bg-subtle); }
.lp-section-head { max-width: 720px; margin: 0 auto clamp(1.5rem, 1rem + 2vw, 2.75rem); text-align: center; }
.lp-section-head h2 {
  margin: 0; font-size: clamp(var(--text-2xl), 1.2rem + 1.6vw, var(--text-4xl));
  letter-spacing: -0.02em; text-wrap: balance;
}
.lp-section-head p { margin: var(--space-3) 0 0; color: var(--text-muted); }
.lp-section-head .lp-kicker {
  margin: 0; color: var(--brand-text); font-family: var(--font-heading);
  font-size: var(--text-sm); font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.lp-try { padding-top: clamp(1rem, 0.5rem + 2vw, 2rem); }
.lp-try .lp-section-head { margin-bottom: var(--space-5); }
.lp-try .gai-home-chat { padding-block: 0; }

.lp-grid { display: grid; gap: var(--space-5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); }
.lp-grid-5 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.lp-feature { padding: var(--space-6); min-width: 0; transition: transform var(--duration-fast) ease, box-shadow var(--duration-fast) ease; }
.lp-feature:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.lp-feature h3, .lp-who h3, .lp-steps h3 { margin: var(--space-4) 0 var(--space-2); font-size: var(--text-lg); }
.lp-feature p, .lp-who p, .lp-steps p { margin: 0; color: var(--text-muted); font-size: var(--text-sm); line-height: 1.6; }
.lp-icon {
  display: inline-grid; place-items: center; width: 44px; height: 44px;
  border-radius: var(--radius-lg); background: var(--brand-soft); color: var(--brand-text);
}
.lp-who { min-width: 0; }
.lp-who > .icon { width: 28px; height: 28px; color: var(--brand-text); }

.lp-steps {
  display: grid; gap: var(--space-5);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  margin: 0; padding: 0; list-style: none;
}
.lp-steps li { min-width: 0; padding: var(--space-6); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.lp-step-no {
  display: inline-grid; place-items: center; width: 36px; height: 36px;
  border-radius: var(--radius-full); background: var(--brand); color: var(--brand-fg);
  font-family: var(--font-heading); font-weight: 700;
}

.lp-faq-wrap { max-width: 860px; }
.lp-faq { display: grid; gap: var(--space-3); }
.lp-faq details { padding: var(--space-4) var(--space-5); }
.lp-faq summary { font-weight: 600; cursor: pointer; }
.lp-faq details p { margin: var(--space-3) 0 0; color: var(--text-muted); line-height: 1.6; }

.lp-cta {
  display: grid; gap: var(--space-6); align-items: center;
  padding: clamp(1.5rem, 1rem + 3vw, 3rem);
  border-radius: var(--radius-2xl);
  background: var(--brand-gradient); color: var(--brand-fg);
}
@media (min-width: 860px) {
  .lp-cta { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); }
}
.lp-cta-text { min-width: 0; }
.lp-cta h2 { margin: 0; color: inherit; font-size: clamp(var(--text-2xl), 1.2rem + 1.2vw, var(--text-3xl)); }
.lp-cta p { max-width: 56ch; margin: var(--space-2) 0 0; opacity: .92; }
.lp-cta .lp-actions { margin-top: var(--space-5); opacity: 1; }
.lp-cta .btn-primary { background: var(--surface); border-color: var(--surface); color: var(--brand-text); }
.lp-logins {
  min-width: 0; padding: var(--space-5);
  border: 1px solid color-mix(in srgb, currentColor 30%, transparent); border-radius: var(--radius-xl);
  background: color-mix(in srgb, #000 14%, transparent);
}
.lp-logins h3 { display: flex; align-items: center; gap: var(--space-2); margin: 0 0 var(--space-3); color: inherit; font-size: var(--text-base); }
.lp-logins dl { display: grid; gap: var(--space-2); margin: 0; }
.lp-logins dl > div { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 var(--space-3); }
.lp-logins dt { font-weight: 600; }
.lp-logins dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.lp-logins code { padding: 0; background: transparent; color: inherit; font-size: var(--text-sm); }

@media (prefers-reduced-motion: reduce) {
  .lp-feature, .lp-feature:hover { transform: none; transition: none; }
}
