/* Tigritos web. El mismo sistema que la app (DESIGN.md de la app):
   papel crema, tinta de 2px, camaras oscuras, EB Garamond + Figtree,
   Ember como unica accion y verde bosque solo para la confianza. */

@font-face {
  font-family: "EB Garamond";
  src: url("../fonts/ebgaramond-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Figtree";
  src: url("../fonts/figtree-latin.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;

  --paper: #ffffeb;
  --paper-deep: #f6f6dc;
  --stone: #e4e4d0;
  --ink: #1a1a1a;
  --ink-muted: #5c5c53;
  --fog: #75756b;
  --ember: #ffa946;
  --ember-wash: #fff0cc;
  --forest: #034f46;
  --brick: #b0412a;
  --paper-muted: #b9b9a6;
  --ink-line: #3a3a36;

  --serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;

  --r-control: 12px;
  --r-group: 24px;
  --r-card: 32px;
  --r-chamber: 40px;

  --stroke: 2px;

  --gutter: 20px;
  --wrap: 1200px;
  --header-h: 64px;

  --out: cubic-bezier(0.16, 1, 0.3, 1);
  --in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --t-press: 90ms;
  --t-quick: 180ms;
  --t-base: 320ms;
  --t-enter: 520ms;
}

@media (min-width: 720px) {
  :root {
    --gutter: 32px;
    --header-h: 72px;
  }
}

@media (min-width: 1100px) {
  :root {
    --gutter: 48px;
  }
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  scrollbar-color: var(--ink) var(--paper-deep);
  scrollbar-width: thin;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.42;
  font-weight: 400;
  font-feature-settings: "kern" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  caret-color: var(--ink);
  overflow-x: clip;
}

::selection {
  background: var(--ember);
  color: var(--ink);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--paper-deep);
}
::-webkit-scrollbar-thumb {
  background: var(--ink);
  border: 3px solid var(--paper-deep);
  border-radius: 999px;
}

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

h1,
h2,
h3,
h4,
p,
ol,
ul,
figure {
  margin: 0;
}

ol,
ul {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.2em;
  transition: text-decoration-color var(--t-quick) var(--out);
}

a:hover {
  text-decoration-color: var(--ember);
}

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

.chamber :focus-visible {
  outline-color: var(--paper);
}

.skip {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 100;
  padding: 12px 16px;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--r-control);
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

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

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
}

/* ---------- Tipografia ---------- */

.t-display-xl {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3.25rem, 1.55rem + 6.2vw, 6rem);
  line-height: 0.92;
  letter-spacing: -0.034em;
  text-wrap: balance;
}

.t-display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.75rem, 1.9rem + 3.4vw, 3.75rem);
  line-height: 0.95;
  letter-spacing: -0.033em;
  text-wrap: balance;
}

.t-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.25rem, 1.8rem + 1.8vw, 2.75rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.t-headline {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 34px;
  line-height: 1.02;
  letter-spacing: -0.026em;
}

.t-heading {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 28px;
  line-height: 1.06;
  letter-spacing: -0.021em;
  text-wrap: balance;
}

.t-subheading {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.12;
  letter-spacing: -0.014em;
}

.t-lead {
  font-size: 19px;
  line-height: 1.45;
  color: var(--ink-muted);
  text-wrap: pretty;
}

.t-callout {
  font-size: 15px;
  line-height: 1.4;
}

.t-label {
  font-size: 15px;
  line-height: 1.25;
  font-weight: 600;
}

.t-caption {
  font-size: 13px;
  line-height: 1.3;
  font-weight: 500;
}

.muted {
  color: var(--ink-muted);
}

.faint {
  color: var(--fog);
}

.tabular {
  font-variant-numeric: tabular-nums;
}

/* ---------- Marca del tigre ---------- */

.mark {
  width: var(--mark, 48px);
  height: var(--mark, 48px);
  overflow: visible;
}

.mark .m-coat {
  fill: var(--ember);
}
.mark .m-paper {
  fill: var(--paper);
}
.mark .m-ink {
  fill: var(--ink);
}
.mark .m-edge {
  stroke: var(--ink);
  stroke-width: 3.4;
  stroke-linejoin: round;
}
.mark .m-mouth {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mark .m-glint {
  fill: var(--paper);
}
.mark--inverse .m-edge {
  stroke: var(--paper);
}

.mark .m-head,
.mark .m-stripe,
.mark .m-eye {
  transform-box: view-box;
}
.mark .m-head {
  transform-origin: 50px 58px;
}

/* El tigre se dibuja: cabeza, rayas en secuencia, hocico, y abre los ojos.
   Mismos tiempos que AnimatedTigerMark (1300ms). */
.js .mark--draw:not(.is-drawn) .m-head,
.js .mark--draw:not(.is-drawn) .m-stripe,
.js .mark--draw:not(.is-drawn) .m-nose,
.js .mark--draw:not(.is-drawn) .m-eye,
.js .mark--draw:not(.is-drawn) .m-glint {
  opacity: 0;
}

.mark--draw.is-drawn .m-head {
  animation: m-head 546ms var(--out) both;
}
.mark--draw.is-drawn .m-stripe.m-v {
  animation: m-stripe-v 390ms var(--out) both;
  animation-delay: calc(364ms + var(--i) * 71.5ms);
}
.mark--draw.is-drawn .m-stripe.m-h {
  animation: m-stripe-h 390ms var(--out) both;
  animation-delay: calc(364ms + var(--i) * 71.5ms);
}
.mark--draw.is-drawn .m-nose {
  animation: m-fade 325ms var(--out) 715ms both;
}
.mark--draw.is-drawn .m-eye {
  animation: m-eye 286ms var(--out) 1014ms both;
}
.mark--draw.is-drawn .m-glint {
  animation: m-fade 160ms linear 1180ms both;
}

@keyframes m-head {
  from {
    transform: scale(0.6);
    opacity: 0;
  }
  35% {
    opacity: 1;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
@keyframes m-stripe-v {
  from {
    transform: scaleY(0);
  }
  to {
    transform: scaleY(1);
  }
}
@keyframes m-stripe-h {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}
@keyframes m-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes m-eye {
  from {
    transform: scaleY(0.15);
  }
  to {
    transform: scaleY(1);
  }
}

.lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  border-radius: 12px;
}
.lockup .mark {
  --mark: 36px;
}
.lockup-word {
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1;
  letter-spacing: -0.02em;
  transform: translateY(-1px);
}

/* ---------- Botones ---------- */

.btn {
  --btn-bg: var(--paper);
  --btn-fg: var(--ink);
  --btn-border: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 12px 24px;
  border: var(--stroke) solid var(--btn-border);
  border-radius: var(--r-control);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: 600 16px/1.2 var(--sans);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform var(--t-press) ease-out,
    background-color var(--t-quick) var(--out),
    color var(--t-quick) var(--out);
}

.btn:active:not([aria-disabled="true"]) {
  transform: translateY(var(--stroke));
}

.btn--primary {
  --btn-bg: var(--ember);
}
.btn--primary:hover {
  --btn-bg: #ffb35c;
}
.btn--secondary:hover {
  --btn-bg: var(--paper-deep);
}
.btn--ink {
  --btn-bg: var(--ink);
  --btn-fg: var(--paper);
}
.btn--on-ink {
  --btn-bg: var(--ink);
  --btn-fg: var(--paper);
  --btn-border: var(--paper);
}
.btn--on-ink:hover {
  --btn-bg: #262624;
}

.btn--compact {
  min-height: 44px;
  padding: 10px 16px;
}

.btn[aria-disabled="true"] {
  --btn-bg: transparent;
  --btn-fg: var(--fog);
  --btn-border: var(--stone);
  cursor: default;
}
.chamber .btn[aria-disabled="true"] {
  --btn-fg: var(--paper-muted);
  --btn-border: var(--ink-line);
}

@media (max-width: 480px) {
  .btn {
    white-space: normal;
    max-width: 100%;
    text-align: center;
  }
}

.btn-note {
  font-size: 13px;
  font-weight: 500;
  opacity: 0.9;
}

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 599px) {
  .stores .btn {
    flex: 1 1 100%;
  }
}

/* ---------- Pastillas ---------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}
.pill .icon {
  width: 14px;
  height: 14px;
}
.pill--outline {
  border: var(--stroke) solid var(--ink);
  background: var(--paper);
}
.pill--stone {
  background: var(--stone);
  color: var(--ink);
}
.pill--forest {
  background: var(--forest);
  color: var(--paper);
}
.pill--forest .icon {
  color: var(--ember);
}
.pill--ink {
  background: var(--ink);
  color: var(--paper);
}
.pill--large {
  height: 40px;
  padding: 0 16px;
  font-size: 15px;
}
.pill--large .icon {
  width: 16px;
  height: 16px;
}
.pill--money {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 400;
  letter-spacing: -0.01em;
}

/* ---------- Superficies ---------- */

.chamber {
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--r-chamber);
}

.card {
  background: var(--paper);
  color: var(--ink);
  border: var(--stroke) solid var(--ink);
  border-radius: var(--r-card);
}

.avatar {
  --size: 40px;
  display: inline-grid;
  place-items: center;
  width: var(--size);
  height: var(--size);
  flex: none;
  border-radius: 50%;
  background: var(--paper-deep);
  border: 1.5px solid var(--ink);
  color: var(--ink);
  font-family: var(--serif);
  font-size: calc(var(--size) * 0.42);
  letter-spacing: -0.02em;
  line-height: 1;
}

/* ---------- Cabecera ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: var(--stroke) solid transparent;
  transition: border-color var(--t-base) var(--out);
}

.site-header.is-scrolled {
  border-bottom-color: var(--ink);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--header-h);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav-link {
  display: none;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
}
.site-nav-link:hover {
  text-decoration: underline;
  text-decoration-color: var(--ember);
}

@media (min-width: 720px) {
  .site-nav-link {
    display: inline-block;
  }
}

/* En la portada el boton de la cabecera aparece solo cuando los de la
   pagina salen de vista: una sola accion Ember a la vez. */
.js .header-cta[data-autohide] {
  transition:
    opacity var(--t-base) var(--out),
    transform var(--t-base) var(--out),
    visibility 0s linear var(--t-base);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
}
.js .header-cta[data-autohide].is-shown {
  transition:
    opacity var(--t-base) var(--out),
    transform var(--t-base) var(--out),
    visibility 0s;
  opacity: 1;
  visibility: visible;
  transform: none;
}

/* ---------- Entrada ---------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity var(--t-enter) var(--out),
    transform var(--t-enter) var(--out);
  transition-delay: calc(var(--d, 0) * 60ms);
}
.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* ---------- Portada ---------- */

.hero {
  padding-block: 28px 64px;
}

.hero-grid {
  display: grid;
  gap: 48px;
  align-items: center;
}

.hero-copy .mark {
  --mark: 84px;
  margin-bottom: 28px;
}

.hero h1 {
  max-width: 11ch;
}

.hero-lead {
  margin-top: 24px;
  max-width: 40ch;
}

.hero .stores {
  margin-top: 32px;
}

.hero-card-wrap {
  position: relative;
}

.hero-feed-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}
.hero-feed-head .word {
  font-family: var(--serif);
  font-size: 44px;
  line-height: 0.95;
  letter-spacing: -0.03em;
}
.hero-feed-date {
  margin-top: 6px;
  color: var(--ink-muted);
}
.hero-feed .filters {
  margin: 16px 0 18px;
}
.hero-feed [data-sync] {
  transition: opacity var(--t-quick) var(--out);
}
.hero-feed [data-sync].is-swapping {
  opacity: 0;
}
.hero-peek {
  height: 118px;
  margin-top: 14px;
  overflow: hidden;
}
.hero-peek .card {
  padding: 18px 16px 22px 22px;
}

.hero-card-note {
  margin-top: 12px;
  color: var(--fog);
}

@media (min-width: 960px) {
  .hero {
    padding-block: 40px 96px;
  }
  .hero-grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: start;
    gap: 64px;
    min-height: min(720px, calc(100svh - var(--header-h) - 136px));
  }
  .hero-copy .mark {
    --mark: 96px;
  }
}

/* ---------- Recorte (tarjeta de tigrito) ---------- */

.clip {
  padding: 18px 16px 22px 22px;
}

.clip-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.clip-who {
  flex: 1;
  min-width: 0;
}

.clip-name {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.clip-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin-top: 3px;
  color: var(--fog);
}

.clip-more {
  align-self: flex-start;
  width: 22px;
  height: 22px;
  color: var(--ink);
}

.clip-title {
  margin-top: 16px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 34px;
  line-height: 1.02;
  letter-spacing: -0.026em;
}

.clip-title .busca {
  color: var(--fog);
}

.clip-desc {
  margin-top: 12px;
  color: var(--ink-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.clip-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

/* La tarjeta de la portada: cuatro tigritos apilados en la misma celda que
   se turnan. La altura es la del mas largo, asi nada salta. */
.hero-card {
  display: grid;
  padding: 22px 20px 26px 26px;
}

.hero-card .clip-title {
  font-size: clamp(38px, 2.2rem + 1.2vw, 48px);
}

.face {
  grid-area: 1 / 1;
}

.js .face {
  visibility: hidden;
}
.js .face.is-current {
  visibility: visible;
}

.face.is-leaving {
  visibility: visible;
}
.face.is-leaving .clip-author,
.face.is-leaving .clip-desc,
.face.is-leaving .clip-pills {
  animation: face-out 260ms var(--in-out) both;
}
.face.is-leaving .roll {
  animation: roll-out 360ms var(--in-out) both;
}
.face.is-entering .clip-author,
.face.is-entering .clip-desc,
.face.is-entering .clip-pills {
  animation: face-in var(--t-enter) var(--out) both;
}
.face.is-entering .clip-desc {
  animation-delay: 60ms;
}
.face.is-entering .clip-pills {
  animation-delay: 120ms;
}
.face.is-entering .roll {
  animation: roll-in 620ms var(--out) 80ms both;
}

.roll-window {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}

.roll {
  display: inline-block;
}

@keyframes face-out {
  to {
    opacity: 0;
  }
}
@keyframes face-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
@keyframes roll-out {
  to {
    transform: translateY(-105%);
  }
}
@keyframes roll-in {
  from {
    transform: translateY(105%);
  }
}

/* ---------- Historia ---------- */

.story {
  padding-block: 32px 96px;
}

.story-head {
  max-width: 760px;
}

.story-head .t-lead {
  margin-top: 16px;
  max-width: 44ch;
}

.story-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 48px;
}

.stage,
.stage-pin {
  display: contents;
}

.step {
  order: var(--o);
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 16px;
  align-items: start;
  padding-top: 24px;
}

.step-num {
  grid-row: 1 / span 2;
  font-family: var(--serif);
  font-size: 56px;
  line-height: 0.8;
  letter-spacing: -0.03em;
  color: var(--ink);
  font-variant-numeric: lining-nums;
  min-width: 0.7em;
}

.step h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 1.4rem + 1.3vw, 38px);
  line-height: 1.02;
  letter-spacing: -0.024em;
  text-wrap: balance;
}

.step p {
  grid-column: 2;
  margin-top: 14px;
  color: var(--ink-muted);
  max-width: 40ch;
  text-wrap: pretty;
}

.frame {
  order: var(--o);
  position: relative;
  overflow: hidden;
  padding: 24px;
  min-height: 440px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Escritorio: la escena queda fija a la derecha y cambia con cada paso. */
@media (min-width: 960px) {
  .js .story-grid {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    column-gap: 72px;
    margin-top: 16px;
  }
  .js .step {
    grid-column: 1;
    min-height: 78vh;
    align-content: center;
    padding-top: 0;
    opacity: 0.32;
    transition: opacity var(--t-base) var(--out);
  }
  .js .step.is-active {
    opacity: 1;
  }
  .js .step-num {
    font-size: 72px;
  }
  .js .stage {
    display: block;
    grid-column: 2;
    grid-row: 1 / span 4;
  }
  .js .stage-pin {
    display: block;
    position: sticky;
    top: calc(var(--header-h) + (100vh - var(--header-h) - 560px) / 2);
    height: 560px;
  }
  .js .frame {
    position: absolute;
    inset: 0;
    min-height: 0;
    padding: 36px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(14px) scale(0.985);
    transition:
      opacity 420ms var(--out),
      transform 520ms var(--out),
      visibility 0s linear 420ms;
  }
  .js .frame.is-live {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition:
      opacity 420ms var(--out),
      transform 520ms var(--out),
      visibility 0s;
  }
}

/* Piezas comunes dentro de las escenas */

.frame-caption {
  position: absolute;
  left: 24px;
  bottom: 18px;
  color: var(--paper-muted);
}

@media (min-width: 960px) {
  .js .frame-caption {
    left: 36px;
    bottom: 24px;
  }
}

.sheet {
  background: var(--paper);
  color: var(--ink);
  border: var(--stroke) solid var(--ink);
  border-radius: var(--r-card);
  padding: 22px;
}

.field {
  display: block;
}
.field + .field {
  margin-top: 14px;
}
.field-label {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}
.field-label .opt {
  font-size: 13px;
  font-weight: 500;
  color: var(--fog);
}
.field-box {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 12px 16px;
  border: var(--stroke) solid var(--ink);
  border-radius: var(--r-control);
  background: var(--paper);
}
.field-box.is-focus {
  border-width: 3px;
  padding: 11px 15px;
  background: #fff;
}
.field-box--serif {
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1.06;
  letter-spacing: -0.02em;
}
.field-box--text {
  font-size: 15px;
  line-height: 1.4;
  color: var(--ink);
}

.caret {
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 2px;
  background: var(--ink);
  vertical-align: -0.12em;
  animation: caret 1s steps(1) infinite;
}
@keyframes caret {
  50% {
    opacity: 0;
  }
}

.snack {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--r-control);
  background: var(--ink);
  color: var(--paper);
  border: var(--stroke) solid var(--paper);
  font-size: 15px;
}
.snack .icon {
  color: var(--ember);
}

/* Escena 1: publicar */
.compose .row {
  display: flex;
  gap: 12px;
  margin-top: 14px;
}
.compose .row .field {
  flex: 1;
  margin: 0;
}
.compose .btn {
  width: 100%;
  margin-top: 18px;
}
.compose-snack {
  margin-top: 16px;
}

.frame.is-live .compose-desc {
  animation: face-in 420ms var(--out) 1300ms both;
}
.frame.is-live .compose-budget {
  animation: face-in 420ms var(--out) 1550ms both;
}
.frame.is-live .compose .btn {
  animation: press 360ms var(--out) 2250ms both;
}
.frame.is-live .compose-snack {
  animation: snack-in 520ms var(--out) 2450ms both;
}
.frame.is-live .compose .field-box--serif {
  animation: unfocus 1ms linear 1300ms both;
}

@keyframes press {
  30% {
    transform: translateY(2px);
  }
  to {
    transform: none;
  }
}
@keyframes snack-in {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
}
@keyframes unfocus {
  to {
    border-width: 2px;
    padding: 12px 16px;
    background: var(--paper);
  }
}

/* Escena 2: el feed de tu ciudad */
.feed-mast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.feed-mast .word {
  font-family: var(--serif);
  font-size: 44px;
  line-height: 0.95;
  letter-spacing: -0.03em;
}
.feed-mast .mark {
  --mark: 40px;
}
.feed-date {
  margin-top: 6px;
  color: var(--paper-muted);
}
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.pill--on-ink {
  border: var(--stroke) solid var(--paper);
  color: var(--paper);
}
.pill--filter {
  background: var(--ink);
  color: var(--paper);
  border: var(--stroke) solid var(--ink);
}
.chamber .pill--filter {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}
.feed-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}
.feed-list .clip {
  padding: 16px 14px 18px 18px;
}
.feed-list .clip-title {
  font-size: 30px;
  margin-top: 12px;
}
.feed-list .clip-desc {
  -webkit-line-clamp: 1;
  margin-top: 8px;
}
.frame--feed {
  justify-content: flex-start;
}
.frame.is-live .feed-list .clip:first-child {
  animation: drop-in 640ms var(--out) 250ms both;
}
.frame.is-live .feed-list .clip + .clip {
  animation: push-down 640ms var(--out) 250ms both;
}
@keyframes drop-in {
  from {
    opacity: 0;
    transform: translateY(-28px);
  }
}
@keyframes push-down {
  from {
    transform: translateY(-120px);
  }
}

/* Escena 3: contacto */
.contact-card {
  padding: 16px 16px 18px 18px;
}
.contact-card .clip-title {
  font-size: 30px;
  margin-top: 12px;
}
.contact-block {
  margin-top: 26px;
}
.contact-block .btn {
  width: 100%;
}
.contact-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}
.contact-block .btn--primary {
  margin-top: 16px;
}
.notice {
  display: flex;
  margin-bottom: 16px;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 20px;
  background: var(--ember-wash);
  color: var(--ink);
  border: var(--stroke) solid var(--ink);
}
.notice .avatar {
  --size: 40px;
}
.notice p {
  font-size: 15px;
  line-height: 1.35;
}
.notice .when {
  display: block;
  margin-top: 2px;
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 500;
}
.js .notice {
  opacity: 0;
}
.frame.is-live .notice {
  animation: notice-in 640ms var(--out) 1250ms both;
}
.frame.is-live .contact-block .btn--primary {
  animation: press 380ms var(--out) 800ms both;
}
@keyframes notice-in {
  from {
    opacity: 0;
    transform: translateY(-24px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Escena 4: valorar */
.rate {
  text-align: center;
  padding: 18px 22px 26px;
}
.grabber {
  width: 40px;
  height: 5px;
  margin: 0 auto 20px;
  border-radius: 999px;
  background: var(--stone);
}
.rate .avatar {
  --size: 64px;
  margin: 0 auto;
}
.rate h4 {
  margin-top: 12px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 28px;
  line-height: 1.06;
  letter-spacing: -0.021em;
}
.rate .ask {
  margin-top: 4px;
  color: var(--ink-muted);
  font-size: 15px;
}
.stars {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}
.star {
  position: relative;
  width: 40px;
  height: 40px;
}
.star svg {
  position: absolute;
  inset: 0;
  width: 40px;
  height: 40px;
}
.star .on {
  color: var(--ember);
}
.star .off {
  color: var(--ink);
}
.frame.is-live .star .on {
  animation: star-on 360ms var(--out) both;
  animation-delay: calc(500ms + var(--s) * 140ms);
}
@keyframes star-on {
  from {
    opacity: 0;
    transform: scale(0.4);
  }
  60% {
    transform: scale(1.12);
  }
}
.rate-word {
  margin-top: 10px;
  font-size: 15px;
  font-weight: 600;
  min-height: 20px;
}
.frame.is-live .rate-word {
  animation: face-in 360ms var(--out) 1250ms both;
}
.rate-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
}
.rate-result .t-caption {
  color: var(--paper-muted);
}
.frame.is-live .rate-result {
  animation: face-in 520ms var(--out) 1700ms both;
}

/* ---------- Cierre ---------- */

.closing {
  padding-bottom: 32px;
}

.closing-chamber {
  display: grid;
  gap: 32px;
  padding: 40px 24px;
}

.closing-chamber .mark {
  --mark: 96px;
}

.closing-chamber h2 {
  max-width: 12ch;
}

.closing-chamber .t-lead {
  color: var(--paper-muted);
  margin-top: 16px;
  max-width: 36ch;
}

.closing-chamber .stores {
  margin-top: 28px;
}

@media (min-width: 900px) {
  .closing-chamber {
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 56px;
    padding: 64px;
  }
  .closing-chamber .mark {
    --mark: 168px;
  }
}

/* ---------- Pie ---------- */

.site-footer {
  padding-block: 40px 48px;
}

.site-footer .wrap {
  display: grid;
  gap: 24px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-size: 15px;
}

.footer-links a {
  text-decoration-color: var(--stone);
}
.footer-links a:hover {
  text-decoration-color: var(--ember);
}

.footer-legal {
  color: var(--fog);
}

@media (min-width: 900px) {
  .site-footer .wrap {
    grid-template-columns: auto 1fr;
    align-items: center;
  }
  .footer-links {
    justify-content: flex-end;
  }
  .footer-legal {
    grid-column: 1 / -1;
  }
}

/* ---------- Paginas de lectura ---------- */

.doc {
  padding-block: 32px 80px;
}

.doc-grid {
  display: grid;
  gap: 40px;
}

.doc-grid > * {
  min-width: 0;
}

.doc-head h1 {
  max-width: 16ch;
}

.doc-date {
  margin-top: 16px;
  color: var(--fog);
}

.doc-toc {
  display: none;
}

.prose {
  max-width: 68ch;
  font-size: 17px;
  line-height: 1.62;
}

.prose p + p {
  margin-top: 1em;
}

.prose h2 {
  margin-top: 56px;
  margin-bottom: 14px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 30px;
  line-height: 1.06;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

.prose ul.bullets {
  margin-block: 1em;
  display: grid;
  gap: 6px;
}

.prose ul.bullets li {
  position: relative;
  padding-left: 22px;
}

.prose ul.bullets li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.68em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ember);
  border: 1.5px solid var(--ink);
}

.prose .lead-p {
  font-size: 19px;
  line-height: 1.5;
  color: var(--ink);
}

/* Lista agrupada: enlaces a terceros, que se borra, que queda */
.group {
  margin-block: 1.25em;
  border: var(--stroke) solid var(--ink);
  border-radius: var(--r-group);
  background: var(--paper);
  overflow: hidden;
}

.group li + li {
  border-top: 1px solid var(--stone);
}

.group-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  padding: 12px 16px;
  line-height: 1.35;
  text-decoration: none;
}

a.group-row {
  transition: background-color var(--t-quick) var(--out);
}

a.group-row:hover {
  background: var(--paper-deep);
}

a.group-row:active {
  background: var(--stone);
}

.group-row .grow {
  flex: 1;
}

.group-row .icon {
  color: var(--ink);
}

.group-row .trail {
  width: 18px;
  height: 18px;
  color: var(--fog);
}

.group-row .icon.is-forest {
  color: var(--forest);
}

.group-row .icon.is-brick {
  color: var(--brick);
}

@media (min-width: 1100px) {
  .doc-grid {
    grid-template-columns: 240px minmax(0, 1fr);
    column-gap: 72px;
  }
  .doc-head {
    grid-column: 2;
  }
  .doc-toc {
    display: block;
    grid-column: 1;
    grid-row: 1 / span 2;
  }
  .doc-toc nav {
    position: sticky;
    top: calc(var(--header-h) + 32px);
    padding-top: 8px;
  }
  .doc-toc h2 {
    font-size: 13px;
    font-weight: 600;
    color: var(--fog);
    margin-bottom: 12px;
  }
  .doc-toc li + li {
    margin-top: 2px;
  }
  .doc-toc a {
    display: block;
    padding: 6px 12px;
    margin-left: -12px;
    border-radius: 10px;
    font-size: 15px;
    line-height: 1.3;
    text-decoration: none;
    color: var(--ink-muted);
    transition:
      background-color var(--t-quick) var(--out),
      color var(--t-quick) var(--out);
  }
  .doc-toc a:hover {
    color: var(--ink);
    background: var(--paper-deep);
  }
  .doc-toc a.is-current {
    color: var(--paper);
    background: var(--ink);
  }
  .doc-body {
    grid-column: 2;
  }
}

/* Pasos de la pagina de borrado */
.steps {
  display: grid;
  gap: 0;
  margin-block: 8px 0;
  counter-reset: step;
}

.steps li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  align-items: start;
  padding-block: 18px;
  border-top: 1px solid var(--stone);
}

.steps li:first-child {
  border-top: 0;
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: var(--stroke) solid var(--ink);
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1;
}

.steps li:last-child::before {
  background: var(--ember);
}

.steps b {
  font-weight: 600;
}

.steps .where {
  display: block;
  margin-top: 4px;
  color: var(--ink-muted);
  font-size: 15px;
}

.two-col {
  display: grid;
  gap: 0 32px;
}

@media (min-width: 760px) {
  .two-col {
    grid-template-columns: 1fr 1fr;
  }
}

.aside-chamber {
  margin-top: 56px;
  padding: 32px 28px;
}

.aside-chamber h2 {
  margin: 0;
  color: var(--paper);
}

.aside-chamber p {
  margin-top: 12px;
  color: var(--paper-muted);
}

.aside-chamber .btn {
  margin-top: 24px;
}

/* Dentro del visor de la app: sin cabecera ni pie del sitio. */
.is-embed .site-header,
.is-embed .site-footer,
.is-embed .doc-toc,
.is-embed .embed-hide {
  display: none;
}

.is-embed .doc {
  padding-top: 20px;
}

/* ---------- Movimiento reducido ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    transition-delay: 0ms !important;
  }
  .js [data-reveal] {
    transform: none;
  }
  .caret {
    display: none;
  }
}
