/* ==========================================================================
   Agent Harbor — A2A / x402 surfaces (homepage + Agent Services)
   October 2026. Scoped to .ah-* classes so style.css / typography.css
   (and the wave animations they own) stay untouched.
   Type: Sora (matches the logo wordmark) for headings, Inter for copy,
   JetBrains Mono only for real requests, paths and prices.
   ========================================================================== */

:root {
  --ah-navy: #022242;
  --ah-deep: #011830;
  --ah-swell: #0d4a7a;
  --ah-tide: #2e6ea6;
  --ah-foam: #c8dff0;
  --ah-gold: #c9a84c;
  --ah-gold-ink: #8a6a12;
  --ah-paper: #f4f6f8;
  --ah-ink: #0f2236;
  --ah-muted: #4a5a6c;
  --ah-rule: #d9e2ec;
  --ah-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ah-head: 'Sora', 'Inter', system-ui, sans-serif;
  --ah-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
}

/* ---------- Hero refinements (homepage + services hero) ---------- */
.ah-hero h1.hero-heading,
.ah-hero h1 {
  font-family: var(--ah-head) !important;
  font-weight: 300 !important;
  letter-spacing: -0.035em !important;
  font-size: clamp(2.25rem, 5.6vw, 4rem) !important;
  line-height: 1.04 !important;
  max-width: 19ch;
  text-wrap: balance;
  margin-left: auto;
  margin-right: auto;
  color: var(--ah-navy) !important;
}
.ah-hero h1 strong { font-weight: 700; }
.ah-hero .hero-subheading {
  font-family: var(--ah-sans) !important;
  font-size: clamp(1rem, 1.6vw, 1.15rem) !important;
  line-height: 1.7 !important;
  color: #3c4d61 !important;
  max-width: 40rem !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
.ah-hero .hero-actions { flex-wrap: wrap; }
.ah-hero .ah-hero-aside {
  font-family: var(--ah-sans);
  font-size: 0.95rem;
  color: var(--ah-muted);
  text-align: center;
  margin: 0.25rem auto 1.25rem;
  max-width: none;
}
.ah-hero .ah-hero-aside a { color: var(--ah-navy); text-decoration-color: var(--ah-gold); }

.ah-facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
  margin: 0.5rem auto 1rem;
  padding: 0;
  list-style: none;
  max-width: 46rem;
  border: 1px solid rgba(2, 34, 66, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.7);
}
.ah-facts li {
  flex: 1 1 9rem;
  margin: 0;
  padding: 0.7rem 0.9rem;
  text-align: center;
  font-family: var(--ah-sans);
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--ah-muted);
}
.ah-facts li + li { border-left: 1px solid rgba(2, 34, 66, 0.1); }
.ah-facts b {
  display: block;
  font-family: var(--ah-head);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ah-navy);
  letter-spacing: -0.01em;
}
@media (max-width: 560px) {
  .ah-facts li { flex-basis: 50%; }
  .ah-facts li + li { border-left: 0; }
  .ah-facts li:nth-child(even) { border-left: 1px solid rgba(2, 34, 66, 0.1); }
  .ah-facts li:nth-child(n+3) { border-top: 1px solid rgba(2, 34, 66, 0.1); }
}

/* ---------- Shared section scaffolding ---------- */
.ah-section { padding: clamp(3.5rem, 7vw, 6rem) 0; background: #fff; }
.ah-section--paper { background: var(--ah-paper); }
.ah-section--navy { background: var(--ah-navy); }
.ah-section--deep { background: var(--ah-deep); }
.ah-wrap { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 1.25rem; }
.ah-wrap--narrow { max-width: 52rem; }

.ah-h2 {
  font-family: var(--ah-head) !important;
  font-weight: 600 !important;
  font-size: clamp(1.7rem, 3.4vw, 2.5rem) !important;
  letter-spacing: -0.03em !important;
  line-height: 1.12 !important;
  color: var(--ah-navy) !important;
  margin: 0 0 0.9rem !important;
  max-width: 24ch;
}
.ah-h3 {
  font-family: var(--ah-head) !important;
  font-weight: 600 !important;
  font-size: 1.15rem !important;
  letter-spacing: -0.015em !important;
  line-height: 1.3 !important;
  color: var(--ah-navy) !important;
  margin: 0 0 0.4rem !important;
}
.ah-lede {
  font-family: var(--ah-sans) !important;
  font-size: 1.075rem !important;
  line-height: 1.7 !important;
  color: var(--ah-muted) !important;
  max-width: 40rem !important;
  margin: 0 0 2rem !important;
}
.ah-copy, .ah-section p.ah-copy {
  font-family: var(--ah-sans) !important;
  font-size: 0.98rem !important;
  line-height: 1.65 !important;
  color: var(--ah-muted) !important;
  margin: 0 0 0.75rem !important;
  max-width: 62ch;
}
.ah-on-dark .ah-h2, .ah-on-dark .ah-h3 { color: #fff !important; }
.ah-on-dark .ah-lede, .ah-on-dark .ah-copy, .ah-on-dark p.ah-copy, .ah-section.ah-on-dark p.ah-copy { color: #b9c9da !important; }
.ah-on-dark a:not(.btn) { color: #fff; text-decoration: underline; text-decoration-color: var(--ah-gold); text-underline-offset: 3px; }

.ah-link {
  font-family: var(--ah-sans);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ah-navy) !important;
  text-decoration: underline !important;
  text-decoration-color: var(--ah-gold) !important;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px !important;
}
.ah-on-dark .ah-link { color: #fff !important; }

code.ah-code, .ah-code {
  font-family: var(--ah-mono);
  font-size: 0.86em;
  background: rgba(2, 34, 66, 0.06);
  border-radius: 4px;
  padding: 0.1em 0.35em;
  color: var(--ah-navy);
}
.ah-on-dark .ah-code { background: rgba(255, 255, 255, 0.08); color: #e6eef6; }

/* ---------- Signature: the harbor log (402 -> pay -> 200) ---------- */
.ah-dock {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.ah-steps { list-style: none; margin: 1.5rem 0 0; padding: 0; counter-reset: ah-step; }
.ah-steps li {
  counter-increment: ah-step;
  position: relative;
  margin: 0;
  padding: 0 0 1.1rem 2.6rem;
  font-family: var(--ah-sans);
  font-size: 0.97rem;
  line-height: 1.55;
  color: #b9c9da !important;
}
.ah-steps li::before {
  content: counter(ah-step);
  position: absolute;
  left: 0;
  top: -0.05rem;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  border: 1px solid rgba(201, 168, 76, 0.7);
  color: var(--ah-gold);
  font-family: var(--ah-head);
  font-size: 0.8rem;
  font-weight: 600;
  display: grid;
  place-items: center;
}
.ah-steps li::after {
  content: '';
  position: absolute;
  left: 0.87rem;
  top: 1.85rem;
  bottom: 0.2rem;
  width: 1px;
  background: rgba(201, 168, 76, 0.3);
}
.ah-steps li:last-child::after { display: none; }
.ah-steps strong { color: #fff; font-weight: 600; }

.ah-log {
  background: var(--ah-deep);
  border: 1px solid rgba(200, 223, 240, 0.14);
  border-radius: 14px;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}
.ah-log__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid rgba(200, 223, 240, 0.1);
  font-family: var(--ah-sans);
  font-size: 0.78rem;
  color: #8fa7bf;
}
.ah-log__bar span:first-child { color: #c8dff0; font-weight: 600; }
.ah-log pre {
  margin: 0;
  padding: 1.1rem 1.15rem 1.3rem;
  font-family: var(--ah-mono);
  font-size: clamp(0.72rem, 1.25vw, 0.82rem);
  line-height: 1.75;
  color: #c8dff0;
  white-space: pre-wrap;
  word-break: break-word;
  background: none;
  border: 0;
}
.ah-log .ln { display: block; }
.ah-log .p { color: #7aabcf; }
.ah-log .c { color: #6f87a0; }
.ah-log .s402 { color: #f0c76a; font-weight: 600; }
.ah-log .s200 { color: #8fe3b0; font-weight: 600; }
.ah-log .k { color: #ffffff; }
.ah-log .g { color: var(--ah-gold); }

/* one orchestrated moment: the log types itself in once, when it scrolls into view */
.ah-log.is-armed .ln { opacity: 0; transform: translateY(4px); }
.ah-log.is-playing .ln {
  animation: ah-line 0.42s ease forwards;
  animation-delay: calc(var(--i, 0) * 0.32s);
}
@keyframes ah-line { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .ah-log.is-armed .ln, .ah-log.is-playing .ln { opacity: 1; transform: none; animation: none; }
}

/* ---------- Tide table: the live services ---------- */
.ah-tide { border-top: 2px solid var(--ah-navy); }
.ah-tide__group {
  display: grid;
  grid-template-columns: 13rem minmax(0, 1fr);
  gap: 1.5rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--ah-rule);
}
.ah-tide__group > .ah-tide__label h3 { margin-bottom: 0.25rem !important; }
.ah-tide__group > .ah-tide__label p {
  font-family: var(--ah-sans) !important;
  font-size: 0.86rem !important;
  line-height: 1.5 !important;
  color: var(--ah-muted) !important;
  margin: 0 !important;
}
.ah-tide__rows { list-style: none; margin: 0; padding: 0; }
.ah-tide__row {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr) 5.5rem;
  gap: 1rem;
  align-items: baseline;
  margin: 0;
  padding: 0.55rem 0;
}
.ah-tide__row + .ah-tide__row { border-top: 1px dashed var(--ah-rule); }
.ah-path {
  font-family: var(--ah-mono);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ah-navy);
}
.ah-tide__desc {
  font-family: var(--ah-sans);
  font-size: 0.93rem;
  line-height: 1.55;
  color: #2c3e52;
}
.ah-tide__desc small { display: block; color: var(--ah-muted); font-size: 0.8rem; margin-top: 0.15rem; }
.ah-price {
  font-family: var(--ah-mono);
  font-size: 0.9rem;
  color: var(--ah-navy);
  text-align: right;
  white-space: nowrap;
}
.ah-price span { color: var(--ah-muted); font-size: 0.75rem; }
.ah-tide__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.5rem;
}
.ah-tide__foot p {
  font-family: var(--ah-sans) !important;
  font-size: 0.88rem !important;
  color: var(--ah-muted) !important;
  margin: 0 !important;
}
@media (max-width: 820px) {
  .ah-tide__group { grid-template-columns: 1fr; gap: 0.5rem; }
}
@media (max-width: 560px) {
  .ah-tide__row { grid-template-columns: minmax(0, 1fr) auto; gap: 0.15rem 1rem; }
  .ah-tide__desc { grid-column: 1 / -1; grid-row: 2; }
}

/* ---------- Harbor chart (how traffic reaches the harbor) ---------- */
.ah-chart { margin: 0.5rem 0 0; }
.ah-chart svg { width: 100%; height: auto; display: block; }
.ah-chart figcaption {
  font-family: var(--ah-sans);
  font-size: 0.85rem;
  color: #8fa7bf;
  margin-top: 0.75rem;
}
.ah-chart-mobile { display: none; }
@media (max-width: 720px) {
  .ah-chart svg { display: none; }
  .ah-chart-mobile { display: block; }
}
.ah-flowlist { list-style: none; margin: 0; padding: 0; }
.ah-flowlist li {
  margin: 0 0 0.9rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(200, 223, 240, 0.18);
  border-radius: 10px;
  font-family: var(--ah-sans);
  font-size: 0.92rem;
  line-height: 1.5;
  color: #b9c9da !important;
}
.ah-flowlist strong { display: block; color: #fff; font-family: var(--ah-head); font-weight: 600; margin-bottom: 0.15rem; }

/* ---------- Channels (where agents find us) ---------- */
.ah-channels {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: 0;
  border-top: 1px solid var(--ah-rule);
}
.ah-channel {
  margin: 0;
  padding: 1.3rem 1.25rem 1.3rem 0;
  border-bottom: 1px solid var(--ah-rule);
}
.ah-channel__top { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.35rem; }
.ah-channel h3 { margin: 0 !important; }
.ah-channel p {
  font-family: var(--ah-sans) !important;
  font-size: 0.92rem !important;
  line-height: 1.6 !important;
  color: var(--ah-muted) !important;
  margin: 0 0 0.4rem !important;
}
.ah-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--ah-sans);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(46, 110, 166, 0.1);
  color: var(--ah-swell);
}
.ah-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.ah-pill--live { background: rgba(31, 138, 85, 0.1); color: #1b7a4b; }
.ah-pill--planned { background: rgba(138, 106, 18, 0.1); color: var(--ah-gold-ink); }

/* ---------- Two-column feature (private compute / provenance) ---------- */
.ah-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.ah-points { list-style: none; margin: 1.25rem 0 0; padding: 0; }
.ah-points li {
  margin: 0;
  padding: 0.85rem 0;
  border-top: 1px solid var(--ah-rule);
  font-family: var(--ah-sans);
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ah-muted) !important;
}
.ah-points li strong { color: var(--ah-navy); font-weight: 600; }
.ah-on-dark .ah-points li { border-top-color: rgba(200, 223, 240, 0.14); color: #b9c9da !important; }
.ah-on-dark .ah-points li strong { color: #fff; }

.ah-receipt {
  background: #fff;
  border: 1px solid var(--ah-rule);
  border-radius: 12px;
  padding: 1.25rem 1.35rem;
  font-family: var(--ah-mono);
  font-size: 0.8rem;
  line-height: 1.8;
  color: var(--ah-ink);
}
.ah-receipt .r-head { font-family: var(--ah-sans); font-weight: 600; font-size: 0.9rem; color: var(--ah-navy); margin-bottom: 0.6rem; }
.ah-receipt .ok { color: #1b7a4b; }
.ah-receipt .x { color: #a5322a; text-decoration: line-through; }
.ah-receipt .why { color: var(--ah-muted); font-family: var(--ah-sans); font-size: 0.8rem; }
.ah-receipt .r-foot { margin-top: 0.75rem; padding-top: 0.6rem; border-top: 1px dashed var(--ah-rule); color: var(--ah-muted); }

/* ---------- Business band ---------- */
.ah-biz {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.ah-plans { list-style: none; margin: 0; padding: 0; border: 1px solid var(--ah-rule); border-radius: 12px; background: #fff; }
.ah-plans li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin: 0;
  padding: 0.95rem 1.15rem;
  font-family: var(--ah-sans);
  font-size: 0.93rem;
  color: var(--ah-muted);
}
.ah-plans li + li { border-top: 1px solid var(--ah-rule); }
.ah-plans b { font-family: var(--ah-head); font-weight: 600; color: var(--ah-navy); font-size: 1rem; }
.ah-plans .amt { font-family: var(--ah-head); color: var(--ah-navy); font-weight: 600; white-space: nowrap; }
.ah-plans .amt span { font-family: var(--ah-sans); font-weight: 400; color: var(--ah-muted); font-size: 0.8rem; }
.ah-biz-links { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; margin-top: 1.25rem; }

/* ---------- Crew (run by agents) ---------- */
.ah-crew {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 0 2rem;
  margin-top: 1.5rem;
}
.ah-crew div { padding: 1rem 0; border-top: 2px solid var(--ah-gold); }

/* ---------- Quickstart / code panel on light ---------- */
.ah-codeblock {
  background: var(--ah-deep);
  color: #c8dff0;
  border-radius: 12px;
  padding: 1.1rem 1.2rem;
  font-family: var(--ah-mono);
  font-size: 0.82rem;
  line-height: 1.75;
  overflow-x: auto;
  margin: 0 0 1rem;
  white-space: pre-wrap;
  word-break: break-all;
}
.ah-codeblock .c { color: #6f87a0; }

/* ---------- Contact strip ---------- */
.ah-contact { text-align: center; }
.ah-contact .ah-h2, .ah-contact .ah-lede { margin-left: auto !important; margin-right: auto !important; }
.ah-contact .ah-mail {
  font-family: var(--ah-head);
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  font-weight: 600;
  color: #fff !important;
  text-decoration: underline;
  text-decoration-color: var(--ah-gold);
  text-underline-offset: 6px;
}

/* ---------- Services page: endpoint detail list ---------- */
.ah-endpoints { list-style: none; margin: 0; padding: 0; }
.ah-endpoint {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.5rem 2rem;
  margin: 0;
  padding: 1.5rem 0;
  border-top: 1px solid var(--ah-rule);
}
.ah-endpoint:last-child { border-bottom: 1px solid var(--ah-rule); }
.ah-endpoint__head { display: flex; align-items: baseline; gap: 0.75rem; flex-wrap: wrap; }
.ah-endpoint__head .ah-path { font-size: 1.05rem; }
.ah-endpoint dl {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.3rem 1rem;
  margin: 0;
  font-family: var(--ah-sans);
  font-size: 0.88rem;
}
.ah-endpoint dt { color: var(--ah-muted); }
.ah-endpoint dd { margin: 0; color: var(--ah-ink); }
.ah-endpoint dd code { font-family: var(--ah-mono); font-size: 0.82rem; }
@media (max-width: 760px) {
  .ah-endpoint { grid-template-columns: 1fr; }
}

.ah-anchor-nav { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 2rem; padding: 0; list-style: none; }
.ah-anchor-nav li { margin: 0; }
.ah-anchor-nav a {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--ah-rule);
  border-radius: 999px;
  font-family: var(--ah-sans);
  font-size: 0.85rem;
  color: var(--ah-navy) !important;
  text-decoration: none !important;
  background: #fff;
}
.ah-anchor-nav a:hover { border-color: var(--ah-navy); opacity: 1; }

.ah-faq details { border-top: 1px solid var(--ah-rule); padding: 0.9rem 0; }
.ah-faq details:last-child { border-bottom: 1px solid var(--ah-rule); }
.ah-faq summary {
  cursor: pointer;
  font-family: var(--ah-head);
  font-weight: 600;
  font-size: 1rem;
  color: var(--ah-navy);
}
.ah-faq details p { margin: 0.6rem 0 0 !important; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .ah-dock, .ah-split, .ah-biz { grid-template-columns: 1fr; }
}

/* keyboard focus visible on all our links/buttons */
.ah-section a:focus-visible, .ah-hero a:focus-visible, .ah-faq summary:focus-visible {
  outline: 2px solid var(--ah-gold);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ---------- Nav CTA ("Call an Endpoint") on every page ----------
   Older rules style the nav button by its href (get-started); this keeps the
   new CTA white with navy text everywhere. */
header .nav-menu a.btn-nav,
header .nav-menu a.btn-nav:visited {
  background: #ffffff !important;
  color: #011830 !important;
  border: 2px solid #ffffff !important;
  border-radius: 6px !important;
  font-weight: 700 !important;
  font-size: 0.9375rem !important;
  padding: 0.5rem 1.1rem !important;
  line-height: 1 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  opacity: 1 !important;
}
header .nav-menu a.btn-nav:hover,
header .nav-menu a.btn-nav:focus-visible {
  background: transparent !important;
  color: #ffffff !important;
}

.ah-endpoint dt, .ah-endpoint dd { margin: 0 !important; padding: 0 !important; line-height: 1.5 !important; }
.ah-hero .hero-actions + .ah-facts { margin-top: 1.75rem; }
