/* Nexus CRM — marketing site.
   Tokens follow the app's brand: cream page, white cards, ink text, coral accent used sparingly.
   The one signature: the hero demo (chat → deal moves to "Quoted"), framed by a slanted band
   that repeats the 60° slant of the logo. */

:root {
  --cream: #fef5eb;
  --paper: #ffffff;
  --ink: #131313;
  --muted: #5c5853;
  --line: #e2cfb8;
  --coral: #c2412d;
  --coral-wash: #f6ddd3;
  --shadow: 0 1px 2px rgba(19, 19, 19, 0.06), 0 12px 32px -12px rgba(19, 19, 19, 0.18);

  --font-display: "Bricolage Grotesque", "Atkinson Hyperlegible", system-ui, sans-serif;
  --font-body: "Atkinson Hyperlegible", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --radius: 14px;
  --gutter: clamp(16px, 4vw, 40px);
  --space-section: clamp(64px, 10vw, 120px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; }
p { margin: 0; }

.wrap { width: min(1160px, 100%); margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--font-mono); font-weight: 500; letter-spacing: 0.01em; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 50; background: var(--ink); color: var(--cream); padding: 8px 14px; border-radius: 8px; }

:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; border-radius: 6px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border-radius: 999px; border: 1.5px solid transparent;
  font: 700 16px/1 var(--font-body);
  text-decoration: none; cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--ink { background: var(--ink); color: var(--cream); }
.btn--ink:hover { background: #2a2a2a; }
.btn--line { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--line:hover { background: var(--paper); }
.btn--cream { background: var(--cream); color: var(--ink); }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: 15px; }
.link-quiet { text-decoration: none; font-weight: 700; }
.link-quiet:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(254, 245, 235, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nav__inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.nav__logo img { width: 120px; }
.nav__links { display: flex; gap: 28px; list-style: none; margin: 0 0 0 16px; padding: 0; }
.nav__links a { text-decoration: none; font-weight: 700; font-size: 15px; color: var(--muted); }
.nav__links a:hover { color: var(--ink); }
.nav__actions { margin-left: auto; display: flex; align-items: center; gap: 18px; font-size: 15px; }

/* ---------- Hero ---------- */
.hero { padding: clamp(40px, 7vw, 88px) 0 var(--space-section); overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.eyebrow { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--coral); margin-bottom: 18px; }
h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(40px, 6.2vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.03em;
}
.lede { margin-top: 22px; font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); max-width: 34em; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero__note { margin-top: 22px; font-size: 14px; color: var(--muted); }
.hero__note .mono { color: var(--ink); }

/* ---------- Demo (the signature) ---------- */
.demo { position: relative; margin: 0; padding: 24px 0 8px; }
.demo__slant {
  position: absolute; inset: 0 -12% 6% 18%;
  background: var(--coral);
  /* The logo's slant: a parallelogram leaning right. */
  clip-path: polygon(22% 0, 100% 0, 78% 100%, 0 100%);
  border-radius: 6px;
}
.chat {
  position: relative; z-index: 1;
  width: min(380px, 100%); margin-left: auto; margin-right: 8%;
  background: #efe4d6;
  border-radius: 22px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.chat__head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--ink); color: var(--cream); }
.chat__head strong { display: block; font-size: 15px; }
.chat__head small { display: block; font-family: var(--font-mono); font-size: 12px; opacity: 0.7; }
.chat__avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--coral); display: grid; place-items: center; font: 700 13px var(--font-body); }
.chat__body { display: flex; flex-direction: column; gap: 10px; padding: 18px 14px 20px; min-height: 340px; }
.bubble { max-width: 86%; padding: 10px 13px; border-radius: 14px; font-size: 14.5px; line-height: 1.45; box-shadow: 0 1px 1px rgba(19, 19, 19, 0.08); }
.bubble--in { align-self: flex-start; background: var(--paper); border-top-left-radius: 4px; }
.bubble--out { align-self: flex-end; background: var(--ink); color: var(--cream); border-top-right-radius: 4px; }
.bubble__who { display: block; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: #ffb4a3; margin-bottom: 4px; }
.price { font-weight: 700; color: #ffb4a3; }
.typing { align-self: flex-end; display: flex; gap: 4px; padding: 12px 14px; background: var(--ink); border-radius: 14px; border-top-right-radius: 4px; }
.typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--cream); opacity: 0.5; animation: dot 900ms infinite ease-in-out; }
.typing span:nth-child(2) { animation-delay: 150ms; }
.typing span:nth-child(3) { animation-delay: 300ms; }

.board {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  width: min(420px, 100%); margin: -36px 0 0 0;
  padding: 12px; background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow);
}
.board__col { min-height: 96px; padding: 8px; border-radius: 10px; background: var(--cream); }
.board__title { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.deal {
  position: absolute; left: 12px; top: 46px;
  width: calc((100% - 24px - 16px) / 3);
  padding: 8px 9px; border-radius: 8px;
  background: var(--paper); border: 1px solid var(--line); border-left: 3px solid var(--coral);
  box-shadow: 0 2px 6px rgba(19, 19, 19, 0.08);
  font-size: 12.5px; line-height: 1.3;
}
.deal__name { display: block; font-weight: 700; }
.deal__amt { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.demo__caption { margin-top: 12px; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }

/* The sequence: question → agent typing → answer with price → card moves to Quoted → "confirm". */
.b1, .b3, .b4 { opacity: 0; transform: translateY(8px); animation: rise 420ms ease-out forwards; }
.b1 { animation-delay: 500ms; }
.b2 { opacity: 0; animation: typing 1300ms ease forwards 1200ms; }
.b3 { animation-delay: 2600ms; }
.b4 { animation-delay: 4600ms; }
.deal { animation: to-quoted 700ms cubic-bezier(.2, .8, .2, 1) forwards 3400ms; }

@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes typing { 0% { opacity: 0; height: auto; } 10%, 85% { opacity: 1; } 100% { opacity: 0; height: 0; padding: 0; margin: 0; } }
@keyframes dot { 0%, 100% { transform: translateY(0); opacity: 0.4; } 50% { transform: translateY(-3px); opacity: 1; } }
/* One column = card width + the 8px gap. */
@keyframes to-quoted { to { transform: translateX(calc(100% + 8px)); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .b1, .b3, .b4 { animation: none; opacity: 1; transform: none; }
  .b2 { display: none; }
  .deal { animation: none; transform: translateX(calc(100% + 8px)); }
  .btn { transition: none; }
  .btn:hover { transform: none; }
}

/* ---------- Local band ---------- */
.local { background: var(--ink); color: var(--cream); padding: clamp(40px, 6vw, 64px) 0; }
.local__title { font-family: var(--font-display); font-weight: 600; font-size: clamp(22px, 2.6vw, 30px); letter-spacing: -0.01em; }
.local__list { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.local__list li { font-size: 15px; line-height: 1.4; color: rgba(254, 245, 235, 0.78); border-top: 1px solid rgba(254, 245, 235, 0.2); padding-top: 14px; }
.local__list .mono { display: block; font-size: 20px; color: var(--cream); margin-bottom: 6px; }

/* ---------- Sections ---------- */
.section { padding: var(--space-section) 0; }
.section--paper { background: var(--paper); }
.section__title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(30px, 4vw, 48px); line-height: 1.08; letter-spacing: -0.02em;
}

.features { margin-top: 44px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px 28px; }
.feature h3 { font-family: var(--font-body); font-size: 19px; line-height: 1.3; }
.feature p { margin-top: 10px; color: var(--muted); font-size: 16px; }

.who { margin: 40px 0 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 48px; }
.who div { padding: 24px 0; border-top: 1px solid var(--line); }
.who dt { font-family: var(--font-display); font-weight: 600; font-size: 22px; }
.who dd { margin: 8px 0 0; color: var(--muted); }

.pricing { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.pricing__copy p { margin-top: 18px; color: var(--muted); font-size: 18px; max-width: 28em; }
.plan { background: var(--ink); color: var(--cream); border-radius: 20px; padding: clamp(28px, 4vw, 40px); }
.plan__label { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: #ffb4a3; }
.plan__price { margin-top: 8px; font-family: var(--font-display); font-weight: 800; font-size: clamp(44px, 6vw, 64px); line-height: 1; letter-spacing: -0.02em; }
.plan__price .mono { font-size: 0.42em; vertical-align: 0.9em; margin-right: 4px; }
.plan__per { font-family: var(--font-body); font-weight: 400; font-size: 18px; letter-spacing: 0; color: rgba(254, 245, 235, 0.7); }
.plan__list { list-style: none; margin: 26px 0 30px; padding: 0; display: grid; gap: 10px; }
.plan__list li { padding-left: 26px; position: relative; color: rgba(254, 245, 235, 0.88); }
.plan__list li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 12px; height: 7px; background: var(--coral); clip-path: polygon(30% 0, 100% 0, 70% 100%, 0 100%); }

.faq { display: grid; grid-template-columns: 1fr 2fr; gap: clamp(24px, 5vw, 72px); }
.faq__list details { border-top: 1px solid var(--line); }
.faq__list details:last-child { border-bottom: 1px solid var(--line); }
.faq__list summary { cursor: pointer; list-style: none; padding: 20px 36px 20px 0; position: relative; font-weight: 700; font-size: 18px; }
.faq__list summary::-webkit-details-marker { display: none; }
.faq__list summary::after { content: "+"; position: absolute; right: 4px; top: 16px; font: 400 24px var(--font-mono); color: var(--coral); }
.faq__list details[open] summary::after { content: "–"; }
.faq__list details p { padding: 0 0 22px; color: var(--muted); max-width: 40em; }

/* ---------- Contact ---------- */
.contact { padding: var(--space-section) 0; text-align: center; }
.contact__title { font-family: var(--font-display); font-weight: 800; font-size: clamp(34px, 5vw, 60px); letter-spacing: -0.03em; line-height: 1.05; }
.contact__sub { margin-top: 14px; color: var(--muted); }
.contact__numbers { margin-top: 32px; display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.number {
  display: inline-flex; align-items: baseline; gap: 10px;
  padding: 18px 26px; border-radius: 999px;
  background: var(--ink); color: var(--cream); text-decoration: none;
  font-family: var(--font-display); font-weight: 600; font-size: clamp(20px, 2.4vw, 26px);
  transition: transform 160ms ease;
}
.number .mono { font-size: 0.6em; color: #ffb4a3; }
.number:hover { transform: translateY(-2px); }
.contact__mail { margin-top: 22px; color: var(--muted); }
.contact__mail a { color: var(--ink); font-weight: 700; }

.footer { border-top: 1px solid var(--line); padding: 28px 0; }
.footer__inner { display: flex; align-items: center; gap: 24px; font-size: 14px; color: var(--muted); }
.footer__inner .link-quiet { margin-left: auto; color: var(--ink); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .nav__links { display: none; }
  .hero__grid, .pricing, .faq { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr 1fr; }
  .local__list { grid-template-columns: repeat(2, 1fr); }
  .chat { margin-right: auto; }
  .demo__slant { inset: 0 -20% 8% 10%; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .nav__actions .link-quiet { display: none; }
  .features, .who { grid-template-columns: 1fr; }
  .local__list { grid-template-columns: 1fr; gap: 12px; }
  .board { width: 100%; }
  .hero__ctas .btn { width: 100%; justify-content: center; }
  .footer__inner { flex-wrap: wrap; }
  .footer__inner .link-quiet { margin-left: 0; }
}
