/* Micelio landing. Mobile first; palette and type from the approved identity (S1). */

:root {
  --humus: #3B2A1E;
  --musgo: #4F6B3A;
  --musgo-dark: #3F5730;
  --brote: #8BAF5A;
  --brote-light: #B7CF8A;
  --arcilla: #C2703D;
  --paja: #E9DCC3;
  --fondo: #FBF8F2;
  --card: #F4EDE0;
  --trigo: #D9A441;
  --text-soft: #6B5A4C;
  --error: #A4482A;

  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 14px;
  --radius-sm: 12px;
  --gutter: 16px;
  --max: 1080px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--fondo);
  color: var(--humus);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.25rem, 9vw, 4rem); }
h2 { font-size: clamp(1.6rem, 6vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

a { color: var(--musgo); }
a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible {
  outline: 3px solid var(--arcilla);
  outline-offset: 2px;
}

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 680px; }

.skip {
  position: absolute; left: var(--gutter); top: -60px;
  background: var(--humus); color: var(--fondo);
  padding: 8px 14px; border-radius: 8px; z-index: 20;
}
.skip:focus { top: 8px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(251, 248, 242, 0.94);
  border-bottom: 1px solid var(--paja);
  backdrop-filter: blur(6px);
}
.header-row { display: flex; align-items: center; justify-content: space-between; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--humus); }
.wordmark { font-family: var(--font-head); font-weight: 500; font-size: 1.5rem; letter-spacing: -0.01em; }
.header-cta {
  font-weight: 700; text-decoration: none; color: var(--musgo);
  padding: 8px 14px; border: 1.5px solid var(--musgo); border-radius: 999px; font-size: 0.95rem;
}
.header-cta:hover { background: var(--musgo); color: var(--fondo); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 26px;
  font: inherit; font-weight: 700; font-size: 1.05rem;
  border: 0; border-radius: 999px; cursor: pointer; text-decoration: none;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.btn-primary { background: var(--musgo); color: var(--fondo); }
.btn-primary:hover { background: var(--musgo-dark); }
.btn-primary:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.7; cursor: progress; }
.btn-block { width: 100%; }

/* Hero */
.hero { position: relative; padding: 48px 0 72px; text-align: center; }
.hero-inner { display: flex; flex-direction: column; align-items: center; }
.hero-logo { margin-bottom: 4px; }
.hero-title { font-size: clamp(3rem, 14vw, 5rem); margin-bottom: 0.15em; letter-spacing: -0.02em; }
.hero-line {
  font-family: var(--font-head); font-weight: 500;
  font-size: clamp(1.3rem, 5vw, 1.9rem); line-height: 1.3;
  max-width: 26em; margin-bottom: 28px;
}
.badge {
  display: inline-block; margin-bottom: 18px;
  padding: 4px 14px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--paja);
  color: var(--arcilla); font-weight: 700; font-size: 0.875rem; letter-spacing: 0.02em;
}
.hero-note { margin-top: 14px; font-size: 0.95rem; color: var(--text-soft); }
.hyphae {
  position: absolute; left: 0; right: 0; bottom: 8px;
  width: 100%; height: 40px;
}
.hyphae path { fill: none; stroke: var(--paja); stroke-width: 1.6; stroke-linecap: round; vector-effect: non-scaling-stroke; }

/* Sections */
.section { padding: 56px 0; }
.section-soft { background: var(--card); border-top: 1px solid var(--paja); border-bottom: 1px solid var(--paja); }
.section-lead { color: var(--text-soft); max-width: 38em; margin-bottom: 28px; }

.card {
  background: var(--card);
  border: 1px solid var(--paja);
  border-radius: var(--radius);
  padding: 20px;
}

/* Features */
.features { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 14px; }
.feature h3 { margin-bottom: 0.4em; }
.feature p { margin: 0; color: var(--text-soft); }
.icon { width: 40px; height: 40px; margin-bottom: 12px; }
.icon,
.offline-note svg,
.impact svg { fill: none; stroke: var(--musgo); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon .accent,
.offline-note .accent { stroke: var(--arcilla); }
.icon .accent-fill { fill: var(--arcilla); stroke: none; }

.offline-note {
  display: flex; gap: 12px; align-items: flex-start;
  margin: 20px 0 0; padding: 14px 16px;
  border: 1px dashed var(--brote); border-radius: var(--radius-sm);
  color: var(--text-soft); font-size: 0.98rem;
}
.offline-note svg { width: 28px; height: 28px; flex: none; }
.offline-note strong { color: var(--humus); }

/* Network */
.network { display: flex; flex-direction: column; gap: 8px; }
.network .section-lead { margin-bottom: 0; }
.network-art { width: 100%; max-width: 420px; height: auto; margin: 8px auto 0; }
.network-art .links path { fill: none; stroke: var(--paja); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.n-musgo { fill: var(--musgo); }
.n-brote { fill: var(--brote); }
.n-arcilla { fill: var(--arcilla); }
.n-trigo { fill: var(--trigo); }

/* Impact */
.impact { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 14px; }
.impact li { display: flex; gap: 14px; align-items: center; font-size: 1.1rem; font-weight: 500; }
.impact svg { width: 32px; height: 32px; flex: none; stroke-width: 1.8; }
.impact svg circle { fill: var(--card); stroke: var(--brote); }

/* CTA band */
.cta-band { background: var(--musgo); color: var(--fondo); text-align: center; padding: 56px 0; }
.cta-band h2 { margin-bottom: 0.2em; }
.cta-sub { font-family: var(--font-head); font-size: 1.3rem; color: var(--brote-light); margin-bottom: 0.6em; }
.cta-band p { margin-left: auto; margin-right: auto; max-width: 32em; }
.cta-band .btn { margin-top: 8px; }
.btn-light { background: var(--fondo); color: var(--musgo); }
.btn-light:hover { background: var(--paja); }
.cta-band a:focus-visible { outline-color: var(--trigo); }

/* Form */
.section-form { background: var(--card); border-top: 1px solid var(--paja); border-bottom: 1px solid var(--paja); }
.form { padding: 22px 18px; background: var(--fondo); }
.field { margin: 0 0 18px; padding: 0; border: 0; min-width: 0; }
.row-2 { display: grid; gap: 0; }
label, legend { display: block; font-weight: 700; margin-bottom: 6px; padding: 0; }
.optional { font-weight: 400; color: var(--text-soft); }
input[type="text"],
input[type="tel"] {
  width: 100%; min-height: 50px; padding: 10px 14px;
  font: inherit; color: var(--humus);
  background: #fff; border: 1.5px solid var(--paja); border-radius: var(--radius-sm);
}
input[type="text"]:focus,
input[type="tel"]:focus { border-color: var(--musgo); outline: none; box-shadow: 0 0 0 3px rgba(79, 107, 58, 0.18); }
input[aria-invalid="true"] { border-color: var(--error); }
.hint { margin: 6px 0 0; font-size: 0.9rem; color: var(--text-soft); }
.error { margin: 6px 0 0; font-size: 0.92rem; font-weight: 700; color: var(--error); }
.error:empty { display: none; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; margin: 0; font-weight: 500; cursor: pointer; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px;
  border: 1.5px solid var(--paja); border-radius: 999px; background: #fff;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.chip:hover span { border-color: var(--brote); }
.chip input:checked + span { background: var(--musgo); border-color: var(--musgo); color: var(--fondo); }
.chip input:focus-visible + span { outline: 3px solid var(--arcilla); outline-offset: 2px; }
fieldset[aria-invalid="true"] .chip span { border-color: var(--error); }

.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 500; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; flex: none; accent-color: var(--musgo); }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-status {
  margin: 0 0 18px; padding: 12px 14px; border-radius: var(--radius-sm);
  background: #F6E2D6; border: 1px solid var(--arcilla); color: var(--humus); font-weight: 500;
}
.form-status button {
  margin-left: 6px; padding: 0; border: 0; background: none;
  font: inherit; font-weight: 700; color: var(--musgo); text-decoration: underline; cursor: pointer;
}
.fineprint { margin: 12px 0 0; font-size: 0.88rem; color: var(--text-soft); text-align: center; }

.success { text-align: center; padding: 32px 22px; background: var(--fondo); border-color: var(--brote); }
.success img { margin: 0 auto 16px; }
.success p { color: var(--text-soft); }
.success p:last-child { margin-bottom: 0; }
.success:focus { outline: none; }

/* FAQ */
.faq { display: grid; gap: 10px; }
.faq details { padding: 0; }
.faq summary {
  list-style: none; cursor: pointer; padding: 16px 44px 16px 18px; position: relative;
  font-weight: 700;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-head); font-size: 1.4rem; color: var(--arcilla);
}
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0; padding: 0 18px 16px; color: var(--text-soft); }

/* Footer */
.site-footer { padding: 40px 0 48px; border-top: 1px solid var(--paja); text-align: center; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.footer-inner p { margin: 8px 0 0; }
.institutional {
  margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--paja);
  max-width: 40em; font-size: 0.95rem; color: var(--text-soft);
}
.institutional strong { color: var(--humus); font-weight: 700; }

/* Wider screens */
@media (min-width: 640px) {
  .row-2 { grid-template-columns: 1fr 1fr; gap: 16px; }
  .features { grid-template-columns: 1fr 1fr; }
  .form { padding: 28px; }
}

@media (min-width: 900px) {
  .hero { padding: 80px 0 104px; }
  .section { padding: 80px 0; }
  .cta-band { padding: 80px 0; }
  .features { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .network { flex-direction: row; align-items: center; gap: 40px; }
  .network > div { flex: 1; }
  .network-art { flex: 1; margin: 0; }
}
