/* =============================================================
   Clair — screen.css
   Marketing site styles for https://ghost.clair.tech/
   Derived from clair-website-mockup.html (lines 9-147).
   ============================================================= */

/* ---------- Design tokens ---------- */
:root {
  /* Colors */
  --blue: #4E5A74;
  --blue-dark: #414c63;
  --blue-fg-2: #cfd6e4;
  --blue-fg-3: #9aa6bd;
  --on-blue: #ffffff;
  --on-blue-border: rgba(255, 255, 255, 0.12);
  --on-blue-divider: rgba(255, 255, 255, 0.16);
  --yellow: #F1D48B;
  --yellow-dark: #eecb76;
  --white: #FFFFFF;
  --offwhite: #F7F9FB;
  --bluegray: #E4E9F1;
  --ink: #333333;
  --gray: #666666;
  --lightgray: #B0B8C1;
  --border: #D1DCE5;
  --borderfocus: #A1B3C6;
  --lightblue: #C2D9F1;
  --green: #C9F0C4;
  --green-dark: #2c5c27;
  --sky: #66B0FF;
  --amber: #F5A623;
  --flag-bg: #FFF6E3;

  /* Typography */
  --display: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --body: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Layout */
  --container: 1100px;
  --narrow: 760px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-xl: 12px;
  --section-y: 72px;
  --section-y-mobile: 52px;
}

/* ---------- Reset ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; }

/* ---------- NAV ---------- */
.cl-nav {
  background: var(--blue);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}
.cl-nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
}
.cl-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--on-blue);
  text-decoration: none;
}
.cl-logo:hover { text-decoration: none; }
.cl-logo svg { height: 26px; width: auto; }
.cl-logo-word {
  font-family: var(--body);
  font-weight: 700;
  font-size: 24px;
  color: var(--on-blue);
  letter-spacing: -0.5px;
}
.cl-nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.cl-nav-links a {
  color: var(--on-blue);
  font-family: var(--body);
  font-size: 15px;
  font-weight: 500;
  opacity: 0.85;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  text-decoration: none;
}
.cl-nav-links a:hover { opacity: 1; text-decoration: none; }
.cl-nav-links a.is-active {
  opacity: 1;
  border-bottom-color: var(--yellow);
}
.cl-cta-demo {
  background: var(--yellow) !important;
  color: var(--ink) !important;
  padding: 10px 20px !important;
  border-radius: var(--radius-sm) !important;
  font-weight: 600 !important;
  opacity: 1 !important;
  border-bottom: none !important;
  text-decoration: none !important;
}
.cl-cta-demo:hover { background: var(--yellow-dark) !important; }

/* ---------- Layout primitives ---------- */
.cl-wrap { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.cl-narrow { max-width: var(--narrow); margin: 0 auto; padding: 0 24px; }
.cl-section { padding: var(--section-y) 0; }
.cl-section--alt { background: var(--offwhite); }

/* ---------- Loop divider (isomorphism) ----------
   A thin, decorative divider that echoes the brand mark's two-arc loop
   shape. Use as <div class="cl-loop-divider"></div> between a dark
   section and a light section (or vice versa). The fill color of the
   SVG arc matches the section that follows it. */
.cl-loop-divider {
  display: block;
  width: 100%;
  height: 56px;
  position: relative;
  pointer-events: none;
}
.cl-loop-divider svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.cl-loop-divider--down svg path { fill: var(--offwhite); }
.cl-loop-divider--up svg path { fill: var(--blue); }
/* Slight breathing room above/below so the curve reads as a transition */
.cl-loop-divider--down { margin-bottom: -1px; }
.cl-loop-divider--up { margin-top: -1px; }

@media (max-width: 820px) {
  .cl-loop-divider { height: 32px; }
}

/* ---------- Typography ---------- */
.cl-eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 14px;
}
h1.cl-h1, .cl-h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 52px;
  line-height: 1.12;
  letter-spacing: -0.01em;
}
h2.cl-h2, .cl-h2, .cl-section h2, .cl-card h3, .cl-jobrow h3, .cl-hero-content h1, .cl-cta-content h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 34px;
  line-height: 1.2;
  margin-bottom: 16px;
}
.cl-hero-content h1 {
  font-size: 52px;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--on-blue);
  max-width: 640px;
}
.cl-card h3, .cl-jobrow h3 {
  font-size: 21px;
  line-height: 1.25;
  margin-bottom: 6px;
}
/* Editorial content inside dynamic {{content}} blocks — paragraphs inherit body style */
.cl-section > .cl-wrap > p,
.cl-section > .cl-narrow > p,
.cl-card p,
.cl-jobrow p,
.cl-hero-content p,
.cl-cta-content p {
  color: var(--gray);
  line-height: 1.6;
}
.cl-card p,
.cl-jobrow p { font-size: 15px; }
.cl-hero-content p {
  color: var(--blue-fg-2);
  max-width: 560px;
  margin: 22px 0 34px;
  font-size: 20px;
  line-height: 1.55;
}
.cl-section > .cl-narrow > p { font-size: 17px; margin-bottom: 14px; }
.cl-section > .cl-narrow > p:last-child { margin-bottom: 0; }
h3.cl-h3, .cl-h3 {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 8px;
}
.cl-lede {
  font-size: 20px;
  color: var(--gray);
  line-height: 1.55;
}
.cl-btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  font-family: var(--body);
  text-align: center;
}
.cl-btn-primary { background: var(--blue); color: var(--on-blue); }
.cl-btn-primary:hover { background: var(--blue-dark); text-decoration: none; }
.cl-btn-yellow { background: var(--yellow); color: var(--ink); }
.cl-btn-yellow:hover { background: var(--yellow-dark); text-decoration: none; }
.cl-btn-ghost { background: none; color: var(--blue); padding: 14px 10px; }
.cl-btn-ghost:hover { text-decoration: underline; }

/* ---------- Grid ---------- */
.cl-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.cl-grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; }

/* ---------- Card ---------- */
.cl-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}

/* ---------- Tag chips ---------- */
.cl-tag {
  display: inline-block;
  background: var(--bluegray);
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  text-decoration: none;
}
.cl-tag--yellow { background: var(--yellow); color: var(--ink); }
.cl-tag--green { background: var(--green); color: var(--green-dark); }
.cl-rolling {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--lightblue);
  color: var(--blue);
  padding: 3px 8px;
  border-radius: 4px;
  vertical-align: middle;
  margin-left: 8px;
}

/* ---------- HERO ---------- */
.cl-hero {
  background:
    radial-gradient(ellipse 70% 60% at 85% 50%, rgba(241, 212, 139, 0.18) 0%, rgba(241, 212, 139, 0) 70%),
    linear-gradient(135deg, var(--blue) 0%, #3a4359 60%, var(--blue-dark) 100%);
  color: var(--on-blue);
  padding: 96px 0 110px;
  position: relative;
  overflow: hidden;
}
.cl-hero h1 { color: var(--on-blue); max-width: 640px; }
.cl-hero .cl-lede { color: var(--blue-fg-2); max-width: 560px; margin: 22px 0 34px; }
.cl-hero-loop {
  position: absolute;
  right: -60px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.14;
  pointer-events: none;
  width: 360px;
  height: 180px;
}
.cl-hero-cta { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.cl-hero .cl-btn-ghost { color: var(--on-blue); }

/* ---------- Jobrow ---------- */
.cl-jobrow {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
  padding: 34px 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.cl-jobrow:last-child { border-bottom: none; }
.cl-jobrow h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.25;
}
.cl-jobrow p { color: var(--gray); }

/* ---------- FAQ ---------- */
.cl-faq { border-top: 1px solid var(--border); }
.cl-faq-item {
  padding: 26px 0;
  border-bottom: 1px solid var(--border);
}
.cl-faq-item h3 { font-family: var(--display); font-size: 21px; font-weight: 600; }
.cl-faq-item p { color: var(--gray); margin-top: 6px; max-width: 640px; }

/* ---------- Commit box (data commitments) ---------- */
.cl-commit {
  background: var(--blue);
  color: var(--on-blue);
  border-radius: var(--radius-xl);
  padding: 44px 40px;
  margin-top: 20px;
}
.cl-commit h2 { color: var(--on-blue); }
.cl-commit .cl-c-item {
  padding: 18px 0;
  border-bottom: 1px solid var(--on-blue-divider);
}
.cl-commit .cl-c-item:last-of-type { border-bottom: none; }
.cl-commit .cl-c-item b {
  color: var(--yellow);
  display: block;
  font-size: 17px;
  margin-bottom: 4px;
}
.cl-commit .cl-c-item p { color: var(--blue-fg-2); font-size: 15px; }
.cl-commit .cl-kicker {
  margin-top: 22px;
  font-family: var(--display);
  font-size: 19px;
  color: var(--yellow);
}

/* ---------- Platform list ---------- */
.cl-plat {
  display: flex;
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.cl-plat:last-child { border-bottom: none; }
.cl-plat-dot {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--ink);
  margin-top: 2px;
  font-size: 18px;
}
.cl-plat b { font-size: 17px; display: block; }
.cl-plat p { color: var(--gray); font-size: 15px; margin-top: 2px; }

/* ---------- Journey steps ---------- */
.cl-step {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 24px;
  padding: 26px 0;
  border-bottom: 1px solid var(--border);
}
.cl-step:last-child { border-bottom: none; }
.cl-step-num {
  font-family: var(--display);
  font-size: 34px;
  font-weight: 600;
  color: var(--lightgray);
}
.cl-step h3 { font-family: var(--display); font-size: 21px; font-weight: 600; }
.cl-step p { color: var(--gray); margin-top: 4px; max-width: 620px; }

/* ---------- Method (how we work) ---------- */
.cl-method {
  counter-reset: clm;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px 24px;
}
.cl-m-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  position: relative;
  counter-increment: clm;
}
.cl-m-item::before {
  content: counter(clm);
  position: absolute;
  top: -16px;
  left: 22px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}
.cl-m-item h3 { margin-top: 6px; }
.cl-m-item p { color: var(--gray); font-size: 15px; }

/* ---------- Blog / Notes ---------- */
.cl-post {
  padding: 30px 0;
  border-bottom: 1px solid var(--border);
}
.cl-post .cl-meta {
  font-size: 13px;
  color: var(--lightgray);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.cl-post h3 {
  font-family: var(--display);
  font-size: 23px;
  font-weight: 600;
}
.cl-post h3 a { text-decoration: none; color: var(--ink); }
.cl-post h3 a:hover { color: var(--blue); }
.cl-post p { color: var(--gray); margin-top: 6px; max-width: 640px; }
.cl-manifesto {
  background: var(--offwhite);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
  margin-bottom: 48px;
}
.cl-manifesto .cl-tag { margin-bottom: 14px; }

/* ---------- Forms ---------- */
.cl-field { margin-bottom: 18px; }
.cl-field label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
}
.cl-field input,
.cl-field textarea,
.cl-field select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--body);
  font-size: 15px;
  background: var(--white);
  color: var(--ink);
}
.cl-field input:focus,
.cl-field textarea:focus,
.cl-field select:focus {
  outline: none;
  border-color: var(--borderfocus);
  box-shadow: 0 0 0 3px var(--bluegray);
}

/* ---------- CTA band ---------- */
.cl-band {
  background:
    radial-gradient(ellipse 50% 80% at 50% 0%, rgba(241, 212, 139, 0.10) 0%, rgba(241, 212, 139, 0) 70%),
    linear-gradient(180deg, var(--blue) 0%, #3a4359 100%);
  color: var(--on-blue);
  text-align: center;
  padding: 80px 24px;
}
.cl-band h2 { color: var(--on-blue); font-size: 36px; }
.cl-band p { color: var(--blue-fg-2); margin: 12px auto 30px; max-width: 480px; }

/* ---------- Footer ---------- */
.cl-footer {
  background: var(--blue);
  color: var(--blue-fg-3);
  padding: 48px 0;
  border-top: 1px solid var(--on-blue-border);
  font-size: 14px;
}
.cl-footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}
.cl-footer-brand { display: flex; align-items: center; gap: 8px; }
.cl-footer-brand .cl-logo-word { font-size: 17px; }
.cl-footer-copy { margin-left: 12px; }
.cl-foot-links { display: flex; gap: 22px; }
.cl-foot-links a { color: var(--blue-fg-3); text-decoration: none; }
.cl-foot-links a:hover { color: var(--on-blue); text-decoration: none; }

/* ---------- Misc ---------- */
.cl-note-flag {
  background: var(--flag-bg);
  border: 1px solid var(--yellow);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  font-size: 14px;
  color: var(--gray);
  margin-top: 36px;
}
.cl-center { text-align: center; }
.cl-mt-md { margin-top: 22px; }

/* ---------- Page-specific: demo layout ---------- */
.cl-demo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
.cl-demo-list p { padding: 10px 0; border-bottom: 1px solid var(--border); }
.cl-demo-list p:last-child { border-bottom: none; }
.cl-demo-list .cl-bullet { color: var(--gray); }

/* ---------- Page-specific: about prose ---------- */
.cl-prose {
  margin-top: 26px;
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink);
}
.cl-prose p { margin-bottom: 18px; }

/* ---------- Page-specific: page header (eyebrow + h1) ---------- */
.cl-page-header { padding: var(--section-y) 0; }
.cl-page-header h1 { font-size: 44px; }
.cl-page-header .cl-lede { margin-top: 16px; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  h1.cl-h1, .cl-h1 { font-size: 36px; }
  .cl-h2 { font-size: 27px; }
  .cl-grid2, .cl-grid3 { grid-template-columns: 1fr; }
  .cl-method { grid-template-columns: 1fr; }
  .cl-jobrow { grid-template-columns: 1fr; gap: 8px; }
  .cl-nav-links { gap: 14px; }
  .cl-nav-links a { font-size: 13px; }
  .cl-nav-links .cl-hide-mobile { display: none; }
  .cl-section { padding: var(--section-y-mobile) 0; }
  .cl-hero { padding: 64px 0 72px; }
  .cl-demo-grid { grid-template-columns: 1fr; }
  .cl-page-header { padding: var(--section-y-mobile) 0; }
  .cl-page-header h1 { font-size: 32px; }
}

/* =============================================================
   Animations
   - Subtle scroll-in fade for sections / cards / jobrows / steps /
     FAQ items / platform rows / method items / posts.
   - Button hover lift + yellow CTA pulse.
   - Hero SVG slow drift.
   - Hero heading line-by-line reveal.
   - Nav shadow on scroll.
   - All animations respect prefers-reduced-motion.
   ============================================================= */

/* ---------- Keyframes ---------- */
@keyframes cl-fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes cl-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes cl-cta-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(241, 212, 139, 0.55); }
  50%      { box-shadow: 0 0 0 10px rgba(241, 212, 139, 0); }
}
@keyframes cl-drift {
  0%   { transform: translateY(-50%) translate(0, 0) rotate(0deg); }
  50%  { transform: translateY(-50%) translate(-12px, 6px) rotate(-1deg); }
  100% { transform: translateY(-50%) translate(0, 0) rotate(0deg); }
}
@keyframes cl-line-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Reveal-on-scroll baseline ---------- */
.cl-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 600ms ease-out, transform 600ms ease-out;
  will-change: opacity, transform;
}
.cl-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children inside a grid/container using --i (set inline) */
.cl-reveal-group > * {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 600ms ease-out, transform 600ms ease-out;
}
.cl-reveal-group.is-visible > * {
  opacity: 1;
  transform: translateY(0);
}
.cl-reveal-group.is-visible > *:nth-child(1) { transition-delay: 0ms; }
.cl-reveal-group.is-visible > *:nth-child(2) { transition-delay: 80ms; }
.cl-reveal-group.is-visible > *:nth-child(3) { transition-delay: 160ms; }
.cl-reveal-group.is-visible > *:nth-child(4) { transition-delay: 240ms; }
.cl-reveal-group.is-visible > *:nth-child(5) { transition-delay: 320ms; }
.cl-reveal-group.is-visible > *:nth-child(6) { transition-delay: 400ms; }
.cl-reveal-group.is-visible > *:nth-child(7) { transition-delay: 480ms; }
.cl-reveal-group.is-visible > *:nth-child(8) { transition-delay: 560ms; }

/* ---------- Hero heading line reveal ---------- */
.cl-hero h1 {
  overflow: hidden;
}
.cl-hero-line {
  display: block;
  opacity: 0;
  transform: translateY(14px);
  animation: cl-line-in 700ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.cl-hero-line:nth-child(1) { animation-delay: 80ms; }
.cl-hero-line:nth-child(2) { animation-delay: 220ms; }
.cl-hero-line:nth-child(3) { animation-delay: 360ms; }
.cl-hero-line:nth-child(4) { animation-delay: 500ms; }

/* ---------- Buttons ---------- */
.cl-btn {
  transition: transform 200ms ease, box-shadow 200ms ease, background 200ms ease;
}
.cl-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(78, 90, 116, 0.18);
}
.cl-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(78, 90, 116, 0.15);
}

/* ---------- Yellow CTA pulse (hero demo button) ---------- */
.cl-cta-pulse {
  animation: cl-cta-pulse 2.4s ease-out infinite;
}

/* ---------- Hero SVG drift ---------- */
.cl-hero-loop {
  animation: cl-drift 14s ease-in-out infinite;
}

/* ---------- Nav shadow on scroll ---------- */
.cl-nav {
  transition: box-shadow 250ms ease, background 250ms ease;
}
.cl-nav.is-scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .cl-reveal,
  .cl-reveal-group > *,
  .cl-hero-line {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }
  .cl-cta-pulse,
  .cl-hero-loop,
  .cl-btn {
    animation: none !important;
    transition: none !important;
  }
  .cl-btn:hover { transform: none; box-shadow: none; }
}
