/* ============================================================
   MAREJADA — Cocina Costera
   Editorial minimalist system · vanilla CSS
   ============================================================ */

:root {
  --ocean:      #0E4D45;   /* primary */
  --ocean-deep: #093730;
  --bone:       #F7F5F0;   /* canvas */
  --bone-soft:  #FBFAF7;
  --white:      #FFFFFF;
  --coral:      #D9603B;   /* single accent */
  --coral-soft: #F3E4DA;
  --ink:        #1C1B19;
  --muted:      #6B675F;
  --line:       rgba(28,27,25,0.10);
  --line-soft:  rgba(28,27,25,0.06);
  --wa:         #1FA855;

  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans:  'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-io:  cubic-bezier(0.77, 0, 0.175, 1);

  --wrap: 1180px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  background: var(--bone);
  color: var(--ink);
  line-height: 1.6;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
em { font-style: italic; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.section { padding: clamp(64px, 11vw, 132px) 0; }

/* ---------- ambient + grain ---------- */
.ambient {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60vw 60vw at 82% -8%, rgba(217,96,59,0.05), transparent 60%),
    radial-gradient(55vw 55vw at 5% 18%, rgba(14,77,69,0.05), transparent 62%);
}
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
main, .nav, .foot { position: relative; z-index: 2; }

/* ---------- typography helpers ---------- */
.eyebrow {
  font-size: 0.78rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ocean); display: inline-flex; align-items: center; gap: 9px;
}
.eyebrow__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--coral); display: inline-block; }
.stars { color: var(--coral); letter-spacing: 1px; }

.section__head { max-width: 640px; margin-bottom: clamp(40px, 6vw, 64px); }
.section__title {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2rem, 4.6vw, 3.3rem); line-height: 1.05; letter-spacing: -0.02em;
  margin-top: 16px;
}
.section__lead { color: var(--muted); font-size: 1.08rem; margin-top: 18px; max-width: 52ch; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--sans); font-weight: 500; font-size: 0.96rem;
  padding: 13px 22px; border-radius: 8px; cursor: pointer; border: 1px solid transparent;
  transition: transform 160ms var(--ease-out), background 200ms ease, color 200ms ease, box-shadow 200ms ease;
  will-change: transform;
}
.btn:active { transform: scale(0.97); }
.btn--lg { padding: 15px 26px; font-size: 1rem; }
.btn--xl { padding: 18px 34px; font-size: 1.08rem; }
.btn--wa { background: var(--ocean); color: #fff; }
.btn--wa:hover { background: var(--ocean-deep); box-shadow: 0 10px 26px -12px rgba(14,77,69,0.6); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); background: rgba(28,27,25,0.03); }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: saturate(140%) blur(12px);
  background: rgba(247,245,240,0.72);
  border-bottom: 1px solid transparent;
  transition: border-color 300ms ease, background 300ms ease;
}
.nav.is-scrolled { border-color: var(--line-soft); background: rgba(247,245,240,0.9); }
.nav__inner {
  max-width: var(--wrap); margin: 0 auto; padding: 15px 24px;
  display: flex; align-items: center; gap: 20px;
}
.wordmark {
  font-family: var(--serif); font-weight: 600; font-size: 1.34rem; letter-spacing: -0.02em;
  display: inline-flex; align-items: center; gap: 10px; margin-right: auto;
}
.wordmark__mark {
  width: 18px; height: 18px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--coral), var(--ocean) 78%);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.35);
  flex: none;
}
.nav__links { display: flex; gap: 30px; }
.nav__links a {
  font-size: 0.96rem; color: var(--ink); position: relative; padding: 4px 0; opacity: 0.82;
  transition: opacity 200ms ease;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 1.5px; width: 0; background: var(--coral);
  transition: width 240ms var(--ease-out);
}
.nav__links a:hover { opacity: 1; }
.nav__links a:hover::after { width: 100%; }
.nav__cta { margin-left: 8px; }
.nav__burger { display: none; background: none; border: 0; cursor: pointer; width: 40px; height: 40px; position: relative; }
.nav__burger span {
  position: absolute; left: 9px; right: 9px; height: 2px; background: var(--ink); border-radius: 2px;
  transition: transform 260ms var(--ease-out), opacity 200ms ease;
}
.nav__burger span:nth-child(1) { top: 15px; }
.nav__burger span:nth-child(2) { top: 23px; }
.nav__burger.is-open span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

.nav__mobile {
  display: none; flex-direction: column; gap: 4px; padding: 8px 24px 22px;
  border-bottom: 1px solid var(--line-soft); background: rgba(247,245,240,0.97);
}
.nav__mobile a { padding: 12px 0; font-size: 1.06rem; border-bottom: 1px solid var(--line-soft); }
.nav__mobile a:last-child { border-bottom: 0; margin-top: 10px; }
.nav__mobile.is-open { display: flex; }

/* ---------- hero ---------- */
.hero { padding: clamp(48px, 8vw, 92px) 0 clamp(24px, 4vw, 40px); }
.hero__grid {
  max-width: var(--wrap); margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 5vw, 64px); align-items: center;
}
.hero__title {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2.7rem, 6.6vw, 5rem); line-height: 0.98; letter-spacing: -0.03em;
  margin: 20px 0 0;
}
.hero__title em { color: var(--ocean); }
.hero__sub { color: var(--muted); font-size: 1.15rem; margin-top: 22px; max-width: 46ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero__meta {
  display: flex; align-items: center; gap: 18px; margin-top: 30px;
  font-size: 0.95rem; color: var(--muted);
}
.hero__meta strong { color: var(--ink); }
.hero__meta-div { width: 1px; height: 16px; background: var(--line); }

/* hero visual panel */
.hero__visual { position: relative; }
.hero__panel {
  position: relative; aspect-ratio: 4/5; border-radius: 20px; overflow: hidden;
  background:
    radial-gradient(120% 80% at 70% 15%, #14675c 0%, var(--ocean) 45%, var(--ocean-deep) 100%);
  box-shadow: 0 30px 60px -30px rgba(9,55,48,0.55);
  border: 1px solid rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: center;
}
.hero__panel-word {
  font-family: var(--serif); font-weight: 600; font-size: clamp(2.4rem, 6vw, 4rem);
  color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,0.28); letter-spacing: -0.02em;
  transform: rotate(-4deg);
}
.hero__tag {
  position: absolute; left: 20px; bottom: 22px; z-index: 3;
  background: rgba(255,255,255,0.94); border-radius: 12px; padding: 13px 16px;
  display: grid; gap: 2px; box-shadow: 0 14px 30px -14px rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
}
.hero__tag-label { font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--coral); font-weight: 600; }
.hero__tag-name { font-family: var(--serif); font-weight: 600; font-size: 1.06rem; color: var(--ink); }
.hero__tag-price { font-size: 0.9rem; color: var(--muted); }
.hero__waves { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 42%; fill: rgba(255,255,255,0.07); }

/* ---------- marquee ---------- */
.marquee {
  border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft);
  overflow: hidden; padding: 16px 0; background: var(--bone-soft);
}
.marquee__track {
  display: inline-flex; align-items: center; gap: 26px; white-space: nowrap;
  animation: marquee 30s linear infinite; will-change: transform;
}
.marquee__track span { font-family: var(--serif); font-style: italic; font-size: 1.24rem; color: var(--ink); }
.marquee__dot { color: var(--coral); font-style: normal !important; font-size: 0.8rem !important; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- menú ---------- */
.menu__cols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 80px); }
.menu__cat { margin-bottom: 48px; }
.menu__cat:last-child { margin-bottom: 0; }
.menu__cat-title {
  font-family: var(--serif); font-weight: 600; font-size: 1.5rem; letter-spacing: -0.01em;
  padding-bottom: 12px; margin-bottom: 20px; border-bottom: 1px solid var(--line);
  display: flex; align-items: baseline; gap: 8px;
}
.menu__cat-note { font-family: var(--sans); font-style: normal; font-size: 0.82rem; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.menu__list { list-style: none; display: grid; gap: 20px; }
.menu__item-head { display: flex; align-items: baseline; gap: 8px; }
.menu__name { font-weight: 500; font-size: 1.06rem; color: var(--ink); }
.menu__leader { flex: 1; border-bottom: 1px dotted var(--line); transform: translateY(-3px); }
.menu__price { font-weight: 500; color: var(--ocean); font-variant-numeric: tabular-nums; }
.menu__price::before { content: "$"; opacity: 0.55; font-size: 0.85em; }
.menu__price--mp { font-size: 0.9rem; font-style: italic; font-family: var(--serif); }
.menu__price--mp::before { content: ""; }
.menu__item--feature .menu__price::before,
.menu__price:has(+ *) { }
.menu__desc { color: var(--muted); font-size: 0.95rem; margin-top: 4px; max-width: 46ch; }
.menu__item--feature { padding: 16px; margin: -4px; border-radius: 12px; background: var(--bone-soft); border: 1px solid var(--line-soft); }
/* "MP" (market price) has no $ */
.menu__price { }
.tag {
  display: inline-block; font-size: 0.62rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--coral); background: var(--coral-soft); padding: 2px 8px; border-radius: 999px; margin-left: 6px;
  transform: translateY(-2px);
}
.menu__foot { margin-top: 44px; color: var(--muted); font-size: 0.98rem; }
.menu__foot a { color: var(--ocean); font-weight: 500; }
.menu__foot a:hover { color: var(--coral); }

/* market price fix — items priced "MP" shouldn't show $ */
.menu__price:not(:empty) { }

/* ---------- historia ---------- */
.historia { background: var(--bone-soft); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.historia__grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.historia__frame {
  position: relative; aspect-ratio: 4/5; border-radius: 18px; overflow: hidden;
  background:
    linear-gradient(150deg, #145247, var(--ocean-deep));
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 26px 50px -28px rgba(9,55,48,0.5);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
}
.historia__est {
  font-family: var(--serif); font-style: italic; font-size: 1.1rem; color: var(--coral);
  background: rgba(255,255,255,0.94); padding: 6px 16px; border-radius: 999px;
}
.historia__frame-word {
  font-family: var(--serif); font-weight: 500; font-size: clamp(1.4rem, 3.5vw, 2rem);
  color: rgba(255,255,255,0.9); letter-spacing: 0.02em;
}
.historia__copy .section__title { margin-bottom: 22px; }
.historia__copy p { color: var(--muted); font-size: 1.06rem; margin-bottom: 16px; max-width: 54ch; }
.historia__signature { font-family: var(--serif); font-style: italic; font-size: 1.2rem; color: var(--ocean); margin-top: 8px; }

/* ---------- por qué ---------- */
.why__row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border-top: 1px solid var(--line);
}
.why__item { padding: 34px 28px 34px 0; border-right: 1px solid var(--line); }
.why__item:nth-child(4) { border-right: 0; padding-right: 0; }
.why__num { font-family: var(--serif); font-style: italic; color: var(--coral); font-size: 1.1rem; }
.why__item h3 { font-family: var(--serif); font-weight: 600; font-size: 1.24rem; margin: 14px 0 8px; }
.why__item p { color: var(--muted); font-size: 0.96rem; }

/* ---------- reseñas ---------- */
.reviews__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.review {
  background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 30px 28px;
  transition: transform 260ms var(--ease-out), box-shadow 260ms ease;
}
.review:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -26px rgba(0,0,0,0.2); }
.review__stars { color: var(--coral); letter-spacing: 2px; margin-bottom: 14px; }
.review p { font-family: var(--serif); font-size: 1.1rem; line-height: 1.5; color: var(--ink); }
.review footer { display: flex; align-items: center; gap: 10px; margin-top: 20px; }
.review__name { font-weight: 500; font-size: 0.95rem; }
.review__src { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); background: var(--bone); padding: 3px 9px; border-radius: 999px; margin-left: auto; }
.reviews__demo-note { text-align: center; margin-top: 26px; font-size: 0.82rem; color: var(--muted); font-style: italic; opacity: 0.75; }

/* ---------- visítanos ---------- */
.visit__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 72px); align-items: center; }
.visit__info .section__title { margin-bottom: 30px; }
.visit__block { padding: 18px 0; border-bottom: 1px solid var(--line-soft); }
.visit__block:first-of-type { border-top: 1px solid var(--line-soft); }
.visit__label { font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ocean); font-weight: 600; }
.visit__block p { margin-top: 6px; color: var(--ink); }
.visit__block a { color: var(--ocean); font-weight: 500; }
.visit__block a:hover { color: var(--coral); }
.visit__closed { color: var(--coral); }
.visit__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.visit__map-frame {
  position: relative; aspect-ratio: 1/1; border-radius: 18px; overflow: hidden;
  background: linear-gradient(160deg, #eef1ec, #e4e9e2);
  border: 1px solid var(--line);
}
.visit__pin-map { width: 100%; height: 100%; }
.visit__sea { fill: rgba(14,77,69,0.10); }
.visit__coast { fill: none; stroke: var(--ocean); stroke-width: 2; stroke-dasharray: 6 7; opacity: 0.5; }
.visit__pin-dot { fill: var(--coral); }
.visit__pin-ring { fill: none; stroke: var(--coral); stroke-width: 2; transform-origin: 180px 180px; animation: ping 2.6s var(--ease-out) infinite; }
@keyframes ping { 0% { transform: scale(0.6); opacity: 0.9; } 70%,100% { transform: scale(1.8); opacity: 0; } }
.visit__map-label {
  position: absolute; left: 16px; bottom: 16px; font-size: 0.84rem; color: var(--ink);
  background: rgba(255,255,255,0.9); padding: 7px 13px; border-radius: 999px; font-weight: 500;
}

/* ---------- final CTA ---------- */
.final { padding: clamp(72px, 11vw, 128px) 0; background: var(--ocean); color: #fff; text-align: center; position: relative; overflow: hidden; }
.final::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(50% 60% at 50% 120%, rgba(217,96,59,0.4), transparent 70%);
}
.final__inner { position: relative; z-index: 2; max-width: 720px; margin: 0 auto; }
.final__title { font-family: var(--serif); font-weight: 500; font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.05; letter-spacing: -0.02em; }
.final__sub { color: rgba(255,255,255,0.8); font-size: 1.12rem; margin: 18px 0 34px; }
.final .btn--wa { background: #fff; color: var(--ocean); }
.final .btn--wa:hover { background: var(--coral); color: #fff; box-shadow: 0 14px 34px -14px rgba(217,96,59,0.7); }

/* ---------- footer ---------- */
.foot { background: var(--ink); color: rgba(255,255,255,0.72); padding: 64px 0 30px; }
.foot__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.wordmark--foot { color: #fff; font-size: 1.5rem; margin-bottom: 14px; }
.foot__brand p { font-size: 0.96rem; line-height: 1.7; }
.foot__label { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.5); display: block; margin-bottom: 12px; }
.foot__col p { font-size: 0.96rem; line-height: 1.7; }
.foot__col a:hover { color: var(--coral); }
.foot__bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 24px; font-size: 0.86rem; color: rgba(255,255,255,0.5); flex-wrap: wrap; }
.foot__credit { color: rgba(255,255,255,0.72); }
.foot__credit:hover { color: var(--coral); }

/* ---------- floating WA button ---------- */
.fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 45;
  width: 56px; height: 56px; border-radius: 50%; background: var(--wa); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 28px -8px rgba(31,168,85,0.6);
  transition: transform 200ms var(--ease-out);
}
.fab::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--wa);
  animation: fabPing 2.4s var(--ease-out) infinite;
}
@keyframes fabPing { 0% { transform: scale(1); opacity: 0.7; } 70%,100% { transform: scale(1.5); opacity: 0; } }
.fab:hover { transform: scale(1.08); }
.fab:active { transform: scale(0.95); }

/* ---------- scroll reveal (progressive enhancement) ---------- */
/* content is visible by default; only hidden-then-revealed when JS is active */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .nav__links, .nav__cta { display: none; }
  .nav__burger { display: block; }
  .hero__grid { grid-template-columns: 1fr; gap: 40px; }
  .hero__visual { max-width: 420px; }
  .hero__panel { aspect-ratio: 16/13; }
  .menu__cols { grid-template-columns: 1fr; gap: 8px; }
  .historia__grid, .visit__grid { grid-template-columns: 1fr; gap: 36px; }
  .historia__visual, .visit__map { max-width: 440px; }
  .why__row { grid-template-columns: 1fr 1fr; }
  .why__item { padding: 28px 24px 28px 0; }
  .why__item:nth-child(2) { border-right: 0; padding-right: 0; }
  .why__item:nth-child(1), .why__item:nth-child(2) { border-bottom: 1px solid var(--line); }
  .reviews__grid { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; }
  .foot__grid { grid-template-columns: 1fr 1fr; }
  .foot__brand { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .wrap, .nav__inner, .hero__grid { padding-left: 20px; padding-right: 20px; }
  .hero__actions .btn { width: 100%; }
  .why__row { grid-template-columns: 1fr; }
  .why__item { border-right: 0; padding: 24px 0; border-bottom: 1px solid var(--line); }
  .why__item:last-child { border-bottom: 0; }
  .foot__grid { grid-template-columns: 1fr; }
  .foot__bottom { flex-direction: column; align-items: flex-start; }
  .fab { right: 16px; bottom: 16px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; }
  .reveal { transition: opacity 300ms ease; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------- touch hover gate ---------- */
@media (hover: none) {
  .review:hover { transform: none; box-shadow: none; }
}
