/* Apotsa site chrome (nav + footer + buttons + reveal) — standalone copy of
   APOTSA/apps/hub/src/home.css + src/fonts.css so this page renders the
   same header/footer as apotsa.com without the React build. Keep in sync
   with SiteChrome.tsx when the main site changes. */

:root {
  --font-inter: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-sora: 'Bricolage Grotesque', sans-serif;
  --font-questrial: 'Inter', sans-serif;
  --font-dm-sans-h2: 'DM Sans', sans-serif;
  --font-dm-mono: 'DM Mono', monospace;

  --ink: #101522;
  --ink-2: #48515F;
  --muted: #5F6677;
  --soft: #6B6560;
  --whisper: #B0ABA6;
  --line: rgba(21, 28, 42, 0.09);
  --line-2: #E8E4E0;
  --bg-cream: #F6F5F3;
  --bg-paper: #FBFAF8;
  --blue: #1747FF;
  --blue-text: #3B82F6;
  --indigo: #2D2DF1;
  --green: #04BC2C;
  --orange: #F58F00;
  --gold: #F0AE3C;
  --gold-deep: #B9791A;
  --navy: #0C1420;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: #fff;
  color: var(--ink);
  font-family: var(--font-questrial), system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; border: 0; background: none; cursor: pointer; color: inherit; }

/* Copied verbatim from home.css (NAV, MEGA MENU, NAV DRAWER). */
/* ============ NAV ============ */
.h2 .nav {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 50;
  width: min(1400px, calc(100% - 48px));
  height: 68px; display: flex; align-items: center;
  border-radius: 22px;
  background: rgba(251, 250, 248, 0.78);
  border: 1px solid rgba(21, 28, 42, 0.06);
  box-shadow: 0 10px 30px rgba(16, 21, 34, 0.1);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: background 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease,
    transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.h2 .nav.is-scrolled {
  background: rgba(251, 250, 248, 0.94);
  border-color: rgba(21, 28, 42, 0.08);
  box-shadow: 0 10px 30px rgba(16, 21, 34, 0.14);
}
/* hides on scroll-down, slides back in on scroll-up (see navHidden in
   HomePage.tsx) — translateY stacks on top of the existing translateX so
   it keeps its horizontal centering while hidden. */
.h2 .nav.is-hidden { transform: translateX(-50%) translateY(-140%); }
@media (prefers-reduced-motion: reduce) {
  .h2 .nav { transition: background 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease; }
  .h2 .nav.is-hidden { transform: translateX(-50%); }
}
.h2 .nav .inner {
  width: 100%; max-width: 1516px; margin: 0 auto; padding: 0 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.h2 .brand {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-sora), sans-serif; font-weight: 600;
  font-size: 20px; letter-spacing: -0.02em; color: var(--indigo); line-height: 1;
}
.h2 .brand-mark { width: 22px; height: 18px; flex: 0 0 auto; display: inline-block; }
.h2 .nav-menu { display: flex; gap: 28px; align-items: center; }
.h2 .nav-menu > a, .h2 .nav-menu > .nav-link-btn, .h2 .nav-item > a {
  position: relative; color: var(--soft); font-size: 18px;
  transition: color 0.2s ease; display: inline-flex; align-items: center; gap: 6px;
}
.h2 .nav-menu > a::after, .h2 .nav-menu > .nav-link-btn::after, .h2 .nav-item > a::after {
  content: ""; position: absolute; left: 0; bottom: -4px; height: 1px; width: 0;
  background: var(--ink);
  transition: width 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.h2 .nav-menu > a:hover, .h2 .nav-menu > .nav-link-btn:hover, .h2 .nav-item:hover > a, .h2 .nav-item:focus-within > a,
.h2 .nav-menu > a.is-active, .h2 .nav-item > a.is-active { color: var(--ink); }
.h2 .nav-menu > a:hover::after, .h2 .nav-menu > .nav-link-btn:hover::after, .h2 .nav-item:hover > a::after,
.h2 .nav-menu > a.is-active::after, .h2 .nav-item > a.is-active::after { width: 100%; }
.h2 .nav-menu .caret {
  display: inline-block; width: 8px; height: 8px;
  border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg) translate(2px, -2px);
  transition: transform 0.25s ease; margin-left: 2px;
}
.h2 .nav-item { position: relative; }
.h2 .nav-item:hover .caret { transform: rotate(135deg) translate(-2px, 2px); }

/* ============ MEGA MENU ============ */
.h2 .mega {
  position: absolute; top: calc(100% + 14px); left: 50%;
  transform: translateX(-50%) translateY(-6px);
  width: min(880px, calc(100vw - 80px));
  background: #fff; border-radius: 14px;
  box-shadow: 0 20px 60px rgba(16, 21, 34, 0.12), 0 0 0 1px rgba(21, 28, 42, 0.05);
  padding: 28px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.22s ease, transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
  z-index: 60;
}
.h2 .nav-item::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 18px; display: none;
}
.h2 .nav-item:hover::after, .h2 .nav-item:focus-within::after { display: block; }
.h2 .nav-item:hover .mega, .h2 .nav-item:focus-within .mega {
  opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto;
}

/* Flat mega-menu row — used by AccessAppsMenu's signed-in "Access your
   apps" dropdown (Launcher / Vendor / per-product links / sign out), a
   simple list rather than the Products menu's cards below. */
.h2 .mega-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 10px; margin: 0 -10px; border-radius: 8px;
  transition: background 0.15s ease;
}
.h2 .mega-item:hover { background: #F6F5F3; }
.h2 .mega-t { font-family: var(--font-dm-sans-h2); font-weight: 500; font-size: 15px; color: var(--ink); line-height: 1.3; }
.h2 .mega-s { font-family: var(--font-dm-sans-h2); font-weight: 300; font-size: 13px; color: var(--muted); margin-top: 2px; line-height: 1.35; }

/* Products mega menu — only the real, shipped products (see navProducts in
   lib/nav-products.tsx). One equal column per product, so the grid stays
   full as products are added or hidden — no roadmap/waitlist filler. */
.h2 .mega-grid--products { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 20px; }
.h2 .mega-product {
  display: flex; flex-direction: column; padding: 24px;
  border: 1px solid var(--line-2); border-radius: 12px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.h2 .mega-product:hover { background: #FBFAF8; border-color: var(--line); }
.h2 .mega-product-ic {
  flex: 0 0 auto; width: 46px; height: 46px; border-radius: 10px;
  background: #F4F1ED; display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink); margin-bottom: 16px;
}
.h2 .mega-product-ic svg { width: 22px; height: 22px; display: block; }
.h2 .mega-product:hover .mega-product-ic { background: #E9F0FF; color: var(--blue); }
.h2 .mega-product-t { font-family: var(--font-sora), sans-serif; font-weight: 600; font-size: 18px; color: var(--ink); }
.h2 .mega-product-s { font-family: var(--font-dm-sans-h2); font-weight: 300; font-size: 13px; color: var(--muted); line-height: 1.5; margin: 8px 0 16px; }
.h2 .mega-product-list { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-direction: column; gap: 8px; flex: 1 0 auto; }
.h2 .mega-product-list li {
  font-family: var(--font-dm-sans-h2); font-size: 13px; color: var(--ink-2); padding-left: 15px; position: relative; line-height: 1.4;
}
.h2 .mega-product-list li::before {
  content: ""; position: absolute; left: 0; top: 7px; width: 5px; height: 5px; border-radius: 999px;
  background: var(--blue-text); opacity: 0.6;
}
.h2 .mega-product-cta {
  display: inline-flex; align-items: center; gap: 6px; margin-top: auto;
  font-family: var(--font-dm-sans-h2); font-weight: 500; font-size: 13px; color: var(--blue);
}
.h2 .mega-product:hover .mega-product-cta { text-decoration: underline; }
.h2 .mega-product:hover .btn-arrow { transform: translateX(4px); }

.h2 .nav-ctas { display: flex; align-items: center; gap: 16px; }
.h2 .nav-ctas .signin { color: var(--soft); font-size: 18px; }

/* ============ NAV DRAWER (≤1024px) ============ */
/* Below 1024px the link cluster + both CTAs no longer fit the floating bar
   (they wrap at ~900px), so the links collapse into a hamburger drawer that
   drops down inside the same rounded nav card. The breakpoint must match
   the matchMedia query in SiteNav that auto-closes the drawer. */
.h2 .nav-toggle, .h2 .nav-drawer { display: none; }
.h2 .nav-toggle {
  width: 40px; height: 40px; border-radius: 10px; flex: 0 0 auto;
  flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: var(--ink); transition: background 0.15s ease;
}
.h2 .nav-toggle:hover { background: rgba(21, 28, 42, 0.05); }
.h2 .nav-toggle span {
  display: block; width: 18px; height: 1.5px; border-radius: 2px; background: currentColor;
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.2s ease;
}
.h2 .nav.is-open .nav-toggle span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.h2 .nav.is-open .nav-toggle span:nth-child(2) { opacity: 0; }
.h2 .nav.is-open .nav-toggle span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

@media (max-width: 1024px) {
  .h2 .nav { height: auto; flex-direction: column; align-items: stretch; top: 14px; width: calc(100% - 32px); border-radius: 18px; }
  .h2 .nav .inner { height: 64px; padding: 0 12px 0 20px; gap: 12px; }
  .h2 .nav-menu { display: none; }
  .h2 .nav-ctas { gap: 10px; }
  .h2 .nav-toggle { display: inline-flex; }
  .h2 .nav.is-open { background: rgba(251, 250, 248, 0.98); }
  .h2 .nav-drawer {
    display: flex; flex-direction: column; gap: 18px;
    padding: 6px 20px 20px; max-height: calc(100svh - 100px); overflow-y: auto;
    border-top: 1px solid var(--line);
  }
  .h2 .nav-drawer[hidden] { display: none; }
}
@media (max-width: 560px) {
  .h2 .nav-ctas .signin, .h2 .nav-ctas > .btn { display: none; }
}
.h2 .nav-drawer-label {
  margin-top: 14px; font-family: var(--font-dm-mono), ui-monospace, monospace;
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--whisper);
}
.h2 .nav-drawer-products { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; margin-top: -8px; }
.h2 .nav-drawer-product {
  display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px;
  border: 1px solid var(--line-2); background: #fff; transition: border-color 0.15s ease;
}
.h2 .nav-drawer-product:hover { border-color: var(--line); background: var(--bg-paper); }
.h2 .nav-drawer-product .mega-product-ic { width: 38px; height: 38px; margin: 0; }
.h2 .nav-drawer-product-t { display: block; font-family: var(--font-sora), sans-serif; font-weight: 600; font-size: 15px; color: var(--ink); }
.h2 .nav-drawer-product-s { display: block; font-family: var(--font-dm-sans-h2); font-weight: 300; font-size: 12.5px; color: var(--muted); line-height: 1.4; margin-top: 2px; }
.h2 .nav-drawer-links { display: flex; flex-direction: column; }
.h2 .nav-drawer-links a, .h2 .nav-drawer-links .nav-link-btn {
  text-align: left;
  padding: 13px 2px; font-size: 17px; color: var(--soft); border-bottom: 1px solid var(--line);
}
.h2 .nav-drawer-links > :last-child { border-bottom: none; }
.h2 .nav-drawer-links a.is-active, .h2 .nav-drawer-links a:hover, .h2 .nav-drawer-links .nav-link-btn:hover { color: var(--ink); }
.h2 .nav-drawer-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.h2 .nav-drawer-actions > :only-child { grid-column: 1 / -1; }
.h2 .nav-drawer-actions .btn { white-space: nowrap; padding: 0 14px; }
/* above 560px the bar itself still shows these CTAs (see .nav-ctas above) */
@media (min-width: 561px) { .h2 .nav-drawer-actions { display: none; } }
@media (max-width: 380px) { .h2 .nav-drawer-actions { grid-template-columns: 1fr; } }

.h2 .nav-link-btn { padding: 0; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: 8px;
  font-family: var(--font-dm-sans-h2), sans-serif; font-weight: 500; font-size: 14px; line-height: 1;
  transition: transform 0.12s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue); color: #fff; position: relative; overflow: hidden; }
.btn-primary:hover {
  background: #0d39e6;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -8px rgba(240, 174, 60, 0.55), 0 6px 16px -6px rgba(23, 71, 255, 0.5);
}
.btn-primary::after {
  content: ""; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
  background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.35) 50%, transparent 100%);
  transform: skewX(-18deg); transition: left 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.btn-primary:hover::after { left: 140%; }
.btn-ghost { background: #fff; color: var(--blue); border: 1px solid var(--blue); }
.btn-ghost:hover { background: rgba(23, 71, 255, 0.05); }
.btn-lg { height: 52px; padding: 0 26px; font-size: 15px; }
.btn-arrow { display: inline-block; width: 14px; height: 14px; position: relative; transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1); }
.btn:hover .btn-arrow { transform: translateX(4px); }
.btn-arrow::before, .btn-arrow::after { content: ""; position: absolute; background: currentColor; }
.btn-arrow::before { left: 1px; top: 6px; width: 10px; height: 1.5px; }
.btn-arrow::after { right: 1px; top: 3px; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-top: 1.5px solid currentColor; background: transparent; transform: rotate(45deg); }

/* ============ FOOTER ============ */
.h2 .foot { background: #fff; position: relative; z-index: 1; }
.h2 .foot-card { position: relative; overflow: hidden; }
.h2 .foot .reveal { transform: translateY(44px); transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.16, 1, 0.3, 1); }
.h2 .foot-top { max-width: 1436px; margin: 0 auto; padding: 56px 40px 48px; display: flex; justify-content: space-between; gap: 80px; }
.h2 .foot-brand { max-width: 340px; flex: 0 0 340px; }
.h2 .foot-mark { display: inline-flex; align-items: center; gap: 10px; }
.h2 .foot-mark .brand-mark { width: 32px; height: 27px; }
.h2 .foot-brand-name { font-family: var(--font-sora), sans-serif; font-weight: 700; font-size: 24px; color: var(--ink); }
.h2 .foot-tagline { margin: 18px 0 0; color: var(--muted); font-size: 16.5px; line-height: 1.65; }
.h2 .foot-socials { display: flex; gap: 10px; margin-top: 24px; }
.h2 .foot-social-icon {
  width: 42px; height: 42px; border-radius: 999px; border: 1px solid var(--line-2);
  display: inline-flex; align-items: center; justify-content: center; color: var(--muted);
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.h2 .foot-social-icon:hover { color: var(--ink); border-color: var(--line); transform: translateY(-2px); }
.h2 .foot-social-icon svg { width: 18px; height: 18px; }
.h2 .foot-inner { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; flex: 1; }
.h2 .foot h5 { font-family: var(--font-questrial); font-size: 16px; color: var(--ink); font-weight: 700; margin: 0 0 22px; }
.h2 .foot ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.h2 .foot ul li { color: var(--muted); font-size: 16.5px; }
.h2 .foot ul a { display: inline-block; color: var(--muted); font-size: 16.5px; transition: color 0.2s ease, transform 0.2s ease; }
.h2 .foot ul a:hover { color: var(--ink); transform: translateX(4px); }
.h2 .foot-bottom {
  max-width: 1436px; margin: 0 auto; padding: 24px 40px;
  border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center;
  color: var(--whisper); font-family: var(--font-dm-sans-h2); font-weight: 400; font-size: 15px;
}
.h2 .foot-bottom .links { display: flex; gap: 24px; }
.h2 .foot-bottom .links a { color: var(--whisper); }
.h2 .foot-bottom .links a:hover { color: var(--muted); }
.h2 .foot-wordmark-wrap { margin-top: 8px; overflow: hidden; }
.h2 .foot-wordmark {
  margin: 0; padding: 0 16px; display: flex; justify-content: center; align-items: baseline;
  white-space: nowrap; position: relative;
  font-family: var(--font-sora), sans-serif; font-weight: 700;
  font-size: clamp(90px, 16vw, 260px); line-height: 0.8;
  color: rgba(16, 21, 34, 0.045);
  padding-bottom: 0.12em;
}
.h2 .foot-wordmark-letter { display: inline-block; margin-right: -0.035em; }
.h2 .foot-wordmark-letter:last-child { margin-right: 0; }

/* ============ SCROLL-REVEAL ============ */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.delay-1 { transition-delay: 0.08s; }
.reveal.delay-2 { transition-delay: 0.16s; }
.reveal.delay-3 { transition-delay: 0.24s; }
.reveal.delay-4 { transition-delay: 0.32s; }
.reveal.delay-5 { transition-delay: 0.40s; }
.reveal.delay-6 { transition-delay: 0.48s; }

@media (max-width: 1100px) {
  .h2 .foot-top { flex-direction: column; gap: 40px; padding: 40px 32px 32px; }
  .h2 .foot-brand { max-width: none; flex-basis: auto; }
  .h2 .foot-inner { grid-template-columns: 1fr 1fr; }
  .h2 .foot-bottom { padding: 24px 32px; flex-direction: column; gap: 12px; align-items: flex-start; }
  .h2 .foot-wordmark { font-size: clamp(48px, 17vw, 120px); }
}
@media (min-width: 600px) and (max-width: 1100px) {
  .h2 .foot-inner { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
  .h2 .foot-top { padding: 40px 16px 32px; }
  .h2 .foot-bottom { padding: 24px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .h2 .foot .reveal { opacity: 1; transform: none; transition: none; }
  .h2 .nav { transition: background 0.35s ease, box-shadow 0.35s ease; }
  .h2 .nav.is-hidden { transform: translateX(-50%); }
}
