:root {
  color-scheme: light;
  --paper: #fbf6eb;
  --ink: #2b321e;
  --muted: #665d45;
  --line: #d8caa9;
  --olive: #475437;
  --gold: #885f20;
  --sun: #d4ad58;
  --plate: #303923;
  --plate-line: #baa25d;
  --plate-copy: #e9dbad;
}
* { box-sizing: border-box; }
html { overflow-x: clip; }
body { margin: 0 auto; padding: 0 clamp(20px, 6vw, 96px); max-width: 1540px; background: var(--paper); color: var(--ink); font: 16px/1.6 system-ui, sans-serif; }
a { color: inherit; text-underline-offset: .3em; }
a:hover:not(.button), nav a[aria-current="page"], .languages b { color: var(--gold); }
a:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
::selection { background: var(--olive); color: var(--paper); }
.skip { position: absolute; transform: translateY(-160%); padding: .5em; background: var(--paper); }
.skip:focus { transform: none; }
header, footer, nav, figcaption, .button, .languages { display: flex; align-items: center; }
header, footer, figcaption, .button { justify-content: space-between; }
header, .hero, .chapter { border-bottom: 1px solid var(--line); }
header { padding: 20px 0; gap: 12px; flex-wrap: wrap; }
.brand, h1, h2, .plate, li { font-family: Georgia, serif; }
.brand { display: inline-flex; align-items: center; gap: .3em; font-size: 1.55rem; letter-spacing: -.05em; }
.brand::before { content: ""; flex: none; width: 1.1em; height: 1.1em; background: url(marca.svg) center / contain no-repeat; }
nav { flex-wrap: wrap; gap: clamp(14px, 3vw, 42px); font-size: .88rem; }
nav a { text-decoration: none; }
nav a:hover, nav a[aria-current="page"], .languages b { text-decoration: underline; text-underline-offset: .3em; }
.languages { gap: 6px; border-left: 1px solid var(--line); padding-left: 16px; }
.hero { display: grid; grid-template-columns: 1.12fr 1fr; gap: 7%; align-items: center; padding: clamp(36px, 5vw, 80px) 0; }
.hero-branding { display: block; padding: clamp(24px, 4vw, 56px) 0; }
.brand-artwork { margin: 0; border: 1px solid var(--line); background: var(--paper); }
.brand-artwork img { display: block; width: 100%; height: auto; }
.hero-copy { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: clamp(20px, 3vw, 36px); }
.hero-copy .label { margin-top: 0; }
.hero-copy .intro { margin: 0; max-width: 60ch; }
.hero-copy .button { flex-shrink: 0; margin: 0; }
.brand-tagline { margin: 0 0 .35em; color: var(--ink); font: italic clamp(1.25rem, 2.1vw, 1.8rem)/1.3 Georgia, serif; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.label, figcaption { font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 650; color: var(--muted); }
.dot { display: inline-block; width: .65em; height: .65em; border-radius: 50%; background: var(--sun); margin-right: .4em; }
h1, h2 { font-weight: 400; }
h1 { margin: .25em 0; font-size: clamp(4rem, 8.6vw, 8rem); line-height: .96; letter-spacing: -.065em; }
h1 i { color: var(--olive); }
.intro, .chapter div > p { max-width: 53ch; color: var(--muted); font-size: 1.05rem; }
.button { width: fit-content; gap: 25px; padding: 12px 20px; margin-top: 26px; background: var(--ink); color: var(--paper); text-decoration: none; border-radius: 2px; }
.button:hover { background: var(--sun); color: var(--ink); }
figure { margin: 0; }
.plate { position: relative; background: var(--plate); color: var(--plate-copy); padding: 5%; overflow: hidden; }
.plate::before { content: ""; position: absolute; inset: 3%; border: 1px solid var(--plate-line); pointer-events: none; }
.plate img { width: 100%; display: block; }
.plate span, .plate i { position: absolute; left: 7%; top: 6%; }
.plate i { left: auto; top: auto; bottom: 6%; right: 7%; }
figcaption { padding-top: 8px; font-size: .64rem; }
.chapter { display: grid; grid-template-columns: 1fr 2fr; gap: 5%; padding: clamp(38px, 6vw, 80px) 0; }
h2 { font-size: clamp(2.3rem, 5vw, 4.5rem); letter-spacing: -.055em; line-height: 1.06; margin: 0; }
h3 { margin: 2.2em 0 .35em; font: 400 clamp(1.7rem, 3vw, 2.35rem)/1.1 Georgia, serif; letter-spacing: -.04em; }
.chapter h1 { margin: 0; font-size: clamp(2.6rem, 5vw, 4.5rem); letter-spacing: -.055em; line-height: 1.06; }
.chapter h2 { margin: 2.2em 0 .35em; font-size: clamp(1.7rem, 3vw, 2.35rem); }
.chapter .botany { margin-top: 1.25em; }
.chapter .source { color: var(--muted); font-size: .75rem; }
.oil-profile { width: 100%; max-width: 53ch; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.oil-profile caption { padding: .5em 0; color: var(--muted); text-align: left; }
.oil-profile th, .oil-profile td { padding: .45em .35em; border-bottom: 1px solid var(--line); text-align: right; }
.oil-profile tr > :first-child { text-align: left; }
.oil-temperature { width: 100%; max-width: 48rem; margin: 1.5em 0; padding: 1em; border: 1px solid var(--line); }
.oil-temperature figcaption { display: block; padding: 0 0 .8em; color: var(--ink); font: 1.2rem/1.35 Georgia, serif; text-transform: none; letter-spacing: normal; }
.temperature-panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: 1em; }
.temperature-panels strong { display: block; padding: .5em 0; border-top: 1px solid var(--line); font-size: .9rem; }
.temperature-panels svg { display: block; width: 100%; height: auto; fill: var(--ink); font: 14px system-ui, sans-serif; }
.plot-axis { fill: none; stroke: var(--muted); }
.cold-points { fill: var(--olive); }
.heat-bars { fill: var(--gold); }
.cultivars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 24px; }
.cultivar { border-top: 1px solid var(--line); padding-top: 12px; }
.cultivar h3 { margin: 0; font: italic 1.45rem Georgia, serif; }
.cultivar p { margin: .55em 0; color: var(--muted); font-size: .9rem; }
.cultivar .source { display: inline-block; margin-top: .5em; }
.grove-fungi, .grove-pests, .grove-diseases { max-width: 53ch; padding-inline-start: 1.65em; color: var(--muted); font-size: 1.05rem; }
.grove-fungi li, .grove-pests li, .grove-diseases li { margin-block: 1em; border: 0; font: inherit; }
.grove-fungi li::marker, .grove-pests li::marker, .grove-diseases li::marker { color: var(--olive); font-weight: 650; }
.grove-fungi figure, .grove-pests figure, .grove-diseases figure, .grove-mycorrhiza { max-width: 25rem; margin-block: .8em; }
.grove-fungi figure img, .grove-pests figure img, .grove-diseases figure img, .grove-mycorrhiza img { display: block; width: 100%; height: auto; }
.grove-fungi figcaption, .grove-pests figcaption, .grove-diseases figcaption, .grove-mycorrhiza figcaption { display: block; padding-top: .5em; color: var(--muted); font-size: .75rem; line-height: 1.45; letter-spacing: normal; text-transform: none; }
.story { max-width: 76ch; margin: 0 auto; padding: clamp(42px, 7vw, 96px) 0; }
.story h1 { max-width: 16ch; font-size: clamp(3.2rem, 7vw, 6.6rem); }
.story-subtitle { max-width: 48ch; color: var(--muted); font: italic clamp(1.3rem, 2.4vw, 2rem)/1.3 Georgia, serif; }
.story h2 { margin: 2em 0 .6em; padding-top: .9em; border-top: 1px solid var(--line); font-size: clamp(2rem, 4vw, 3.2rem); }
.story h3 { margin: 1.5em 0 .5em; font-size: clamp(1.45rem, 2.5vw, 2rem); }
.story p { max-width: 68ch; color: var(--muted); font-size: 1.05rem; }
.story .source { font-size: .75rem; }
.glossary nav { margin: 1.5em 0; padding: 1em 0; border-block: 1px solid var(--line); gap: .6em 1.4em; }
.glossary nav a { text-decoration: underline; }
.glossary summary { width: fit-content; cursor: pointer; color: var(--olive); }
.glossary h3:target { border-inline-start: 3px solid var(--gold); padding-inline-start: .4em; }
.chapter a[href*="gloss"][href*="#"] { text-decoration-style: dotted; }
.story-brand { margin-top: 3em; color: var(--ink); font: 1.55rem Georgia, serif; letter-spacing: -.05em; }
.story .story-tagline { color: var(--ink); font: italic 1.2rem/1.5 Georgia, serif; }
ul { padding: 0; margin: 1.7em 0 0; display: flex; flex-wrap: wrap; gap: 12px 30px; list-style: none; }
li { font-style: italic; font-size: 1.4rem; border-bottom: 1px solid var(--line); }
footer { padding: 40px 0 28px; font-size: .82rem; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); }
.visit-counter { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: .4em; color: var(--muted); font-variant-numeric: tabular-nums; }
.visit-counter strong { color: var(--ink); font-weight: 650; }

/* Olive ornaments, scattered branches and artwork */
header, footer, .hero, .chapter, .story, .story h2 { position: relative; }
.story h2 { clear: both; }
.chapter:last-child { border-bottom: 0; }
header::after, footer::before, .hero::after, .chapter:not(:last-child)::after, .story h2::before { content: ""; position: absolute; left: 50%; width: 150px; height: 30px; transform: translateX(-50%); background: url(ornamento.svg) center / 112px auto no-repeat, var(--paper); pointer-events: none; }
header::after, .hero::after, .chapter::after { bottom: -15px; }
footer::before, .story h2::before { top: -15px; }
.chapter-side { align-self: start; position: sticky; top: 28px; display: grid; gap: 22px; }
.chapter-side > .label { max-width: none; font-size: .72rem; }
.side-art { width: min(100%, 320px); }
.art { clear: both; margin: 2.4em 0; }
.art img, .side-art img { display: block; width: 100%; height: auto; }
.matted img { padding: clamp(7px, 1.2vw, 14px); background: #f2e8d2; border: 1px solid var(--line); box-shadow: 0 24px 42px -34px rgba(43, 50, 30, .65); }
.medallion img { border-radius: 50%; box-shadow: 0 0 0 1px var(--line), 0 0 0 7px var(--paper), 0 0 0 8px var(--plate-line); }
.art figcaption, .side-art figcaption { display: block; max-width: 64ch; padding-top: .85em; color: var(--muted); font: italic .97rem/1.5 Georgia, serif; letter-spacing: 0; text-transform: none; }
.side-art figcaption { font-size: .88rem; }
.art figcaption b, .side-art figcaption b { color: var(--ink); font-weight: 400; }
.credit { display: block; margin-top: .45em; font: normal 650 .64rem/1.4 system-ui, sans-serif; letter-spacing: .12em; text-transform: uppercase; }
.art-pair .pair { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(8px, 1.5vw, 16px); }
.art-narrow, .art-tall { margin-left: auto; margin-right: auto; }
.art-narrow { max-width: 580px; }
.art-tall { max-width: 460px; }
.art-aside { display: grid; grid-template-columns: minmax(0, 230px) minmax(0, 1fr); gap: clamp(18px, 3vw, 36px); align-items: center; }
.art-aside figcaption { padding-top: 0; }
.map-figure { width: 100%; max-width: 76ch; margin: 2em auto; }
.map-figure img { display: block; width: 100%; height: auto; padding: clamp(7px, 1.2vw, 14px); background: #f2e8d2; border: 1px solid var(--line); }
.map-figure figcaption { display: block; max-width: 76ch; padding-top: .85em; color: var(--muted); font: italic .97rem/1.5 Georgia, serif; letter-spacing: 0; text-transform: none; }
.map-key { display: flex; flex-wrap: wrap; gap: .55em 1.4em; margin: 1em 0; color: var(--muted); font-size: .9rem; }
.map-key span { display: inline-flex; align-items: center; gap: .45em; }
.map-dot { display: inline-block; flex: none; width: .8em; height: .8em; border-radius: 50%; background: var(--olive); }
.map-dot.origin { background: var(--sun); }
.map-dot.refuge { background: #73836a; }
.variety-key { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .35em 1.5em; margin: .7em 0 1.2em; padding-left: 1.5em; }
.variety-key li { padding: .2em 0; border: 0; color: var(--muted); font: .95rem/1.5 system-ui, sans-serif; }
.variety-catalogue { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.5em; margin: 1em 0; padding: 0; list-style: none; }
.variety-catalogue li { display: flex; justify-content: space-between; gap: .5em; padding: .38em 0; border-bottom: 1px solid var(--line); font: .9rem/1.45 system-ui, sans-serif; }
.variety-catalogue a { font-family: Georgia, serif; font-style: italic; }
.variety-catalogue span { color: var(--muted); text-align: right; }
.variety-register li { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: .15em; }
.variety-register li > span { font-size: .78rem; text-align: left; }
.map-sources { margin-top: 1.4em; }
.story .story-callout { margin: 1.6em 0; padding: .3em 0 .3em 1.1em; border-left: 3px solid var(--sun); color: var(--ink); font: italic clamp(1.2rem, 2.2vw, 1.5rem)/1.45 Georgia, serif; }
@media (min-width: 1200px) {
  .story::before, .story::after, .story h2::after { content: ""; position: absolute; background: center / contain no-repeat; pointer-events: none; }
  .story::before { top: -8px; left: calc(100% + 24px); width: min(190px, calc(50vw - 400px)); aspect-ratio: 228 / 464; background-image: url(ramo-pendente.svg); }
  .story::after { top: 260px; right: calc(100% + 20px); width: min(300px, calc(50vw - 390px)); aspect-ratio: 440 / 281; background-image: url(ramo-grande.svg); transform: scaleX(-1) rotate(-12deg); }
  .story h2:nth-of-type(4n+1)::after { top: 60px; right: calc(100% + 40px); width: min(150px, calc(50vw - 440px)); aspect-ratio: 249 / 423; background-image: url(folhas-soltas.svg); }
  .story h2:nth-of-type(4n+2)::after { top: 10px; left: calc(100% + 30px); width: min(300px, calc(50vw - 390px)); aspect-ratio: 440 / 281; background-image: url(ramo-grande.svg); transform: rotate(-16deg); }
  .story h2:nth-of-type(4n+3)::after { top: -4px; right: calc(100% + 50px); width: min(180px, calc(50vw - 430px)); aspect-ratio: 228 / 464; background-image: url(ramo-pendente.svg); transform: scaleX(-1); }
  .story h2:nth-of-type(4n+4)::after { top: 70px; left: calc(100% + 60px); width: min(150px, calc(50vw - 440px)); aspect-ratio: 249 / 423; background-image: url(folhas-soltas.svg); transform: scaleX(-1) rotate(10deg); }
  #azeite .chapter-side::after { content: ""; width: min(100%, 270px); aspect-ratio: 440 / 281; background: url(ramo-grande.svg) center / contain no-repeat; }
  .chapter#contacto::before { content: ""; position: absolute; bottom: 36px; right: 5%; width: 140px; aspect-ratio: 249 / 423; background: url(folhas-soltas.svg) center / contain no-repeat; pointer-events: none; }
}
@media (max-width: 720px) {
  .hero, .chapter { grid-template-columns: 1fr; gap: 24px; }
  .hero-branding { display: block; }
  .hero-copy { align-items: flex-start; flex-direction: column; }
  .cultivars { grid-template-columns: 1fr; gap: 12px; }
  figure { width: min(100%, 470px); }
  .chapter-side { position: static; }
  #olival .chapter-side, #our-grove .chapter-side, #contacto .chapter-side { order: 1; }
  .side-art { width: min(70%, 250px); }
  .art-aside { grid-template-columns: 1fr; }
  .art-aside img { width: min(100%, 260px); }
  .map-figure { width: 100%; max-width: none; }
  .variety-key { grid-template-columns: 1fr; }
  .variety-catalogue { grid-template-columns: 1fr; }
}
