/*
 * Uber Fife public stylesheet. Mobile first; breakpoints 600 / 960 / 1280.
 * Path: /home/designfi/uberfife.com/public-assets/css/site.css
 */
@font-face {
  font-family: "Inter";
  src: url("/public-assets/fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #000000;
  --paper: #ffffff;
  --card: #f3f3f3;
  --card-hover: #e8e8e8;
  --line: #e2e2e2;
  --muted: #5e5e5e;
  --focus: #1f5eff;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --r-sm: 8px;
  --r-md: 16px;
  --r-pill: 999px;
  --wrap: 1200px;
  --gutter: 1.25rem;
  --space: clamp(3rem, 8vw, 6rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  font-feature-settings: "cv11", "ss01";
}
img, svg, video { max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.18em; }
h1, h2, h3 { margin: 0; line-height: 1.08; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 0.75rem 1rem; border-radius: var(--r-sm);
}
.skip:focus { top: 1rem; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
main:focus { outline: none; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.icon { width: 1.5rem; height: 1.5rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Wordmark */
.wordmark {
  font-weight: 800; font-size: 1.25rem; letter-spacing: -0.01em; text-decoration: none; white-space: nowrap;
}

/* Header and menu */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: 1px solid var(--line); }
.site-header__inner {
  max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter);
  height: 4rem; display: flex; align-items: center; justify-content: space-between;
}
.menu-open, .menu-close {
  display: inline-flex; align-items: center; justify-content: center;
  width: 3rem; height: 3rem; margin-right: -0.75rem; border-radius: var(--r-pill); color: var(--ink);
}
.menu-open:hover, .menu-close:hover { background: var(--card); }
.header-search {
  display: inline-flex; align-items: center; justify-content: center;
  width: 3rem; height: 3rem; margin-left: auto; margin-right: 0.25rem; border-radius: var(--r-pill); color: var(--ink);
}
.header-search:hover, .header-search[aria-current="page"] { background: var(--card); }

.site-menu { display: none; }
.site-menu:target, .site-menu.is-open {
  display: flex; flex-direction: column;
  position: fixed; inset: 0; z-index: 60; background: var(--paper); overflow-y: auto;
}
.site-menu__top {
  height: 4rem; flex: none; display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--gutter); border-bottom: 1px solid var(--line);
}
.site-menu__list { list-style: none; margin: 0; padding: 1rem var(--gutter) 3rem; }
.site-menu__list a {
  display: block; padding: 0.7rem 0; font-size: clamp(1.75rem, 8vw, 2.5rem); font-weight: 700;
  letter-spacing: -0.02em; line-height: 1.15; text-decoration: none;
}
.site-menu__list a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 3px; }
body.menu-open { overflow: hidden; }

@media (min-width: 960px) {
  .menu-open, .menu-close, .site-menu__top { display: none; }
  .site-menu, .site-menu:target, .site-menu.is-open {
    display: block; position: static; background: none; overflow: visible;
  }
  .site-menu__list { display: flex; gap: 0.25rem; padding: 0; }
  .header-search { order: 3; margin-left: 0.5rem; margin-right: -0.75rem; }
  .site-menu { margin-left: auto; }
  .site-menu__list a {
    font-size: 0.95rem; font-weight: 600; letter-spacing: 0; padding: 0.5rem 0.8rem; border-radius: var(--r-pill);
  }
  .site-menu__list a:hover { background: var(--card); }
  .site-menu__list a[aria-current="page"] { background: var(--card); text-decoration: none; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 3rem; padding: 0.75rem 1.4rem; border: 0; border-radius: var(--r-sm);
  font: inherit; font-weight: 600; font-size: 1rem; line-height: 1.2; text-decoration: none; cursor: pointer;
}
.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary:hover { background: #333333; }
.btn--secondary { background: var(--card); color: var(--ink); }
.btn--secondary:hover { background: var(--card-hover); }
.btn--inverse { background: var(--paper); color: var(--ink); }
.btn--inverse:hover { background: var(--card); }

/* Hero */
.hero { padding: clamp(2.5rem, 9vw, 7rem) 0 var(--space); }
.hero__title {
  font-size: clamp(2.6rem, 10vw, 5.5rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.02;
  max-width: 14ch;
}
.hero__lede { margin-top: 1.5rem; font-size: clamp(1.125rem, 2.4vw, 1.375rem); color: var(--muted); max-width: 38rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.hero--error .hero__title { max-width: 18ch; }
.error-code { font-weight: 700; color: var(--muted); margin-bottom: 1rem; }
.error-ref { color: var(--muted); font-size: 0.9rem; }

/* Sections */
.section-title { font-size: clamp(1.75rem, 5vw, 2.75rem); font-weight: 800; margin-bottom: 1.5rem; }
.explore { padding-bottom: var(--space); }

/* Cards */
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.card__link {
  position: relative; display: flex; flex-direction: column; gap: 0.5rem; height: 100%;
  padding: 1.5rem 1.5rem 3.75rem; background: var(--card); border-radius: var(--r-md); text-decoration: none;
}
.card__link:hover { background: var(--card-hover); }
.card__title { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.card__text { color: var(--muted); }
.card__arrow { position: absolute; left: 1.5rem; bottom: 1.5rem; }
@media (min-width: 600px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .cards { grid-template-columns: repeat(3, 1fr); gap: 1rem; }
  .cards .card:first-child { grid-row: span 2; }
  .cards .card:first-child .card__title { font-size: 2.25rem; }
}

/* Black band */
.band { background: var(--ink); color: var(--paper); padding: var(--space) 0; }
.band__title { font-size: clamp(1.9rem, 6vw, 3.5rem); font-weight: 800; max-width: 18ch; }
.band__text { margin: 1.25rem 0 2rem; max-width: 36rem; color: #cfcfcf; font-size: 1.125rem; }
.band :focus-visible { outline-color: var(--paper); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 3rem 0 4rem; }
.page-home .site-footer { border-top: 0; }
.site-footer__inner { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.wordmark--footer { display: inline-block; margin-bottom: 1.5rem; font-size: 1.5rem; }
.site-footer__links { list-style: none; margin: 0 0 2rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; }
.site-footer__links a { display: inline-block; padding: 0.4rem 0; font-weight: 600; text-decoration: none; }
.site-footer__links a:hover { text-decoration: underline; }
.site-footer__about { max-width: 34rem; }
.site-footer__legal { color: var(--muted); font-size: 0.875rem; max-width: 40rem; }

/* Shared components used by several modules (Phase 7: previously copied into each module's CSS) */
.chips { display: flex; gap: 0.5rem; overflow-x: auto; padding-bottom: 0.5rem; margin-bottom: 1.5rem; scrollbar-width: thin; }
.chips a { flex: none; padding: 0.5rem 1rem; border-radius: var(--r-pill); background: var(--card); text-decoration: none; font-weight: 600; font-size: 0.95rem; white-space: nowrap; }
.chips a:hover { background: var(--card-hover); }
.chips a[aria-current="page"] { background: var(--ink); color: var(--paper); }
.article__kind { margin: 0 0 1rem; font-weight: 700; }
.article__kind a { text-decoration: none; padding: 0.35rem 0.8rem; background: var(--card); border-radius: var(--r-pill); font-size: 0.9rem; }
.news__pager { display: flex; align-items: center; gap: 1rem; margin-top: 2rem; }

/* Touch screens: every control at least 44px tall. Desktop mice are unaffected. */
@media (pointer: coarse) {
  .chips a { display: inline-flex; align-items: center; min-height: 2.75rem; }
  .site-footer__links a { padding: 0.75rem 0; }
  .article__kind a { display: inline-flex; align-items: center; min-height: 2.75rem; }
}

@media (min-width: 960px) {
  :root { --gutter: 2rem; }
  .site-header__inner { height: 4.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Printing a public page: content only, readable in black and white, with link addresses for sources. */
@media print {
  .site-header, .skip, .band, .hero__actions, .chips, .news__pager, .docs__filterbox, .docs__search, .docs__pager,
  .fund__donate, .fund__note, .case__toc, .block--cta, .report__form, .site-footer__links { display: none !important; }
  body { font-size: 11pt; line-height: 1.45; }
  .site-footer { border-top: 1px solid #999; padding: 1rem 0 0; }
  .wordmark--footer { margin-bottom: 0.5rem; font-size: 12pt; }
  .feature, .feature--dark, .fund, .doc-file, .card__link, .news-card__link, .case__items a { background: none !important; color: #000 !important; border: 1px solid #999; }
  a { text-decoration: underline; }
  .sources__list a[href^="http"]::after, .doc-meta a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; overflow-wrap: anywhere; }
  h1, h2, h3 { break-after: avoid; }
  li, figure, .doc, .timeline__entry, .news-card { break-inside: avoid; }
}
