/* Hello Friend — shared public-site styles (2026-10-11).
 *
 * Loaded on every public page through _partials/head.html. Holds the design
 * tokens, the site header + footer (markup in _partials/, stamped into each
 * page by build_site.js) and the small set of components new pages share.
 * Page-specific layout stays in each page's own <style>.
 *
 * Everything is namespaced hf- so it can't collide with the older per-page
 * class names (.btn-primary, .section-title, …) that some pages still use.
 */

:root {
  --hf-navy: #1A1060;
  --hf-indigo: #2E1F8A;
  --hf-purple: #5946D1;
  --hf-purple-2: #7B61FF;
  --hf-purple-xs: #EDE9FF;
  --hf-gold: #FFD54F;
  --hf-gold-hover: #FFE082;
  --hf-gold-ink: #3E2C00;
  --hf-ink: #1A1A2E;
  --hf-mid: #4A5568;
  --hf-soft: #636B78;
  --hf-bg: #F6F5FC;
  --hf-line: #E6E3F5;
  --hf-footer: #0F0A3C;
  --hf-white: #FFFFFF;
  --hf-green: #1E7A34;
  --hf-green-xs: #E6F4EA;
  --hf-amber-xs: #FFF4D6;
  --hf-amber-ink: #6D4C00;

  --hf-radius: 18px;
  --hf-radius-sm: 12px;
  --hf-max: 1160px;
  --hf-gutter: 16px;
  --hf-header-h: 64px;
  --hf-shadow: 0 10px 30px rgba(26, 16, 96, 0.10);
  --hf-shadow-lg: 0 18px 48px rgba(26, 16, 96, 0.20);
  --hf-grad: linear-gradient(135deg, #1A1060 0%, #2E1F8A 50%, #5946D1 100%);
  --hf-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
@media (min-width: 720px) { :root { --hf-gutter: 24px; } }

html { scroll-padding-top: calc(var(--hf-header-h) + 12px); -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }
/* Signed-in state (js/site.js + the inline line in _partials/head.html):
   a class on <html>, set before the header paints, so "Log in / Join free"
   never flashes before switching to "Open the app". No JS = signed-out view. */
html:not(.hf-signed-in) [data-auth="in"],
html.hf-signed-in [data-auth="out"] { display: none !important; }
:focus-visible { outline: 3px solid var(--hf-purple-2); outline-offset: 3px; }
/* Older pages fade sections in on scroll (.reveal); people who ask for
   reduced motion get the content straight away. */
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1 !important; transform: none !important; transition: none !important; } }

/* ── Skip link ──────────────────────────────────────────────────────────── */
.hf-skip {
  position: absolute; left: 8px; top: -60px; z-index: 2000;
  background: #fff; color: var(--hf-navy); font: 700 15px/1 var(--hf-font);
  padding: 12px 16px; border-radius: 10px; text-decoration: none;
  box-shadow: var(--hf-shadow-lg);
}
.hf-skip:focus { top: 8px; }

/* ── Buttons (header, footer and the pages that opt in) ────────────────── */
.hf-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1.5px solid transparent;
  font: 800 15px/1.2 var(--hf-font); letter-spacing: 0.1px; text-decoration: none;
  cursor: pointer; white-space: nowrap;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.hf-btn:hover { transform: translateY(-1px); }
.hf-btn-lg { min-height: 54px; padding: 0 26px; font-size: 17px; border-radius: 14px; }
.hf-btn-sm { min-height: 38px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.hf-btn-gold { background: var(--hf-gold); color: var(--hf-gold-ink); box-shadow: 0 8px 22px rgba(255, 213, 79, 0.25); }
.hf-btn-gold:hover { background: var(--hf-gold-hover); color: var(--hf-gold-ink); }
.hf-btn-primary { background: var(--hf-purple); color: #fff; }
.hf-btn-primary:hover { background: #4A38C2; color: #fff; }
.hf-btn-outline { background: #fff; color: var(--hf-purple); border-color: var(--hf-purple); }
.hf-btn-outline:hover { background: var(--hf-purple-xs); }
.hf-btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.38); }
.hf-btn-ghost:hover { background: rgba(255, 255, 255, 0.10); border-color: rgba(255, 255, 255, 0.6); color: #fff; }
@media (prefers-reduced-motion: reduce) { .hf-btn, .hf-btn:hover { transition: none; transform: none; } }

/* ── Header ─────────────────────────────────────────────────────────────── */
.hf-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(26, 16, 96, 0.97);
  -webkit-backdrop-filter: saturate(140%) blur(14px); backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--hf-font);
  padding-top: env(safe-area-inset-top);
}
.hf-header-inner {
  position: relative;
  max-width: var(--hf-max); height: var(--hf-header-h); margin: 0 auto;
  padding: 0 max(var(--hf-gutter), env(safe-area-inset-right)) 0 max(var(--hf-gutter), env(safe-area-inset-left));
  display: flex; align-items: center; gap: 12px;
}
.hf-brand {
  display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0;
  color: #fff; text-decoration: none; font: 800 17px/1 var(--hf-font); letter-spacing: -0.2px;
  border-radius: 10px;
}
.hf-brand-mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--hf-purple-2), var(--hf-purple));
}
.hf-nav { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.hf-nav-links { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; }
.hf-nav-links a {
  display: block; padding: 9px 12px; border-radius: 10px;
  color: rgba(255, 255, 255, 0.84); text-decoration: none; font-size: 14.5px; font-weight: 600;
}
.hf-nav-links a:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.hf-nav-links a[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, 0.14); }
.hf-nav-actions { display: flex; align-items: center; gap: 8px; margin-left: 6px; }
.hf-header-cta { display: none; }
.hf-menu-btn {
  display: none; width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.25); background: transparent; cursor: pointer;
  align-items: center; justify-content: center; flex-direction: column; gap: 4px; padding: 0;
}
.hf-menu-btn span { display: block; width: 20px; height: 2px; border-radius: 2px; background: #fff; transition: transform .2s ease, opacity .2s ease; }
.hf-header.is-open .hf-menu-btn span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hf-header.is-open .hf-menu-btn span:nth-child(2) { opacity: 0; }
.hf-header.is-open .hf-menu-btn span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 980px) {
  .hf-menu-btn { display: inline-flex; }
  .hf-header-cta { display: inline-flex; margin-left: auto; }
  .hf-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0; margin: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #1A1060; border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 24px 40px rgba(10, 6, 40, 0.45);
    padding: 8px max(var(--hf-gutter), env(safe-area-inset-right)) 20px max(var(--hf-gutter), env(safe-area-inset-left));
    max-height: calc(100vh - var(--hf-header-h)); max-height: calc(100dvh - var(--hf-header-h)); overflow-y: auto;
  }
  .hf-header.is-open .hf-nav { display: flex; }
  .hf-nav-links { flex-direction: column; }
  .hf-nav-links a { padding: 13px 12px; font-size: 16px; }
  .hf-nav-actions { flex-direction: column; align-items: stretch; margin: 12px 0 0; gap: 10px; }
  .hf-nav-actions .hf-btn { min-height: 48px; }
}
@media (max-width: 360px) { .hf-brand-name { display: none; } }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.hf-footer {
  background: var(--hf-footer); color: rgba(255, 255, 255, 0.72);
  font: 400 14px/1.6 var(--hf-font);
  padding: 52px max(var(--hf-gutter), env(safe-area-inset-right)) calc(28px + env(safe-area-inset-bottom)) max(var(--hf-gutter), env(safe-area-inset-left));
}
.hf-footer-inner { max-width: var(--hf-max); margin: 0 auto; }
.hf-footer-grid { display: grid; gap: 32px 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) { .hf-footer-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .hf-footer-grid { grid-template-columns: 1.7fr repeat(4, minmax(0, 1fr)); } }
.hf-footer-brand { grid-column: 1 / -1; }
@media (min-width: 1040px) { .hf-footer-brand { grid-column: auto; } }
.hf-footer-brand p { margin: 14px 0 0; max-width: 300px; }
.hf-footer-title {
  margin: 0 0 12px; font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}
.hf-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.hf-footer a { color: rgba(255, 255, 255, 0.8); text-decoration: none; border-radius: 4px; }
.hf-footer a:hover { color: #fff; text-decoration: underline; }
.hf-footer a[aria-current="page"] { color: #fff; font-weight: 700; }
.hf-footer-bottom {
  margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between;
  font-size: 13px; color: rgba(255, 255, 255, 0.6);
}
.hf-footer-bottom nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.hf-footer-bottom a { color: rgba(255, 255, 255, 0.66); }

/* ── Shared page components (new pages: home, providers, join) ─────────── */
.hf-section {
  padding: 64px max(var(--hf-gutter), env(safe-area-inset-right)) 64px max(var(--hf-gutter), env(safe-area-inset-left));
  font-family: var(--hf-font);
}
@media (min-width: 900px) { .hf-section { padding-top: 88px; padding-bottom: 88px; } }
.hf-wrap { max-width: var(--hf-max); margin: 0 auto; }
.hf-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px;
  padding: 5px 12px; border-radius: 999px; background: var(--hf-purple-xs); color: var(--hf-purple);
  font-size: 12.5px; font-weight: 800; letter-spacing: 0.6px; text-transform: uppercase;
}
.hf-on-dark .hf-eyebrow { background: rgba(255, 255, 255, 0.12); color: #D9D3FF; }
.hf-h2 { margin: 0; font-size: clamp(1.7rem, 4.2vw, 2.6rem); line-height: 1.1; letter-spacing: -0.8px; font-weight: 900; color: var(--hf-ink); }
.hf-on-dark .hf-h2 { color: #fff; }
.hf-lede { margin: 12px 0 0; max-width: 640px; font-size: 17px; line-height: 1.65; color: var(--hf-mid); }
.hf-on-dark .hf-lede { color: rgba(255, 255, 255, 0.78); }
.hf-center { text-align: center; }
.hf-center .hf-lede { margin-left: auto; margin-right: auto; }
.hf-on-dark { background: var(--hf-grad); color: #fff; }

.hf-card {
  background: #fff; border: 1px solid var(--hf-line); border-radius: var(--hf-radius);
  padding: 24px; box-shadow: 0 1px 0 rgba(26, 16, 96, 0.03);
}

/* Feature status — every feature on the site says which of these it is. */
.hf-status {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font: 800 11.5px/1.5 var(--hf-font); letter-spacing: 0.4px; text-transform: uppercase; white-space: nowrap;
}
.hf-status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.hf-status-live { background: var(--hf-green-xs); color: var(--hf-green); }
.hf-status-soon { background: var(--hf-amber-xs); color: var(--hf-amber-ink); }
.hf-status-beta { background: var(--hf-purple-xs); color: var(--hf-purple); }

.hf-checks { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 9px; }
.hf-checks li { position: relative; padding-left: 26px; font-size: 15px; line-height: 1.5; color: var(--hf-mid); }
.hf-checks li::before {
  content: ''; position: absolute; left: 0; top: 3px; width: 17px; height: 17px; border-radius: 50%;
  background: var(--hf-purple-xs) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%235946D1' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/13px no-repeat;
}
.hf-on-dark .hf-checks li { color: rgba(255, 255, 255, 0.86); }
.hf-on-dark .hf-checks li::before { background-color: rgba(255, 255, 255, 0.16); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%23FFD54F' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }

.hf-btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hf-center .hf-btn-row { justify-content: center; }
.hf-fine { margin: 10px 0 0; font-size: 13.5px; color: var(--hf-soft); }
.hf-on-dark .hf-fine { color: rgba(255, 255, 255, 0.68); }
@media (max-width: 520px) { .hf-btn-row .hf-btn { width: 100%; } }
