/* =========================================================
   Nómada Coffee — estilos
   Proyecto conceptual de portafolio
   ========================================================= */

/* ---------- Variables ---------- */
:root {
  --cream: #F7F1E8;
  --beige: #EADFCF;
  --sand: #D8C6AC;
  --coffee: #6B4A34;
  --coffee-dark: #57391F;
  --espresso: #3A2A20;
  --black: #17110D;
  --text: #2B1F17;
  --text-soft: #5E4B3D;

  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "DM Sans", system-ui, sans-serif;

  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 20px 50px -24px rgba(23, 17, 13, .35);
  --header-h: 76px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--coffee); }
a:hover { color: var(--espresso); }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { margin: 0; line-height: 1.1; }
p { margin: 0 0 1rem; }
button { font: inherit; cursor: pointer; }
svg { stroke: currentColor; stroke-width: 1.7; fill: none; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 3px solid var(--coffee); outline-offset: 3px; border-radius: 4px; }

.container { width: min(1200px, 100% - 3rem); margin-inline: auto; }
.section { padding: clamp(5rem, 10vw, 8.5rem) 0; }
.muted { color: var(--text-soft); }
.small { font-size: .875rem; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  background: var(--espresso); color: var(--cream); padding: .75rem 1.25rem; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 1rem; color: var(--cream); }

/* ---------- Tipografía ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .75rem;
  margin-bottom: 1rem;
  font-size: .8125rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  color: var(--coffee);
}
.eyebrow::before { content: ""; width: 32px; height: 1px; background: currentColor; }
.eyebrow--light { color: var(--sand); }
.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: var(--espresso);
  margin-bottom: 1.5rem;
}
.section-title em { font-style: italic; font-weight: 500; color: var(--coffee); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 3.5rem; }
.section-head .eyebrow::after { content: ""; width: 32px; height: 1px; background: currentColor; }
.section-lead { color: var(--text-soft); font-size: 1.125rem; }
.section-head--light .section-title { color: var(--cream); }
.section-head--light .section-title em { color: var(--sand); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 52px; padding: .9rem 1.75rem;
  border: 1.5px solid transparent; border-radius: 999px;
  font-weight: 600; font-size: 1rem; text-decoration: none;
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 20px; height: 20px; }
.btn--primary { background: var(--espresso); color: var(--cream); }
.btn--primary:hover { background: var(--black); color: var(--cream); }
.btn--outline { border-color: var(--espresso); color: var(--espresso); background: transparent; }
.btn--outline:hover { background: var(--espresso); color: var(--cream); }
.btn--outline-light { border-color: rgba(247, 241, 232, .8); color: var(--cream); }
.btn--outline-light:hover { background: var(--cream); color: var(--espresso); }
.btn--light { background: var(--cream); color: var(--espresso); }
.btn--light:hover { background: var(--beige); color: var(--espresso); }
.btn--whatsapp { background: #1F7A4A; color: #fff; }
.btn--whatsapp:hover { background: #17633B; color: #fff; }
.btn--small { min-height: 44px; padding: .55rem 1.25rem; font-size: .9375rem; }
.btn--block { width: 100%; }

/* ---------- Encabezado ---------- */
.header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  height: var(--header-h);
  transition: background-color .35s var(--ease), box-shadow .35s var(--ease);
}
.header.is-scrolled { background: rgba(58, 42, 32, .96); backdrop-filter: blur(10px); box-shadow: 0 10px 30px -18px rgba(0,0,0,.5); }
.header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

.logo { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--cream); }
.logo:hover { color: var(--cream); }
.logo__icon { width: 34px; height: 34px; fill: var(--beige); stroke: var(--espresso); stroke-width: 2; }
.logo__text { font-family: var(--font-display); font-size: 1.75rem; font-weight: 700; line-height: .9; display: flex; flex-direction: column; }
.logo__text small { font-family: var(--font-body); font-size: .625rem; font-weight: 600; letter-spacing: .38em; text-transform: uppercase; color: var(--sand); margin-top: .2rem; }

.nav__list { display: flex; align-items: center; gap: 2rem; }
.nav__link { color: var(--cream); text-decoration: none; font-size: .9375rem; font-weight: 500; position: relative; padding: .5rem 0; }
.nav__link::after {
  content: ""; position: absolute; left: 0; bottom: .2rem; width: 100%; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .35s var(--ease);
}
.nav__link:hover, .nav__link.is-current { color: var(--cream); }
.nav__link:hover::after, .nav__link.is-current::after { transform: scaleX(1); transform-origin: left; }

.nav-toggle { display: none; width: 48px; height: 48px; border: 0; background: transparent; border-radius: 50%; position: relative; }
.nav-toggle span { position: absolute; left: 13px; width: 22px; height: 2px; background: var(--cream); border-radius: 2px; transition: transform .3s var(--ease), opacity .3s var(--ease); }
.nav-toggle span:nth-child(1) { top: 16px; }
.nav-toggle span:nth-child(2) { top: 23px; }
.nav-toggle span:nth-child(3) { top: 30px; }
.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); }

/* ---------- Inicio ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; color: var(--cream); overflow: hidden; }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); animation: heroZoom 14s var(--ease) forwards; }
.hero__overlay { position: absolute; inset: 0; background: linear-gradient(100deg, rgba(23,17,13,.86) 0%, rgba(23,17,13,.62) 48%, rgba(23,17,13,.25) 100%); }
.hero__content { position: relative; padding: calc(var(--header-h) + 3rem) 0 5rem; }
.hero__title { font-family: var(--font-display); font-weight: 600; font-size: clamp(3.5rem, 9vw, 7.5rem); line-height: .95; margin-bottom: 1.75rem; }
.hero__title em { font-weight: 500; color: var(--sand); }
.hero__text { max-width: 520px; font-size: 1.1875rem; color: rgba(247, 241, 232, .88); margin-bottom: 2.5rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; }
.hero__anim { opacity: 0; transform: translateY(24px); animation: fadeUp 1s var(--ease) forwards; }
.hero__anim:nth-child(2) { animation-delay: .15s; }
.hero__anim:nth-child(3) { animation-delay: .3s; }
.hero__anim:nth-child(4) { animation-delay: .45s; }
.hero__scroll {
  position: absolute; left: 50%; bottom: 2rem; translate: -50% 0;
  width: 48px; height: 48px; display: grid; place-items: center;
  border: 1px solid rgba(247,241,232,.5); border-radius: 50%; color: var(--cream);
  animation: bob 2.4s ease-in-out infinite;
}
.hero__scroll svg { width: 20px; height: 20px; }
.hero__scroll:hover { color: var(--cream); background: rgba(247,241,232,.12); }

@keyframes fadeUp { to { opacity: 1; transform: none; } }
@keyframes heroZoom { to { transform: scale(1); } }
@keyframes bob { 50% { transform: translateY(6px); } }

/* ---------- Nosotros ---------- */
.about__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(3rem, 7vw, 6rem); align-items: center; }
.about__media { position: relative; }
.about__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.about__badge {
  position: absolute; right: -1.5rem; bottom: 2.5rem;
  background: var(--espresso); color: var(--cream);
  padding: 1.25rem 1.5rem; border-radius: var(--radius-sm); box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.about__badge span { font-size: .75rem; letter-spacing: .2em; text-transform: uppercase; color: var(--sand); }
.about__badge strong { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; font-style: italic; }
.about__text > p { color: var(--text-soft); }
.values { display: grid; gap: 1.25rem; margin-top: 2.25rem; padding-top: 2.25rem; border-top: 1px solid var(--sand); }
.value { display: flex; gap: 1rem; align-items: flex-start; }
.value svg { flex: none; width: 44px; height: 44px; padding: 10px; border-radius: 50%; background: var(--beige); color: var(--coffee); }
.value h3 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; color: var(--espresso); margin-bottom: .15rem; }
.value p { margin: 0; color: var(--text-soft); font-size: .975rem; }

/* ---------- Menú ---------- */
.menu { background: var(--beige); }
.tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-bottom: 3rem; }
.tab {
  min-height: 46px; padding: .6rem 1.4rem; border-radius: 999px;
  border: 1.5px solid var(--sand); background: transparent; color: var(--espresso); font-weight: 600;
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.tab:hover { border-color: var(--espresso); }
.tab.is-active { background: var(--espresso); border-color: var(--espresso); color: var(--cream); }
.panel { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.panel[hidden] { display: none; }
.panel.is-active { animation: panelIn .6s var(--ease); }
.panel__img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.menu-list { display: grid; gap: .25rem; }
.menu-item {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1.5rem;
  padding: 1.15rem 0; border-bottom: 1px dashed var(--sand);
}
.menu-item h3 { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; color: var(--espresso); }
.menu-item p { margin: .15rem 0 0; color: var(--text-soft); font-size: .95rem; }
.price { font-weight: 700; color: var(--coffee); white-space: nowrap; font-size: 1.0625rem; }
.menu__note { text-align: center; margin: 2.5rem 0 0; font-size: .875rem; color: var(--text-soft); }
@keyframes panelIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Galería ---------- */
.gallery__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 260px; gap: 1rem; }
.gallery__item--tall { grid-row: span 2; }
.gallery__item--wide { grid-column: span 2; }
.gallery__btn { position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; border-radius: var(--radius); overflow: hidden; background: var(--sand); }
.gallery__btn img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease), filter .5s var(--ease); }
.gallery__btn::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(23,17,13,.25) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F7F1E8' stroke-width='1.7' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-5-5M11 8v6M8 11h6'/%3E%3C/svg%3E") center / 44px no-repeat;
  opacity: 0; transition: opacity .4s var(--ease);
}
.gallery__btn:hover img, .gallery__btn:focus-visible img { transform: scale(1.06); }
.gallery__btn:hover::after, .gallery__btn:focus-visible::after { opacity: 1; }

.lightbox {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 4rem 1.5rem;
  background: rgba(23, 17, 13, .92);
  animation: panelIn .35s var(--ease);
}
.lightbox[hidden] { display: none; }
.lightbox__img { max-width: min(1100px, 100%); max-height: 100%; border-radius: var(--radius-sm); object-fit: contain; }
.lightbox__close {
  position: absolute; top: 1.25rem; right: 1.25rem; width: 48px; height: 48px;
  display: grid; place-items: center; border: 1px solid rgba(247,241,232,.4); border-radius: 50%;
  background: transparent; color: var(--cream);
}
.lightbox__close svg { width: 22px; height: 22px; }
.lightbox__close:hover { background: rgba(247,241,232,.12); }

/* ---------- Experiencia ---------- */
.experience { background: var(--espresso); color: var(--cream); position: relative; overflow: hidden; }
.experience::before {
  content: ""; position: absolute; inset: 0; opacity: .14;
  background: url("https://images.unsplash.com/photo-1743356629215-abb470447e71?auto=format&fit=crop&q=60&w=1600") center / cover;
}
.experience .container { position: relative; }
.exp__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; }
.exp-card {
  padding: 2.25rem 1.75rem; border-radius: var(--radius);
  background: rgba(247, 241, 232, .06); border: 1px solid rgba(216, 198, 172, .22);
  transition: background-color .4s var(--ease), transform .4s var(--ease);
}
.exp-card:hover { background: rgba(247, 241, 232, .1); transform: translateY(-4px); }
.exp-card__num { font-family: var(--font-display); font-size: 2.75rem; font-style: italic; color: var(--sand); line-height: 1; }
.exp-card h3 { font-family: var(--font-display); font-size: 1.75rem; font-weight: 600; margin: 1.25rem 0 .75rem; }
.exp-card p { margin: 0; color: rgba(247, 241, 232, .8); font-size: .975rem; }

/* ---------- Ubicación ---------- */
.location__grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: center; }
.info-list { margin: 0; display: grid; gap: 1.75rem; }
.info-row dt { display: flex; align-items: center; gap: .6rem; font-size: .8125rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--coffee); margin-bottom: .5rem; }
.info-row dt svg { width: 20px; height: 20px; }
.info-row dd { margin: 0; font-size: 1.125rem; color: var(--espresso); }
.hours { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px dashed var(--sand); max-width: 380px; }
.hours span:last-child { font-weight: 600; }
.open-status { display: inline-flex; align-items: center; gap: .5rem; margin-top: 1.75rem; font-weight: 600; color: var(--espresso); }
.open-status::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--status, #9B8B7A); }
.open-status:empty { display: none; }
.map { margin: 0; }
.map svg { width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow); stroke: none; }
.map figcaption { margin-top: .75rem; font-size: .875rem; color: var(--text-soft); text-align: center; }
.map__pulse { transform-origin: center; transform-box: fill-box; animation: pulse 2.6s ease-out infinite; }
@keyframes pulse { 0% { transform: scale(.4); opacity: .5; } 100% { transform: scale(1.4); opacity: 0; } }

/* ---------- Contacto ---------- */
.contact { background: var(--beige); }
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: start; }
.contact__info > p { color: var(--text-soft); }
.contact__buttons { display: flex; flex-wrap: wrap; gap: .75rem; margin: 2rem 0 1rem; }
.form-card { background: var(--cream); padding: clamp(1.75rem, 4vw, 2.75rem); border-radius: var(--radius); box-shadow: var(--shadow); }
.field { display: flex; flex-direction: column; gap: .45rem; margin-bottom: 1.25rem; }
.field label { font-size: .875rem; font-weight: 600; color: var(--espresso); }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1rem; color: var(--text);
  padding: .85rem 1rem; min-height: 50px;
  border: 1.5px solid #B9A58A; border-radius: var(--radius-sm); background: #fff;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--espresso); box-shadow: 0 0 0 3px rgba(107, 74, 52, .2); }
.field.has-error input, .field.has-error textarea { border-color: #A3341F; }
.field__error { font-size: .8125rem; color: #A3341F; min-height: 1em; }
.form-success { text-align: center; padding: 2rem 0; }
.form-success svg { width: 60px; height: 60px; color: var(--coffee); margin: 0 auto 1rem; }
.form-success h3 { font-family: var(--font-display); font-size: 2rem; color: var(--espresso); margin-bottom: .5rem; }
.form-success p { color: var(--text-soft); }

/* ---------- Pie ---------- */
.footer { background: var(--black); color: rgba(247,241,232,.75); padding: 3.5rem 0; font-size: .9375rem; }
.footer__inner { display: grid; gap: 1.25rem; justify-items: center; text-align: center; }
.footer__note { max-width: 560px; margin: 0; }
.footer__credits { margin: 0; color: rgba(247,241,232,.6); }
.footer a:not(.logo) { color: var(--sand); }

/* ---------- Animación al hacer scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(32px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .exp__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 880px) {
  :root { --header-h: 68px; }
  .header { background: rgba(58, 42, 32, .96); }
  .nav-toggle { display: block; z-index: 2; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto; background: var(--espresso);
    padding: 1.5rem 1.5rem 2rem; box-shadow: 0 20px 30px -20px rgba(0,0,0,.6);
    transform: translateY(-12px); opacity: 0; visibility: hidden;
    transition: transform .35s var(--ease), opacity .35s var(--ease), visibility .35s;
  }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav__list { flex-direction: column; align-items: stretch; gap: .25rem; }
  .nav__link { display: block; padding: .9rem 0; font-size: 1.125rem; border-bottom: 1px solid rgba(216,198,172,.18); }
  .nav__link::after { display: none; }
  .nav__list .btn { margin-top: 1rem; }

  .about__grid, .panel, .location__grid, .contact__grid { grid-template-columns: 1fr; }
  .about__badge { right: 1rem; bottom: 1rem; }
  .panel__img { aspect-ratio: 16 / 10; }
  .gallery__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 200px; }
}

@media (max-width: 560px) {
  body { font-size: 1rem; }
  .container { width: min(1200px, 100% - 2.5rem); }
  .hero__actions .btn { flex: 1 1 100%; }
  .exp__grid { grid-template-columns: 1fr; }
  .gallery__grid { grid-template-columns: 1fr; grid-auto-rows: 240px; }
  .gallery__item--tall, .gallery__item--wide { grid-row: auto; grid-column: auto; }
  .menu-item { gap: 1rem; }
  .menu-item h3 { font-size: 1.4rem; }
  .contact__buttons .btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .hero__anim, .js .reveal { opacity: 1; transform: none; }
}
