/* Echolab AI — site styles on top of design tokens */
@import url("./colors_and_type.css");

html, body { margin: 0; padding: 0; }
body {
  background: var(--lf-canvas);
  color: var(--lf-ink);
  font-family: var(--font-body);
  overflow-x: hidden;
}

* { box-sizing: border-box; }

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: var(--section-pad, 120px) 0;
  position: relative;
}
.section-sm { padding: 80px 0; }

.eyebrow-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 8px;
  background: #fff;
  border: 1px solid var(--lf-hairline);
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--lf-ink);
  box-shadow: var(--shadow-chip);
}
.eyebrow-row .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-brand, var(--lf-mint)); }

.eyebrow-flat {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lf-ink-muted);
}

.display-hero {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(48px, 6.4vw, 96px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: balance;
  margin: 24px 0;
}

.display-section {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(36px, 4.4vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-wrap: balance;
  margin: 16px 0 0;
}

.lede {
  font-size: 19px;
  line-height: 1.5;
  color: var(--lf-ink-muted);
  max-width: 560px;
  text-wrap: pretty;
}

.btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  padding: 14px 22px;
  border-radius: var(--r-btn);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
  white-space: nowrap;
}
.btn-primary {
  background: var(--lf-ink);
  color: var(--lf-cream);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset, 0 8px 20px -10px rgba(0,0,0,0.4);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -10px rgba(0,0,0,0.5); }
.btn-secondary {
  background: #fff;
  color: var(--lf-ink);
  border: 1px solid var(--lf-border);
}
.btn-secondary:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); }
.btn-ghost {
  background: transparent;
  color: var(--lf-ink);
  padding: 14px 8px;
}
.btn-ghost:hover { opacity: 0.7; }

.hairline { height: 1px; background: var(--lf-hairline); }

.card {
  background: #fff;
  border-radius: var(--r-card);
  border: 1px solid var(--lf-hairline);
  padding: 28px;
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); }

/* Subtle grain on page background */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle at 1px 1px, rgba(26,26,26,0.025) 1px, transparent 0);
  background-size: 22px 22px;
  z-index: 0;
}
main, header, footer { position: relative; z-index: 1; }

/* Fade-in for industry content swap */
.fade-swap {
  animation: fadeUp 380ms var(--ease-out);
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Slow fade-in (caption swaps) */
.fade-in-slow {
  animation: fadeIn 600ms var(--ease-out);
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Bubble entrance */
@keyframes bubbleIn {
  from { opacity: 0; transform: translateY(6px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Typewriter cursor */
.cursor-blink {
  display: inline-block;
  margin-left: 1px;
  color: var(--lf-ink-muted);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* Activity ticker row swap */
.ticker-row {
  animation: tickerIn 480ms var(--ease-out);
}
@keyframes tickerIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Hero floaters — entrance + gentle bobbing.
   Two animations: entrance (fade up) then a slow infinite drift starting after. */
.hero-float {
  opacity: 0;
  animation:
    heroFloatIn 700ms var(--ease-out) forwards,
    chipFloat 7s var(--ease-out) 700ms infinite;
}
@keyframes heroFloatIn {
  from { opacity: 0; transform: translateY(14px) rotate(0deg) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) rotate(var(--rot, 0deg)) scale(1); }
}
/* Hero grid collapses on smaller screens */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr !important; }
}
@media (max-width: 1180px) {
  .hero-float { display: none !important; }
}

/* Chip float — split the transform so rotation is static (text stays crisp)
   and only translateY animates (translateY doesn't re-rasterize the layer). */
@keyframes chipBob {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50%      { transform: translate3d(0, -10px, 0); }
}
.chip-floater {
  /* Outer wrapper applies static rotation only — no animation on rotation */
  transform: rotate(var(--rot, 0deg));
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
}
.chip-floater > .chip-bob {
  animation: chipBob 6s var(--ease-out) infinite;
  will-change: transform;
}

/* Pulse for status dots */
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(164,223,149,0.5); }
  70% { box-shadow: 0 0 0 8px rgba(164,223,149,0); }
  100% { box-shadow: 0 0 0 0 rgba(164,223,149,0); }
}
.pulse-dot { animation: pulse 2s var(--ease-out) infinite; }

/* Marquee */
@keyframes scrollX {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee {
  display: flex;
  gap: 64px;
  animation: scrollX 32s linear infinite;
  width: max-content;
}

/* Industry tab active underline */
.tab-pill {
  position: relative;
  padding: 14px 22px;
  border-radius: 9999px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  color: var(--lf-ink-muted);
  transition: color var(--dur) var(--ease-out), background var(--dur) var(--ease-out);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
}
.tab-pill:hover { color: var(--lf-ink); }
.tab-pill.active {
  color: var(--lf-ink);
  background: #fff;
  border-color: var(--lf-hairline);
  box-shadow: var(--shadow-chip);
}

/* Stat number */
.stat-number {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(48px, 5vw, 72px);
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--lf-ink);
}

/* Accordion */
details.faq {
  border-bottom: 1px solid var(--lf-hairline);
  padding: 24px 0;
}
details.faq summary {
  list-style: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary .plus {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--lf-surface-alt);
  display: grid; place-items: center;
  font-size: 18px;
  transition: transform var(--dur) var(--ease-out), background var(--dur) var(--ease-out);
  flex: 0 0 auto;
}
details.faq[open] summary .plus { transform: rotate(45deg); background: var(--lf-ink); color: var(--lf-cream); }
details.faq .ans {
  margin-top: 12px;
  color: var(--lf-ink-muted);
  font-size: 16px;
  line-height: 1.55;
  max-width: 720px;
}

/* Sticky header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px) saturate(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  background: rgba(252,251,248,0.72);
  border-bottom: 1px solid var(--lf-hairline);
}

/* Industry-themed accent */
[data-industry="realestate"] { --accent: var(--lf-lilac); --accent-bg: var(--lf-lavender-bg); }
[data-industry="law"]        { --accent: var(--lf-onyx);   --accent-bg: #EFEDE7; }
[data-industry="nailspa"]    { --accent: var(--lf-marigold); --accent-bg: #FCEFD2; }

/* Phone/UI mockup styles used in hero */
.assistant-mock {
  background: #fff;
  border-radius: 24px;
  border: 1px solid var(--lf-hairline);
  box-shadow: var(--shadow-float);
  padding: 16px;
  width: 100%;
  max-width: 460px;
  font-size: 14px;
}
.msg {
  border-radius: 16px;
  padding: 12px 14px;
  margin: 8px 0;
  max-width: 80%;
  line-height: 1.4;
  font-size: 13.5px;
}
.msg.from-ai { background: var(--lf-surface-alt); color: var(--lf-ink); border-bottom-left-radius: 4px; }
.msg.from-user { background: var(--lf-ink); color: var(--lf-cream); margin-left: auto; border-bottom-right-radius: 4px; }

/* Workflow node */
.flow-node {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--lf-hairline);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-chip);
}

/* Responsive */
@media (max-width: 900px) {
  .section { padding: 80px 0; }
  .hide-mobile { display: none !important; }
  .how-grid { grid-template-columns: 1fr !important; gap: 16px !important; }
  .faq-grid { grid-template-columns: 1fr !important; }
  .footer-grid { grid-template-columns: 1fr 1fr !important; }
  .cases-grid { grid-template-columns: 1fr !important; }
}
@media (max-width: 640px) {
  .section { padding: 64px 0; }
}
