/* Korrl public site. Korrl-surface tokens from DESIGN.md (dark, lime). */

:root {
  --bg: #0D0F14;
  --bg-2: #13161D;
  --surface: #1B1F28;
  --surface-2: #232834;
  --line: #2A303B;
  --line-strong: #3A4150;
  --text: #F9FAFB;
  --text-2: #C9CFDA;
  --muted: #A7AEBB;
  --muted-2: #8A93A3;
  --lime: #C8FF00;
  --lime-hover: #B8EB00;
  --lime-dim: rgba(200, 255, 0, 0.12);
  --lime-text: #D6FF3D;
  --on-lime: #0D0F14;
  --attention-bg: #3A2A0F;
  --attention-text: #FFC94D;
  --sans: 'IBM Plex Sans', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'IBM Plex Mono', 'Plex Mono Fallback', Consolas, 'Courier New', monospace;
  --rail-w: 518px; /* 12 + 64 + 22 + 420: the rail's width, and the body's content column */
}

@font-face {
  font-family: 'Plex Mono Fallback';
  src: local('Consolas');
  size-adjust: 109%;
}

* { box-sizing: border-box; }

html { color-scheme: dark; background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
  overflow-wrap: break-word;
}

a { color: var(--text); text-decoration-thickness: 1px; text-underline-offset: 3px; }
strong { font-weight: 600; }
@media (hover: hover) { a:hover { color: var(--text); } }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}
a:not(.button):focus-visible { border-radius: 4px; }

.wrap {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}
.wrap.measure { max-width: 800px; }

/* Header */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 96px; /* four rows of the 24px dot grid, on every page */
  padding: 26px 0;
}

.lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 4px 0;
  margin: -4px 0;
  color: var(--text);
  text-decoration: none;
}
.lockup .mark { width: 36px; height: 36px; display: grid; place-items: center; }
.lockup .mark svg { width: 32px; height: 32px; color: var(--lime); }
.lockup .word svg { height: 26px; width: auto; display: block; color: var(--text); }

.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav a.quiet { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; margin: -7px -10px; color: var(--muted); text-decoration: none; font-weight: 500; font-size: 15px; }
@media (hover: hover) { .site-nav a.quiet:hover { color: var(--text); } }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 8px;
  background: var(--lime);
  color: var(--on-lime);
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  border: 0;
}
.button:active { background: var(--lime-hover); color: var(--on-lime); }
.button.large { min-height: 50px; padding: 12px 24px; font-size: 16px; }
.button.secondary { background: transparent; color: var(--text); border: 1px solid var(--line-strong); padding-block: 9px; }
.button.secondary:active { background: var(--surface-2); color: var(--text); }
@media (hover: hover) {
  .button:hover { background: var(--lime-hover); color: var(--on-lime); }
  .button.secondary:hover { background: var(--surface); color: var(--text); }
}

/* Hero, with the dot grid from the mark */

.hero-band {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 24px 24px;
}
.head-band {
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 24px 24px;
}
.head-band.ruled { border-bottom: 1px solid var(--line); }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  padding: 32px 0 40px 0;
  align-items: center;
}
.hero-copy { background: var(--bg); background-color: transparent;}
@media (min-width: 640px) {
  .hero { padding: 44px 0 52px 0; }
  .hero-copy, .rail { max-width: 560px; }
}
@media (min-width: 1024px) {
  .hero { grid-template-columns: 5fr 7fr; gap: 48px; padding: 56px 0 60px 0; align-items: start; }
  .hero-copy { position: sticky; top: 32px; padding-right: 24px; max-width: none; }
  .rail { max-width: 560px; margin-left: auto; }
}

h1 {
  margin: 0 0 18px 0;
  font-weight: 600;
  font-size: clamp(34px, 5.6vw, 46px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h1 .soft { color: var(--muted); }
/* Between 1024 and 1279 the copy column is about 366px wide; 46px sets one word per line */
@media (min-width: 1024px) and (max-width: 1279px) {
  h1 { font-size: 38px; }
}

.lede { margin: 0 0 26px 0; font-size: 18px; line-height: 1.45; color: var(--text-2); text-wrap: balance; }

.hero-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.hero-actions .note { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); max-width: 40ch; }
.hero-actions .note a { color: var(--text-2); padding: 6px 0; }

/* The next-job card, reproduced from the design */

.job {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.job .strip {
  display: flex;
  justify-content: space-between;
  padding: 8px 16px;
  background: var(--surface-2);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 2px solid var(--lime);
}
.job .strip > span { white-space: nowrap; }
.job .strip > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.job .strip .time { color: var(--text); flex-shrink: 0; margin-left: 12px; }
.job .body { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.job .name { font-weight: 600; font-size: 18px; line-height: 1.25; }
.job .place { font-size: 13px; color: var(--muted); }
.job .pet { display: flex; align-items: center; gap: 10px; }
.job .avatar {
  width: 36px; height: 36px; border-radius: 999px; background: var(--surface-2);
  display: grid; place-items: center; font-weight: 600; font-size: 14px; color: var(--text-2);
}
.job .pet .line1 { font-size: 15px; font-weight: 500; }
.job .pet .line2 { font-size: 13px; color: var(--muted); }
.job .note {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-radius: 8px; background: var(--bg-2);
  font-size: 13px; color: var(--text-2);
}
.job .note svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--muted); }
.chip {
  display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 6px;
  background: var(--lime-dim); color: var(--lime-text);
  font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
}

/* What it does */

.what { padding: 64px 0 48px 0; }
.what h2 {
  margin: 0 0 20px 0;
  font-weight: 600; font-size: 24px; line-height: 1.15; letter-spacing: -0.01em;
}
.rows { display: grid; gap: 0; border-top: 1px solid var(--line); }
.row {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px;
  padding: 20px 0; border-bottom: 1px solid var(--line);
}
.row h3 { margin: 0; font-weight: 600; font-size: 18px; line-height: 1.25; }
.row p { margin: 0; color: var(--text-2); max-width: 56ch; }
@media (min-width: 1024px) {
  .what, .status .wrap { display: grid; grid-template-columns: minmax(0, 1fr) var(--rail-w); gap: 48px; align-items: start; }
  .what h2 { position: sticky; top: 32px; margin: 0; }
  .status .lead { margin: 0; }
}

/* Status and interest */

.status {
  margin: 0;
  padding: 48px 0 56px 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.status .lead {
  margin: 0 0 16px 0;
  font-weight: 600; font-size: 24px; line-height: 1.15; letter-spacing: -0.01em;
  color: var(--text); max-width: 22ch;
}
.status-body { display: flex; flex-direction: column; gap: 20px; }
.status p { margin: 0; color: var(--text-2); max-width: 56ch; }
.status .actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.status .email { display: inline-flex; align-items: center; min-height: 44px; font-family: var(--mono); font-size: 15px; font-weight: 500; }

/* Footer */

.foot-band { border-top: 1px solid var(--line); padding-top: 24px; margin-top: auto; }
.site-footer {
  padding: 0 0 32px 0;
  color: var(--muted);
  font-size: 13px;
  display: flex; flex-direction: column; gap: 10px;
}
.site-footer .legal { display: flex; flex-wrap: wrap; gap: 6px 16px; }
@media (min-width: 640px) { .site-footer { flex-direction: row; justify-content: space-between; align-items: center; } }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); }
@media (hover: hover) { .site-footer a:hover { color: var(--text); } }

/* Privacy page */

.doc { padding: 12px 0 64px 0; }
.doc header { padding: 24px 0 12px 0; }
.doc h1 { font-size: clamp(30px, 5vw, 40px); margin-bottom: 8px; }
.doc .meta { color: var(--muted); font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.04em; margin: 0; }
.doc h2 {
  margin: 40px 0 12px 0;
  font-weight: 600; font-size: 24px; line-height: 1.2; letter-spacing: -0.01em;
}
.doc h3 { margin: 22px 0 8px 0; font-weight: 600; font-size: 18px; line-height: 1.25; }
.doc p, .doc li { color: var(--text-2); }
.doc p { margin: 0 0 14px 0; }
.doc p, .doc ul, .doc .summary { max-width: 56ch; }
.doc ul { padding-left: 22px; margin: 0 0 14px 0; }
.doc li { margin: 4px 0; }
.doc a:not(.button) { color: var(--lime-text); padding: 6px 0; }
.doc .summary {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 20px 22px; margin: 18px 0 8px 0;
}
.doc .summary p { margin: 0 0 8px 0; }
.doc .summary p:last-child { margin: 0; }
.doc table { width: 100%; border-collapse: collapse; margin: 10px 0 18px 0; font-size: 14px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 10px 10px 0; border-bottom: 1px solid var(--line); color: var(--text-2); }
.doc th { color: var(--text); font-weight: 600; }
.doc .table-wrap { overflow-x: auto; }
@media (max-width: 639px) {
  .doc thead { display: none; }
  .doc tr, .doc td { display: block; }
  .doc tr { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .doc td { padding: 0 0 10px 0; border: 0; }
  .doc td:last-child { padding-bottom: 0; }
  .doc td::before {
    content: attr(data-label); display: block; margin-bottom: 2px;
    font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
  }
  .doc td:first-child { font-weight: 600; color: var(--text); }
}


/* Customer-surface tokens, used only inside the rail's customer beats */

:root {
  --paper: #F7F3EC;
  --paper-2: #F1EFEA;
  --paper-rule: #DCD3C6;
  --ink: #1F1A17;
  --ink-2: #4B433D;
  --paper-muted: #6E645C;
  --green-soft: #EAF1D8;
  --green-deep: #405E00;
  --figtree: 'Figtree', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

/* The rail: one booking as six messages */

.rail {
  position: relative;
  padding: 12px 0 8px 0;
}
.beats-wrap { position: relative; }
.rail-heading {
  margin: 0 0 14px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-2);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.rail-tag {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 3px 7px;
}
.beats {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.beats::before {
  content: "";
  position: absolute;
  left: 78px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--line-strong);
}
.now-line {
  position: absolute;
  left: 77px;
  top: 0;
  width: 2px;
  height: 150px;
  background: var(--lime);
  z-index: 2;
  pointer-events: none;
}
.beat {
  position: relative;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 22px;
  padding: 10px 0 10px 12px;
}
.stamp {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-top: 8px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.3;
  color: var(--muted);
}
.stamp .time { font-size: 15px; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.beat.is-current .stamp .time { color: var(--text); }
.beat.is-current .stamp .day { color: var(--text-2); }
.beat .msg { position: relative; z-index: 1; }

/* Customer beats: the customer surface, made visible inside the dark page */

.msg-customer {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--paper-rule);
  border-radius: 12px;
  padding: 12px 14px 14px 14px;
  font-family: var(--figtree);
  font-size: 15px;
  line-height: 1.45;
  max-width: 420px;
}
.msg-customer p { margin: 0; color: var(--ink); }
.msg-from { font-size: 13px; font-weight: 600; color: var(--paper-muted); margin-bottom: 4px; }
.msg-links { display: flex; gap: 14px; margin-top: 10px; font-size: 14px; font-weight: 600; color: var(--green-deep); }
.msg-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.msg-buttons span {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--paper-rule); background: #FFFDF9;
  font-size: 14px; font-weight: 600; color: var(--ink);
}
.msg-buttons span.tapped { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
.msg-buttons svg { width: 14px; height: 14px; }
.msg-meta { margin-top: 10px; font-size: 13px; color: var(--paper-muted); }

/* The groomer beat: the one dark card */

.msg-groomer { max-width: 420px; }
.msg-caption { margin: 8px 0 0 0; font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.04em; color: var(--muted); }
.rail-foot {
  margin: 14px 0 0 98px;
  padding: 8px 0;
  background: var(--bg);
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 44ch;
}
/* A second door at the end of the rail, only where the hero copy is not sticky beside it */
.rail-cta { display: none; margin: 16px 0 0 98px; }
@media (max-width: 1023px) { .rail-cta { display: block; } }

@media (max-width: 759px) {
  .beats::before { left: 66px; }
  .now-line { left: 65px; }
  .beat { grid-template-columns: 52px minmax(0, 1fr); gap: 16px; padding-left: 10px; }
  .rail-foot, .rail-cta { margin-left: 0; }
}
/* Under 360px a side-by-side stamp leaves the cards under 190px, so the stamp sits above its card on the rail */
@media (max-width: 359px) {
  .beats::before { left: 6px; }
  .now-line { left: 5px; }
  .beat { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 10px 0 10px 20px; }
  .stamp { flex-direction: row; align-items: baseline; gap: 8px; padding-top: 0; }
}

@media (prefers-reduced-motion: no-preference) {
  .now-line { transition: transform 160ms ease-out; }
  .stamp .time { transition: color 160ms ease-out; }
}

/* Header on narrow phones: the hero button is a thumb away, so the header one steps back */

.button { white-space: nowrap; }
@media (max-width: 479px) {
  .site-nav .button { display: none; }
  .site-header { min-height: 72px; padding: 18px 0; }
}

/* Browser surfaces */

::selection { background: rgba(200, 255, 0, 0.28); color: var(--text); }
.msg-customer ::selection { background: var(--green-soft); color: var(--ink); }
html { caret-color: var(--lime); }
.msg-customer a:focus-visible { outline-color: var(--green-deep); }

/* Forced colours (Windows high contrast): keep the instrument readable when the palette is replaced */

@media (forced-colors: active) {
  .button { border: 1px solid ButtonText; }
  .now-line { background: Highlight; }
  .beats::before { background: CanvasText; }
  .chip, .rail-tag { border: 1px solid CanvasText; }
}

/* Print: the privacy policy gets printed and saved as PDF; the home page must stay legible on paper */

@media print {
  html { color-scheme: light; }
  *, *::before, *::after { background: transparent !important; color: #000 !important; box-shadow: none !important; }
  html, body { background: #fff !important; }
  .hero-band { background-image: none !important; }
  .site-nav, .now-line { display: none !important; }
  .button, .job, .job .strip, .job .note, .msg-customer, .msg-buttons span, .status, .doc .summary, .chip, .rail-tag { border: 1px solid #bbb !important; }
  .beats::before, .hero-band, .head-band, .foot-band, .row, .rows, .doc th, .doc td { border-color: #bbb !important; }
  .doc a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 12px; }
  .doc { padding-bottom: 0; }
}
