/* ============================================================
   Scrapp Monitor — Landing
   Sistema visual: ilustración científica / data-art (Fragapane)
   ============================================================ */

:root {
  /* Superficie — papel cálido */
  --paper:      #F0EAD9;
  --paper-2:    #E8E1CC;   /* secciones alternas */
  --paper-deep: #1C1B16;   /* fondo oscuro / tinta */
  --card:       #F7F3E8;

  /* Tinta */
  --ink:        #1C1B16;
  --ink-soft:   #4A463B;
  --ink-faint:  #8A8472;
  --line:       #C9C2AC;   /* líneas de eje / hairlines */
  --line-soft:  #DBD4BE;

  /* Paleta categórica (canales + sentimiento) — vívida sobre papel */
  --c-tv:    #E1452F;   /* coral — TV */
  --c-radio: #E89C2A;   /* ámbar — Radio */
  --c-web:   #2E55C8;   /* cobalto — Web */
  --c-yt:    #D23A55;   /* carmín — YouTube */
  --c-fb:    #3D74C4;   /* azul — Facebook */
  --c-tw:    #4AA3C9;   /* cielo — Twitter/X */
  --c-ig:    #B14B95;   /* magenta — Instagram */
  --c-in:    #1F8A6B;   /* teal — LinkedIn */

  /* Sentimiento */
  --pos: #1F8A6B;
  --neu: #9A9484;
  --neg: #E1452F;

  /* Marca producto */
  --brand:        #2E55C8;
  --brand-violet: #6A4FC9;

  /* Tipos */
  --serif: "Spectral", Georgia, serif;
  --sans:  "Hanken Grotesk", system-ui, sans-serif;
  --mono:  "Space Mono", "SFMono-Regular", monospace;

  --maxw: 1240px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Textura sutil de papel / grano */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .5;
  background-image:
    radial-gradient(circle at 50% 50%, rgba(0,0,0,.018) 0.5px, transparent 0.6px);
  background-size: 4px 4px;
  mix-blend-mode: multiply;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ---------- Tipografía ---------- */
.display {
  font-family: var(--serif);
  font-weight: 300;
  line-height: 0.98;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.serif-it { font-family: var(--serif); font-style: italic; font-weight: 300; }

.label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: var(--ink-soft);
  display: inline-block;
}

/* ---------- Layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 40px; position: relative; z-index: 1; }
section { position: relative; z-index: 1; }

.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(6px);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 16px 40px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand-mark { display: flex; align-items: center; gap: 12px; }
.brand-mark svg { width: 34px; height: 34px; display: block; }
.brand-name {
  font-family: var(--serif); font-weight: 500; font-size: 21px; letter-spacing: -0.01em;
}
.brand-name b { font-weight: 600; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a.navlink {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-soft); transition: color .2s;
}
.nav-links a.navlink:hover { color: var(--ink); }

.btn {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 9px;
  padding: 11px 20px; border-radius: 2px; cursor: pointer;
  border: 1px solid var(--ink); background: var(--ink); color: var(--paper);
  transition: transform .15s ease, background .2s, color .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn svg { width: 14px; height: 14px; }

/* ---------- Hero ---------- */
.hero { padding: 70px 0 30px; }
.hero-top { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: end; }
.hero h1 { font-size: clamp(46px, 6.4vw, 92px); margin: 18px 0 0; }
.hero h1 em { color: var(--brand); }
.hero-lede {
  font-family: var(--serif); font-size: clamp(18px, 1.5vw, 21px); font-weight: 300;
  color: var(--ink-soft); line-height: 1.55; max-width: 46ch; margin: 0 0 26px;
}
.hero-cta { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.hero-meta {
  display: flex; gap: 28px; margin-top: 30px; padding-top: 22px;
  border-top: 1px solid var(--line);
}
.hero-meta .stat .n { font-family: var(--serif); font-size: 30px; font-weight: 400; }
.hero-meta .stat .k { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-faint); }

/* Garden viz */
.garden-frame {
  margin-top: 46px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--card), transparent 60%);
  position: relative;
}
.garden-frame .frame-cap {
  position: absolute; top: -1px; left: -1px;
  display: flex; gap: 0;
}
.garden-frame .frame-cap span {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-faint); padding: 7px 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--card);
}
#garden { width: 100%; height: auto; display: block; }

/* ---------- Anatomía del glifo ---------- */
.anatomy { padding: 96px 0; background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.anatomy-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 64px; align-items: center; }
.legend-list { display: flex; flex-direction: column; gap: 22px; margin-top: 30px; }
.legend-item { display: grid; grid-template-columns: 40px 1fr; gap: 16px; align-items: start; padding: 10px 12px; margin: 0 -12px; border-radius: 6px; cursor: default; transition: background-color .2s ease, transform .2s ease; }
.legend-item:hover { background-color: rgba(0,0,0,.035); transform: translateX(4px); }
.legend-item:hover .ix { color: var(--ink); }
.legend-item .ix { font-family: var(--mono); font-size: 12px; color: var(--ink-faint); padding-top: 3px; transition: color .2s ease; }
.legend-item h4 { margin: 0 0 2px; font-family: var(--sans); font-weight: 600; font-size: 16px; }
.legend-item p { margin: 0; color: var(--ink-soft); font-size: 14.5px; line-height: 1.5; }

#anatomy-svg .g-ring, #anatomy-svg .g-head, #anatomy-svg .g-core,
#anatomy-svg .g-stem, #anatomy-svg .g-tick, #anatomy-svg .g-leaf,
#anatomy-svg .g-base, #anatomy-svg .ann { transition: opacity .3s ease; }

#anatomy-svg[class*="hl-"] .g-ring,
#anatomy-svg[class*="hl-"] .g-head, #anatomy-svg[class*="hl-"] .g-core,
#anatomy-svg[class*="hl-"] .g-stem, #anatomy-svg[class*="hl-"] .g-tick,
#anatomy-svg[class*="hl-"] .g-leaf,
#anatomy-svg[class*="hl-"] .g-base,
#anatomy-svg[class*="hl-"] .ann { opacity: .15; }

#anatomy-svg.hl-1 .g-ring, #anatomy-svg.hl-1 .ann-1 { opacity: 1; }
#anatomy-svg.hl-2 .g-head, #anatomy-svg.hl-2 .g-core, #anatomy-svg.hl-2 .ann-2 { opacity: 1; }
#anatomy-svg.hl-3 .g-stem, #anatomy-svg.hl-3 .g-tick, #anatomy-svg.hl-3 .ann-3 { opacity: 1; }
#anatomy-svg.hl-4 .g-leaf, #anatomy-svg.hl-4 .ann-4 { opacity: 1; }
#anatomy-svg.hl-5 .g-base, #anatomy-svg.hl-5 .ann-5 { opacity: 1; }
#anatomy-svg { width: 100%; height: auto; }

/* ---------- Section heads ---------- */
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 44px; }
.sec-head h2 { font-family: var(--serif); font-weight: 300; font-size: clamp(32px, 4vw, 54px); margin: 12px 0 0; line-height: 1; letter-spacing: -0.01em; }
.sec-head p { max-width: 38ch; color: var(--ink-soft); margin: 0; font-size: 15px; }

/* ---------- Fuentes ---------- */
.sources { padding: 96px 0; }
.source-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line); }
.source-cell {
  padding: 30px 26px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 16px; min-height: 168px; justify-content: space-between;
  transition: background .25s;
}
.source-cell:hover { background: var(--card); }
.source-grid .source-cell:nth-child(4n) { border-right: 0; }
.source-grid .source-cell:nth-last-child(-n+4) { border-bottom: 0; }
.source-cell .dot { width: 12px; height: 12px; border-radius: 50%; }
.source-cell .sname { font-family: var(--serif); font-size: 22px; font-weight: 400; }
.source-cell .sfreq { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); }

/* ---------- Features ---------- */
.features { padding: 96px 0; background: var(--paper-deep); color: var(--paper); border-top: 1px solid #2b2920; }
.features .label, .features .eyebrow { color: #b8b09a; }
.features .eyebrow::before { background: #b8b09a; }
.features h2 { color: var(--paper); }
.features .sec-head p { color: #b8b09a; }
.feat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: #2b2920; border: 1px solid #2b2920; }
.feat {
  background: var(--paper-deep); padding: 40px; display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: start;
  transition: background .25s;
}
.feat:hover { background: #232118; }
.feat .ficon { width: 54px; height: 54px; }
.feat h3 { font-family: var(--serif); font-weight: 400; font-size: 26px; margin: 0 0 8px; }
.feat p { margin: 0; color: #c4bca6; font-size: 15px; line-height: 1.55; }
.feat .fnum { font-family: var(--mono); font-size: 11px; color: #6f6a59; letter-spacing: 0.16em; }

/* ---------- Panel preview ---------- */
.panelsec { padding: 96px 0; }
.panel-card {
  border: 1px solid var(--line); background: var(--card);
  display: grid; grid-template-columns: 1fr 1.4fr; gap: 0; overflow: hidden;
}
.panel-card .pleft { padding: 52px 46px; display: flex; flex-direction: column; justify-content: center; gap: 22px; border-right: 1px solid var(--line); }
.panel-card .pleft h2 { font-family: var(--serif); font-weight: 300; font-size: clamp(30px, 3.4vw, 46px); margin: 0; line-height: 1.02; }
.panel-card .pleft p { color: var(--ink-soft); margin: 0; font-size: 15.5px; }
.panel-card .pright { background: #EEF1F6; padding: 36px; display: flex; align-items: center; }
.bullets { display: flex; flex-direction: column; gap: 12px; margin: 4px 0 8px; }
.bullets li { list-style: none; display: flex; gap: 12px; align-items: baseline; font-size: 15px; color: var(--ink-soft); }
.bullets li::before { content: ""; width: 7px; height: 7px; flex: 0 0 auto; background: var(--brand); border-radius: 50%; transform: translateY(-1px); }

/* mini dashboard (recreación ligera) */
.mini { width: 100%; font-family: var(--sans); color: #1f2733; }
.mini-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.mini-top .mt-title { font-weight: 700; font-size: 15px; color: #2b3441; }
.mini-top .mt-sub { font-size: 11px; color: #8893a3; }
.mini-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.mcard { background: #fff; border: 1px solid #e4e8ef; border-radius: 12px; padding: 14px; }
.mcard .mc-h { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.mcard .mc-ico { width: 28px; height: 28px; border-radius: 8px; background: var(--brand); display: flex; align-items: center; justify-content: center; }
.mcard .mc-name { font-weight: 700; font-size: 13px; }
.mcard .mc-tot { font-size: 10.5px; color: #2E55C8; }
.mcard .mc-bar { height: 5px; border-radius: 3px; background: #eceef3; overflow: hidden; display: flex; }
.mcard .mc-sent { display: flex; gap: 12px; margin-top: 9px; font-size: 11px; font-weight: 600; }
.mcard .mc-sent .up { color: #1F8A6B; } .mcard .mc-sent .nu { color: #8893a3; } .mcard .mc-sent .dn { color: #E1452F; }
.mcard .mc-tv { display: inline-block; margin-top: 9px; font-size: 10px; color: #c2693d; background: #fbeee6; padding: 3px 8px; border-radius: 20px; }

/* ---------- CTA ---------- */
.cta { padding: 110px 0; text-align: center; }
.cta h2 { font-family: var(--serif); font-weight: 300; font-size: clamp(40px, 6vw, 84px); margin: 0 0 10px; line-height: 1; }
.cta h2 em { color: var(--brand); }
.cta p { color: var(--ink-soft); max-width: 50ch; margin: 0 auto 32px; font-size: 17px; }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--line); padding: 44px 0; }
.foot-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.foot .label { color: var(--ink-faint); }
.foot .heart { color: var(--neg); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .source-grid { grid-template-columns: repeat(2, 1fr); }
  .source-grid .source-cell:nth-child(4n) { border-right: 1px solid var(--line); }
  .source-grid .source-cell:nth-child(2n) { border-right: 0; }
  .source-grid .source-cell:nth-last-child(-n+4) { border-bottom: 1px solid var(--line); }
  .source-grid .source-cell:nth-last-child(-n+2) { border-bottom: 0; }
}
@media (max-width: 920px) {
  .hero-top { grid-template-columns: 1fr; gap: 28px; }
  .anatomy-grid { grid-template-columns: 1fr; gap: 40px; }
  .feat-grid { grid-template-columns: 1fr; }
  .panel-card { grid-template-columns: 1fr; }
  .panel-card .pleft { border-right: 0; border-bottom: 1px solid var(--line); }
  .nav-links .navlink { display: none; }
}
@media (max-width: 640px) {
  .wrap, .nav-inner { padding-left: 22px; padding-right: 22px; }
  .source-grid { grid-template-columns: 1fr; }
  .source-grid .source-cell { border-right: 0 !important; border-bottom: 1px solid var(--line) !important; }
  .feat { grid-template-columns: 1fr; gap: 14px; }
  .hero-meta { flex-wrap: wrap; gap: 18px; }
}

/* ---------- Textos del glifo (SVG) ---------- */
.g-num { font-family: var(--mono); font-size: 13px; fill: var(--ink); letter-spacing: 0.02em; }
.g-num--mut { fill: var(--ink-faint); font-size: 11px; }
.g-name { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; fill: var(--ink-soft); }
.g-axis { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.16em; fill: var(--ink-faint); }
.g-scale { font-family: var(--mono); font-size: 9px; fill: var(--ink-faint); }
.g-ann { font-family: var(--mono); font-size: 10px; fill: var(--ink); }

/* ---------- Crecimiento del jardín ---------- */
@media (prefers-reduced-motion: no-preference) {
  .glyph .g-stem { stroke-dasharray: 280; stroke-dashoffset: 280; }
  .glyph .g-head, .glyph .g-core, .glyph .g-ring,
  .glyph .g-leaf, .glyph .g-num, .glyph .g-name, .glyph .g-tick { opacity: 0; }
  .glyph .g-head, .glyph .g-core { transform: scale(.3); transform-box: fill-box; transform-origin: center; }

  .glyph.in .g-stem { stroke-dashoffset: 0; transition: stroke-dashoffset .85s cubic-bezier(.22,.7,.2,1) var(--d); }
  .glyph.in .g-tick { opacity: 1; transition: opacity .4s ease calc(var(--d) + .4s); }
  .glyph.in .g-leaf { opacity: 1; transition: opacity .5s ease calc(var(--d) + .55s); }
  .glyph.in .g-head,
  .glyph.in .g-core { opacity: 1; transform: scale(1); transition: opacity .5s ease, transform .6s cubic-bezier(.34,1.56,.5,1); transition-delay: calc(var(--d) + .7s); }
  .glyph.in .g-ring { opacity: 1; transition: opacity .6s ease calc(var(--d) + .85s); }
  .glyph.in .g-num,
  .glyph.in .g-name { opacity: 1; transition: opacity .5s ease calc(var(--d) + .95s); }
}

/* ---------- Animaciones de entrada ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
  .reveal.in { opacity: 1; transform: none; }
}
