/* Guía de estilos de Ris — tipografía cálida, papel, albaricoque y césped. */
:root {
  --paper: #f4efe6;
  --paper-2: #ebe4d6;
  --ink: #241c16;
  --ink-soft: #5a4e44;
  --muted: #7a6e62;
  --line: #d9d0c3;
  --card: #fffcf7;
  --apricot: #c57a3c;
  --apricot-2: #e8b07a;
  --blush: #f3d7b8;
  --grass: #3f6b3d;
  --grass-2: #6a9a55;
  --shadow: 0 12px 30px rgba(36, 28, 22, .08);
  --radius: 18px;
  --max: 1240px;
  --sans: "Outfit", "Segoe UI", sans-serif;
  --serif: "Fraunces", "Times New Roman", serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(197, 122, 60, .12), transparent 50%),
    radial-gradient(900px 600px at -10% 20%, rgba(106, 154, 85, .10), transparent 50%),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100%;
}
img, video { max-width: 100%; display: block; }
button, input { font: inherit; }
a { color: inherit; }

.skip {
  position: absolute; left: -999px; top: 0;
}
.skip:focus {
  left: 12px; top: 12px; z-index: 80;
  background: #fff; padding: .4rem .8rem; border-radius: 8px;
}

/* ——— Top bar ——— */
.top {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 1rem;
  justify-content: space-between;
  padding: .7rem 1.2rem;
  background: rgba(244, 239, 230, .88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex; align-items: center; gap: .7rem;
  text-decoration: none; min-width: 0;
}
.brand img {
  width: 40px; height: 40px; border-radius: 50%;
  object-fit: cover; border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--line);
}
.brand strong {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -.02em;
}
.brand span { color: var(--muted); font-size: .82rem; display: block; }
.top-meta {
  display: flex; align-items: center; gap: 1rem;
  font-size: .82rem; color: var(--ink-soft);
  white-space: nowrap;
}
.pill {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .2rem .7rem;
  font-variant-numeric: tabular-nums;
}
.pill b { color: var(--grass); font-weight: 650; }

/* ——— Hero ——— */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem 1.2rem 1.4rem;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 2.2rem;
  align-items: center;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 550;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -.03em;
  margin: 0 0 .8rem;
}
.hero h1 em {
  font-style: italic;
  font-weight: 450;
  color: var(--apricot);
}
.hero .lead {
  font-size: 1.08rem;
  color: var(--ink-soft);
  max-width: 36rem;
  margin: 0 0 1.2rem;
}
.stats {
  display: flex; flex-wrap: wrap; gap: .5rem;
  margin: 0 0 1rem;
}
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: .55rem .85rem;
  min-width: 7rem;
}
.stat b {
  display: block;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -.02em;
}
.stat span { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.progress {
  height: 8px; border-radius: 99px;
  background: var(--paper-2);
  overflow: hidden;
  max-width: 22rem;
}
.progress i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--grass), var(--grass-2));
  width: 0;
}
.updated {
  margin: .7rem 0 0;
  font-size: .85rem;
  color: var(--muted);
}
.hero-photo {
  position: relative;
  margin: 0;
}
.hero-photo img {
  width: 100%;
  max-height: 78vh;
  object-fit: cover;
  object-position: 50% 20%;
  border-radius: 28px;
  box-shadow: var(--shadow);
  background: #c5d6b0;
}
.hero-photo figcaption {
  position: absolute; left: 1rem; bottom: 1rem;
  background: rgba(36, 28, 22, .62);
  color: #fff;
  padding: .35rem .7rem;
  border-radius: 999px;
  font-size: .78rem;
  backdrop-filter: blur(6px);
}

/* ——— Filters ——— */
.filters {
  position: sticky; top: 61px; z-index: 30;
  background: rgba(244, 239, 230, .94);
  backdrop-filter: blur(12px);
  border-top: 1px solid transparent;
  border-bottom: 1px solid var(--line);
  padding: .7rem 0 .8rem;
}
.filters-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.2rem;
  display: grid;
  gap: .55rem;
}
.tabs, .chips {
  display: flex; flex-wrap: wrap; gap: .4rem;
}
.tab, .chip, .estado-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-soft);
  border-radius: 999px;
  padding: .35rem .8rem;
  cursor: pointer;
  line-height: 1.2;
}
.tab:hover, .chip:hover, .estado-btn:hover { border-color: #b9ae9e; }
.tab[aria-selected="true"], .chip.is-on, .estado-btn.is-on {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.tab small {
  display: inline-block;
  margin-left: .3rem;
  opacity: .75;
  font-variant-numeric: tabular-nums;
}
.search-row {
  display: flex; flex-wrap: wrap; gap: .5rem;
  align-items: center;
}
.search-row input[type="search"] {
  flex: 1 1 16rem;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: .55rem 1rem;
  outline: none;
}
.search-row input:focus { border-color: var(--apricot); box-shadow: 0 0 0 3px rgba(197,122,60,.2); }
.result-count { font-size: .85rem; color: var(--muted); }

/* ——— Catalog ——— */
.wrap { max-width: var(--max); margin: 0 auto; padding: 1.4rem 1.2rem 4rem; }
.section-title {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 550;
  margin: 0 0 1rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  text-align: left;
  padding: 0;
  color: inherit;
  box-shadow: 0 1px 0 rgba(255,255,255,.7) inset;
  transition: transform .2s ease, box-shadow .2s ease;
  width: 100%;
}
.card:hover, .card:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  outline: none;
}
.card.is-pending { /* still clickable: the ficha shows both slots */ }
.frame {
  position: relative;
  aspect-ratio: 3 / 2;
  background:
    linear-gradient(180deg, #e4ddd0, #d8d1c3);
  overflow: hidden;
}
.frame img, .frame video {
  width: 100%; height: 100%;
  object-fit: cover;
}
.frame .ph {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  font-size: .82rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  background:
    repeating-linear-gradient(-45deg, transparent, transparent 8px, rgba(255,255,255,.25) 8px, rgba(255,255,255,.25) 9px),
    linear-gradient(180deg, #eee8dc, #e2dacb);
}
.compare-split {
  display: grid; grid-template-columns: 1fr 1fr; height: 100%;
}
.compare-split figure {
  margin: 0; position: relative; overflow: hidden; height: 100%;
  background: #ece6d9;
}
.compare-split figure .ph {
  position: absolute; inset: 0;
  font-size: .72rem;
}
.compare-split img, .compare-split video {
  width: 100%; height: 100%; object-fit: cover;
}
.compare-split figcaption {
  position: absolute; left: .35rem; bottom: .35rem;
  background: rgba(36,28,22,.7); color: #fff;
  font-size: .65rem; padding: .1rem .35rem; border-radius: 6px;
}
.badge {
  position: absolute; top: .5rem; left: .5rem;
  background: rgba(255,252,247,.92);
  border-radius: 999px;
  padding: .15rem .5rem;
  font-size: .68rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.badge.hecho { background: var(--grass); color: #fff; }
.badge.curso { background: var(--apricot); color: #fff; }
.badge.vs { left: auto; right: .5rem; background: var(--ink); color: #fff; }
.body {
  padding: .7rem .8rem .85rem;
  display: flex; flex-direction: column; gap: .15rem;
  min-height: 5.4rem;
}
.body h3 {
  margin: 0;
  font-size: .98rem;
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.25;
}
.body .en { color: var(--muted); font-size: .78rem; }
.body .meta { color: var(--ink-soft); font-size: .75rem; margin-top: .25rem; }

.empty {
  text-align: center;
  color: var(--muted);
  padding: 3rem 1rem;
}

/* ——— Modal ——— */
.modal[hidden] { display: none; }
.modal {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(36, 28, 22, .55);
  display: grid; place-items: center;
  padding: 1.2rem;
}
.sheet {
  background: var(--card);
  border-radius: 24px;
  max-width: 980px;
  width: min(980px, 100%);
  max-height: calc(100vh - 2.4rem);
  overflow: auto;
  position: relative;
  box-shadow: 0 30px 80px rgba(0,0,0,.25);
}
.sheet .close {
  position: sticky; top: .7rem; float: right;
  margin: .7rem .7rem 0 0;
  width: 36px; height: 36px;
  border: 0; border-radius: 50%;
  background: var(--paper); cursor: pointer;
  z-index: 2;
}
.sheet-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 0;
  clear: both;
}
.sheet-media {
  background: #1c1814;
  min-height: 280px;
}
.sheet-media img, .sheet-media video {
  width: 100%; height: auto; max-height: 80vh;
  object-fit: contain; margin: 0 auto;
}
.sheet-compare {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px; background: #1c1814;
}
.sheet-compare figure { margin: 0; background: #111; }
.sheet-compare figcaption {
  color: #f4efe6; font-size: .8rem; padding: .4rem .6rem .6rem;
  text-align: center;
}
.sheet-body { padding: 1.4rem 1.5rem 1.8rem; }
.sheet-body h2 {
  font-family: var(--serif);
  font-weight: 550;
  font-size: 1.8rem;
  letter-spacing: -.03em;
  margin: 0 0 .3rem;
  line-height: 1.15;
}
.sheet-body .en { color: var(--muted); margin: 0 0 .8rem; }
.sheet-body p { margin: 0 0 1rem; color: var(--ink-soft); }
.tags { display: flex; flex-wrap: wrap; gap: .35rem; }
.tag {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .2rem .6rem;
  font-size: .78rem;
  background: var(--paper);
}

footer {
  border-top: 1px solid var(--line);
  padding: 1.4rem 1.2rem 2rem;
  color: var(--muted);
  text-align: center;
  font-size: .88rem;
}
footer p { margin: .2rem 0; max-width: 40rem; margin-left: auto; margin-right: auto; }

@media (max-width: 860px) {
  .hero, .sheet-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 1.2rem; }
  .hero-photo img { max-height: 64vh; }
  .top-meta .hide-sm { display: none; }
  .sheet-compare { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr 1fr; gap: .7rem; }
  .brand span { display: none; }
  .body { min-height: 0; padding: .55rem .6rem .7rem; }
  .body h3 { font-size: .88rem; }
}
