:root {
  --ink: #111111;
  --ink-2: #3d3d3d;
  --muted: #6e6e6e;
  --cream: #f3f3f1;
  --paper: #ffffff;
  --line: #e2e2e2;
  --gold: #ffc20e;
  --chile: #e0422c;
  --chile-dark: #b8301d;
  --green: #2f6b4f;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .08);
  --serif: "Archivo", "Arial Black", system-ui, sans-serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--cream); line-height: 1.6; }
img { max-width: 100%; display: block; }
a { color: var(--chile); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 6vw, 4rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h3 { font-size: 1.3rem; }
.wrap { width: min(1140px, 100% - 32px); margin-inline: auto; }
.section { padding: 80px 0; }
.section.alt { background: var(--paper); }
.section.dark { background: var(--ink); color: #f5f5f5; }
.section.dark .eyebrow { color: var(--gold); }
.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: .78rem; font-weight: 700; color: var(--chile); margin-bottom: 10px; }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 680px; }
.dark .lead { color: #cfcfcf; }
.center { text-align: center; }
.center .lead { margin-inline: auto; }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 24px; border-radius: 999px; font-weight: 700; text-decoration: none; border: 2px solid transparent; cursor: pointer; font: inherit; font-weight: 700; transition: transform .15s, background .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--chile); color: #fff; }
.btn-primary:hover { background: var(--chile-dark); }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-ghost { border-color: currentColor; color: inherit; background: transparent; }
.btn[disabled] { opacity: .6; cursor: wait; transform: none; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* Encabezado */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .97); backdrop-filter: blur(8px); color: var(--ink); box-shadow: 0 2px 14px rgba(0, 0, 0, .06); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 16px; }
.logo { font-family: var(--serif); font-size: 1.45rem; font-weight: 700; color: var(--ink); text-decoration: none; white-space: nowrap; }

.nav { display: flex; align-items: center; gap: 22px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav a:hover, .nav a.active { color: var(--chile); }
.nav .btn { padding: 10px 18px; color: #fff; }
.menu-btn { display: none; background: none; border: 0; color: var(--ink); font-size: 1.6rem; cursor: pointer; }
@media (max-width: 900px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; top: 76px; left: 0; right: 0; background: #fff; box-shadow: 0 12px 20px rgba(0, 0, 0, .08); flex-direction: column; align-items: stretch; padding: 12px 16px 20px; gap: 6px; }
  .nav.open { display: flex; }
  .nav a { padding: 10px 4px; }
}

/* Portada */
.hero { position: relative; color: #fff; padding: 110px 0 120px; background:
  linear-gradient(110deg, rgba(17,17,17,.94) 0%, rgba(17,17,17,.75) 55%, rgba(224,66,44,.55) 100%),
  url("images/hero.jpg") center/cover, radial-gradient(circle at 80% 20%, #e0422c 0, #5a1a10 45%, #111 80%); }
.hero h1 { max-width: 780px; }
.hero h1 em { color: var(--gold); font-style: italic; }
.hero .lead { color: #eeeeee; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 56px; max-width: 820px; }
.stat b { display: block; font-family: var(--serif); font-size: 2rem; color: var(--gold); }
.stat span { color: #cfcfcf; font-size: .9rem; }
@media (max-width: 640px) { .stats { grid-template-columns: repeat(2, 1fr); } .hero { padding: 72px 0 80px; } }

/* Tarjetas */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--paper); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.dark .card { background: #1d1d1d; box-shadow: none; }
.card .icon { font-size: 2rem; margin-bottom: 8px; }
.card p { color: var(--ink-2); margin: 0; }
.dark .card p { color: #cfcfcf; }
.card a.more { display: inline-block; margin-top: 14px; font-weight: 700; text-decoration: none; }

/* Planes */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; align-items: stretch; margin-top: 40px; }
.plan { background: var(--paper); border-radius: var(--radius); padding: 28px 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; border: 2px solid transparent; }
.plan.featured { border-color: var(--gold); position: relative; }
.plan.featured::before { content: "Más popular"; position: absolute; top: -13px; left: 24px; background: var(--gold); color: var(--ink); font-size: .75rem; font-weight: 800; padding: 3px 12px; border-radius: 99px; }
.plan .for { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 700; }
.plan h3 { margin: 6px 0 10px; }
.price { font-family: var(--serif); font-size: 2.6rem; font-weight: 700; line-height: 1; }
.price small { font-family: var(--sans); font-size: .95rem; color: var(--muted); font-weight: 500; }
.price-note { font-size: .8rem; color: var(--muted); margin: 6px 0 14px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 22px; flex: 1; }
.plan li { padding: 7px 0 7px 28px; position: relative; font-size: .95rem; border-bottom: 1px dashed var(--line); }
.plan li::before { content: "✓"; position: absolute; left: 4px; color: var(--green); font-weight: 800; }
.plan .btn { width: 100%; }

/* Carrusel de restaurantes y productos */
.carousel { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px 2px 18px; scrollbar-width: thin; }
.carousel > * { scroll-snap-align: start; flex: 0 0 min(300px, 82%); }
.sponsor { background: var(--paper); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); text-decoration: none; color: inherit; display: flex; flex-direction: column; }
.sponsor .ph { aspect-ratio: 4/3; background: linear-gradient(135deg, #111, #e0422c); background-size: cover; background-position: center; display: grid; place-items: center; color: #fff; font-family: var(--serif); font-size: 2.6rem; }
.sponsor .body { padding: 16px 18px 20px; }
.sponsor .body p { font-size: .9rem; color: var(--ink-2); margin: 6px 0 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.badge { display: inline-block; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; padding: 3px 10px; border-radius: 99px; background: #fde6e7; color: var(--chile-dark); }
.badge.pro { background: var(--gold); }
.badge.demo { background: #ddd; }
.carousel-nav { display: flex; gap: 8px; justify-content: flex-end; margin-bottom: 10px; }
.carousel-nav button { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); cursor: pointer; font-size: 1.1rem; }

/* Chefs */
.chef { background: var(--paper); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); cursor: pointer; text-align: left; border: 0; padding: 0; font: inherit; color: inherit; }
.chef .ph { aspect-ratio: 1; background: linear-gradient(135deg, #e0422c, #111); background-size: cover; background-position: center; display: grid; place-items: center; color: #fff; font-family: var(--serif); font-size: 3rem; }
.chef .body { padding: 14px 16px 18px; }
.chef .body small { color: var(--muted); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0; }
.filters input, .filters select { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); font: inherit; background: var(--paper); min-width: 200px; flex: 1; }

/* Ventana del perfil */
dialog { border: 0; border-radius: var(--radius); padding: 0; width: min(720px, 100% - 32px); max-height: 90vh; box-shadow: 0 30px 80px rgba(0,0,0,.35); }
dialog::backdrop { background: rgba(17, 17, 17, .7); }
.dlg-body { padding: 24px; }
.dlg-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; }
.dlg-photos img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.dlg-close { position: sticky; top: 0; float: right; margin: 10px; background: var(--paper); border: 0; border-radius: 50%; width: 38px; height: 38px; font-size: 1.2rem; cursor: pointer; box-shadow: var(--shadow); }
.socials { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.socials a { font-weight: 700; text-decoration: none; }

/* Formularios */
.form-card { background: var(--paper); border-radius: var(--radius); padding: clamp(20px, 4vw, 40px); box-shadow: var(--shadow); }
.tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 28px; }
.tab { border: 2px solid var(--line); background: var(--paper); border-radius: 14px; padding: 14px 10px; cursor: pointer; font: inherit; text-align: center; }
.tab b { display: block; font-size: .95rem; }
.tab span { font-size: .85rem; color: var(--muted); }
.tab.active { border-color: var(--chile); background: #fde6e7; }
@media (max-width: 720px) { .tabs { grid-template-columns: repeat(2, 1fr); } }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.fields .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .fields { grid-template-columns: 1fr; } }
label { display: block; font-weight: 600; font-size: .92rem; }
label small { font-weight: 400; color: var(--muted); }
input, select, textarea { width: 100%; margin-top: 6px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; font: inherit; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
textarea { min-height: 140px; resize: vertical; }
.invalid { border-color: var(--chile) !important; background: #fdf1f0; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { width: auto; margin-top: 5px; }
.hp { position: absolute; left: -9999px; }
.drop { border: 2px dashed var(--line); border-radius: 14px; padding: 22px; text-align: center; cursor: pointer; background: #fff; }
.drop:hover, .drop.over { border-color: var(--gold); background: #fff7e8; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-top: 12px; }
.thumbs div { position: relative; }
.thumbs img { aspect-ratio: 1; object-fit: cover; border-radius: 10px; width: 100%; }
.thumbs button { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; cursor: pointer; }
.summary { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.summary .price { font-size: 2rem; }
.error { background: #fdf1f0; color: var(--chile-dark); border-radius: 12px; padding: 12px 16px; margin-top: 16px; font-weight: 600; }
.note { background: #fff7e8; border-radius: 12px; padding: 14px 16px; font-size: .92rem; }

/* Clases y revista */
.class-item { display: grid; grid-template-columns: 90px 1fr; gap: 18px; align-items: center; background: var(--paper); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.date-box { background: var(--chile); color: #fff; border-radius: 14px; text-align: center; padding: 10px 6px; }
.date-box b { display: block; font-family: var(--serif); font-size: 2rem; line-height: 1; }
.date-box span { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; }
.mag-cover { background: linear-gradient(135deg, #111, #5a1a10); color: #fff; border-radius: var(--radius); padding: clamp(28px, 6vw, 64px); }
.mag-cover h1 em { color: var(--gold); }
.article { background: var(--paper); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.article img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.article .body { padding: 22px 24px 26px; }
.article .body p { white-space: pre-line; color: var(--ink-2); }
.ad { border: 2px solid var(--gold); }
.ad-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }

/* Pie */
.site-footer { background: var(--ink); color: #bdbdbd; padding: 56px 0 30px; font-size: .92rem; }
.site-footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; }
.site-footer a { color: #eeeeee; text-decoration: none; display: block; padding: 3px 0; }
.site-footer a:hover { color: var(--gold); }
.site-footer h4 { color: #fff; margin: 0 0 10px; }
.site-footer .legal { border-top: 1px solid #2b2b2b; margin-top: 36px; padding-top: 18px; font-size: .82rem; }
@media (max-width: 720px) { .site-footer .cols { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.media-box { border-radius: var(--radius); aspect-ratio: 4/3; background: linear-gradient(135deg, #e0422c, #111); display: grid; place-items: center; color: #fff; font-family: var(--serif); font-size: 1.6rem; text-align: center; padding: 20px; background-size: cover; background-position: center; }
.demo-banner { background: #fff3cd; color: #6b4e00; text-align: center; font-size: .85rem; padding: 8px 16px; }
.empty { color: var(--muted); text-align: center; padding: 30px; }

/* Estilo de la marca (Instagram @chefs.latinos): rojo, negro y blanco, letra gruesa */
h1, h2, h3, .price, .stat b, .date-box b { font-weight: 900; letter-spacing: -.01em; }
h1 { text-transform: uppercase; line-height: 1.02; }
.hero h1 em, .mag-cover h1 em { font-style: normal; color: var(--gold); }
.logo { display: inline-flex; align-items: center; gap: 10px; text-transform: uppercase; font-weight: 900; letter-spacing: -.01em; }
.logo img { height: 54px; width: auto; }
.site-footer .logo img { height: 64px; }
.logo span { color: var(--chile); }
.site-header { border-bottom: 3px solid var(--chile); }
.section.dark { background: #111; }
/* Logo a color en el encabezado blanco; en el pie oscuro, en blanco */
.site-footer .logo { color: #fff; }
.site-footer .logo img { filter: brightness(0) invert(1); }
@media (max-width: 480px) { .logo img { height: 40px; } }

/* Director */
.founder { grid-template-columns: .8fr 1.2fr; }
.founder-photo { position: relative; max-width: 380px; margin-inline: auto; width: 100%; }
.founder-photo::before { content: ""; position: absolute; inset: 18px -18px -18px 18px; background: var(--chile); border-radius: var(--radius); }
.founder-photo img { position: relative; width: 100%; aspect-ratio: 318/415; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.founder-role { color: var(--chile); font-weight: 700; margin: -6px 0 16px; }
.founder-quote { margin: 26px 0 0; padding: 18px 22px; border-left: 5px solid var(--chile); background: var(--cream); border-radius: 0 14px 14px 0; font-family: var(--serif); font-weight: 800; font-size: 1.35rem; line-height: 1.3; }
.founder-quote cite { display: block; margin-top: 8px; font-family: var(--sans); font-style: italic; font-weight: 500; font-size: .95rem; color: var(--muted); }
@media (max-width: 860px) { .founder { grid-template-columns: 1fr; } .founder-photo { max-width: 300px; margin-bottom: 18px; } }

/* Fotos de la comunidad */
.photo-card { padding: 0; overflow: hidden; }
.media-img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }

/* Mapa de chefs */
.chef-map { height: 420px; border-radius: var(--radius); box-shadow: var(--shadow); margin-top: 28px; z-index: 0; }
@media (max-width: 640px) { .chef-map { height: 320px; } }
.map-pin span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--chile); color: #fff; font-weight: 800; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.map-tip ul, .leaflet-popup-content ul { margin: 4px 0 0; padding-left: 16px; }
.map-tip { font-family: var(--sans); }
.map-list { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.map-list button { background: none; border: 0; padding: 2px 0; text-align: left; color: var(--chile); font: 600 .9rem var(--sans); cursor: pointer; }
.photo-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.photo-card h3, .photo-card p, .photo-card .more { margin-inline: 22px; }
.photo-card h3 { margin-top: 18px; }
.photo-card .more { margin-bottom: 22px; }
.photo-card p:last-child { margin-bottom: 22px; }
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 210px; grid-auto-flow: dense; gap: 10px; margin-top: 32px; }
.gallery img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.gallery img:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.gallery img:nth-child(4) { grid-row: span 2; }
@media (max-width: 720px) { .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; } }
