/* ============================================================
   TORTAS EL REY POTOSINO — "Realeza Potosina"
   Paleta: azul marino · dorado · rojo · crema
   Tipografía: Fraunces (display) + Hanken Grotesk (texto)
   ============================================================ */

:root {
  --navy:        #16243F;
  --navy-deep:   #0F1A30;
  --navy-soft:   #1E3052;
  --gold:        #F9B115;
  --gold-soft:   #F6C453;
  --gold-deep:   #C2860B;
  --red:         #C8102E;
  --red-deep:    #A20D24;
  --cream:       #FBF3E3;
  --cream-2:     #F5E8CF;
  --cream-card:  #FFFDF7;
  --ink:         #1B2438;
  --ink-soft:    #5C6376;
  --white:       #FFFFFF;

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body:    'Hanken Grotesk', system-ui, -apple-system, sans-serif;

  --wrap: 1160px;
  --nav-h: 72px;
  --radius: 18px;
  --radius-sm: 10px;
  --ring: 0 0 0 3px rgba(249, 177, 21, .55);
}

/* ---------- Reset / base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg, iframe { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
section[id] { scroll-margin-top: 84px; }

.wrap { width: min(100% - 2.4rem, var(--wrap)); margin-inline: auto; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--gold); color: var(--navy); padding: 10px 18px;
  border-radius: var(--radius-sm); font-weight: 700; transition: top .2s;
}
.skip-link:focus { top: 12px; }

/* ---------- Tipografía utilitaria ---------- */
.section__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(30px, 4.6vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.section__title--center { text-align: center; }
.section__title .accent { color: var(--red); font-style: italic; }
.section__lead { color: var(--ink-soft); font-size: clamp(16px, 1.6vw, 18px); margin-top: 14px; }
.section__lead.muted, .muted { color: var(--ink-soft); }
.menu .section__lead .muted { color: rgba(251, 243, 227, .55); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body); font-weight: 700;
  font-size: 12.5px; letter-spacing: .18em; text-transform: uppercase;
}
.eyebrow--light { color: var(--gold-soft); }
.eyebrow--ribbon {
  color: #fff; background: var(--red);
  padding: 7px 22px 7px 14px;
  clip-path: polygon(0 0, 100% 0, calc(100% - 9px) 50%, 100% 100%, 0 100%);
  margin-bottom: 18px;
}

/* ---------- Botones ---------- */
.btn {
  --by: 0;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-body); font-weight: 700; font-size: 16px;
  letter-spacing: .01em; line-height: 1;
  padding: 15px 28px; border-radius: 999px;
  border: 2px solid transparent; cursor: pointer;
  transition: transform .25s cubic-bezier(.2,.7,.2,1), box-shadow .25s, background .2s, color .2s;
  transform: translateY(var(--by));
}
.btn i { font-size: 1.25em; }
.btn--sm { padding: 9px 18px; font-size: 14px; }
.btn--lg { padding: 18px 36px; font-size: 18px; }
.btn--gold { background: var(--gold); color: var(--navy); box-shadow: 0 8px 22px -10px rgba(249,177,21,.7); }
.btn--gold:hover { --by: -3px; background: var(--gold-soft); box-shadow: 0 16px 30px -12px rgba(249,177,21,.85); }
.btn--ghost { background: transparent; color: var(--gold); border-color: rgba(249,177,21,.55); }
.btn--ghost:hover { --by: -3px; background: var(--gold); color: var(--navy); border-color: var(--gold); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }

/* ============================================================
   BARRA SUPERIOR
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center;
  transition: background .3s, box-shadow .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(15, 26, 48, .92);
  backdrop-filter: blur(10px);
  border-bottom-color: rgba(249,177,21,.28);
  box-shadow: 0 10px 30px -18px rgba(0,0,0,.8);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; width: min(100% - 2.4rem, var(--wrap)); }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand__img { height: 42px; width: 42px; border-radius: 50%; object-fit: cover; }
.brand__word { font-family: var(--font-display); font-weight: 600; font-size: 19px; color: var(--cream); letter-spacing: .01em; }
.brand__word strong { color: var(--gold); font-weight: 800; }

.nav__links { display: flex; align-items: center; gap: 30px; }
.nav__links > a:not(.btn) {
  color: rgba(251,243,227,.86); font-weight: 600; font-size: 15px; position: relative; padding: 4px 0;
}
.nav__links > a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--gold); transition: width .25s ease;
}
.nav__links > a:not(.btn):hover { color: var(--white); }
.nav__links > a:not(.btn):hover::after { width: 100%; }

.nav__toggle {
  display: none; background: transparent; border: 0; color: var(--cream);
  font-size: 28px; cursor: pointer; line-height: 1;
}

/* ============================================================
   HERO / PORTADA
   ============================================================ */
.hero {
  position: relative; isolation: isolate;
  min-height: min(100svh, 840px);
  margin-top: calc(var(--nav-h) * -1);
  padding: calc(var(--nav-h) + 3rem) 0 4rem;
  display: flex; align-items: center;
  background: linear-gradient(180deg, #16243F 0%, #122039 60%, #0F1A30 100%);
  text-align: center; overflow: hidden;
}
.hero__spot {
  position: absolute; inset: 0; z-index: -3;
  background: radial-gradient(120% 70% at 50% 4%, rgba(249,177,21,.20), rgba(22,36,63,0) 56%);
}
.hero__rays {
  position: absolute; z-index: -4; top: -40%; left: 50%; width: 140vmax; height: 140vmax;
  transform: translateX(-50%);
  background: repeating-conic-gradient(from 0deg, rgba(249,177,21,.07) 0deg 6deg, transparent 6deg 18deg);
  -webkit-mask: radial-gradient(closest-side, #000 0%, transparent 62%);
          mask: radial-gradient(closest-side, #000 0%, transparent 62%);
  animation: spin 70s linear infinite;
}
.hero__grain {
  position: absolute; inset: 0; z-index: -2; opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%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");
}
.hero__frame {
  position: absolute; inset: 18px; z-index: -1; border-radius: 14px;
  border: 1px solid rgba(249,177,21,.20); pointer-events: none;
}
.hero__frame::before, .hero__frame::after {
  content: ""; position: absolute; width: 22px; height: 22px; border: 2px solid var(--gold); opacity: .7;
}
.hero__frame::before { top: -2px; left: -2px; border-right: 0; border-bottom: 0; border-radius: 6px 0 0 0; }
.hero__frame::after  { bottom: -2px; right: -2px; border-left: 0; border-top: 0; border-radius: 0 0 6px 0; }

.hero__inner { display: flex; flex-direction: column; align-items: center; }
.hero__logo { width: clamp(150px, 34vw, 240px); height: auto; border-radius: 50%; margin-bottom: 6px; }
.hero__logo:not(.is-ready) { display: none; }

/* Escudo tipográfico (cuando no hay logo .png) */
.lockup { display: flex; flex-direction: column; align-items: center; }
.lockup__crown { animation: floaty 4.5s ease-in-out infinite; filter: drop-shadow(0 6px 14px rgba(249,177,21,.35)); }
.lockup .eyebrow--light { margin: 14px 0 6px; }
.lockup__word { display: flex; flex-direction: column; align-items: center; font-family: var(--font-display); line-height: .9; }
.lockup__tortas { color: var(--cream); font-style: italic; font-weight: 500; font-size: clamp(24px, 6vw, 40px); }
.lockup__rey { color: var(--gold); font-weight: 900; font-size: clamp(66px, 17vw, 150px); letter-spacing: -.02em; text-shadow: 0 8px 30px rgba(249,177,21,.28); }
.lockup__rey em { color: var(--cream); font-weight: 400; font-style: italic; font-size: .32em; vertical-align: .9em; margin-right: .1em; }
.lockup__ribbon {
  margin-top: 10px; background: var(--red); color: #fff; font-weight: 600;
  font-size: clamp(22px, 5.4vw, 36px); padding: 4px 40px;
  clip-path: polygon(6% 0, 94% 0, 100% 50%, 94% 100%, 6% 100%, 0 50%);
  box-shadow: 0 10px 26px -14px rgba(200,16,46,.9);
}

.hero__tag { color: rgba(251,243,227,.82); font-size: clamp(16px, 2vw, 19px); max-width: 540px; margin: 28px auto 30px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.hero__scroll {
  margin-top: 46px; display: inline-flex; flex-direction: column; align-items: center; gap: 4px;
  color: rgba(251,243,227,.6); font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600;
}
.hero__scroll i { font-size: 22px; animation: bob 1.8s ease-in-out infinite; }

/* ============================================================
   SOBRE NOSOTROS
   ============================================================ */
.about { background: var(--cream); padding: clamp(64px, 9vw, 120px) 0; }
.about__inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.about__text p { margin-top: 18px; color: var(--ink-soft); font-size: clamp(16px, 1.6vw, 18px); }
.about__text p strong { color: var(--ink); }
.about__features { display: flex; flex-direction: column; gap: 14px; }
.about__features li {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--cream-card); border: 1px solid rgba(27,36,56,.08);
  border-left: 4px solid var(--gold); border-radius: var(--radius-sm);
  padding: 18px 20px; transition: transform .25s, box-shadow .25s;
}
.about__features li:hover { transform: translateX(4px); box-shadow: 0 16px 30px -20px rgba(27,36,56,.4); }
.about__features i { color: var(--red); font-size: 26px; margin-top: 2px; }
.about__features h3 { font-family: var(--font-display); font-size: 19px; font-weight: 700; color: var(--ink); }
.about__features p { margin: 2px 0 0; color: var(--ink-soft); font-size: 14.5px; }

/* ============================================================
   ESPECIALIDADES (sección oscura, cartas claras)
   ============================================================ */
.menu { position: relative; background: var(--navy); padding: clamp(64px, 9vw, 120px) 0; }
.menu .section__title { color: var(--cream); }
.menu .section__head { margin-bottom: clamp(34px, 5vw, 56px); text-align: center; display: flex; flex-direction: column; align-items: center; }
.menu .section__lead { color: rgba(251,243,227,.7); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--cream-card); border: 1px solid rgba(249,177,21,.22);
  border-radius: var(--radius); overflow: hidden;
  transition: transform .3s cubic-bezier(.2,.7,.2,1), box-shadow .3s, border-color .3s;
}
.card:hover { transform: translateY(-7px); border-color: var(--gold); box-shadow: 0 28px 46px -26px rgba(0,0,0,.7); }
.card__media {
  height: 132px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1E3052, #16243F); color: var(--gold); font-size: 52px;
  border-bottom: 3px solid var(--gold);
}
.card--star .card__media { background: linear-gradient(135deg, #C8102E, #8E0B20); color: var(--gold-soft); }
.card__body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.card__tag {
  align-self: flex-start; background: var(--red); color: #fff; font-size: 11.5px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; padding: 4px 12px; border-radius: 999px; margin-bottom: 10px;
}
.card__name { font-family: var(--font-display); font-size: 24px; font-weight: 700; color: var(--ink); }
.card__desc { color: var(--ink-soft); font-size: 15px; margin: 8px 0 18px; flex: 1; }
.card__price {
  align-self: flex-start; font-family: var(--font-display); font-weight: 800; font-size: 22px;
  color: var(--navy); background: var(--gold); padding: 4px 16px; border-radius: 999px;
}

/* Galería / tira de fotos */
.gallery {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(190px, 1fr);
  gap: 16px; margin-top: 30px; overflow-x: auto; padding-bottom: 10px;
  scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--gold) transparent;
}
.gallery__item {
  scroll-snap-align: start; aspect-ratio: 4 / 3; border-radius: var(--radius-sm);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background: rgba(255,255,255,.04); border: 1.5px dashed rgba(249,177,21,.4); color: rgba(251,243,227,.55);
}
.gallery__item i { font-size: 30px; }
.gallery__item span { font-size: 13px; letter-spacing: .04em; }
.gallery::-webkit-scrollbar { height: 8px; }
.gallery::-webkit-scrollbar-thumb { background: rgba(249,177,21,.5); border-radius: 99px; }
.menu__extra { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 26px; color: rgba(251,243,227,.82); font-size: 15px; }
.menu__extra i { color: var(--gold); font-size: 18px; }
.menu__extra strong { color: var(--gold-soft); font-weight: 700; }

/* ============================================================
   UBICACIÓN Y HORARIO
   ============================================================ */
.location { background: var(--cream); padding: clamp(64px, 9vw, 120px) 0; }
.location__inner { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(28px, 4vw, 56px); align-items: stretch; }
.placard {
  background: var(--cream-card); border: 1px solid rgba(27,36,56,.1);
  border-radius: var(--radius); padding: clamp(28px, 4vw, 44px);
  box-shadow: 0 30px 60px -45px rgba(27,36,56,.6);
}
.placard .section__title { margin-bottom: 26px; }
.placard__row { display: flex; gap: 16px; padding: 18px 0; border-top: 1px solid rgba(27,36,56,.1); }
.placard__row:first-of-type { border-top: 0; }
.placard__row > i {
  flex: none; width: 44px; height: 44px; display: grid; place-items: center;
  background: var(--navy); color: var(--gold); border-radius: 12px; font-size: 22px;
}
.placard__row h3 { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.placard__row p { color: var(--ink-soft); }
.placard__row a { color: var(--red); font-weight: 600; }
.placard__row a:hover { text-decoration: underline; }
.hours { display: flex; flex-direction: column; gap: 6px; }
.hours li { display: flex; justify-content: space-between; gap: 18px; color: var(--ink-soft); font-size: 15px; }
.hours li span:last-child { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.stall { display: inline-block; margin-top: 10px; background: var(--navy); color: var(--gold); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 5px 14px; border-radius: 999px; }

.map {
  border-radius: var(--radius); overflow: hidden; min-height: 360px;
  border: 3px solid var(--navy); box-shadow: 0 30px 60px -40px rgba(27,36,56,.7);
}
.map iframe { width: 100%; height: 100%; min-height: 360px; border: 0; filter: saturate(.92); }

/* ============================================================
   CONTACTO Y REDES
   ============================================================ */
.contact { position: relative; isolation: isolate; background: var(--red); color: #fff; text-align: center; padding: clamp(64px, 9vw, 116px) 0; overflow: hidden; }
.contact__grain {
  position: absolute; inset: 0; z-index: -1; opacity: .08; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%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");
}
.contact__inner { display: flex; flex-direction: column; align-items: center; }
.contact__crown { margin-bottom: 18px; filter: drop-shadow(0 6px 14px rgba(0,0,0,.3)); }
.contact__title { font-family: var(--font-display); font-weight: 800; font-size: clamp(28px, 4.6vw, 50px); line-height: 1.08; }
.contact__lead { color: rgba(255,255,255,.85); font-size: clamp(16px, 1.8vw, 19px); margin: 16px 0 30px; max-width: 480px; }
.contact .btn--gold { box-shadow: 0 14px 34px -14px rgba(0,0,0,.5); }
.socials { display: flex; gap: 14px; margin-top: 34px; }
.socials a {
  width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%;
  background: rgba(255,255,255,.12); color: #fff; font-size: 24px;
  border: 1.5px solid rgba(255,255,255,.25); transition: transform .25s, background .25s, color .25s;
}
.socials a:hover { transform: translateY(-4px); background: var(--gold); color: var(--navy); border-color: var(--gold); }

/* ============================================================
   PIE DE PÁGINA
   ============================================================ */
.footer { background: var(--navy-deep); color: rgba(251,243,227,.7); padding: 54px 0 40px; text-align: center; border-top: 1px solid rgba(249,177,21,.2); }
.footer__inner { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.footer__brand { font-size: 26px; color: var(--cream); }
.footer__brand strong { color: var(--gold); }
.footer__brand em { color: var(--red); font-style: italic; font-weight: 500; }
.footer__tag { font-style: italic; color: var(--gold-soft); }
.footer__legal { font-size: 13.5px; margin-top: 10px; }

/* ============================================================
   BOTÓN FLOTANTE WHATSAPP
   ============================================================ */
.fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 60px; height: 60px; border-radius: 50%;
  display: grid; place-items: center; font-size: 32px;
  background: var(--gold); color: var(--navy);
  box-shadow: 0 14px 30px -10px rgba(249,177,21,.7);
  transition: transform .25s;
}
.fab::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(249,177,21,.55); animation: ring 2.4s ease-out infinite;
}
.fab:hover { transform: scale(1.08); }

/* ============================================================
   ANIMACIONES
   ============================================================ */
@keyframes riseIn { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes bob    { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
@keyframes spin   { to { transform: translateX(-50%) rotate(360deg); } }
@keyframes ring   { 0% { box-shadow: 0 0 0 0 rgba(249,177,21,.55); } 70%, 100% { box-shadow: 0 0 0 18px rgba(249,177,21,0); } }

.hero [data-anim] { opacity: 0; animation: riseIn .9s cubic-bezier(.2,.7,.2,1) forwards; }
.hero .lockup    { animation-delay: .10s; }
.hero__tag       { animation-delay: .40s; }
.hero__cta       { animation-delay: .60s; }
.hero__scroll    { animation-delay: .85s; }

[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
[data-reveal].is-visible { opacity: 1; transform: none; }
.cards .card:nth-child(2) { transition-delay: .06s; }
.cards .card:nth-child(3) { transition-delay: .12s; }
.cards .card:nth-child(4) { transition-delay: .06s; }
.cards .card:nth-child(5) { transition-delay: .12s; }
.cards .card:nth-child(6) { transition-delay: .18s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .about__inner { grid-template-columns: 1fr; }
  .location__inner { grid-template-columns: 1fr; }
  .map { min-height: 320px; }
}

@media (max-width: 820px) {
  .nav__toggle { display: inline-flex; }
  .nav__links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--navy-deep); border-top: 1px solid rgba(249,177,21,.25);
    padding: 8px 22px 22px;
    transform: translateY(-14px); opacity: 0; pointer-events: none;
    transition: transform .25s ease, opacity .25s ease;
  }
  body.menu-open .nav__links { transform: none; opacity: 1; pointer-events: auto; }
  .nav__links > a:not(.btn) { padding: 15px 0; border-bottom: 1px solid rgba(255,255,255,.07); }
  .nav__links > a:not(.btn)::after { display: none; }
  .nav__links .btn { margin-top: 14px; }
  .nav.is-scrolled, body.menu-open .nav { background: rgba(15,26,48,.96); }
}

@media (max-width: 520px) {
  .hero { min-height: auto; padding-bottom: 3rem; }
  .btn { width: 100%; }
  .hero__cta { width: 100%; max-width: 320px; }
  .socials a { width: 48px; height: 48px; font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  [data-reveal], .hero [data-anim] { opacity: 1 !important; transform: none !important; }
}
