/* ============================================================
   joel.cafe — sistema de diseño
   Paleta: crema papel · espresso · terracota
   Tipografía: Fraunces (display) · Inter (texto)
   ============================================================ */

:root {
  --paper: #FAF4E8;
  --paper-2: #F2E9D8;
  --card: #FFFDF7;
  --ink: #221A15;
  --ink-2: #55463A;
  --accent: #C0521F;
  --accent-soft: #EAD0B8;
  --coffee: #3A2A1E;
  --crema: #C99B6A;
  --line: rgba(34, 26, 21, .12);
  --shadow: 0 24px 60px -24px rgba(34, 26, 21, .22);
  --radius: 26px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* grano sutil sobre toda la página */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

.container {
  width: min(1180px, calc(100% - 3rem));
  margin-inline: auto;
}
.container--narrow { width: min(880px, calc(100% - 3rem)); }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.08; letter-spacing: -.015em; }
h1 { font-size: clamp(2.7rem, 6vw, 4.4rem); }
h2 { font-size: clamp(2.1rem, 4.4vw, 3.2rem); }
h1 em, h2 em { font-style: italic; font-weight: 500; color: var(--accent); }

.eyebrow {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.1rem;
}
.eyebrow--light { color: var(--crema); }

.section { padding: clamp(5rem, 10vw, 8.5rem) 0; }
.section--alt { background: var(--paper-2); }
.section--dark { background: var(--ink); color: var(--paper); }
.section--dark .eyebrow { color: var(--crema); }

.section__head { max-width: 720px; margin-bottom: clamp(3rem, 6vw, 4.5rem); }
.section__sub { margin-top: 1.2rem; font-size: 1.15rem; color: var(--ink-2); }

/* ---------- botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  color: var(--paper);
  background: var(--ink);
  border: 1.5px solid var(--ink);
  padding: .95rem 1.9rem;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  transition: transform .25s cubic-bezier(.2,.8,.3,1), background .25s, color .25s, box-shadow .25s;
}
.btn:hover { background: var(--accent); border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 14px 30px -12px rgba(192, 82, 31, .5); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong, rgba(34,26,21,.28)); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); box-shadow: none; }
.btn--sm { padding: .68rem 1.35rem; font-size: .92rem; }
.btn--lg { padding: 1.15rem 2.5rem; font-size: 1.12rem; }

/* ---------- nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background .3s, box-shadow .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(250, 244, 232, .86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.nav__inner { display: flex; align-items: center; gap: 2rem; padding: .9rem 0; }

.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; }
.brand__mark { width: 42px; height: 42px; flex: none; }
.brand__word {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: -.02em;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
}
.brand__dot {
  width: .34em; height: .34em;
  border-radius: 50%;
  background: var(--accent);
  margin: 0 .06em;
  transform: translateY(.06em);
}
.brand--light .brand__word { color: var(--paper); }

.nav__links { display: flex; gap: 1.8rem; margin-left: auto; }
.nav__links a {
  text-decoration: none;
  font-weight: 500;
  font-size: .95rem;
  color: var(--ink-2);
  transition: color .2s;
}
.nav__links a:hover { color: var(--accent); }
.nav__cta { flex: none; }

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: .5rem;
  cursor: pointer;
  margin-left: auto;
}
.nav__toggle span {
  width: 24px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero { padding: clamp(8.5rem, 14vw, 11rem) 0 clamp(4rem, 8vw, 6rem); }
.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}
.hero__sub { margin-top: 1.4rem; font-size: 1.18rem; color: var(--ink-2); max-width: 34rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2.2rem; }

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.6rem, 4vw, 3rem);
  margin-top: 3rem;
  padding-top: 1.8rem;
  border-top: 1px solid var(--line);
}
.hero__stats dt { font-family: var(--font-display); font-size: 1.55rem; font-weight: 600; color: var(--ink); }
.hero__stats dd { font-size: .88rem; color: var(--ink-2); }

.hero__art { position: relative; }
.hero__art > img {
  width: 100%;
  border-radius: 48% 52% 55% 45% / 55% 48% 52% 45%;
  mix-blend-mode: multiply;
}

.chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--card);
  color: var(--ink);
  font-size: .85rem;
  font-weight: 600;
  padding: .65rem 1.1rem;
  border-radius: 999px;
  box-shadow: 0 14px 34px -14px rgba(34, 26, 21, .35);
  animation: float 6s ease-in-out infinite;
}
.chip svg { width: 17px; height: 17px; color: var(--accent); }
.chip--a { top: 9%; right: -4%; }
.chip--b { bottom: 8%; left: -5%; animation-delay: -3s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ---------- marquee ---------- */
.marquee {
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
  padding: 1.1rem 0;
  transform: rotate(-1.1deg) scale(1.02);
}
.marquee__track { display: flex; width: max-content; animation: marquee 30s linear infinite; }
.marquee__track span {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-style: italic;
  white-space: nowrap;
  padding-right: 1rem;
}
.marquee__track i { font-style: normal; color: var(--accent); margin: 0 .9rem; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- sobre joel ---------- */
.about__grid {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: clamp(2.5rem, 7vw, 6rem);
  align-items: center;
}
.about__art { position: relative; display: grid; place-items: center; }
.about__blob {
  position: absolute;
  width: 78%;
  aspect-ratio: 1;
  background: var(--accent-soft);
  border-radius: 58% 42% 45% 55% / 50% 55% 45% 50%;
}
.about__blob::after {
  content: "";
  position: absolute;
  inset: 12% -8% -8% 12%;
  border: 2px dashed rgba(192, 82, 31, .45);
  border-radius: 50%;
}
.about__art img { position: relative; width: min(360px, 82%); filter: drop-shadow(0 24px 30px rgba(34,26,21,.22)); }

.about__copy p + p { margin-top: 1.1rem; }
.about__copy p { color: var(--ink-2); font-size: 1.1rem; }
.about__copy strong { color: var(--ink); }
.about__sign {
  margin-top: 2rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--ink);
}
.about__sign span { display: block; font-family: var(--font-body); font-style: normal; font-size: .85rem; color: var(--ink-2); margin-top: .2rem; }

.ticks { list-style: none; margin-top: 1.8rem; display: grid; gap: .8rem; }
.ticks li {
  position: relative;
  padding-left: 2.1rem;
  font-weight: 500;
  color: var(--ink);
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 0; top: .18em;
  width: 1.35rem; height: 1.35rem;
  border-radius: 50%;
  background: var(--accent);
  -webkit-mask: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 6 9 17l-5-5' fill='none' stroke='%23FAF4E8' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: .8rem;
  background-repeat: no-repeat;
  background-position: center;
}
.ticks--sm li { font-size: .95rem; font-weight: 500; }
.ticks--sm { gap: .6rem; margin-top: 1.3rem; }

/* ---------- proceso ---------- */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
  counter-reset: step;
}
.step {
  position: relative;
  background: var(--card);
  border-radius: var(--radius);
  padding: 2.4rem 2rem 2.2rem;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .3s cubic-bezier(.2,.8,.3,1);
}
.step:hover { transform: translateY(-6px); }
.step__num {
  font-family: var(--font-display);
  font-size: 4.6rem;
  font-weight: 600;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--accent);
  display: block;
  margin-bottom: 1.2rem;
}
.step h3 { font-size: 1.45rem; margin-bottom: .7rem; }
.step p { color: var(--ink-2); font-size: .98rem; }

/* ---------- tecnología cafeina.ai ---------- */
.tech__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 7vw, 6rem);
  align-items: center;
}
.tech__copy p { color: var(--ink-2); font-size: 1.1rem; margin-top: 1.2rem; }
.tech__copy .btn { margin-top: 2rem; }
.tech__link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1.5px solid rgba(192, 82, 31, .35);
  transition: border-color .2s;
}
.tech__link:hover { border-color: var(--accent); }

.tech__features { list-style: none; display: grid; gap: 1rem; }
.tech__features li {
  background: var(--card);
  border-radius: 20px;
  padding: 1.4rem 1.6rem;
  box-shadow: var(--shadow);
  display: grid;
  gap: .25rem;
  position: relative;
  padding-left: 3.6rem;
  transition: transform .3s cubic-bezier(.2,.8,.3,1);
}
.tech__features li:hover { transform: translateX(6px); }
.tech__features li::before {
  content: "";
  position: absolute;
  left: 1.4rem;
  top: 1.55rem;
  width: .9rem;
  height: .9rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft);
}
.tech__features strong { font-family: var(--font-display); font-size: 1.12rem; }
.tech__features span { color: var(--ink-2); font-size: .95rem; }

/* ---------- qué sí / qué no ---------- */
.cando {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.8rem;
}
.cando__card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 2.4rem 2.2rem;
  box-shadow: var(--shadow);
}
.cando__card h3 { font-size: 1.5rem; margin-bottom: 1.4rem; }
.cando__list { list-style: none; display: grid; gap: .85rem; }
.cando__list li { position: relative; padding-left: 2rem; font-weight: 500; }
.cando__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .2em;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background-repeat: no-repeat;
  background-position: center;
  background-size: .72rem;
}
.cando__list--yes li::before {
  background-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 6 9 17l-5-5' fill='none' stroke='%23FAF4E8' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.cando__list--no li { color: var(--ink-2); }
.cando__list--no li::before {
  background-color: rgba(34, 26, 21, .14);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 6l12 12M18 6 6 18' fill='none' stroke='%23221A15' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E");
}
.cando__note {
  margin-top: 1.5rem;
  padding-top: 1.2rem;
  border-top: 1px dashed var(--line);
  font-size: .92rem;
  color: var(--ink-2);
}

/* ---------- guía ---------- */
.guide {
  margin-top: 1.8rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
  padding: 2rem 2.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  box-shadow: var(--shadow);
}
.guide h3 { font-size: 1.35rem; margin-bottom: .4rem; }
.guide p { color: rgba(250, 244, 232, .75); font-size: .98rem; max-width: 34rem; }
.guide p strong { color: var(--paper); }
.guide .btn { background: var(--accent); border-color: var(--accent); flex: none; }
.guide .btn:hover { background: #D6601F; }

/* ---------- caso de éxito ---------- */
.case__grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(3rem, 7vw, 6rem);
  align-items: center;
}
.section--dark h2 em { color: var(--crema); }
.case__copy > p { color: rgba(250, 244, 232, .78); margin-top: 1.3rem; font-size: 1.08rem; }
.case__copy strong { color: var(--paper); }

.case__quote {
  margin-top: 2.4rem;
  padding: 1.8rem 2rem;
  border-left: 3px solid var(--accent);
  background: rgba(250, 244, 232, .06);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.case__quote p { font-family: var(--font-display); font-style: italic; font-size: 1.3rem; line-height: 1.45; }
.case__quote footer { margin-top: 1rem; font-size: .9rem; color: var(--crema); font-weight: 600; }
.case__quote footer span { font-weight: 400; color: rgba(250, 244, 232, .6); }

.case__photos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: auto auto;
  gap: 1.2rem;
  align-items: end;
}
.ph { border-radius: 999px 999px 22px 22px; overflow: hidden; box-shadow: 0 30px 60px -20px rgba(0,0,0,.55); }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.ph--a { grid-row: span 2; align-self: stretch; }
.ph--a img { height: 100%; }
.ph--b { border-radius: 22px; }
.ph--c { border-radius: 22px; }

/* ---------- regalos ---------- */
.gifts { display: grid; grid-template-columns: 1fr 1fr; gap: 1.8rem; }
.gift {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform .3s cubic-bezier(.2,.8,.3,1);
}
.gift:hover { transform: translateY(-6px); }
.gift__art { background: var(--paper); }
.gift__art img { width: 100%; mix-blend-mode: multiply; }
.gift__body { padding: 2.2rem 2.2rem 2.4rem; display: flex; flex-direction: column; flex: 1; }
.gift__tag {
  display: inline-block;
  align-self: flex-start;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: .35rem .85rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}
.gift h3 { font-size: 1.8rem; margin-bottom: .8rem; }
.gift__body > p { color: var(--ink-2); }

.gift__qr {
  display: flex;
  gap: 1.4rem;
  align-items: center;
  margin-top: auto;
  padding-top: 1.8rem;
}
.gift__qr img {
  width: 128px;
  height: 128px;
  flex: none;
  border-radius: 16px;
  border: 1px solid var(--line);
  padding: 8px;
  background: var(--paper);
}
.gift__qr .btn { margin-top: .6rem; }
.gift__scan { font-size: .85rem; font-weight: 600; color: var(--ink-2); }
.gift__more {
  display: inline-block;
  margin-top: .7rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1.5px solid transparent;
  transition: border-color .2s;
}
.gift__more:hover { border-color: var(--accent); }

/* ---------- faq ---------- */
.faq { display: grid; gap: .9rem; }
.faq__item {
  background: var(--card);
  border-radius: 18px;
  border: 1px solid var(--line);
  overflow: hidden;
}
.faq__item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem 1.6rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  transition: color .2s;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:hover { color: var(--accent); }
.faq__icon { position: relative; width: 22px; height: 22px; flex: none; }
.faq__icon::before, .faq__icon::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  background: var(--accent);
  border-radius: 2px;
  transition: transform .3s;
}
.faq__icon::before { width: 14px; height: 2.4px; }
.faq__icon::after { width: 2.4px; height: 14px; }
.faq__item[open] .faq__icon::after { transform: rotate(90deg); }
.faq__body { padding: 0 1.6rem 1.5rem; color: var(--ink-2); }
.faq__body strong { color: var(--ink); }

/* ---------- contacto ---------- */
.contact { text-align: center; }
.contact__inner p { max-width: 34rem; margin: 1.4rem auto 0; color: var(--ink-2); font-size: 1.15rem; }
.contact .btn--lg { margin-top: 2.4rem; }
.contact__note { margin-top: 1.6rem !important; font-size: .9rem !important; letter-spacing: .08em; text-transform: uppercase; }

/* ---------- footer ---------- */
.footer { background: var(--ink); color: var(--paper); padding: 4rem 0 3rem; }
.footer__inner { display: grid; gap: 2rem; justify-items: center; text-align: center; }
.footer__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.6rem; }
.footer__links a { color: rgba(250, 244, 232, .72); text-decoration: none; font-size: .95rem; font-weight: 500; transition: color .2s; }
.footer__links a:hover { color: var(--crema); }
.footer__line { color: rgba(250, 244, 232, .5); font-size: .85rem; }
.footer__line a { color: var(--crema); text-decoration: none; border-bottom: 1px solid rgba(201, 155, 106, .4); transition: border-color .2s; }
.footer__line a:hover { border-color: var(--crema); }

/* ---------- animaciones de aparición ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .8s cubic-bezier(.2,.65,.3,1), transform .8s cubic-bezier(.2,.65,.3,1);
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
.reveal[data-delay="4"] { transition-delay: .32s; }
.reveal[data-delay="5"] { transition-delay: .4s; }
.reveal[data-delay="6"] { transition-delay: .48s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .marquee__track { animation: none; }
  .chip { animation: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero__grid, .about__grid, .case__grid, .tech__grid { grid-template-columns: 1fr; }
  .hero__art { max-width: 560px; margin: 0 auto; }
  .about__art { order: -1; }
  .case__photos { max-width: 560px; margin: 0 auto; }
  .steps { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; }
  .gifts { grid-template-columns: 1fr; max-width: 620px; margin-inline: auto; }
  .cando { grid-template-columns: 1fr; max-width: 620px; margin-inline: auto; }
  .tech__features { max-width: 620px; }
}

@media (max-width: 760px) {
  .nav__links {
    position: fixed;
    inset: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    background: var(--paper);
    transform: translateY(-100%);
    transition: transform .4s cubic-bezier(.2,.8,.3,1);
    z-index: -1;
  }
  .nav__links.is-open { transform: translateY(0); z-index: 99; }
  .nav__links a { font-size: 1.4rem; font-family: var(--font-display); }
  .nav__cta { display: none; }
  .nav__toggle { display: flex; }
  .hero { padding-top: 7rem; }
  .hero__stats { gap: 1.4rem; }
  .chip--a { right: 2%; }
  .chip--b { left: 2%; }
  .marquee__track span { font-size: 1.05rem; }
  .gift__qr { flex-direction: column; align-items: flex-start; }
  .gift__qr > div { display: grid; justify-items: start; }
}
