/*
 * Clinifyd marketing site.
 *
 * Deliberately plain CSS in one file. A landing page that needs a build step
 * is a landing page nobody edits, and the whole thing is smaller than the
 * framework it would otherwise pull in.
 *
 * Tokens follow the product's own slate palette rather than the guide's
 * suggested teal, so the site and the software look like one thing.
 */
:root {
  --ink: #0f172a;
  --ink-soft: #475569;
  --ink-faint: #94a3b8;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-sunk: #f1f5f9;
  --line: #e2e8f0;
  --brand: #0f172a;
  --accent: #0d9488;
  --accent-soft: #f0fdfa;
  --warn: #b45309;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 18px 48px rgb(15 23 42 / 8%);
  --measure: 66ch;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* Motion is decoration here. Anybody who has asked for less gets none. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  color: var(--ink);
  background: var(--surface);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0;
}

p {
  margin: 0;
  max-width: var(--measure);
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
}

.wrap {
  width: min(100% - 3rem, 72rem);
  margin-inline: auto;
}

/* Every interactive thing shows where the keyboard is. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Skip link — visible the moment it is focused, invisible otherwise. */
.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: 8px;
}

/* ------------------------------------------------------------------ header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgb(255 255 255 / 92%);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 0;
}

.wordmark {
  font-weight: 650;
  /* The name is the logo, so it has to carry like one. At 1.15rem it read as
     another navigation item; this is the size of a masthead. */
  font-size: 1.6rem;
  letter-spacing: -0.03em;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.wordmark .dot {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 999px;
  background: var(--accent);
}

.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/*
 * Scoped away from buttons deliberately. `.site-nav a` is a class plus a type
 * selector, which outranks `.btn-primary` — so without the `:not()` the
 * primary button in the header rendered slate grey on near-black and was
 * effectively invisible. Specificity, not colour choice, was the bug.
 */
.site-nav a:not(.btn) {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 1rem;
}

.site-nav a:not(.btn):hover {
  color: var(--ink);
}

@media (max-width: 760px) {
  /* No hamburger: four links fit, and a menu you have to open is a menu
     nobody opens. The nav wraps under the wordmark instead. */
  .site-header .wrap {
    flex-wrap: wrap;
  }
  .site-nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    gap: 1.15rem;
    overflow: visible;
    flex-wrap: wrap;
    padding-bottom: 0.25rem;
  }
  .site-nav .nav-secondary {
    display: none;
  }
}

/* ------------------------------------------------------------------ buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  /* 44px minimum target, as the brief asks. */
  min-height: 48px;
  padding: 0.7rem 1.4rem;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 550;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
}
.btn-primary:hover {
  background: #1e293b;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover {
  background: var(--surface-soft);
}

.btn[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}

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

.hero {
  padding: 6rem 0 4rem;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2.15rem, 5.2vw, 3.4rem);
  max-width: 19ch;
}

.hero p.lede {
  margin-top: 1.25rem;
  font-size: clamp(1.1rem, 2vw, 1.28rem);
  color: var(--ink-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

@media (max-width: 520px) {
  .hero-actions .btn {
    width: 100%;
  }
}

.assurance {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--ink-faint);
}

/* ------------------------------------------------------------ product frame */

.frame {
  margin-top: 3.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.frame-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.frame-bar .pip {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 999px;
  background: var(--line);
}

.frame-bar .label {
  margin-left: 0.5rem;
  font-size: 0.8rem;
  color: var(--ink-faint);
}

.frame-body {
  padding: 1.5rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
}

.tile .k {
  font-size: 0.75rem;
  color: var(--ink-faint);
}

.tile .v {
  font-size: 1.6rem;
  font-weight: 620;
  margin-top: 0.15rem;
  font-variant-numeric: tabular-nums;
}

.tile .n {
  font-size: 0.78rem;
  color: var(--ink-faint);
  margin-top: 0.1rem;
}

/* ---------------------------------------------------------------- sections */

section {
  padding: 5.5rem 0;
}

section.soft {
  background: var(--surface-soft);
  border-block: 1px solid var(--line);
}

.section-head {
  max-width: var(--measure);
  margin-bottom: 3rem;
}

.section-head h2 {
  font-size: clamp(1.75rem, 3.6vw, 2.45rem);
}

.section-head p {
  margin-top: 0.85rem;
  color: var(--ink-soft);
}

/* ---------------------------------------------------------------- workflow */

.steps {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: step;
}

.steps li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
}

.steps li h3 {
  font-size: 1.08rem;
  margin-top: 0.6rem;
}

.steps li p {
  margin-top: 0.5rem;
  font-size: 0.97rem;
  color: var(--ink-soft);
}

.step-no {
  display: inline-grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 650;
}

/* ---------------------------------------------------------------- features */

.bands {
  display: grid;
  gap: 5rem;
}

.band {
  display: grid;
  gap: 2rem;
  align-items: start;
}

@media (min-width: 900px) {
  .band {
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
  }
  /* Alternating sides, but source order never changes — a screen reader
     hears the heading before its evidence either way. */
  .band:nth-child(even) .band-media {
    order: -1;
  }
}

.band h3 {
  font-size: 1.5rem;
}

.band > div > p {
  margin-top: 0.75rem;
  color: var(--ink-soft);
}

.ticks {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: grid;
  gap: 0.75rem;
}

.ticks li {
  display: flex;
  gap: 0.7rem;
  font-size: 1rem;
  color: var(--ink-soft);
}

.ticks svg {
  flex: none;
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.2rem;
  color: var(--accent);
}

.band-media {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.25rem;
  display: grid;
  gap: 0.75rem;
  align-content: start;
}

.row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.88rem;
}

.row .grow {
  flex: 1;
  min-width: 0;
}

.row .muted {
  color: var(--ink-faint);
  font-size: 0.8rem;
}

.pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
}

.pill-green {
  background: #ecfdf5;
  color: #047857;
}
.pill-amber {
  background: #fffbeb;
  color: var(--warn);
}
.pill-slate {
  background: var(--surface-sunk);
  color: var(--ink-soft);
}

.swatch {
  width: 0.55rem;
  height: 2rem;
  border-radius: 4px;
  flex: none;
}

/* ------------------------------------------------------------------- lists */

.grid-cards {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
}

.card h3 {
  font-size: 1.05rem;
}

.card p {
  margin-top: 0.6rem;
  font-size: 0.97rem;
  color: var(--ink-soft);
}

.card ul {
  margin: 0.75rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.card li {
  margin-top: 0.3rem;
}

/* -------------------------------------------------------------------- FAQ */

details {
  border-bottom: 1px solid var(--line);
  padding: 1.4rem 0;
}

summary {
  cursor: pointer;
  font-weight: 550;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: '+';
  color: var(--ink-faint);
  font-size: 1.2rem;
  flex: none;
}

details[open] summary::after {
  content: '−';
}

details p {
  margin-top: 0.75rem;
  color: var(--ink-soft);
}

/* ------------------------------------------------------------------- forms */

.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 4vw, 2rem);
  box-shadow: var(--shadow);
}

.field {
  display: block;
  margin-top: 1rem;
}

/* A persistent label, never a placeholder standing in for one. */
.field > span {
  display: block;
  font-size: 0.88rem;
  font-weight: 550;
  margin-bottom: 0.35rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--surface);
}

.field textarea {
  min-height: 7rem;
  resize: vertical;
}

.field .hint {
  display: block;
  font-size: 0.8rem;
  color: var(--ink-faint);
  margin-top: 0.3rem;
  font-weight: 400;
}

.two-up {
  display: grid;
  gap: 1rem;
}

@media (min-width: 620px) {
  .two-up {
    grid-template-columns: 1fr 1fr;
  }
  .two-up .field {
    margin-top: 0;
  }
}

/* The honeypot. Hidden from sight and from screen readers, since no human
   should ever be offered it. */
.trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.consent {
  margin-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--ink-faint);
}

.form-status {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.92rem;
}

.form-status.ok {
  background: #ecfdf5;
  color: #065f46;
}

.form-status.bad {
  background: #fef2f2;
  color: #991b1b;
}

.form-status[hidden] {
  display: none;
}

/* ------------------------------------------------------------------ footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0;
  font-size: 0.9rem;
  color: var(--ink-faint);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
}

.site-footer a {
  color: var(--ink-soft);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--ink);
}

.site-footer .right {
  margin-left: auto;
}

@media (max-width: 620px) {
  .site-footer .right {
    margin-left: 0;
  }
}

/* --------------------------------------------------------------- utilities */

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.badge {
  font-size: 0.82rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  background: var(--surface);
}

.note {
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}


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

/*
 * Signing in, at the top where customers look for it.
 *
 * Quieter than Register interest on purpose. Both are at the top now, and if
 * they shouted equally a visitor would have to read both to work out which one
 * is for them — the one selling and the one serving should not look alike.
 */
.nav-signin {
  font-weight: 600;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  padding: 0.4rem 0.85rem;
  text-decoration: none;
}

.nav-signin:hover {
  background: var(--mint, #f1f5f4);
}

/* Where you are, marked rather than guessed at. */
.site-nav a.here {
  color: var(--ink-deep, #0f172a);
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 0.35rem;
}

@media (max-width: 640px) {
  .wordmark {
    font-size: 1.35rem;
  }

  /* On a phone the nav wraps under the name; the two buttons stay together at
     the end of it rather than each taking a line of their own. */
  .site-nav {
    flex-wrap: wrap;
    gap: 0.5rem 0.9rem;
  }
}


/* A card that is a link should say so before it is hovered. */
a.card {
  text-decoration: none;
  display: block;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

a.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

a.card h3::after {
  content: ' →';
  color: var(--accent);
}

/* ============================================================== showcase ==
 *
 * The features page. Six things, one screen at a time.
 *
 * Everything is visible by default and the animation is added by script, so a
 * failure to run it leaves a readable page rather than a blank one. That is
 * the whole rule for decoration: it may never be load-bearing.
 */

.showcase-lead {
  padding-block: 4rem 1rem;
  max-width: 46rem;
}

.showcase {
  padding-block: 4.5rem;
}

.showcase.alt {
  background: var(--mint, #f4f8f7);
}

.showcase-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
  grid-template-columns: 1fr;
}

@media (min-width: 860px) {
  .showcase-grid {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}

.showcase-number {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--accent);
}

.showcase-copy h2 {
  margin-top: 0.6rem;
  font-size: 1.75rem;
  letter-spacing: -0.02em;
}

.showcase-copy p {
  margin-top: 0.9rem;
  color: var(--ink-soft);
}

.showcase-note {
  font-size: 0.92rem;
  border-left: 2px solid var(--accent);
  padding-left: 0.9rem;
}

.showcase-close {
  padding-block: 5rem;
  text-align: center;
  max-width: 40rem;
}

.showcase-close .btn {
  margin-top: 1.5rem;
}

/* ------------------------------------------------------------ the demos */

.demo {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.4rem;
}

.demo-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--line);
}

.live-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: var(--accent);
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

.demo-lines p {
  margin-top: 0.75rem;
  padding: 0.55rem 0.85rem;
  border-radius: 1rem;
  font-size: 0.92rem;
  max-width: 85%;
}

.from-them {
  background: #eef2f5;
}

.from-her {
  background: var(--accent);
  color: #fff;
  margin-left: auto;
}

.from-her.booked {
  font-weight: 600;
}

/* Each line lands after the one before, so it reads as a conversation
   happening rather than a screenshot of one. */
.revealed .demo-lines p {
  animation: rise 0.5s ease both;
}

.revealed .demo-lines p:nth-child(1) { animation-delay: 0.1s; }
.revealed .demo-lines p:nth-child(2) { animation-delay: 0.7s; }
.revealed .demo-lines p:nth-child(3) { animation-delay: 1.3s; }
.revealed .demo-lines p:nth-child(4) { animation-delay: 1.9s; }

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

.ledger-row {
  display: flex;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
  font-size: 0.95rem;
}

.ledger-row.muted { color: var(--ink-soft); }

.ledger-row.total {
  font-weight: 700;
  border-bottom: none;
  color: var(--accent);
}

.ledger-note {
  margin-top: 0.9rem;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.demo-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.95rem;
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--surface);
}

.revealed .chip { animation: rise 0.4s ease both; }
.revealed .chip:nth-child(2) { animation-delay: 0.08s; }
.revealed .chip:nth-child(3) { animation-delay: 0.16s; }
.revealed .chip:nth-child(4) { animation-delay: 0.24s; }
.revealed .chip:nth-child(5) { animation-delay: 0.32s; }
.revealed .chip:nth-child(6) { animation-delay: 0.4s; }

.day-slot {
  padding: 0.7rem 0.9rem;
  border-radius: 0.6rem;
  margin-bottom: 0.5rem;
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
}

.day-slot.filled { background: #eef2f5; }

.day-slot.free {
  border: 1px dashed var(--accent);
  color: var(--accent);
  font-weight: 600;
}

.demo-map {
  position: relative;
  min-height: 9rem;
  display: grid;
  place-items: center;
}

.pin {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(13, 148, 136, 0.5);
  animation: ripple 2.2s ease-out infinite;
}

.pin-label {
  position: absolute;
  transform: translateY(1.7rem);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
}

@keyframes ripple {
  to { box-shadow: 0 0 0 2.5rem rgba(13, 148, 136, 0); }
}

.demo-quote p {
  font-size: 1.4rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  text-align: center;
  padding: 1.5rem 0;
}

/* ------------------------------------------------------------ revealing */

/*
 * Added by script, never by default. A page that starts invisible and depends
 * on JavaScript to appear is a page that is sometimes blank.
 */
.will-reveal {
  opacity: 0;
  transform: translateY(18px);
}

.will-reveal.revealed {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

@media (prefers-reduced-motion: reduce) {
  .will-reveal,
  .revealed .demo-lines p,
  .revealed .chip {
    opacity: 1;
    transform: none;
    animation: none;
    transition: none;
  }

  .live-dot,
  .pin {
    animation: none;
  }
}

/* The hour that opened up, and who was waiting for it. */
.day-slot.vacated {
  border: 1px dashed #cbd5e1;
  color: var(--ink-soft);
  text-decoration: line-through;
}

.waiting {
  margin: 0.5rem 0 0.75rem;
  padding: 0.75rem 0.9rem;
  border-radius: 0.6rem;
  background: rgba(13, 148, 136, 0.07);
  border: 1px solid rgba(13, 148, 136, 0.25);
  display: grid;
  gap: 0.4rem;
}

.waiting-head {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.waiting-row {
  font-size: 0.88rem;
  color: var(--ink-soft);
}

/* It appears a beat after the cancellation, because that is the point being
   made: the gap and the answer arrive together. */
.revealed .waiting {
  animation: rise 0.5s ease both;
  animation-delay: 0.55s;
}

@media (prefers-reduced-motion: reduce) {
  .revealed .waiting {
    animation: none;
  }
}
