/* ============================================================
   Sancho landing — styles
   Production build of the "Sancho v2" Claude Design source.
   The design ships its layout inline; this file holds the base,
   keyframes, :hover states (the design used runtime style-hover
   attrs), focus and reduced-motion rules.
   ============================================================ */

/* Design language del dashboard: papel cálido + verde bosque.
   --ac: verde bosque de marca (#2E7D5B) — botones (texto blanco), fills, dots.
   --ac-ink: verde más hondo para TEXTO de acento pequeño sobre papel (~5:1). */
:root { --ac: #2E7D5B; --ac-ink: #276B4E; }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Hanken Grotesk', system-ui, sans-serif;
  background: #F4F2EA;
  color: #242017;
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  font-kerning: normal;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

/* ── Keyframes (from the design's helmet) ── */
@keyframes rev   { from { opacity: 0; transform: translateY(36px); } to { opacity: 1; transform: none; } }
@keyframes grow  { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes spinCW  { from { transform: rotate(0deg); }   to { transform: rotate(360deg); } }
@keyframes spinCCW { from { transform: rotate(360deg); } to { transform: rotate(0deg); } }
@keyframes blinkDot { 0%,80%,100% { opacity: .25; } 40% { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }

/* ── Focus + skip link (accessibility) ── */
:focus-visible { outline: 3px solid var(--ac); outline-offset: 3px; border-radius: 8px; }

.skip-link {
  position: absolute; left: -9999px; top: auto;
  background: #242017; color: #F4F2EA;
  padding: 12px 18px; border-radius: 10px; z-index: 100;
  text-decoration: none;
}
.skip-link:focus { left: 16px; top: 16px; }

/* ── Dibujos quijotescos del dashboard: arte de línea en ocre, decorativo ── */
.deco { position: absolute; pointer-events: none; color: #B99A55; z-index: 0; }
@media (max-width: 760px) { .deco { display: none; } }

/* ── Hover states (replacing the design's style-hover attributes) ── */
.navlink { transition: color .2s ease; }
.navlink:hover { color: #242017; }

.nav-cta:hover { transform: translateY(-1px); background: var(--ac-ink); color: #fff; }
.nav-login:hover { background: var(--ac); color: #fff; }

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px -12px color-mix(in oklab, var(--ac) 70%, transparent);
}

.link-muted { transition: color .2s ease; }
.link-muted:hover { color: #242017; }

.tl-card:hover {
  border-color: var(--ac);
  transform: translateX(4px);
  box-shadow: 0 10px 24px -14px rgba(36,32,23,.25);
}

.team-card:hover {
  transform: translateY(-6px);
  border-color: var(--ac);
  box-shadow: 0 20px 40px -22px rgba(36,32,23,.3);
}

.btn-approve:hover { background: rgba(22,138,205,.08); }
.btn-secondary:hover { background: #fff; border-color: var(--ac); }
.btn-reject:hover  { background: rgba(36,32,23,.05); }

/* ── Small screens: drop the in-page nav links; keep logo + login + CTA ── */
@media (max-width: 560px) {
  nav a.navlink { display: none; }
  /* !important: las dos píldoras traen padding inline; sin esto no caben en 320px */
  .nav-login, .nav-cta { padding: 8px 12px !important; font-size: 13px; }
}

/* ══ Mini-demo: interactive Sancho panel embedded in the page ══════
   A real, clickable miniature of the dashboard (approve mail, tick a
   habit, chat). Driven by the inline script at the end of index.html;
   the markup is fully readable if that script never runs. */
.mini {
  max-width: 900px; margin: 0 auto; background: #fbfaf7;
  border: 1px solid rgba(36,32,23,.12); border-radius: 20px; overflow: hidden;
  box-shadow: 0 44px 90px -46px rgba(36,32,23,.5);
}

/* top chrome */
.mini-top { display: flex; align-items: center; justify-content: space-between; padding: 13px 18px; background: #fff; border-bottom: 1px solid rgba(36,32,23,.08); }
.mini-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; color: #242017; }
.mini-logo { width: 26px; height: 26px; border-radius: 7px; background: var(--ac); color: #fff; display: grid; place-items: center; font-family: 'Newsreader', Georgia, serif; font-style: italic; font-size: 17px; }
.mini-live { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--ac-ink); }
.mini-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ac); box-shadow: 0 0 0 0 color-mix(in oklab, var(--ac) 60%, transparent); animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--ac) 55%, transparent); } 70%,100% { box-shadow: 0 0 0 7px transparent; } }

/* tab strip */
.mini-tabs { display: flex; gap: 4px; padding: 10px 12px; background: #fff; border-bottom: 1px solid rgba(36,32,23,.07); overflow-x: auto; scrollbar-width: none; }
.mini-tabs::-webkit-scrollbar { display: none; }
.mini-tab {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px;
  font: 600 13.5px/1 'Hanken Grotesk', system-ui, sans-serif; color: rgba(36,32,23,.6);
  background: transparent; border: 1px solid transparent; padding: 9px 14px; border-radius: 10px;
  cursor: pointer; white-space: nowrap; transition: color .18s ease, background .18s ease;
}
.mini-tab svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.mini-tab:hover { color: #242017; background: rgba(36,32,23,.04); }
.mini-tab.is-on { color: #123a2a; background: color-mix(in oklab, var(--ac) 16%, transparent); }
.mini-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: #c6452f; color: #fff; font-size: 11px; font-weight: 700; }
.mini-badge[hidden] { display: none; }

/* body: fixed height so switching tabs doesn't jump the page */
.mini-body { position: relative; min-height: 452px; padding: clamp(18px,3vw,26px); }
.mini-view { animation: miniIn .28s ease both; }
.mini-view[hidden] { display: none; }
@keyframes miniIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* shared view header */
.mini-vhead { display: flex; align-items: baseline; gap: 10px; margin-bottom: 16px; }
.mini-vtitle { font: 400 24px/1 'Newsreader', Georgia, serif; color: #26251f; }
.mini-vsub { font-size: 13px; color: rgba(36,32,23,.5); }

/* ── Inicio ── */
.mini-greet { font-size: 13px; color: rgba(36,32,23,.5); }
.mini-title { font: 400 27px/1.1 'Newsreader', Georgia, serif; color: #26251f; margin: 2px 0 18px; }
.mini-hero { position: relative; overflow: hidden; background: #242017; color: #f3f0e9; border-radius: 16px; padding: 20px 22px; }
.mini-hero::after { content: ""; position: absolute; right: -40px; top: -40px; width: 150px; height: 150px; border-radius: 50%; background: color-mix(in oklab, var(--ac) 30%, transparent); }
.mini-hero-k { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: color-mix(in oklab, var(--ac) 70%, #f3f0e9); }
.mini-hero-t { font-size: 17px; line-height: 1.4; margin: 8px 0 16px; max-width: 40ch; position: relative; z-index: 1; }
.mini-hero-t b { color: color-mix(in oklab, var(--ac) 55%, #fff); font-weight: 600; }
.mini-hero-cta { position: relative; z-index: 1; border: 1px solid color-mix(in oklab, var(--ac) 45%, transparent); background: color-mix(in oklab, var(--ac) 14%, transparent); color: #cfeede; font: 600 13px/1 inherit; padding: 10px 15px; border-radius: 10px; cursor: pointer; transition: background .18s ease; }
.mini-hero-cta:hover { background: color-mix(in oklab, var(--ac) 26%, transparent); }
.mini-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.mini-lbl { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: rgba(36,32,23,.42); margin-bottom: 9px; }
.mini-row { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; background: #fff; border: 1px solid rgba(36,32,23,.09); border-radius: 12px; padding: 12px 13px; margin-bottom: 8px; cursor: pointer; font: 500 14px/1.3 inherit; color: #26251f; transition: border-color .18s ease, transform .18s ease; }
.mini-row:hover { border-color: var(--ac); transform: translateX(3px); }
.mini-row .mini-ic { flex: none; width: 30px; height: 30px; border-radius: 8px; background: #f1ede3; display: grid; place-items: center; }
.mini-ic svg { width: 16px; height: 16px; fill: none; stroke: var(--ac-ink); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.mini-row > span:nth-child(2) { flex: 1; min-width: 0; }
.mini-chev { color: rgba(36,32,23,.3); font-size: 18px; }
.mini-done { display: flex; align-items: center; gap: 11px; background: #fff; border: 1px solid rgba(36,32,23,.07); border-radius: 12px; padding: 12px 13px; margin-bottom: 8px; font: 400 13.5px/1.3 inherit; color: rgba(36,32,23,.7); }
.mini-done > span:nth-child(2) { flex: 1; }
.mini-done em { font-style: normal; font-size: 12px; color: rgba(36,32,23,.35); }
.mini-tick { flex: none; width: 22px; height: 22px; border-radius: 50%; background: color-mix(in oklab, var(--ac) 16%, transparent); color: var(--ac-ink); display: grid; place-items: center; font-size: 12px; font-weight: 700; }

/* ── Correos / aprobaciones ── */
.mini-queue { display: flex; flex-direction: column; gap: 14px; }
.mini-appr { position: relative; overflow: hidden; background: #fff; border: 1px solid rgba(36,32,23,.1); border-radius: 15px; padding: 16px; transition: max-height .45s ease, opacity .35s ease, margin .35s ease, padding .35s ease, border-color .35s ease; max-height: 340px; }
.mini-appr-tag { display: inline-block; font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; font-weight: 700; color: var(--ac-ink); background: color-mix(in oklab, var(--ac) 14%, transparent); padding: 4px 9px; border-radius: 99px; margin-bottom: 10px; }
.mini-appr-title { font-weight: 600; font-size: 15px; color: #26251f; margin-bottom: 8px; }
.mini-appr-body { font-size: 13.5px; line-height: 1.5; color: rgba(36,32,23,.62); background: #f7f5ef; border: 1px solid rgba(36,32,23,.06); border-radius: 10px; padding: 11px 13px; margin-bottom: 14px; }
.mini-appr-acts { display: flex; gap: 9px; }
.mini-btn-yes { flex: 1; background: var(--ac); color: #fff; border: none; font: 600 13.5px/1 inherit; padding: 12px 0; border-radius: 10px; cursor: pointer; transition: filter .18s ease; }
.mini-btn-yes:hover { filter: brightness(1.05); }
.mini-btn-no { background: #fff; border: 1px solid rgba(36,32,23,.16); color: rgba(36,32,23,.6); font: 600 13.5px/1 inherit; padding: 12px 18px; border-radius: 10px; cursor: pointer; transition: background .18s ease; }
.mini-btn-no:hover { background: rgba(36,32,23,.04); }
/* leaving state: collapse the card away */
.mini-appr.is-gone { max-height: 0; opacity: 0; margin-top: -14px; padding-top: 0; padding-bottom: 0; border-color: transparent; }
/* stamped overlay on resolve */
.mini-appr-stamp { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; background: color-mix(in oklab, var(--ac) 12%, #fff); opacity: 0; transition: opacity .2s ease; pointer-events: none; }
.mini-appr-stamp.is-no { background: rgba(36,32,23,.05); }
.mini-appr.is-resolving .mini-appr-stamp { opacity: 1; }
.mini-appr-stamp b { font: 700 15px/1 inherit; color: var(--ac-ink); display: flex; align-items: center; gap: 7px; }
.mini-appr-stamp.is-no b { color: rgba(36,32,23,.55); }
.mini-empty { text-align: center; padding: 40px 20px; }
.mini-empty-badge { width: 54px; height: 54px; margin: 0 auto 14px; border-radius: 50%; background: color-mix(in oklab, var(--ac) 16%, transparent); color: var(--ac-ink); display: grid; place-items: center; font-size: 26px; }
.mini-empty-t { font: 500 19px/1.2 'Newsreader', Georgia, serif; color: #26251f; margin-bottom: 6px; }
.mini-empty-s { font-size: 14px; color: rgba(36,32,23,.55); max-width: 34ch; margin: 0 auto 18px; }
.mini-reset { background: #fff; border: 1px solid rgba(36,32,23,.16); color: #26251f; font: 600 13.5px/1 inherit; padding: 11px 18px; border-radius: 10px; cursor: pointer; }
.mini-reset:hover { border-color: var(--ac); }

/* ── Agenda ── */
.mini-day { display: flex; flex-direction: column; }
.mini-slot { display: grid; grid-template-columns: 52px 1fr; gap: 12px; align-items: center; padding: 7px 0; border-top: 1px solid rgba(36,32,23,.06); }
.mini-slot:first-child { border-top: 0; }
.mini-time { font-size: 12px; font-weight: 600; color: rgba(36,32,23,.4); text-align: right; }
.mini-ev { background: #fff; border: 1px solid rgba(36,32,23,.1); border-left: 3px solid var(--ac); border-radius: 9px; padding: 11px 13px; font-size: 14px; font-weight: 500; color: #26251f; transition: transform .18s ease, box-shadow .18s ease; }
.mini-ev:hover { transform: translateX(3px); box-shadow: 0 6px 16px -10px rgba(36,32,23,.3); }
.mini-ev.is-routine { background: color-mix(in oklab, var(--ac) 9%, #fff); color: var(--ac-ink); font-weight: 600; }
.mini-rep { font-weight: 700; }
.mini-now .mini-ev { box-shadow: 0 0 0 2px color-mix(in oklab, var(--ac) 35%, transparent); }
.mini-legend { display: flex; gap: 18px; margin-top: 16px; font-size: 12px; color: rgba(36,32,23,.5); }
.mini-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: -1px; margin-right: 5px; }
.mini-d1 { background: #fff; border: 1px solid rgba(36,32,23,.2); border-left: 3px solid var(--ac); }
.mini-d2 { background: color-mix(in oklab, var(--ac) 20%, #fff); border-left: 3px solid var(--ac); }

/* ── Hábitos ── */
.mini-hbar { height: 8px; background: #ece8df; border-radius: 99px; overflow: hidden; margin-bottom: 18px; }
.mini-hbar span { display: block; height: 100%; background: var(--ac); border-radius: 99px; transition: width .4s cubic-bezier(.22,1,.36,1); }
.mini-habits { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mini-habit { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: #fff; border: 1px solid rgba(36,32,23,.09); border-radius: 14px; padding: 14px; cursor: pointer; font: inherit; transition: border-color .18s ease, transform .12s ease; }
.mini-habit:hover { border-color: rgba(36,32,23,.2); }
.mini-habit:active { transform: scale(.985); }
.mini-hcheck { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 2px solid #cbc5b6; background: #fff; color: transparent; display: grid; place-items: center; font-size: 14px; font-weight: 700; transition: background .18s ease, border-color .18s ease, color .18s ease; }
.mini-habit.is-done .mini-hcheck { background: var(--ac); border-color: var(--ac); color: #fff; animation: popIn .3s ease; }
.mini-hemoji { flex: none; width: 36px; height: 36px; border-radius: 10px; background: #f1ede3; display: grid; place-items: center; font-size: 18px; }
.mini-hname { flex: 1; min-width: 0; font-weight: 600; font-size: 14.5px; color: #26251f; }
.mini-habit.is-done .mini-hname { color: rgba(36,32,23,.42); text-decoration: line-through; }
.mini-streak { flex: none; font-size: 12px; font-weight: 700; color: #c77a2e; background: #f6edd8; padding: 5px 9px; border-radius: 99px; }

/* ── Chat ── */
.mini-chat { display: flex; flex-direction: column; gap: 9px; min-height: 300px; max-height: 340px; overflow-y: auto; padding: 4px 2px 8px; }
.mini-msg { max-width: 82%; padding: 11px 14px; font-size: 14px; line-height: 1.45; border-radius: 15px; animation: popIn .25s ease both; }
.mini-msg.is-a { align-self: flex-start; background: #fff; border: 1px solid rgba(36,32,23,.08); color: #26251f; border-bottom-left-radius: 5px; }
.mini-msg.is-u { align-self: flex-end; background: var(--ac); color: #fff; font-weight: 500; border-bottom-right-radius: 5px; }
.mini-typing { align-self: flex-start; display: inline-flex; gap: 4px; background: #fff; border: 1px solid rgba(36,32,23,.08); padding: 13px 15px; border-radius: 15px; border-bottom-left-radius: 5px; }
.mini-typing i { width: 7px; height: 7px; border-radius: 50%; background: rgba(36,32,23,.35); animation: blinkDot 1.2s infinite; }
.mini-typing i:nth-child(2) { animation-delay: .18s; }
.mini-typing i:nth-child(3) { animation-delay: .36s; }
.mini-sugs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(36,32,23,.07); }
.mini-sugs button { background: #fff; border: 1px solid color-mix(in oklab, var(--ac) 32%, transparent); color: var(--ac-ink); font: 600 13px/1 inherit; padding: 10px 14px; border-radius: 99px; cursor: pointer; transition: background .18s ease; }
.mini-sugs button:hover { background: color-mix(in oklab, var(--ac) 10%, transparent); }
.mini-sugs button[hidden] { display: none; }

/* mobile */
@media (max-width: 620px) {
  .mini-cols { grid-template-columns: 1fr; gap: 16px; }
  .mini-habits { grid-template-columns: 1fr; }
  .mini-body { min-height: 500px; }
  .mini-tab span:not(.mini-badge) { display: none; }
  .mini-tab { padding: 10px 12px; }
  .mini-tab.is-on span:not(.mini-badge) { display: inline; }
}

/* ── Immersive hero→"un día" scene ──────────────────────────────
   The 3D visual becomes a shared background that morphs as you scroll:
   it drifts to centre, grows and drops its labels while the timeline
   panel rises and overlays the (pinned) hero. All of this is gated
   behind .fx, which app.js adds to <html> ONLY after WebGL initialises.
   Mobile / reduced-motion / no-JS never get .fx, so they keep the plain,
   fully-readable static layout below. */
#stage { display: none; }               /* the fixed story layer, off by default */
#stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }

/* The stop-motion is a fixed, full-page background layer behind ALL content.
   Sections carry a translucent cream fill so text and cards stay readable
   while the drawing shows through everywhere; the hero shows it boldest. */
.fx #stage { display: block; position: fixed; inset: 0; z-index: -1; overflow: clip; pointer-events: none; }
.fx #stage::after { content: ""; position: absolute; inset: 0; background: rgba(244,242,234,.16); pointer-events: none; }
.fx #heroInner { z-index: 1; will-change: transform, opacity; }
/* Hero: drawing shows on the right; a left cream scrim keeps the text crisp. */
.fx #top { background: transparent !important; }
.fx #top::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: linear-gradient(90deg, #F4F2EA 0%, rgba(244,242,234,.9) 30%, rgba(244,242,234,.35) 60%, rgba(244,242,234,0) 82%); }
/* Content sections: translucent, so the drawing stays visible behind them. */
.fx #confianza, .fx #comparativo { background: rgba(247,245,239,.93) !important; }
.fx #panel, .fx #equipo, .fx #precio { background: rgba(240,236,226,.93) !important; }
.fx #dia { background: rgba(240,236,226,.82) !important; }
.fx nav { background: rgba(244,242,234,.72) !important; }
.fx footer { background: rgba(244,242,234,.6) !important; }
.fx #dia .deco { display: none; }

/* ── Reduced motion: kill entrances/loops, keep everything visible ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  /* with the animation gone, undo the @supports scaleY(0) so the bar shows full */
  #diaProgress { transform: scaleY(1); }
}


/* ── Comparador de planes ── */
.tier-card { transition: transform .2s ease, box-shadow .2s ease; }
.tier-card:hover { transform: translateY(-5px); }
.tier-btn { transition: filter .15s ease; }
.tier-btn:hover { filter: brightness(.94); }
.cmp-scroll { overflow-x: auto; border-radius: 16px; }
.cmp-scroll::-webkit-scrollbar { height: 9px; }
.cmp-scroll::-webkit-scrollbar-thumb { background: rgba(36,32,23,.16); border-radius: 99px; border: 3px solid transparent; background-clip: padding-box; }
.cmp { width: 100%; min-width: 860px; border-collapse: collapse; background: #FBFAF5; border: 1px solid rgba(36,32,23,.09); border-radius: 16px; overflow: hidden; }
.cmp th, .cmp td { padding: 14px 16px; text-align: center; vertical-align: middle; border-bottom: 1px solid rgba(36,32,23,.07); }
.cmp thead th { padding: 18px 16px 16px; background: #FBFAF5; }
.cmp tbody th { text-align: left; font: 500 14px/1.3 'Hanken Grotesk', system-ui, sans-serif; color: #3f3b33; white-space: nowrap; }
.cmp tbody tr:last-child th, .cmp tbody tr:last-child td { border-bottom: 0; }
.cmp .hi { background: color-mix(in oklab, var(--ac) 8%, transparent); }
.cmp thead .hi { box-shadow: inset 0 3px 0 var(--ac); }
.cmp tbody tr:hover th, .cmp tbody tr:hover td { background: rgba(36,32,23,.025); }
.cmp tbody tr:hover .hi { background: color-mix(in oklab, var(--ac) 12%, transparent); }
.cmp svg { vertical-align: middle; }
@media (max-width: 900px){ #precio .cmp-scroll table { min-width: 780px; } }
@media (max-width: 720px){
  #precio [style*="grid-template-columns:repeat(4,1fr)"]{ grid-template-columns: 1fr 1fr !important; }
}
