/* ============================================================
   MINGTA GROUP LATAM — Sistema de diseño para propuestas
   Naranja de marca + gris cálido. Serif editorial + sans geométrica.
   ============================================================ */

:root {
  /* Marca */
  --orange:      #e54602;
  --orange-deep: #c23c08;
  --orange-soft: #f2935a;
  --ember:       #ff8a3d;

  /* Neutros cálidos */
  --ink:        #15120f;   /* casi negro cálido */
  --ink-2:      #2a2520;
  --graphite:   #4d4c4c;   /* gris del logo */
  --slate:      #6f6962;
  --mute:       #9a938b;
  --line:       rgba(255,255,255,.10);
  --line-dark:  rgba(20,18,15,.12);

  --paper:      #faf7f3;   /* off-white cálido */
  --paper-2:    #f1ebe3;
  --cream:      #efe7dc;

  --maxw: 1180px;
  --r: 18px;
  --r-lg: 26px;

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans:  "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono:  "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;

  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  background: var(--ink);
  color: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* ---------- Tipografía ---------- */
h1,h2,h3,h4 { margin: 0; font-weight: 400; letter-spacing: -.01em; }
.serif { font-family: var(--serif); }
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--orange);
  font-weight: 400;
}
.eyebrow.muted { color: var(--mute); }
p { line-height: 1.62; }
.lead { font-size: clamp(18px, 2vw, 22px); line-height: 1.6; color: rgba(250,247,243,.82); }

/* ---------- Layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
section { position: relative; }
.pad { padding: clamp(72px, 11vw, 150px) 0; }

/* ---------- Hero / shader stage ---------- */
.shader-stage { position: relative; overflow: hidden; }
.shader-stage > canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; z-index: 0;
}
.shader-stage > .stage-inner { position: relative; z-index: 2; }
.shader-stage::after { /* legibilidad del texto */
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(120% 90% at 18% 88%, rgba(10,8,6,.72), transparent 60%),
    linear-gradient(180deg, rgba(10,8,6,.28) 0%, transparent 30%, transparent 55%, rgba(10,8,6,.55) 100%);
}
.shader-hint {
  position: absolute; z-index: 3; bottom: 96px; left: 50%; transform: translateX(-50%);
  font-family: var(--mono); font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  color: rgba(250,247,243,.55); display: flex; align-items: center; gap: 9px;
  pointer-events: none; animation: floaty 3.4s var(--ease) infinite;
}
.shader-stage .stage-inner > .wrap { width: 100%; }
.shader-hint::before { content:""; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 14px var(--orange); }
@keyframes floaty { 0%,100%{ transform: translate(-50%,0);} 50%{ transform: translate(-50%,-6px);} }

/* ---------- Topbar ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px clamp(20px,4vw,40px);
  transition: background .4s var(--ease), backdrop-filter .4s var(--ease), border-color .4s;
  border-bottom: 1px solid transparent;
}
.topbar.scrolled {
  background: rgba(18,15,12,.72); backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}
.topbar .brand img { height: 30px; display: block; }
.topbar .links { display: flex; gap: 26px; align-items: center; }
.topbar .links a { color: rgba(250,247,243,.78); text-decoration: none; font-size: 13.5px; font-weight: 500; letter-spacing: .01em; }
.topbar .links a:hover { color: #fff; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-weight: 600; font-size: 15px;
  padding: 15px 26px; border-radius: 999px; border: 0; cursor: pointer;
  text-decoration: none; transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s;
  letter-spacing: .005em;
}
.btn-primary { background: var(--orange); color: #fff; box-shadow: 0 10px 30px -8px rgba(229,70,2,.7); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -8px rgba(229,70,2,.85); }
.btn-ghost { background: rgba(255,255,255,.07); color: #fff; border: 1px solid var(--line); backdrop-filter: blur(8px); }
.btn-ghost:hover { background: rgba(255,255,255,.13); transform: translateY(-2px); }
.btn-dark { background: var(--ink); color: var(--paper); }
.btn .arr { transition: transform .3s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }

/* ---------- Pills / chips ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase;
  padding: 8px 15px; border-radius: 999px; border: 1px solid var(--line);
  color: rgba(250,247,243,.82); background: rgba(255,255,255,.04);
}
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--orange); }

/* ---------- Secciones claras ---------- */
.light-sec { background: var(--paper); color: var(--ink); }
.light-sec .lead { color: var(--slate); }
.light-sec .eyebrow { color: var(--orange-deep); }
.cream-sec { background: var(--cream); color: var(--ink); }

/* ---------- Tarjetas ---------- */
.card {
  background: rgba(255,255,255,.035); border: 1px solid var(--line);
  border-radius: var(--r); padding: 30px; transition: transform .4s var(--ease), border-color .4s, background .4s;
}
.card:hover { transform: translateY(-4px); border-color: rgba(229,70,2,.5); background: rgba(255,255,255,.06); }
.light-sec .card, .cream-sec .card { background: #fff; border-color: var(--line-dark); box-shadow: 0 1px 0 rgba(20,18,15,.03); }
.light-sec .card:hover, .cream-sec .card:hover { box-shadow: 0 24px 50px -28px rgba(20,18,15,.28); border-color: rgba(229,70,2,.35); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"]{ transition-delay:.08s } .reveal[data-d="2"]{ transition-delay:.16s }
.reveal[data-d="3"]{ transition-delay:.24s } .reveal[data-d="4"]{ transition-delay:.32s }
.reveal[data-d="5"]{ transition-delay:.40s }

/* ---------- Modo edición ---------- */
[contenteditable="true"] { outline: none; }
body.editing .editable {
  outline: 1.5px dashed rgba(229,70,2,.55); outline-offset: 3px;
  border-radius: 4px; cursor: text; transition: background .2s;
}
body.editing .editable:hover { background: rgba(229,70,2,.10); }
body.editing .editable:focus { outline-style: solid; background: rgba(229,70,2,.12); }

.edit-toggle {
  position: fixed; left: 22px; bottom: 22px; z-index: 80;
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--sans); font-weight: 600; font-size: 13px;
  padding: 11px 18px; border-radius: 999px; cursor: pointer; border: 1px solid var(--line);
  background: rgba(18,15,12,.82); color: var(--paper); backdrop-filter: blur(12px);
  box-shadow: 0 12px 30px -12px rgba(0,0,0,.6); transition: transform .3s var(--ease), background .3s;
}
.edit-toggle:hover { transform: translateY(-2px); }
.edit-toggle.active { background: var(--orange); color: #fff; border-color: transparent; }
.edit-toggle .ico { font-size: 14px; }
.edit-banner {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  z-index: 80; display: none; align-items: center; gap: 14px;
  font-size: 13px; color: var(--paper); background: rgba(18,15,12,.9);
  border: 1px solid var(--line); border-radius: 999px; padding: 10px 18px; backdrop-filter: blur(12px);
}
body.editing .edit-banner { display: flex; }
.edit-banner b { color: var(--ember); font-weight: 700; }

/* ---------- Footer ---------- */
.foot { background: var(--ink); color: rgba(250,247,243,.7); border-top: 1px solid var(--line); }
.foot a { color: rgba(250,247,243,.7); text-decoration: none; }
.foot a:hover { color: #fff; }

/* ---------- Utilidades ---------- */
.center { text-align: center; }
.grid { display: grid; gap: 22px; }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }
.hl { color: var(--orange); }
.num { font-family: var(--serif); font-feature-settings: "tnum" 1; }
.kicker-line { width: 44px; height: 2px; background: var(--orange); display: inline-block; vertical-align: middle; margin-right: 14px; }

/* ---------- Print ---------- */
@media print {
  .edit-toggle, .edit-banner, .topbar, .shader-hint { display: none !important; }
  body { background: #fff; color: #000; }
}

@media (max-width: 820px) {
  .topbar .links { display: none; }
  .pad { padding: 64px 0; }
}
