/*
 * Lucidi Labs marketing site. Plain CSS, no build step.
 *
 * Colors are the approved brand palette (see packages/design-tokens/src/index.ts header):
 * Midnight Navy #0B192C, Deep Slate Teal #1E3E52, Radiant Amber Gold #F5B041,
 * Canvas Off-White #F8F9FA. Fonts match the app: Newsreader (display), Public Sans (body),
 * Baloo 2 (the "lucidi" wordmark only). The site is dark-only by design.
 */

:root {
  --navy: #0b192c;
  --navy-2: #0f2136;
  --slate: #1e3e52;
  --slate-2: #16304a;
  --line: rgba(248, 249, 250, 0.1);
  --line-strong: rgba(248, 249, 250, 0.18);
  --amber: #f5b041;
  --amber-hover: #f7c066;
  --amber-soft: rgba(245, 176, 65, 0.14);
  --ink: #1a202c;
  --text: #f8f9fa;
  --muted: #b3bfcc;
  --faint: #7f8fa1;
  --display: 'Newsreader', Georgia, serif;
  --body: 'Public Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --wordmark: 'Baloo 2', 'Newsreader', Georgia, serif;
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 28px;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--navy);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.6rem, 6vw + 1rem, 4.5rem);
}

h2 {
  font-size: clamp(1.9rem, 3vw + 1rem, 2.9rem);
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.3rem;
}

p {
  margin: 0;
}

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- layout ---------- */

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.narrow {
  max-width: 760px;
}

.center {
  text-align: center;
  justify-content: center;
}

.section {
  padding: clamp(72px, 10vw, 120px) 0;
}

.section-alt {
  background: var(--navy-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head {
  max-width: 720px;
  margin-bottom: 48px;
}

.eyebrow {
  color: var(--amber);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.lede {
  color: var(--muted);
  font-size: clamp(1.05rem, 0.4vw + 1rem, 1.2rem);
  max-width: 62ch;
}

.center .lede {
  margin: 0 auto;
}

.fine {
  color: var(--faint);
  font-size: 0.88rem;
  margin-top: 18px;
}

.nowrap {
  white-space: nowrap;
}

.accent {
  color: var(--amber);
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--amber);
  color: var(--ink);
}

.btn-primary:hover {
  background: var(--amber-hover);
}

.btn-ghost {
  border: 1px solid var(--line-strong);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--amber);
}

.label-short {
  display: none;
}

.btn-small {
  min-height: 40px;
  padding: 0 18px;
  font-size: 0.92rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(11, 25, 44, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand img {
  border-radius: 8px;
}

.brand-name {
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 600;
}

.nav-links {
  display: flex;
  gap: 28px;
  margin-left: auto;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: var(--text);
}

/* ---------- hero ---------- */

.hero {
  padding: clamp(56px, 9vw, 110px) 0 clamp(72px, 10vw, 120px);
  background:
    radial-gradient(60% 50% at 80% 30%, rgba(30, 62, 82, 0.9), transparent 70%),
    radial-gradient(40% 40% at 10% 90%, rgba(245, 176, 65, 0.06), transparent 70%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
}

.hero .lede {
  margin-top: 22px;
}

.phone {
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  padding: 22px 18px 24px;
  background: linear-gradient(180deg, #102a40, var(--navy-2));
  border: 1px solid var(--line-strong);
  border-radius: 36px;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.phone-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}

.phone-bar img {
  border-radius: 5px;
}

.wordmark {
  font-family: var(--wordmark);
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1;
}

.phone-hello {
  font-family: var(--display);
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.ask {
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(248, 249, 250, 0.06);
  border: 1px solid var(--line-strong);
  color: var(--faint);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 18px;
}

.tile {
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: var(--slate-2);
  border: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.3;
}

.tile-n {
  display: block;
  font-family: var(--display);
  font-size: 1.35rem;
  color: var(--text);
}

.phone-label {
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.mini-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: rgba(248, 249, 250, 0.05);
  border: 1px solid var(--line);
  font-size: 0.84rem;
  margin-bottom: 8px;
}

.dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
}

.dot-amber {
  background: var(--amber);
}

/* ---------- problem ---------- */

.scatter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 40px;
}

.chip {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px dashed var(--line-strong);
  color: var(--faint);
  font-size: 0.9rem;
}

.chip:nth-child(odd) {
  transform: rotate(-2deg);
}

.chip:nth-child(3n) {
  transform: rotate(2.5deg);
}

/* ---------- how it works ---------- */

.flow {
  display: grid;
  grid-template-columns: 1fr auto 1.3fr;
  gap: 28px;
  align-items: center;
  margin-bottom: 64px;
}

.doc {
  max-width: 300px;
  justify-self: end;
  width: 100%;
  padding: 18px;
  background: #f3f1ea;
  color: var(--ink);
  border-radius: var(--r-sm);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  transform: rotate(-2deg);
}

.doc-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.doc-type {
  flex: none;
  padding: 3px 7px;
  border-radius: 6px;
  background: #c0392b;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.doc-lines span {
  display: block;
  height: 8px;
  margin-bottom: 10px;
  border-radius: 4px;
  background: rgba(26, 32, 44, 0.14);
}

.doc-lines .short {
  width: 60%;
}

.flow-arrow {
  color: var(--amber);
}

.asset {
  padding: 24px;
  border-radius: var(--r-md);
  background: var(--slate-2);
  border: 1px solid var(--line-strong);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.asset h3 {
  font-size: 1.6rem;
  margin: 2px 0 16px;
}

.asset-kicker {
  color: var(--amber);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.facts {
  display: grid;
  gap: 8px;
  margin: 0 0 20px;
}

.facts div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}

.facts dt {
  color: var(--muted);
}

.facts dd {
  margin: 0;
  text-align: right;
}

.timeline {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  font-size: 0.92rem;
}

.timeline li {
  display: flex;
  gap: 14px;
  padding: 6px 0;
}

.timeline span {
  flex: none;
  width: 72px;
  color: var(--faint);
}

.steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 0;
  padding: 0;
}

.steps li {
  counter-increment: step;
  padding: 24px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
}

.steps li::before {
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--amber-soft);
  color: var(--amber);
  font-weight: 600;
}

.steps h3 {
  margin-bottom: 8px;
}

.steps p {
  color: var(--muted);
  font-size: 0.97rem;
}

/* ---------- what we noticed ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.notice {
  padding: 26px;
  border-radius: var(--r-md);
  background: var(--slate-2);
  border: 1px solid var(--line-strong);
}

.notice-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: var(--amber-soft);
  color: var(--amber);
}

.notice-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notice h3 {
  margin-bottom: 8px;
}

.notice p {
  color: var(--muted);
  font-size: 0.97rem;
}

/* ---------- trust ---------- */

.trust-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.checks {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
}

.checks li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 12px;
}

.checks li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 7px;
  width: 12px;
  height: 7px;
  border-left: 2px solid var(--amber);
  border-bottom: 2px solid var(--amber);
  transform: rotate(-45deg);
}

.evidence {
  padding: 26px;
  border-radius: var(--r-md);
  background: var(--slate-2);
  border: 1px solid var(--line-strong);
}

/* Cards that double as a way into the demo (the heat pump card, the What we noticed cards and the
   trust panel): the whole card is one link, with a "See it in the demo" line so it reads as
   clickable on touch. */
.card-link {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.card-link:hover {
  border-color: var(--amber);
  transform: translateY(-2px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.card-cta {
  display: inline-block;
  margin-top: 18px;
  color: var(--amber);
  font-weight: 600;
  font-size: 0.95rem;
}

.card-link:hover .card-cta {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* The hero phone keeps its own deeper shadow on hover rather than the shared card one. It gets no
   card-cta line: inside the mockup it would read as part of the fake app, and the hero's two
   buttons sit right beside it. */
.phone.card-link:hover {
  box-shadow:
    0 34px 90px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* In the three-up grid the cards stretch to one height; pin each CTA to the bottom so they line up. */
.notice.card-link {
  display: flex;
  flex-direction: column;
}

.notice .card-cta {
  align-self: flex-start;
  margin-top: auto;
  padding-top: 18px;
}

.evidence-q {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 14px;
}

.evidence-claim {
  padding: 14px 16px;
  border-radius: var(--r-sm);
  background: rgba(248, 249, 250, 0.05);
  margin-bottom: 14px;
}

.evidence-claim strong {
  color: var(--amber);
  font-weight: 600;
}

.evidence-src {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: var(--r-sm);
  border: 1px dashed var(--line-strong);
}

.src-name {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.src-quote {
  color: var(--muted);
  font-size: 0.9rem;
  font-style: italic;
}

/* ---------- founder ---------- */

.founder {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.2rem, 0.6vw + 1rem, 1.4rem);
  line-height: 1.55;
}

.founder p + p {
  margin-top: 1em;
}

.founder strong {
  color: var(--amber);
  font-weight: 600;
}

.founder footer {
  margin-top: 20px;
  font-family: var(--body);
  font-size: 1rem;
  color: var(--muted);
}

/* ---------- final + footer ---------- */

.final {
  background: radial-gradient(50% 70% at 50% 100%, rgba(30, 62, 82, 0.9), transparent 70%);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px 32px;
}

.footer-links {
  display: flex;
  gap: 20px;
  margin-left: auto;
}

.footer-links a,
.copyright {
  color: var(--faint);
  font-size: 0.9rem;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--text);
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .nav-links {
    display: none;
  }

  .nav-inner .btn {
    margin-left: auto;
  }

  .hero-grid,
  .trust-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .flow {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .doc {
    justify-self: center;
  }

  .flow-arrow {
    transform: rotate(90deg);
  }

  .asset {
    width: 100%;
    max-width: 480px;
  }

  .steps,
  .cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 16px;
  }

  .cta-row .btn {
    width: 100%;
  }

  /* The nav is sticky, so this keeps a demo button on screen the whole way down. The short
     label is what fits beside "Lucidi Labs" at 320px. */
  .nav-inner {
    gap: 12px;
  }

  .nav-inner .btn {
    padding: 0 14px;
  }

  .label-long {
    display: none;
  }

  .label-short {
    display: inline;
  }

  .footer-links {
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .card-link:hover {
    transform: none;
  }
}
