/* Chairside landing page. Same palette and type as the app so the
   two feel like one thing. Animations are CSS-driven; landing.js only
   flips classes on scroll. */

:root {
  --paper: #f6f3ee;
  --card: #fffdf9;
  --ink: #25292b;
  --ink-soft: #5d6360;
  --ink-faint: #8b908b;
  --line: #e2dcd0;
  --line-strong: #cfc7b6;
  --pine: #1d3a34;
  --pine-deep: #152b27;
  --cream: #ece6d6;
  --accent: #1f6f63;
  --gold: #d8a23a;
  --red: #b3402e;
  --serif: 'Fraunces', Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; }

a { color: inherit; }

/* ---------- nav ---------- */

.lnav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 14px 40px;
  background: rgba(246, 243, 238, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.wordmark {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 700;
  text-decoration: none;
}

.lnav nav { flex: 1; display: flex; gap: 22px; }
.lnav nav a {
  text-decoration: none;
  font-size: 13.5px;
  color: var(--ink-soft);
}
.lnav nav a:hover { color: var(--ink); }

.cta {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  padding: 9px 20px;
  font-size: 14px;
  font-weight: 600;
}
.cta:hover { background: #195a50; }
.cta.small { padding: 7px 16px; font-size: 13px; }
.cta.big { padding: 13px 30px; font-size: 16px; }

.ghost {
  display: inline-block;
  text-decoration: none;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 9px 20px;
  font-size: 14px;
  color: var(--ink);
}
.ghost:hover { border-color: var(--ink-faint); }

/* ---------- hero ---------- */

.hero {
  display: flex;
  align-items: center;
  gap: 60px;
  max-width: 1060px;
  margin: 0 auto;
  padding: 84px 40px 90px;
}

.hero-copy { flex: 1.15; }

.hero h1 {
  font-size: 50px;
  letter-spacing: -0.015em;
  margin-bottom: 20px;
  animation: rise 0.7s ease-out both;
}

.hero-copy > p {
  font-size: 17px;
  color: var(--ink-soft);
  max-width: 460px;
  margin-bottom: 28px;
  animation: rise 0.7s ease-out 0.12s both;
}

.hero-ctas { display: flex; gap: 12px; animation: rise 0.7s ease-out 0.22s both; }

.trial-line {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  animation: rise 0.7s ease-out 0.26s both;
}

.fine {
  margin-top: 18px;
  font-size: 12.5px;
  color: var(--ink-faint);
  animation: rise 0.7s ease-out 0.3s both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

/* the self-completing checklist */

.hero-demo { flex: 1; position: relative; animation: rise 0.7s ease-out 0.25s both; }

.demo-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px 20px 8px;
  box-shadow: 0 24px 60px -28px rgba(29, 58, 52, 0.35);
  transform: rotate(0.6deg);
}

.demo-head {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
  display: flex;
  justify-content: space-between;
}
.demo-head span { font-family: var(--sans); font-size: 12px; color: var(--ink-faint); align-self: center; }

.demo-task {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 0;
  border-bottom: 1px solid #eee8dc;
  font-size: 13.5px;
}
.demo-task:last-child { border-bottom: none; }

.demo-task .txt { flex: 1; }
.demo-task .when { font-size: 12px; color: var(--ink-faint); }
.demo-task .when.late { color: var(--red); font-weight: 600; opacity: 0; }

.demo-task .box {
  width: 18px; height: 18px;
  flex: none;
  border: 1.5px solid var(--line-strong);
  border-radius: 4px;
  position: relative;
}
.demo-task .box::after {
  content: '';
  position: absolute;
  left: 4px; top: 1px;
  width: 5px; height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  opacity: 0;
}

/* one shared 11s loop, staggered with keyframe offsets */
.t1 .box        { animation: boxon1 11s ease infinite; }
.t1 .box::after { animation: tickon1 11s ease infinite; }
.t2 .box        { animation: boxon2 11s ease infinite; }
.t2 .box::after { animation: tickon2 11s ease infinite; }
.t3 .box        { animation: boxon3 11s ease infinite; }
.t3 .box::after { animation: tickon3 11s ease infinite; }
.t4 .box        { animation: boxon4 11s ease infinite; }
.t4 .box::after { animation: tickon4 11s ease infinite; }
.t4 .when.late  { animation: latein 11s ease infinite; }
.demo-toast     { animation: toastin 11s ease infinite; }

@keyframes boxon1 { 0%, 8%  { background: transparent; border-color: var(--line-strong); }
                    11%, 96% { background: var(--accent); border-color: var(--accent); }
                    100% { background: transparent; border-color: var(--line-strong); } }
@keyframes tickon1 { 0%, 10% { opacity: 0; } 12%, 96% { opacity: 1; } 100% { opacity: 0; } }

@keyframes boxon2 { 0%, 20% { background: transparent; border-color: var(--line-strong); }
                    23%, 96% { background: var(--accent); border-color: var(--accent); }
                    100% { background: transparent; border-color: var(--line-strong); } }
@keyframes tickon2 { 0%, 22% { opacity: 0; } 24%, 96% { opacity: 1; } 100% { opacity: 0; } }

@keyframes boxon3 { 0%, 32% { background: transparent; border-color: var(--line-strong); }
                    35%, 96% { background: var(--accent); border-color: var(--accent); }
                    100% { background: transparent; border-color: var(--line-strong); } }
@keyframes tickon3 { 0%, 34% { opacity: 0; } 36%, 96% { opacity: 1; } 100% { opacity: 0; } }

/* the fourth task goes late, gets a reminder, then gets done */
@keyframes latein  { 0%, 44% { opacity: 0; } 48%, 78% { opacity: 1; } 82%, 100% { opacity: 0; } }
@keyframes toastin { 0%, 56% { opacity: 0; transform: translateY(8px); }
                     60%, 76% { opacity: 1; transform: none; }
                     80%, 100% { opacity: 0; transform: translateY(8px); } }
@keyframes boxon4  { 0%, 80% { background: transparent; border-color: var(--line-strong); }
                     84%, 96% { background: var(--accent); border-color: var(--accent); }
                     100% { background: transparent; border-color: var(--line-strong); } }
@keyframes tickon4 { 0%, 82% { opacity: 0; } 85%, 96% { opacity: 1; } 100% { opacity: 0; } }

.demo-toast {
  position: absolute;
  bottom: -16px;
  left: 26px;
  background: var(--pine-deep);
  color: var(--cream);
  font-size: 12.5px;
  padding: 8px 14px;
  border-radius: 6px;
}

/* ---------- cinematic showcase (full-bleed b-roll) ---------- */

.showcase {
  position: relative;
  height: 78vh;
  min-height: 460px;
  max-height: 720px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  /* warm pine gradient shows before the clip loads and stands in for
     reduced-motion visitors, who get the still treatment below */
  background:
    radial-gradient(120% 90% at 75% 15%, rgba(216,162,58,0.22), transparent 55%),
    linear-gradient(160deg, #24463f 0%, var(--pine-deep) 70%);
}

.showcase-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* a slow drift so even a still poster feels alive */
  animation: kenburns 26s ease-in-out infinite alternate;
}

@keyframes kenburns {
  from { transform: scale(1.04); }
  to   { transform: scale(1.12); }
}

.showcase-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(21,43,39,0.82) 0%, rgba(21,43,39,0.28) 42%, rgba(21,43,39,0.12) 100%);
}

.showcase-copy {
  position: relative;
  z-index: 1;
  max-width: 1060px;
  margin: 0 auto;
  width: 100%;
  padding: 0 40px 60px;
  color: #fff;
}
.showcase-copy h2 {
  font-size: 40px;
  letter-spacing: -0.015em;
  line-height: 1.1;
  margin-bottom: 14px;
  text-shadow: 0 1px 30px rgba(0,0,0,0.35);
}
.showcase-copy p {
  font-size: 17px;
  color: rgba(255,255,255,0.86);
  max-width: 480px;
}

/* ---------- bands ---------- */

.band {
  padding: 84px 40px;
  max-width: 1060px;
  margin: 0 auto;
}

.band h2 {
  font-size: 33px;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

.band-sub {
  color: var(--ink-soft);
  max-width: 560px;
  margin-bottom: 40px;
}

.band.alt {
  max-width: none;
  background: var(--card);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.band.alt > * { max-width: 980px; margin-left: auto; margin-right: auto; }
.band.alt h2 { margin-bottom: 12px; }
.band.alt .band-sub { margin-bottom: 40px; }

/* steps */

.steps { display: flex; gap: 36px; margin-top: 36px; }
.step { flex: 1; }
.step-no {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 10px;
}
.step h3 { font-size: 19px; margin-bottom: 8px; }
.step p { font-size: 14px; color: var(--ink-soft); }

/* roles */

.role-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.role-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 16px 17px;
}
.role-card b { display: block; font-size: 14px; margin-bottom: 5px; }
.role-card p { font-size: 12.5px; color: var(--ink-soft); }

.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-bottom: 10px; }
.d-reception   { background: #527a96; }
.d-coordinator { background: #a25b41; }
.d-insurance   { background: #6c7f3e; }
.d-manager     { background: #7d5a50; }
.d-doctor      { background: #1f6f63; }
.d-assistant   { background: #a8842c; }
.d-lab         { background: #5d6a77; }
.d-accounts    { background: #7b4a63; }

/* reports split */

.split { display: flex; align-items: center; gap: 60px; }
.split-copy { flex: 1.1; }
.split-copy ul { margin: 18px 0 0 18px; color: var(--ink-soft); font-size: 14px; }
.split-copy li { margin-bottom: 8px; }
.split-vis { flex: 1; }

.mini-chart {
  display: flex;
  align-items: flex-end;
  gap: 26px;
  height: 220px;
  padding: 24px 30px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.mc-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 8px;
}
.mc-col span { font-size: 11px; color: var(--ink-faint); }

.mc-bar {
  width: 30px;
  background: var(--accent);
  border-radius: 3px 3px 0 0;
  height: 0;
  transition: height 0.9s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.in .b1 { height: 62%; transition-delay: 0.05s; }
.in .b2 { height: 84%; transition-delay: 0.15s; }
.in .b3 { height: 71%; transition-delay: 0.25s; }
.in .b4 { height: 90%; transition-delay: 0.35s; }
.in .b5 { height: 78%; transition-delay: 0.45s; }

.mc-caption { text-align: center; font-size: 12px; color: var(--ink-faint); margin-top: 10px; }

/* security band */

.band.dark {
  max-width: none;
  background: var(--pine);
  color: var(--cream);
}
.band.dark > * { max-width: 980px; margin-left: auto; margin-right: auto; }
.band.dark .band-sub { color: #9eb4ab; }

.sec-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.sec-card {
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 8px;
  padding: 16px 18px;
}
.sec-card b { display: block; font-size: 14.5px; margin-bottom: 6px; color: #fff; }
.sec-card p { font-size: 13px; color: #b9c8bd; }

/* closer */

.closer { text-align: center; padding-bottom: 100px; }
.closer .band-sub { margin: 0 auto 30px; }

/* footer */

.lfoot {
  border-top: 1px solid var(--line);
  padding: 26px 40px;
  display: flex;
  align-items: baseline;
  gap: 16px;
  font-size: 12.5px;
  color: var(--ink-faint);
}
.lfoot .wordmark { font-size: 16px; }

/* ---------- scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in { opacity: 1; transform: none; }

.steps .step:nth-child(2) { transition-delay: 0.1s; }
.steps .step:nth-child(3) { transition-delay: 0.2s; }
.role-grid .role-card:nth-child(2), .sec-grid .sec-card:nth-child(2) { transition-delay: 0.07s; }
.role-grid .role-card:nth-child(3), .sec-grid .sec-card:nth-child(3) { transition-delay: 0.14s; }
.role-grid .role-card:nth-child(4), .sec-grid .sec-card:nth-child(4) { transition-delay: 0.21s; }
.role-grid .role-card:nth-child(5), .sec-grid .sec-card:nth-child(5) { transition-delay: 0.28s; }
.role-grid .role-card:nth-child(6), .sec-grid .sec-card:nth-child(6) { transition-delay: 0.35s; }
.role-grid .role-card:nth-child(7) { transition-delay: 0.42s; }
.role-grid .role-card:nth-child(8) { transition-delay: 0.49s; }

/* ---------- responsive ---------- */

@media (max-width: 880px) {
  .hero { flex-direction: column; padding-top: 50px; gap: 50px; }
  .hero h1 { font-size: 38px; }
  .steps { flex-direction: column; gap: 28px; }
  .role-grid { grid-template-columns: repeat(2, 1fr); }
  .sec-grid { grid-template-columns: 1fr; }
  .split { flex-direction: column; gap: 40px; }
  .lnav { padding: 12px 20px; gap: 16px; }
  .lnav nav { display: none; }
  .band { padding: 60px 20px; }
  .showcase { height: 60vh; min-height: 360px; }
  .showcase-copy { padding: 0 20px 40px; }
  .showcase-copy h2 { font-size: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  /* no autoplaying footage for reduced-motion visitors — they keep the
     warm gradient and the line over it */
  .showcase-video { display: none; }
  .mc-bar { height: 70%; }
  .in .b1 { height: 62%; } .in .b2 { height: 84%; } .in .b3 { height: 71%; }
  .in .b4 { height: 90%; } .in .b5 { height: 78%; }
  .demo-task .box::after { opacity: 1; }
  .t1 .box, .t2 .box, .t3 .box, .t4 .box { background: var(--accent); border-color: var(--accent); }
  .demo-toast, .demo-task .when.late { opacity: 0; }
  html { scroll-behavior: auto; }
}
