/* =========================================================
   JUANFER — estilos (según el manual de marca JF JUANFER)
   Colores: rojo #ac1e2a · negro #050203 · amarillo #ffb703 · azul #0077b6
   Tipografías: Caoutchouc (títulos) · Louis George Cafe (textos)
   ========================================================= */
/* Para usar las fuentes exactas del manual: copia sus archivos en fonts/
   con estos nombres. Si no están, se usan Rubik y Quicksand. */
@font-face { font-family: "Caoutchouc"; src: url("fonts/Caoutchouc.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Louis George Cafe"; src: url("fonts/LouisGeorgeCafe.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Louis George Cafe"; src: url("fonts/LouisGeorgeCafe-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
:root {
  --titulo: "Caoutchouc", "Rubik", system-ui, sans-serif;
  --texto: "Louis George Cafe", "Quicksand", system-ui, sans-serif;
  --yellow: #ffb703;
  --blue: #0077b6;
  --bg: #fff;
  --ink: #050203;
  --muted: #6f6f6f;
  --line: #e7e7e7;
  --red: #ac1e2a;          /* rojo de la marca JF */
  --green: #22c55e;
  --on-ink: #fff;
  --nav-bg: rgba(255,255,255,.88);
  --ph: #eee;
  --card: #f5f5f5;
}
html[data-tema="noche"] {
  color-scheme: dark;
  --bg: #0b0b0b;
  --ink: #f2f2f2;
  --muted: #9a9a9a;
  --line: #262626;
  --red: #d22a38;
  --on-ink: #0b0b0b;
  --nav-bg: rgba(11,11,11,.85);
  --ph: #1b1b1b;
  --card: #151515;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--ink);
  font: 600 15px/1.3 var(--texto);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  transition: background-color .3s, color .3s;
}
/* Brillo rojo de fondo que respira lentamente */
body::before {
  content: ""; position: fixed; inset: -15%; z-index: -1; pointer-events: none; opacity: 0;
  background:
    radial-gradient(38% 34% at 18% 28%, rgba(172,30,42,.45), transparent 70%),
    radial-gradient(34% 38% at 82% 72%, rgba(255,183,3,.38), transparent 70%),
    radial-gradient(40% 36% at 62% 12%, rgba(0,119,182,.28), transparent 70%);
  animation: respira 18s ease-in-out infinite;
}
@keyframes respira { 0%,100% { opacity: 0; transform: scale(1); } 50% { opacity: .45; transform: translate(3%,-2%) scale(1.08); } }

a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
[hidden] { display: none !important; }
.wrap { width: min(1040px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.btn { display: inline-block; background: var(--ink); color: var(--on-ink); font: 700 15px var(--texto); padding: 11px 16px; border-radius: 3px; border: 0; cursor: pointer; transition: background .2s, transform .2s; }
.btn:hover { background: var(--red); color: #fff; transform: translateY(-1px); }
.btn.ghost { background: none; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--on-ink); }
.title { font-family: var(--titulo); font-weight: 900; font-size: clamp(42px, 7vw, 72px); line-height: 1; letter-spacing: -.02em; text-transform: uppercase; text-align: center; }
.intro { text-align: center; }
.intro p { color: var(--muted); max-width: 340px; margin: 14px auto 20px; line-height: 1.35; }

/* ---------- Nav ---------- */
nav { position: fixed; inset: 0 0 auto; z-index: 50; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 14px 36px; background: var(--nav-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
nav .l, nav .r { display: flex; align-items: center; gap: 26px; }
nav .r { justify-content: flex-end; }
nav a:hover, nav .tema:hover { opacity: .6; }
nav .logo { width: 34px; height: 26px; }
nav .logo img { object-fit: contain; }
nav .lang { color: var(--muted); }
nav .lang button { background: none; border: 0; font: inherit; color: inherit; cursor: pointer; }
nav .lang button.on, nav .lang button:hover { color: var(--ink); }
nav .tema { background: none; border: 0; color: var(--ink); cursor: pointer; display: grid; place-items: center; }
nav .tema svg { width: 16px; height: 16px; }
nav .tema .sol, html[data-tema="noche"] nav .tema .luna { display: none; }
html[data-tema="noche"] nav .tema .sol { display: block; }
.status { display: flex; align-items: center; gap: 8px; }
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); animation: pulso 2s infinite; }
@keyframes pulso { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.6); } 70%,100% { box-shadow: 0 0 0 7px rgba(34,197,94,0); } }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 120px 0 90px; text-align: center; overflow: hidden; }
.hero .content { position: relative; z-index: 2; }
.hero h1 { font-family: var(--titulo); font-weight: 900; font-size: clamp(72px, 15vw, 168px); line-height: .9; letter-spacing: -.04em; text-transform: uppercase; margin-bottom: 26px; }
.hero h1 .punto { color: var(--red); }
.hero .oficio { font-size: clamp(15px, 2.2vw, 22px); font-weight: 500; letter-spacing: .32em; margin: -14px auto 30px; padding-left: .32em; }
::selection { background: var(--yellow); color: #050203; }
.flip { position: relative; width: 440px; max-width: 86vw; aspect-ratio: 4/3; margin: 0 auto 30px; border-radius: 6px; background: var(--ph); }
.flip > img:first-child { border-radius: 6px; }
.flip .rec { position: absolute; top: 12px; left: 12px; display: flex; align-items: center; gap: 6px; font-size: 11px; letter-spacing: .08em; color: #fff; background: rgba(0,0,0,.45); padding: 4px 8px; border-radius: 3px; }
.flip .rec i { width: 7px; height: 7px; border-radius: 50%; background: #ff2d3d; animation: parpadeo 1.2s steps(2) infinite; }
@keyframes parpadeo { 50% { opacity: 0; } }
.flip .sticker { position: absolute; width: 120px; height: auto; right: -46px; bottom: -36px; transform: rotate(8deg); filter: drop-shadow(0 6px 14px rgba(0,0,0,.25)); transition: transform .4s cubic-bezier(.2,.8,.2,1); }
.flip:hover .sticker { transform: rotate(-6deg) scale(1.08); }
.hero p { font-size: 20px; line-height: 1.4; max-width: 470px; margin: 0 auto 24px; }
.trail { position: absolute; width: 180px; aspect-ratio: 4/3; border-radius: 4px; overflow: hidden; pointer-events: none; z-index: 1; transform: translate(-50%,-50%) scale(.7); opacity: 0; transition: transform .45s cubic-bezier(.2,.8,.2,1), opacity .45s; }
.trail.show { transform: translate(-50%,-50%) scale(1); opacity: 1; }
.trail.hide { opacity: 0; transform: translate(-50%,-50%) scale(.85); transition-duration: .8s; }

/* ---------- Cinta de marcas ---------- */
.marcas { border-block: 1px solid var(--line); overflow: hidden; padding: 16px 0; }
.cinta { display: flex; width: max-content; animation: cinta 40s linear infinite; }
.cinta span { font-family: var(--titulo); font-weight: 800; font-size: 18px; text-transform: uppercase; letter-spacing: -.01em; padding: 0 22px; white-space: nowrap; }
.cinta span::after { content: "●"; color: var(--red); font-size: 9px; margin-left: 44px; vertical-align: middle; }
.cinta span:nth-child(3n+2)::after { color: var(--yellow); }
.cinta span:nth-child(3n)::after { color: var(--blue); }
.marcas:hover .cinta { animation-play-state: paused; }
@keyframes cinta { to { transform: translateX(-50%); } }

/* ---------- Trabajo ---------- */
.work { padding: 110px 0 110px; }
.filtros { display: inline-flex; gap: 4px; padding: 4px; border-radius: 99px; background: var(--card); }
.filtros button { background: none; border: 0; font: 700 14px var(--texto); color: var(--muted); padding: 8px 16px; border-radius: 99px; cursor: pointer; transition: .2s; }
.filtros button.on { background: var(--red); color: #fff; }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 34px 14px; margin-top: 40px; }
.card { cursor: pointer; text-align: left; background: none; border: 0; color: inherit; font: inherit; }
.card.destacado { grid-column: 1 / -1; }
.card.destacado .thumb { aspect-ratio: 16/8; }
.card .thumb { position: relative; aspect-ratio: 4/3; border-radius: 5px; overflow: hidden; background: var(--ph); }
.card .thumb img { transition: transform .7s cubic-bezier(.2,.8,.2,1), filter .4s; }
.card:hover .thumb img, .card:focus-visible .thumb img { transform: scale(1.05); }
.card .play { position: absolute; inset: auto auto 14px 14px; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.92); color: #000; display: grid; place-items: center; transition: transform .3s, background .3s; }
.card .play svg { width: 16px; margin-left: 2px; }
.card:hover .play { transform: scale(1.12); background: var(--red); color: #fff; }
.card .n { position: absolute; top: 12px; right: 12px; font-size: 11px; color: #fff; background: rgba(0,0,0,.45); padding: 4px 8px; border-radius: 3px; }
.card .info { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; }
.card .info h3 { font-family: var(--titulo); font-size: 16px; font-weight: 700; }
.card .info span { color: var(--muted); white-space: nowrap; }
.grid.limit .card:nth-child(n+8) { display: none; }
.mas { text-align: center; margin-top: 44px; }

/* ---------- Sobre mí ---------- */
.about { padding: 60px 0 110px; }
.about-top { display: grid; grid-template-columns: 1fr 1.2fr; gap: 50px; align-items: center; margin: 46px 0 70px; }
.mascota { aspect-ratio: 1; display: grid; place-items: center; background: var(--card); border-radius: 50%; padding: 12%; }
.mascota img { object-fit: contain; animation: flota 5s ease-in-out infinite; }
@keyframes flota { 50% { transform: translateY(-10px) rotate(-3deg); } }
.about .text p { font-size: 22px; line-height: 1.35; margin-bottom: 16px; }
.about .text p.muted { font-size: 16px; line-height: 1.5; font-weight: 500; margin-bottom: 24px; }
.block { max-width: 720px; margin: 0 auto 56px; }
.block h3 { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
details { border-bottom: 1px solid var(--line); }
summary { list-style: none; cursor: pointer; padding: 20px 0; font-family: var(--titulo); font-size: 22px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-weight: 400; font-size: 26px; transition: transform .3s; }
details[open] summary::after { transform: rotate(45deg); color: var(--red); }
summary:hover { color: var(--red); }
details p { color: var(--muted); font-weight: 500; font-size: 16px; line-height: 1.5; max-width: 560px; }
.tools { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 22px; }
.tools span { font-size: 13px; font-weight: 700; padding: 6px 10px; border-radius: 99px; background: var(--card); }
.tools.grande span { font-size: 15px; padding: 10px 16px; }

/* ---------- Contacto ---------- */
.contact { padding: 60px 0 120px; }
.socials { display: flex; justify-content: center; gap: 10px; }
.socials a { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--card); transition: .2s; }
.socials a:hover { background: var(--red); color: #fff; }
.socials svg { width: 19px; }
form { max-width: 520px; margin: 40px auto 0; display: grid; gap: 14px; }
form label span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
input, textarea { width: 100%; font: 600 16px var(--texto); color: var(--ink); background: var(--card); border: 1.5px solid transparent; border-radius: 4px; padding: 13px 14px; outline: none; transition: border-color .2s; }
input:focus, textarea:focus { border-color: var(--red); }
textarea { min-height: 140px; resize: vertical; }
form .send { justify-self: start; }
form .ok { display: none; color: var(--blue); }
form.enviado .ok { display: block; }

footer { display: flex; justify-content: space-between; padding: 22px 36px; border-top: 1px solid var(--line); color: var(--muted); }

/* ---------- Ventana de proyecto ---------- */
dialog { border: 0; padding: 0; width: min(1100px, 100% - 24px); max-height: calc(100% - 24px); margin: auto; background: var(--bg); color: var(--ink); border-radius: 8px; overflow: hidden; }
dialog[open] { display: flex; flex-direction: column; animation: sube .35s cubic-bezier(.2,.8,.2,1); }
dialog::backdrop { background: rgba(0,0,0,.7); backdrop-filter: blur(4px); }
@keyframes sube { from { opacity: 0; transform: translateY(24px); } }
.m-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.m-head h3 { font-family: var(--titulo); font-size: 22px; font-weight: 900; text-transform: uppercase; letter-spacing: -.01em; }
.m-head p { color: var(--muted); margin-top: 2px; }
.cerrar { background: var(--card); color: var(--ink); border: 0; width: 38px; height: 38px; border-radius: 50%; font-size: 15px; cursor: pointer; flex: none; }
.cerrar:hover { background: var(--red); color: #fff; }
.m-body { overflow-y: auto; padding: 22px; display: grid; gap: 14px; }
.m-body.videos { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.vid { position: relative; border-radius: 5px; overflow: hidden; background: #000; aspect-ratio: 16/9; grid-column: 1 / -1; }
.vid.v { aspect-ratio: 9/16; grid-column: auto; }
.vid iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.m-body.fotos { display: block; columns: 3 240px; column-gap: 12px; }
.m-body.fotos button { display: block; width: 100%; margin-bottom: 12px; border: 0; padding: 0; background: var(--ph); border-radius: 4px; overflow: hidden; cursor: zoom-in; break-inside: avoid; }
.m-body.fotos img { height: auto; transition: opacity .3s, transform .5s; }
.m-body.fotos button:hover img { transform: scale(1.03); }

/* ---------- Visor de fotos ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.94); display: grid; place-items: center; }
.lightbox img { width: auto; height: auto; max-width: 92vw; max-height: 88vh; object-fit: contain; }
.lightbox button { position: absolute; background: none; border: 0; color: #fff; cursor: pointer; font-size: 44px; padding: 16px; opacity: .7; }
.lightbox button:hover { opacity: 1; color: var(--red); }
.lb-prev { left: 8px; } .lb-next { right: 8px; }
.lb-close { top: 8px; right: 8px; font-size: 22px !important; }
.lb-count { position: absolute; bottom: 18px; color: #aaa; }


/* ---------- Agenda (tipo Calendly) ---------- */
.ctas { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
nav .nav-agenda { background: var(--red); color: #fff; padding: 7px 12px; border-radius: 99px; }
nav .nav-agenda:hover { opacity: .85; }
.agenda { padding: 60px 0 110px; }
.cal-box { --tipo: var(--red); display: grid; grid-template-columns: 300px 1fr; min-height: 520px; margin-top: 40px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; box-shadow: 0 20px 60px -30px rgba(0,0,0,.35); }
.cal-side { padding: 28px 26px; border-right: 1px solid var(--line); position: relative; }
.cal-side::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: var(--tipo); transition: background .3s; }
.cal-avatar { width: 64px; height: 50px; object-fit: contain; margin-bottom: 14px; }
.cal-host { color: var(--muted); }
.cal-side h3 { font-family: var(--titulo); font-size: 26px; line-height: 1.05; margin: 6px 0 18px; }
.cal-meta { list-style: none; display: grid; gap: 10px; color: var(--muted); }
.cal-meta li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.35; }
.cal-meta li span { width: 16px; flex: none; text-align: center; color: var(--ink); }
.cal-meta #cs-fecha { color: var(--ink); }
.cal-meta .cs-zona { font-size: 13px; }
.cal-meta .cs-zona::before { content: "◍"; width: 16px; text-align: center; flex: none; color: var(--ink); }
.cal-desc { margin-top: 20px; color: var(--muted); font-weight: 500; line-height: 1.5; }
.cal-main { position: relative; padding: 28px 30px; }
.cal-main h4 { font-family: var(--titulo); font-size: 20px; margin-bottom: 18px; }
.cal-back { position: absolute; top: 22px; right: 24px; width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--line); background: none; color: var(--ink); font-size: 18px; cursor: pointer; }
.cal-back:hover { border-color: var(--red); color: var(--red); }
.tipos { display: grid; gap: 10px; }
.tipo { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; text-align: left; padding: 16px 18px 16px 22px; border: 1.5px solid var(--line); border-radius: 8px; background: none; color: var(--ink); font: inherit; cursor: pointer; position: relative; overflow: hidden; transition: border-color .2s, transform .2s; }
.tipo::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 6px; background: var(--c); }
.tipo:hover { border-color: var(--c); transform: translateX(3px); }
.t-nombre { font-family: var(--titulo); font-size: 17px; font-weight: 700; }
.t-dur { color: var(--muted); font-size: 13px; align-self: center; background: var(--card); padding: 4px 10px; border-radius: 99px; }
.t-desc { grid-column: 1 / -1; color: var(--muted); font-weight: 500; font-size: 14px; }
.cal-grid { display: grid; grid-template-columns: 1fr 190px; gap: 26px; }
.mes-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.mes-head strong { font-size: 16px; }
.mes-head strong::first-letter, .horas-titulo::first-letter { text-transform: uppercase; }
.mes-head button { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--card); color: var(--ink); font-size: 20px; cursor: pointer; }
.mes-head button:disabled { opacity: .3; cursor: default; }
.dias-semana, .dias { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.dias-semana span { font-size: 11px; text-transform: uppercase; color: var(--muted); padding-bottom: 6px; }
.dias button { aspect-ratio: 1; border-radius: 50%; border: 0; font: 700 15px var(--texto); cursor: pointer; background: color-mix(in srgb, var(--red) 12%, transparent); color: var(--red); transition: .15s; position: relative; }
.dias button:hover { background: color-mix(in srgb, var(--red) 24%, transparent); }
.dias button:disabled { background: none; color: var(--muted); opacity: .45; cursor: default; font-weight: 500; }
.dias button.hoy::after { content: ""; position: absolute; bottom: 6px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; }
.dias button.sel { background: var(--red); color: #fff; }
.horas-titulo { font-weight: 700; margin: 8px 0 14px; min-height: 18px; }
.horas-lista { display: grid; gap: 8px; max-height: 330px; overflow-y: auto; padding-right: 4px; }
.hora { padding: 12px 6px; white-space: nowrap; border: 1.5px solid color-mix(in srgb, var(--red) 45%, transparent); color: var(--red); background: none; border-radius: 6px; font: 700 15px var(--texto); cursor: pointer; transition: .15s; }
.hora:hover { background: var(--red); border-color: var(--red); color: #fff; }
.vacio { color: var(--muted); font-weight: 500; padding: 10px 0; }
#cal-form { display: grid; gap: 14px; max-width: 560px; margin: 0; }
#cal-form .fila { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
#cal-form textarea { min-height: 100px; }
.trampa { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.cal-error { color: var(--red); }
.hecho { text-align: center; padding: 20px 0; }
.hecho .check { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; background: var(--red); color: #fff; font-size: 30px; display: grid; place-items: center; animation: pop .5s cubic-bezier(.2,1.6,.4,1); }
@keyframes pop { from { transform: scale(0); } }
.hecho h4 { font-size: 26px; }
.hecho p { color: var(--muted); max-width: 420px; margin: -6px auto 18px; line-height: 1.45; font-weight: 500; }
.hecho-resumen { display: inline-grid; gap: 4px; padding: 14px 22px; border-radius: 8px; background: var(--card); margin-bottom: 20px; text-transform: none; }
.hecho-resumen span:first-letter { text-transform: uppercase; }
.hecho-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.link { background: none; border: 0; color: var(--muted); text-decoration: underline; font: inherit; margin-top: 18px; cursor: pointer; }
@media (max-width: 860px) {
  .cal-box { grid-template-columns: 1fr; }
  .cal-side { border-right: 0; border-bottom: 1px solid var(--line); padding: 22px 20px; }
  .cal-desc { display: none; }
  .cal-main { padding: 22px 18px; }
  .cal-grid { grid-template-columns: 1fr; }
  .horas-lista { grid-template-columns: repeat(3, 1fr); max-height: none; }
  #cal-form .fila { grid-template-columns: 1fr; }
}

/* ---------- Aparecer al hacer scroll ---------- */
.rv { opacity: 0; transform: translateY(26px); transition: opacity .8s, transform .8s cubic-bezier(.2,.8,.2,1); }
.rv.in { opacity: 1; transform: none; }

/* ---------- Celular ---------- */
@media (max-width: 760px) {
  nav { grid-template-columns: auto 1fr; padding: 12px 16px; }
  nav .hide-m, nav .status { display: none; }
  nav .r { gap: 16px; }
  .hero { padding: 100px 0 70px; }
  .hero p { font-size: 18px; padding: 0 8px; }
  .flip .sticker { width: 84px; right: -14px; bottom: -28px; }
  .grid { grid-template-columns: 1fr; gap: 28px; }
  .card.destacado .thumb { aspect-ratio: 4/3; }
  .grid.limit .card:nth-child(n+6) { display: none; }
  .about-top { grid-template-columns: 1fr; gap: 30px; }
  .mascota { max-width: 260px; margin: 0 auto; }
  .about .text p { font-size: 19px; }
  summary { font-size: 18px; }
  footer { padding: 18px 16px; flex-direction: column; gap: 6px; text-align: center; }
  .m-body { padding: 14px; }
  .m-body.videos { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before { animation: none !important; transition: none !important; }
  .rv { opacity: 1; transform: none; }
}
