@font-face { font-family: "Fredoka"; src: url("/fonts/fredoka.woff2") format("woff2"); font-weight: 500 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/fonts/figtree.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }

/* Un solo acento (melocotón) sobre ciruela. Radios: tarjetas 24px, imágenes 14px, botones y etiquetas en píldora. */
:root {
  --bg: #FBF9F6;
  --fg: #52203F;
  --muted: #7A5C6E;
  --surface: #FFFFFF;
  --line: #EADDE0;
  --soft: #FDE9E1;
  --peach: #F9AB90;
  --plum: #52203F;
  --paper: #FBF9F6;
  --btn-bg: #52203F;
  --btn-fg: #FBF9F6;
  --btn-hover: #6B3657;
  --shadow: 0 18px 40px -18px rgb(82 32 63 / 0.35);
  --display: "Fredoka", ui-rounded, "Nunito", system-ui, sans-serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-card: 24px;
  --r-img: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1B0D16;
    --fg: #F6EAF0;
    --muted: #C7A9BA;
    --surface: #26121F;
    --line: #3A2231;
    --soft: #33182A;
    --btn-bg: #F9AB90;
    --btn-fg: #3A1530;
    --btn-hover: #FBC2AE;
    --shadow: 0 18px 40px -18px rgb(0 0 0 / 0.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1B0D16; --fg: #F6EAF0; --muted: #C7A9BA; --surface: #26121F; --line: #3A2231; --soft: #33182A;
  --btn-bg: #F9AB90; --btn-fg: #3A1530; --btn-hover: #FBC2AE; --shadow: 0 18px 40px -18px rgb(0 0 0 / 0.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 1.0625rem/1.6 var(--body); }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
.wrap {
  max-width: 1120px; margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

::selection { background: var(--peach); color: #3A1530; }
.wavy { text-decoration: underline wavy var(--peach); text-decoration-thickness: 3px; text-underline-offset: 9px; text-decoration-skip-ink: none; }

/* Cabecera: solo el logo */
.nav { height: 72px; display: flex; align-items: center; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font: 600 1.6rem/1 var(--display); letter-spacing: -0.01em; }
.brand img { width: 42px; height: 42px; }

/* Hero asimétrico: texto a la izquierda, el bicho grande sobre un panel ciruela */
.hero { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(24px, 5vw, 64px); align-items: center; padding-block: clamp(16px, 3vw, 32px) clamp(48px, 8vw, 96px); }
h1 { font: 600 clamp(2.25rem, 4.6vw, 3.6rem)/1.08 var(--display); letter-spacing: -0.015em; text-wrap: balance; }
.lead { margin-top: 20px; max-width: 46ch; color: var(--muted); font-size: 1.15rem; }
.btn {
  display: inline-flex; align-items: center; margin-top: 28px;
  padding: 15px 26px; border-radius: 999px; text-decoration: none; white-space: nowrap;
  font: 600 1rem/1 var(--body); background: var(--btn-bg); color: var(--btn-fg);
  transition: background-color .2s ease, transform .15s ease;
}
.btn:hover { background: var(--btn-hover); }
.btn:active { transform: translateY(1px) scale(0.98); }
a:focus-visible { outline: 3px solid var(--peach); outline-offset: 3px; border-radius: 8px; }
.hero-visual { position: relative; width: 100%; max-width: 440px; margin-left: auto; }
.hero-visual > img { width: 100%; height: auto; filter: drop-shadow(0 28px 36px rgb(82 32 63 / 0.28)); transform-origin: 50% 100%; animation: respira 6s ease-in-out infinite; }
@keyframes respira { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.012, 1.03); } }
/* Las zetas suben desde la cabeza del bichito: dormido, sin prisa */
.z { position: absolute; left: 63%; top: 30%; font: 600 2rem/1 var(--display); color: var(--peach); opacity: 0; pointer-events: none; animation: sube 7.5s ease-in infinite; }
.z:nth-of-type(2) { animation-delay: 2.5s; font-size: 1.5rem; left: 68%; }
.z:nth-of-type(3) { animation-delay: 5s; font-size: 1.15rem; left: 72%; }
@keyframes sube { 0% { opacity: 0; transform: translate(0, 0) scale(0.7); } 12% { opacity: 0.95; } 80% { opacity: 0.55; } 100% { opacity: 0; transform: translate(34px, -150px) scale(1.25) rotate(8deg); } }
.caption { margin-top: 14px; text-align: center; color: var(--muted); font-size: 0.95rem; min-height: 1.6em; }

/* Definición: el logo en una placa clara, con la entrada de diccionario al lado */
.about { display: grid; grid-template-columns: 6fr 5fr; gap: clamp(24px, 5vw, 64px); align-items: center; padding-block: clamp(16px, 4vw, 48px) clamp(48px, 7vw, 88px); }
.plate { width: 100%; height: auto; border-radius: var(--r-card); }
.about .meta { color: var(--muted); }
.about .meta span { margin-left: 4px; }
.about .ex { margin-top: 14px; color: var(--muted); font-style: italic; max-width: 34ch; }
.about .def { margin-top: 14px; max-width: 26ch; font: 500 clamp(1.5rem, 2.8vw, 2.1rem)/1.28 var(--display); text-wrap: balance; }

/* Proyectos */
.group { padding-block: 0 clamp(48px, 7vw, 88px); scroll-margin-top: 24px; }
h2 { font: 600 clamp(1.6rem, 3vw, 2.1rem)/1.15 var(--display); }
.sub { margin-top: 6px; color: var(--muted); }
.head { margin-bottom: 28px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tags li { font: 500 0.8rem/1 var(--body); padding: 6px 10px; border-radius: 999px; background: var(--soft); color: var(--fg); }
h3 { font: 600 clamp(1.4rem, 2.4vw, 1.8rem)/1.15 var(--display); }
.proj p { color: var(--muted); }
.links { display: flex; flex-wrap: wrap; gap: 8px; }
.links a, .more {
  font: 600 0.92rem/1 var(--body); text-decoration: none; padding: 11px 16px; border-radius: 999px;
  border: 1.5px solid currentColor; transition: background-color .2s ease, color .2s ease;
}
.links a:first-child { background: var(--btn-bg); color: var(--btn-fg); border-color: var(--btn-bg); }
.links a:hover { background: var(--btn-hover); color: var(--btn-fg); border-color: var(--btn-hover); }

/* A. Destacado (Pompón) + lista con miniaturas */
.feature { display: grid; grid-template-columns: 5fr 6fr; background: var(--soft); border-radius: var(--r-card); overflow: hidden; }
.feature .txt { padding: clamp(24px, 4vw, 48px); display: flex; flex-direction: column; gap: 14px; justify-content: center; }
.feature .links { margin-top: 8px; }
.phone { position: relative; min-height: 360px; overflow: hidden; }
.phone img { position: absolute; left: 50%; top: 9%; width: min(270px, 62%); transform: translateX(-50%) rotate(-3deg); border-radius: 26px; box-shadow: var(--shadow); transition: transform .5s cubic-bezier(.16, 1, .3, 1); }
.feature:hover .phone img { transform: translateX(-50%) rotate(-1deg) translateY(-6px); }
.rows { margin-top: 12px; }
.row { display: grid; grid-template-columns: 168px 1fr auto; gap: 20px; align-items: center; padding-block: 22px; }
.row + .row { border-top: 1px solid var(--line); }
.row img { width: 168px; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-radius: var(--r-img); border: 1px solid var(--line); }
.row .proj { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.more { white-space: nowrap; }
.more:hover { background: var(--btn-bg); color: var(--btn-fg); border-color: var(--btn-bg); }

/* B. Bento de tres celdas (juegos) */
.bento { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; gap: 16px; }
.cell { border-radius: var(--r-card); padding: clamp(22px, 3vw, 32px); display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.cell p { max-width: 38ch; }
.cell .links { margin-top: auto; padding-top: 6px; }
.cell.shot { grid-column: 1 / -1; position: relative; min-height: 420px; justify-content: flex-end; color: #FBF9F6; overflow: hidden; isolation: isolate; }
.cell.shot .links { margin-top: 4px; }
.cell.shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; z-index: -2; }
.cell.shot::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgb(40 14 32 / 0.92) 0%, rgb(40 14 32 / 0.55) 45%, rgb(40 14 32 / 0) 75%); }
.cell.shot p { color: #EBD9E3; max-width: 46ch; }
.cell.shot .tags li { background: rgb(251 249 246 / 0.16); color: #FBF9F6; }
.cell.shot .links a:first-child { background: #F9AB90; color: #3A1530; border-color: #F9AB90; }
.cell.dark { background: var(--plum); color: #FBF9F6; }
.cell.dark p { color: #E3CCD9; }
.cell.dark .tags li { background: rgb(251 249 246 / 0.14); color: #FBF9F6; }
.cell.dark .links a:first-child { background: #F9AB90; color: #3A1530; border-color: #F9AB90; }
.cell.warm { background: var(--peach); color: #3A1530; }
.cell.warm p { color: #5B2A47; }
.cell.warm .tags li { background: rgb(58 21 48 / 0.12); color: #3A1530; }
.cell.warm .links a:first-child { background: #3A1530; color: #FBF9F6; border-color: #3A1530; }
.cell.dark .links a:hover, .cell.shot .links a:hover { background: #FBC2AE; color: #3A1530; border-color: #FBC2AE; }
.cell.warm .links a:hover { background: #52203F; color: #FBF9F6; border-color: #52203F; }

/* C. En el horno: lista simple, sin tarjetas */
.cell { transition: transform .35s cubic-bezier(.16, 1, .3, 1); }
.cell:hover { transform: translateY(-4px); }
.row img { transition: transform .35s cubic-bezier(.16, 1, .3, 1); }
.row:hover img { transform: scale(1.04) rotate(-0.6deg); }
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .8s ease, transform .8s cubic-bezier(.16, 1, .3, 1); }
.js .reveal.in { opacity: 1; transform: none; }
.oven .item { display: grid; grid-template-columns: 200px 1fr auto; gap: 20px; align-items: baseline; padding-block: 20px; }
.oven .item + .item { border-top: 1px dashed var(--line); }
.oven .item p { color: var(--muted); max-width: 60ch; }
.oven .soon { color: var(--muted); font-weight: 500; white-space: nowrap; }

/* Pie con el bicho asomando */
footer { margin-top: clamp(24px, 5vw, 56px); background: var(--plum); color: #FBF9F6; }
.peek { display: block; width: 64px; height: 64px; margin: 0 auto 14px; }
.foot { padding-block: 48px 40px; text-align: center; }
.foot .muted { color: #D9C2CF; font-size: 0.95rem; margin-top: 4px; }
.foot .mail { color: #F9AB90; text-decoration: none; font-weight: 600; }
.foot .mail:hover { text-decoration: underline; text-underline-offset: 4px; }
.foot .top { display: inline-block; margin-top: 18px; color: #F9AB90; text-decoration: none; font-weight: 600; }
.foot .top:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Botones del hero */
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.ctas .btn { margin-top: 0; }
.btn.ghost { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1.5px currentColor; }
.btn.ghost:hover { background: var(--soft); }

/* Quién hay detrás */
.me { display: grid; grid-template-columns: 260px 1fr; gap: clamp(24px, 5vw, 56px); align-items: center; padding-block: 0 clamp(48px, 7vw, 88px); }
.me-photo { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 50%; box-shadow: var(--shadow); border: 6px solid var(--surface); }
.me-txt { display: flex; flex-direction: column; gap: 14px; max-width: 62ch; }
.me-txt p { color: var(--muted); }
.me-txt strong { color: var(--fg); font-weight: 600; }
.me-txt .links { margin-top: 6px; }

/* Miniatura de código para proyectos sin captura */
.code-thumb { width: 168px; aspect-ratio: 16 / 10; border-radius: var(--r-img); background: var(--plum); color: #F9AB90; font: 500 0.78rem/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; padding: 14px; display: flex; align-items: center; overflow: hidden; }

/* Página de proyecto (Appetece) */
.back { font: 600 0.95rem/1 var(--body); text-decoration: none; color: var(--muted); margin-left: auto; }
.back:hover { color: var(--fg); }
.eyebrow { font: 600 0.85rem/1 var(--body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.case-hero { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(24px, 5vw, 64px); align-items: center; padding-block: clamp(16px, 3vw, 32px) clamp(48px, 7vw, 88px); }
.case-hero h1 { margin-top: 14px; }
.case-hero .note { margin-top: 18px; padding: 16px 18px; border-radius: 16px; background: var(--soft); color: var(--fg); max-width: 52ch; }
.shots { display: flex; gap: 14px; justify-content: center; }
.shots img { width: min(46%, 220px); height: auto; border-radius: 22px; box-shadow: var(--shadow); }
.shots img:nth-child(2) { transform: translateY(28px); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding-block: 0 clamp(48px, 7vw, 88px); }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 22px; }
.stat b { display: block; font: 600 clamp(1.6rem, 3vw, 2.2rem)/1 var(--display); }
.stat span { display: block; margin-top: 8px; color: var(--muted); font-size: 0.95rem; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 24px; display: flex; flex-direction: column; gap: 8px; }
.feat .ico { font-size: 1.6rem; line-height: 1; }
.feat h3 { font-size: 1.2rem; }
.feat p { color: var(--muted); font-size: 0.98rem; }
.stack { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.stack li { font: 500 0.9rem/1 var(--body); padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); }
.cta-band { background: var(--plum); color: #FBF9F6; border-radius: var(--r-card); padding: clamp(28px, 5vw, 56px); display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; }
.cta-band p { color: #E3CCD9; margin-top: 6px; }
.cta-band .links a:first-child { background: #F9AB90; color: #3A1530; border-color: #F9AB90; }
.cta-band .links a:hover { background: #FBC2AE; color: #3A1530; border-color: #FBC2AE; }

@media (max-width: 860px) {
  .me { grid-template-columns: 1fr; }
  .me-photo { max-width: 200px; }
  .code-thumb { width: 100%; max-width: 360px; }
  .case-hero { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .features { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero-visual img { max-width: 320px; margin: 0 auto; }
  .about { grid-template-columns: 1fr; }
  .feature { grid-template-columns: 1fr; }
  .phone { min-height: 330px; order: -1; }
  .row { grid-template-columns: 1fr; gap: 12px; }
  .row img { width: 100%; max-width: 360px; }
  .bento { grid-template-columns: 1fr; }
  .cell.shot { min-height: 400px; }
  .oven .item { grid-template-columns: 1fr; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-visual > img, .z { animation: none; }
  .z { display: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .cell:hover, .row:hover img, .feature:hover .phone img { transform: none; }
  * { transition: none !important; }
}
