/* ==========================================================================
   Sunny House · Direction C «Bright grid» (concepto no oficial)
   Palette: white #FFFFFF · sunny orange #F59E2D · charcoal #2E2B27
   Shape rule (locked): tiles/cards 20px · inner controls 12px · buttons/nav pill
   Mobile budget: hero (grid + promise banner) <= 45svh at 390x844 (~380px)
   ========================================================================== */

:root {
  --white: #FFFFFF;
  --orange: #F59E2D;
  --orange-deep: #DE8A12;
  --charcoal: #2E2B27;
  --ink-soft: #5F594F;
  --ink-mute: #6D675F;
  --line: #ECE7DE;
  --tint: #FDF3E2;
  --star-off: #E8E3DB;
  --shadow-soft: 0 4px 18px rgba(46, 43, 39, 0.08);
  --shadow-lift: 0 12px 28px rgba(46, 43, 39, 0.12);
  --radius: 20px;
  --radius-inner: 12px;
  --pill: 999px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

html, body {
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--charcoal);
  font-family: "Space Grotesk", system-ui, -apple-system, sans-serif;
  font-weight: 500;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
figure { margin: 0; }
h1, h2, h3, p { margin: 0; }
address { font-style: normal; }

.container {
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: 16px;
}

section[id] { scroll-margin-top: 72px; }

/* Enlace de salto (accesibilidad) */
.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 60;
  padding: 10px 16px;
  background: var(--charcoal);
  color: var(--white);
  border-radius: var(--pill);
  font-size: 14px;
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip:focus-visible { top: 12px; }

a:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--charcoal);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Nav: píldora flotante
   -------------------------------------------------------------------------- */
.nav-wrap {
  position: fixed;
  top: 10px;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.nav {
  pointer-events: auto;
  width: min(680px, calc(100% - 20px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 8px 7px 16px;
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: var(--pill);
  box-shadow: var(--shadow-soft);
}

.nav-brand {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: var(--charcoal);
  text-decoration: none;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  display: inline-block;
  padding: 6px 9px;
  border-radius: var(--pill);
  font-size: 13.5px;
  color: var(--ink-soft);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-links a:hover { background: var(--tint); color: var(--charcoal); }

/* --------------------------------------------------------------------------
   Hero: rejilla 3-up + tile banner con promesa y CTA
   Móvil (390px): 58 (aire nav) + 108 (fotos) + 8 (gap) + ~176 (banner) ≈ 350px
   -------------------------------------------------------------------------- */
.hero { padding-top: 58px; padding-bottom: 4px; }

.hero-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.tile {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  min-width: 0;
}

.tile-a, .tile-b, .tile-c { height: 108px; }

.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner {
  grid-column: 1 / -1;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 14px 16px;
  box-shadow: var(--shadow-soft);
}

.banner-title {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.banner-promise {
  margin-top: 4px;
  font-size: 15px;
  line-height: 1.4;
  color: var(--ink-soft);
  max-width: 40ch;
}

/* Insignia de calificación: fila de 5 estrellas con llenado fraccionario (4.3/5 = 86%) */
.rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.stars {
  position: relative;
  display: inline-flex;
  line-height: 0;
  flex: none;
}

.stars-base,
.stars-fill {
  display: inline-flex;
  gap: 1px;
  white-space: nowrap;
}

.stars-base { color: var(--star-off); }
.stars-fill {
  position: absolute;
  inset: 0;
  width: 86%;
  overflow: hidden;
  color: var(--orange);
}

.stars svg { width: 16px; height: 16px; flex: none; }

.rating-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--charcoal);
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--pill);
  font-family: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--orange);
  color: var(--charcoal);
  min-height: 44px;
  padding: 11px 22px;
  font-size: 15px;
}

.btn-primary:hover { background: var(--orange-deep); box-shadow: var(--shadow-soft); }

.banner-cta { margin-top: 12px; width: 100%; }

/* --------------------------------------------------------------------------
   Secciones
   -------------------------------------------------------------------------- */
.section { padding-block: 52px 4px; }

.section h2 {
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

/* Pedir adelante: maqueta estática de 3 pasos */
.mock {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-soft);
  padding: 16px;
  display: grid;
  gap: 14px;
}

.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
}

.step-ico {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-inner);
  background: var(--tint);
  color: var(--orange-deep);
  display: grid;
  place-items: center;
  flex: none;
}

.step-ico svg { width: 21px; height: 21px; }

.step-body { min-width: 0; }

.step-body h3 {
  font-size: 15.5px;
  font-weight: 700;
  margin-top: 2px;
}

.pseudoselect {
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-inner);
  background: #FBFAF7;
  padding: 9px 12px;
  font-size: 14px;
  color: var(--ink-mute);
}

.pseudoselect svg { width: 16px; height: 16px; flex: none; }

.mock-note {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border-top: 1px dashed var(--line);
  padding-top: 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-mute);
}

.mock-note svg { width: 17px; height: 17px; flex: none; margin-top: 1px; }

#fin-pedido { height: 1px; }

/* La carta: rejilla de tarjetas */
.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }

.card-media {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.card-featured { grid-column: 1 / -1; }
.card-featured .card-media { aspect-ratio: 16 / 10; }

.card-body { padding: 12px 14px 14px; }

.card-body h3 {
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.card-tag {
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--ink-mute);
}

.card-ig {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
}

.ig-ico {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-inner);
  background: var(--tint);
  color: var(--orange-deep);
  display: grid;
  place-items: center;
  flex: none;
}

.ig-ico svg { width: 19px; height: 19px; }

.ig-text { font-size: 14px; color: var(--ink-soft); flex: 1; }

.ig-link {
  font-weight: 700;
  font-size: 14px;
  color: var(--charcoal);
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}

.ig-link:hover { color: var(--orange-deep); }

.ref-note {
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--ink-mute);
}

/* Ubicaciones */
.loc-grid {
  display: grid;
  gap: 14px;
}

.loc {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.loc h3 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.loc address {
  margin-top: 6px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-mute);
}

.map-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  font-weight: 700;
  font-size: 14px;
  color: var(--charcoal);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.map-link svg { width: 17px; height: 17px; color: var(--orange-deep); }
.map-link:hover { color: var(--orange-deep); }

.loc-notes {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

.note {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--ink-soft);
}

.note svg { width: 19px; height: 19px; flex: none; color: var(--orange-deep); }

/* Footer (única división en carbón, cierre de página) */
.footer {
  margin-top: 56px;
  background: var(--charcoal);
  color: var(--white);
  padding: 44px 0 92px; /* el padding inferior despeja la barra fija de pedido */
}

.footer-grid {
  display: grid;
  gap: 24px;
}

.f-brand { font-weight: 700; font-size: 18px; }

.f-line {
  margin-top: 2px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.72);
}

.f-ig {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-weight: 700;
  font-size: 14px;
  color: var(--orange);
  text-decoration: none;
}

.f-ig svg { width: 18px; height: 18px; }
.f-ig:hover { text-decoration: underline; text-underline-offset: 3px; }

.f-colophon p {
  font-size: 13px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.72);
  max-width: 62ch;
}

.f-colophon a {
  color: var(--orange);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.disclosure {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
}

/* --------------------------------------------------------------------------
   Barra fija de pedido (visible tras pasar la maqueta, vía IntersectionObserver)
   -------------------------------------------------------------------------- */
.bar {
  position: fixed;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translate(-50%, 150%);
  z-index: 50;
  width: min(680px, calc(100% - 20px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 7px 7px 16px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--line);
  border-radius: var(--pill);
  box-shadow: 0 8px 28px rgba(46, 43, 39, 0.18);
  visibility: hidden;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
}

.bar.bar-visible {
  transform: translate(-50%, 0);
  visibility: visible;
}

.bar-brand { font-weight: 700; font-size: 14px; }

.bar-cta { min-height: 40px; padding: 9px 18px; font-size: 14px; flex: none; }

/* --------------------------------------------------------------------------
   Desktop >= 768px
   -------------------------------------------------------------------------- */
@media (min-width: 768px) {
  .container { padding-inline: 24px; }

  .hero { padding-top: 92px; padding-bottom: 12px; }

  .hero-grid {
    grid-template-columns: 1.15fr 1fr 1fr;
    grid-template-rows: 1.15fr 0.9fr;
    gap: 14px;
    height: clamp(520px, 74svh, 680px);
  }

  .tile-a { grid-row: 1 / 3; height: auto; }
  .tile-b { grid-column: 2; grid-row: 1; height: auto; }
  .tile-c { grid-column: 3; grid-row: 1; height: auto; }

  .banner {
    grid-column: 2 / 4;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 28px 32px;
  }

  .banner-title { font-size: 40px; }
  .banner-promise { font-size: 17px; margin-top: 8px; max-width: 46ch; }
  .rating { margin-top: 16px; }
  .stars svg { width: 18px; height: 18px; }
  .rating-label { font-size: 14px; }
  .banner-cta { margin-top: 18px; width: auto; }

  .section { padding-block: 84px 8px; }
  .section h2 { font-size: 34px; margin-bottom: 22px; }

  .mock {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    padding: 24px;
  }

  .cards { grid-template-columns: repeat(4, 1fr); }
  .card-featured { grid-column: 1 / 3; grid-row: 1; }
  .cards figure:nth-child(2) { grid-column: 3; grid-row: 1; }
  .cards figure:nth-child(3) { grid-column: 4; grid-row: 1; }

  .card-media { aspect-ratio: auto; flex: 1; min-height: 0; }
  .card-featured .card-media { aspect-ratio: auto; }
  .card-body { padding: 14px 16px 16px; }
  .card-body h3 { font-size: 16.5px; }

  .card-ig {
    grid-column: 1 / -1;
    flex-direction: row;
    padding: 18px 22px;
    gap: 14px;
  }

  .loc-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .loc { padding: 22px; }

  .loc-notes { grid-template-columns: 1fr 1fr; margin-top: 16px; }

  .footer { margin-top: 84px; padding: 56px 0 92px; }
  .footer-grid { grid-template-columns: 1fr 1.4fr; gap: 48px; }
}

/* --------------------------------------------------------------------------
   Movimiento reducido
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}
