/* DeskOnDuty marketing site. One stylesheet, no external fonts or images.
   Colours are tokens; every text pair is WCAG AA (4.5:1 or better) in both themes. */

:root {
  color-scheme: light dark;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --bg: #faf7f2;
  --bg-alt: #f3ede4;
  --surface: #ffffff;
  --ink: #1b2430;
  --muted: #4d5866;
  --line: #ddd3c4;
  --accent: #b3431c;
  --accent-hover: #963615;
  --on-accent: #ffffff;
  --link: #9c3a17;
  --ok: #1d7a46;
  --focus: #1f5fbf;
  --tile: #f8e6dc;
  --tile-ink: #9c3a17;
  --bubble: #efe7db;
  --control-line: #8a7f70;
  --header-bg: rgba(250, 247, 242, 0.92);
  --shadow: 0 1px 2px rgba(27, 36, 48, 0.06), 0 12px 32px rgba(27, 36, 48, 0.08);

  --cta-bg: #1b2430;
  --cta-ink: #f7f3ec;
  --cta-muted: #c9d1db;

  --radius: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10151c;
    --bg-alt: #151c25;
    --surface: #1a222d;
    --ink: #eef1f5;
    --muted: #aab4c1;
    --line: #2b3542;
    --accent: #f0875a;
    --accent-hover: #f59f78;
    --on-accent: #1a0f0a;
    --link: #f4a27f;
    --ok: #3ecf7a;
    --focus: #8cb4ff;
    --tile: #3a241b;
    --tile-ink: #f4a27f;
    --bubble: #232d3a;
    --control-line: #6b7785;
    --header-bg: rgba(16, 21, 28, 0.92);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.35);

    --cta-bg: #1d2733;
    --cta-ink: #eef1f5;
    --cta-muted: #b9c3cf;
  }
}

/* ---- Base ---------------------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 5rem;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

img, svg { display: block; max-width: 100%; }

h1, h2, h3 { line-height: 1.15; margin: 0 0 0.75rem; letter-spacing: -0.01em; text-wrap: balance; }
h2 { font-size: clamp(1.625rem, 1.2rem + 1.6vw, 2.375rem); font-weight: 800; letter-spacing: -0.02em; }
h3 { font-size: 1.1875rem; font-weight: 700; }
p { margin: 0 0 1rem; }
ul, ol { padding: 0; margin: 0; }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

.nowrap { white-space: nowrap; }

.visually-hidden,
.skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip:focus {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--surface);
  color: var(--ink);
  border: 2px solid var(--focus);
  border-radius: 10px;
}

.wrap {
  width: 100%;
  max-width: 70rem;
  margin-inline: auto;
  padding-inline: 1rem;
}
.wrap-narrow { max-width: 46rem; }

@media (min-width: 40em) {
  .wrap { padding-inline: 1.5rem; }
}

/* ---- Buttons ------------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 1.375rem;
  border-radius: 999px;
  border: 2px solid transparent;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  min-width: 0;
  overflow-wrap: anywhere;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-quiet { border-color: var(--control-line); color: var(--ink); }
.btn-quiet:hover { background: var(--surface); }
.btn-small { min-height: 44px; padding: 0.5rem 1rem; font-size: 1rem; white-space: nowrap; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.75rem 0 1rem;
}

@media (max-width: 29.99em) {
  .actions .btn { flex: 1 1 100%; }
}

/* ---- Header -------------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
}

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .site-header {
    -webkit-backdrop-filter: saturate(1.4) blur(10px);
    backdrop-filter: saturate(1.4) blur(10px);
  }
}

.header-row {
  display: flex;
  flex-wrap: wrap;           /* at large text sizes the nav drops below the brand instead of overflowing */
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  min-height: 4rem;
  padding-block: 0.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: 0.625rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.1875rem;
  letter-spacing: -0.01em;
}
.brand img { width: 32px; height: 32px; }
.wordmark span { color: var(--link); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
}
.nav-links a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 600; }
/* Taller tap targets for text links without changing the layout. */
.nav-links a:not(.btn),
.footer-links a { display: inline-block; padding-block: 0.625rem; }
.nav-links a:not(.btn):hover { text-decoration: underline; }
.nav-optional { display: none; }

@media (min-width: 40em) {
  .nav-optional { display: block; }
}

/* 320px phones: brand + gap + button must fit on one line. */
@media (max-width: 22em) {
  .header-row { column-gap: 0.5rem; }
  .brand { gap: 0.5rem; }
  .btn-small { padding-inline: 0.875rem; }
}

/* ---- Hero ---------------------------------------------------------------------------------- */

.hero { padding-block: 2.5rem 3.5rem; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);  /* at large text sizes a long word wraps instead of widening the page */
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 60em) {
  .hero { padding-block: 4.5rem 5.5rem; }
  .hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 4rem; }
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding: 0.3rem 0.875rem 0.3rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 600;
}

.dot {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ok);
}
.dot-off { background: var(--muted); }

@media (prefers-reduced-motion: no-preference) {
  .dot:not(.dot-off) { animation: on-duty 2.4s ease-out 2; }  /* stops within 5 s (WCAG 2.2.2) */
}

@keyframes on-duty {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 55%, transparent); }
  70% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--ok) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 0%, transparent); }
}

.hero h1 {
  font-size: clamp(2.125rem, 1.35rem + 3.6vw, 3.75rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}
.h1-accent { display: block; color: var(--link); }

.lead {
  font-size: clamp(1.125rem, 1.05rem + 0.4vw, 1.3125rem);
  color: var(--muted);
  max-width: 38rem;
}

.fine { color: var(--muted); font-size: 1rem; }

/* Example conversation */

.example {
  margin: 0;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.example-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.875rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
}

.chat {
  display: grid;
  gap: 0.75rem;
  list-style: none;
}

.msg {
  max-width: 88%;
  padding: 0.75rem 1rem;
  border-radius: 18px;
  line-height: 1.45;
}
.msg-q {
  justify-self: end;
  background: var(--bubble);
  border-bottom-right-radius: 6px;
}
.msg-a {
  justify-self: start;
  background: var(--bg);
  border: 1px solid var(--line);
  border-bottom-left-radius: 6px;
}

.source {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--line);
  color: var(--link);
  font-size: 0.9375rem;
  font-weight: 600;
}

.example figcaption {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* ---- Sections ------------------------------------------------------------------------------ */

.section { padding-block: clamp(3rem, 2rem + 4vw, 5.5rem); }
.band { background: var(--bg-alt); border-block: 1px solid var(--line); }

.section-lead {
  max-width: 40rem;
  margin-bottom: 2rem;
  color: var(--muted);
  font-size: 1.125rem;
}

.card {
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.card p { margin: 0; color: var(--muted); }

/* Phones: icon beside the heading keeps the cards short. Wider screens: icon on top. */
.grid .card,
.step {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr);
  column-gap: 1rem;
  align-items: start;
  padding: 1.25rem;
}
.grid .card > h3,
.grid .card > p,
.step > h3,
.step > p { grid-column: 2; }
.grid .card > h3,
.step > h3 { margin: 0.6rem 0 0.375rem; }

@media (min-width: 40em) {
  .grid .card { display: block; padding: 1.5rem; }
  .grid .card > h3 { margin: 0 0 0.75rem; }
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 1rem;
  list-style: none;
}

@media (min-width: 60em) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
}

.icon {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-sm { width: 18px; height: 18px; flex: none; }

.icon-tile {
  display: inline-grid;
  place-items: center;
  grid-row: 1 / span 2;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 12px;
  background: var(--tile);
  color: var(--tile-ink);
}

@media (min-width: 40em) {
  .icon-tile { margin-bottom: 1rem; }
}

/* Steps */

.steps {
  display: grid;
  gap: 1rem;
  list-style: none;
  counter-reset: step;
}

@media (min-width: 52em) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
}

.step { counter-increment: step; }
.step::before {
  content: counter(step);
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 800;
}

@media (min-width: 52em) {
  .step { display: block; padding: 1.5rem; }
  .step::before { margin-bottom: 1rem; }
  .step > h3 { margin: 0 0 0.75rem; }
}

.note {
  margin: 1.5rem 0 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--accent);
  background: var(--bg-alt);
  border-radius: 0 10px 10px 0;
}

/* FAQ */

.faq { border-top: 1px solid var(--line); }

.faq details { border-bottom: 1px solid var(--line); }

.faq summary {
  position: relative;
  display: block;
  padding: 1.125rem 2.75rem 1.125rem 0;
  cursor: pointer;
  font-weight: 700;
  font-size: 1.125rem;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }

.faq summary::before,
.faq summary::after {
  content: "";
  position: absolute;
  right: 0.5rem;
  top: 50%;
  width: 14px;
  height: 0;
  margin-top: -1px;
  border-top: 2px solid var(--link);  /* a border, not a background, so it stays visible in forced-colors mode */
}
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: none; }

@media (prefers-reduced-motion: no-preference) {
  .faq summary::after { transition: transform 0.2s ease; }
}

.faq details p { color: var(--muted); padding-bottom: 0.5rem; }

/* Final call to action */

.cta {
  --accent: #f0875a;
  --accent-hover: #f59f78;
  --on-accent: #1a0f0a;
  --link: #ffb38f;
  --focus: #8cb4ff;
  background: var(--cta-bg);
  color: var(--cta-ink);
  border-top: 1px solid var(--line);
  text-align: center;
}
.cta h2 { color: var(--cta-ink); }
.cta p { font-size: 1.125rem; }
.cta .actions { justify-content: center; }
.cta .fine { color: var(--cta-muted); }

/* ---- Privacy and 404 pages ----------------------------------------------------------------- */

.prose h1 { font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem); font-weight: 800; letter-spacing: -0.02em; }
.prose h2 { font-size: 1.375rem; margin-top: 2.25rem; }
.prose ul { padding-left: 1.25rem; margin-bottom: 1rem; }
.prose li { margin-bottom: 0.5rem; }
.prose li::marker { color: var(--link); }
.updated { color: var(--muted); font-weight: 600; }

.not-found h1 { font-size: clamp(2.125rem, 1.5rem + 2.5vw, 3rem); font-weight: 800; letter-spacing: -0.02em; }

/* ---- Footer -------------------------------------------------------------------------------- */

.site-footer {
  padding-block: 2rem 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 1rem;
}

.footer-grid { display: grid; gap: 0.75rem; }
.footer-grid p { margin: 0; }
.legal { color: var(--ink); font-weight: 600; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
  list-style: none;
}
.footer-links a { overflow-wrap: anywhere; }

@media (min-width: 52em) {
  .footer-grid { grid-template-columns: 1fr auto; align-items: center; }
  .copyright { grid-column: 1 / -1; }
}
