/* heyfairley.com -- clean, modern, tech feel. One green accent. */
:root {
  --bg: #ffffff;
  --bg-soft: #f6f8f7;
  --panel: #ffffff;
  --ink: #0d1512;
  --muted: #5b6863;
  --rule: #e3e8e6;
  --accent: #0e9f6e;
  --accent-ink: #ffffff;
  --accent-soft: #e6f6ef;
  --glow: rgba(14, 159, 110, 0.18);
  --bubble-them: #eef1f0;
  --bubble-me: #0e9f6e;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0f0d; --bg-soft: #0f1613; --panel: #121a17; --ink: #e8efec; --muted: #93a29c;
    --rule: #1f2a26; --accent: #2bd19a; --accent-ink: #04130d; --accent-soft: #10271f;
    --glow: rgba(43, 209, 154, 0.16); --bubble-them: #1a2420; --bubble-me: #1f9e73; color-scheme: dark;
  }
}
:root[data-theme="dark"], .dark {
  --bg: #0a0f0d; --bg-soft: #0f1613; --panel: #121a17; --ink: #e8efec; --muted: #93a29c;
  --rule: #1f2a26; --accent: #2bd19a; --accent-ink: #04130d; --accent-soft: #10271f;
  --glow: rgba(43, 209, 154, 0.16); --bubble-them: #1a2420; --bubble-me: #1f9e73; color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 var(--sans); }
a { color: var(--accent); }
img { max-width: 100%; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }

/* header */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--rule); }
.top .wrap { display: flex; align-items: center; gap: 24px; height: 60px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.1rem; color: var(--ink); text-decoration: none; }
.logo .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--glow); }
.nav { display: flex; gap: 20px; margin-left: auto; align-items: center; }
.nav a { color: var(--muted); text-decoration: none; font-size: .95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--rule); color: var(--ink);
  border-radius: 8px; padding: 6px 10px; font: inherit; }
@media (max-width: 760px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; top: 60px; left: 0; right: 0; flex-direction: column; align-items: flex-start;
    background: var(--bg); border-bottom: 1px solid var(--rule); padding: 12px 16px 16px; gap: 12px; }
  .nav.open { display: flex; }
}

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; border-radius: 10px; padding: 11px 18px; font: 600 .98rem var(--sans);
  text-decoration: none; border: 1px solid var(--rule); background: var(--panel); color: var(--ink); cursor: pointer; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); box-shadow: 0 6px 24px var(--glow); }
.btn.primary:hover { filter: brightness(1.05); }
.btn.small { padding: 7px 12px; font-size: .88rem; }

/* hero */
.hero { position: relative; overflow: hidden; padding: 80px 0 64px; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(var(--rule) 1px, transparent 1px), linear-gradient(90deg, var(--rule) 1px, transparent 1px);
  background-size: 40px 40px; mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 75%); opacity: .6; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; } }
.eyebrow { font: 600 .78rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); line-height: 1.08; letter-spacing: -.02em; margin: 12px 0 16px; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -.01em; line-height: 1.15; margin: 0 0 12px; }
h3 { font-size: 1.1rem; margin: 0 0 6px; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 34em; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

section { padding: 64px 0; }
section.soft { background: var(--bg-soft); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 860px) { .grid3 { grid-template-columns: 1fr; } }
.card { background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius); padding: 22px; }
.card .icon { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft);
  color: var(--accent); margin-bottom: 12px; }
.card p { margin: 0; color: var(--muted); }

/* the live-looking console used on Home */
.console { background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius);
  box-shadow: 0 20px 60px -20px var(--glow); overflow: hidden; }
.console .bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--rule);
  font: .78rem var(--mono); color: var(--muted); }
.console .bar .live { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 1.6s infinite; }
.console .body { padding: 16px; min-height: 300px; display: flex; flex-direction: column; gap: 10px; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

/* chat bubbles (shared by every demo) */
.thread { display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 82%; padding: 9px 13px; border-radius: 16px; font-size: .95rem; line-height: 1.45; white-space: pre-wrap;
  overflow-wrap: anywhere; animation: rise .25s ease-out; }
.msg.them { align-self: flex-start; background: var(--bubble-them); border-bottom-left-radius: 5px; }
.msg.me { align-self: flex-end; background: var(--bubble-me); color: #fff; border-bottom-right-radius: 5px; }
.msg.note { align-self: center; background: none; color: var(--muted); font: .75rem var(--mono); padding: 2px; }
.msg .who { display: block; font: 600 .7rem var(--mono); color: var(--muted); margin-bottom: 2px; text-transform: uppercase; letter-spacing: .05em; }
.msg.me .who { color: rgba(255,255,255,.75); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.typing { align-self: flex-start; display: inline-flex; gap: 4px; padding: 12px 14px; border-radius: 16px; background: var(--bubble-them); }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: bounce 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
.cursor::after { content: "▍"; color: var(--accent); animation: blink 1s steps(1) infinite; margin-left: 1px; }
@keyframes blink { 50% { opacity: 0; } }
.status-line { font: .75rem var(--mono); color: var(--muted); display: flex; align-items: center; gap: 6px; }
.status-line .spin { width: 10px; height: 10px; border: 2px solid var(--rule); border-top-color: var(--accent); border-radius: 50%;
  animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* steps (How it works) */
.steps { counter-reset: s; display: grid; gap: 16px; }
.step { display: grid; grid-template-columns: 48px 1fr; gap: 16px; align-items: start; }
.step::before { counter-increment: s; content: counter(s, decimal-leading-zero); font: 600 .9rem var(--mono); color: var(--accent);
  border: 1px solid var(--rule); border-radius: 10px; height: 48px; display: grid; place-items: center; background: var(--panel); }
.step p { margin: 0; color: var(--muted); }

/* simple page */
.page { max-width: 760px; padding: 56px 16px 80px; margin: 0 auto; }
.page h2 { font-size: 1.2rem; margin-top: 2em; padding-top: 1em; border-top: 1px solid var(--rule); }
.page p, .page li { color: var(--ink); }
form.contact { display: grid; gap: 14px; margin-top: 24px; }
form.contact label { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; }
input, textarea, select { font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--rule);
  border-radius: 10px; padding: 10px 12px; width: 100%; }
input:focus, textarea:focus { outline: 2px solid var(--glow); border-color: var(--accent); }

footer.foot { border-top: 1px solid var(--rule); padding: 32px 0; color: var(--muted); font-size: .88rem; }
footer.foot .wrap { display: flex; gap: 24px; flex-wrap: wrap; justify-content: space-between; }
footer.foot a { color: var(--muted); }
.badge { display: inline-block; font: 600 .7rem var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--accent);
  background: var(--accent-soft); border-radius: 999px; padding: 3px 9px; }

/* ---- dark parts on a light page (the home page intro, the closing band, the header above the intro) ---- */
section.dark { background: var(--bg); color: var(--ink); }
.btn:focus-visible, [role=tab]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
section.tight { padding: 56px 0; }

/* the intro: the GM's questions, then "Meet Fairley." */
.hero.intro { isolation: isolate; padding: 64px 0 72px;
  background: radial-gradient(60% 55% at 78% 40%, var(--glow), transparent 70%), var(--bg); }
.asks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: clamp(1.05rem, 2.2vw, 1.3rem); color: var(--muted); }
.asks li::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  margin-right: 12px; vertical-align: middle; box-shadow: 0 0 10px var(--accent); }
.meet { font-size: clamp(2.8rem, 8vw, 5rem); margin: 22px 0 14px; }
.meet span { color: var(--accent); text-shadow: 0 0 28px rgba(43, 209, 154, .55), 0 0 80px rgba(43, 209, 154, .3); }
.tagline { font-size: clamp(1.25rem, 2.6vw, 1.6rem); font-weight: 700; line-height: 1.25; margin: 0 0 10px; color: var(--ink); }
.does { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.does li { font: 600 .82rem var(--sans); color: var(--accent); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: 999px; padding: 5px 12px; }
/* the intro plays in two speeds: the questions come in slowly, one at a time, then the reveal lands fast */
@media (prefers-reduced-motion: no-preference) {
  .asks li { color: var(--ink); opacity: 0; animation: ask .9s ease-out forwards, askdim .4s ease-out 3.5s forwards; }
  .asks li:nth-child(1) { animation-delay: .3s, 3.5s; } .asks li:nth-child(2) { animation-delay: 1.3s, 3.5s; } .asks li:nth-child(3) { animation-delay: 2.3s, 3.5s; }
  .meet { opacity: 0; transform-origin: left center; animation: slam .45s cubic-bezier(.2, 1.4, .4, 1) 3.7s forwards; }
  .meet span { animation: flash 1.4s ease-out 3.7s backwards; }
  .intro::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0;
    background: radial-gradient(45% 60% at 25% 50%, rgba(43, 209, 154, .45), transparent 70%); animation: burst 1s ease-out 3.7s; }
  .intro .tagline, .intro .lede, .intro .cta { opacity: 0; animation: arrive .3s ease-out forwards; }
  .intro .tagline { animation-delay: 4s; } .intro .lede { animation-delay: 4.75s; } .intro .cta { animation-delay: 4.85s; }
  /* what she does pops in one after another, fast */
  .does li { opacity: 0; animation: pop .28s cubic-bezier(.2, 1.6, .4, 1) forwards; }
  .does li:nth-child(1) { animation-delay: 4.15s; } .does li:nth-child(2) { animation-delay: 4.27s; } .does li:nth-child(3) { animation-delay: 4.39s; }
  .does li:nth-child(4) { animation-delay: 4.51s; } .does li:nth-child(5) { animation-delay: 4.63s; }
  .intro .glimpse { opacity: 0; animation: slide .4s cubic-bezier(.2, 1.2, .4, 1) 4.05s forwards; }
}
@keyframes pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@keyframes ask { from { opacity: 0; transform: translateY(8px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes askdim { from { opacity: 1; } to { opacity: .5; } }
@keyframes slam { 0% { opacity: 0; transform: scale(1.4); filter: blur(14px); } 100% { opacity: 1; transform: none; filter: none; } }
@keyframes flash { 0% { color: #fff; text-shadow: 0 0 40px #fff, 0 0 120px rgba(43, 209, 154, 1); } }
@keyframes burst { 0% { opacity: 0; } 20% { opacity: 1; } 100% { opacity: 0; } }
@keyframes slide { from { opacity: 0; transform: translateX(40px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes arrive { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* the glimpses of Fairley at work */
.glimpse { box-shadow: 0 0 0 1px var(--rule), 0 30px 90px -20px rgba(43, 209, 154, .35); }
.glimpse .bar { flex-wrap: wrap; }
.g-tabs { margin-left: auto; display: flex; gap: 4px; }
.g-tabs button, .case-tabs button { font: 600 .8rem var(--sans); color: var(--muted); background: none; border: 1px solid var(--rule);
  border-radius: 999px; padding: 5px 12px; cursor: pointer; }
.g-tabs button[aria-selected="true"] { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.g-head { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--rule); font-size: .92rem; min-height: 44px; }
.g-head .mono { margin-left: auto; font-size: .7rem; }
.g-head .dot, .g-head .ring { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); animation: pulse 1.6s infinite; }
.glimpse .body { height: 352px; min-height: 0; overflow-y: auto; display: block; }
.g-foot { display: flex; align-items: center; justify-content: center; height: 40px; border-top: 1px solid var(--rule);
  font-size: .72rem; color: var(--muted); }
.g-wave { display: flex; gap: 4px; height: 26px; align-items: center; opacity: .3; }
.g-wave i { width: 4px; height: 6px; border-radius: 2px; background: var(--accent); }
.g-wave.on { opacity: 1; }
.g-wave.on i { animation: gwave .9s ease-in-out infinite; }
.g-wave.on i:nth-child(2n) { animation-delay: .15s; } .g-wave.on i:nth-child(3n) { animation-delay: .3s; }
@keyframes gwave { 0%, 100% { height: 6px; } 50% { height: 24px; } }

/* the tee sheet glimpse: times fill by themselves */
.g-tabs { flex-wrap: wrap; justify-content: flex-end; }
.ts { display: grid; gap: 5px; }
.ts-row { display: grid; grid-template-columns: 64px 1fr auto; gap: 10px; align-items: center; padding: 5px 10px; border: 1px solid var(--rule);
  border-radius: 8px; font-size: .86rem; background: var(--bubble-them); }
.ts-row .mono { font-size: .76rem; color: var(--muted); }
.ts-row .ts-who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-row .ts-tag { font: 600 .68rem var(--mono); text-transform: uppercase; letter-spacing: .04em; color: var(--accent); }
.ts-row.open { background: none; border-style: dashed; }
.ts-row.open .ts-who { color: var(--muted); }
.ts-row.new { border-color: var(--accent); animation: filled .9s ease-out; }
.ts-row.rel { border-color: #e0a100; } .ts-row.rel .ts-tag { color: #e0a100; }
@keyframes filled { 0% { background: var(--accent); box-shadow: 0 0 24px var(--accent); transform: scale(1.02); } 100% { background: var(--bubble-them); box-shadow: none; transform: none; } }
.g-meter { width: calc(100% - 32px); height: 6px; border-radius: 3px; background: var(--rule); overflow: hidden; }
.g-meter i { display: block; height: 100%; width: 0; background: var(--accent); box-shadow: 0 0 12px var(--accent); transition: width .6s ease-out; }

/* the three-part message */
.three { margin-top: 24px; }
.three .num { color: var(--accent); font-weight: 600; font-size: .85rem; margin-bottom: 8px; }
.three .card { transition: transform .2s, border-color .2s, box-shadow .2s; }
.three .card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 14px 40px -18px var(--glow); }

/* use cases: tabs on the left, one case on the right */
.cases { display: grid; grid-template-columns: 240px 1fr; gap: 20px; margin-top: 24px; align-items: start; }
.case-tabs { display: grid; gap: 6px; }
.case-tabs button { text-align: left; border-radius: 10px; padding: 10px 14px; font-size: .95rem; background: var(--panel); }
.case-tabs button:hover { border-color: var(--accent); }
.case-tabs button[aria-selected="true"] { color: var(--ink); border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.case-panel { min-height: 232px; }
.case-panel h3 { font-size: 1.25rem; }
.case-panel p { max-width: 44em; }
.case-panel .gain { color: var(--ink); font-weight: 600; margin-top: 12px; }
.case-panel .more { display: inline-block; margin-top: 16px; font-weight: 600; text-decoration: none; }
@media (max-width: 760px) {
  .cases { grid-template-columns: 1fr; }
  .case-tabs { display: flex; flex-wrap: wrap; }
  .case-tabs button { padding: 7px 12px; font-size: .88rem; box-shadow: none !important; }
  .case-tabs button[aria-selected="true"] { background: var(--accent-soft); }
}

/* the closing band */
.band { text-align: center; padding: 56px 0; background: radial-gradient(50% 90% at 50% 100%, var(--glow), transparent 70%), var(--bg); }
.band .lede { margin: 0 auto; }
.band .cta { justify-content: center; }
