/* Salvia Alquimia — "Herbario abierto": páginas como pliegos de herbario,
   con etiquetas de espécimen (nombre latino, familia, parte usada, preparación). */
:root {
  --paper: #E8EBE1;      /* papel de herbario, gris salvia */
  --sheet: #F4F5EF;      /* pliego claro */
  --ink: #17221A;        /* tinta de bosque */
  --muted: #55604F;      /* texto secundario */
  --salvia: #6C8462;     /* verde salvia */
  --madder: #8E2F27;     /* rojo rubia: acento único */
  --rule: #C6CCBC;       /* filetes */
  --on-madder: #F6F1EC;
  --shadow: 0 1px 0 rgba(23,34,26,.06), 0 18px 40px -24px rgba(23,34,26,.35);

  --f-display: "IM Fell English", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --f-body: "Hanken Grotesk", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --step--1: clamp(.82rem, .8rem + .1vw, .88rem);
  --step-0: clamp(1rem, .97rem + .15vw, 1.08rem);
  --step-1: clamp(1.2rem, 1.1rem + .4vw, 1.4rem);
  --step-2: clamp(1.55rem, 1.35rem + .9vw, 2.1rem);
  --step-3: clamp(2rem, 1.6rem + 1.9vw, 3.2rem);
  --step-4: clamp(2.5rem, 1.8rem + 3.4vw, 4.7rem);

  --wrap: 72rem;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #111712; --sheet: #182019; --ink: #E2E6DA; --muted: #A3AD9C;
    --salvia: #93AC86; --madder: #D9806F; --rule: #2C362D; --on-madder: #1A0F0D;
    --shadow: 0 1px 0 rgba(0,0,0,.4), 0 18px 40px -24px rgba(0,0,0,.8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #111712; --sheet: #182019; --ink: #E2E6DA; --muted: #A3AD9C;
  --salvia: #93AC86; --madder: #D9806F; --rule: #2C362D; --on-madder: #1A0F0D;
  --shadow: 0 1px 0 rgba(0,0,0,.4), 0 18px 40px -24px rgba(0,0,0,.8);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--f-body); font-size: var(--step-0); line-height: 1.65;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration-color: var(--salvia); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--madder); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--madder); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 400; line-height: 1.08; margin: 0; text-wrap: balance; letter-spacing: -.005em; }
h1 em, h2 em, h3 em { font-style: italic; color: var(--madder); }
p { margin: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; z-index: 50; }
.skip:focus { left: 8px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.eyebrow { font-family: var(--f-body); font-size: var(--step--1); letter-spacing: .16em; text-transform: uppercase; color: var(--salvia); font-weight: 600; }
.latin { font-family: var(--f-display); font-style: italic; }
.mono { font-family: var(--f-mono); font-size: .8em; letter-spacing: .02em; }
.lead { font-size: var(--step-1); line-height: 1.5; color: var(--muted); max-width: 36ch; }

/* ---------- Header ---------- */
.site-head {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.2) blur(10px); -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 42px; height: 42px; }
.brand span { font-family: var(--f-display); font-size: 1.35rem; line-height: 1; }
.brand small { display: block; font-family: var(--f-body); font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.nav { display: flex; align-items: center; gap: clamp(12px, 2vw, 28px); }
.nav a { text-decoration: none; font-size: .95rem; }
.nav a[aria-current="page"] { color: var(--madder); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px; border-radius: 999px; border: 1px solid var(--ink);
  font: 600 .95rem/1 var(--f-body); text-decoration: none; cursor: pointer; transition: background .2s, color .2s, border-color .2s;
  background: transparent; color: var(--ink);
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn--solid { background: var(--madder); border-color: var(--madder); color: var(--on-madder); }
.btn--solid:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.menu-btn { display: none; }
@media (max-width: 860px) {
  .menu-btn { display: inline-flex; min-height: 42px; padding: 0 16px; }
  .nav { position: absolute; inset: 100% 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--rule); padding: 8px var(--gutter) 20px; display: none; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--rule); }
  .nav .btn { margin-top: 14px; border-bottom: 1px solid var(--madder); }
}

/* ---------- Herbarium label (the signature device) ---------- */
.label {
  background: var(--sheet); border: 1px solid var(--ink); padding: 12px 14px 10px; font-size: .8rem; line-height: 1.35;
  display: grid; gap: 4px; max-width: 22rem;
}
.label .latin { font-size: 1.15rem; line-height: 1.1; }
.label dl { margin: 6px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; border-top: 1px solid var(--rule); padding-top: 6px; }
.label dt { font-family: var(--f-mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.label dd { margin: 0; }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(36px, 6vw, 80px) clamp(48px, 7vw, 96px); }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.hero h1 { font-size: var(--step-4); margin-block: 18px 22px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-figure { position: relative; }
.hero-figure .photo { aspect-ratio: 4 / 5; width: 100%; object-fit: cover; object-position: 38% 50%; box-shadow: var(--shadow); }
.hero-figure .label { position: absolute; right: -14px; bottom: -22px; width: min(19rem, 80%); }
.hero-figure .stamp { position: absolute; left: -18px; top: -18px; width: 92px; height: 92px; animation: spin 60s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 26px; font-size: var(--step--1); color: var(--muted); }
.hero-meta span::before { content: "✳"; color: var(--salvia); margin-right: 8px; }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-figure { max-width: 30rem; }
  .hero-figure .label { right: 8px; }
  .hero-figure .stamp { left: 8px; top: -14px; width: 72px; height: 72px; }
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(56px, 8vw, 112px); }
.section--sheet { background: var(--sheet); border-block: 1px solid var(--rule); }
.section-head { display: grid; gap: 14px; max-width: 46rem; margin-bottom: clamp(28px, 4vw, 52px); }
.section-head h2 { font-size: var(--step-3); }
.section-head p { color: var(--muted); max-width: 60ch; }

/* Enfoque */
.enfoque { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(28px, 5vw, 80px); align-items: start; }
.enfoque blockquote { margin: 0; font-family: var(--f-display); font-size: var(--step-2); line-height: 1.25; }
.enfoque blockquote footer { margin-top: 18px; font-family: var(--f-body); font-size: var(--step--1); color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.engraving { aspect-ratio: var(--ar, 1); width: 100%; background: var(--ink); -webkit-mask: var(--src) center / contain no-repeat; mask: var(--src) center / contain no-repeat; opacity: .9; }
.terrenos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--ink); }
.terrenos > div { padding: 22px 22px 24px 0; border-bottom: 1px solid var(--rule); }
.terrenos > div:nth-child(odd) { border-right: 1px solid var(--rule); }
.terrenos > div:nth-child(even) { padding-left: 22px; }
.terrenos h3 { font-size: var(--step-1); margin-bottom: 8px; }
.terrenos p { color: var(--muted); font-size: .97rem; }
.enfoque-text { display: grid; gap: 18px; }
.enfoque-text > p { max-width: 62ch; }
@media (max-width: 860px) { .enfoque { grid-template-columns: 1fr; } }
@media (max-width: 520px) {
  .terrenos { grid-template-columns: 1fr; }
  .terrenos > div, .terrenos > div:nth-child(even), .terrenos > div:nth-child(odd) { padding: 18px 0; border-right: 0; }
}

/* Consultas */
.consultas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(18px, 3vw, 32px); }
.consulta { background: var(--paper); border: 1px solid var(--ink); display: grid; grid-template-rows: auto 1fr auto; }
.consulta img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-bottom: 1px solid var(--ink); }
.consulta .body { padding: clamp(20px, 3vw, 32px); display: grid; gap: 14px; align-content: start; }
.consulta h3 { font-size: var(--step-2); }
.consulta ul { margin: 0; padding-left: 1.1em; display: grid; gap: 6px; color: var(--muted); }
.consulta ul li::marker { color: var(--salvia); }
.consulta .foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px clamp(20px, 3vw, 32px); border-top: 1px solid var(--rule); }
.price { font-family: var(--f-display); font-size: var(--step-3); line-height: 1; font-variant-numeric: lining-nums; }
.price small { font-family: var(--f-body); font-size: .85rem; color: var(--muted); margin-left: 6px; }
@media (max-width: 760px) { .consultas { grid-template-columns: 1fr; } }

/* Proceso (secuencia real) */
.proceso { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; counter-reset: paso; border-top: 1px solid var(--ink); }
.proceso li { counter-increment: paso; padding: 22px 20px 6px 0; display: grid; gap: 10px; align-content: start; }
.proceso li::before { content: counter(paso, upper-roman) "."; font-family: var(--f-display); font-size: var(--step-2); color: var(--madder); line-height: 1; }
.proceso h3 { font-size: var(--step-1); }
.proceso p { color: var(--muted); font-size: .96rem; }
@media (max-width: 860px) { .proceso { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .proceso { grid-template-columns: 1fr; } }

/* Botica */
.botica { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 28px); }
.planta { background: var(--sheet); border: 1px solid var(--rule); padding: 18px; display: grid; gap: 14px; grid-template-rows: auto 1fr; transition: transform .25s, box-shadow .25s; }
.planta:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.planta .label { max-width: none; border-color: var(--rule); background: var(--paper); }
.planta p { font-size: .96rem; color: var(--muted); }
.botica-figure { grid-column: 1; grid-row: span 3; align-self: start; position: sticky; top: 96px; border: 1px solid var(--rule); background: var(--sheet); padding: 12px; display: grid; gap: 10px; align-content: start; }
.botica-figure img { width: 100%; height: auto; }
.botica-figure figcaption { font-size: var(--step--1); color: var(--muted); }
@media (max-width: 900px) { .botica { grid-template-columns: repeat(2, minmax(0, 1fr)); } .botica-figure { grid-column: 1 / -1; grid-row: auto; position: static; } .botica-figure img { max-height: 28rem; width: auto; margin-inline: auto; } }
@media (max-width: 560px) { .botica { grid-template-columns: 1fr; } }

/* Galería campo → botica */
.campo { display: grid; grid-template-columns: 1.3fr 1fr 1fr; grid-template-rows: auto auto; gap: clamp(10px, 1.6vw, 18px); }
.campo figure { margin: 0; position: relative; overflow: hidden; }
.campo img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.campo figure:hover img { transform: scale(1.04); }
.campo figcaption { position: absolute; left: 10px; bottom: 10px; background: var(--sheet); color: var(--ink); font-size: .74rem; padding: 4px 8px; border: 1px solid var(--ink); }
.campo .a { grid-row: span 2; aspect-ratio: 3 / 4; }
.campo .b, .campo .c, .campo .d, .campo .e { aspect-ratio: 4 / 3; }
@media (max-width: 760px) { .campo { grid-template-columns: 1fr 1fr; } .campo .a { grid-column: span 2; grid-row: auto; aspect-ratio: 4 / 3; } }

/* Blog cards */
.posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 2.6vw, 30px); }
.post-card { display: grid; gap: 14px; text-decoration: none; align-content: start; }
.post-card .thumb { aspect-ratio: 4 / 5; overflow: hidden; border: 1px solid var(--rule); background: var(--sheet); }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s cubic-bezier(.2,.7,.2,1); }
.post-card:hover .thumb img { transform: scale(1.04); }
.post-card h3 { font-size: var(--step-1); line-height: 1.2; }
.post-card:hover h3 { color: var(--madder); }
.post-card p { color: var(--muted); font-size: .95rem; }
.post-meta { font-size: var(--step--1); color: var(--muted); display: flex; gap: 14px; flex-wrap: wrap; }
@media (max-width: 860px) { .posts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .posts { grid-template-columns: 1fr; } .post-card .thumb { aspect-ratio: 4 / 3; } }

/* FAQ */
.faq { display: grid; border-top: 1px solid var(--ink); max-width: 52rem; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 40px 20px 0; position: relative; font-family: var(--f-display); font-size: var(--step-1); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 16px; font-size: 1.6rem; color: var(--madder); transition: transform .25s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 22px; color: var(--muted); max-width: 62ch; }

/* Contacto */
.contacto { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.contacto aside { display: grid; gap: 18px; }
.contact-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 0; border-top: 1px solid var(--rule); }
.contact-line strong { font-weight: 600; user-select: all; }
.copy { font: 600 .78rem var(--f-body); border: 1px solid var(--rule); background: transparent; color: var(--ink); padding: 6px 10px; border-radius: 999px; cursor: pointer; }
form.form { background: var(--sheet); border: 1px solid var(--ink); padding: clamp(20px, 3vw, 34px); display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-size: .85rem; font-weight: 600; }
.field input, .field select, .field textarea {
  font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--rule); border-radius: 2px; padding: 12px 14px; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--salvia); outline-offset: 0; border-color: var(--salvia); }
.field textarea { min-height: 120px; resize: vertical; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; color: var(--muted); }
.check input { margin-top: 4px; accent-color: var(--madder); }
.form-status { font-size: .92rem; padding: 12px 14px; border: 1px solid var(--salvia); background: var(--paper); }
@media (max-width: 860px) { .contacto { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .row2 { grid-template-columns: 1fr; } }

/* Aviso sanitario */
.aviso { font-size: var(--step--1); color: var(--muted); border-left: 2px solid var(--madder); padding-left: 14px; max-width: 70ch; }

/* ---------- Footer ---------- */
.site-foot { background: var(--sheet); border-top: 1px solid var(--ink); padding-block: 56px 32px; font-size: .92rem; }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 32px; }
.foot-grid h2 { font-size: var(--step-1); margin-bottom: 12px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot-grid a { text-decoration: none; }
.foot-base { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .84rem; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr; } }

/* ---------- Article ---------- */
.article-hero { padding-block: clamp(36px, 6vw, 72px) 0; }
.article-hero .wrap { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(24px, 4vw, 56px); align-items: end; }
.article-hero h1 { font-size: var(--step-3); margin-block: 14px 18px; }
.article-hero .cover { border: 1px solid var(--rule); box-shadow: var(--shadow); width: auto; max-width: 100%; max-height: 32rem; justify-self: end; }
.crumbs { font-size: var(--step--1); color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a { text-decoration: none; }
@media (max-width: 860px) { .article-hero .wrap { grid-template-columns: 1fr; } .article-hero .cover { justify-self: start; max-height: 24rem; } }

.prose { max-width: 68ch; margin-inline: auto; padding-block: clamp(40px, 6vw, 72px); }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: var(--step-2); margin-top: 2em; }
.prose h3 { font-size: var(--step-1); margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.2em; display: grid; gap: .45em; }
.prose li::marker { color: var(--salvia); }
.prose strong { font-weight: 650; }
.prose figure { margin: 2em 0; }
.prose figure img { width: 100%; border: 1px solid var(--rule); }
.prose figcaption { font-size: var(--step--1); color: var(--muted); margin-top: 8px; }
.prose blockquote { margin: 1.6em 0; padding: 4px 0 4px 20px; border-left: 2px solid var(--madder); font-family: var(--f-display); font-size: var(--step-1); line-height: 1.4; }
.prose .table-wrap { overflow-x: auto; border: 1px solid var(--rule); }
.prose table { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 34rem; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.prose th { font-family: var(--f-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--sheet); }
.callout { background: var(--sheet); border: 1px solid var(--ink); padding: 18px 20px; }
.callout strong:first-child { display: block; font-family: var(--f-display); font-size: var(--step-1); font-weight: 400; margin-bottom: 6px; }
.toc { background: var(--sheet); border: 1px solid var(--rule); padding: 16px 20px; font-size: .95rem; }
.toc ol { margin: 8px 0 0; }
.author { display: flex; gap: 14px; align-items: center; border-top: 1px solid var(--rule); padding-top: 22px; }
.author img { width: 56px; height: 56px; }
.cta-band { background: var(--ink); color: var(--paper); padding-block: clamp(40px, 6vw, 72px); }
.cta-band .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px; }
.cta-band h2 { font-size: var(--step-2); max-width: 26ch; }
.cta-band .btn { border-color: var(--paper); color: var(--paper); }
.cta-band .btn:hover { background: var(--paper); color: var(--ink); }

/* Reveal: visible by default; animates only when supported */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 40%; }
    @keyframes rise { from { opacity: .55; transform: translateY(22px); } to { opacity: 1; transform: none; } }
  }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
