/*
 * Chill CRM marketing site.
 *
 * Colour, radii, shadow and typeface come from the product's own token layer
 * (design/tokens.ts) so the site and the app read as one system rather than two
 * products with similar logos. One deliberate departure: the app's type scale
 * tops out around 15px because it is a dense working surface, and that is far
 * too small for a page whose job is to be read across a room. The scale below
 * is the landing's own; every colour is the product's.
 */

:root {
  /* Surfaces */
  --canvas: #f7f8fa;
  --surface: #ffffff;
  --surface-subtle: #f2f4f7;
  --surface-muted: #eef0f3;

  /* Borders */
  --border: #e4e7ec;
  --border-subtle: #f0f1f4;
  --border-strong: #d0d5dd;

  /* Text */
  --text: #101828;
  --text-strong: #344054;
  --text-body: #475467;
  --text-muted: #667085;
  --text-faint: #98a2b3;

  /* Brand */
  --brand: #5b5bd6;
  --brand-hover: #4f4fc2;
  --brand-surface: #f0f0fe;
  --brand-surface-strong: #e0e0fb;
  --brand-text: #3d3aa8;

  /* Semantic */
  --success: #12b76a;
  --success-text: #067647;
  --success-surface: #ecfdf3;
  --violet: #7a5af8;
  --violet-surface: #f4f3ff;
  --info-text: #175cd3;
  --info-surface: #eff8ff;

  --radius-md: 8px;
  --radius-lg: 11px;
  --radius-xl: 13px;
  --radius-pill: 999px;

  --shadow-card: 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-raised: 0 2px 4px -1px rgba(16, 24, 40, 0.06), 0 4px 12px -2px rgba(16, 24, 40, 0.05);
  --shadow-overlay: 0 24px 48px -12px rgba(16, 24, 40, 0.28);

  --font-sans: 'Geist', -apple-system, BlinkMacSystemFont, system-ui, 'Segoe UI', sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, monospace;

  --content: 1120px;
  --header-h: 64px;
}

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

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

h1, h2, h3 { color: var(--text); margin: 0; line-height: 1.15; letter-spacing: -0.022em; }
h1 { font-size: clamp(38px, 5.2vw, 60px); font-weight: 700; letter-spacing: -0.032em; }
h2 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 650; letter-spacing: -0.028em; }
h3 { font-size: 18px; font-weight: 600; letter-spacing: -0.014em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }

.wrap { width: 100%; max-width: var(--content); margin: 0 auto; padding: 0 24px; }

/* ---------------------------------------------------------------- header */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}
.header__inner { display: flex; align-items: center; gap: 28px; height: var(--header-h); }

.logo { display: flex; align-items: center; gap: 10px; font-weight: 650; color: var(--text); font-size: 16px; letter-spacing: -0.02em; }
.logo__mark {
  width: 30px; height: 30px; border-radius: var(--radius-md);
  background: var(--brand); color: #fff;
  display: grid; place-items: center;
  font-weight: 700; font-size: 15px;
}

.nav { display: flex; gap: 26px; margin-left: 12px; }
.nav a { font-size: 14.5px; font-weight: 500; color: var(--text-body); transition: color .15s; }
.nav a:hover { color: var(--text); }

.header__right { margin-left: auto; display: flex; align-items: center; gap: 12px; }

/* language picker */
.lang { position: relative; }
.lang__button {
  display: flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 10px;
  font: inherit; font-size: 13.5px; font-weight: 550; color: var(--text-strong);
  background: transparent; border: 1px solid var(--border); border-radius: var(--radius-md);
  cursor: pointer; transition: background .15s, border-color .15s;
}
.lang__button:hover { background: var(--surface-subtle); border-color: var(--border-strong); }
.lang__menu {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 168px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-overlay); padding: 5px; display: none;
}
.lang__menu[data-open='true'] { display: block; }
.lang__item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  padding: 8px 10px; font: inherit; font-size: 14px; color: var(--text-strong); text-align: left;
  background: none; border: 0; border-radius: 6px; cursor: pointer;
}
.lang__item:hover { background: var(--surface-subtle); }
.lang__item[aria-current='true'] { color: var(--brand-text); background: var(--brand-surface); font-weight: 600; }
.lang__native { color: var(--text-faint); font-size: 12.5px; }
.lang__item[aria-current='true'] .lang__native { color: var(--brand); }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px;
  font-family: inherit; font-size: 14.5px; font-weight: 600; letter-spacing: -0.005em;
  border-radius: var(--radius-md); border: 1px solid transparent;
  cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, transform .1s;
}
.btn:active { transform: translateY(0.5px); }
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-hover); }
.btn--ghost { background: var(--surface); color: var(--text-strong); border-color: var(--border); }
.btn--ghost:hover { background: var(--surface-subtle); border-color: var(--border-strong); }
.btn--lg { height: 46px; padding: 0 22px; font-size: 15.5px; }

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

.hero { position: relative; padding: 88px 0 0; overflow: hidden; background: var(--surface); }
.hero::before {
  content: '';
  position: absolute; inset: -180px 0 auto; height: 620px;
  background:
    radial-gradient(720px 320px at 50% 0%, var(--brand-surface) 0%, rgba(240, 240, 254, 0) 70%),
    linear-gradient(180deg, #fbfbff 0%, var(--surface) 100%);
  z-index: 0;
}
.hero__inner { position: relative; z-index: 1; text-align: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 8px; margin-bottom: 22px;
  font-size: 13px; font-weight: 550; color: var(--brand-text);
  background: var(--brand-surface); border: 1px solid var(--brand-surface-strong);
  border-radius: var(--radius-pill);
}
.eyebrow__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }

.hero h1 { max-width: 15ch; margin: 0 auto; }
.hero__sub {
  max-width: 62ch; margin: 22px auto 0;
  font-size: clamp(17px, 1.6vw, 19px); color: var(--text-body);
}
.hero__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }
.hero__note { margin-top: 14px; font-size: 13.5px; color: var(--text-faint); }

/* browser frame around the product shot */
.shot { position: relative; z-index: 1; margin: 62px auto 0; max-width: 1120px; }
.shot__frame {
  border: 1px solid var(--border); border-radius: var(--radius-xl);
  background: var(--surface); box-shadow: var(--shadow-overlay);
  overflow: hidden;
}
.shot__bar {
  display: flex; align-items: center; gap: 7px;
  height: 36px; padding: 0 14px;
  background: var(--surface-subtle); border-bottom: 1px solid var(--border-subtle);
}
.shot__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); }
.shot__url {
  margin-left: 10px; padding: 2px 10px;
  font-family: var(--font-mono); font-size: 11.5px; color: var(--text-faint);
  background: var(--surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-pill);
}
.shot img { display: block; width: 100%; height: auto; }
.shot::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 120px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, var(--surface) 92%);
  pointer-events: none;
}

/* ---------------------------------------------------------------- sections */

.section { padding: 96px 0; }
.section--tint { background: var(--canvas); border-block: 1px solid var(--border-subtle); }
.section__head { max-width: 60ch; margin: 0 auto 52px; text-align: center; }
.section__head p { margin-top: 16px; font-size: 17px; color: var(--text-muted); }

.kicker {
  display: block; margin-bottom: 14px;
  font-size: 12.5px; font-weight: 650; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--brand);
}

/* replaces strip */
.replaces { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.replaces__item {
  padding: 18px 18px 20px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
.replaces__strike {
  display: block; font-size: 14px; color: var(--text-faint);
  text-decoration: line-through; text-decoration-color: var(--border-strong);
}
.replaces__now { display: block; margin-top: 8px; font-size: 15px; font-weight: 600; color: var(--text); }

/* feature grid */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  padding: 26px 24px 28px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  transition: box-shadow .18s, border-color .18s, transform .18s;
}
.card:hover { box-shadow: var(--shadow-raised); border-color: var(--border-strong); transform: translateY(-2px); }
.card__icon {
  width: 38px; height: 38px; margin-bottom: 18px;
  display: grid; place-items: center;
  color: var(--brand); background: var(--brand-surface); border-radius: var(--radius-md);
}
.card__icon svg { width: 19px; height: 19px; }
.card h3 { margin-bottom: 8px; }
.card p { font-size: 15px; color: var(--text-muted); }

/* split section */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split--flip .split__media { order: -1; }
.split__body h2 { margin-bottom: 18px; }
.split__body > p { font-size: 17px; color: var(--text-muted); }
.checks { margin: 26px 0 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; font-size: 15.5px; color: var(--text-strong); }
.checks svg { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--success); }
.checks b { color: var(--text); font-weight: 600; }
.split__media img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow-raised);
}

/* ---------------------------------------------------------------- pricing */

.plans { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; align-items: start; }
.plan {
  display: flex; flex-direction: column; height: 100%;
  padding: 24px 20px 26px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}
.plan--featured { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), var(--shadow-raised); }
.plan__tag {
  align-self: flex-start; margin-bottom: 12px; padding: 3px 9px;
  font-size: 11.5px; font-weight: 650; letter-spacing: .03em; text-transform: uppercase;
  color: var(--brand-text); background: var(--brand-surface); border-radius: var(--radius-pill);
}
.plan__name { font-size: 15px; font-weight: 650; color: var(--text); }
.plan__price { margin-top: 12px; font-size: 30px; font-weight: 700; color: var(--text); letter-spacing: -0.03em; }
.plan__price span { font-size: 14px; font-weight: 500; color: var(--text-faint); letter-spacing: 0; }
.plan__meta { margin-top: 8px; font-size: 13.5px; color: var(--text-muted); }
.plan__meta b { color: var(--text-strong); font-weight: 600; }
.plan ul { margin: 20px 0 24px; padding: 0; list-style: none; display: grid; gap: 10px; }
.plan li { display: flex; gap: 9px; align-items: flex-start; font-size: 13.5px; color: var(--text-body); }
.plan li svg { flex: none; width: 15px; height: 15px; margin-top: 2px; color: var(--success); }
.plan .btn { margin-top: auto; width: 100%; }
.pricing__note { margin-top: 26px; text-align: center; font-size: 13.5px; color: var(--text-faint); }

/* ---------------------------------------------------------------- cta + footer */

.cta { padding: 96px 0; background: var(--canvas); border-top: 1px solid var(--border-subtle); }
.cta__box {
  padding: 56px 40px; text-align: center;
  background: linear-gradient(180deg, #ffffff 0%, #fbfbff 100%);
  border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow-card);
}
.cta__box p { max-width: 54ch; margin: 16px auto 0; font-size: 17px; color: var(--text-muted); }
.cta__box .btn { margin-top: 28px; }

.footer { padding: 40px 0; background: var(--surface); border-top: 1px solid var(--border-subtle); }
.footer__inner { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer__links { margin-left: auto; display: flex; gap: 22px; }
.footer a, .footer p { font-size: 13.5px; color: var(--text-muted); }
.footer a:hover { color: var(--text); }

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

@media (max-width: 980px) {
  .replaces { grid-template-columns: repeat(2, 1fr); }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .plans { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 40px; }
  .split--flip .split__media { order: 0; }
  .nav { display: none; }
}

@media (max-width: 620px) {
  .section { padding: 68px 0; }
  .hero { padding-top: 64px; }
  .replaces, .grid, .plans { grid-template-columns: 1fr; }
  .hero__actions .btn { width: 100%; }
  .cta__box { padding: 40px 22px; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
  .footer__links { margin-left: 0; flex-wrap: wrap; gap: 14px; }
}
