/* ==========================================================================
   Alonso Gámez — landing personal
   Tema claro. Gradiente suave que sigue al mouse. Un solo archivo CSS.
   ========================================================================== */

:root {
  --bg: #f7f5f0;           /* blanco cálido */
  --bg-2: #ffffff;
  --ink: #14171f;
  --mute: #566073;
  --line: rgba(20, 23, 31, .1);
  --accent: #0e7c6b;       /* verde azulado: acción principal */
  --accent-2: #e0731f;     /* naranja cálido */
  --g1: rgba(78, 227, 193, .50);
  --g2: rgba(255, 170, 110, .50);
  --g3: rgba(140, 150, 255, .38);
  --shadow: 0 1px 2px rgba(20, 23, 31, .05), 0 18px 40px -18px rgba(20, 23, 31, .18);
  --radius: 20px;
  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "DM Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --pad: clamp(20px, 5vw, 72px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 1.0625rem/1.65 var(--font-body);
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.05; margin: 0; letter-spacing: -.02em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* ----- Gradiente suave que sigue al mouse ----- */
.hero-glow {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(circle 560px at var(--mx, 70%) var(--my, 20%), var(--g1) 0%, transparent 60%),
    radial-gradient(circle 700px at calc(var(--mx, 70%) + 12%) calc(var(--my, 20%) - 8%), var(--g3) 0%, transparent 60%),
    radial-gradient(circle 620px at calc(var(--mx, 70%) - 18%) calc(var(--my, 20%) + 20%), var(--g2) 0%, transparent 60%),
    var(--bg);
  filter: blur(50px) saturate(120%);
  opacity: .75;
}

/* ----- Navegación ----- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px var(--pad);
  background: rgba(247, 245, 240, .94);              /* respaldo sólido */
  border-bottom: 1px solid var(--line);
}
@supports (backdrop-filter: blur(14px)) {
  .nav { background: rgba(247, 245, 240, .72); backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%); }
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-weight: 700; }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: var(--accent); color: #fff; font-size: .85rem; font-weight: 800;
}
.nav-links { display: flex; gap: 28px; }
.nav-links a { text-decoration: none; color: var(--mute); font-size: .95rem; transition: color .2s; }
.nav-links a:hover { color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: rgba(255, 255, 255, .6); }
.lang-btn {
  border: 0; background: transparent; color: var(--mute); cursor: pointer;
  font: 500 .78rem var(--font-mono); padding: 6px 11px; border-radius: 999px; transition: all .2s;
}
.lang-btn.is-active { background: var(--ink); color: #fff; }

/* ----- Botones ----- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: 999px; border: 1px solid var(--accent);
  background: var(--accent); color: #fff; text-decoration: none; cursor: pointer;
  font: 700 1rem var(--font-body);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -10px rgba(14, 124, 107, .6); }
.btn-sm { padding: 9px 18px; font-size: .9rem; }
.btn-ghost { background: transparent; color: var(--ink); border-color: rgba(20, 23, 31, .25); }
.btn-ghost:hover { background: rgba(20, 23, 31, .05); box-shadow: none; }

/* ----- Estructura general ----- */
.section { padding: clamp(64px, 9vw, 120px) var(--pad); max-width: 1240px; margin: 0 auto; }
.section-tight { padding-top: clamp(24px, 4vw, 48px); }
.section-head { max-width: 760px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head-left { margin-bottom: 0; }
.kicker { font: 500 .8rem var(--font-mono); color: var(--accent); text-transform: uppercase; letter-spacing: .14em; margin-bottom: 14px; }
h2 { font-size: clamp(1.9rem, 4.2vw, 3.1rem); font-weight: 700; text-wrap: balance; }
.lead { color: var(--mute); font-size: 1.15rem; max-width: 56ch; margin-top: 18px; }

/* ----- Hero ----- */
.hero {
  display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: clamp(28px, 5vw, 72px);
  max-width: 1240px; margin: 0 auto; padding: clamp(48px, 8vw, 110px) var(--pad) clamp(40px, 6vw, 80px);
}
.eyebrow { font: 500 .82rem var(--font-mono); color: var(--accent); text-transform: uppercase; letter-spacing: .12em; margin-bottom: 22px; }
.hero h1 { font-size: clamp(2.5rem, 6vw, 4.9rem); font-weight: 800; text-wrap: balance; overflow-wrap: break-word; }
.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--accent), var(--accent-2) 80%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lead { margin-top: 26px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero-note { margin-top: 22px; color: var(--mute); font-size: .92rem; }

/* ----- Mockups en CSS ----- */
.hero-visual { position: relative; }
.browser {
  border-radius: 16px; overflow: hidden; background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 40px 70px -34px rgba(20, 23, 31, .35), 0 2px 6px rgba(20, 23, 31, .06);
}
.browser-bar { display: flex; align-items: center; gap: 6px; padding: 11px 14px; background: #efece5; border-bottom: 1px solid var(--line); }
.browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: #cfcac0; }
.browser-bar i:nth-child(1) { background: #ff6b5e; }
.browser-bar i:nth-child(2) { background: #ffbd4a; }
.browser-bar i:nth-child(3) { background: #3ed16d; }
.url { margin-left: 10px; flex: 1; padding: 4px 12px; border-radius: 999px; background: #fff; color: var(--mute); font: 500 .72rem var(--font-mono); }
.browser-body { padding: 18px; display: grid; gap: 18px; min-height: 300px; }
.mk-nav { display: flex; align-items: center; gap: 10px; }
.mk-nav b { width: 26px; height: 26px; border-radius: 8px; background: var(--accent); margin-right: auto; }
.mk-nav span { width: 38px; height: 7px; border-radius: 4px; background: #dfe2ea; }
.mk-hero { display: grid; gap: 16px; padding: 22px 0 8px; }
.mk-lines { display: grid; gap: 9px; }
.mk-lines s { display: block; height: 16px; border-radius: 6px; background: linear-gradient(90deg, #1b2030, #7a8397); }
.mk-lines p { height: 8px; border-radius: 4px; background: #dfe2ea; width: 92%; }
.mk-lines p.short { width: 62%; }
.w80 { width: 80%; } .w60 { width: 60%; }
.mk-btn { width: 110px; height: 34px; border-radius: 999px; background: var(--accent); }
.mk-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mk-cards div { height: 74px; border-radius: 12px; background: #f3f5fa; border: 1px solid var(--line); }
.chip {
  position: absolute; padding: 8px 14px; border-radius: 999px; font: 500 .78rem var(--font-mono);
  background: #fff; border: 1px solid var(--line); color: var(--accent);
  box-shadow: 0 10px 24px -12px rgba(20, 23, 31, .3);
  animation: float 7s ease-in-out infinite;
}
.chip-a { top: -14px; right: 8%; }
.chip-b { bottom: 22%; left: -18px; animation-delay: -2s; color: #b85a12; }
.chip-c { bottom: -14px; right: 14%; animation-delay: -4s; color: #4a57d6; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* variante papel (proyecto Elizabeth Terán): esquema, no copia del sitio */
.browser-paper { background: #f4ede1; }
.browser-paper .browser-bar { background: #e6dccb; border-bottom-color: rgba(0, 0, 0, .08); }
.browser-paper .url { background: #f4ede1; color: #6d5f4b; }
.mk-nav-serif b { background: #7c3f3a; border-radius: 50%; }
.mk-nav-serif span { background: #cdbfa6; }
.mk-books { display: flex; gap: 12px; align-items: flex-end; padding: 6px 0; }
.book { flex: 1; aspect-ratio: 2 / 3; border-radius: 4px 8px 8px 4px; box-shadow: 6px 8px 14px -6px rgba(0, 0, 0, .35); }
.b1 { background: linear-gradient(160deg, #7c3f3a, #b9776b); }
.b2 { background: linear-gradient(160deg, #2f4b5a, #6f93a5); transform: translateY(-10px); }
.b3 { background: linear-gradient(160deg, #a37a2f, #e0bd71); }
.mk-lines-dark s { background: linear-gradient(90deg, #3a2f26, #8a7a66); }
.mk-lines-dark p { background: #cdbfa6; }

/* ----- Franja con movimiento lento ----- */
.strip { overflow: hidden; border-block: 1px solid var(--line); padding: 16px 0; background: rgba(255, 255, 255, .55); }
.strip-track { display: flex; gap: 44px; width: max-content; animation: marquee 42s linear infinite; }
.strip-track span { font: 700 1.5rem var(--font-display); color: rgba(20, 23, 31, .24); white-space: nowrap; }
.strip-track span::after { content: "✦"; margin-left: 44px; color: var(--accent); opacity: .7; font-size: 1rem; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ----- Tarjetas ----- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.card, .audience {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px;
  box-shadow: var(--shadow);
}
.card h3 { font-size: 1.6rem; margin: 22px 0 12px; }
.card p, .audience p { color: var(--mute); }
.num { font: 500 .85rem var(--font-mono); color: var(--accent); }
.audience h3 { font-size: 1.45rem; margin-bottom: 10px; }

.has-tilt {
  --rx: 0deg; --ry: 0deg;
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .5s var(--ease);
}
.has-tilt:hover { transition-duration: .15s; }

/* ----- Proyecto ----- */
.case {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(24px, 4vw, 56px); align-items: center;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 28px; padding: clamp(20px, 3.5vw, 44px);
  box-shadow: var(--shadow);
}
.case-client { font: 500 .8rem var(--font-mono); color: var(--mute); margin-bottom: 12px; }
.case-copy h3 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin-bottom: 16px; }
.case-copy > p:not(.case-client) { color: var(--mute); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 28px; }
.tags li { padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; font: 500 .78rem var(--font-mono); color: var(--mute); background: var(--bg); }
/* segundo proyecto: texto a la izquierda, mockup a la derecha */
.case + .case { margin-top: 18px; }
.case-reverse .case-visual { order: 2; }
.case-reverse { grid-template-columns: .9fr 1.1fr; }
/* mockup de w-Cong: anillo de tiempo + filas de partes */
.mk-timer { display: flex; align-items: center; gap: 18px; padding: 10px 0; }
.mk-ring { width: 86px; height: 86px; flex: none; border-radius: 50%;
  background: conic-gradient(var(--accent) 0 68%, #dfe2ea 0);
  -webkit-mask: radial-gradient(circle, transparent 54%, #000 56%); mask: radial-gradient(circle, transparent 54%, #000 56%); }
.mk-timer .mk-lines { flex: 1; }
.mk-rows { display: grid; gap: 9px; }
.mk-rows div { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: #f3f5fa; border: 1px solid var(--line); }
.mk-rows i { width: 18px; height: 18px; border-radius: 50%; background: var(--accent); flex: none; }
.mk-rows div:nth-child(2) i { background: var(--accent-2); }
.mk-rows div:nth-child(3) i { background: #dfe2ea; }
.mk-rows span { height: 8px; border-radius: 4px; background: #dfe2ea; flex: 1; }
.slot {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  margin-top: 18px; padding: 28px 34px; border-radius: 24px; border: 1px dashed rgba(20, 23, 31, .28);
  background: rgba(255, 255, 255, .5);
}
.slot h3 { font-size: 1.5rem; margin-bottom: 6px; }
.slot p { color: var(--mute); }

/* ----- Proceso ----- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.steps li { padding: 26px 24px; border-top: 2px solid var(--accent); background: var(--bg-2); border-radius: 0 0 var(--radius) var(--radius); box-shadow: var(--shadow); }
.step-n { font: 500 .85rem var(--font-mono); color: var(--accent); }
.steps h3 { font-size: 1.35rem; margin: 14px 0 8px; }
.steps p { color: var(--mute); font-size: .98rem; }

/* ----- Hosting ----- */
.hosting {
  display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(28px, 5vw, 72px); align-items: start;
  padding: clamp(28px, 5vw, 60px); border-radius: 32px; border: 1px solid var(--line);
  background: radial-gradient(circle at 0% 0%, rgba(78, 227, 193, .22), transparent 55%), var(--bg-2);
  box-shadow: var(--shadow);
}
.checklist { display: grid; gap: 4px; }
.checklist li { display: grid; grid-template-columns: 150px 1fr; gap: 16px; align-items: baseline; padding: 16px 0; border-bottom: 1px solid var(--line); }
.checklist li:last-child { border-bottom: 0; }
.checklist b { font: 700 1.15rem var(--font-display); }
.checklist b::before { content: "✓"; color: var(--accent); margin-right: 10px; }
.checklist span { color: var(--mute); }

/* ----- Paquetes (tabla comparativa) ----- */
.pkg-wrap {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 28px;
  box-shadow: var(--shadow); overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.pkg-table {
  width: 100%; min-width: 720px; border-collapse: collapse; text-align: left;
  font-size: .96rem; line-height: 1.55;
}
.pkg-table th, .pkg-table td {
  padding: 18px 22px; border-bottom: 1px solid var(--line); vertical-align: top;
}
.pkg-table thead th {
  padding: 26px 22px 20px; vertical-align: bottom;
  font-family: var(--font-display); font-weight: 700;
  border-bottom: 1px solid rgba(20, 23, 31, .14);
}
.pkg-table thead th:first-child {
  font: 500 .78rem var(--font-mono); text-transform: uppercase; letter-spacing: .12em;
  color: var(--mute); width: 19%;
}
.pkg-table thead th:not(:first-child) { width: 27%; }
.pkg-name { display: block; font-size: 1.45rem; letter-spacing: -.02em; color: var(--ink); }
.pkg-badge {
  display: inline-block; margin-bottom: 8px; padding: 4px 10px; border-radius: 999px;
  background: rgba(14, 124, 107, .12); color: var(--accent);
  font: 500 .72rem var(--font-mono); text-transform: uppercase; letter-spacing: .08em;
}
.pkg-table tbody th {
  font: 700 .95rem var(--font-display); color: var(--ink);
  white-space: nowrap;
}
.pkg-table tbody td { color: var(--mute); }
.pkg-table tbody tr:hover td,
.pkg-table tbody tr:hover th { background: rgba(20, 23, 31, .02); }
.pkg-table .is-featured {
  background: rgba(14, 124, 107, .045);
  border-inline: 1px solid rgba(14, 124, 107, .14);
}
.pkg-table tbody tr:hover td.is-featured { background: rgba(14, 124, 107, .075); }
.pkg-table thead th.is-featured {
  background: linear-gradient(180deg, rgba(14, 124, 107, .10), rgba(14, 124, 107, .045));
}
.pkg-table tfoot th, .pkg-table tfoot td {
  padding: 20px 22px 24px; border-bottom: 0; vertical-align: middle;
}
.pkg-table tfoot th {
  font: 500 .78rem var(--font-mono); text-transform: uppercase; letter-spacing: .12em;
  color: var(--mute);
}
.pkg-note {
  margin-top: 18px; color: var(--mute); font-size: .92rem; max-width: 68ch;
}

/* ----- Sobre mí (con foto) ----- */
.about { display: grid; grid-template-columns: minmax(220px, 340px) 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; max-width: 960px; }
.about-photo { margin: 0; position: relative; }
.about-photo::before {                       /* forma de color detrás de la foto */
  content: ""; position: absolute; inset: 18px -18px -18px 18px; border-radius: 28px; z-index: 0;
  background: linear-gradient(140deg, var(--g1), var(--g2));
}
.about-photo img {
  position: relative; z-index: 1; display: block; width: 100%; height: auto;
  aspect-ratio: 569 / 729; object-fit: cover; border-radius: 28px;
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.about h2 { margin-bottom: 20px; }
.about-copy p + p { margin-top: 14px; }
.about-copy p:not(.kicker) { color: var(--mute); font-size: 1.15rem; }

/* ----- Contacto ----- */
.contact-card {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px);
  padding: clamp(28px, 5vw, 64px); border-radius: 32px; border: 1px solid rgba(14, 124, 107, .3);
  background: radial-gradient(circle at 100% 0%, rgba(140, 150, 255, .22), transparent 55%), var(--bg-2);
  box-shadow: var(--shadow);
}
.contact-links { display: grid; gap: 8px; margin-top: 28px; }
.contact-links a { color: var(--accent); text-underline-offset: 4px; font-weight: 500; }
.form { display: grid; gap: 16px; align-content: start; }
.form label { display: grid; gap: 7px; font-size: .9rem; color: var(--mute); }
.form input, .form textarea {
  width: 100%; padding: 13px 15px; border-radius: 12px; border: 1px solid rgba(20, 23, 31, .2);
  background: #fff; color: var(--ink); font: 400 1rem var(--font-body);
}
.form input:focus, .form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.form textarea { resize: vertical; }
.form .btn { justify-self: start; }
.form-hint { font-size: .85rem; color: var(--mute); }
.form-error { font-size: .9rem; color: #b42318; }
.form-error[hidden] { display: none; }

.footer {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 32px var(--pad) 44px; border-top: 1px solid var(--line); color: var(--mute); font-size: .92rem;
}
.footer a { text-decoration: none; }
.footer a:hover { color: var(--ink); }

/* ----- Aparición al hacer scroll: el contenido es visible si falla el JS ----- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal.has-tilt.in { transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry)); }

/* ----- Responsive ----- */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .hero-visual { max-width: 560px; }
  .grid-3 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .case, .case-reverse, .hosting, .contact-card { grid-template-columns: 1fr; }
  .case-reverse .case-visual { order: 0; }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .brand-name { display: none; }
  .grid-2 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .checklist li { grid-template-columns: 1fr; gap: 4px; }
  .chip-b { left: -6px; }
  .hero-cta .btn { flex: 1 1 auto; }
  .slot { padding: 24px; }
  .about { grid-template-columns: 1fr; }
  .about-photo { max-width: 280px; margin: 0 18px 18px 0; }   /* deja espacio a la forma de color */
}

/* Solo se desactivan los movimientos intrusivos (Windows suele traer esta opción activada) */
@media (prefers-reduced-motion: reduce) {
  .chip { animation: none; }
  .strip-track { animation-duration: 120s; }
}
