/* title-22.com — shared styles
   Palette: ink #1A2420 · pine #1E5748 · deep #143C31 · sage #E9F1EC · marigold #E8A33D
   Type: Zilla Slab (display) · Public Sans (body) · IBM Plex Mono (regulation tags) */

:root {
  --ink: #1a2420;
  --pine: #1e5748;
  --deep: #143c31;
  --sage: #e9f1ec;
  --marigold: #e8a33d;
  --line: #d8e2dc;
  --muted: #5b6a63;
  --white: #ffffff;
  --cream: #fbf7f0;
  --coral: #e8735d;
  --max: 62rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: "Public Sans", -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
}

h1, h2, h3 {
  font-family: "Zilla Slab", Georgia, serif;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.1rem, 5.5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); font-weight: 600; }
h3 { font-size: 1.25rem; font-weight: 600; }

p { margin: 0 0 1em; }
a { color: var(--pine); }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--marigold);
  outline-offset: 2px;
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }

/* Regulation tag — the site's signature element */
.reg {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--deep);
  background: var(--sage);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.15rem 0.5rem;
  white-space: nowrap;
}

/* Header */
.site-head {
  border-bottom: 1px solid var(--line);
  background: var(--white);
}
.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.brand {
  font-family: "Zilla Slab", Georgia, serif;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--ink);
  text-decoration: none;
}
.brand .tld { color: var(--pine); }
.nav { display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; }
.nav a { text-decoration: none; font-size: 0.95rem; color: var(--ink); }
.nav a:hover { color: var(--pine); }

.btn {
  display: inline-block;
  background: var(--pine);
  color: var(--white) !important;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  border: 1px solid var(--deep);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { background: var(--deep); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(20,60,49,0.18); }
.btn.ghost {
  background: transparent;
  color: var(--pine) !important;
  border: 1px solid var(--pine);
}
.btn.ghost:hover { background: var(--sage); box-shadow: none; }

/* Warm hero (Sensi-inspired) */
.hero-warm {
  background: linear-gradient(180deg, var(--cream) 0%, var(--white) 100%);
  padding: 4rem 0 3rem;
  overflow: hidden;
}
.hero-warm .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  align-items: center;
}
@media (max-width: 55rem) {
  .hero-warm .wrap { grid-template-columns: 1fr; }
}
.hero-warm .eyebrow {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 1rem;
}
.hero-warm h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); }
.hero-warm .lede { font-size: 1.15rem; color: var(--muted); max-width: 34rem; }
.hero-warm .cta-row { margin: 1.75rem 0 1.5rem; }

/* Soft illustrative visual placeholder — swap for real photography */
.hero-visual {
  position: relative;
  aspect-ratio: 4/3.2;
  border-radius: 24px;
  background-image: linear-gradient(135deg, rgba(30,87,72,0.06) 0%, rgba(232,163,61,0.10) 100%), url("/assets/images/hero-caregiver.jpg");
  background-size: cover;
  background-position: center;
  background-color: var(--sage);
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  overflow: hidden;
}
.hero-visual .play-chip {
  position: relative;
  z-index: 1;
  margin: 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(4px);
  border-radius: 999px;
  padding: 0.55rem 1.1rem 0.55rem 0.6rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}
.hero-visual .play-chip .dot {
  width: 1.9rem; height: 1.9rem;
  border-radius: 50%;
  background: var(--pine);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem;
}
.hero-visual .placeholder-note {
  position: absolute;
  top: 1rem; left: 1rem;
  z-index: 1;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  color: var(--muted);
  background: var(--white);
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 0.4rem 0.7rem;
}

/* Three-pillar value section */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
@media (max-width: 55rem) { .pillars { grid-template-columns: 1fr; } }
.pillar {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.75rem;
  box-shadow: 0 2px 10px rgba(20,60,49,0.04);
}
.pillar .kicker {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--pine);
  margin-bottom: 0.5rem;
}
.pillar h3 { margin-bottom: 0.6rem; }
.pillar ul { list-style: none; padding: 0; margin: 1rem 0 0; }
.pillar li {
  font-size: 0.9rem;
  color: var(--muted);
  padding: 0.35rem 0 0.35rem 1.1rem;
  position: relative;
}
.pillar li::before {
  content: "—";
  position: absolute; left: 0;
  color: var(--marigold);
}

/* Trust logo row */
.logo-row {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 0;
}
.logo-row .logo-chip {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 0.5rem 1rem;
}

/* Stat bar */
.stat-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding: 2.5rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
@media (max-width: 45rem) { .stat-bar { grid-template-columns: repeat(2, 1fr); } }
.stat-bar .stat { text-align: center; }
.stat-bar .stat .n {
  font-family: "Zilla Slab", serif;
  font-weight: 700;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  color: var(--pine);
  line-height: 1;
}
.stat-bar .stat .lbl {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.4rem;
}

/* Testimonials */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
@media (max-width: 55rem) { .testimonial-grid { grid-template-columns: 1fr; } }
.testimonial-card {
  background: var(--cream);
  border-radius: 16px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
}
.testimonial-card .quote {
  font-family: "Zilla Slab", serif;
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--ink);
  flex-grow: 1;
}
.testimonial-card .who {
  margin-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.testimonial-card .avatar {
  width: 2.25rem; height: 2.25rem;
  border-radius: 50%;
  background: var(--sage);
  flex-shrink: 0;
}

/* Hero */
.hero { padding: 4rem 0 3.5rem; }
.hero .eyebrow {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 1rem;
}
.hero p.lede {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 38rem;
}
.hero .cta-row { display: flex; gap: 0.75rem; margin: 1.75rem 0 2.25rem; flex-wrap: wrap; }
.reg-strip {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}
.reg-strip .lbl {
  font-size: 0.8rem;
  color: var(--muted);
  margin-right: 0.25rem;
}

/* Ledger sections (features) */
.ledger { border-top: 1px solid var(--line); }
.ledger .row {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 1.5rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--line);
}
.ledger .row .tag-col { padding-top: 0.2rem; }
.ledger .row p { color: var(--muted); margin-bottom: 0; max-width: 40rem; }
@media (max-width: 40rem) {
  .ledger .row { grid-template-columns: 1fr; gap: 0.5rem; }
}

/* Trust note */
.trust {
  background: var(--sage);
  border-left: 4px solid var(--pine);
  padding: 1.5rem;
  border-radius: 0 6px 6px 0;
  margin: 3rem 0;
}
.trust p { margin: 0; max-width: 42rem; }

/* Section spacing */
section { padding: 3rem 0; }
.section-head { margin-bottom: 2rem; }
.section-head p { color: var(--muted); max-width: 38rem; }

/* Blog cards */
.post-list { list-style: none; padding: 0; margin: 0; }
.post-list li {
  border-bottom: 1px solid var(--line);
  padding: 1.75rem 0;
}
.post-list h3 a { text-decoration: none; color: var(--ink); }
.post-list h3 a:hover { color: var(--pine); }
.post-list .meta {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}
.post-list p { color: var(--muted); margin: 0.4rem 0 0; }

/* Article */
article.post { padding: 3.5rem 0; }
article.post .wrap { max-width: 44rem; }
article.post h1 { margin-bottom: 0.4em; }
article.post .meta {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 2rem;
}
article.post h2 { margin-top: 2.2em; }
article.post ul, article.post ol { padding-left: 1.4rem; }
article.post li { margin-bottom: 0.5em; }
article.post .checklist {
  list-style: none;
  padding: 0;
}
article.post .checklist li {
  padding: 0.6rem 0 0.6rem 2rem;
  position: relative;
  border-bottom: 1px dashed var(--line);
}
article.post .checklist li::before {
  content: "☐";
  position: absolute;
  left: 0.25rem;
  color: var(--pine);
  font-size: 1.1rem;
}
.post-cta {
  background: var(--sage);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 2.5rem 0;
}
.post-cta p { margin-bottom: 1rem; }
.post-cta .btn { margin: 0; }

/* Whiteboard-style scroll explainer */
.explainer { padding-top: 1rem; }
.explain-track {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}
.explain-step {
  flex: 1 1 11rem;
  min-width: 9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 0.5rem;
}
.explain-step .draw-icon {
  width: 3.25rem;
  height: 3.25rem;
  color: var(--pine);
  margin-bottom: 0.9rem;
}
.explain-step .draw-icon path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
  transition: stroke-dashoffset 0.9s ease;
}
.explain-step h3 { font-size: 1rem; margin-bottom: 0.3rem; }
.explain-step p { font-size: 0.85rem; color: var(--muted); margin: 0; }
.explain-step .caption {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.explain-line {
  flex: 0 0 2.5rem;
  height: 2px;
  border-top: 2px dashed var(--line);
  align-self: flex-start;
  margin-top: 1.6rem;
  opacity: 0;
  transition: opacity 0.6s ease;
}
@media (max-width: 45rem) { .explain-line { display: none; } }

.explainer.in-view .step-1 .draw-icon path { stroke-dashoffset: 0; transition-delay: 0s; }
.explainer.in-view .step-1 .caption { opacity: 1; transform: none; transition-delay: .35s; }
.explainer.in-view .line-1 { opacity: 1; transition-delay: .7s; }
.explainer.in-view .step-2 .draw-icon path { stroke-dashoffset: 0; transition-delay: .9s; }
.explainer.in-view .step-2 .caption { opacity: 1; transform: none; transition-delay: 1.25s; }
.explainer.in-view .line-2 { opacity: 1; transition-delay: 1.6s; }
.explainer.in-view .step-3 .draw-icon path { stroke-dashoffset: 0; transition-delay: 1.8s; }
.explainer.in-view .step-3 .caption { opacity: 1; transform: none; transition-delay: 2.15s; }
.explainer.in-view .line-3 { opacity: 1; transition-delay: 2.5s; }
.explainer.in-view .step-4 .draw-icon path { stroke-dashoffset: 0; transition-delay: 2.7s; }
.explainer.in-view .step-4 .caption { opacity: 1; transform: none; transition-delay: 3.05s; }

@media (prefers-reduced-motion: reduce) {
  .draw-icon path { stroke-dashoffset: 0 !important; }
  .explain-step .caption { opacity: 1 !important; transform: none !important; }
  .explain-line { opacity: 1 !important; }
}

/* Footer */
.site-foot {
  border-top: 1px solid var(--line);
  background: var(--sage);
  margin-top: 3rem;
}
.site-foot .wrap {
  padding-top: 2rem;
  padding-bottom: 2.5rem;
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--muted);
}
.site-foot a { color: var(--deep); }
