/* ---------------------------------------------------------
   CREMA — Café & Gelato
   Paleta tomada del logo: azul noche + rosa
--------------------------------------------------------- */

:root {
  --navy: #2b324c;
  --navy-deep: #212a44;
  --navy-soft: #3a4265;
  --pink: #ffc0d5;
  --pink-hot: #ff8fb6;
  --pink-pale: #fff1f6;
  --pink-line: #ffd9e6;
  --white: #ffffff;
  --ink: #232a41;
  --ink-soft: #5b6480;

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

  --maxw: 1120px;
  --gap: clamp(1.1rem, 2.4vw, 2rem);

  --shadow: 0 14px 34px rgba(43, 50, 76, 0.13);
  --shadow-soft: 0 6px 18px rgba(43, 50, 76, 0.09);

  --font-display: "Gabarito", "Figtree", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--pink-pale);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0;
}

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

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

:focus-visible {
  outline: 3px solid var(--pink-hot);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------------- Barra superior ---------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--navy);
  color: var(--pink);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.brand { display: inline-flex; align-items: center; }
.brand img { width: clamp(96px, 11vw, 118px); height: auto; }

.nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav a {
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 600;
  color: #f4e7ee;
  text-decoration: none;
  padding: 0.5rem 0.8rem;
  border-radius: var(--pill);
  transition: background-color 0.18s ease, color 0.18s ease;
}

.nav a:hover { background: rgba(255, 192, 213, 0.16); color: var(--pink); }

.nav a[aria-current="page"] {
  background: var(--pink);
  color: var(--navy);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 2px solid rgba(255, 192, 213, 0.45);
  color: var(--pink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.45rem 0.9rem;
  border-radius: var(--pill);
  cursor: pointer;
}

@media (max-width: 980px) {
  .nav-toggle { display: inline-block; }
  .nav {
    position: absolute;
    left: 0; right: 0; top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--navy);
    padding: 0.4rem 1.2rem 1.2rem;
    border-bottom: 4px solid var(--pink);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 0.75rem 0.9rem; border-radius: var(--radius-sm); }
}

/* ---------------- Hero (home) ---------------- */

.hero {
  position: relative;
  background: var(--navy);
  color: var(--pink);
  padding: clamp(3rem, 8vw, 5.5rem) 0 0;
}

.hero__inner {
  position: relative;
  z-index: 2;
  text-align: center;
  padding-bottom: clamp(9rem, 15vw, 11rem);
}

.hero__logo {
  width: min(78%, 520px);
  margin: 0 auto clamp(1.2rem, 3vw, 1.8rem);
}

.hero__line {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.6vw, 1.55rem);
  font-weight: 500;
  color: #f6e3ec;
  max-width: 34ch;
  margin: 0 auto clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.35;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
}

.cta-row .btn { flex: 1 1 300px; max-width: 360px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1rem, 1.8vw, 1.12rem);
  text-decoration: none;
  padding: 1rem 1.9rem;
  border-radius: var(--pill);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.18s ease, color 0.18s ease;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--pink { background: var(--pink); color: var(--navy); }
.btn--pink:hover { background: var(--pink-hot); }

.btn--outline {
  background: transparent;
  color: var(--pink);
  border-color: var(--pink);
}
.btn--outline:hover { background: var(--pink); color: var(--navy); }

.btn--navy { background: var(--navy); color: var(--pink); }
.btn--navy:hover { background: var(--navy-soft); }

.btn--ghost {
  background: transparent;
  color: var(--navy);
  border-color: rgba(43, 50, 76, 0.25);
}
.btn--ghost:hover { background: rgba(43, 50, 76, 0.07); }

.btn--full { width: 100%; }

.btn svg { flex: none; }

/* mascotas asomando + borde derretido */

.hero__mascots {
  position: absolute;
  z-index: 3;
  bottom: -14px;
  right: clamp(4px, 3vw, 48px);
  width: clamp(170px, 22vw, 250px);
  pointer-events: none;
  opacity: 0.97;
}

.drip {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  z-index: 1;
  width: 100%;
  height: clamp(58px, 8vw, 108px);
  display: block;
  color: var(--pink-pale);
}

/* ---------------- Encabezado de sección ---------------- */

.pagehead {
  background: var(--navy);
  color: var(--pink);
  padding: clamp(2.4rem, 6vw, 3.6rem) 0 clamp(7rem, 13vw, 9rem);
  position: relative;
  overflow: hidden;
}

.pagehead h1 {
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  margin-bottom: 0.5rem;
}

.pagehead p {
  margin: 0;
  max-width: 46ch;
  color: #f2dfe8;
  font-size: 1.05rem;
}

.pagehead .drip { color: var(--pink-pale); }

/* ---------------- Bloques de contenido ---------------- */

.section { padding: clamp(2.6rem, 6vw, 4.2rem) 0; }
.section--tight { padding-top: clamp(1.6rem, 4vw, 2.4rem); }

.section__title {
  font-size: clamp(1.6rem, 3.6vw, 2.2rem);
  margin-bottom: 0.4rem;
}

.section__lead {
  margin: 0 0 clamp(1.6rem, 3.5vw, 2.2rem);
  color: var(--ink-soft);
  max-width: 52ch;
}

/* ---------------- Sucursales ---------------- */

.branches {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}

.branch {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
}

.branch__photo {
  position: relative;
  margin: 0;
  width: 100%;
  padding-top: 75%; /* 4:3, sin depender de aspect-ratio */
  background: var(--pink-line);
  overflow: hidden;
}

.branch__photo img {
  height: 100%;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.branch__body {
  padding: 1.35rem 1.4rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.branch__name {
  font-size: 1.45rem;
  margin-bottom: 0.25rem;
}

.branch__addr {
  margin: 0 0 1rem;
  color: var(--ink-soft);
  font-size: 0.98rem;
  min-height: 3.2em; /* dos renglones: alinea la linea punteada en las 3 tarjetas */
}

@media (max-width: 620px) {
  .branch__addr { min-height: 0; }
}

.branch__addr a { color: var(--ink-soft); text-decoration-color: var(--pink-hot); }
.branch__addr a:hover { color: var(--navy); }

.hours {
  border-top: 2px dotted var(--pink-line);
  padding-top: 0.8rem;
  margin: 0 0 1.1rem;
  display: grid;
  gap: 0.1rem;
  font-size: 0.93rem;
}

.hours__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.22rem 0.5rem;
  border-radius: 8px;
}

.hours__row span:first-child { color: var(--ink-soft); }

.hours__row span:last-child {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.hours__row.is-closed span:last-child { color: var(--pink-hot); }

.hours__row.is-today {
  background: var(--pink-pale);
  font-weight: 700;
}

.hours__row.is-today span:first-child { color: var(--navy); }

.hours__row.is-today span:first-child::after {
  content: " · hoy";
  font-size: 0.78em;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pink-hot);
}

.branch__actions {
  margin-top: 0;
  padding-top: 1rem;
  border-top: 2px dotted var(--pink-line);
  display: grid;
  gap: 0.6rem;
}

.branch__actions .btn { padding: 0.8rem 1rem; font-size: 1rem; border-radius: 26px; }

/* tarjetas simples de contacto / pedidos */

.pickcard {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-top: 6px solid var(--pink);
}

.pickcard__body {
  padding: 1.35rem 1.4rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.pickcard__body h2 {
  font-size: 1.4rem;
  margin-bottom: 0.2rem;
}

.pickcard__body p {
  margin: 0 0 1.3rem;
  color: var(--ink-soft);
  font-size: 0.98rem;
  min-height: 3.2em;
}

@media (max-width: 620px) {
  .pickcard__body p { min-height: 0; }
}

.pickcard__actions {
  margin-top: 0;
  display: grid;
  gap: 0.6rem;
}

.pickcard .btn {
  padding: 0.85rem 0.9rem;
  font-size: 0.98rem;
  border-radius: 26px;
}

.btn--stack {
  flex-direction: column;
  gap: 0.1rem;
  line-height: 1.2;
}

.btn__main {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn__sub {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  opacity: 0.82;
}

.branch__actions .btn--stack { padding: 0.7rem 1rem; }

.pickcard__addr a,
.branch__addr a {
  color: inherit;
  text-decoration-color: var(--pink-hot);
  text-underline-offset: 2px;
}

.pickcard__addr a:hover,
.branch__addr a:hover { color: var(--navy); }

.btn--brand {
  background: var(--brand);
  color: #fff;
}

.btn__label { display: inline-block; }

.btn__logo {
  height: 1.3em;
  width: auto;
  flex: none;
}

.btn--brand strong { font-weight: 800; letter-spacing: -0.01em; }
.btn--brand:hover { filter: brightness(1.08); }

.appnote {
  margin: -0.15rem 0 0.1rem;
  font-size: 0.74rem;
  line-height: 1.35;
  color: var(--ink-soft);
  text-align: center;
}

.appnote a {
  color: var(--navy);
  font-weight: 600;
  text-decoration-color: var(--pink-hot);
}

.fineprint--wide {
  margin-top: clamp(1.6rem, 4vw, 2.2rem);
  max-width: none;
}

/* ---------------- Franja de fotos ---------------- */

.strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.5rem;
}

.tile {
  position: relative;
  margin: 0;
  width: 100%;
  padding-top: 100%; /* cuadrado exacto en cualquier pantalla */
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--white);
}

.tile img {
  height: 100%;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 900px) {
  .strip { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 520px) {
  .strip { grid-template-columns: repeat(2, 1fr); }
}


/* ---------------- Carta y helados ---------------- */

.mgroup {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  margin: clamp(1.4rem, 4vw, 2.4rem) 0 1.2rem;
  color: var(--navy);
}

.mgroup + .flavors { margin-bottom: 2rem; }

.mgrid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.mcard {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 1.4rem 1.5rem 1.5rem;
}

.mcard h3 {
  font-size: 1.3rem;
  padding-bottom: 0.6rem;
  border-bottom: 3px solid var(--pink);
  margin-bottom: 1rem;
}

.mlist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.mlist li { line-height: 1.35; }
.mlist li span { font-weight: 600; }

.mlist li em {
  display: block;
  font-style: normal;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.pick {
  margin-top: 1.1rem;
  background: var(--pink-pale);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem 1rem;
}

.pick__label {
  margin: 0 0 0.6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--navy);
}

.sizes {
  margin-top: 1.1rem;
  background: var(--pink-pale);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem 1rem;
}

.sizerow {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.sizerow li {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.2;
}

.sizeicon {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 38px;
  color: var(--navy);
}

.sizeicon svg { width: 100%; height: auto; display: block; }

.badge {
  width: clamp(32px, 5vw, 40px);
  height: auto;
  flex: none;
}

.mlist--tail {
  margin-top: 1.1rem;
  padding-top: 0.9rem;
  border-top: 2px dotted var(--pink-line);
}

/* gustos de helado */

.mstack {
  display: grid;
  gap: var(--gap);
}

.mstack .mcard h2 {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-display);
  font-size: 1.4rem;
  padding-bottom: 0.6rem;
  border-bottom: 3px solid var(--pink);
  margin-bottom: 0.9rem;
}

.flavors {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 3;
  column-gap: clamp(1.4rem, 4vw, 2.6rem);
}

.flavors li {
  break-inside: avoid;
  padding: 0.42rem 0;
  border-bottom: 1px dotted var(--pink-line);
  font-size: 0.98rem;
}

@media (max-width: 900px) { .flavors { columns: 2; } }
@media (max-width: 520px) { .flavors { columns: 1; } }

.flavors li.is-aranguren {
  font-weight: 600;
  color: var(--navy);
}

.mark {
  display: inline-flex;
  vertical-align: -2px;
  margin-left: 0.35rem;
  color: var(--pink-hot);
}

.mark svg { width: 15px; height: 15px; }

.legend {
  margin: 0 0 clamp(1.4rem, 3vw, 2rem);
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.legend .mark { margin: 0 0.1rem; }

/* ---------------- Franja de Instagram ---------------- */

.ig {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 1.6rem clamp(1.4rem, 4vw, 2.6rem);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 4vw, 2.6rem);
}

.ig__mascots {
  width: clamp(180px, 26vw, 300px);
  flex: none;
}

.ig__text h2 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin-bottom: 0.5rem;
}

.ig__text p {
  margin: 0 0 1.2rem;
  color: var(--ink-soft);
  max-width: 40ch;
}

.duo {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.ig--half {
  flex-direction: column;
  text-align: center;
  align-items: center;
  gap: 0.6rem;
  padding: 1.6rem clamp(1.2rem, 3vw, 2rem) 1.8rem;
}

.ig--half .ig__mascots { width: min(70%, 230px); }
.ig--half .ig__text p { margin-inline: auto; }

.ig__icon {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin: 0.6rem 0 0.4rem;
  border-radius: 50%;
  background: var(--pink-pale);
  color: var(--navy);
}

.ig__icon svg { width: 38px; height: 38px; }

.ig--half .btn { font-size: 1rem; padding: 0.9rem 1.3rem; }

@media (max-width: 700px) {
  .ig {
    flex-direction: column;
    text-align: center;
    padding-top: 0.6rem;
  }
  .ig__text p { margin-inline: auto; }
  .ig .btn { padding: 0.85rem 1.1rem; font-size: 0.98rem; border-radius: 26px; }
}

.footer__ig {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--pink) !important;
  text-decoration: none;
}

.footer__ig:hover { text-decoration: underline; }

/* ---------------- Trabajar en Crema ---------------- */

.wrap--narrow { width: min(100% - 2.4rem, 720px); }

.lead {
  font-size: 1.08rem;
  color: var(--ink-soft);
  margin: 0 0 clamp(1.4rem, 3vw, 2rem);
}

.formcard {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: clamp(1rem, 3vw, 1.8rem);
}

.formcard iframe {
  display: block;
  width: 100%;
  border: 0;
}

.formcard--empty {
  border-left: 6px solid var(--pink);
}

.formcard--empty p { margin: 0; color: var(--ink-soft); }
.formcard--empty strong { color: var(--navy); }

.fineprint {
  margin: 1.2rem 0 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.fineprint a { color: var(--navy); }

/* ---------------- Próximamente ---------------- */

.soon {
  min-height: 46vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: clamp(3rem, 9vw, 5.5rem) 0;
}

.soon__badge {
  display: inline-block;
  background: var(--pink);
  color: var(--navy);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 7vw, 3.4rem);
  padding: 0.5rem 1.6rem 0.65rem;
  border-radius: var(--pill);
  transform: rotate(-2deg);
}

.soon p {
  max-width: 40ch;
  margin: 1.5rem auto 2rem;
  color: var(--ink-soft);
}

.soon__mascots {
  width: min(70%, 320px);
  margin: 0 auto 0.5rem;
  opacity: 0.9;
}

/* ---------------- Pie ---------------- */

.footer {
  background: var(--navy-deep);
  color: #e9d9e2;
  padding: clamp(2.6rem, 6vw, 3.4rem) 0 2rem;
  margin-top: clamp(2rem, 5vw, 3rem);
}

.footer__grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1.1fr 1fr 1fr;
}

@media (max-width: 760px) {
  .footer__grid { grid-template-columns: 1fr; }
}

.footer h3 {
  font-size: 1.05rem;
  color: var(--pink);
  margin-bottom: 0.7rem;
}

.footer img.footer__logo { width: 148px; margin-bottom: 1rem; }

.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }

.footer a { color: #e9d9e2; text-decoration: none; font-size: 0.97rem; }
.footer a:hover { color: var(--pink); text-decoration: underline; }

.footer__note {
  margin-top: 2.2rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 192, 213, 0.22);
  font-size: 0.86rem;
  color: #b9aebb;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
}

@media (max-width: 430px) {
  .cta-row { flex-direction: column; }
  .cta-row .btn {
    flex: 0 0 auto;
    width: 100%;
    max-width: none;
    padding: 0.9rem 1rem;
    font-size: 0.95rem;
    border-radius: 26px;
  }
  .hours { font-size: 0.9rem; }
  .hero__logo { width: min(92%, 380px); }
  .branch__body { padding: 1.2rem 1.1rem 1.3rem; }
  .pickcard__body { padding: 1.2rem 1.1rem 1.35rem; }
}

@media (max-width: 700px) {
  .hero__mascots {
    right: auto;
    left: 50%;
    transform: translateX(-50%);
    width: 190px;
    bottom: -10px;
    height: auto;
  }
  .hero__inner { padding-bottom: clamp(9rem, 34vw, 12rem); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
  .btn:hover { transform: none; }
}
