/* Royal Table Cancún, preview redesign
   Colors come from the two logos: Royal navy (#003D4C) and the shared Royal/Harmony pink. */

:root {
  --bg: #fbfcfc;
  --surface: #f0f5f6;
  --surface-harmony: #edf7f5;
  --line: #d9e3e6;
  --ink: #0f2a33;
  --brand: #003d4c;
  --muted: #4b6169;
  --accent: #d81b60;
  --accent-press: #b8154f;
  --on-accent: #fff;

  --radius: 14px;
  --radius-pill: 999px;

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

  --font-display: "Outfit", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;

  --header-h: 72px;
  --shadow: 0 12px 40px -12px rgb(0 61 76 / 0.22);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; color: var(--brand); margin: 0; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.75rem); line-height: 1.1; }
h3 { font-size: 1.25rem; line-height: 1.25; }
p { margin: 0; }

.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: 16px; }
@media (min-width: 768px) { .wrap { padding-inline: 32px; } }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -48px; z-index: 100; background: var(--brand); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: var(--radius-pill);
  font: 600 0.95rem/1 var(--font-body); text-decoration: none; white-space: nowrap;
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, border-color 200ms ease;
}
.btn i { font-size: 1.25em; }
.btn:active { transform: scale(0.97); }
.btn-lg { padding: 15px 26px; font-size: 1.02rem; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-ghost { border-color: var(--line); color: var(--brand); background: transparent; }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: var(--accent-press); }
  .btn-ghost:hover { border-color: var(--brand); }
}

.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--brand); text-decoration: none; border-bottom: 1.5px solid var(--line); padding-bottom: 2px; transition: border-color 200ms ease; }
@media (hover: hover) and (pointer: fine) { .link-arrow:hover { border-color: var(--accent); } }

/* Header */
/* Solid header instead of a backdrop blur: the blur forced a repaint on every scroll frame */
.site-header { position: sticky; top: 0; z-index: 40; background: rgb(251 252 252 / 0.98); transition: box-shadow 200ms ease; }
.site-header.is-scrolled { box-shadow: 0 1px 0 var(--line), 0 8px 24px -16px rgb(0 61 76 / 0.25); }
.scroll-sentinel { position: absolute; top: 0; height: 8px; width: 1px; }
.header-inner { height: var(--header-h); display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; flex-shrink: 0; }
.logo-royal { height: 46px; width: auto; }
.logo-harmony { height: 30px; width: auto; }
.brand-divider { width: 1px; height: 32px; background: var(--line); }
.nav { display: none; gap: 28px; margin-left: auto; }
.nav a { text-decoration: none; font-weight: 500; color: var(--muted); font-size: 0.95rem; transition: color 200ms ease; }
@media (hover: hover) and (pointer: fine) { .nav a:hover { color: var(--brand); } }
.header-cta { display: none; }
.menu-btn { margin-left: auto; display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--radius-pill); border: 1.5px solid var(--line); background: transparent; color: var(--brand); font-size: 1.35rem; cursor: pointer; transition: transform 160ms var(--ease-out); }
.menu-btn:active { transform: scale(0.95); }

.mobile-menu { border-top: 1px solid var(--line); background: var(--bg); transform-origin: top; transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out); }
.mobile-menu nav { display: flex; flex-direction: column; padding-block: 8px 16px; }
.mobile-menu a { padding: 14px 0; font: 600 1.15rem var(--font-display); color: var(--brand); text-decoration: none; }
.mobile-menu a + a { border-top: 1px solid var(--line); }
.mobile-menu.is-closed { opacity: 0; transform: translateY(-8px); }

/* Header while it sits on the hero photo: transparent, white logos and links */
.site-header { transition: box-shadow 200ms ease, background-color 250ms ease; }
.site-header.on-hero:not(.is-scrolled):not(.menu-open) { background: transparent; }
.site-header.on-hero:not(.is-scrolled):not(.menu-open) :is(.logo-royal, .logo-harmony) { filter: brightness(0) invert(1); }
.site-header.on-hero:not(.is-scrolled):not(.menu-open) .brand-divider { background: rgb(255 255 255 / 0.4); }
.site-header.on-hero:not(.is-scrolled):not(.menu-open) .nav a { color: rgb(255 255 255 / 0.88); }
.site-header.on-hero:not(.is-scrolled):not(.menu-open) .menu-btn { color: #fff; border-color: rgb(255 255 255 / 0.5); }
@media (hover: hover) and (pointer: fine) { .site-header.on-hero:not(.is-scrolled):not(.menu-open) .nav a:hover { color: #fff; } }
:is(.logo-royal, .logo-harmony) { transition: filter 250ms ease; }
.nav a { transition: color 250ms ease; }

@media (min-width: 1024px) {
  .nav { display: flex; }
  .header-cta { display: inline-flex; }
  .menu-btn, .mobile-menu { display: none; }
}

/* Hero: full-bleed photo, header sits transparent on top of it */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  margin-top: calc(-1 * var(--header-h));
  min-height: max(620px, 100svh);
  display: flex; color: #fff;
}
.hero-bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 72% 60%; }
.hero-shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgb(0 30 38 / 0.55) 0%, rgb(0 30 38 / 0) 22%),
    linear-gradient(0deg, rgb(0 30 38 / 0.88) 0%, rgb(0 30 38 / 0.55) 45%, rgb(0 30 38 / 0.1) 75%);
}
.hero-inner {
  display: flex; flex-direction: column; justify-content: flex-end; gap: 40px;
  padding-top: calc(var(--header-h) + 48px); padding-bottom: 28px;
}
.hero-eyebrow { font-size: 0.82rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: rgb(255 255 255 / 0.85); }
.hero h1 { margin-top: 14px; color: #fff; font-size: clamp(2.5rem, 5.4vw, 4.6rem); line-height: 1.02; letter-spacing: -0.035em; max-width: 14ch; text-wrap: balance; }
.hero-sub { margin-top: 20px; font-size: 1.12rem; color: rgb(255 255 255 / 0.88); max-width: 44ch; }
.hero-ctas { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }
.btn-light { background: rgb(0 30 38 / 0.28); border-color: rgb(255 255 255 / 0.55); color: #fff; }
@media (hover: hover) and (pointer: fine) { .btn-light:hover { background: rgb(255 255 255 / 0.22); border-color: #fff; } }

.hero-proof {
  list-style: none; margin: 0; padding: 18px 0 0; display: flex; flex-wrap: wrap; gap: 6px 20px;
  border-top: 1px solid rgb(255 255 255 / 0.28); font-size: 0.95rem; color: rgb(255 255 255 / 0.8);
}
.hero-proof strong { color: #fff; font-weight: 600; }

@media (max-width: 767px) {
  .hero h1 { font-size: 2.35rem; }
  .hero-sub { font-size: 1.02rem; margin-top: 14px; }
  .hero-ctas { margin-top: 24px; }
  .hero-proof { font-size: 0.88rem; }
  .hero-proof li:last-child { display: none; }
}
@media (min-width: 768px) {
  .hero-proof { gap: 40px; }
}
@media (min-width: 900px) {
  .hero-bg { object-position: 60% 60%; }
  .hero-shade {
    background:
      linear-gradient(180deg, rgb(0 30 38 / 0.35) 0%, rgb(0 30 38 / 0) 14%),
      linear-gradient(90deg, rgb(0 30 38 / 0.72) 0%, rgb(0 30 38 / 0.42) 36%, rgb(0 30 38 / 0) 62%),
      linear-gradient(0deg, rgb(0 30 38 / 0.5) 0%, rgb(0 30 38 / 0) 26%);
  }
  .hero-inner { justify-content: space-between; padding-top: calc(var(--header-h) + 12vh); padding-bottom: 40px; }
  .hero-copy { margin-block: auto; }
}

/* About */
.about { padding-block: 72px; }
.about-head { max-width: 62ch; }
.about-head p { margin-top: 16px; color: var(--muted); font-size: 1.08rem; }
.stats { margin: 48px 0 0; display: grid; gap: 28px; border-top: 1px solid var(--line); padding-top: 32px; }
.stat { display: flex; flex-direction: column-reverse; gap: 4px; }
.stat dt { color: var(--muted); font-size: 0.95rem; }
.stat dd { margin: 0; font: 600 clamp(2.6rem, 5vw, 3.6rem)/1 var(--font-display); color: var(--brand); letter-spacing: -0.03em; }
.stat dd.stat-text { font-size: 1.35rem; line-height: 1.3; letter-spacing: -0.01em; max-width: 22ch; }
@media (min-width: 768px) { .stats { grid-template-columns: 1fr 1fr 1.4fr; align-items: end; } }

/* Catalog */
.catalog { background: var(--surface); padding-block: 80px; }
.catalog-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; }
.tabs { margin-top: 32px; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; margin-inline: -16px; padding-inline: 16px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs [role="tab"] {
  flex-shrink: 0; padding: 10px 18px; border-radius: var(--radius-pill);
  border: 1.5px solid var(--line); background: var(--bg); color: var(--muted);
  font: 500 0.95rem/1 var(--font-body); cursor: pointer;
  transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease, transform 160ms var(--ease-out);
}
.tabs [role="tab"]:active { transform: scale(0.97); }
.tabs [aria-selected="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
@media (hover: hover) and (pointer: fine) { .tabs [aria-selected="false"]:hover { border-color: var(--brand); color: var(--brand); } }
@media (min-width: 768px) { .tabs { margin-inline: 0; padding-inline: 0; flex-wrap: wrap; } }

.panels { margin-top: 24px; }
.panel { display: grid; gap: 24px; background: var(--bg); border-radius: var(--radius); padding: 12px; }
.panel[hidden] { display: none; }
.panel.is-active { animation: panel-in 220ms var(--ease-out); }
@keyframes panel-in { from { opacity: 0; transform: translateY(6px); } }
.panel-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: calc(var(--radius) - 4px); }
.panel-body { padding: 4px 8px 12px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.panel-body > p { color: var(--muted); max-width: 48ch; }
.panel-body .btn { margin-top: 8px; }
.note { font-size: 0.9rem; color: var(--muted); background: var(--surface); border: 1px dashed #b7c7cc; padding: 6px 10px; border-radius: 8px; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 6px 12px; border-radius: var(--radius-pill); background: var(--surface); color: var(--brand); font-size: 0.9rem; font-weight: 500; }
.placeholder { display: grid; place-content: center; justify-items: center; gap: 10px; background: var(--surface); border: 1.5px dashed #b7c7cc; color: var(--muted); font-weight: 500; }
.placeholder i { font-size: 2.5rem; color: var(--brand); }
@media (min-width: 900px) {
  .panel { grid-template-columns: 1.1fr 1fr; align-items: center; gap: 40px; padding: 16px; }
  .panel-img { aspect-ratio: 5 / 4; }
  .panel-body { padding: 16px 24px 16px 0; }
}

/* Harmony */
.harmony { background: var(--surface-harmony); padding-block: 88px 72px; overflow: hidden; }
.harmony-grid { display: grid; gap: 40px; }
.harmony-logo { width: 210px; height: auto; margin-bottom: 28px; }
.harmony-copy p { margin-top: 16px; color: var(--muted); font-size: 1.08rem; max-width: 46ch; }
.harmony-ctas { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }
.harmony-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px 24px; align-content: center; }
.harmony-list li { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid #cfe5e0; font-weight: 500; color: var(--brand); }
.harmony-list i { font-size: 1.35rem; color: var(--accent); }
@media (min-width: 900px) {
  .harmony-grid { grid-template-columns: 1.1fr 1fr; align-items: center; gap: 64px; }
  .harmony-list { grid-template-columns: 1fr 1fr; }
}
.strip {
  margin-top: 56px; display: flex; gap: 14px; overflow-x: auto; scrollbar-width: none;
  padding-inline: max(16px, calc((100vw - 1240px) / 2 + 32px));
  scroll-snap-type: x mandatory;
  scroll-padding-inline: max(16px, calc((100vw - 1240px) / 2 + 32px));
}
.strip::-webkit-scrollbar { display: none; }
/* Auto-sliding: snapping would fight the continuous movement, so it is off while JS drives it */
/* Auto-sliding runs edge to edge, so the strip starts at the left edge with no gap */
.strip.is-auto { scroll-snap-type: none; padding-inline: 0; }
.strip img { flex: 0 0 auto; width: min(72vw, 300px); aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); scroll-snap-align: start; }

/* Process */
.process { padding-block: 96px 80px; }
.process > h2 { max-width: 20ch; }
.steps { list-style: none; margin: 48px 0 0; padding: 0; display: grid; gap: 36px; counter-reset: step; }
.steps li { position: relative; }
.step-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: var(--radius-pill); background: var(--surface); color: var(--accent); font-size: 1.5rem; margin-bottom: 18px; position: relative; z-index: 1; }
.steps p { margin-top: 8px; color: var(--muted); max-width: 36ch; }
@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 40px; }
  .steps li:not(:last-child)::after { content: ""; position: absolute; top: 26px; left: 64px; right: -28px; height: 1px; background: var(--line); }
}
.clients { margin-top: 64px; padding: 28px; border-radius: var(--radius); background: var(--surface); display: grid; gap: 16px; }
.clients h3 { font-size: 1.05rem; color: var(--muted); font-weight: 500; font-family: var(--font-body); letter-spacing: 0; }
.clients ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px 32px; }
.clients li { font-weight: 600; color: var(--brand); }
@media (min-width: 768px) { .clients ul { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .clients { grid-template-columns: 180px 1fr; align-items: center; } .clients ul { grid-template-columns: repeat(4, 1fr); } }

/* Gallery */
.gallery-section { padding-block: 24px 96px; }
.gallery { margin-top: 36px; display: grid; gap: 10px; grid-template-columns: 1fr 1fr; grid-auto-rows: 160px; }
.g { padding: 0; border: 0; border-radius: var(--radius); overflow: hidden; cursor: zoom-in; background: var(--surface); }
.g img { width: 100%; height: 100%; object-fit: cover; transition: transform 500ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .g:hover img { transform: scale(1.03); } }
.g:active img { transform: scale(0.99); }
.g-a { grid-column: span 2; grid-row: span 2; }
.g-c img { object-position: 50% 85%; }
.g-f { grid-column: span 2; }
@media (min-width: 768px) {
  .gallery { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 210px; gap: 12px; }
  .g-a { grid-column: 1 / 3; grid-row: 1 / 3; }
  .g-b { grid-column: 3; grid-row: 1; }
  .g-c { grid-column: 4; grid-row: 1 / 3; }
  .g-d { grid-column: 3; grid-row: 2; }
  .g-e { grid-column: 1 / 3; grid-row: 3; }
  .g-f { grid-column: 3 / 5; grid-row: 3; }
}

/* Lightbox (modal: stays centered) */
.lightbox { padding: 0; border: 0; background: transparent; max-width: min(92vw, 1100px); max-height: 90dvh; overflow: visible; }
.lightbox img { max-width: 100%; max-height: 90dvh; border-radius: var(--radius); }
.lightbox::backdrop { background: rgb(15 42 51 / 0.72); }
.lightbox[open] { animation: lb-in 220ms var(--ease-out); }
.lightbox[open]::backdrop { animation: fade-in 220ms ease-out; }
.lightbox.is-closing { animation: lb-out 150ms var(--ease-out) forwards; }
.lightbox.is-closing::backdrop { animation: fade-out 150ms ease-out forwards; }
@keyframes lb-in { from { opacity: 0; transform: scale(0.96); } }
@keyframes lb-out { to { opacity: 0; transform: scale(0.98); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
.lightbox-close { position: absolute; top: -52px; right: 0; width: 44px; height: 44px; border-radius: var(--radius-pill); border: 0; background: var(--bg); color: var(--brand); font-size: 1.3rem; display: grid; place-items: center; cursor: pointer; transition: transform 160ms var(--ease-out); }
.lightbox-close:active { transform: scale(0.95); }

/* Contact */
.contact { background: var(--surface); padding-block: 88px; }
.contact-cta { text-align: center; display: grid; justify-items: center; gap: 16px; }
.contact-cta p { color: var(--muted); font-size: 1.08rem; }
.contact-cta .btn { margin-top: 12px; }
.contact-info { margin-top: 64px; padding-top: 40px; border-top: 1px solid var(--line); display: grid; gap: 32px; }
.contact-info h3 { display: flex; align-items: center; gap: 8px; font-size: 1rem; margin-bottom: 10px; }
.contact-info h3 i { color: var(--accent); font-size: 1.2rem; }
.contact-info p { color: var(--muted); }
.contact-info .link-arrow { margin-top: 12px; font-size: 0.95rem; }
.socials { display: flex; gap: 16px; }
.socials a { color: var(--brand); font-weight: 600; }
@media (min-width: 768px) { .contact-info { grid-template-columns: 1.5fr 1fr 1fr 1fr; } }

/* Footer */
.footer { padding-block: 32px; border-top: 1px solid var(--line); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 0.9rem; }
.footer-logo { height: 40px; width: auto; }

/* Mobile WhatsApp bar */
.mobile-bar {
  position: fixed; inset: auto 0 0 0; z-index: 30; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgb(251 252 252 / 0.98);
  border-top: 1px solid var(--line);
  transition: transform 250ms var(--ease-out), opacity 200ms ease;
}
.mobile-bar .btn { width: 100%; }
.mobile-bar.is-hidden { transform: translateY(100%); opacity: 0; pointer-events: none; }
@media (max-width: 1023px) { body { padding-bottom: 84px; } }
@media (min-width: 1024px) { .mobile-bar { display: none; } }

/* Motion: hero entrance (once per visit) and scroll reveals */
.enter { animation: rise 700ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 70ms + 80ms); }
.enter-media { animation: media-in 900ms var(--ease-out) both; animation-delay: 120ms; }
.hero-bg { animation: hero-bg-in 1600ms var(--ease-out) both; }
@keyframes hero-bg-in { from { opacity: 0; transform: scale(1.06); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes media-in { from { opacity: 0; transform: scale(0.98); } }

.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 650ms var(--ease-out), transform 650ms var(--ease-out); transition-delay: calc(var(--i, 0) * 70ms); }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .enter, .enter-media, .hero-bg { animation: fade-in 300ms ease both; }
  .js .reveal { transform: none; transition: opacity 300ms ease; transition-delay: 0ms; }
  .panel.is-active { animation: fade-in 150ms ease; }
  .lightbox[open], .lightbox.is-closing { animation-name: fade-in; }
  .lightbox.is-closing { animation-name: fade-out; }
  .mobile-menu.is-closed { transform: none; }
  .g img, .btn, .tabs [role="tab"] { transition: none; }
  .g:hover img, .btn:active { transform: none; }
}

.contact-link { color: inherit; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: currentColor; word-break: break-word; }
