/* kairosvc.io — site-wide styles */
:root {
  /* Pastel palette — lavender-led, oklch-aligned */
  --bg: #F7F4FB;
  --bg-tint: #FBF9FD;
  --paper: #FFFFFF;
  --ink: #1E1B2E;
  --ink-soft: #4A4560;
  --ink-mute: #7A7590;
  --line: #E6DFF2;
  --line-soft: #EFEAF7;

  --lavender: #DCD5F2;
  --lavender-deep: #B7A9E0;
  --blush: #F2D6E4;
  --blush-deep: #E0A9C5;
  --sky: #D6E8F2;
  --sky-deep: #9EC3DA;
  --sage: #DCEAD8;
  --butter: #F4ECC9;

  /* Kairos brand red — drawn from the kairos wordmark logo */
  --kairos-red: #E0241F;
  --kairos-red-deep: #B81C18;
  --kairos-rose: #FAD9D7;
  --kairos-rose-soft: #FCE9E7;

  --accent: #6B5BC9; /* deep lavender for buttons / links */
  --accent-hover: #574AB0;

  --serif: 'Source Serif 4', 'Source Serif Pro', Georgia, serif;
  --sans: 'Geist', 'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, monospace;

  --radius: 14px;
  --radius-lg: 22px;

  --max: 1240px;

  --shadow-sm: 0 1px 2px rgba(30,27,46,.04), 0 2px 8px rgba(30,27,46,.04);
  --shadow-md: 0 8px 28px rgba(30,27,46,.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }

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

::selection { background: var(--kairos-rose); color: var(--ink); }

/* Typography */
.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; }
.mono { font-family: var(--mono); font-feature-settings: 'ss01', 'cv11'; }
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

h1, h2, h3, h4 { margin: 0; font-weight: 400; letter-spacing: -0.02em; }
h1 { font-family: var(--serif); font-size: clamp(34px, 4.4vw, 64px); line-height: 1.08; }
h2 { font-family: var(--serif); font-size: clamp(28px, 3.4vw, 46px); line-height: 1.1; }
h3 { font-family: var(--serif); font-size: clamp(20px, 2.2vw, 28px); line-height: 1.18; }
h4 { font-family: var(--sans); font-size: 15px; font-weight: 500; letter-spacing: -0.005em; }

p { margin: 0; }
.lede { font-size: clamp(18px, 1.6vw, 22px); line-height: 1.5; color: var(--ink-soft); max-width: 60ch; }

/* Layout */
.container { max-width: var(--max); margin: 0 auto; padding: 0 32px; }
.section { padding: 48px 0; position: relative; }
.section-tight { padding: 32px 0; }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 32px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: -0.01em;
}
.brand-logo {
  height: 32px;
  width: auto;
  flex-shrink: 0;
  display: block;
}
.site-footer .brand-logo {
  height: 32px;
  /* Render the red wordmark as light cream on the dark footer */
  filter: brightness(0) saturate(100%) invert(96%) sepia(8%) saturate(322%) hue-rotate(214deg) brightness(102%);
}
.brand small {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.08em;
  margin-left: 2px;
  align-self: flex-end;
  padding-bottom: 6px;
}
.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 10px;
  padding: 0;
  cursor: pointer;
  position: relative;
}
.nav-toggle span {
  display: block;
  position: absolute;
  left: 10px;
  right: 10px;
  height: 1.5px;
  background: var(--ink);
  transition: transform .2s, opacity .2s, top .2s;
}
.nav-toggle span:nth-child(1) { top: 13px; }
.nav-toggle span:nth-child(2) { top: 19px; }
.nav-toggle span:nth-child(3) { top: 25px; }
.site-header.is-open .nav-toggle span:nth-child(1) { top: 19px; transform: rotate(45deg); }
.site-header.is-open .nav-toggle span:nth-child(2) { opacity: 0; }
.site-header.is-open .nav-toggle span:nth-child(3) { top: 19px; transform: rotate(-45deg); }
.nav { display: flex; gap: 32px; align-items: center; }
.nav a {
  font-size: 14px;
  color: var(--ink-soft);
  position: relative;
  padding: 6px 0;
  transition: color .2s;
}
.nav a:hover { color: var(--ink); }
.nav a.is-active { color: var(--ink); }
.nav a.is-active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1.5px; background: var(--kairos-red);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .25s ease, color .25s ease, border-color .25s ease, transform .25s ease, box-shadow .3s ease;
  white-space: nowrap;
  text-decoration: none;
}
.btn-primary {
  background: var(--ink);
  color: var(--bg-tint);
  border-color: var(--ink);
  box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 2px 6px rgba(30,27,46,.18);
}
.btn-primary:hover {
  background: var(--kairos-red);
  border-color: var(--kairos-red);
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255,255,255,.10) inset, 0 10px 26px -10px rgba(224,36,31,.55);
}
.btn-primary .btn-arrow { transition: transform .25s ease; }
.btn-primary:hover .btn-arrow { transform: translate(2px, -3px); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { background: var(--paper); border-color: var(--ink); }
.btn-arrow { font-family: var(--serif); font-size: 18px; line-height: 1; transform: translateY(-1px); }

/* Prominent hero CTA — distinct from .btn-primary, used on the home page */
.btn-journey {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px 14px 28px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--kairos-red-deep);
  border: 1.5px solid var(--kairos-red);
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: -0.005em;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  transition: color .25s ease, transform .25s ease, box-shadow .3s ease, border-color .25s ease;
  isolation: isolate;
  white-space: nowrap;
}
.btn-journey::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--kairos-red) 0%, var(--kairos-red-deep) 100%);
  transform: translateX(-101%);
  transition: transform .4s cubic-bezier(.6,.1,.3,1);
  z-index: -1;
}
.btn-journey:hover {
  color: #fff;
  border-color: var(--kairos-red-deep);
  transform: translateY(-1px);
  box-shadow: 0 16px 36px -12px rgba(224,36,31,.55);
}
.btn-journey:hover::before { transform: translateX(0); }
.btn-journey-label { font-style: italic; line-height: 1; }
.btn-journey-arrow {
  width: 36px; height: 36px;
  border-radius: 999px;
  background: var(--kairos-red);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
  transition: background .3s ease, color .3s ease, transform .3s ease;
}
.btn-journey:hover .btn-journey-arrow {
  background: #fff;
  color: var(--kairos-red-deep);
  transform: translateX(4px);
}
@media (max-width: 600px) {
  .btn-journey { font-size: 16px; padding: 12px 14px 12px 22px; gap: 12px; }
  .btn-journey-arrow { width: 32px; height: 32px; font-size: 16px; }
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: #C9C3DC;
  padding: 40px 0 24px;
  margin-top: 0;
}
.site-footer h4 {
  color: var(--bg-tint);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 18px;
  font-weight: 400;
}
.site-footer a { color: #C9C3DC; font-size: 14px; display: block; padding: 5px 0; transition: color .2s; }
.site-footer a:hover { color: #fff; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 28px;
  border-bottom: 1px solid #2E2A45;
}
.footer-tag {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.3;
  color: var(--bg-tint);
  letter-spacing: -0.01em;
  max-width: 28ch;
  margin-top: 18px;
}
.footer-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: #8B86A0;
  padding-top: 16px;
  text-transform: uppercase;
}

/* Hero */
.hero {
  padding: 40px 0 48px;
  position: relative;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 32px;
}
.hero-eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #4FB37A;
  box-shadow: 0 0 0 3px rgba(79,179,122,.18);
}
.hero h1 .accent {
  font-style: italic;
  background: linear-gradient(135deg, var(--lavender-deep), var(--blush-deep));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Cards */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.card:hover { border-color: var(--lavender-deep); }

.tag {
  display: inline-block;
  padding: 4px 10px;
  background: var(--lavender);
  color: var(--ink);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.tag.blush { background: var(--blush); }
.tag.sky { background: var(--sky); }
.tag.sage { background: var(--sage); }
.tag.butter { background: var(--butter); }
.tag.red { background: var(--kairos-rose); color: var(--kairos-red-deep); }

/* Axiom marginalia */
.axiom {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-mute);
  background: var(--paper);
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  display: inline-block;
}

/* Grids */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

@media (max-width: 960px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .section { padding: 32px 0; }
  .section-tight { padding: 24px 0; }

  /* Mobile nav drawer */
  .nav-toggle { display: block; }
  .site-header-inner { flex-wrap: wrap; }
  .site-header .btn-primary { display: none; }
  .nav {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    width: 100%;
    margin: 0 -32px;
    padding: 12px 32px 24px;
    border-top: 1px solid var(--line-soft);
    background: color-mix(in srgb, var(--bg) 92%, transparent);
  }
  .site-header.is-open .nav { display: flex; }
  .nav a {
    width: 100%;
    padding: 14px 0;
    font-size: 18px;
    border-bottom: 1px solid var(--line-soft);
  }
  .nav a:last-child { border-bottom: 0; }
  .nav a.is-active::after { display: none; }
  .nav a.is-active { color: var(--kairos-red); }
}

@media (max-width: 600px) {
  .container { padding: 0 20px; }
  .site-header-inner { padding: 0 20px; }
  .section { padding: 24px 0; }
  .section-tight { padding: 18px 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; padding-bottom: 36px; }
  .footer-meta { flex-direction: column; gap: 8px; align-items: flex-start; }
  .nav { margin: 0 -20px; padding: 12px 20px 20px; }
  .row, .row-spread { gap: 12px; }
  .row-spread { align-items: flex-start; }
}

/* Utility */
.muted { color: var(--ink-mute); }
.soft { color: var(--ink-soft); }
.center { text-align: center; }
.row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.row-spread { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; }
.stack-sm > * + * { margin-top: 12px; }
.stack-md > * + * { margin-top: 20px; }
.stack-lg > * + * { margin-top: 32px; }

/* Page intro */
.page-intro {
  padding: 48px 0 56px;
}
.page-intro h1 {
  font-size: clamp(32px, 4vw, 56px);
  max-width: 18ch;
}

/* Bg ornaments */
.ornament {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .55;
  z-index: 0;
}

/* Prevent horizontal overflow */
html, body { overflow-x: hidden; }
img, svg, video { max-width: 100%; height: auto; }
main { overflow-x: hidden; }

/* Mobile typography + paddings */
@media (max-width: 600px) {
  html, body { font-size: 15px; }
  .lede { font-size: 17px; line-height: 1.55; }
  .hero { padding: 24px 0 32px; }
  .page-intro { padding: 28px 0 32px; }
  .hero-eyebrow {
    font-size: 10px;
    padding: 6px 12px 6px 8px;
    margin-bottom: 20px;
  }
}
