/* ==========================================================================
   Pollab design kit - base.css
   Shared chrome for every page: design tokens, reset/base, typography
   helpers, buttons + floating action buttons, navbar, footer, reveal
   animations, and the shared share/language popover primitives.
   Load first on every page; add one area stylesheet after it
   (site.css, blog.css, or pulse.css).
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */

:root,
[data-theme="light"] {
  /* Surfaces */
  --bg: #f7f5f1;
  --surface: #ffffff;
  --surface-alt: #f1ede3;

  /* Ink */
  --ink: #17273f;
  --ink-2: #46566d;
  --ink-3: #6d7a8b;

  /* Brand */
  --navy: #0a2540;
  --navy-2: #143a5e;
  --gold: #d4af37;
  --gold-2: #b8942c;
  --gold-text: #8f7420;
  --gold-tint: rgba(212, 175, 55, 0.14);
  --gold-line: rgba(212, 175, 55, 0.55);

  /* Lines + elevation */
  --line: rgba(16, 38, 64, 0.14);
  --line-soft: rgba(16, 38, 64, 0.08);
  --btn-line: rgba(16, 38, 64, 0.42);
  --shadow-1: 0 1px 2px rgba(10, 37, 64, 0.05), 0 10px 28px rgba(10, 37, 64, 0.07);

  /* Navy band sections (hero, cta, footer) - same palette as dark mode
     (user decision 2026-07-07: bands look identical in both themes) */
  --band-bg: #0c1a2e;
  --band-ink: #e9edf4;
  --band-ink-2: rgba(233, 237, 244, 0.76);
  --band-ink-3: rgba(233, 237, 244, 0.55);
  --band-line: rgba(233, 237, 244, 0.13);
  --band-btn-line: rgba(233, 237, 244, 0.42);
  --band-gold: #ac7f31;

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --fast: 160ms;
  --base: 240ms;
}

[data-theme="dark"] {
  --bg: #0a1220;
  --surface: #101c2f;
  --surface-alt: #0d1726;

  --ink: #e9edf4;
  --ink-2: rgba(233, 237, 244, 0.76);
  --ink-3: rgba(233, 237, 244, 0.56);

  --navy: #0a2540;
  --navy-2: #143a5e;
  --gold: #ac7f31;
  --gold-2: #c2913f;
  --gold-text: #ac7f31;
  --gold-tint: rgba(172, 127, 49, 0.2);
  --gold-line: rgba(172, 127, 49, 0.6);

  --line: rgba(233, 237, 244, 0.13);
  --line-soft: rgba(233, 237, 244, 0.07);
  --btn-line: rgba(233, 237, 244, 0.42);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.25), 0 10px 28px rgba(0, 0, 0, 0.28);

  --band-bg: #0c1a2e;
  --band-ink: #e9edf4;
  --band-ink-2: rgba(233, 237, 244, 0.76);
  --band-ink-3: rgba(233, 237, 244, 0.55);
  --band-line: rgba(233, 237, 244, 0.13);
  --band-btn-line: rgba(233, 237, 244, 0.42);
  --band-gold: #ac7f31;
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4 {
  font-family: "Lora", ui-serif, Georgia, serif;
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
  color: inherit;
}

p {
  margin: 0 0 1em;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--fast) var(--ease);
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection {
  background: var(--gold);
  color: var(--navy);
}

/* Icon system (inline Lucide sprite) */
.icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.18em;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* Layout containers */
.container {
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 40px);
}

.container-narrow {
  max-width: 800px;
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 40px);
}

.section {
  padding-block: clamp(72px, 9vw, 120px);
}

.section-alt {
  background-color: var(--surface);
}

/* Navy band sections */
.band {
  background-color: var(--band-bg);
  color: var(--band-ink);
}

/* --------------------------------------------------------------------------
   3. Typography helpers
   -------------------------------------------------------------------------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--gold-text);
  margin-bottom: 22px;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background-color: var(--gold);
}

.band .eyebrow {
  color: var(--band-gold);
}

.band .eyebrow::before {
  background-color: var(--band-gold);
}

.display {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin-bottom: 0.45em;
}

.section-title {
  font-size: clamp(1.9rem, 3.6vw, 2.75rem);
  max-width: 20ch;
}

.section-title.centered {
  margin-inline: auto;
}

.lead {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.75;
  color: var(--ink-2);
}

.band .lead {
  color: var(--band-ink-2);
}

.text-soft {
  color: var(--ink-2);
}

.text-faint {
  color: var(--ink-3);
}

.text-gold {
  color: var(--gold-text);
}

.text-center {
  text-align: center;
}

.measure {
  max-width: 62ch;
}

.measure-center {
  max-width: 62ch;
  margin-inline: auto;
}

/* Shared editorial primitives (site + blog): the base card surface,
   inner-page hero, and pull quote. Moved from site.css in F46 P08 so
   blog pages keep their card borders/shadows on the split assets. */
.card {
  background-color: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  box-shadow: var(--shadow-1);
}

.page-hero {
  padding-block: clamp(64px, 8vw, 104px) clamp(40px, 5vw, 64px);
  text-align: center;
}

.page-hero .display {
  font-size: clamp(2.2rem, 4.6vw, 3.4rem);
}

.pull-quote {
  border-left: 2px solid var(--gold);
  padding: 6px 0 6px 26px;
  margin: 36px 0 0;
}

.pull-quote p {
  font-family: "Lora", ui-serif, Georgia, serif;
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  line-height: 1.55;
  margin: 0;
}

.pull-quote cite {
  display: block;
  font-style: normal;
  font-family: "Inter", sans-serif;
  font-size: 0.875rem;
  color: var(--ink-3);
  margin-top: 12px;
}

/* Category chip (blog cards + pulse cards; links on the blog). */
.post-cat {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--gold-text);
}

a.post-cat {
  transition: color var(--fast) var(--ease);
}

a.post-cat:hover {
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   4. Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  transition:
    background-color var(--fast) var(--ease),
    border-color var(--fast) var(--ease),
    color var(--fast) var(--ease);
}

.btn .icon {
  width: 1em;
  height: 1em;
}

/* Solid: navy on light surfaces, gold in dark theme */
.btn-solid {
  background-color: var(--navy);
  color: #f5f2e9;
}

.btn-solid:hover {
  background-color: var(--navy-2);
}

[data-theme="dark"] .btn-solid {
  background-color: var(--gold);
  color: #0a1220;
}

[data-theme="dark"] .btn-solid:hover {
  background-color: var(--gold-2);
}

/* Solid inside navy bands: always gold */
.band .btn-solid {
  background-color: var(--band-gold);
  color: #0a2540;
}

.band .btn-solid:hover {
  background-color: #ecd28a;
}

/* Outline */
.btn-outline {
  border-color: var(--btn-line);
  color: var(--ink);
  background-color: transparent;
}

.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold-text);
}

.band .btn-outline {
  border-color: var(--band-btn-line);
  color: var(--band-ink);
}

.band .btn-outline:hover {
  border-color: var(--band-gold);
  color: var(--band-gold);
}

/* Inline text link with arrow */
.link-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--gold-text);
}

.link-more .icon {
  transition: transform var(--fast) var(--ease);
}

.link-more:hover .icon {
  transform: translateX(3px);
}

/* --------------------------------------------------------------------------
   5. Navbar
   -------------------------------------------------------------------------- */

.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--surface);
  border-bottom: 1px solid var(--line-soft);
  /* shadow always on (same as the old scrolled state) */
  box-shadow: var(--shadow-1);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 64px;
}

.nav-logo-img {
  height: 32px;
  width: auto;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.nav-link {
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-2);
}

.nav-link:hover {
  color: var(--ink);
}

.nav-link.active {
  color: var(--ink);
  font-weight: 600;
}

.nav-cta {
  margin-left: 10px;
  padding: 11px 24px;
  font-size: 0.9rem;
}

.btn-sm {
  padding: 9px 18px;
  font-size: 0.85rem;
}

/* Phones: hide the navbar Join / Sign in buttons (still in the drawer) */
@media (max-width: 639px) {
  .nav-actions .btn {
    display: none;
  }
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Theme toggle icon visibility (button itself is a floating .fab) */
[data-theme="light"] .theme-toggle .icon-sun {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

/* Floating action buttons (bottom-right): one slot only. The theme
   switcher shows by default; once the page is scrolled far enough it
   fades out and back-to-top fades in in its place (never both at once). */
.fab-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
}

.fab-stack .theme-toggle {
  display: inline-flex;
  transition:
    opacity var(--base) var(--ease),
    visibility var(--base) var(--ease),
    border-color var(--fast) var(--ease),
    color var(--fast) var(--ease);
}

.fab-stack:has(#toTop.show) .theme-toggle {
  opacity: 0;
  visibility: hidden;
}

.fab {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background-color: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-2);
  box-shadow: var(--shadow-1);
  transition: border-color var(--fast) var(--ease), color var(--fast) var(--ease);
}

.fab:hover {
  border-color: var(--gold);
  color: var(--gold-text);
}

.fab .icon {
  width: 19px;
  height: 19px;
}

#toTop {
  position: absolute;
  right: 0;
  bottom: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity var(--base) var(--ease), visibility var(--base) var(--ease),
    transform var(--base) var(--ease), border-color var(--fast) var(--ease),
    color var(--fast) var(--ease);
}

#toTop.show {
  opacity: 1;
  visibility: visible;
  transform: none;
}

/* Mobile menu button */
.menu-btn {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink);
}

@media (min-width: 1024px) {
  .nav-links {
    display: flex;
  }

  .menu-btn {
    display: none;
  }
}

/* Mobile drawer */
.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background-color: rgba(8, 15, 26, 0.55);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--base) var(--ease), visibility var(--base) var(--ease);
}

.drawer-overlay.show {
  opacity: 1;
  visibility: visible;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 61;
  width: min(320px, 86vw);
  background-color: var(--surface);
  border-left: 1px solid var(--line-soft);
  transform: translateX(100%);
  transition: transform var(--base) var(--ease);
  display: flex;
  flex-direction: column;
  padding: 24px;
}

.drawer.show {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-soft);
}

.drawer-title {
  font-family: "Lora", ui-serif, Georgia, serif;
  font-size: 1.1rem;
}

.drawer-link {
  display: block;
  padding: 14px 4px;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ink-2);
  border-bottom: 1px solid var(--line-soft);
}

.drawer-link.active,
.drawer-link:hover {
  color: var(--ink);
}

.drawer .btn {
  margin-top: 24px;
  width: 100%;
}

/* --------------------------------------------------------------------------
   6. Footer
   -------------------------------------------------------------------------- */

.footer {
  border-top: 1px solid var(--band-line);
}

.footer-main {
  padding-block: clamp(56px, 7vw, 88px);
  display: grid;
  gap: 44px;
}

@media (min-width: 768px) {
  .footer-main {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .footer-main {
    grid-template-columns: 4fr 2fr 3fr 3fr;
  }
}

.footer-logo-img {
  height: 40px;
  width: auto;
  margin-bottom: 20px;
}

.footer-blurb {
  font-size: 0.92rem;
  color: var(--band-ink-2);
  max-width: 34ch;
}

.footer-title {
  font-family: "Lora", ui-serif, Georgia, serif;
  font-size: 1.05rem;
  color: var(--band-gold);
  margin-bottom: 20px;
}

.footer-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.footer-menu a {
  font-size: 0.92rem;
  color: var(--band-ink-2);
}

.footer-menu a:hover {
  color: var(--band-gold);
}

.footer-contact {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.footer-contact li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.92rem;
  color: var(--band-ink-2);
  line-height: 1.6;
}

.footer-contact .icon {
  width: 17px;
  height: 17px;
  margin-top: 4px;
  color: var(--band-gold);
}

.footer-contact a:hover {
  color: var(--band-gold);
}

.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

.social-link {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--band-line);
  color: var(--band-ink-2);
  transition: border-color var(--fast) var(--ease), color var(--fast) var(--ease);
}

.social-link:hover {
  border-color: var(--band-gold);
  color: var(--band-gold);
}

.social-link .icon {
  width: 17px;
  height: 17px;
}

.footer-bottom {
  border-top: 1px solid var(--band-line);
  padding-block: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--band-ink-3);
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
  }
}

.footer-bottom a {
  color: var(--band-ink-2);
}

.footer-bottom a:hover {
  color: var(--band-gold);
}

.footer-legal {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* --------------------------------------------------------------------------
   7. Minimal footer (blog + account pages)
   Compact single-row footer; .footer-bare variant is transparent and
   centered for auth/account pages.
   -------------------------------------------------------------------------- */

.footer-min {
  background-color: var(--band-bg);
  color: var(--band-ink);
  padding-block: 22px;
}

.footer-min-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 18px;
}

.fm-copy {
  order: -1;
  font-size: 0.8rem;
  color: var(--band-ink-3);
}

.fm-links {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.85rem;
}

.fm-links a {
  color: var(--band-ink-2);
}

.fm-links a:hover {
  color: var(--band-gold);
}

/* Bare footer variant (account pages): no background, centered */
.footer-min.footer-bare {
  background-color: transparent;
  color: var(--ink-2);
  padding-block: 16px;
}

.footer-bare .footer-min-inner {
  justify-content: center;
  gap: 8px 22px;
}

.footer-bare .fm-copy {
  order: 0;
  color: var(--ink-3);
}

.footer-bare .fm-links a {
  color: var(--ink-2);
}

.footer-bare .fm-links a:hover {
  color: var(--gold-text);
}

/* --------------------------------------------------------------------------
   8. Reveal on scroll + reduced motion
   -------------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}

.reveal.on {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   9. Shared share + language popover primitives (F38)
   Core pieces used by content areas (blog posts, pulse cards): the share
   popover, its toast, and the language switcher pills. Area-specific
   placement tweaks live in blog.css / pulse.css.
   -------------------------------------------------------------------------- */

.share-wrap {
  position: relative;
  display: inline-flex;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid var(--btn-line);
  background: none;
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color var(--fast) var(--ease), color var(--fast) var(--ease);
}

.share-btn:hover {
  border-color: var(--gold-line);
  color: var(--gold-text);
}

.share-btn .icon {
  width: 14px;
  height: 14px;
}

.share-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 70;
  min-width: 200px;
  padding: 6px;
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-1);
}

.share-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-radius: 9px;
  background: none;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease);
}

.share-item:hover {
  background-color: var(--gold-tint);
  color: var(--gold-text);
}

.share-item .icon {
  width: 15px;
  height: 15px;
  color: var(--ink-3);
}

.share-item:hover .icon {
  color: var(--gold-text);
}

.share-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  padding: 9px 18px;
  border-radius: 999px;
  background-color: var(--band-bg);
  color: var(--band-ink);
  border: 1px solid var(--band-line);
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: var(--shadow-1);
}

/* Language switcher pills */
.lang-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}

.lang-row-center {
  justify-content: center;
}

.lang-icon {
  width: 15px;
  height: 15px;
  color: var(--ink-3);
}

.lang-pill {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 14px;
  transition: border-color var(--fast) var(--ease), color var(--fast) var(--ease);
}

.lang-pill:hover {
  border-color: var(--gold-line);
  color: var(--gold-text);
}

.lang-pill.active {
  border-color: var(--gold-line);
  background-color: var(--gold-tint);
  color: var(--gold-text);
}

