/* ================================================================
   BIFI Research — visual system
   Teal base, editorial serif headlines, monospace research codes.
   ================================================================ */

:root {
  --ink: #06211D;
  --teal-900: #0B3B35;
  --teal-700: #0F5A50;
  --teal-500: #148372;
  --teal-300: #6FBFAF;
  --mist: #EAF2F0;
  --paper: #FFFFFF;
  --paper-2: #F6F9F8;
  --line: #D8E4E1;
  --line-soft: #E9F0EE;
  --muted: #566C68;
  --brass: #A9762F;
  --brass-soft: #F3E8D6;

  --display: "Newsreader", Georgia, "Times New Roman", serif;
  --body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --wrap: 1180px;
  --gutter: 24px;
  --radius: 2px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16.5px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-700); text-decoration: none; }
a:hover { color: var(--teal-500); }
:focus-visible { outline: 2px solid var(--teal-500); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; }
.skip {
  position: absolute; left: -9999px; top: 0; background: var(--teal-900); color: #fff;
  padding: 10px 16px; z-index: 200;
}
.skip:focus { left: 12px; top: 12px; }

/* ------------------------------------------------------------ masthead --- */
.masthead {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.masthead-in { display: flex; align-items: center; gap: 28px; height: 68px; }
.wordmark {
  font-family: var(--display); font-size: 21px; letter-spacing: -.01em;
  color: var(--teal-900); white-space: nowrap;
}
.wordmark-b { font-weight: 500; }
.wordmark-dot { color: var(--teal-300); }
.wordmark-r { font-weight: 300; font-style: italic; }
.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a {
  font-size: 14.5px; color: var(--ink); position: relative; padding: 4px 0;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px;
  background: var(--teal-500); transition: right .25s ease;
}
.nav a:hover::after, .nav a.is-here::after { right: 0; }
.nav-cta { margin-left: 4px; }

.burger { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.burger span { display: block; width: 22px; height: 1.5px; background: var(--ink); margin: 5px 0; transition: transform .25s ease; }
.burger[aria-expanded="true"] span:first-child { transform: translateY(3.2px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-3.2px) rotate(-45deg); }
.mobile-nav { display: none; flex-direction: column; border-top: 1px solid var(--line); background: #fff; }
.mobile-nav a { padding: 14px var(--gutter); border-bottom: 1px solid var(--line-soft); color: var(--ink); }
.mobile-mail { font-family: var(--mono); font-size: 13px; color: var(--teal-700) !important; }

/* --------------------------------------------------------------- buttons -- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--teal-900); color: #fff; border: 1px solid var(--teal-900);
  padding: 13px 24px; border-radius: var(--radius); font-size: 14.5px; font-weight: 500;
  cursor: pointer; transition: background .2s ease, color .2s ease, transform .2s ease;
}
.btn:hover { background: var(--teal-700); border-color: var(--teal-700); color: #fff; transform: translateY(-1px); }
.btn-sm { padding: 9px 16px; font-size: 13.5px; }
.btn-ghost { background: transparent; color: var(--teal-900); border-color: var(--line); }
.btn-ghost:hover { background: var(--mist); color: var(--teal-900); border-color: var(--teal-300); }
.btn-buy { background: var(--brass); border-color: var(--brass); }
.btn-buy:hover { background: #8F6224; border-color: #8F6224; }
.btn-wide { width: 100%; justify-content: center; }

/* ------------------------------------------------------------------ hero -- */
.hero {
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(1100px 380px at 88% -60%, rgba(20,131,114,.13), transparent 70%),
    linear-gradient(180deg, var(--paper-2), var(--paper));
}
.hero-in { padding: 62px 0 44px; max-width: 940px; }
.hero-eyebrow { color: var(--teal-700); display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.hero-eyebrow::before { content: ""; width: 34px; height: 1px; background: var(--teal-500); display: block; }
.hero h1 {
  font-family: var(--display); font-weight: 400; font-size: clamp(34px, 5.1vw, 62px);
  line-height: 1.08; letter-spacing: -.022em; margin: 0 0 22px;
}
.hero h1 em { font-style: italic; font-weight: 300; color: var(--teal-700); }
.hero-sub { font-size: 18px; color: var(--muted); max-width: 62ch; margin: 0 0 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-strip {
  border-top: 1px solid var(--line-soft); margin-top: 40px; padding-top: 16px;
  display: flex; flex-wrap: wrap; gap: 10px 26px; color: var(--muted);
}
.hero-strip a { color: var(--muted); }
.hero-strip a:hover { color: var(--teal-700); }

/* -------------------------------------------------------------- sections -- */
.section { padding: 56px 0; }
.section-tight { padding: 40px 0; }
.section-alt { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 20px; margin-bottom: 26px; padding-bottom: 14px; border-bottom: 1px solid var(--line);
}
.section-head h2 {
  font-family: var(--display); font-weight: 400; font-size: clamp(24px, 3vw, 33px);
  letter-spacing: -.015em; margin: 0;
}
.section-head .mono { color: var(--muted); white-space: nowrap; }

/* ------------------------------------------------------------------ feed -- */
.feed { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; }
.card { background: var(--paper); outline: 1px solid var(--line); transition: background .2s ease; }
.card:hover { background: var(--paper-2); }
.card-link { display: flex; flex-direction: column; height: 100%; padding: 24px 22px 20px; color: inherit; }
.card-tape { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.card-tape .code { color: var(--teal-500); }
.card-tape .sector {
  color: var(--teal-900); background: var(--mist); padding: 3px 8px; border-radius: var(--radius);
  font-size: 10.5px;
}
.card-title {
  font-family: var(--display); font-weight: 400; font-size: 21px; line-height: 1.24;
  letter-spacing: -.012em; margin: 0 0 10px;
}
.card:hover .card-title { color: var(--teal-700); }
.card-dek { color: var(--muted); font-size: 14.6px; line-height: 1.55; margin: 0 0 22px; }
.card-foot {
  margin-top: auto; display: flex; justify-content: space-between; align-items: center;
  gap: 12px; padding-top: 14px; border-top: 1px solid var(--line-soft); color: var(--muted);
}
.card-price { color: var(--brass); }

.empty {
  border: 1px dashed var(--line); padding: 46px 24px; text-align: center; color: var(--muted);
  background: var(--paper-2);
}

/* --------------------------------------------------------------- filters -- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.chip {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase;
  border: 1px solid var(--line); padding: 7px 13px; border-radius: 999px; color: var(--muted);
  background: #fff;
}
.chip:hover { border-color: var(--teal-300); color: var(--teal-700); }
.chip.is-on { background: var(--teal-900); border-color: var(--teal-900); color: #fff; }

/* --------------------------------------------------------------- article -- */
.article-head { border-bottom: 1px solid var(--line); background: var(--paper-2); }
.article-head-in { padding: 42px 0 34px; max-width: 820px; }
.crumbs { color: var(--muted); margin-bottom: 20px; display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--teal-700); }
.article-head h1 {
  font-family: var(--display); font-weight: 400; font-size: clamp(29px, 4.2vw, 47px);
  line-height: 1.12; letter-spacing: -.02em; margin: 0 0 16px;
}
.article-dek { font-size: 18.5px; color: var(--muted); margin: 0 0 24px; max-width: 60ch; }
.article-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--muted); align-items: center; }
.article-meta .code { color: var(--teal-500); }

.article-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 56px;
  padding: 46px 0 64px; align-items: start;
}
.prose { max-width: 68ch; font-size: 17.4px; }
.prose > *:first-child { margin-top: 0; }
.prose p { margin: 0 0 1.15em; }
.prose h2 {
  font-family: var(--display); font-weight: 400; font-size: 27px; letter-spacing: -.014em;
  margin: 2em 0 .55em; line-height: 1.25;
}
.prose h3 { font-family: var(--display); font-weight: 500; font-size: 21px; margin: 1.7em 0 .5em; }
.prose ul, .prose ol { margin: 0 0 1.2em; padding-left: 1.15em; }
.prose li { margin-bottom: .45em; }
.prose blockquote {
  margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 2px solid var(--teal-500);
  font-family: var(--display); font-size: 21px; line-height: 1.45; color: var(--teal-900);
}
.prose blockquote p { margin: 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.2em 0; }
.prose code { font-family: var(--mono); font-size: .88em; background: var(--mist); padding: 2px 5px; }
.prose a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

.hero-figure { margin: 0 0 34px; }
.hero-figure img { width: 100%; border: 1px solid var(--line); }

/* -------------------------------------------------- the sealed report card */
.sealed {
  margin: 46px 0 0; background: var(--teal-900); color: #EAF2F0; border-radius: var(--radius);
  overflow: hidden; position: relative;
}
.sealed::before {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(135deg, rgba(255,255,255,.028) 0 2px, transparent 2px 9px);
  pointer-events: none;
}
.sealed-in { padding: 34px 32px 32px; position: relative; }
.sealed-stamp {
  display: inline-flex; align-items: center; gap: 9px; color: var(--brass-soft);
  border: 1px solid rgba(243,232,214,.32); padding: 6px 12px; border-radius: var(--radius);
  margin-bottom: 20px;
}
.sealed-stamp::before { content: ""; width: 6px; height: 6px; background: var(--brass-soft); border-radius: 50%; }
.sealed h2 {
  font-family: var(--display); font-weight: 400; font-size: 27px; letter-spacing: -.014em;
  margin: 0 0 8px; color: #fff;
}
.sealed p.sealed-lead { color: rgba(234,242,240,.76); margin: 0 0 22px; max-width: 54ch; font-size: 15.6px; }
.sealed-list { list-style: none; margin: 0 0 26px; padding: 0; display: grid; gap: 11px; }
.sealed-list li {
  display: grid; grid-template-columns: 15px 1fr; gap: 12px; align-items: start;
  font-size: 15.4px; color: rgba(234,242,240,.94);
}
.sealed-list li::before {
  content: ""; margin-top: 9px; width: 15px; height: 1px; background: var(--teal-300);
}
.sealed-bars { display: grid; gap: 9px; margin: 0 0 26px; }
.sealed-bar { height: 9px; background: rgba(234,242,240,.11); border-radius: 1px; }
.sealed-bar:nth-child(1) { width: 92%; }
.sealed-bar:nth-child(2) { width: 78%; }
.sealed-bar:nth-child(3) { width: 86%; }
.sealed-buy {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
  border-top: 1px solid rgba(234,242,240,.17); padding-top: 22px;
}
.sealed-price { font-family: var(--display); font-size: 32px; color: #fff; line-height: 1; }
.sealed-price small { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; color: rgba(234,242,240,.6); display: block; margin-top: 7px; text-transform: uppercase; }
.sealed-terms { font-size: 12.5px; color: rgba(234,242,240,.62); margin: 14px 0 0; }
.sealed-terms a { color: var(--brass-soft); text-decoration: underline; text-underline-offset: 2px; }
.sealed-email {
  background: rgba(255,255,255,.07); border: 1px solid rgba(234,242,240,.22); color: #fff;
  padding: 12px 14px; border-radius: var(--radius); font-family: var(--body); font-size: 14.5px;
  min-width: 230px; flex: 1 1 200px;
}
.sealed-email::placeholder { color: rgba(234,242,240,.5); }

/* ---------------------------------------------------------------- aside --- */
.aside { position: sticky; top: 92px; display: grid; gap: 22px; }
.panel { border: 1px solid var(--line); padding: 20px; background: var(--paper); }
.panel h3 {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 14px; font-weight: 500;
}
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.facts li { display: flex; justify-content: space-between; gap: 14px; font-size: 14.4px; border-bottom: 1px solid var(--line-soft); padding-bottom: 10px; }
.facts li:last-child { border-bottom: 0; padding-bottom: 0; }
.facts span:first-child { color: var(--muted); }
.facts span:last-child { text-align: right; font-weight: 500; }
.rel { display: grid; gap: 14px; }
.rel a { display: block; color: var(--ink); font-family: var(--display); font-size: 16.5px; line-height: 1.3; }
.rel a:hover { color: var(--teal-700); }
.rel .mono { display: block; color: var(--teal-500); margin-bottom: 4px; }

/* ------------------------------------------------------------------ page -- */
.page-head { border-bottom: 1px solid var(--line); background: var(--paper-2); }
.page-head-in { padding: 52px 0 40px; max-width: 780px; }
.page-head h1 {
  font-family: var(--display); font-weight: 400; font-size: clamp(30px, 4.4vw, 50px);
  line-height: 1.1; letter-spacing: -.02em; margin: 14px 0 18px;
}
.page-head p { font-size: 18px; color: var(--muted); margin: 0; max-width: 60ch; }

.about-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 56px; align-items: start; }
.about-prose p { font-size: 18px; margin: 0 0 1.1em; }
.about-prose p:first-child { font-family: var(--display); font-size: 22px; line-height: 1.45; color: var(--teal-900); }
.stat-block { border-left: 2px solid var(--teal-500); padding-left: 20px; margin-bottom: 28px; }
.stat-block b { font-family: var(--display); font-size: 34px; font-weight: 400; display: block; line-height: 1; }
.stat-block span { color: var(--muted); font-size: 14.5px; }

.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.how-step h3 { font-family: var(--display); font-weight: 400; font-size: 20px; margin: 12px 0 8px; }
.how-step p { color: var(--muted); font-size: 15px; margin: 0; }
.how-step .mono { color: var(--teal-500); }

/* ------------------------------------------------------------------ form -- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 56px; align-items: start; }
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea {
  font-family: var(--body); font-size: 15.5px; color: var(--ink); background: #fff;
  border: 1px solid var(--line); padding: 12px 14px; border-radius: var(--radius); width: 100%;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--teal-500); outline: none; box-shadow: 0 0 0 3px rgba(20,131,114,.12); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hp { position: absolute; left: -9999px; }
.note { font-size: 13px; color: var(--muted); margin: 0; }
.note a { text-decoration: underline; text-underline-offset: 2px; }
.alert { padding: 14px 16px; border-radius: var(--radius); font-size: 15px; border: 1px solid; }
.alert-ok { background: var(--mist); border-color: var(--teal-300); color: var(--teal-900); }
.alert-bad { background: #FDF0EC; border-color: #E9C4B8; color: #8A3C22; }

.contact-side { border: 1px solid var(--line); padding: 26px; background: var(--paper-2); }
.contact-side h2 { font-family: var(--display); font-weight: 400; font-size: 24px; margin: 0 0 12px; }
.contact-side p { color: var(--muted); font-size: 15.4px; }
.contact-mail {
  display: block; font-family: var(--mono); font-size: 15px; letter-spacing: .02em;
  border-top: 1px solid var(--line); margin-top: 20px; padding-top: 20px; color: var(--teal-700);
}

/* ----------------------------------------------------------------- legal -- */
.legal { max-width: 70ch; padding: 46px 0 64px; }
.legal h2 { font-family: var(--display); font-weight: 400; font-size: 24px; margin: 2em 0 .5em; }
.legal h2:first-of-type { margin-top: 1em; }
.legal p, .legal li { color: #223B37; font-size: 16px; }
.legal .updated { font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* ------------------------------------------------------------------ CTA --- */
.cta-band { background: var(--teal-900); color: #fff; }
.cta-in { padding: 54px 0; display: flex; flex-wrap: wrap; gap: 26px; align-items: center; justify-content: space-between; }
.cta-in h2 { font-family: var(--display); font-weight: 400; font-size: clamp(24px, 3.3vw, 34px); margin: 0 0 8px; letter-spacing: -.015em; }
.cta-in p { color: rgba(234,242,240,.75); margin: 0; max-width: 52ch; }
.cta-band .btn { background: #fff; color: var(--teal-900); border-color: #fff; }
.cta-band .btn:hover { background: var(--mist); color: var(--teal-900); border-color: var(--mist); }

/* ---------------------------------------------------------------- footer -- */
.foot { background: var(--paper-2); border-top: 1px solid var(--line); margin-top: 0; }
.foot-in { display: grid; grid-template-columns: 1.4fr 2fr; gap: 48px; padding: 52px 0 40px; }
.foot-brand p { color: var(--muted); font-size: 14.6px; max-width: 42ch; margin: 14px 0 18px; }
.foot-mail { font-family: var(--mono); font-size: 13px; color: var(--teal-700); }
.foot-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.foot-cols h3 {
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 14px; font-weight: 500;
}
.foot-cols a { display: block; color: var(--ink); font-size: 14.6px; margin-bottom: 9px; }
.foot-cols a:hover { color: var(--teal-700); }
.foot-base {
  border-top: 1px solid var(--line); padding: 18px 24px 30px; display: flex;
  flex-wrap: wrap; gap: 8px 24px; justify-content: space-between;
}
.foot-base p { margin: 0; font-size: 13px; color: var(--muted); }
.foot-note a { text-decoration: underline; text-underline-offset: 2px; }

/* --------------------------------------------------------------- states --- */
.notice { padding: 60px 0; text-align: center; max-width: 60ch; margin: 0 auto; }
.notice h1 { font-family: var(--display); font-weight: 400; font-size: 44px; margin: 0 0 12px; }
.notice p { color: var(--muted); margin: 0 0 26px; }

.success-box { max-width: 640px; padding: 60px 0; }
.success-box h1 { font-family: var(--display); font-weight: 400; font-size: 40px; margin: 12px 0 14px; }

/* ------------------------------------------------------------ responsive -- */
@media (max-width: 980px) {
  .article-grid { grid-template-columns: 1fr; gap: 40px; }
  .aside { position: static; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 34px; }
  .feed { grid-template-columns: repeat(2, 1fr); }
  .foot-in { grid-template-columns: 1fr; gap: 34px; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav, .nav-cta { display: none; }
  .burger { display: block; margin-left: auto; }
  .mobile-nav { display: none; }
  .mobile-nav.is-open { display: flex; }
  .hero-in { padding: 44px 0 34px; }
  .feed { grid-template-columns: 1fr; }
  .how { grid-template-columns: 1fr; gap: 24px; }
  .form-row { grid-template-columns: 1fr; }
  .foot-cols { grid-template-columns: 1fr 1fr; }
  .sealed-in { padding: 26px 20px; }
  .cta-in { padding: 40px 0; }
  .prose { font-size: 16.8px; }
}
