/* ============================================================
   Canadian AI - Services LP - v3 (brand-strict)
   Anchor variant: AI receptionist
   ----------------------------------------------------------
   Strict adherence to brand.canadian-ai.ca/brand:
   - Named hex tokens (Ink, Graphite, Ash, Mist, Fog, Snow, etc.)
   - Type scale capped at Display XL 80px / Display 36px
   - UI labels at +0.12em tracking (not 0.3em)
   - 4px grid spacing only (no off-grid values)
   - 0px border-radius (no rounded corners)
   - Lucide icons only (no emoji or text glyphs as icons)
   - Sentence-case button labels (not uppercase)
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

:root {
  /* Light mode neutrals */
  --ink:      #141414;
  --graphite: #3a3a3a;
  --ash:      #717171;
  --mist:     #b0b0b0;
  --fog:      #e8e8e8;
  --snow:     #f7f7f7;
  --white:    #ffffff;

  /* Dark mode surfaces */
  --void:     #171717;
  --obsidian: #1f1f1f;
  --charcoal: #2e2e2e;
  --slate:    #3d3d3d;
  --zinc:     #a8a8a8;
  --pearl:    #f0f0f0;

  /* Semantic mappings (default light) */
  --bg:       var(--snow);
  --fg:       var(--ink);
  --fg-muted: var(--ash);
  --fg-faint: var(--fog);
  --fg-border: var(--mist);
  --card-bg:  var(--white);

  --max: 1280px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Playfair Display', 'Times New Roman', serif;
  --font-mono: 'SF Mono', 'Fira Code', ui-monospace, monospace;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; transition: opacity 200ms ease-out; }
a:hover { opacity: 0.65; }

/* Subtle grain texture, dark sections only */
.grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Frame: max-width + grid-aligned horizontal padding */
.frame {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}
@media (min-width: 768px) { .frame { padding: 0 48px; } }
@media (min-width: 1200px) { .frame { padding: 0 64px; } }

/* ============================================================
   HEADER (over the dark hero)
   ============================================================ */
.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 24px 0;
  color: var(--pearl);
}

.frame--header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: inherit;
}

.brand-icon {
  width: 22px;
  height: 22px;
  display: block;
  flex-shrink: 0;
}

.brand-word { display: inline-block; }

.site-nav { display: none; gap: 32px; font-size: 12px; letter-spacing: 0.04em; }
.site-nav a { color: var(--zinc); }
.site-nav a:hover { color: var(--pearl); opacity: 1; }
@media (min-width: 900px) { .site-nav { display: flex; } }

/* ============================================================
   HERO - dark, brand-capped type sizes
   ============================================================ */
.hero {
  position: relative;
  background: var(--void);
  color: var(--pearl);
  overflow: hidden;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 128px 0 96px;
  border-bottom: 1px solid var(--slate);
}

@media (min-width: 768px) { .hero { padding: 128px 0; } }

.hero .frame {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  width: 100%;
}

.eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--zinc);
  margin: 0 0 24px 0;
}

.hero-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(40px, 7vw, 80px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 32px 0;
  max-width: 16ch;
}

.hero-sub {
  font-size: clamp(16px, 1.2vw, 18px);
  line-height: 1.55;
  color: var(--zinc);
  margin: 0 0 48px 0;
  max-width: 56ch;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 48px;
}

.hero-meta {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--zinc);
  margin: 0;
}

.hero-meta .dot { margin: 0 12px; opacity: 0.4; }

/* ============================================================
   BUTTONS - sentence case, 4px grid padding
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 24px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 150ms ease-out, color 150ms ease-out, border-color 150ms ease-out, transform 200ms ease-out;
  font-family: inherit;
}

.btn:active { transform: scale(0.97); }

.btn--primary {
  background: var(--pearl);
  color: var(--void);
  border-color: var(--pearl);
}
.btn--primary:hover { background: transparent; color: var(--pearl); opacity: 1; }

.btn--ghost {
  background: transparent;
  color: currentColor;
  border-color: currentColor;
  opacity: 0.75;
}
.btn--ghost:hover { opacity: 1; }

.btn--small { padding: 12px 16px; font-size: 13px; }

/* Light-section button overrides */
.cta .btn--primary {
  background: var(--ink);
  color: var(--snow);
  border-color: var(--ink);
}
.cta .btn--primary:hover { background: transparent; color: var(--ink); }
.cta .btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--mist);
  opacity: 1;
}
.cta .btn--ghost:hover { background: var(--ink); color: var(--snow); }

/* ============================================================
   SECTIONS - common rhythm on grid (64/96/128)
   ============================================================ */
section { padding: 96px 0; }
@media (min-width: 768px) { section { padding: 128px 0; } }

.section-eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ash);
  margin: 0 0 24px 0;
}

.section-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(28px, 4vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 48px 0;
  max-width: 24ch;
}

.section-lead {
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  max-width: 60ch;
  margin: 0 0 48px 0;
}

/* ============================================================
   PROBLEM - stats use Display XL scale
   ============================================================ */
.problem { background: var(--bg); }

.problem-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-bottom: 64px;
  border-top: 1px solid var(--mist);
  padding-top: 48px;
}

@media (min-width: 700px) {
  .problem-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
  }
}

.problem-stat {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(48px, 6vw, 80px);
  line-height: 1.0;
  letter-spacing: -0.02em;
  margin: 0 0 16px 0;
  color: var(--ink);
}

.problem-label {
  font-size: 14px;
  color: var(--ash);
  line-height: 1.5;
  margin: 0;
  max-width: 28ch;
}

.problem-context {
  max-width: 64ch;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
}

/* ============================================================
   WHAT - bento on dark
   ============================================================ */
.what {
  background: var(--void);
  color: var(--pearl);
  position: relative;
  overflow: hidden;
}

.what .section-eyebrow { color: var(--zinc); }
.what .frame { position: relative; z-index: 2; }

.bento {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--slate);
  border: 1px solid var(--slate);
}

@media (min-width: 700px) {
  .bento {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: minmax(176px, auto);
  }
  .bento .feature--wide { grid-column: span 2; }
}

@media (min-width: 1024px) {
  .bento { grid-template-columns: repeat(3, 1fr); }
  .bento .feature--wide { grid-column: span 2; }
}

.feature {
  background: var(--obsidian);
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 224px;
}

.feature-num {
  font-family: var(--font-serif);
  font-size: 16px;
  color: var(--zinc);
  margin: 0 0 auto 0;
}

.feature-title {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 400;
  margin: 24px 0 12px 0;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.feature--wide .feature-title { font-size: 28px; max-width: 24ch; }

.feature p {
  font-size: 14px;
  color: var(--zinc);
  line-height: 1.6;
  margin: 0;
  max-width: 40ch;
}

/* ============================================================
   HOW - steps
   ============================================================ */
.how { background: var(--bg); color: var(--ink); }

.steps { list-style: none; padding: 0; margin: 0; }

.step {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 32px 0;
  border-top: 1px solid var(--mist);
}

.step:last-child { border-bottom: 1px solid var(--mist); }

@media (min-width: 768px) {
  .step {
    grid-template-columns: 96px 1fr 1fr;
    gap: 48px;
    padding: 48px 0;
    align-items: start;
  }
}

.step-num {
  font-family: var(--font-serif);
  font-size: clamp(48px, 5vw, 64px);
  font-weight: 400;
  color: var(--ink);
  margin: 0;
  line-height: 0.9;
  letter-spacing: -0.02em;
}

.step-title {
  font-family: var(--font-serif);
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 400;
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.01em;
  max-width: 18ch;
}

.step-body {
  font-size: 16px;
  color: var(--ash);
  line-height: 1.65;
  margin: 0;
  max-width: 48ch;
}

/* ============================================================
   USE CASES
   ============================================================ */
.usecases { background: var(--bg); padding-top: 0; }

.usecase-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--mist);
  border: 1px solid var(--mist);
}

@media (min-width: 700px) { .usecase-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .usecase-grid { grid-template-columns: repeat(3, 1fr); } }

.usecase {
  background: var(--white);
  padding: 32px;
  min-height: 176px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.usecase h3 {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 400;
  margin: 0 0 12px 0;
  line-height: 1.2;
}

.usecase p {
  font-size: 14px;
  color: var(--ash);
  line-height: 1.55;
  margin: 0;
  max-width: 36ch;
}

/* ============================================================
   PROOF - dark
   ============================================================ */
.proof {
  background: var(--void);
  color: var(--pearl);
  position: relative;
  overflow: hidden;
}

.proof .section-eyebrow { color: var(--zinc); }
.proof .frame { position: relative; z-index: 2; }

.proof-lead {
  font-family: var(--font-serif);
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1.3;
  font-weight: 400;
  max-width: 32ch;
  margin: 0 0 64px 0;
  letter-spacing: -0.01em;
}

.proof-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--slate);
  border: 1px solid var(--slate);
  margin-bottom: 48px;
}

@media (min-width: 700px) { .proof-grid { grid-template-columns: 1fr 1fr; } }

.case { background: var(--obsidian); padding: 32px; }

.case-tag {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--zinc);
  margin: 0 0 16px 0;
}

.case-title {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 400;
  margin: 0 0 16px 0;
  letter-spacing: -0.01em;
}

.case p {
  font-size: 14px;
  color: var(--zinc);
  line-height: 1.6;
  margin: 0;
  max-width: 44ch;
}

.proof-pillars {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--slate);
}

@media (min-width: 700px) { .proof-pillars { grid-template-columns: repeat(3, 1fr); } }

.pillar-stat {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 400;
  margin: 0 0 12px 0;
  letter-spacing: -0.01em;
}

.pillar p {
  font-size: 13px;
  color: var(--zinc);
  line-height: 1.55;
  margin: 0;
}

/* ============================================================
   FAQ
   ============================================================ */
.faq { background: var(--bg); }

.faq-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--mist);
}

@media (min-width: 900px) {
  .faq-list { grid-template-columns: repeat(2, 1fr); column-gap: 48px; }
}

.faq-item {
  border-bottom: 1px solid var(--mist);
  padding: 24px 0;
}

.faq-item summary {
  font-family: var(--font-serif);
  font-size: clamp(18px, 1.6vw, 22px);
  font-weight: 400;
  cursor: pointer;
  list-style: none;
  padding-right: 32px;
  position: relative;
  letter-spacing: -0.005em;
  line-height: 1.25;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item .faq-chevron {
  position: absolute;
  right: 0;
  top: 2px;
  width: 20px;
  height: 20px;
  color: var(--ash);
  transition: transform 200ms ease-out;
}

.faq-item[open] .faq-chevron { transform: rotate(180deg); }

.faq-item p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--ash);
  margin: 16px 0 0 0;
  max-width: 64ch;
  padding-right: 32px;
}

/* ============================================================
   CTA
   ============================================================ */
.cta {
  background: var(--bg);
  border-top: 1px solid var(--mist);
}

.cta .frame { max-width: 768px; }
.cta .section-title { margin-bottom: 24px; }

.cta-sub {
  font-size: 16px;
  line-height: 1.6;
  color: var(--ash);
  margin: 0 0 48px 0;
  max-width: 56ch;
}

.cta-meta {
  font-size: 12px;
  color: var(--ash);
  margin-top: 24px;
  letter-spacing: 0.04em;
}

/* ============================================================
   FORM
   ============================================================ */
.lead-form {
  border: 1px solid var(--mist);
  padding: 32px;
  background: var(--white);
}

@media (min-width: 700px) { .lead-form { padding: 48px; } }

.form-step { display: flex; flex-direction: column; gap: 24px; }

.step-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ash);
  margin: 0;
}

.field { display: flex; flex-direction: column; gap: 8px; }

.field-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}

.field input,
.field select,
.field textarea {
  font: inherit;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--mist);
  padding: 12px 0;
  color: var(--ink);
  font-size: 16px;
  outline: none;
  transition: border-color 150ms ease-out;
}

.field input:focus,
.field select:focus,
.field textarea:focus { border-bottom-color: var(--ink); }

.field textarea { resize: vertical; min-height: 80px; }

.form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.form-row .btn { flex: 1; min-width: 144px; }

.form-success {
  background: transparent;
  border: 1px solid var(--ink);
  padding: 32px;
  text-align: center;
  margin: 0;
}

.form-success__heading {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 400;
  margin: 0 0 12px 0;
  letter-spacing: -0.01em;
}

.form-success__body {
  font-size: 14px;
  color: var(--ash);
  line-height: 1.6;
  margin: 0;
}

/* ============================================================
   SLOT PICKER (step 4)
   ============================================================ */
.slot-picker { min-height: 240px; }

.slot-state {
  font-size: 14px;
  color: var(--ash);
  text-align: center;
  margin: 32px 0;
  line-height: 1.5;
}

/* Loop Pulse loading animation per brand motion tokens */
.slot-loading::after {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 12px;
  background: var(--ash);
  vertical-align: middle;
  animation: loopPulse 2s ease-in-out infinite;
}

@keyframes loopPulse {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.4); }
}

.slot-error a { text-decoration: underline; }

.slot-dates {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 24px;
  scrollbar-width: thin;
}

.slot-date {
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 12px 16px;
  border: 1px solid var(--mist);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
  transition: background 150ms ease-out, color 150ms ease-out, border-color 150ms ease-out;
}

.slot-date:hover { border-color: var(--ink); }
.slot-date.is-active {
  background: var(--ink);
  color: var(--snow);
  border-color: var(--ink);
}

.slot-times {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.slot-time {
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 12px 16px;
  border: 1px solid var(--mist);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background 150ms ease-out, color 150ms ease-out, border-color 150ms ease-out;
}

.slot-time:hover:not(:disabled) {
  background: var(--ink);
  color: var(--snow);
  border-color: var(--ink);
}

.slot-time:disabled { opacity: 0.4; cursor: not-allowed; }

.slot-tz {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ash);
  text-align: center;
  margin: 12px 0 0 0;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--mist);
  background: var(--bg);
  padding: 48px 0;
}

.frame--footer {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 768px) {
  .frame--footer {
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
  }
}

.footer-brand .brand-mark { margin-bottom: 8px; color: var(--ink); }

.footer-tagline {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ash);
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--ash);
}

.footer-links a { color: var(--ash); }
.footer-links a:hover { color: var(--ink); opacity: 1; }

.footer-copy {
  font-size: 12px;
  color: var(--ash);
  margin: 0;
  text-align: left;
}

@media (min-width: 768px) {
  .footer-copy { text-align: right; }
}
