/* =============================================================
   Trends Research — Data-Led Editorial Design System
   Inspired by FT / Economist editorial language.
   Built mobile-first, no framework dependencies.
   ============================================================= */

/* ---------- 1. CSS Variables / Tokens ---------- */
:root {
  /* Brand palette */
  --ink:       #0E1B2C;   /* primary text & nav */
  --ink-soft:  #1F2A3C;
  --paper:     #FAF7F2;   /* page background, warm editorial */
  --white:     #FFFFFF;
  --brand:     #E94E1B;   /* refined Trends orange */
  --brand-deep:#B83A12;
  --highlight: #F2C94C;   /* data callout yellow */
  --charcoal:  #2C2C2C;
  --mute:      #6B6B6B;
  --hairline:  #D9D2C7;
  --tint:      #F0EBE2;   /* secondary band background */

  /* Typography */
  --serif: 'Fraunces', 'Georgia', 'Times New Roman', serif;
  --sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Layout */
  --max:   1240px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --radius: 4px;

  /* Motion */
  --ease: cubic-bezier(.2,.7,.2,1);
}

/* ---------- 2. Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--charcoal);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--brand); }
button { font-family: inherit; cursor: pointer; }

/* ---------- 3. Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.25rem, 5.5vw, 4.25rem); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.75rem); }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.65rem); }
h4 { font-size: 1.1rem; font-family: var(--sans); font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--brand-deep); }
p { margin: 0 0 1rem; max-width: 65ch; }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.35rem); line-height: 1.5; color: var(--ink-soft); max-width: 60ch; }
.eyebrow {
  display: inline-block;
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--brand-deep);
  margin-bottom: 1rem;
}
.eyebrow::before { content: '— '; color: var(--brand); }

/* ---------- 4. Layout ---------- */
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.section { padding: clamp(3rem, 7vw, 6rem) 0; }
.section--tint { background: var(--tint); }
.section--ink  { background: var(--ink); color: #E8E2D6; }
.section--ink h1, .section--ink h2, .section--ink h3 { color: var(--white); }
.section--ink p { color: #C8C2B6; }
.section--ink a { color: var(--white); border-bottom: 1px solid rgba(255,255,255,.4); }
.section--ink a:hover { color: var(--highlight); }
.section__head { max-width: 760px; margin-bottom: 3rem; }
.section__head--center { margin-left: auto; margin-right: auto; text-align: center; }

.grid { display: grid; gap: 2rem; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* ---------- 5. Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250,247,242,.96);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid var(--hairline);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px;
}
.brand-mark {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--serif); font-weight: 700; font-size: 1.4rem;
  color: var(--ink); letter-spacing: -0.02em;
}
.brand-mark img { height: 38px; width: auto; display: block; }
.brand-mark .dot { width: 8px; height: 8px; background: var(--brand); border-radius: 50%; display: inline-block; transform: translateY(-2px); margin: 0 .35rem; }
.brand-mark small { font-family: var(--sans); font-size: .65rem; font-weight: 600; text-transform: uppercase; letter-spacing: .18em; color: var(--mute); display:block; margin-top:2px; }

/* Nav buttons */
.nav__links { display: none; gap: .5rem; align-items: center; }
.nav__links a {
  font-size: .82rem; font-weight: 600; color: var(--ink);
  padding: .5rem .9rem;
  border: 1px solid var(--hairline);
  border-radius: 100px;
  background: var(--white);
  white-space: nowrap;
  transition: all .2s var(--ease);
}
.nav__links a:hover {
  background: var(--ink); color: var(--white);
  border-color: var(--ink);
  transform: translateY(-1px);
}
.nav__links a.is-active {
  background: var(--ink); color: var(--white);
  border-color: var(--ink);
}
.nav__cta { display:none; }
/* Primary CTA in the nav — pill-shaped to match other nav buttons, but orange to stand out */
.nav__cta.btn {
  padding: .5rem 1rem;
  font-size: .82rem;
  border-radius: 100px;
  background: var(--brand);
  border-color: var(--brand);
  color: var(--white);
  margin-left: .25rem;
  box-shadow: 0 0 0 0 rgba(233,78,27,.0);
  transition: all .2s var(--ease);
}
.nav__cta.btn:hover {
  background: var(--brand-deep);
  border-color: var(--brand-deep);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px -4px rgba(233,78,27,.35);
}
.nav__cta.btn.is-active {
  background: var(--brand-deep);
  border-color: var(--brand-deep);
}
@media (max-width: 1180px) {
  .nav__links a { padding: .45rem .75rem; font-size: .78rem; }
  .nav__cta.btn { padding: .45rem .85rem; font-size: .78rem; }
}
.nav-toggle {
  background: none; border: 1px solid var(--hairline); padding: .55rem .75rem; border-radius: var(--radius);
  font-size: .85rem; font-weight: 600; color: var(--ink);
}
@media (min-width: 980px) {
  .nav__links { display: flex; }
  .nav__cta { display: inline-flex; }
  .nav-toggle { display: none; }
}

/* Mobile drawer */
.mobile-nav {
  display: none;
  border-top: 1px solid var(--hairline);
  padding: 1rem 0 1.5rem;
}
.mobile-nav.is-open { display: block; }
.mobile-nav a { display: block; padding: .65rem 0; font-weight: 500; border-bottom: 1px solid var(--hairline); }
.mobile-nav .btn { margin-top: 1rem; }

/* ---------- 6. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--sans); font-weight: 600; font-size: .95rem;
  padding: .85rem 1.4rem;
  border: 1px solid var(--ink); background: var(--ink); color: var(--white);
  border-radius: var(--radius);
  transition: all .2s var(--ease);
  cursor: pointer;
}
.btn:hover { background: var(--brand); border-color: var(--brand); color: var(--white); transform: translateY(-1px); }
.btn--brand { background: var(--brand); border-color: var(--brand); }
.btn--brand:hover { background: var(--brand-deep); border-color: var(--brand-deep); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--white); }
.btn--light { background: var(--white); color: var(--ink); border-color: var(--white); }
.btn--light:hover { background: var(--brand); color: var(--white); border-color: var(--brand); }
.btn .arrow { transition: transform .2s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- 7. Hero ---------- */
.hero {
  position: relative;
  padding: clamp(3.5rem, 8vw, 7rem) 0 clamp(3rem, 6vw, 5rem);
  background:
    radial-gradient(circle at 90% 10%, rgba(233,78,27,.08), transparent 50%),
    linear-gradient(180deg, var(--paper) 0%, #F4EFE6 100%);
  border-bottom: 1px solid var(--hairline);
  overflow: hidden;
}
.hero__grid { display: grid; gap: 3rem; align-items: end; }
@media (min-width: 880px) {
  .hero__grid { grid-template-columns: 1.3fr 1fr; gap: 4rem; }
}
.hero h1 .accent { color: var(--brand); }
.hero h1 .underline { background-image: linear-gradient(transparent 70%, rgba(242,201,76,.55) 70%); padding: 0 .1em; }
.hero__lede { margin-top: 1.5rem; }
.hero__ctas { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 1rem; }
.hero__stats {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem;
  padding-top: 2rem; margin-top: 2.5rem; border-top: 1px solid var(--hairline);
}
.hero__stat .num {
  font-family: var(--serif); font-size: clamp(2rem, 4vw, 3rem); font-weight: 600;
  color: var(--ink); line-height: 1; letter-spacing: -.02em;
  font-feature-settings: "tnum" on, "lnum" on;
}
.hero__stat .num .small { font-size: .6em; color: var(--brand); }
.hero__stat .label { font-size: .82rem; color: var(--mute); margin-top: .4rem; line-height: 1.35; }

.hero__visual {
  border: 1px solid var(--hairline); background: var(--white);
  padding: 1.5rem; border-radius: 2px;
  box-shadow: 0 30px 60px -30px rgba(14,27,44,.18);
}
.hero__visual h4 { margin: 0 0 1rem; color: var(--ink); }
.bar-chart { display: grid; gap: .8rem; }
.bar-row { display: grid; grid-template-columns: 90px 1fr 50px; gap: .75rem; align-items: center; font-size: .85rem; }
.bar-row .lbl { color: var(--mute); }
.bar-row .bar { height: 14px; background: var(--tint); position: relative; overflow: hidden; }
.bar-row .bar span { display: block; height: 100%; background: var(--ink); }
.bar-row .bar span.brand { background: var(--brand); }
.bar-row .val { font-weight: 600; color: var(--ink); text-align: right; font-feature-settings: "tnum" on; }
.chart__source { font-size: .72rem; color: var(--mute); margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--hairline); }

/* ---------- 8. Stat blocks ---------- */
.stat-row { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.stat {
  padding: 1.75rem 1.25rem; border-top: 3px solid var(--ink);
  background: var(--white);
}
.stat--brand { border-top-color: var(--brand); }
.stat .num { font-family: var(--serif); font-size: clamp(2.2rem, 4vw, 3.2rem); font-weight: 600; color: var(--ink); line-height: 1; letter-spacing: -.02em; font-feature-settings: "tnum" on; }
.stat .num .unit { font-size: .55em; color: var(--brand); margin-left: .15em; }
.stat .label { font-size: .9rem; color: var(--mute); margin-top: .75rem; line-height: 1.4; }

/* ---------- 9. Cards ---------- */
.card {
  background: var(--white); border: 1px solid var(--hairline);
  padding: 2rem;
  transition: all .25s var(--ease);
  display: flex; flex-direction: column; gap: .75rem;
}
.card:hover { transform: translateY(-3px); border-color: var(--brand); box-shadow: 0 25px 50px -20px rgba(14,27,44,.12); }
.card h3 { margin: 0; }
.card .tag { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--brand-deep); font-weight: 600; }
.card .link { font-weight: 600; color: var(--brand-deep); margin-top: auto; padding-top: .5rem; }
.card .link::after { content: ' →'; transition: transform .2s var(--ease); display: inline-block; }
.card:hover .link::after { transform: translateX(3px); }

/* Insight card variant */
.insight {
  background: var(--white); border: 1px solid var(--hairline);
  padding: 1.75rem; display: flex; flex-direction: column; gap: 1rem;
}
.insight .num { font-family: var(--serif); font-size: 3.5rem; line-height: 1; color: var(--brand); letter-spacing: -.02em; font-feature-settings: "tnum" on; }
.insight h3 { font-size: 1.2rem; line-height: 1.3; }

/* ---------- 10. Quote / pullquote ---------- */
.pullquote {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  line-height: 1.3; color: var(--ink);
  border-left: 3px solid var(--brand);
  padding: .5rem 0 .5rem 1.5rem;
  max-width: 65ch;
}
.pullquote cite { display: block; margin-top: 1rem; font-family: var(--sans); font-style: normal; font-size: .9rem; color: var(--mute); font-weight: 500; }

/* ---------- 11. Logo strip ---------- */
.logo-strip {
  display: grid; gap: 1.5rem 2rem; align-items: center;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  padding: 2.5rem 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
/* Image logo cells */
.logo-strip .ll-img {
  display: flex; align-items: center; justify-content: center;
  height: 50px;
}
.logo-strip .ll-img img {
  max-height: 44px; max-width: 100%; width: auto;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: .7;
  transition: filter .25s var(--ease), opacity .25s var(--ease);
}
.logo-strip .ll-img:hover img { filter: grayscale(0%); opacity: 1; }

/* Text fallback */
.logo-strip .ll {
  font-family: var(--serif); font-weight: 600; font-size: 1.1rem;
  color: var(--mute); text-align: center; opacity: .8;
  letter-spacing: .02em;
  transition: opacity .2s var(--ease), color .2s var(--ease);
}
.logo-strip .ll:hover { opacity: 1; color: var(--ink); }

/* Press logo strip - bolder */
.press-strip { padding: 1.5rem 0; }
.press-strip .ll-img { height: 42px; }
.press-strip .ll-img img { max-height: 32px; filter: none; opacity: .85; }
.press-strip .ll-img:hover img { opacity: 1; }
.press-strip .ll { font-size: 1rem; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--ink-soft); opacity: .65; }

/* ---------- 12. Hairline rules / dividers ---------- */
.rule { border: 0; border-top: 1px solid var(--hairline); margin: 0; }
.rule--brand { border-top-color: var(--brand); border-top-width: 2px; max-width: 60px; margin: 0 0 1.5rem; }

/* ---------- 13. Forms ---------- */
.form { display: grid; gap: 1.25rem; }
.form__grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .form__grid--2 { grid-template-columns: 1fr 1fr; } }
.field label { display: block; font-size: .82rem; font-weight: 600; color: var(--ink); margin-bottom: .35rem; letter-spacing: .02em; }
.field label .req { color: var(--brand); }
.field input, .field select, .field textarea {
  width: 100%; padding: .85rem 1rem;
  background: var(--white); border: 1px solid var(--hairline);
  font-family: inherit; font-size: 1rem; color: var(--ink);
  border-radius: var(--radius);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(233,78,27,.15);
}
.field textarea { min-height: 130px; resize: vertical; }
.field .help { font-size: .78rem; color: var(--mute); margin-top: .35rem; }
.radio-grid, .check-grid { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.radio-grid label, .check-grid label {
  border: 1px solid var(--hairline); padding: .75rem 1rem; cursor: pointer;
  display: flex; gap: .6rem; align-items: center; font-size: .9rem;
  background: var(--white);
  transition: all .2s var(--ease);
}
.radio-grid label:hover, .check-grid label:hover { border-color: var(--brand); }
.radio-grid input, .check-grid input { accent-color: var(--brand); }

/* ---------- 14. Footer ---------- */
.site-footer {
  background: var(--ink); color: #C8C2B6;
  padding: 4rem 0 2rem;
  font-size: .92rem;
}
.site-footer h5 {
  font-family: var(--sans); font-size: .78rem; text-transform: uppercase; letter-spacing: .14em;
  color: var(--white); margin: 0 0 1rem;
}
.site-footer a { color: #C8C2B6; display: inline-block; padding: .25rem 0; }
.site-footer a:hover { color: var(--highlight); }
.footer-grid {
  display: grid; gap: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-grid p { color: #A39E94; margin-bottom: 1rem; }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
  padding-top: 2rem; font-size: .82rem; color: #8A857B;
}
.footer-bottom a { color: #8A857B; }

/* ---------- 15. Breadcrumb ---------- */
.crumb {
  font-size: .82rem; color: var(--mute);
  padding: 1.25rem 0 0; letter-spacing: .02em;
}
.crumb a { color: var(--mute); border-bottom: 1px solid transparent; }
.crumb a:hover { color: var(--brand); border-color: currentColor; }
.crumb span[aria-current] { color: var(--ink); font-weight: 500; }

/* ---------- 16. CTA Banner ---------- */
.cta-banner {
  background: var(--ink);
  color: var(--white);
  padding: clamp(3rem, 6vw, 5rem) 0;
  position: relative; overflow: hidden;
}
.cta-banner::before {
  content: ''; position: absolute; top: -20%; right: -10%;
  width: 50%; height: 140%;
  background: radial-gradient(circle, rgba(233,78,27,.18), transparent 60%);
  pointer-events: none;
}
.cta-banner h2 { color: var(--white); }
.cta-banner .lead { color: rgba(255,255,255,.78); }

/* ---------- 17. Case-study / sector item ---------- */
.case {
  display: grid; gap: 1.25rem; padding: 2rem 0;
  border-bottom: 1px solid var(--hairline);
}
@media (min-width: 760px) { .case { grid-template-columns: 200px 1fr; gap: 2.5rem; } }
.case .meta { font-size: .78rem; color: var(--mute); letter-spacing: .12em; text-transform: uppercase; }
.case h3 { margin: .35rem 0; }
.case .result {
  display: flex; gap: 2rem; margin-top: 1rem; flex-wrap: wrap;
  padding-top: 1rem; border-top: 1px dashed var(--hairline);
}
.case .result .r .n { font-family: var(--serif); font-size: 1.6rem; color: var(--brand); font-weight: 600; line-height: 1; }
.case .result .r .l { font-size: .78rem; color: var(--mute); margin-top: .3rem; }

/* ---------- 18. Utility ---------- */
.flow > * + * { margin-top: 1rem; }
.flow--lg > * + * { margin-top: 2rem; }
.center { text-align: center; }
.muted { color: var(--mute); }
.tabular { font-feature-settings: "tnum" on, "lnum" on; }
.callout {
  background: var(--white); border: 1px solid var(--hairline); border-left: 3px solid var(--brand);
  padding: 1.5rem; font-size: .95rem;
}
.callout strong { color: var(--ink); }

/* ---------- 19. Sector chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.chips span {
  font-size: .8rem; padding: .35rem .75rem; background: var(--tint); border: 1px solid var(--hairline);
  border-radius: 100px; color: var(--ink); font-weight: 500;
}

/* ---------- 20. Accordion (FAQ) ---------- */
details.faq {
  border-bottom: 1px solid var(--hairline);
  padding: 1.5rem 0;
}
details.faq summary {
  font-family: var(--serif); font-size: 1.25rem; font-weight: 600; color: var(--ink);
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: '+'; font-family: var(--sans); font-weight: 300; font-size: 1.8rem; color: var(--brand);
  transition: transform .25s var(--ease);
}
details.faq[open] summary::after { content: '−'; }
details.faq p { margin-top: 1rem; max-width: 65ch; color: var(--charcoal); }

/* ---------- 21. Skip link ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 1rem;
  background: var(--ink); color: var(--white); padding: .5rem 1rem; z-index: 100;
}
.skip-link:focus { left: 1rem; }

/* ---------- 22. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
