/* Fronda Muda — hoja de estilos
   Idea: recortes de papel de colores planos sobre bloques de color saturado.
   Los títulos usan la fuente variable Anybody y cambian de ancho. */

:root {
  --cobalt: #2236d9;
  --deep: #141f96;
  --coral: #ff6b4a;
  --lime: #d4ec6b;
  --mint: #7fdcae;
  --forest: #0b7a55;
  --blush: #ffdde6;
  --sun: #ffc83d;
  --ink: #0c1450;
  --paper: #fff6e6;

  --display: "Anybody", "Arial Black", system-ui, sans-serif;
  --body: "Karla", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --focus: var(--ink);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 1rem; }

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

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

[hidden] { display: none !important; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.vh {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--sun); color: var(--ink); padding: .6rem 1rem; font-weight: 700;
  border-radius: 999px; text-decoration: none;
}
.skip:focus { top: 1rem; }

.wrap { width: 100%; max-width: 78rem; margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Bandas de color ---------- */
.band { padding-block: clamp(3.5rem, 9vw, 7rem); }
.band--cobalt { background: var(--cobalt); color: var(--paper); --focus: var(--sun); }
.band--blush  { background: var(--blush);  color: var(--ink); }
.band--lime   { background: var(--lime);   color: var(--ink); }
.band--deep   { background: var(--deep);   color: var(--paper); --focus: var(--sun); }
.band--coral  { background: var(--coral);  color: var(--ink); }

.hero { padding-block: 0 clamp(2.5rem, 6vw, 5rem); overflow: hidden; }

.h2, .h3 { font-family: var(--display); margin: 0; letter-spacing: -.01em; }
.h2 {
  font-weight: 800; font-variation-settings: "wdth" 125, "wght" 800;
  font-size: clamp(2.1rem, 5.4vw, 4.2rem); line-height: .98;
  max-width: 18ch; text-wrap: balance;
}
.h3 {
  font-weight: 800; font-variation-settings: "wdth" 115, "wght" 800;
  font-size: clamp(1.4rem, 2.6vw, 1.9rem); line-height: 1.05;
}

/* ---------- Botones ---------- */
.btn {
  font: 700 1rem/1.1 var(--body);
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  padding: .9em 1.5em; border-radius: 999px; border: 2.5px solid currentColor;
  background: transparent; color: inherit; cursor: pointer; text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 currentColor; }
.btn:active { transform: translate(0, 0); box-shadow: none; }
.btn--small { padding: .6em 1.1em; font-size: .95rem; }
.btn--sun  { background: var(--sun); color: var(--ink); border-color: var(--ink); }
.btn--ghost { color: var(--paper); }
.btn--ink  { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn--ink:hover { box-shadow: 4px 4px 0 var(--paper); }
.band--lime .btn--ink:hover { box-shadow: 4px 4px 0 var(--cobalt); }
.btn--sun-ink { background: var(--sun); color: var(--ink); border-color: var(--ink); width: 100%; }
.btn--plain { border-color: transparent; text-decoration: underline; text-underline-offset: 3px; }
.btn--plain:hover { box-shadow: none; transform: none; }

/* ---------- Navegación ---------- */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem 2rem; flex-wrap: wrap; padding-block: 1.25rem;
}
.logo {
  display: inline-flex; align-items: center; gap: .6rem; text-decoration: none;
  font: 800 1.35rem/1 var(--display); font-variation-settings: "wdth" 120, "wght" 800;
}
.nav__links { display: flex; gap: 1.75rem; list-style: none; margin: 0 auto 0 0; padding: 0; flex-wrap: wrap; }
.nav__links a { font-weight: 700; text-decoration: none; padding-block: .3rem; border-bottom: 2.5px solid transparent; }
.nav__links a:hover { border-bottom-color: var(--lime); }
.count {
  display: inline-grid; place-items: center; min-width: 1.6em; height: 1.6em; padding-inline: .3em;
  background: var(--sun); color: var(--ink); border-radius: 999px; font-size: .85em;
}

/* ---------- Portada ---------- */
.hero__grid { display: grid; gap: 1.5rem 3rem; padding-top: clamp(1rem, 4vw, 3rem); }

.wordmark {
  margin: 0; display: flex; flex-direction: column;
  font-family: var(--display); font-weight: 900;
  font-size: clamp(3.8rem, 15.5vw, 13rem); line-height: .84; letter-spacing: -.02em;
  position: relative; z-index: 1;
}
.wordmark span { display: block; transition: font-variation-settings .45s cubic-bezier(.2, .8, .2, 1); }
.w1 { color: var(--paper); font-variation-settings: "wdth" var(--w1, 80), "wght" 900; }
.w2 { color: var(--lime);  font-variation-settings: "wdth" var(--w2, 150), "wght" 900; }

.hero__copy { position: relative; z-index: 3; align-self: start; }
.lede { font-size: clamp(1.15rem, 2.2vw, 1.45rem); line-height: 1.45; max-width: 28ch; margin: 0 0 1.5rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .85rem; }
.water { margin: 1.25rem 0 0; max-width: 32ch; min-height: 3.2em; font-weight: 500; }

.hero__plant { margin: 0; position: relative; max-width: 30rem; width: 100%; justify-self: center; }
.hero__plant::before {
  content: ""; position: absolute; inset: 6% 6% 26%; background: var(--coral); border-radius: 50%;
}
.hero__plant svg { position: relative; display: block; width: 100%; height: auto; overflow: visible; }

.pop {
  transform-box: fill-box; transform-origin: 50% 100%;
  animation: pop .75s cubic-bezier(.2, 1.35, .4, 1) both;
  animation-delay: calc(var(--i) * 90ms + 150ms);
}
@keyframes pop { from { transform: scale(0) rotate(-12deg); } to { transform: scale(1) rotate(0); } }

.drops { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.drops i {
  position: absolute; top: -8%; width: 11px; height: 17px; background: var(--sun);
  border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
  animation: fall 1.15s cubic-bezier(.4, 0, 1, 1) forwards;
}
@keyframes fall { from { top: -8%; opacity: 1; } to { top: 92%; opacity: 0; } }

@media (min-width: 900px) {
  .hero__grid { grid-template-columns: 1.05fr .95fr; align-items: start; }
  .wordmark { grid-column: 1 / -1; }
  .hero__copy { grid-column: 1; grid-row: 2; margin-top: 1rem; }
  .hero__plant { grid-column: 2; grid-row: 2; margin-top: -10vw; justify-self: end; }
}
@media (max-width: 899px) {
  .hero__plant { order: 2; max-width: 22rem; }
  .hero__copy { order: 3; }
}

/* ---------- Catálogo ---------- */
.band__head { display: grid; gap: 1rem 3rem; margin-bottom: 2.25rem; }
.band__sub { margin: 0; max-width: 46ch; align-self: end; }
@media (min-width: 900px) { .band__head { grid-template-columns: 1fr 1fr; } }

.filters { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.25rem 2rem; }
.chips { display: flex; flex-wrap: wrap; gap: .6rem; }
.chip {
  font: 700 .98rem/1 var(--body); padding: .65em 1.15em; border-radius: 999px;
  border: 2.5px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.chip:hover { background: rgba(12, 20, 80, .1); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

.range { display: grid; gap: .35rem; min-width: min(17rem, 100%); }
.range input { width: 100%; accent-color: var(--cobalt); }
.filters__count { margin: 1.25rem 0 1.75rem; font-weight: 500; }

.grid { display: grid; gap: 3rem 1.75rem; grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr)); }
.plant { display: grid; gap: 1rem; align-content: start; }
.plant h3 { margin-top: .1rem; }
.plant p { margin: .35rem 0 0; max-width: 34ch; }
.plant__meta { font-weight: 700; }
.plant .btn { justify-self: start; }

.tile { background: var(--tile, var(--cobalt)); aspect-ratio: 4 / 5; overflow: hidden; }
.tile svg { display: block; width: 100%; height: 100%; }
.shape-arch   { border-radius: 999px 999px 14px 14px; }
.shape-egg    { border-radius: 50%; }
.shape-leaf   { border-radius: 0 100% 0 100% / 0 70% 0 70%; }
.shape-square { border-radius: 6px; }
.shape-pill   { border-radius: 14px 14px 999px 999px; }

.empty { padding: 2rem; border: 2.5px dashed var(--ink); border-radius: 14px; }
.empty p { margin: 0 0 1rem; font-weight: 700; }

/* ---------- Test ---------- */
.quiz { display: grid; gap: 3rem; align-items: center; }
.quiz__input p { max-width: 36ch; }
.quiz__input .h2 { margin-bottom: 1rem; }
.quiz input[type="range"] { width: 100%; margin-top: 1.25rem; accent-color: var(--cobalt); height: 2rem; }
.quiz__number {
  margin: .5rem 0 0; display: flex; align-items: baseline; gap: .6rem; color: var(--cobalt);
  font-family: var(--display); font-weight: 900; line-height: .9;
  font-variation-settings: "wdth" var(--qw, 100), "wght" 900;
  font-size: clamp(5rem, 15vw, 9.5rem);
  transition: font-variation-settings .2s ease-out;
}
.quiz__unit { font-size: clamp(1.3rem, 3vw, 2rem); font-variation-settings: "wdth" 100, "wght" 700; color: var(--ink); }
.quiz__result { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 12rem) 1fr; align-items: center; }
.quiz__text p { margin: .6rem 0 1.2rem; max-width: 34ch; }
.tile--small { width: 100%; }
@media (min-width: 900px) { .quiz { grid-template-columns: 1fr 1fr; gap: 4rem; } }
@media (max-width: 520px) { .quiz__result { grid-template-columns: 1fr; } .tile--small { max-width: 12rem; } }

/* ---------- Cuidados ---------- */
.band--deep .h2 { margin-bottom: 2.5rem; max-width: 22ch; }
.care { border-bottom: 2.5px solid var(--paper); }
.care__row {
  display: grid; gap: .6rem 3rem; padding-block: 1.75rem; border-top: 2.5px solid var(--paper);
}
.care__row p { margin: 0; max-width: 46ch; font-size: 1.12rem; }
@media (min-width: 800px) { .care__row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); align-items: baseline; } }

/* ---------- Contacto ---------- */
.contact { display: grid; gap: 3.5rem; }
.contact .h2 { margin-bottom: 2rem; }
@media (min-width: 900px) { .contact { grid-template-columns: 1.15fr .85fr; gap: 5rem; } }

.form { display: grid; gap: 1.1rem; max-width: 34rem; }
.field { display: grid; gap: .35rem; }
.field label { font-weight: 700; }
.field input, .field select, .field textarea {
  font: 500 1rem/1.4 var(--body); color: var(--ink); background: var(--paper);
  border: 2.5px solid var(--ink); border-radius: 14px; padding: .8rem 1rem; width: 100%;
}
.field textarea { resize: vertical; min-height: 8rem; }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-width: 5px; padding: calc(.8rem - 2.5px) calc(1rem - 2.5px); }
.err { margin: 0; font-weight: 700; }
.err::before { content: "Revisa: "; }
.form .btn { justify-self: start; }
.form__ok { margin: 0; font-weight: 700; max-width: 40ch; }

.details { margin: 0; display: grid; gap: 1.6rem; align-content: start; }
.details dt { font: 800 1.35rem/1.1 var(--display); font-variation-settings: "wdth" 115, "wght" 800; margin-bottom: .25rem; }
.details dd { margin: 0; font-size: 1.12rem; }
.details a { text-underline-offset: 3px; font-weight: 700; }

/* ---------- Pie ---------- */
.footer { background: var(--ink); color: var(--paper); padding-block: 2rem; --focus: var(--sun); }
.footer__row { display: flex; flex-wrap: wrap; gap: .75rem 2rem; justify-content: space-between; align-items: baseline; }
.footer p { margin: 0; }
.footer__brand { font: 800 1.35rem/1 var(--display); font-variation-settings: "wdth" 120, "wght" 800; color: var(--lime); }

/* ---------- Panel de selección ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 40; background: rgba(12, 20, 80, .6);
  opacity: 0; transition: opacity .25s ease;
}
.overlay.is-open { opacity: 1; }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 50; width: min(27rem, 100%);
  background: var(--paper); color: var(--ink); border-left: 4px solid var(--ink);
  display: flex; flex-direction: column; padding: 1.5rem;
  transform: translateX(100%); visibility: hidden;
  transition: transform .3s ease, visibility 0s linear .3s;
}
.drawer.is-open { transform: translateX(0); visibility: visible; transition: transform .3s ease, visibility 0s; }
.drawer__head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.drawer__list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; }
.drawer__list li {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: .85rem 0; border-top: 2.5px solid var(--ink);
}
.drawer__list li:last-child { border-bottom: 2.5px solid var(--ink); }
.drawer__list strong { display: block; font-weight: 700; }
.drawer__empty { margin: 0; flex: 1; }
.drawer__foot { display: grid; gap: .75rem; padding-top: 1.25rem; }

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
