/*
 * Lifelane marketing site — same visual system as the app (DESIGN.md):
 * quiet gray chrome, hairline rules, system font stack, accent only where
 * it encodes meaning. Token values are copied verbatim from
 * apps/web/src/style.css; keep them identical when either side changes.
 * The site has no theme pin, so dark mode is the media query alone.
 */

:root {
  color-scheme: light dark;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, Arial,
    sans-serif;

  --fs-title: 1.05rem;
  --fs-body: 0.8125rem;
  --fs-label: 0.75rem;
  --fs-micro: 0.6875rem;

  --bg: #ffffff;
  --text: #37352f;
  --text-secondary: #787774;
  --text-faint: #9b9a97;
  --hairline: rgba(55, 53, 47, 0.09);
  --hairline-strong: rgba(55, 53, 47, 0.16);
  --hover: rgba(55, 53, 47, 0.06);
  --accent: #2383e2;
  --today: #eb5757;
  --event-text-mix: #1d1c1a;
  --event-bg-mix: #ffffff;
  --shadow: 0 1px 2px rgba(15, 15, 15, 0.04), 0 4px 16px rgba(15, 15, 15, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #212121;
    --text: #d4d4d2;
    --text-secondary: #9b9b98;
    --text-faint: #7a7a77;
    --hairline: rgba(255, 255, 255, 0.08);
    --hairline-strong: rgba(255, 255, 255, 0.14);
    --hover: rgba(255, 255, 255, 0.055);
    /* Lighter than light-mode --accent: #2383e2 lands under 4.5:1 on the gray bg */
    --accent: #3f97e8;
    --event-text-mix: #f4f4f2;
    --event-bg-mix: #212121;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.4);
  }
}

* {
  box-sizing: border-box;
}

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

.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* --- Header / footer chrome (shared by all three pages) --- */

.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 20px 0;
  border-bottom: 1px solid var(--hairline);
}

.wordmark {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

.site-nav {
  display: flex;
  gap: 16px;
}

.site-nav a {
  color: var(--text-secondary);
  font-size: var(--fs-body);
}

.site-footer {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 20px 0 48px;
  margin-top: 56px;
  border-top: 1px solid var(--hairline);
  font-size: var(--fs-micro);
  color: var(--text-faint);
}

.site-footer a {
  color: var(--text-secondary);
}

.site-footer .copyright {
  margin-left: auto;
}

/* --- Landing page --- */

.hero {
  padding: 80px 0 24px;
  text-align: center;
}

/* Notion-Calendar hero ratio: headline ~4x body with tight tracking */
.hero h1 {
  font-size: 3rem;
  letter-spacing: -0.02em;
}

.hero h1,
.doc h1 {
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 16px;
}

.doc h1 {
  font-size: 2.4rem;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.lede {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin: 0 auto;
  max-width: 38em;
}

/* Gray card-on-white framing for the product mock (in place of full-bleed
   color bands): separation with zero art */
.mock-card {
  background: var(--hover);
  border-radius: 16px;
  padding: clamp(12px, 3vw, 28px);
  margin-top: 44px;
  text-align: left;
}

.mock-card .hero-visual {
  background: var(--bg);
}

/* Hero visual: a CSS-drawn slice of the week view. The color here is the
   product's own vocabulary (event tints, accent travel event, red today/now,
   day-phase tints), not ornament — same chip recipe as the app:
   color-mix of the calendar color into --event-bg-mix / --event-text-mix. */

.hero-visual {
  display: flex;
  border: 1px solid var(--hairline-strong);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
  user-select: none;
}

.hv-gutter {
  width: 46px;
  position: relative;
  flex: none;
}

.hv-gutter span {
  position: absolute;
  right: 8px;
  transform: translateY(-0.55em);
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-faint);
}

.hv-day {
  flex: 1;
  min-width: 0;
  border-left: 1px solid var(--hairline);
}

/* Day header mirrors the app's .day-label: weekday in secondary, date in
   text color, today's date as a red pill */
.hv-day-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 30px;
  font-size: 0.72rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--hairline);
}

.hv-date {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.hv-date.hv-today {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: var(--today);
  color: #fff;
  border-radius: 9px;
  font-weight: 600;
  font-size: 0.72rem;
}

.hv-mood {
  font-size: 0.625rem;
}

/* 9:00-18:00 at ~40px per hour, hour rules painted by the gradient (one
   hairline at the bottom of each ninth) */
.hv-body {
  position: relative;
  height: 360px;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent calc(11.111% - 1px),
    var(--hairline) calc(11.111% - 1px),
    var(--hairline) 11.111%
  );
}

.hv-gutter .hv-body {
  background-image: none;
}

/* Chip recipe copied from the app's .timed-event: solid Google-style fill
   (70% mix), ink text, 3px accent bar drawn by ::before */
.hv-event {
  position: absolute;
  left: 4px;
  right: 4px;
  padding: 2px 6px 2px 8px;
  border-radius: 5px;
  background: color-mix(in srgb, var(--hv-c) 70%, var(--event-bg-mix));
  color: var(--event-text-mix);
  font-size: 0.625rem;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hv-event::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 5px 0 0 5px;
  background: var(--hv-c);
}

/* The travel event Lifelane inserts — solid accent so it reads as the added
   object, distinct from the tinted meeting chip it delivers you to */
.hv-accent {
  --hv-c: var(--accent);
  /* Deepened so 10px white text clears 4.5:1 in both themes */
  background: color-mix(in srgb, var(--accent) 78%, #1d1c1a);
  color: #fff;
}

.hv-slim {
  padding-top: 0;
  padding-bottom: 0;
  line-height: 12px;
}

.hv-gutter .hv-h9 {
  top: -3px;
  transform: none;
}

.hv-blue {
  --hv-c: #2383e2;
}

.hv-green {
  --hv-c: #448361;
}

.hv-orange {
  --hv-c: #d9822b;
}

.hv-purple {
  --hv-c: #9065b0;
}

/* Google "Free" event — the app's .timed-event.free recipe: the slot really
   is free, so the card reads as background (plain surface, muted outline,
   softened bar) and busy blocks dominate at a glance */
.hv-free {
  background: var(--bg);
  color: color-mix(in srgb, var(--hv-c) 45%, var(--event-text-mix));
  border: 1px solid color-mix(in srgb, var(--hv-c) 45%, transparent);
}

.hv-free::before {
  background: color-mix(in srgb, var(--hv-c) 60%, var(--event-bg-mix));
}

/* Completed-task mark at its wall-clock time — the app's .log-chip recipe:
   filled accent wash, never a hollow pill (hollow = free/tentative) */
.hv-log {
  position: absolute;
  left: 4px;
  display: inline-flex;
  align-items: center;
  max-width: calc(100% - 8px);
  height: 18px;
  padding: 0 6px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--accent) 14%, var(--bg));
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  color: color-mix(in srgb, var(--accent) 70%, var(--text));
  font-size: 0.625rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
}

.hv-now {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 2px solid var(--today);
}

.hv-now::before {
  content: "";
  position: absolute;
  left: -4px;
  top: -5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--today);
}

/* Feature chapters: centered header + 3-up card grid (the app's
   .feature-list glyph-tile idea, arranged as cards) */
.chapter {
  padding: 56px 0 0;
  text-align: center;
}

.chapter h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 20px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  text-align: left;
}

.feature-card {
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 16px;
}

/* Chapter vignettes: small product mocks in the hero's visual language */
.chapter-mock {
  margin: 0 0 12px;
  padding: 24px;
}

/* Add-travel-time flow: the located event with its control, then the
   registered result — travel chip stacked on the meeting it serves */
.tt-mock {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  text-align: left;
}

.tt-event {
  padding: 14px 16px;
}

.tt-title {
  font-weight: 600;
  margin: 0;
}

.tt-meta {
  font-size: var(--fs-label);
  color: var(--text-secondary);
  margin: 2px 0 10px;
}

/* The app's .popover-travel button, verbatim */
.tt-add {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--text-secondary);
  padding: 3px 8px;
  border: 1px solid var(--hairline-strong);
  border-radius: 6px;
}

.tt-arrow {
  color: var(--text-faint);
  font-size: 1.25rem;
}

.tt-result {
  width: 200px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tt-result .hv-event {
  position: relative;
  left: auto;
  right: auto;
}

/* Second line inside a chip (location or time), like the app's taller cards */
.hv-sub {
  font-size: 0.625rem;
  font-weight: 400;
  opacity: 0.85;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Shared mock surface: the small white cards inside the gray frames */
.qa-mock,
.wr-mock,
.tt-event,
.tt-result {
  background: var(--bg);
  border: 1px solid var(--hairline-strong);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.qa-mock,
.wr-mock {
  max-width: 520px;
  margin: 0 auto;
  text-align: left;
}

/* Quick add: the app's .quickadd-input metrics (1rem, 15px 18px) */
.qa-input {
  display: flex;
  align-items: center;
  font-size: 1rem;
  padding: 15px 18px;
}

.qa-caret {
  width: 1.5px;
  height: 1.1em;
  margin-left: 2px;
  background: var(--text);
  animation: qa-blink 1.1s steps(1) infinite;
}

@keyframes qa-blink {
  50% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .qa-caret {
    animation: none;
  }
}

.qa-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-top: 1px solid var(--hairline);
  font-size: var(--fs-body);
}

/* The parsed-event chip reuses the calendar chip recipe (.hv-event hv-blue) */
.qa-preview .hv-event {
  position: relative;
  left: auto;
  right: auto;
  font-size: var(--fs-body);
}

.qa-when {
  color: var(--text-secondary);
}

/* Weekly review: caps section label + mood faces + narrative box, per the
   app's review modal */
.wr-mock {
  padding: 14px 16px;
}

.wr-label {
  margin: 0;
  font-size: var(--fs-label);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
}

.wr-faces {
  display: flex;
  gap: 10px;
  font-size: 1rem;
  margin: 8px 0 10px;
}

.wr-narrative {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  font-size: var(--fs-body);
  line-height: 1.5;
}

.wr-stats {
  margin: 10px 0 0;
  font-size: var(--fs-label);
  color: var(--text-secondary);
}

.card-glyph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--hover);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
}

.card-name {
  font-weight: 600;
  margin: 0 0 4px;
}

.card-desc {
  color: var(--text-secondary);
  font-size: var(--fs-body);
  margin: 0;
}

.google-data {
  max-width: 640px;
  margin: 56px auto 0;
  padding: 24px 0;
  border-top: 1px solid var(--hairline);
}

.google-data h2 {
  font-size: var(--fs-title);
  font-weight: 600;
  margin: 0 0 8px;
}

.google-data p {
  color: var(--text-secondary);
  margin: 0;
}

.cta {
  padding: 40px 0 8px;
  text-align: center;
}

/* Placeholder CTA: the Mac app isn't downloadable yet, so the button is a
   non-interactive gray chip (DESIGN.md: never preview an action that can't
   land; accent is reserved for actions that work). Swap to a real
   .primary-button-style link at launch. */
.cta-button {
  display: inline-block;
  background: var(--hover);
  color: var(--text-faint);
  padding: 8px 18px;
  border-radius: 6px;
  font-weight: 500;
}

.cta-hint {
  font-size: var(--fs-label);
  color: var(--text-secondary);
  margin: 10px 0 0;
}

/* --- Legal pages (Terms, Privacy) --- */

.doc {
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 0 8px;
}

.doc-updated {
  font-size: var(--fs-label);
  color: var(--text-faint);
  margin: 0 0 32px;
}

.doc h2 {
  font-size: var(--fs-title);
  font-weight: 600;
  margin: 32px 0 8px;
}

.doc p {
  color: var(--text-secondary);
  margin: 0 0 12px;
}

.doc ul {
  padding-left: 20px;
  margin: 0 0 12px;
}

.doc li {
  color: var(--text-secondary);
  margin: 0 0 6px;
}

@media (max-width: 720px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
}

/* Phones: the 7-day hero mock keeps only Thu-Sat so chips stay readable */
@media (max-width: 640px) {
  .hv-wide {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 48px 0 16px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .doc h1 {
    font-size: 1.75rem;
  }

  .chapter {
    padding: 40px 0 0;
  }
}
