/* ============================================================
   RAFA SOCARRÁS — Sistema de marca para web
   80% editorial limpio · 20% energía de marca (morado/magenta)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

:root {
  /* Base sofisticada */
  --bg:        #F7F4EF;   /* marfil */
  --white:     #FFFFFF;
  --ink:       #111111;   /* negro suave */
  --gray:      #4D4D4D;   /* gris cálido */
  --gray-soft: #8a8580;
  --line:      #e6e1d8;   /* línea sutil sobre marfil */
  --line-white:#ececec;
  --navy:      #0B1F3A;   /* azul noche */
  --navy-2:    #112a4d;

  /* Marca */
  --purple:    #6A20A6;
  --purple-d:  #531a83;
  --magenta:   #FF007E;
  --magenta-d: #d60069;
  --cyan:      #00FFFF;
  --green:     #00F586;
  --yellow:    #FFCF1B;

  /* Tipografía */
  --font: 'Poppins', system-ui, -apple-system, sans-serif;

  /* Layout */
  --maxw: 1240px;
  --gut: clamp(20px, 5vw, 64px);
  --radius: 18px;

  --nav-h: 78px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

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

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

/* ---------- Tipografía ---------- */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 6.4vw, 5.1rem); }
h2 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); }
h3 { font-size: clamp(1.35rem, 2.4vw, 1.85rem); letter-spacing: -0.015em; }
h4 { font-size: 1.18rem; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0 0 1em; text-wrap: pretty; }

.lead {
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  line-height: 1.55;
  color: var(--gray);
  font-weight: 400;
}

/* Eyebrow — texto tracked (firma del manual) */
.eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--purple);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
}
.eyebrow::before {
  content: "";
  width: 28px; height: 2px;
  background: var(--magenta);
  display: inline-block;
}
.eyebrow.on-dark { color: var(--cyan); }
.eyebrow.centered { justify-content: center; }

.accent-purple { color: var(--purple); }
.accent-magenta { color: var(--magenta); }
mark, .mark {
  background: linear-gradient(transparent 62%, rgba(255,0,126,0.22) 0);
  color: inherit; padding: 0 .04em;
}
.u-magenta {
  background-image: linear-gradient(var(--magenta), var(--magenta));
  background-size: 100% 3px;
  background-position: 0 92%;
  background-repeat: no-repeat;
}

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut); }
.section { padding: clamp(64px, 9vw, 140px) 0; position: relative; }
.section.tight { padding: clamp(48px, 6vw, 88px) 0; }
.bg-white { background: var(--white); }
.bg-marfil { background: var(--bg); }
.section-dark { background: var(--navy); color: var(--white); }
.section-dark h1, .section-dark h2, .section-dark h3 { color: var(--white); }
.section-dark .lead { color: rgba(255,255,255,0.72); }

.eyebrow-wrap { margin-bottom: 14px; }
.section-head { max-width: 760px; margin-bottom: clamp(38px, 5vw, 64px); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font); font-weight: 600; font-size: 0.96rem;
  padding: 15px 28px; border-radius: 100px; cursor: pointer;
  border: 1.5px solid transparent; transition: all .25s cubic-bezier(.4,0,.2,1);
  letter-spacing: -0.01em; line-height: 1; white-space: nowrap;
}
.btn .arr { transition: transform .25s ease; }
.btn:hover .arr { transform: translateX(4px); }
.btn-primary { background: var(--magenta); color: #fff; }
.btn-primary:hover { background: var(--magenta-d); transform: translateY(-2px); box-shadow: 0 12px 30px -10px rgba(255,0,126,0.55); }
.btn-secondary { background: transparent; color: var(--purple); border-color: var(--purple); }
.btn-secondary:hover { background: var(--purple); color: #fff; transform: translateY(-2px); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.on-dark .btn-secondary, .section-dark .btn-secondary { color: #fff; border-color: rgba(255,255,255,0.4); }
.on-dark .btn-secondary:hover, .section-dark .btn-secondary:hover { background: #fff; color: var(--navy); border-color: #fff; }
.btn-lg { padding: 18px 36px; font-size: 1.02rem; }
.btn-group { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center;
  background: rgba(247,244,239,0.82);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.nav { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut);
  display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav-logo { display: flex; align-items: center; gap: 11px; }
.nav-fulllogo { height: 46px; width: auto; }
.nav-iso { height: 30px; width: auto; }
.nav-word { font-size: 1.18rem; font-weight: 400; letter-spacing: -0.02em; color: var(--ink); line-height: 1; }
.nav-word strong { font-weight: 700; }
.footer-brand { display: inline-flex; align-items: center; gap: 11px; margin-bottom: 22px; }
.footer-logo .footer-fulllogo { height: 52px; width: auto; margin-bottom: 0; }
.footer-brand .nav-iso { height: 32px; }
.footer-brand .nav-word { font-size: 1.3rem; }
.nav-links { display: flex; align-items: center; gap: 30px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  font-size: 0.92rem; font-weight: 500; color: var(--gray); position: relative; padding: 6px 0;
  transition: color .2s;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0;
  background: var(--magenta); transition: width .25s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-links a.active::after, .nav-links a:hover::after { width: 100%; }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; flex-direction: column; gap: 5px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); display: block; transition: .3s; }
.nav-toggle.open span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2){ opacity: 0; }
.nav-toggle.open span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 960px) {
  .nav-links, .nav-cta .btn { display: none; }
  .nav-toggle { display: flex; }
  .mobile-menu {
    position: fixed; inset: var(--nav-h) 0 0 0; background: var(--bg); z-index: 99;
    display: flex; flex-direction: column; padding: 32px var(--gut); gap: 4px;
    transform: translateX(100%); transition: transform .35s cubic-bezier(.4,0,.2,1);
    overflow-y: auto; -webkit-overflow-scrolling: touch;
  }
  .mobile-menu.open { transform: translateX(0); }
  /* header opaco mientras el menú móvil está abierto (evita ver la página por la franja superior) */
  .site-header.menu-open { background: var(--bg); border-bottom-color: var(--line); backdrop-filter: none; }
  .mobile-menu a { font-size: 1.5rem; font-weight: 600; padding: 14px 0; border-bottom: 1px solid var(--line); letter-spacing: -0.02em; color: var(--ink); }
  .mobile-menu .btn { margin-top: 24px; width: 100%; }
}
@media (min-width: 961px) { .mobile-menu { display: none; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: rgba(255,255,255,0.66); padding: clamp(56px,7vw,90px) 0 36px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 48px; margin-bottom: 56px; }
.footer-logo img { height: 34px; margin-bottom: 22px; }
.footer-tag { color: rgba(255,255,255,0.78); max-width: 320px; font-size: 0.96rem; }
.footer-col h5 { color: #fff; font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 600; margin: 0 0 18px; }
.footer-col a { display: block; padding: 7px 0; font-size: 0.95rem; transition: color .2s; }
.footer-col a:hover { color: var(--cyan); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap;
  padding-top: 28px; border-top: 1px solid rgba(255,255,255,0.12); font-size: 0.85rem; }
.footer-social { display: flex; gap: 12px; }
.footer-social a { width: 40px; height: 40px; border: 1px solid rgba(255,255,255,0.2); border-radius: 50%;
  display: grid; place-items: center; transition: all .25s; }
.footer-social a:hover { background: var(--magenta); border-color: var(--magenta); color: #fff; transform: translateY(-2px); }
@media (max-width: 760px){ .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; } .footer-logo { grid-column: 1 / -1; } }

/* ---------- Cards ---------- */
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 34px; transition: transform .3s cubic-bezier(.4,0,.2,1), box-shadow .3s, border-color .3s;
  position: relative; overflow: hidden;
}
.card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--purple); transform: scaleX(0); transform-origin: left; transition: transform .35s ease;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 22px 50px -28px rgba(17,17,17,0.28); }
.card:hover::before { transform: scaleX(1); }
.card.magenta-top::before { background: var(--magenta); }
.card-ico { width: 52px; height: 52px; border-radius: 13px; display: grid; place-items: center;
  background: rgba(106,32,166,0.08); color: var(--purple); margin-bottom: 22px; }
.card-ico.mag { background: rgba(255,0,126,0.09); color: var(--magenta); }
.card h3 { margin-bottom: 12px; }
.card p { color: var(--gray); margin: 0; font-size: 0.98rem; }

/* ---------- Métricas ---------- */
.metric { }
.metric .num { font-size: clamp(2.6rem, 5vw, 3.6rem); font-weight: 700; letter-spacing: -0.03em; color: var(--purple); line-height: 1; }
.metric .num .plus { color: var(--magenta); }
.metric .lbl { color: var(--gray); font-size: 0.95rem; margin-top: 10px; }

/* ---------- Geometría / isotipo decorativo ---------- */
.iso-deco { position: absolute; pointer-events: none; opacity: 0.9; z-index: 0; }
.iso-watermark { position: absolute; opacity: 0.05; pointer-events: none; z-index: 0; }

/* ---------- Pill / chips ---------- */
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 100px;
  background: rgba(106,32,166,0.07); color: var(--purple); font-size: 0.82rem; font-weight: 500; }
.chip.mag { background: rgba(255,0,126,0.08); color: var(--magenta); }
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Tira de autoridad ---------- */
.authority { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: clamp(24px,4vw,60px); }
.authority span { font-weight: 600; color: var(--gray-soft); font-size: clamp(0.95rem,1.4vw,1.15rem); letter-spacing: -0.01em; transition: color .25s; }
.authority span:hover { color: var(--purple); }

/* ---------- Forms ---------- */
.field { margin-bottom: 20px; }
.field label { display: block; font-size: 0.85rem; font-weight: 500; margin-bottom: 8px; }
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--font); font-size: 1rem; padding: 14px 16px; border-radius: 12px;
  border: 1.5px solid rgba(255,255,255,0.18); background: rgba(255,255,255,0.06); color: #fff; transition: border-color .2s, background .2s;
}
.field input::placeholder, .field textarea::placeholder { color: rgba(255,255,255,0.4); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--magenta); background: rgba(255,255,255,0.1); }
.field select option { color: #111; }
.field textarea { resize: vertical; min-height: 120px; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.2,.6,.2,1), transform .7s cubic-bezier(.2,.6,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; } .reveal.d4 { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* ---------- Grids utilitarios ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px){ .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 580px){ .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---------- Image slot defaults ---------- */
image-slot { background: linear-gradient(135deg, #efeae2, #e4ded3); border: 1px dashed rgba(106,32,166,0.3); }

/* ---------- Page hero (interior) ---------- */
.page-hero { padding: clamp(56px,8vw,120px) 0 clamp(40px,5vw,70px); position: relative; overflow: hidden; }
.page-hero .lead { max-width: 620px; }

/* ---------- Divider dots (método) ---------- */
.divider-line { height: 1px; background: var(--line); border: none; margin: 0; }

/* utility */
.text-center { text-align: center; }
.mt-0{margin-top:0}.mb-0{margin-bottom:0}
.maxw-680 { max-width: 680px; }
.relative { position: relative; }
.z1 { position: relative; z-index: 1; }

/* ---------------- HOME · Hero Editorial ---------------- */
.hero { position: relative; overflow: hidden; }
.hero-a { position: relative; overflow: hidden; min-height: min(86vh, 760px); display: flex; align-items: center;
  padding: clamp(48px,7vw,96px) 0; background: var(--bg); }
.hero-a .wrap { display: block; max-width: 620px; margin-right: auto; position: relative; z-index: 2; }
.hero-name { font-size: clamp(3rem, 7.5vw, 6rem); line-height: .92; margin-bottom: 8px; }
.hero-sub { font-size: clamp(1.3rem,2.6vw,2rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1.12; margin: 0 0 22px; max-width: 18ch; }
.hero-support { color: var(--gray); font-size: 1.08rem; max-width: 44ch; margin-bottom: 34px; }
.hero-a-bg { position: absolute; top: 0; right: 0; bottom: 0; width: clamp(46%, 52vw, 58%); z-index: 0; }
.hero-a-bg > img:not(.geo-iso-a) { width: 100%; height: 100%; object-fit: cover; object-position: 50% 14%; }
.hero-a-bg > img.geo-iso-a { width: 100%; height: 100%; object-fit: contain; object-position: 100% 100%; }
.hero-a-bg::before { content:""; position:absolute; inset:0; z-index:1;
  background: linear-gradient(90deg, var(--bg) 0%, rgba(247,244,239,.55) 24%, transparent 60%); }
.hero-a-bg::after { content:""; position:absolute; inset:0; z-index:1;
  background: linear-gradient(0deg, rgba(247,244,239,.4), transparent 40%); }
.geo-iso-a { position: absolute; width: 20%; right: 3%; bottom: 5%; z-index: 2; mix-blend-mode: multiply; opacity: .4; }
.hero-stats { display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: clamp(14px,3vw,52px); margin-top: 40px; }
.hero-stats .num { font-size: clamp(1.5rem,5.2vw,2.4rem); font-weight:700; letter-spacing:-.03em; line-height:1; }
.hero-stats .num .plus { color: var(--magenta); }
.hero-stats .lbl { font-size: clamp(.72rem,2vw,.8rem); color: var(--gray); margin-top:6px; }
@media (max-width: 880px){
  .hero-a { min-height: 0; padding-top: clamp(40px,6vw,72px); padding-bottom: clamp(360px,52vw,480px); align-items: flex-start; }
  .hero-a .wrap { max-width: 100%; }
  .hero-a-bg { top: auto; width: 100%; height: clamp(340px,48vw,460px);
    -webkit-mask-image: linear-gradient(0deg, #000 60%, transparent 100%);
            mask-image: linear-gradient(0deg, #000 60%, transparent 100%); }
  .hero-a .btn-group { flex-direction: column; align-items: stretch; }
  .hero-a .btn-group .btn { width: 100%; }
}

/* HOME · Quote band */
.quote-band { background: var(--navy); color:#fff; }
.quote-band .q { font-size: clamp(1.6rem,3.4vw,2.8rem); font-weight:600; letter-spacing:-.02em; line-height:1.18; max-width: 20ch; }
.quote-band .q .accent { color: var(--cyan); }

/* HOME · Projects grid */
.proj { display:grid; grid-template-columns: repeat(12,1fr); gap: 20px; }
.proj-card { position: relative; border-radius: 20px; overflow: hidden; padding: 30px; min-height: 280px;
  display:flex; flex-direction: column; justify-content: flex-end; color:#fff; background: var(--navy-2); border:1px solid rgba(255,255,255,.08); transition: transform .35s; }
.proj-card:hover { transform: translateY(-5px); }
.proj-card .tag { font-size:.72rem; letter-spacing:.2em; text-transform:uppercase; color: var(--cyan); margin-bottom:10px; }
.proj-card h3 { margin-bottom:8px; }
.proj-card p { color: rgba(255,255,255,.7); font-size:.95rem; margin:0; }
.proj-card.feat { grid-column: span 7; min-height: 340px; background: linear-gradient(150deg, #1a1147, var(--navy)); }
.proj-card.s5 { grid-column: span 5; }
.proj-card.s4 { grid-column: span 4; }
.proj-card.s6 { grid-column: span 6; }
.proj-card.s8 { grid-column: span 8; }
.proj-glow { position:absolute; width: 240px; height:240px; border-radius:50%; filter: blur(80px); opacity:.5; top:-60px; right:-40px; }
@media (max-width: 760px){ .proj-card, .proj-card.feat, .proj-card.s5, .proj-card.s4, .proj-card.s6, .proj-card.s8 { grid-column: 1 / -1; } }

/* HOME · Método */
.method-track { display:grid; grid-template-columns: repeat(5,1fr); gap: 18px; position:relative; margin-top: 50px; }
.method-track::before { content:""; position:absolute; top: 9px; left: 8%; right:8%; height:2px; background: var(--line); }
.method-step { text-align:left; position:relative; }
.method-dot { width:18px; height:18px; border-radius:50%; background: var(--purple); position:relative; z-index:1; margin-bottom: 22px; }
.method-step:nth-child(even) .method-dot { background: var(--magenta); }
.method-step .n { font-size:.72rem; letter-spacing:.2em; color: var(--gray-soft); text-transform:uppercase; }
.method-step h4 { margin: 4px 0 8px; }
.method-step p { font-size:.9rem; color: var(--gray); margin:0; }
@media (max-width: 760px){ .method-track { grid-template-columns: 1fr 1fr; gap: 30px;} .method-track::before{ display:none;} }
@media (max-width: 460px){ .method-track { grid-template-columns: 1fr; } }

/* HOME · Ideas teaser */
.idea-card { display:block; background: var(--white); border:1px solid var(--line); border-radius:16px; overflow:hidden; transition: transform .3s, box-shadow .3s; }
.idea-card:hover { transform: translateY(-4px); box-shadow: 0 20px 44px -28px rgba(17,17,17,.25); }
.idea-card .body { padding: 26px; }
.idea-card .meta { font-size:.74rem; letter-spacing:.12em; text-transform:uppercase; color: var(--magenta); margin-bottom:12px; }
.idea-card h4 { margin:0 0 10px; font-size:1.15rem; line-height:1.25; }
.idea-card .more { color: var(--purple); font-weight:600; font-size:.9rem; }

/* HOME · CTA final */
.final-cta { background: var(--navy); color:#fff; position:relative; overflow:hidden; }
.final-cta .iso-watermark { right:-6%; bottom:-20%; width: 42%; opacity:.07; }
.final-cta h2 { color:#fff; max-width: 16ch; }
