/* =========================================
   PALETA
   =========================================
   Fondo hueso (papel), tinta cálida casi negra,
   y dos acentos de pergamino: ocre para lo
   secundario, terracota (el del logo) para las
   acciones. Nada de azules ni grises fríos.
   ========================================= */

:root {
  /* superficies */
  --paper: #FAF7F2;
  /* fondo de página, hueso cálido */
  --surface: #FFFFFF;
  /* tarjetas y paneles */
  --paper-2: #F3EDE3;
  /* bloques destacados */

  /* tinta */
  --ink: #2B2521;
  /* texto principal, marrón casi negro */
  --ink-dim: #6E645B;
  /* texto secundario */
  --logo-brown: #5C3A21;
  /* marron logo */

  /* líneas */
  --line: rgba(43, 37, 33, 0.14);
  --line-soft: rgba(43, 37, 33, 0.08);

  /* acentos */
  --ochre: #B07D3C;
  --ochre-deep: #8A6224;
  /* kickers: legible sobre claro */
  --ochre-wash: rgba(176, 125, 60, 0.10);

  --seal: #B0512E;
  /* terracota del logo */
  --seal-light: #C4643D;
  --seal-wash: rgba(176, 81, 46, 0.10);
  --on-seal: #FFF7F2;
  /* texto sobre terracota */

  /* sombras */
  --shadow-sm: 0 2px 8px rgba(43, 37, 33, 0.07);
  --shadow-md: 0 6px 20px rgba(43, 37, 33, 0.10);
  --shadow-lg: 0 18px 45px rgba(43, 37, 33, 0.16);
}

html { 
  scroll-behavior: smooth; }

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  line-height: 1.5;
}

.wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* NAV */
nav {
  display: flex;
   position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper); /* o el color de fons que tinguis, per tapar el contingut que passa per sota */
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

nav {
  transition: box-shadow 0.2s ease, padding 0.2s ease;;
}
nav.is-scrolled {
  box-shadow: 0 4px 6px -6px rgba(0,0,0,0.55);
  padding: 10px 0;
}

.logo {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 24px;
  letter-spacing: 0.02em;
  color: var(--logo-brown);

  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: auto;
  height: 40px;
  display: block;
}

.logo em {
  color: var(--seal);
  font-style: normal;
}

nav a {
  color: var(--ink-dim);
  text-decoration: none;
  font-size: 16px;
  margin-left: 32px;
}

nav a:hover {
  color: var(--ink);
}

.nav-cta {
  border: 1px solid var(--seal);
  padding: 8px 18px;
  border-radius: 2px;
  color: var(--seal) !important;
}

.nav-cta:hover {
  background: var(--seal-wash);
}

.nav-help {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-dim);
  font-size: 24px;
  margin-left: 32px;
  padding: 0;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}
.nav-help:hover {
  color: var(--ink);
}

/* HERO */
.hero {
  padding: 80px 0 40px;
  position: relative;
}

h1 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 42px;
  line-height: 1.08;
  max-width: 1200px;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
  color: var(--ink);
}

h2 {
  line-height: 1.2;
  margin-bottom: 2px;
}

h1 .accent {
  /*font-style: italic;*/
  color: var(--seal);
}

.sub {
  font-size: 18px;
  color: var(--ink-dim);
  max-width: 1200px;
  margin-top: 26px;
  line-height: 1.6;
}

/* HISTÒRIA */
.story {
  padding: 50px 0 60px;
}

.story-text {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 22px;
  line-height: 1.55;
  color: var(--ink);
  max-width: 680px;
}

.story-text .accent {
  font-style: italic;
  color: var(--seal);
}

/* Nota final: deliberadament més petita — un detall a mitja veu,
   no un segon capítol de la història. */
.story-aside {
  margin-top: 24px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-style: italic;
  color: var(--ink-dim);
  max-width: 560px;
  line-height: 1.7;
  border-left: 2px solid var(--ochre);
  padding-left: 16px;
}

@media(max-width: 760px) {
  .story-text { font-size: 19px; }
}

/* PANELES */
.doc-panel--manuscripts {
  border-top: 3px solid var(--ochre);
}

.doc-panel--technical {
  border-top: 3px solid var(--seal);
}

.img_demo--small {
  max-height: 220px;
  object-fit: cover;
  object-position: top;
}

.doc-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 20px;
}

.doc-panel {
  background: var(--surface);
  padding: 36px;
  border-radius: 6px;
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.doc-panel h3 {
  font-family: 'Fraunces', serif;
  font-size: 24px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--ink);
}

.doc-panel .panel-desc {
  font-size: 14px;
  color: var(--ink-dim);
  margin-bottom: 20px;
}

.doc-panel .highlight {
  background: var(--ochre-wash);
  border-left: 2px solid var(--ochre);
  padding: 14px;
  font-size: 14px;
  color: var(--ink);
  border-radius: 0 4px 4px 0;
  margin-bottom: 20px;
  font-style: italic;
}

.doc-panel .btn {
  margin-top: auto;
  width: 100%;
  justify-content: center;
}

.panel-note {
  margin-top: auto;
  width: 100%;
  padding: 14px 18px;
  border: 1px dashed var(--line);
  border-radius: 4px;
  background: rgba(43, 37, 33, 0.03);
  color: var(--ink-dim);
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
  text-wrap: balance;
}

/* BUTTONS */
.btn {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 500;
  padding: 16px 28px;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  text-align: center;
  gap: 10px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--seal);
  color: var(--on-seal);
}

.btn-primary:hover {
  background: var(--seal-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

.btn-secondary:hover {
  border-color: var(--ochre);
  background: var(--paper-2);
  transform: translateY(-1px);
}

/* SECTION SHARED */
section {
  padding: 30px 0;
  border-top: 1px solid var(--line);
}

.section-head {
  max-width: 1200px;
  margin-bottom: 20px;
}

.kicker {
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--seal);
  margin-bottom: 14px;
}
.kicker-petit {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  /*color: var(--seal-wash);*/
  margin-bottom: 4px;
}

h2 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 34px;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.section-head p {
  color: var(--ink-dim);
  margin-top: 14px;
  font-size: 16px;
}

.contact-mail {
  margin-top: 20px;
}

.img_demo {
  width: 100%;
  height: auto;
  margin-bottom: 20px;
  border-radius: 6px;
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-sm);
}

footer {
  border-top: 1px solid var(--line);
  padding: 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--ink-dim);
  flex-wrap: wrap;
  gap: 12px;
}


/* =========================================
   HERO VISUAL: CAPTURA ANOTADA
   =========================================
   En reposo la captura está limpia. Las marcas
   aparecen al entrar el cursor en la imagen o
   al tocar una pestaña. El "aquí se puede
   clicar" lo comunican las pestañas de abajo,
   no la propia captura.
   ========================================= */

.hero-visual-frame {
  position: relative;

  border-radius: 8px;

  /* margen de aire alrededor de la captura, para que las marcas puedan
     asomar sin cortarse. Transparente y sin sombra: sólo se ve el color
     de fondo de la página, sin halo alrededor. */
  padding: 10px;
  background: transparent;
}

/* Referencia real para el % de las marcas: mide exactamente lo mismo
   que la imagen. overflow:visible a propósito, para que las marcas
   puedan asomar en el margen de 10px sin cortarse. */
.hero-visual-inner {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
}

.hero-visual-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
}

/* MARCAS */
.hero-hotspot {
  position: absolute;
  padding: 0;
  z-index: 4;

  /* terracota con halo blanco: se lee sobre la captura clara y sigue
     leyéndose cuando el resto se oscurece al activarse. */
  border: 3px solid var(--seal);
  border-radius: 5px;
  background: transparent;
  filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.9));

  cursor: pointer;

  /* invisibles hasta que el cursor entra en la captura */
  opacity: 0;

  transition:
    opacity 0.3s ease,
    background 0.3s ease,
    border-color 0.25s ease;
}

/* Capa de oscurecido: el box-shadow enorme tiene valor FIJO y sólo se
   anima su opacidad, que es mucho más barato de repintar (animar el
   spread de 9999px era lo que iba a trompicones). Al colgar del propio
   hotspot, el "agujero" sin oscurecer es exactamente la zona activa. */
.hero-hotspot::after {
  content: "";
  position: absolute;
  inset: -3px;
  /* compensa el borde de 3px */
  border-radius: 5px;
  pointer-events: none;
  z-index: -1;

  box-shadow: 0 0 0 9999px rgba(43, 37, 33, 0.2);

  opacity: 0;
  transition: opacity 0.35s ease;
}

/* Cursor dentro de la captura: se revelan todas como pista de "aquí
   hay algo". Al activar desde una pestaña (fuera de la imagen), esto
   NO se dispara — sólo se ve la marca concreta que toca, vía .is-on
   más abajo. */
.hero-visual-frame:hover .hero-hotspot {
  opacity: 0.85;
}

/* La marca activa: se ilumina y oscurece todo lo demás */
.hero-visual-frame .hero-hotspot.is-on {
  opacity: 1;
  border-color: var(--seal-light);
  background: rgba(255, 255, 255, 0.07);
}

.hero-visual-frame .hero-hotspot.is-on::after {
  opacity: 1;
}

/* ANOTACIONES */
.hero-callout {
  position: absolute;
  z-index: 5;

  max-width: 280px;
  padding: 14px 18px;

  border-radius: 10px;

  background: var(--surface);
  color: var(--ink);

  box-shadow: 0 10px 34px rgba(43, 37, 33, 0.35);

  opacity: 0;
  transform: translateY(6px) scale(0.98);
  pointer-events: none;

  transition:
    opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-callout.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.hero-callout strong {
  display: block;
  margin-bottom: 5px;
  font-size: 15px;
  line-height: 1.25;
  color: var(--seal);
}

.hero-callout span {
  display: block;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-dim);
}

/* Cada anotación se coloca lejos de la zona que ilumina su marca */
.callout-1 {
  right: 10%;
  top: 10%;
}

.callout-2 {
  left: 10%;
  top: 18%;
}

.callout-3 {
  left: 31%;
  top: 43%;
}

.callout-4 {
  left: 45%;
  bottom: 45%;
}

/* PESTAÑAS */
.hero-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}

.hero-tabs-label {
  font-size: 13px;
  color: var(--ink-dim);
  margin-right: 4px;
}

.hero-tab {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;

  padding: 7px 14px;

  border: 1px solid var(--line);
  border-radius: 999px;

  background: var(--surface);
  color: var(--ink-dim);

  cursor: pointer;

  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
}

.hero-tab:hover,
.hero-tab.is-on {
  border-color: var(--seal);
  background: var(--seal-wash);
  color: var(--seal);
}

.hero-tab:focus-visible {
  outline: 2px solid var(--seal);
  outline-offset: 2px;
}

/* LISTA EQUIVALENTE (móvil) */
.hero-notes {
  display: none;
  list-style: none;
  margin-top: 20px;
  counter-reset: note;
}

.hero-notes li {
  counter-increment: note;
  position: relative;
  padding: 12px 0 12px 38px;
  border-bottom: 1px solid var(--line-soft);
}

.hero-notes li:last-child {
  border-bottom: none;
}

.hero-notes li::before {
  content: counter(note);
  position: absolute;
  left: 0;
  top: 14px;

  width: 24px;
  height: 24px;

  display: grid;
  place-items: center;

  border-radius: 50%;
  background: var(--seal);
  color: var(--on-seal);

  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

.hero-notes strong {
  display: block;
  font-size: 15px;
  color: var(--ink);
}

.hero-notes span {
  display: block;
  font-size: 13px;
  color: var(--ink-dim);
}

/* MOVIMIENTO REDUCIDO */
@media (prefers-reduced-motion: reduce) {

  .hero-hotspot,
  .hero-hotspot::after,
  .hero-callout,
  .hero-tab {
    transition: none;
  }
}

/* RESPONSIVE */
@media (max-width: 1000px) {
  .hero-callout {
    max-width: 42%;
    padding: 10px 12px;
  }

  .hero-callout strong {
    font-size: 13px;
  }

  .hero-callout span {
    font-size: 11px;
  }
}

@media (max-width: 760px) {
  h1 {
    font-size: 38px;
  }

  h2 {
    font-size: 26px;
    margin-bottom: 8px;
  }

  .doc-strip {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  nav a {
    margin-left: 16px;
    font-size: 13px;
  }

  .hero-visual-frame {
    border-radius: 6px;
  }

  /* A este ancho la captura no se lee: fuera marcas y pestañas,
     dentro la lista. */
  .hero-hotspot,
  .hero-callout,
  .hero-visual,
  .hero-tabs {
    display: none;
  }

  .hero-notes {
    display: block;
  }
}

/* =========================================
   NUEVA SECCIÓN DEMO & MÉS ENLLÀ
   ========================================= */

/* Grid principal per a la secció DEMO (Història + Targeta Demo) */
.demo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: start;
  margin-top: 20px;
}

/* Ajustos de la columna de la història quan està al costat de la demo */
.story-col {
  display: flex;
  flex-direction: column;
}

.story-col .story-text {
  font-size: 19px;
  line-height: 1.55;
  max-width: 100%;
}

.story-col .story-aside {
  margin-top: 20px;
}

/* Grid per a la secció Més Enllà */
.mes-enlla-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 20px;
}

/* Adaptació per a pantalles mitjanes i mòbils */
@media (max-width: 900px) {
  .demo-grid,
  .mes-enlla-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}
/* ===========================================
      MOSTRA EL PIPELINE (com funciona?)
============================================ */
  .pipeline-toggle {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 12px;
    padding: 5px 6px;
    border-radius: 8px;
    border: 1px solid #d7d3c9;
    background: #faf9f6;
    color: #2c2c2a;
    cursor: pointer;
  }
  .pipeline-toggle:hover { border-color: #b4b2a9; }
 
  .pipeline-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.pipeline-overlay.open {
  display: flex;
}

.pipeline-panel {
  background: #fff;
  border-radius: 14px;
  max-width: 800px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 28px;
  position: relative;
}

.pipeline-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
  color: #5f5e5a;
  padding: 2px 6px;
}
.pipeline-close:hover { color: #2c2c2a; }

.pipeline-step {
  display: flex;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 10px;
  margin-bottom: 10px;
  border: 1px solid transparent;
  background: #f4f3ef;
  border-color: #e0ddd3;
}


.pipeline-step-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--seal);
  margin: 0 0 2px;
}
.pipeline-step-desc {
  font-size: 13px;
  color: #5f5e5a;
  margin: 0 0 6px;
  line-height: 1.4;
}
.pipeline-step-who {
  font-size: 12px;
  font-weight: 500;
  color: #5f5e5a;
  display: inline-block;
}

.pipeline-substeps {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 13px;
  color: #5f5e5a;
  line-height: 1.5;
}
.pipeline-substeps li {
  margin-bottom: 2px;
}

.pipeline-step-title i {
  margin-right: 6px;
  font-size: 15px;
  vertical-align: -1px;
}

.pipeline-step-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  font-size: 26px;
  color: #5f5e5a;
}

.pipeline-step--sparkle {
  position: relative;
  overflow: visible;
}

.sparkle {
  position: absolute;
  color: #d4af37;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.sparkle-1 { top: -8px;  right: 20px; font-size: 16px; }
.sparkle-2 { top: 10px;  right: -6px; font-size: 10px; }
.sparkle-3 { bottom: -6px; right: 50px; font-size: 12px; }
.sparkle-4 { top: -2px;  right: 90px; font-size: 9px;  }
.sparkle-5 { bottom: 4px; right: 100px; font-size: 14px; }

.pipeline-step--sparkle:hover .sparkle {
  opacity: 1;
  animation: sparkle-twinkle 1.3s ease-in-out infinite;
}

.pipeline-step--sparkle:hover .sparkle-2 { animation-delay: 0.2s; }
.pipeline-step--sparkle:hover .sparkle-3 { animation-delay: 0.4s; }
.pipeline-step--sparkle:hover .sparkle-4 { animation-delay: 0.6s; }
.pipeline-step--sparkle:hover .sparkle-5 { animation-delay: 0.15s; }

@keyframes sparkle-twinkle {
  0%, 100% { transform: scale(0.7) rotate(0deg); opacity: 0.5; }
  50%      { transform: scale(1.3) rotate(20deg); opacity: 1; }
}

