/*
 * BlueDragonfly — the site's only stylesheet.
 *
 * Redesign of 2026-10-08, modelled on the structure and feel of
 * mikansoftware.app (same author): fixed blurred nav, a centred hero,
 * rounded cards on alternating bands, soft shadows. Colours
 * are BlueDragonfly's blues instead of Mikan's citrus.
 *
 * Fonts are self-hosted from assets/fonts/ (no Google Fonts):
 *   headings — Wilco Loft Sans (SimpleBits), LowEnd for 600/700, Midrange for 400.
 *              Chosen 2026-10-08 over Cartridge Soft, Turbeau and Vault Alarm.
 *              It is a caps-only face (weights by file: Treble < Midrange <
 *              LowEnd < Bass, with Bass also much wider), so headings are
 *              tracked out a little and the small ones sized down.
 *   body     — Atkinson Hyperlegible Next, Regular/Italic 400, SemiBold 600, Bold 700
 *
 * Button blue is #1D62C4: white on it measures 5.8:1 (WCAG AA needs 4.5:1).
 * The brighter sky blue from the mark's wings (#5CC8F0) fails with white text,
 * so it is used only for glows and accents, never as a button fill.
 */

/* ---------- fonts ---------- */
@font-face { font-family: "Wilco Loft Sans"; src: url("../assets/fonts/WilcoLoftSans-LowEnd.woff2?v=ade0a58056") format("woff2"); font-weight: 600 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Wilco Loft Sans"; src: url("../assets/fonts/WilcoLoftSans-Midrange.woff2?v=909aaba50c") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible Next"; src: url("../assets/fonts/AtkinsonHyperlegibleNext-Regular.woff2?v=fcd76a238b") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible Next"; src: url("../assets/fonts/AtkinsonHyperlegibleNext-RegularItalic.woff2?v=4c126e3d64") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible Next"; src: url("../assets/fonts/AtkinsonHyperlegibleNext-SemiBold.woff2?v=d923b5c09e") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible Next"; src: url("../assets/fonts/AtkinsonHyperlegibleNext-Bold.woff2?v=6e8ee71a6e") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

/* ---------- tokens ---------- */
:root {
  --font-head: "Wilco Loft Sans", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Light is the default; the prefers-color-scheme block below switches to
     dark. The site was dark-only for part of 2026-10-08 (commit b9918ab);
     Scott asked for the auto toggle back the same day once the refined mark
     read well on light. */
  --bg: #F4F8FD;
  --hero-top: #F7FAFE;
  --hero-bottom: #DCE9F8;
  --surface: #FFFFFF;
  --surface-2: #EAF2FB;
  --border: #D3E1F0;
  --border-strong: #B5CAE2;
  --text: #0E1B2E;
  --text-muted: #3F5470;
  --text-soft: #64788F;
  --accent: #1D62C4;          /* buttons */
  --accent-hover: #164E9E;
  --on-accent: #FFFFFF;
  --accent-text: #1857B0;     /* links, taglines on light surfaces */
  --sky: #5CC8F0;             /* the wings */
  --glow: rgba(92, 200, 240, 0.35);
  --nav-bg: rgba(244, 248, 253, 0.82);
  --shadow: 0 10px 30px -12px rgba(20, 70, 140, 0.28);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0A1020;
    --hero-top: #0E1730;
    --hero-bottom: #0A1020;
    --surface: #111B31;
    --surface-2: #16223C;
    --border: #22304D;
    --border-strong: #34466A;
    --text: #E9EEF7;
    --text-muted: #B7C2D4;
    --text-soft: #8A9AB3;
    --accent: #63B8F5;
    --accent-hover: #8ACBF8;
    --on-accent: #06111F;
    --accent-text: #7CC4F7;
    --glow: rgba(92, 200, 240, 0.22);
    --nav-bg: rgba(10, 16, 32, 0.82);
    --shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--font-head); margin: 0; line-height: 1.1; letter-spacing: 0.02em; text-transform: uppercase; }
h1, h2 { font-weight: 700; }
h3 { font-weight: 600; }
p, ul, ol { margin: 0; }
a { color: inherit; }
a.link { color: var(--accent-text); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a.link:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent); color: var(--on-accent); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------- layout ---------- */
.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1.5rem; }
.wrap-narrow { max-width: 48rem; margin: 0 auto; padding: 0 1.5rem; }
@media (max-width: 480px) { .wrap, .wrap-narrow { padding: 0 1rem; } }

.section { padding: 5rem 0; }
.band { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.center { text-align: center; }

.section-title { font-size: clamp(2rem, 4vw, 2.6rem); }
.section-lede { margin: 1rem auto 0; max-width: 38rem; color: var(--text-muted); font-size: 1.15rem; }
.center .section-lede { text-align: center; }

/* ---------- nav ---------- */
.site-nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
/* `>` keeps this height off the mobile menu's .wrap, which is also inside .site-nav. */
.site-nav > .wrap { display: flex; align-items: center; justify-content: space-between; height: 4rem; gap: 1rem; }
.brand { display: flex; align-items: center; gap: 0.3rem; text-decoration: none; font-family: var(--font-head); font-weight: 700; font-size: 1.4rem; letter-spacing: 0.02em; white-space: nowrap; }
/* The mark is centred in its box, but its visual weight (the dark body) sits
   low-left, and the wordmark's weight sits above the line-box midpoint (cap
   height up top, only g/y below). Nudged up so it reads level (Scott, 2026-10-08). */
.brand img { width: 2.25rem; height: 2.25rem; position: relative; top: -0.35rem; }
.brand .blue { color: var(--accent-text); }
.nav-links { display: flex; align-items: center; gap: 1.75rem; }
.nav-links a:not(.btn) { text-decoration: none; font-weight: 600; font-size: 0.95rem; color: var(--text-muted); }
.nav-links a:not(.btn):hover { color: var(--text); }
.nav-toggle { display: none; background: none; border: 0; padding: 0.5rem; color: var(--text-muted); cursor: pointer; }
.nav-toggle svg { width: 1.5rem; height: 1.5rem; }
/* Phone menu: a card hanging under the menu button, not a full-width panel
   (Scott asked 2026-10-08). Right edge lines up with the button's padding. */
.mobile-menu {
  display: none; position: absolute; top: calc(4rem + 0.5rem); right: 1.5rem;
  min-width: 12rem; width: max-content; max-width: calc(100vw - 3rem);
  background: var(--surface); border: 1px solid var(--border); border-radius: 1rem;
  box-shadow: var(--shadow);
}
@media (max-width: 480px) { .mobile-menu { right: 1rem; max-width: calc(100vw - 2rem); } }
.mobile-menu .wrap { display: flex; flex-direction: column; align-items: flex-end; text-align: right; gap: 0.25rem; padding: 0.75rem 1.25rem; }
.mobile-menu a:not(.btn) { display: block; padding: 0.45rem 0; text-decoration: none; font-weight: 600; font-size: 1.05rem; color: var(--text-muted); }
.mobile-menu a:not(.btn):hover { color: var(--text); }
.mobile-menu.open { display: block; }
@media (max-width: 767px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
}
@media (min-width: 768px) { .mobile-menu.open { display: none; } }

/* ---------- buttons & badges ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.75rem 1.4rem; border-radius: 0.75rem;
  font-family: var(--font-body); font-weight: 600; font-size: 1rem; line-height: 1.2;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s, box-shadow .2s, transform .15s;
}
.btn-sm { padding: 0.55rem 1.05rem; font-size: 0.92rem; border-radius: 0.65rem; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); box-shadow: 0 0 0 5px var(--glow); }
.btn-secondary { border-color: var(--border-strong); color: var(--text); background: transparent; }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent-text); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.center .btn-row { justify-content: center; }

.badge { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.3rem 0.85rem; border-radius: 999px; font-size: 0.82rem; font-weight: 700; white-space: nowrap; background: var(--surface-2); color: var(--accent-text); border: 1px solid var(--border); }
.badge .dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--sky); box-shadow: 0 0 8px var(--sky); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .badge .dot { animation: none; } }

/* ---------- hero ---------- */
/* No hero mark: the dragonfly lives in the nav and the founder note only
   (Scott dropped the big one 2026-10-08). The glow sits behind the headline. */
.hero { padding: 8.5rem 0 5rem; background: linear-gradient(var(--hero-top), var(--hero-bottom)); position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; left: 50%; top: 2rem; width: 40rem; height: 22rem; transform: translateX(-50%); background: radial-gradient(closest-side, var(--glow), transparent); pointer-events: none; }
.hero .wrap { position: relative; }
.hero .badge { margin-top: 0; }
.hero h1 { margin-top: 1.25rem; font-size: clamp(2.2rem, 6.4vw, 4.2rem); line-height: 1.02; } /* floor lowered 2026-10-08 so "AI WORKFLOWS AND" stays on one line on phones */
.hero h1 .blue { color: var(--accent-text); }
.hero .lede { margin: 1.5rem auto 0; max-width: 40rem; font-size: clamp(1.1rem, 2.2vw, 1.3rem); color: var(--text-muted); }
.hero .btn-row { margin-top: 2.5rem; }

/* ---------- cards ---------- */
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; margin-top: 3.5rem; }
.grid-3 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; margin-top: 3.5rem; }
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}
.card { background: var(--bg); border: 1px solid var(--border); border-radius: 1.1rem; padding: 2rem; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.section:not(.band) .card { background: var(--surface); }
.card h3 { font-size: 1.25rem; }
.card p { margin-top: 0.75rem; color: var(--text-muted); }
.card .grow { flex-grow: 1; }
.card .btn-row { margin-top: 1.5rem; }
/* Service cards: heading only, no icon tile (Scott cut the sparkle/refresh
   tiles 2026-10-08). */
#services .card h3 { font-size: 1.4rem; }

/* ---------- check list ---------- */
.checklist { list-style: none; padding: 0; margin-top: 1.25rem; display: grid; grid-template-columns: 1fr; gap: 0.5rem; color: var(--text-muted); }
.checklist li { display: flex; gap: 0.6rem; }
.checklist li::before { content: "✓"; color: var(--accent-text); font-weight: 700; }

/* ---------- numbered steps ---------- */
.steps { list-style: none; padding: 0; margin-top: 3.5rem; counter-reset: step; display: grid; gap: 2rem 2.5rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(2, 1fr); } }
.steps li { counter-increment: step; position: relative; padding-left: 3.75rem; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: -0.1rem;
  width: 2.5rem; height: 2.5rem; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--on-accent); font-family: var(--font-head); font-weight: 700; font-size: 1.1rem;
}
.steps h3 { font-size: 1.2rem; }
.steps p { margin-top: 0.4rem; color: var(--text-muted); }

/* ---------- callout (the note up front) ---------- */
.callout { margin: 3.5rem auto 0; max-width: 48rem; background: var(--bg); border: 1px solid var(--border); border-radius: 1.1rem; padding: 2.25rem; }
.band .callout { background: var(--bg); }
.section:not(.band) .callout { background: var(--surface); }
.callout h3 { font-size: 1.45rem; }
.callout p { margin-top: 1rem; color: var(--text-muted); }
.callout .small { font-size: 0.95rem; color: var(--text-soft); }
.callout .btn-row { margin-top: 1.5rem; }
.quote { margin: 0; font-size: 1.2rem; line-height: 1.55; color: var(--text); }
.quote p::before { content: "\201C"; } .quote p::after { content: "\201D"; }
.quote footer { margin-top: 1.25rem; display: flex; align-items: center; gap: 0.75rem; font-size: 0.95rem; color: var(--text-soft); }
.quote footer strong { color: var(--text); font-weight: 600; }
.quote footer img { width: 2.25rem; height: 2.25rem; }
.commit { text-align: center; align-items: center; }
.commit .big { font-family: var(--font-head); font-weight: 700; font-size: 1.5rem; color: var(--accent-text); margin-top: 0.75rem; }
.commit p { font-size: 0.98rem; }

/* ---------- contact form ---------- */
.contact-card { margin: 3.5rem auto 0; max-width: 40rem; background: var(--surface); border: 1px solid var(--border); border-radius: 1.1rem; padding: 2.25rem; box-shadow: var(--shadow); }
.band .contact-card { background: var(--bg); }
.contact-form { display: flex; flex-direction: column; gap: 1.1rem; position: relative; }
.contact-form .field { display: flex; flex-direction: column; gap: 0.4rem; }
.contact-form .field span { font-weight: 600; font-size: 0.95rem; color: var(--text-muted); }
.contact-form input,
.contact-form textarea {
  font: inherit; color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: 0.75rem;
  padding: 0.75rem 0.9rem; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--glow); }
.contact-form textarea { resize: vertical; min-height: 7.5rem; }
.contact-form ::placeholder { color: var(--text-soft); }
.contact-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.form-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 0.25rem; }
.form-status { font-size: 0.95rem; color: var(--text-soft); min-height: 1.2em; }
.form-status.ok { color: var(--accent-text); }
.form-status.err { color: #C0392B; }
@media (prefers-color-scheme: dark) { .form-status.err { color: #FF8A7A; } }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { transition: none; opacity: 1; transform: none; } }

/* ---------- footer ---------- */
.site-footer { padding: 2.5rem 0; background: var(--surface); border-top: 1px solid var(--border); font-size: 0.92rem; color: var(--text-soft); }
.site-footer .wrap { display: flex; flex-direction: column; align-items: center; gap: 1rem; text-align: center; }
@media (min-width: 640px) { .site-footer .wrap { flex-direction: row; justify-content: space-between; text-align: left; } }
.site-footer nav { display: flex; gap: 1.5rem; flex-wrap: wrap; justify-content: center; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--text); }
