/* Florida AI Partners — SHARED brand chrome for the receptionist-builder funnel.
 *
 * This is the re-skin that makes the standalone builder look like a native page on
 * floridaaipartners.com. It replicates the FLAGSHIP site's header + footer + global
 * surface treatment (warm ivory base, editorial serif display headlines, the
 * scroll-aware frosted header, the deep-navy footer, the rounded brand mark) without
 * pulling in Astro — the builder is a vanilla HTML/CSS app, so we copy the design.
 *
 * Loaded by BOTH index.html and 50.html (before builder.css / landing-50.css). The
 * brand mark is an INLINE <svg> in the markup (NOT an <img>), so the $50 ad page stays
 * image-free + zero-extra-network-weight (its perf test forbids <img> + font CDNs).
 *
 * Colors/type/space all flow from /vendor/tokens.css (the canonical cross-spoke
 * tokens, synced from shared/ui/tokens.css), so a rebrand is a one-file palette swap —
 * exactly like the flagship. Mobile-first; WCAG 2.2 AA; reduced-motion-safe. */

@import "/vendor/tokens.css";

/* ── Flagship semantic aliases ────────────────────────────────────────────────────
   The flagship's BaseLayout maps the canonical --color-* roles onto short --ink /
   --brand / --accent names its components use. We mirror that mapping so the builder
   skin reads like flagship code and re-skins from the same source of truth. */
:root {
  --ink: var(--color-ink);                 /* deep navy — headings */
  --ink-soft: var(--fap-navy-soft, #14365e);
  --brand: var(--color-brand);             /* Florida teal */
  --brand-deep: var(--color-brand-strong); /* AA-safe teal links/text on white */
  --accent: var(--color-accent);           /* sunrise orange */
  --accent-ink: var(--color-accent-ink);
  --accent-wash: var(--color-accent-wash);
  --accent-btn: var(--color-accent-strong);   /* deepened orange for solid CTAs (AA) */
  --accent-btn-hover: var(--fap-orange-darker, #a33e00);
  --gold: var(--color-highlight);          /* peach sun-glow */

  --bg: var(--color-bg);                    /* warm ivory */
  --surface: var(--color-surface);
  --surface-2: var(--color-surface-2);      /* soft cream band */
  --line: var(--color-line);
  --text: var(--color-text);
  --muted: var(--color-muted);

  --max: 1120px;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

/* The flagship page base: warm ivory, Inter body, navy ink, generous line-height. */
html,
body {
  margin: 0;
  min-height: 100%;
}
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  /* The builder pages stack: header · main · footer. */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  /* Own stacking context so the ambient page-aura can sit behind the content. */
  position: relative;
  isolation: isolate;
}

/* Editorial display headlines — the flagship's calm, premium voice. h1/h2 use the
   serif (Lora on index.html; a graceful serif fallback on the font-free ad page). */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 0.5em;
  font-weight: 700;
}
h1, h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  letter-spacing: -0.018em;
  line-height: 1.08;
}

a {
  color: var(--brand-deep);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

/* Visible keyboard focus everywhere (mouse clicks don't trigger :focus-visible). */
:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Skip link — first focusable element; off-screen until focused (WCAG 2.4.1). */
.skip-link {
  position: fixed;
  top: -100px;
  left: 12px;
  z-index: var(--z-toast, 100);
  padding: 0.7rem 1.1rem;
  background: var(--surface);
  color: var(--ink);
  border: 2px solid var(--brand-deep);
  border-radius: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: 20px;
}

/* ============================================================================
   HEADER — the flagship's premium scroll-aware bar.
   At the top: soft frosted wash + hairline. Once scrolled: frost deepens, a
   hairline shadow lifts it, and it tightens vertically. The brand lockup =
   the live vector mark + the wordmark, sized off --lh. A single nav link
   leads back to the main site (this is a focused funnel, not the full site).
   ============================================================================ */
.site-header {
  --header-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --header-h: 80px;
  position: sticky;
  top: 0;
  z-index: var(--z-sticky, 50);
  background: rgba(251, 250, 246, 0.72);
  backdrop-filter: saturate(150%) blur(8px);
  -webkit-backdrop-filter: saturate(150%) blur(8px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent);
  transition:
    background 0.3s var(--header-ease),
    backdrop-filter 0.3s var(--header-ease),
    border-color 0.3s var(--header-ease),
    box-shadow 0.3s var(--header-ease);
}
.site-header.is-scrolled {
  background: rgba(251, 250, 246, 0.9);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom-color: color-mix(in srgb, var(--line) 75%, transparent);
  box-shadow:
    0 1px 0 color-mix(in srgb, var(--ink) 6%, transparent),
    0 8px 28px -18px rgba(0, 36, 84, 0.45);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: var(--header-h);
  transition: min-height 0.3s var(--header-ease);
}
.site-header.is-scrolled .site-header__inner { --header-h: 68px; }

.site-header__brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  border-radius: 10px;
}

/* The brand lockup: live mark + wordmark, height driven by --lh (header owns it so
   it can tighten on scroll), with the flagship's lift + soft teal glow on hover. */
.lockup {
  --lh: 64px;
  display: inline-flex;
  align-items: center;
  gap: calc(var(--lh) * 0.2);
  height: var(--lh);
  line-height: 0;
  transform-origin: left center;
  transition:
    height 0.3s var(--header-ease),
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.3s ease;
}
.site-header__brand:hover .lockup {
  transform: scale(1.04);
  filter: drop-shadow(0 5px 14px color-mix(in srgb, var(--brand) 38%, transparent));
}
.site-header__brand:active .lockup { transform: scale(0.99); }
.site-header.is-scrolled .lockup { --lh: 56px; }

/* The live brand mark — the flagship's two-color logo (teal coast + orange sun &
   circuit). Rendered as a full-color background-image of the vendored SVG so the HTML
   stays tiny and the $50 ad page has NO <img> tag (its perf test forbids <img>). The
   SVG's intrinsic 2358×2081 ratio fixes the box width from --lh. */
.lockup__icon {
  height: 100%;
  width: calc(var(--lh, 64px) * 1.133); /* 2358/2081 aspect ratio */
  display: block;
  flex: 0 0 auto;
  background: url("/brand/florida-ai-partners-icon.svg") center / contain no-repeat;
}
/* Wordmark rendered as live text in the brand display face — keeps the ad page
   image-free (the flagship uses a PNG; we match the look without the asset). */
.lockup__word {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: calc(var(--lh) * 0.34);
  letter-spacing: -0.01em;
  line-height: 1;
  color: var(--ink);
  white-space: nowrap;
}
.lockup__word .ai { color: var(--accent); }

@media (max-width: 1079px) { .lockup { --lh: 52px; } }
@media (max-width: 560px) { .lockup { --lh: 46px; } }
@media (max-width: 360px) { .lockup { --lh: 40px; } }

/* Right-side actions: a "back to main site" link + the phone CTA. */
.site-header__cta {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.site-header__link {
  display: none;
  align-items: center;
  gap: 0.4rem;
  padding: 0 0.85rem;
  min-height: 44px;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink);
  white-space: nowrap;
  transition: color 0.2s var(--header-ease), background-color 0.2s var(--header-ease);
}
.site-header__link:hover {
  text-decoration: none;
  color: var(--brand-deep);
  background-color: color-mix(in srgb, var(--brand) 9%, transparent);
}
.site-header__call {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.95rem;
  min-height: 44px;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--brand-deep);
  background: color-mix(in srgb, var(--brand) 9%, transparent);
  white-space: nowrap;
  transition: color 0.2s var(--header-ease), background-color 0.2s var(--header-ease);
}
.site-header__call:hover {
  text-decoration: none;
  background: color-mix(in srgb, var(--brand) 16%, transparent);
}
@media (min-width: 560px) {
  .site-header__link { display: inline-flex; }
}

/* ============================================================================
   PAGE AURA — the flagship's always-on "Florida sunrise" ambient glow. A slow,
   drifting sun + teal bloom behind the top of the page, masked away from text.
   CSS-only, reduced-motion-safe. Lives behind the content (z-index:-1) in the
   page's first stacking context (body has isolation set above).
   ============================================================================ */
.page-aura {
  position: absolute;
  inset: 0 0 auto 0;
  height: 700px;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.5) 55%, transparent 92%);
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.5) 55%, transparent 92%);
}
.page-aura i {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(55px);
  will-change: transform;
}
.page-aura .aura-sun {
  top: -55%;
  left: 18%;
  width: 56%;
  height: 180%;
  background: radial-gradient(circle, rgba(252, 96, 0, 0.16), rgba(252, 96, 0, 0) 64%);
  animation: aura-d1 18s ease-in-out infinite;
}
.page-aura .aura-teal {
  top: -45%;
  left: 38%;
  width: 40%;
  height: 160%;
  background: radial-gradient(circle, rgba(0, 156, 168, 0.13), rgba(0, 156, 168, 0) 68%);
  animation: aura-d2 24s ease-in-out infinite;
}
@keyframes aura-d1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-5%, 4%) scale(1.12); }
}
@keyframes aura-d2 {
  0%, 100% { transform: translate(0, 0) scale(1.08); }
  50% { transform: translate(5%, -5%) scale(0.95); }
}

/* ============================================================================
   FOOTER — the flagship's deep-navy footer band: brand lockup + tagline, the
   NAP block, and the legal row. Trimmed to what a focused funnel needs (no full
   sitemap), but visually identical to floridaaipartners.com's footer.
   ============================================================================ */
.site-footer {
  background: var(--ink);
  color: #c4d0db;
  padding-block: 2.5rem 1.75rem;
  font-size: 0.95rem;
  margin-top: auto;
}
.site-footer a { color: #c4d0db; }
.site-footer a:hover { color: #fff; }
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  align-items: flex-start;
  justify-content: space-between;
}
.site-footer .lockup { --lh: 52px; }
.site-footer .lockup__word { color: #fff; }
.site-footer__tag {
  color: var(--gold);
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0.9rem 0 0.2rem;
  font-size: 0.98rem;
}
.site-footer__sub {
  color: #9fb0bf;
  margin: 0;
  font-size: 0.9rem;
  max-width: 42ch;
}
.site-footer__nap {
  line-height: 1.9;
  color: #9fb0bf;
  font-size: 0.9rem;
  margin: 0;
}
.site-footer__nap a { color: #c4d0db; }
.site-footer__legal {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.82rem;
  color: #7d8e9d;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  justify-content: space-between;
}
.site-footer__legal a { color: #9fb0bf; }
/* Gold focus ring on the dark footer (teal washes out), matching the flagship. */
.site-footer :focus-visible { outline-color: var(--gold); }

/* ── Reduced motion: still the finished look, just no drift/transition. ───────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .page-aura i { animation: none; }
  .site-header,
  .site-header__inner,
  .lockup,
  .site-header__link,
  .site-header__call { transition: none; }
}
