/* Plan Carer home page. Palette and type match the app (tracker.plancarer.com). */
:root {
  color-scheme: light;
  --paper: #f3f5f7;
  --surface: #ffffff;
  --ink: #17222c;
  --ink-2: #485664;
  --line: #d3d9df;
  --teal: #0e6168;
  --teal-ink: #ffffff;
  --teal-soft: #e2f0f1;
  --fresh: #17643a;
  --stale: #a3261c;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #11181e; --surface: #18222a; --ink: #e6edf2; --ink-2: #a8b5c0; --line: #2e3c47;
    --teal: #5fc0c7; --teal-ink: #0b1a1c; --teal-soft: #173a3e; --fresh: #6fd39a; --stale: #ff8a7a;
  }
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1.0625rem/1.6 var(--font); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 0.6em; letter-spacing: -0.015em; }
p { margin: 0 0 1em; }
a { color: var(--teal); }
.wrap { width: min(72rem, 100% - 2.5rem); margin-inline: auto; }
.skip { position: absolute; left: 1rem; top: -3rem; background: var(--surface); color: var(--ink); padding: 0.5rem 0.75rem; border-radius: 6px; }
.skip:focus { top: 1rem; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 4px; }

/* Header */
.top { border-bottom: 1px solid var(--line); background: var(--surface); }
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4rem; }
.brand { font-weight: 750; font-size: 1.2rem; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.top nav { display: flex; align-items: center; gap: 1rem; }
.top-link { color: var(--ink); font-weight: 550; text-decoration: none; }
.top-link:hover { text-decoration: underline; }

/* Buttons */
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0.7rem 1.3rem;
  border-radius: 10px; background: var(--teal); color: var(--teal-ink); font-weight: 650; text-decoration: none; border: 2px solid var(--teal); }
.button:hover { filter: brightness(1.08); }
.button.small { min-height: 40px; padding: 0.4rem 0.9rem; font-size: 0.95rem; }
.button.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.button.light { background: #ffffff; color: #0e6168; border-color: #ffffff; }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; padding: clamp(3rem, 8vw, 6rem) 0; }
.hero h1 { font-size: clamp(2.4rem, 5.6vw, 4.1rem); font-weight: 780; max-width: 13ch; }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.25rem); color: var(--ink-2); max-width: 36rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }

/* The check-in illustration */
.checkin { margin: 0; display: grid; gap: 0.9rem; }
.mail { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1.25rem 1.35rem; }
.mail-from { font-size: 0.85rem; color: var(--ink-2); margin-bottom: 0.35rem; }
.mail-subject { font-weight: 700; font-size: 1.1rem; margin-bottom: 0.35rem; }
.mail-body { color: var(--ink-2); font-size: 0.95rem; margin-bottom: 0.9rem; }
.mail-buttons { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.mail-buttons span { font-size: 0.85rem; padding: 0.3rem 0.7rem; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); }
.reply { justify-self: end; max-width: 26rem; margin: 0; background: var(--teal-soft); border-radius: 14px 14px 4px 14px; padding: 0.8rem 1rem; font-size: 0.97rem; }
.reply .who { display: block; font-size: 0.8rem; font-weight: 650; color: var(--ink-2); }
.task { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--teal); border-radius: 10px; padding: 0.9rem 1.1rem; }
.task p { margin: 0; }
.task-title { font-weight: 650; }
.task-meta { font-size: 0.9rem; color: var(--ink-2); }
.fresh { font-size: 0.9rem; font-weight: 600; margin-top: 0.3rem !important; display: grid; }
.state { display: inline-flex; align-items: center; gap: 0.45rem; grid-area: 1 / 1; }
.dot { width: 0.7rem; height: 0.7rem; border-radius: 50%; border: 2px solid currentColor; }
.stale { color: var(--stale); }
.stale .dot { border-style: dashed; }
.fresh-now { color: var(--fresh); }
.fresh-now .dot { background: currentColor; }
.pct { display: inline-grid; }
.pct > span { grid-area: 1 / 1; }
.checkin figcaption { font-size: 0.9rem; color: var(--ink-2); }

/* One orchestrated moment: the task refreshes after the reply arrives. */
.after, .fresh-now { opacity: 0; animation: show 0.5s ease 1.6s forwards; }
.before, .stale { animation: hide 0.4s ease 1.4s forwards; }
.reply { opacity: 0; transform: translateY(6px); animation: arrive 0.5s ease 0.6s forwards; }
@keyframes show { to { opacity: 1; } }
@keyframes hide { to { opacity: 0; } }
@keyframes arrive { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .after, .fresh-now, .reply { opacity: 1; transform: none; animation: none; }
  .before, .stale { opacity: 0; animation: none; }
}

/* How it works: a real sequence, so it's numbered */
.steps-section { background: var(--surface); border-block: 1px solid var(--line); padding: clamp(3rem, 7vw, 5rem) 0; }
.steps-section h2, .features h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 2rem 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; }
.steps li { counter-increment: step; position: relative; padding-top: 3.25rem; }
.steps li::before { content: counter(step); position: absolute; top: 0; left: 0; width: 2.4rem; height: 2.4rem; border-radius: 50%;
  display: grid; place-items: center; background: var(--teal); color: var(--teal-ink); font-weight: 750; }
.steps h3 { font-size: 1.15rem; }
.steps p { color: var(--ink-2); font-size: 0.98rem; }

/* Features: a plain list, not a grid of cards */
.features { padding: clamp(3rem, 7vw, 5rem) 0; }
.feature-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem 3rem; margin: 2rem 0 0; }
.feature-list div { border-top: 2px solid var(--line); padding-top: 1rem; }
.feature-list dt { font-weight: 700; margin-bottom: 0.3rem; }
.feature-list dd { margin: 0; color: var(--ink-2); }

/* Closing */
.closing { background: #0e6168; color: #ffffff; padding: clamp(3rem, 7vw, 5rem) 0; }
.closing-inner { max-width: 44rem; }
.closing h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.closing p { color: #d6ecee; font-size: 1.1rem; }
.closing :focus-visible { outline-color: #ffffff; }

/* Footer */
.foot { padding: 2rem 0; font-size: 0.95rem; color: var(--ink-2); }
.foot-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.foot p { margin: 0; }
.foot a { color: var(--ink-2); }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .steps, .feature-list { grid-template-columns: 1fr; }
  .top .top-link { display: none; }
  .actions .button { flex: 1 1 100%; }
}
