/* Byrd-IT, LLC
   Brand: high-contrast serif wordmark in black, hummingbird mark in blue.
   Type pairs a Didone-style display serif with a plain system sans for reading. */

:root {
  color-scheme: light dark;

  --brand:        #0760dd;
  --brand-deep:   #0b4aa2;
  --ink:          #14161a;
  --ink-soft:     #4c525c;
  --bg:           #ffffff;
  --bg-alt:       #f5f6f8;
  --line:         #e2e5ea;
  --focus:        #1268e3;
  --urgent:       #b3261e;

  --serif: "Playfair Display", "Didot", "Bodoni MT", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --measure: 34rem;
  --wide: 68rem;
  --step: clamp(1rem, 0.6rem + 1.4vw, 1.5rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand:      #6ba5f7;
    --brand-deep: #9cc4fa;
    --ink:        #eceef2;
    --ink-soft:   #a8aeb9;
    --bg:         #101216;
    --bg-alt:     #191c22;
    --line:       #2b303a;
    --urgent:     #f2837b;
  }
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 1.0625rem/1.65 var(--sans);
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 1.3rem + 3vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.125rem); margin-top: 2.5rem; }
h3 { font-size: 1.1875rem; margin-top: 1.75rem; font-family: var(--sans); font-weight: 650; }

p, li { max-width: var(--measure); }
p { margin: 0 0 1.1rem; }

a { color: var(--brand); text-underline-offset: 0.15em; }
a:hover { color: var(--brand-deep); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 3px; }

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

.wrap { width: min(100% - 2.5rem, var(--wide)); margin-inline: auto; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--bg); color: var(--ink); padding: 0.75rem 1rem;
  border: 2px solid var(--brand);
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

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

.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.site-header .wrap {
  display: flex; align-items: center; gap: 1.5rem;
  padding: 0.9rem 0; flex-wrap: wrap;
}

.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { height: 2rem; width: auto; max-width: min(15rem, 55vw); }
@media (max-width: 30rem) { .brand img { height: 1.6rem; } }

.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: 1.25rem; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.site-nav a { color: var(--ink-soft); text-decoration: none; font-size: 0.9375rem; padding: 0.25rem 0; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--brand); }
.site-nav a[aria-current="page"] { border-bottom: 2px solid var(--brand); }

.header-cta {
  background: var(--brand); color: #fff; text-decoration: none;
  padding: 0.5rem 0.95rem; border-radius: 6px; font-weight: 600; font-size: 0.9375rem;
  white-space: nowrap;
}
.header-cta:hover { background: var(--brand-deep); color: #fff; }
@media (prefers-color-scheme: dark) { .header-cta, .header-cta:hover { color: #10131a; } }

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

.hero { padding: clamp(2.5rem, 1rem + 6vw, 5rem) 0 clamp(2rem, 1rem + 4vw, 3.5rem); border-bottom: 1px solid var(--line); }
.hero p.lede { font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem); color: var(--ink-soft); max-width: 40rem; }
.hero .license { font-size: 0.875rem; color: var(--ink-soft); margin-top: 1.5rem; }

.actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin: 1.75rem 0 0; }
.btn {
  display: inline-block; padding: 0.7rem 1.25rem; border-radius: 6px;
  text-decoration: none; font-weight: 600; border: 2px solid var(--brand);
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-deep); border-color: var(--brand-deep); color: #fff; }
.btn-secondary { color: var(--brand); background: transparent; }
.btn-secondary:hover { background: var(--bg-alt); }
@media (prefers-color-scheme: dark) { .btn-primary, .btn-primary:hover { color: #10131a; } }

/* ---------- Sections and cards ---------- */

section { padding: clamp(2rem, 1rem + 4vw, 3.5rem) 0; }
section.alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
section > .wrap > h2:first-child { margin-top: 0; }

.grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); margin-top: 1.75rem; }
.grid p, .grid li { max-width: none; }

.card {
  border: 1px solid var(--line); border-radius: 10px; padding: 1.4rem;
  background: var(--bg); display: flex; flex-direction: column;
}
.card h3 { margin-top: 0; font-family: var(--serif); font-size: 1.25rem; font-weight: 700; }
.card p { color: var(--ink-soft); flex: 1; margin-bottom: 1rem; }
.card a { font-weight: 600; text-decoration: none; }
.card a::after { content: " \2192"; }
.card a:hover { text-decoration: underline; }

.checklist { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.checklist li { padding: 0.9rem 0; border-bottom: 1px solid var(--line); max-width: 42rem; }
.checklist li:last-child { border-bottom: 0; }
.checklist strong { display: block; font-size: 1rem; }
.checklist span { color: var(--ink-soft); }

.note {
  border-left: 4px solid var(--brand); background: var(--bg-alt);
  padding: 1rem 1.25rem; border-radius: 0 8px 8px 0; margin: 1.75rem 0;
  max-width: 42rem;
}
.note p:last-child { margin-bottom: 0; }

.area-list { columns: 2; column-gap: 2rem; list-style: none; padding: 0; max-width: 26rem; }
.area-list li { padding: 0.2rem 0; break-inside: avoid; }

/* ---------- Contact ---------- */

.contact-grid { display: grid; gap: 2.5rem; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); align-items: start; }
.contact-grid p, .contact-grid li { max-width: none; }

.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; margin-bottom: 0.3rem; font-size: 0.9375rem; }
.field input, .field select, .field textarea {
  font: inherit; width: 100%; padding: 0.6rem 0.7rem;
  border: 1px solid var(--line); border-radius: 6px;
  background: var(--bg); color: var(--ink);
}
.field textarea { min-height: 8rem; resize: vertical; }
.field .hint { font-size: 0.8125rem; color: var(--ink-soft); margin: 0.3rem 0 0; }

/* Consent checkbox. The form's inputs are full-width by default, which stretches a
   checkbox into a stray box above its own label, so this opts out of that. */
.field.consent { margin-top: 1.5rem; }
.field.consent label {
  display: flex; align-items: center; gap: 0.55rem;
  font-weight: 600; margin-bottom: 0.4rem; cursor: pointer;
}
.field.consent input[type="checkbox"] {
  width: 1.1rem; height: 1.1rem; flex: none; margin: 0;
  accent-color: var(--brand);
}
.field.consent .hint { max-width: 34rem; }

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

.site-footer { border-top: 1px solid var(--line); background: var(--bg-alt); padding: 2.5rem 0 3rem; margin-top: 2rem; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.footer-grid h2 { font-family: var(--sans); font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); margin: 0 0 0.7rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { padding: 0.2rem 0; }
.footer-grid a { color: var(--ink); text-decoration: none; }
.footer-grid a:hover { color: var(--brand); text-decoration: underline; }
.footer-bottom { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--line); font-size: 0.875rem; color: var(--ink-soft); }
.footer-bottom p { max-width: none; margin: 0.2rem 0; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 0.6rem !important; }
.footer-legal a { color: var(--ink-soft); text-decoration: underline; }
.footer-legal a:hover { color: var(--brand); }

/* ---------- Chat widget ---------- */

#chat-launcher {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 60;
  background: var(--brand); color: #fff; border: 0; border-radius: 999px;
  padding: 0.85rem 1.35rem; font: 600 1rem var(--sans); cursor: pointer;
  box-shadow: 0 4px 16px rgb(0 0 0 / 0.22);
}
#chat-launcher:hover { background: var(--brand-deep); }
@media (prefers-color-scheme: dark) { #chat-launcher { color: #10131a; } }

#chat-panel {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 61;
  width: min(23rem, calc(100vw - 2.5rem));
  height: min(32rem, calc(100vh - 2.5rem));
  display: flex; flex-direction: column;
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 8px 32px rgb(0 0 0 / 0.24); overflow: hidden;
}

#chat-panel header {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 0.9rem; border-bottom: 1px solid var(--line); background: var(--bg-alt);
}
#chat-panel header h2 { margin: 0; font-family: var(--sans); font-size: 0.9375rem; font-weight: 650; }
#chat-close { margin-left: auto; background: none; border: 0; font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--ink-soft); padding: 0 0.25rem; }
#chat-close:hover { color: var(--ink); }

#chat-log { flex: 1; overflow-y: auto; padding: 0.9rem; display: flex; flex-direction: column; gap: 0.7rem; }
#chat-log p { max-width: 85%; margin: 0; padding: 0.6rem 0.8rem; border-radius: 12px; font-size: 0.9375rem; white-space: pre-wrap; }
#chat-log .from-bot { background: var(--bg-alt); border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 3px; }
#chat-log .from-you { background: var(--brand); color: #fff; align-self: flex-end; border-bottom-right-radius: 3px; }
@media (prefers-color-scheme: dark) { #chat-log .from-you { color: #10131a; } }
#chat-log .status { align-self: flex-start; color: var(--ink-soft); font-style: italic; background: none; border: 0; padding-left: 0.2rem; }

#chat-form { display: flex; gap: 0.5rem; padding: 0.7rem; border-top: 1px solid var(--line); }
#chat-input { flex: 1; font: inherit; font-size: 0.9375rem; padding: 0.55rem 0.7rem; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); }
#chat-form button { background: var(--brand); color: #fff; border: 0; border-radius: 8px; padding: 0 1rem; font: 600 0.9375rem var(--sans); cursor: pointer; }
#chat-form button:disabled { opacity: 0.55; cursor: default; }
@media (prefers-color-scheme: dark) { #chat-form button { color: #10131a; } }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@media print {
  .site-nav, #chat-launcher, #chat-panel, .actions { display: none; }
}

/* A note's heading is an h2 for correct document outline, but it sits inside a
   callout and should not compete with the section headings around it. */
.note h2 {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 650;
  margin: 0 0 0.5rem;
}
