/* Indicador #01 · Com és la producció agrícola?
   Palette and type sampled from the Canva design (Fitxes indicadors layout, pages 2 and 4). */

:root {
  --cream: #F6E6BE;
  --cream-light: #FCF7E8;
  --sand: #E3D5B2;
  --taupe: #8F806E;
  --taupe-dark: #706355;
  --ink: #3E362E;
  --orange: #F88130;
  --brand-orange: #FE6F10;
  --green-dark: #1B2D29;
  --header-bg: #F2F0DA;
  --orange-dark: #D07333;
  --white: #FFFFFF;

  --font-display: "Bebas Neue", "Oswald", Impact, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-ui: "Raleway", "Inter", system-ui, sans-serif;

  --wrap: 1160px;
  --radius: 14px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--orange-dark); }
a:hover, a:focus-visible { color: var(--orange); }

.wrap { width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }

.display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 0.95;
  text-transform: uppercase;
  margin: 0 0 0.5em;
}
.accent { color: var(--orange); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--orange); color: #fff; padding: .5rem 1rem; border-radius: 8px;
}
.skip:focus { top: 1rem; }

/* ---------- Header (mirrors arrandeterra.org) ---------- */
.site-header {
  background: var(--header-bg);
  border-bottom: 1px solid rgba(27, 45, 41, .08);
  position: sticky; top: 0; z-index: 50;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: 1rem 0; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; }
.brand img { height: 34px; width: auto; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.5rem; flex-wrap: wrap; align-items: center; }
.site-nav a {
  font-family: var(--font-ui); font-weight: 500; font-size: 1.05rem;
  color: var(--ink); text-decoration: none; padding: .35rem 0; border-bottom: 2px solid transparent;
}
.site-nav a:hover, .site-nav a:focus-visible { color: var(--brand-orange); border-bottom-color: var(--brand-orange); }
.site-nav a.nav-cta {
  background: var(--brand-orange); color: #fff; padding: .5rem .9rem; border-radius: 4px; border: 0; font-weight: 600;
}
.site-nav a.nav-cta:hover, .site-nav a.nav-cta:focus-visible { background: var(--orange-dark); color: #fff; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--cream);
  padding: clamp(3rem, 7vw, 6rem) 0 clamp(2rem, 5vw, 4rem);
}
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
  align-items: center; gap: 2rem;
}
.eyebrow { display: flex; gap: .5rem; flex-wrap: wrap; margin: 0 0 1.25rem; }
.pill {
  display: inline-block; background: var(--taupe); color: #fff;
  font-size: .8rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  padding: .35rem .9rem; border-radius: 999px;
}
.pill-year { background: var(--orange); }
.hero h1 { font-size: clamp(3.2rem, 9vw, 7rem); color: var(--taupe-dark); }
.display-sub {
  font-family: var(--font-display); text-transform: uppercase;
  font-size: clamp(1.6rem, 3.5vw, 2.6rem); line-height: 1; color: var(--taupe-dark);
  margin: 0 0 1.25rem;
}
.series { color: var(--taupe-dark); margin: 0; max-width: 34ch; }
.hero-art { position: relative; margin: 0; min-height: 320px; }
.hero-art .arcs { position: absolute; right: -12%; top: -10%; width: 110%; max-width: none; opacity: .95; }
.hero-art .fork { position: relative; margin-left: auto; width: min(220px, 45%); filter: drop-shadow(0 12px 18px rgba(62, 54, 46, .25)); }

/* ---------- Key messages ---------- */
.key-messages { background: var(--taupe); color: #fff; padding: 2.5rem 0; }
.callouts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
.callout { display: flex; gap: 1.25rem; align-items: flex-start; }
.callout img { width: 64px; height: auto; flex: 0 0 auto; }
.callout p { margin: 0; font-size: 1.25rem; font-weight: 700; line-height: 1.35; color: var(--cream); }

/* ---------- Article ---------- */
.article { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.article h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); color: var(--taupe-dark); max-width: 14ch; }
.prose { columns: 2 22rem; column-gap: 3rem; }
.prose p { margin: 0 0 1.1rem; break-inside: avoid; color: var(--ink); }

/* ---------- Data section ---------- */
.data { background: var(--cream-light); padding: clamp(2.5rem, 6vw, 4.5rem) 0; border-top: 1px solid rgba(112, 99, 85, .2); }
.section-title { font-size: clamp(2.2rem, 5vw, 3.4rem); color: var(--orange); }
.section-intro { max-width: 70ch; margin: 0 0 2.5rem; color: var(--taupe-dark); }

.data-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.panel {
  background: var(--cream); border-radius: var(--radius); padding: 1.75rem;
  box-shadow: 0 1px 0 rgba(112, 99, 85, .15);
}
.panel-wide { grid-column: 1 / -1; }
.panel h3 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); color: var(--orange); }
.year { font-size: .8rem; font-weight: 700; letter-spacing: .08em; color: var(--taupe-dark); margin: 0 0 .25rem; }
.note { font-size: .9rem; color: var(--taupe-dark); }

/* stat card */
.stat-card { border: 2px solid var(--orange); border-radius: var(--radius); background: #fff; padding: 1rem; margin: 1rem 0; }
.stat-hero { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .25rem .5rem .75rem; }
.stat-label { font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--taupe); }
.stat-value { font-family: var(--font-display); font-size: 3.4rem; line-height: 1; color: var(--orange); }
.stat-value small { font-size: .55em; }
.stat-pair { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.stat-tile { border: 1px solid var(--orange); border-radius: 10px; padding: .75rem; display: grid; gap: .15rem; }
.stat-tile img { width: 40px; filter: invert(58%) sepia(64%) saturate(1500%) hue-rotate(345deg) brightness(101%) contrast(95%); }
.stat-value-sm { font-family: var(--font-display); font-size: 1.8rem; line-height: 1; color: var(--ink); }

/* què cultivem: hay + donuts side by side */
.cultius-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 2rem; align-items: center; }
.hay { position: relative; max-width: 480px; margin: 0 auto; }
.hay-img { width: 100%; aspect-ratio: 800 / 636; }
.bubble {
  position: absolute; border-radius: 50%; display: grid; place-content: center; text-align: center;
  padding: .5rem; box-shadow: 0 8px 20px rgba(62, 54, 46, .2);
}
.bubble-label { font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.bubble-sub { font-size: .65rem; }
.bubble-value { font-family: var(--font-display); font-size: 2.8rem; line-height: 1; }
.bubble-value-sm { font-family: var(--font-display); font-size: 1.5rem; line-height: 1; }
.bubble-main { left: 4%; top: 24%; width: 44%; aspect-ratio: 1; background: #fff; color: var(--orange); }
.bubble-main .bubble-label { color: var(--taupe-dark); font-size: .8rem; }
.bubble-main .bubble-sub { color: var(--taupe-dark); }
.bubble-tones { right: 6%; top: 8%; width: 32%; aspect-ratio: 1; background: var(--orange); color: #fff; }
.bubble-sup { right: 8%; bottom: 8%; width: 28%; aspect-ratio: 1; background: var(--orange); color: #fff; }

/* donuts */
.donuts { display: grid; grid-template-columns: 1fr 1fr auto; gap: 1.25rem; align-items: center; }
.donut { margin: 0; }
.donut figcaption { font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--taupe-dark); text-align: center; margin-bottom: .5rem; }
.donut svg { width: 100%; max-width: 280px; margin: 0 auto; display: block; overflow: visible; }
.donut path { stroke: var(--cream); stroke-width: 1.5; }
.donut .dl { font-family: var(--font-display); font-size: 12px; fill: #fff; text-anchor: middle; dominant-baseline: middle; }
.donut .dl.out { fill: var(--taupe-dark); font-size: 10px; }
.donut .center-l { font-family: var(--font-body); font-size: 8px; font-weight: 700; fill: var(--taupe-dark); text-anchor: middle; text-transform: uppercase; letter-spacing: .04em; }
.donut .center-s { font-family: var(--font-body); font-size: 8px; fill: var(--taupe-dark); text-anchor: middle; }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; font-size: .9rem; }
.legend i { display: inline-block; width: 22px; height: 10px; border-radius: 5px; background: var(--c); margin-right: .6rem; vertical-align: middle; }

/* evolution chart */
.evolucio { margin: 1.25rem 0 0; }
.evolucio figcaption { font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink); margin-bottom: .5rem; }
.evolucio img { width: 100%; border-radius: 8px; }
.chart-legend-note { font-size: .8rem; color: var(--taupe-dark); margin: .5rem 0 0; }

/* map / autoabastiment */
.map-block { display: grid; grid-template-columns: minmax(160px, 260px) 1fr; gap: 2rem; align-items: center; }
.map { margin: 0; }
.map-block h3 { font-size: clamp(1.6rem, 3vw, 2.1rem); }

/* flows */
.flows { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.flow-col { background: var(--taupe); color: #fff; border-radius: var(--radius); padding: 1.25rem; display: flex; flex-direction: column; }
.flow-col-accent { background: var(--orange); }
.flow-col h4 { font-family: var(--font-display); font-weight: 400; font-size: 1.5rem; text-transform: uppercase; letter-spacing: .02em; text-align: center; margin: 0 0 1rem; }
.flow-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; flex: 1; align-content: start; }
.flow-col li { display: flex; align-items: center; gap: .75rem; }
.flow-col li img { width: 40px; height: 40px; object-fit: contain; flex: 0 0 auto; }
.flow-name { display: block; font-size: .9rem; line-height: 1.25; }
.flow-val { display: block; font-weight: 700; font-size: 1.05rem; }
.delta { margin: 1.25rem 0 0; display: flex; align-items: center; gap: .75rem; font-size: .85rem; }
.delta-badge {
  font-family: var(--font-display); font-size: 1.6rem; line-height: 1;
  background: var(--taupe-dark); color: #fff; border-radius: 50%; width: 64px; height: 64px; display: grid; place-content: center; flex: 0 0 auto;
}

/* data tables (SEO / AI readable, visible but discreet) */
.data-table { width: 100%; border-collapse: collapse; margin: 1.25rem 0 0; font-size: .9rem; }
.data-table caption { caption-side: top; text-align: left; font-weight: 700; color: var(--taupe-dark); padding: .4rem 0; }
.data-table th, .data-table td { border-bottom: 1px solid rgba(112, 99, 85, .25); padding: .45rem .5rem; text-align: left; vertical-align: top; }
.data-table thead th { font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--taupe); }
.data-table td { font-variant-numeric: tabular-nums; }
.data-table tfoot th, .data-table tfoot td { font-weight: 600; }

/* ---------- Questions ---------- */
.questions { background: var(--sand); padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.questions h2 { font-size: clamp(2.2rem, 5vw, 3.4rem); color: var(--taupe-dark); }
.question-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.question-list li { background: var(--cream); border-radius: var(--radius); padding: 1.5rem; border-top: 4px solid var(--orange); }
.qnum { font-family: var(--font-display); font-size: 1.4rem; color: var(--orange); }
.question-list p { margin: .5rem 0 0; font-weight: 600; color: var(--ink); }

/* ---------- Project ---------- */
.project { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.project-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 3rem; align-items: start; }
.accent-h { color: var(--orange); font-size: 1.5rem; margin: 0 0 1rem; }
.more { background: var(--taupe); color: #fff; border-radius: var(--radius); padding: 1.75rem; }
.more p { margin: 0 0 1rem; }
.btn {
  display: inline-block; background: var(--cream); color: var(--taupe-dark); font-weight: 700; text-decoration: none;
  padding: .7rem 1.25rem; border-radius: 999px; margin-bottom: 1.25rem;
}
.btn:hover { background: #fff; color: var(--orange-dark); }
.qr { display: grid; grid-template-columns: 112px 1fr; gap: 1rem; align-items: center; }
.qr img { background: #fff; padding: 6px; border-radius: 8px; image-rendering: pixelated; }
.qr p { margin: 0; font-size: .9rem; }
.qr .accent { color: var(--cream); }
.pdf-link { margin: 1.25rem 0 0; font-size: .9rem; }
.pdf-link a { color: var(--cream); }

/* ---------- Cite ---------- */
.cite { background: var(--cream-light); padding: 2.5rem 0; border-top: 1px solid rgba(112, 99, 85, .2); }
.cite h2 { font-size: 1.1rem; margin: 0 0 .75rem; color: var(--taupe-dark); }
.citation { margin: 0; padding: 1rem 1.25rem; border-left: 4px solid var(--orange); background: var(--cream); border-radius: 0 var(--radius) var(--radius) 0; font-size: .95rem; }
.citation p { margin: 0; }

/* ---------- Footer (mirrors arrandeterra.org) ---------- */
.site-footer { background: var(--green-dark); color: #fff; font-family: var(--font-ui); font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 3rem; padding: 3.5rem 0 3rem; }
.footer-brand img { height: 36px; width: auto; }
.footer-brand p { margin: 1.25rem 0; max-width: 34ch; }
.footer-faro { height: 56px !important; filter: invert(1) brightness(1.6); opacity: .9; }
.footer-col h2 { font-family: var(--font-ui); font-size: 1.15rem; font-weight: 700; margin: 0 0 1rem; color: #fff; }
.footer-col p { margin: 0 0 1rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin: 0 0 .5rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover, .site-footer a:focus-visible { color: var(--brand-orange); text-decoration: underline; }
.social { display: flex !important; gap: .75rem; }
.social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; background: var(--brand-orange); color: #fff; border-radius: 4px;
}
.social a:hover, .social a:focus-visible { background: #fff; color: var(--green-dark); text-decoration: none; }
.footer-legal { background: #fff; color: var(--ink); font-size: .85rem; padding: 1.1rem 0; }
.footer-legal-inner { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; align-items: center; }
.footer-legal p { margin: 0; }
.footer-legal ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.25rem; flex-wrap: wrap; }
.footer-legal a { color: var(--ink); }
.footer-legal a:hover, .footer-legal a:focus-visible { color: var(--brand-orange); }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .cultius-grid { grid-template-columns: 1fr; }
  .donuts { grid-template-columns: 1fr 1fr; }
  .legend { grid-column: 1 / -1; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
}
@media (max-width: 900px) {
  .hero-grid, .project-grid, .footer-grid { grid-template-columns: 1fr; }
  .site-header { position: static; }
  .header-inner { padding: .8rem 0; gap: .75rem; }
  .brand img { height: 28px; }
  .site-nav ul { gap: .5rem 1rem; }
  .site-nav a { font-size: .95rem; }
  .site-nav a.nav-cta { padding: .35rem .7rem; font-size: .9rem; }
  .hero-art { min-height: 200px; }
  .hero-art .arcs { right: -20%; top: -10%; width: 80%; }
  .hero-art { margin-top: 1rem; }
  .data-grid { grid-template-columns: 1fr; }
  .flows { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .map-block { grid-template-columns: 1fr; }
  .map { max-width: 220px; }
  .donuts { grid-template-columns: 1fr; }
  .stat-hero { flex-direction: column; align-items: flex-start; }
  .qr { grid-template-columns: 1fr; }
}
@media print {
  .site-nav, .skip, .footer-legal ul, .social { display: none; }
  .site-header { position: static; }
  body { background: #fff; }
  .panel, .flow-col, .question-list li { break-inside: avoid; }
}

/* sticky header offset for anchor links */
section[id], [id="contingut"] { scroll-margin-top: 5rem; }
