/* ==========================================================================
   YRMO Studio · Awwwards Paper Edition
   Pilot stylesheet for editorial-paper aesthetic ("manada operativa")
   Scoped to body.paper-mode. Cruce de Editorial Grid + Anti-Polish + E-Ink/Paper.
   Concept: pack of 11 agent-animals operating from Valencia territory.
   ========================================================================== */

/* === FONT IMPORTS · Newsreader (display) + Public Sans (body) === */
@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;0,6..72,700;1,6..72,400;1,6..72,500&family=Public+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

/* === INK MODE PALETTE (aligned with canonical home #050607) === */
body.paper-mode {
  --bg: #050607;                 /* YRMO canonical black · matches home + rest */
  --bg-elev: #0A0D0E;             /* Elev surface · matches internal.css base */
  --bg-card: rgba(245,241,232,0.035); /* Cards: subtle lift sobre canonical */
  --text: #F5F1E8;               /* Paper Cream · off-white cálido */
  --text-dim: rgba(245,241,232,0.72);
  --text-faint: rgba(245,241,232,0.62);
  --green: #ACDD81;              /* Verde valenciano canonical · protagonista */
  --green-deep: #6B9A3F;         /* Verde editorial profundo */
  --green-display: #BFE694;      /* Verde luminescente para display */
  --green-dim: rgba(172,221,129,0.22);
  --green-soft: rgba(172,221,129,0.06);
  --orange: #E07645;
  --kraft: #C4A77D;              /* Kraft · solo SUSURRO en eyebrows */
  --kraft-soft: rgba(196,167,125,0.16);
  --marker-red: #E54848;
  --card-bg: rgba(245,241,232,0.035);
  --card-border: rgba(245,241,232,0.10);
  --card-hover: rgba(172,221,129,0.36);
  --rule-color: rgba(245,241,232,0.14);
  --font-display: 'Newsreader', 'Times New Roman', Georgia, serif;
  --font-body: 'Public Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-feature-settings: "ss01", "kern", "liga";
}

/* === INK GRAIN TEXTURE · subtle noise sobre canonical black === */
body.paper-mode::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 0.96  0 0 0 0 0.88  0 0 0 0.6 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* === DISPLAY TYPOGRAPHY · Newsreader serif, editorial weight === */
body.paper-mode h1,
body.paper-mode h2,
body.paper-mode h3,
body.paper-mode h4,
body.paper-mode h5,
body.paper-mode .h-display,
body.paper-mode [class*="card__title"],
body.paper-mode .page-hero h1,
body.paper-mode .section__head h2 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.015em;
  font-feature-settings: "kern", "liga", "calt";
}

body.paper-mode .page-hero h1 {
  font-weight: 400;
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
body.paper-mode .page-hero h1 strong {
  font-weight: 600;
  font-style: italic;
  color: var(--green);
  text-shadow: 0 0 24px rgba(172,221,129,0.25);
}
body.paper-mode .page-hero__sub {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(15px, 2vw, 19px);
  line-height: 1.7;
  color: var(--text-dim);
  max-width: 640px;
}

body.paper-mode .section__head h2 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.015em;
}
body.paper-mode .section__head h2 strong {
  font-weight: 600;
  font-style: italic;
  color: var(--green);
}
body.paper-mode .section__head p {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text-dim);
  max-width: 640px;
  font-size: 16px;
  line-height: 1.65;
}

/* === CARDS · ink edition with kraft borders === */
body.paper-mode .card {
  background: var(--bg-card);
  border: 1px solid var(--card-border);
  border-radius: 6px; /* less rounded · editorial */
  transition: border-color 0.4s, transform 0.4s, box-shadow 0.4s, background 0.4s;
}
body.paper-mode .card:hover {
  border-color: var(--green-dim);
  background: rgba(245,241,232,0.05);
  transform: translateY(-2px);
  box-shadow: 0 18px 36px -10px rgba(172,221,129,0.18), 0 4px 12px rgba(0,0,0,0.4);
}
body.paper-mode .card__title {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--text);
}
body.paper-mode .card__eyebrow,
body.paper-mode .card__sector {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
}
body.paper-mode .text-dim {
  color: var(--text-dim);
}

/* === BUTTONS · ink, sharp, no rounded gloss === */
body.paper-mode .btn {
  border-radius: 4px;
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
body.paper-mode .btn--primary {
  background: var(--green);
  color: var(--bg);
  border: 1px solid var(--green);
  box-shadow: 0 0 0 0 rgba(172,221,129,0);
}
body.paper-mode .btn--primary:hover {
  background: var(--green-display);
  color: var(--bg);
  transform: translateY(-1px);
  box-shadow: 0 0 28px rgba(172,221,129,0.35);
}
body.paper-mode .btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(245,241,232,0.45);
}
body.paper-mode .btn--ghost:hover {
  border-color: var(--green);
  color: var(--green);
  background: rgba(172,221,129,0.06);
}

/* === TOPNAV · ink edition === */
body.paper-mode .topnav {
  background: rgba(14,14,12,0.85);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--rule-color);
}
body.paper-mode .topnav__brand,
body.paper-mode .topnav__nav a,
body.paper-mode .topnav__lang a,
body.paper-mode .topnav__lang strong {
  color: var(--text);
}
body.paper-mode .topnav__nav a.active,
body.paper-mode .topnav__lang strong {
  color: var(--green);
  border-bottom: 1.5px solid var(--green);
  padding-bottom: 2px;
}
body.paper-mode .topnav__cta {
  background: var(--green);
  color: var(--bg);
  border-radius: 4px;
}
body.paper-mode .topnav__cta:hover {
  background: var(--green-display);
  color: var(--bg);
  box-shadow: 0 0 18px rgba(172,221,129,0.35);
}

/* === BREADCRUMB === */
body.paper-mode .breadcrumb {
  color: var(--text-faint);
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: 0.04em;
}
body.paper-mode .breadcrumb a:hover {
  color: var(--green);
}

/* === EYEBROW · page hero · editorial dash, NO pill (cliché IA) === */
body.paper-mode .page-hero .eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-faint);
  background: transparent;
  padding: 0;
  border: 0;
  border-radius: 0;
}
body.paper-mode .page-hero .eyebrow::before { content: "— "; opacity: 0.6; }

/* === PULL QUOTE · editorial style === */
body.paper-mode blockquote,
body.paper-mode .pull-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(20px, 2.4vw, 28px);
  line-height: 1.45;
  border-left: 3px solid var(--green);
  padding: 4px 24px;
  color: var(--text);
  margin: 32px 0;
}

/* === HORIZONTAL RULES · editorial === */
body.paper-mode hr,
body.paper-mode .section[style*="border-top"] {
  border-color: var(--rule-color) !important;
}

/* ==========================================================================
   PACK BREATHING · the wow moment for /sobre/ organigrama
   Each org-node has its own rhythm, never sync. Magnetic proximity on hover.
   ========================================================================== */

@keyframes pack-breath {
  0%, 100% { transform: scale(1) translateY(0); }
  50%      { transform: scale(1.018) translateY(-1px); }
}

body.paper-mode .org-node {
  background: var(--bg-card);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  position: relative;
}

body.paper-mode .org-node__avatar {
  background: radial-gradient(circle at 30% 30%, rgba(245,241,232,0.08), rgba(5,6,7,0.6));
  border: 2px solid var(--green-dim);
  box-shadow: 0 4px 18px rgba(0,0,0,0.45), inset 0 0 0 1px rgba(245,241,232,0.05);
  /* Each agent gets unique breathing rhythm via inline --delay & --duration */
  animation: pack-breath var(--breath-dur, 5s) ease-in-out var(--breath-delay, 0s) infinite;
  will-change: transform;
}

body.paper-mode .org-node--manuel .org-node__avatar,
body.paper-mode .org-node--martin .org-node__avatar {
  border-color: var(--green);
  box-shadow: 0 4px 18px rgba(0,0,0,0.5), 0 0 0 1px rgba(172,221,129,0.22), inset 0 0 0 1px rgba(245,241,232,0.06);
}

/* Magnetic hover: when one node is hovered, others react */
body.paper-mode .org-grid:hover .org-node:not(:hover) {
  opacity: 0.50;
  filter: blur(0.4px);
  transition: opacity 0.4s, transform 0.4s, filter 0.4s;
}
body.paper-mode .org-node:hover {
  border-color: var(--green);
  background: rgba(172,221,129,0.06);
  transform: translateY(-3px);
  box-shadow: 0 22px 44px -10px rgba(172,221,129,0.30), 0 4px 12px rgba(0,0,0,0.5);
}
body.paper-mode .org-node:hover .org-node__avatar {
  animation-play-state: paused;
  transform: scale(1.08);
  border-color: var(--green);
  box-shadow: 0 16px 36px rgba(172,221,129,0.35), 0 0 0 2px rgba(172,221,129,0.45), inset 0 0 0 1px rgba(245,241,232,0.10);
}

body.paper-mode .org-node__role {
  color: var(--green);
  font-family: var(--font-body);
  font-weight: 600;
}
body.paper-mode .org-node__name {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.01em;
}
body.paper-mode .org-node__desc {
  color: var(--text-dim);
}
body.paper-mode .org-row__label {
  color: var(--text-faint);
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.18em;
}
body.paper-mode .org-divider {
  background: linear-gradient(180deg, var(--green-dim), transparent);
  opacity: 0.7;
}

/* === TIMELINE · ink edition === */
body.paper-mode .tl-track::before {
  background: linear-gradient(90deg, transparent, var(--green-dim) 12%, var(--green-dim) 88%, transparent);
  opacity: 0.7;
}
body.paper-mode .tl-dot {
  background: var(--green);
  border-color: var(--bg);
  box-shadow: 0 0 0 1px var(--green-dim), 0 0 18px rgba(172,221,129,0.55);
}
body.paper-mode .tl-card {
  background: var(--bg-card);
  border-color: var(--card-border);
}
body.paper-mode .tl-card:hover {
  border-color: var(--green);
  background: rgba(172,221,129,0.04);
}
body.paper-mode .tl-card__month {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--green);
}
body.paper-mode .tl-card__title {
  font-family: var(--font-display);
}

/* === CTA SECTION · ink edition === */
body.paper-mode .cta-section {
  background: var(--bg-elev);
  border-top: 1px solid var(--rule-color);
  border-bottom: 1px solid var(--rule-color);
}
body.paper-mode .cta-section h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  color: var(--text);
}

/* === FOOTER · ink edition === */
body.paper-mode .footer-global {
  background: var(--bg-elev);
  border-top: 1px solid var(--rule-color);
  color: var(--text);
}
body.paper-mode .footer-global h5,
body.paper-mode .footer-global h6 {
  color: var(--text);
  font-family: var(--font-display);
}
body.paper-mode .footer-global p,
body.paper-mode .footer-global a {
  color: var(--text-dim);
}
body.paper-mode .footer-global a:hover {
  color: var(--green);
}
body.paper-mode .footer-global__bottom {
  border-top: 1px solid var(--rule-color);
}
body.paper-mode .footer-global .powered a {
  color: var(--green);
}

/* === WA FLOAT · ink edition (mantener verde WhatsApp para reconocimiento) === */
body.paper-mode .wa-float {
  background: #25D366;
  border: 2px solid var(--bg);
  box-shadow: 0 8px 24px rgba(37,211,102,0.50), 0 2px 8px rgba(0,0,0,0.5);
}

/* ==========================================================================
   CURSOR CUSTOM · pack tracker
   Hidden by default, JS activates on devices with hover support.
   ========================================================================== */
body.paper-mode.paper-cursor-active {
  cursor: none;
}
body.paper-mode.paper-cursor-active a,
body.paper-mode.paper-cursor-active button,
body.paper-mode.paper-cursor-active [role="button"] {
  cursor: none;
}

.paper-cursor {
  position: fixed;
  top: 0; left: 0;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--green-display, #BFE694);
  pointer-events: none;
  z-index: 100000;
  transform: translate(-50%, -50%);
  transition: width 0.3s cubic-bezier(0.16,1,0.3,1), height 0.3s cubic-bezier(0.16,1,0.3,1), background 0.3s, opacity 0.3s;
  box-shadow: 0 0 14px rgba(172,221,129,0.65);
  mix-blend-mode: screen;
  opacity: 0.95;
}
.paper-cursor--ring {
  width: 36px; height: 36px;
  background: transparent;
  border: 1.5px solid var(--green, #ACDD81);
  box-shadow: 0 0 22px rgba(172,221,129,0.45);
}
.paper-cursor--text {
  width: 70px; height: 70px;
  background: var(--green, #ACDD81);
  color: #0E0E0C;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body, 'Public Sans');
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  mix-blend-mode: normal;
  box-shadow: 0 0 28px rgba(172,221,129,0.5);
}
.paper-cursor-trail {
  position: fixed;
  top: 0; left: 0;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green-display, #BFE694);
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  opacity: 0;
  mix-blend-mode: screen;
  box-shadow: 0 0 8px rgba(172,221,129,0.4);
  transition: opacity 0.6s;
}

@media (max-width: 768px), (hover: none) {
  body.paper-mode.paper-cursor-active { cursor: auto; }
  .paper-cursor, .paper-cursor-trail { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  body.paper-mode .org-node__avatar { animation: none !important; }
  .paper-cursor, .paper-cursor-trail { display: none !important; }
}

/* === LANG SWITCHER topnav === */
body.paper-mode .topnav__lang a:hover {
  color: var(--green);
}

/* === SECTION background tweaks · soften gradients en ink mode === */
body.paper-mode section[style*="rgba(172,221,129,0.03)"],
body.paper-mode section[style*="rgba(172,221,129,0.025)"] {
  background: linear-gradient(180deg, transparent 0%, rgba(172,221,129,0.04) 50%, rgba(196,167,125,0.05) 100%) !important;
}

/* === PULL QUOTE color override en ink === */
body.paper-mode blockquote,
body.paper-mode .pull-quote {
  border-left-color: var(--green);
  color: var(--text);
}

/* === SCROLLBAR ink-tinted (webkit) === */
body.paper-mode::-webkit-scrollbar { width: 10px; height: 10px; }
body.paper-mode::-webkit-scrollbar-track { background: var(--bg); }
body.paper-mode::-webkit-scrollbar-thumb { background: rgba(245,241,232,0.20); border-radius: 5px; }
body.paper-mode::-webkit-scrollbar-thumb:hover { background: var(--green); }

