/* Fuentes alojadas en la propia web (sin peticiones a Google → sin datos de visitantes a terceros) */
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/fraunces-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/fraunces-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 500; font-display: swap; src: url("../fonts/fraunces-latin-500-italic.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/nunito-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/nunito-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 800; font-display: swap; src: url("../fonts/nunito-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Caveat"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/caveat-latin-600-normal.woff2") format("woff2"); }

:root {
  --cream: #fbf5ec;
  --paper: #fffdf9;
  --cacao: #3b2418;
  --cacao-soft: #6e5243;
  --pink: #e9577f;
  --pink-soft: #fde3ea;
  --lemon: #f6d55c;
  --mint: #d7efe3;
  --line: #ecdfcf;
  --radius: 20px;
  --shadow: 0 10px 30px -12px rgba(59, 36, 24, .25);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Nunito", system-ui, sans-serif;
  --hand: "Caveat", cursive;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--cacao); font: 17px/1.65 var(--sans); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.15; margin: 0 0 .5em; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--cacao-soft); }
.small { font-size: .85rem; }
.section { padding: 64px 20px; }
.kicker { font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; color: var(--pink); margin: 0 0 12px; }
.kicker a { text-decoration: none; margin-right: 10px; }
.scribble { font-family: var(--hand); color: var(--pink); font-size: 1.6rem; font-weight: 600; }
.lead { font-size: 1.15rem; color: var(--cacao-soft); max-width: 60ch; }
.btn { display: inline-block; background: var(--cacao); color: var(--cream); padding: 14px 26px; border-radius: 999px; font-weight: 800; text-decoration: none; transition: transform .15s, background .15s; }
.btn:hover { background: var(--pink); transform: translateY(-2px) rotate(-1deg); }
.btn-ghost { background: none; border: 1.5px solid var(--line); border-radius: 999px; padding: 6px 14px; font: 600 .85rem var(--sans); color: var(--cacao); cursor: pointer; }
.btn-ghost:hover { border-color: var(--cacao); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(251, 245, 236, .9); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font: 700 1.35rem var(--serif); }
.brand img { border-radius: 50%; border: 2px solid var(--pink); object-fit: cover; }
.brand i, .footer-brand i { font-family: var(--hand); color: var(--pink); font-style: normal; font-size: 1.3em; }
.nav { display: flex; align-items: center; gap: 22px; font-weight: 700; }
.nav > a { text-decoration: none; }
.nav > a:hover { color: var(--pink); }
.lang { display: flex; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.lang a { text-decoration: none; padding: 3px 10px; border-radius: 999px; font-size: .8rem; }
.lang a[aria-current] { background: var(--cacao); color: var(--cream); }

/* Hero */
.hero { padding: 56px 0 24px; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 700; letter-spacing: -.02em; }
.hero h1 em { color: var(--pink); font-style: italic; font-weight: 500; }
.hero .lead { margin-bottom: 28px; }
.hero-img { margin: 0; position: relative; }
.hero-img img { border-radius: 46% 54% 48% 52% / 52% 44% 56% 48%; box-shadow: var(--shadow); border: 8px solid var(--paper); transform: rotate(2deg); }
.hero-img::before { content: ""; position: absolute; inset: -18px -10px auto auto; width: 90px; height: 90px; background: var(--lemon); border-radius: 50%; z-index: -1; }
.hero-img figcaption { position: absolute; bottom: 6%; left: -6%; transform: rotate(-8deg); background: var(--paper); padding: 2px 16px; border-radius: 12px; box-shadow: var(--shadow); }

/* Grid & cards */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.section-head h2, .more h2 { font-size: 2rem; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 32px; }
.chip { text-decoration: none; padding: 8px 16px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); font-weight: 700; font-size: .92rem; }
.chip:hover { border-color: var(--cacao); }
.chip.is-active { background: var(--pink); border-color: var(--pink); color: #fff; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 28px; }
.card { background: var(--paper); border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 0 var(--line); transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-6px) rotate(-.4deg); box-shadow: var(--shadow); }
.card-link { text-decoration: none; display: block; height: 100%; }
.card-img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .card-img img { transform: scale(1.05); }
.badge { position: absolute; left: 12px; bottom: 12px; background: var(--mint); color: #1f5a40; font-weight: 800; font-size: .75rem; padding: 4px 10px; border-radius: 999px; }
.card-body { padding: 18px 20px 22px; }
.card-body h3 { font-size: 1.25rem; margin-bottom: .3em; }
.card-body p { margin: 0 0 10px; color: var(--cacao-soft); font-size: .95rem; }
.card-body .meta { font-size: .82rem; font-weight: 700; margin: 0; }

/* Recipe */
.recipe-hero { background: var(--paper); border-bottom: 1px solid var(--line); padding: 48px 0; }
.recipe-hero-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.recipe-hero h1 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); letter-spacing: -.02em; }
.tagline { font: italic 500 1.3rem var(--serif); color: var(--cacao-soft); margin: 0 0 28px; }
.recipe-photo { margin: 0; }
.recipe-photo img { border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; transform: rotate(1.2deg); }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 0; }
.facts div { background: var(--cream); border-radius: 14px; padding: 12px 14px; }
.facts dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 800; color: var(--cacao-soft); }
.facts dd { margin: 0; font: 700 1.25rem var(--serif); }
.facts .hl, .nutri-grid .hl { background: var(--mint); }
.recipe-intro { padding-top: 40px; max-width: 760px; font-size: 1.1rem; }
.prose p { margin: 0 0 1em; }
.recipe-body { display: grid; grid-template-columns: 340px 1fr; gap: 56px; padding-top: 24px; padding-bottom: 32px; align-items: start; }
.ingredients .sticky { position: sticky; top: 94px; background: var(--paper); border-radius: var(--radius); padding: 26px; border: 1px solid var(--line); }
.ingredients-head { display: flex; align-items: center; justify-content: space-between; }
.ingredients h2 { font-size: 1.6rem; margin: 0; }
.ingredients h3 { font: 800 .8rem var(--sans); text-transform: uppercase; letter-spacing: .07em; color: var(--pink); margin: 18px 0 6px; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { border-bottom: 1px dashed var(--line); }
.checklist label { display: flex; gap: 10px; padding: 8px 0; cursor: pointer; font-size: .97rem; line-height: 1.4; }
.checklist input { accent-color: var(--pink); width: 18px; height: 18px; flex: none; margin-top: 1px; }
.checklist input:checked + span { text-decoration: line-through; opacity: .45; }
.method h2 { font-size: 1.9rem; }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0 0 32px; }
.steps li { counter-increment: s; position: relative; padding: 4px 0 22px 64px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 44px; height: 44px; border-radius: 50%; background: var(--pink-soft); color: var(--pink); font: 700 1.3rem/44px var(--serif); text-align: center; }
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 21px; top: 50px; bottom: 4px; border-left: 2px dotted var(--line); }
.tips { background: #fff7d6; border-radius: var(--radius); padding: 22px 26px; margin-bottom: 28px; transform: rotate(-.5deg); }
.tips h3 { font-size: 1.2rem; display: flex; align-items: baseline; gap: 10px; }
.tips ul { margin: 0; padding-left: 20px; }
.tips li { margin-bottom: 6px; }
.nutrition { border-top: 1px solid var(--line); padding-top: 24px; }
.nutrition h3 { font-size: 1.3rem; margin-bottom: 0; }
.nutri-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 12px; }
.nutri-grid div { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 14px; text-align: center; }
.nutri-grid strong { font: 700 1.6rem var(--serif); }
.nutri-grid span { font-size: .85rem; margin-left: 2px; }
.nutri-grid em { display: block; font-style: normal; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--cacao-soft); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

/* About & 404 */
.about { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: start; }
.about-img img { border-radius: var(--radius); box-shadow: var(--shadow); transform: rotate(-2deg); position: sticky; top: 100px; }
.page-title { font-size: clamp(2.2rem, 4vw, 3.2rem); }
.about .prose { font-size: 1.1rem; margin-bottom: 28px; }
.notfound { text-align: center; }
.notfound .lead { margin: 0 auto 28px; }
.big-emoji { font-size: 4rem; margin: 0; }

/* Footer: rosa con borde de papel de magdalena + pósit de contacto */
.site-footer { background: var(--pink-soft); color: var(--cacao); position: relative; margin-top: 88px; }
.site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: -22px; height: 24px;
  background: radial-gradient(circle at 18px 24px, var(--pink-soft) 18px, transparent 19px) 0 0 / 36px 24px repeat-x; }
.footer-main { display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: center; padding-top: 52px; padding-bottom: 40px; }
.footer-brand { font: 700 2.2rem var(--serif); margin: 0 0 6px; }
.footer-made { margin: 0; color: var(--cacao-soft); max-width: 46ch; }
.footer-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.footer-links a { background: var(--paper); border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: .9rem; text-decoration: none; transition: background .15s, color .15s; }
.footer-links a:hover { background: var(--pink); color: #fff; }
.footer-note { background: var(--lemon); width: 370px; padding: 30px 30px 22px; transform: rotate(3deg); box-shadow: 0 18px 30px -16px rgb(59 36 24 / .45); position: relative; }
.footer-note::before { content: ""; position: absolute; top: -12px; left: 50%; width: 90px; height: 24px; transform: translateX(-50%) rotate(-2deg); background: rgb(255 255 255 / .6); }
.footer-note p { margin: 0; font: 600 1.55rem/1.2 var(--hand); }
/* El email entero, sin cortes: si no cabe en la línea, baja completo a la siguiente */
.footer-note a { text-decoration: none; border-bottom: 2px solid var(--pink); white-space: nowrap; display: inline-block; font-size: .88em; line-height: 1.1; }
.footer-note small { display: block; margin-top: 12px; font: 600 1.25rem var(--hand); color: var(--pink); text-align: right; }
.footer-bottom { border-top: 1.5px dashed rgb(233 87 127 / .35); }
.footer-bottom .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; padding-top: 16px; padding-bottom: 20px; font-size: .85rem; color: var(--cacao-soft); }
.footer-bottom p { margin: 0; }
.footer-bottom a { color: inherit; }
.footer-bottom a:hover { color: var(--pink); }

/* Responsive */
@media (max-width: 860px) {
  .hero-inner, .recipe-hero-inner, .recipe-body, .about { grid-template-columns: 1fr; }
  .hero-img { max-width: 340px; margin: 0 auto; }
  .ingredients .sticky { position: static; }
  .facts, .nutri-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
  .nav { gap: 12px; font-size: .9rem; }
  .nav > a:first-child { display: none; }
  .brand { font-size: 1.15rem; gap: 8px; white-space: nowrap; }
  .nav > a { font-size: .85rem; }
  .hero { padding-top: 32px; }
  .about-img img { position: static; max-width: 320px; margin: 0 auto; }
  .footer-main { grid-template-columns: 1fr; gap: 40px; }
  .footer-note { width: auto; max-width: 360px; margin: 0 auto; transform: rotate(2deg); }
}
@media (max-width: 520px) {
  /* No caben logo + enlaces + 3 idiomas: los enlaces siguen en el pie */
  .nav > a { display: none; }
}

@media print {
  .site-header, .site-footer, .more, .btn-ghost, .muted.small, .recipe-photo { display: none; }
  body { background: #fff; font-size: 12pt; }
  .recipe-hero-inner, .recipe-body { grid-template-columns: 1fr; }
}

/* Lockup de DiezCien en el pie (mismo que diezcien.com, Visitastic y Skemio).
   Poppins Bold recortada a los glifos de «DiezCien». */
@font-face {
  font-family: "Poppins DiezCien";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/poppins-diezcien.woff2") format("woff2");
  unicode-range: U+43-44, U+65, U+69, U+6E, U+7A;
}
.madeby { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 13px; color: var(--cacao-soft); text-decoration: none; text-align: left; }
.madeby:hover { color: var(--cacao); }
.madeby img { height: 30px; width: auto; }
.madeby-text { display: flex; flex-direction: column; line-height: 1.05; }
.madeby-wordmark { font: 700 16px "Poppins DiezCien", var(--sans); letter-spacing: -.01em; white-space: nowrap; }
.madeby-wordmark .wm-diez { color: var(--cacao); }
.madeby-wordmark .wm-cien { color: #3bb8ac; }
.madeby-tagline { font-weight: 500; font-size: 9.5px; color: #b07d12; margin-top: 3px; white-space: nowrap; }

/* Páginas legales */
.legal { max-width: 760px; }
.legal h2 { font-size: 1.35rem; margin-top: 1.6em; }
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: .6em; }
.legal .owner { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; }
.legal a { color: inherit; }
.legal .lead { color: var(--cacao); background: var(--mint); border-radius: 14px; padding: 16px 20px; max-width: none; }

/* Enlace secundario de la portada */
.hero-actions { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.link-arrow { font-weight: 800; color: var(--pink); text-decoration: none; border-bottom: 2px solid transparent; }
.link-arrow:hover { border-color: var(--pink); }

/* Desglose de HC netos en la ficha de receta */
.breakdown { margin-top: 16px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 4px 18px; }
.breakdown summary { cursor: pointer; font-weight: 800; padding: 10px 0; color: var(--cacao); }
.breakdown summary::marker { color: var(--pink); }
.breakdown[open] { padding-bottom: 14px; }
.breakdown .whole { margin: 4px 0 12px; font-size: .95rem; }
.breakdown ul { list-style: none; padding: 0; margin: 0 0 12px; }
.breakdown li { display: flex; align-items: baseline; gap: 8px; padding: 3px 0; font-size: .95rem; }
.breakdown .dots { flex: 1; border-bottom: 2px dotted var(--line); }
.breakdown a { color: var(--pink); font-weight: 700; }

/* Guía «Empieza aquí» */
.guide { max-width: 800px; }
.guide-toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 36px; }
.guide-toc a { background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: .88rem; text-decoration: none; }
.guide-toc a:hover { border-color: var(--pink); color: var(--pink); }
.guide h2 { font-size: 1.7rem; margin-top: 1.8em; scroll-margin-top: 90px; }
.guide .lead { color: var(--cacao); font-size: 1.15rem; max-width: none; }
.guide ul { padding-left: 22px; }
.guide li { margin-bottom: .7em; }
.guide .pantry { list-style: none; padding: 0; display: grid; gap: 10px; }
.guide .pantry li { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; margin: 0; }
.guide .formula { font: 700 1.25rem var(--serif); background: var(--mint); border-radius: 14px; padding: 16px 20px; text-align: center; }
.guide .equiv { width: 100%; border-collapse: collapse; background: var(--paper); border-radius: 14px; overflow: hidden; margin: 8px 0 16px; }
.guide .equiv th, .guide .equiv td { padding: 10px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.guide .equiv th { background: var(--pink-soft); font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; }
.guide .note { background: #fff7d6; border-radius: 14px; padding: 14px 18px; font-size: .95rem; margin: 2em 0; }

/* Aviso de borrador en la vista previa */
.draft-banner { background: var(--lemon); color: var(--cacao); text-align: center; font-weight: 800; padding: 10px 16px; font-size: .95rem; }
