/* ==========================================================================
   La Gôndola Pizzaria — Link na Bio
   Estilos mobile first. Índice:
   1. Tokens (cores, tipografia, medidas)
   2. Base
   3. Página / contêiner
   4. Topo fotográfico e marca
   5. Links principais
   6. Rodapé e redes sociais
   7. Seletor de rota (bottom sheet)
   8. Aviso (toast)
   9. Telas maiores
   10. Movimento reduzido
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
  /* Cores extraídas da logomarca oficial */
  --red:        #C8363C;   /* vermelho "La Gôndola" (amostra do logotipo: #CA373C) */
  --red-deep:   #A92A30;   /* estado pressionado */
  --graphite:   #263036;   /* símbolo da gôndola (amostra: #263036) */
  --ink:        #171717;   /* preto sofisticado */
  --paper:      #FAF8F5;   /* branco quente */
  --stone:      #EAE6E2;   /* cinza neutro */
  --line:       #E4DDD5;   /* bordas delicadas */
  --muted:      #6B6661;   /* textos de apoio (contraste AA sobre --paper) */
  --white:      #FFFFFF;

  --font-serif: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --font-sans:  "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --radius:     14px;
  --page-max:   460px;
  --gutter:     20px;
  --hero-h:     clamp(210px, 62vw, 272px);
  --logo:       124px;

  --shadow-card: 0 1px 2px rgba(23, 23, 23, .04), 0 4px 14px rgba(38, 48, 54, .06);
  --shadow-lift: 0 2px 4px rgba(23, 23, 23, .06), 0 10px 24px rgba(38, 48, 54, .10);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* 2. Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font: 400 15px/1.45 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
svg { width: 1em; height: 1em; flex: none; }
a { color: inherit; text-decoration: none; }
ol, ul { margin: 0; padding: 0; list-style: none; }
h1, h2, p, address { margin: 0; font-style: normal; }
[hidden] { display: none !important; }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
  border-radius: 6px;
}

/* 3. Página ---------------------------------------------------------------- */
.page {
  position: relative;
  width: 100%;
  max-width: var(--page-max);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--paper);
  padding-bottom: calc(28px + env(safe-area-inset-bottom));
}

/* 4. Topo fotográfico e marca --------------------------------------------- */
.hero { position: relative; }

.hero__media {
  position: relative;
  display: block;
  height: var(--hero-h);
  overflow: hidden;
  background: var(--ink);
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 40% 42%;   /* mantém a marca da fachada e a entrada no enquadramento */
}
/* Degradê discreto: leve sombra no topo e transição suave para a base */
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(23,23,23,.28) 0%, rgba(23,23,23,0) 26%),
    linear-gradient(to top,    rgba(23,23,23,.38) 0%, rgba(23,23,23,0) 42%);
  pointer-events: none;
}

.brand {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 var(--gutter);
  margin-top: calc(var(--logo) / -2);
}
.brand__logo {
  width: var(--logo);
  height: var(--logo);
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 0 0 5px var(--paper), 0 8px 22px rgba(23, 23, 23, .16);
}
.brand__logo img { width: 100%; height: 100%; object-fit: contain; }

.brand__name {
  margin-top: 14px;
  font: 600 31px/1.05 var(--font-serif);
  letter-spacing: .01em;
  color: var(--graphite);
}
.brand__tagline {
  max-width: 30ch;
  margin-top: 6px;
  font: italic 500 18px/1.3 var(--font-serif);
  color: #4A4643;
}
.brand__place {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.brand__place svg { font-size: 14px; color: var(--red); }

/* 5. Links principais ------------------------------------------------------ */
.links { padding: 22px var(--gutter) 0; }
.links ol { display: grid; gap: 12px; }

.link {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 76px;
  padding: 13px 14px 13px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s var(--ease), background-color .18s var(--ease);
}
.link__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 11px;
  background: #F6EFEA;
  color: var(--red);
  font-size: 23px;
  flex: none;
}
.link__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.link__title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
}
.link__desc { font-size: 13px; line-height: 1.35; color: var(--muted); }
.link__arrow { font-size: 18px; color: #A9A29B; transition: transform .18s var(--ease), color .18s; }
.link__badge {
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--stone);
  color: var(--graphite);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* Botão principal (WhatsApp) — vermelho institucional */
.link--primary {
  min-height: 82px;
  border-color: var(--red);
  background: var(--red);
  box-shadow: 0 2px 4px rgba(169, 42, 48, .18), 0 10px 22px rgba(169, 42, 48, .22);
}
.link--primary .link__icon { background: rgba(255, 255, 255, .14); color: var(--white); font-size: 25px; }
.link--primary .link__title { color: var(--white); font-size: 16.5px; }
.link--primary .link__desc  { color: rgba(255, 255, 255, .86); }
.link--primary .link__arrow { color: rgba(255, 255, 255, .85); }

/* Botão ainda sem destino configurado */
.link.is-pending { cursor: default; }
.link.is-pending .link__arrow { opacity: .35; }

/* Interações: hover só em dispositivos com mouse; toque com leve compressão */
@media (hover: hover) {
  .link:hover { border-color: #D6CCC2; box-shadow: var(--shadow-lift); transform: translateY(-1px); }
  .link:hover .link__arrow { transform: translateX(2px); color: var(--red); }
  .link--primary:hover { background: #BF3137; border-color: #BF3137; }
  .link--primary:hover .link__arrow { color: var(--white); }
  .link.is-pending:hover { transform: none; box-shadow: var(--shadow-card); }
}
.link:active { transform: scale(.985); }
.link--primary:active { background: var(--red-deep); }

/* 6. Rodapé e redes sociais ----------------------------------------------- */
.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 34px var(--gutter) 0;
}
.ornament { display: flex; align-items: center; gap: 12px; width: 120px; }
.ornament span { flex: 1; height: 1px; background: var(--line); }
.ornament i { width: 6px; height: 6px; background: var(--red); transform: rotate(45deg); }

.footer__title {
  margin-top: 22px;
  font: 600 21px/1.2 var(--font-serif);
  color: var(--graphite);
}
.social { display: flex; gap: 14px; margin-top: 14px; }
.social a {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  color: var(--graphite);
  font-size: 22px;
  box-shadow: var(--shadow-card);
  transition: color .18s, border-color .18s, transform .18s var(--ease);
}
@media (hover: hover) { .social a:hover { color: var(--red); border-color: #D6CCC2; } }
.social a:active { transform: scale(.94); }

.footer__address { margin-top: 28px; font-size: 13.5px; line-height: 1.55; color: var(--muted); }
.footer__address strong { display: block; margin-bottom: 2px; font-weight: 600; color: var(--ink); }
.footer__address a { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
@media (hover: hover) { .footer__address a:hover { color: var(--red); text-decoration-color: currentColor; } }

.footer__hours { margin-top: 12px; font-size: 12px; line-height: 1.55; color: #8A847E; }
.footer__sign {
  margin-top: 18px;
  font: italic 500 17px/1.3 var(--font-serif);
  color: var(--red);
}

/* 7. Seletor de rota (bottom sheet) --------------------------------------- */
.sheet { position: fixed; inset: 0; z-index: 50; }
.sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 23, 23, .48);
  opacity: 0;
  transition: opacity .24s ease;
}
.sheet__panel {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 100%;
  max-width: var(--page-max);
  padding: 12px var(--gutter) calc(20px + env(safe-area-inset-bottom));
  border-radius: 20px 20px 0 0;
  background: var(--paper);
  box-shadow: 0 -10px 40px rgba(23, 23, 23, .18);
  transform: translate(-50%, 100%);
  transition: transform .3s var(--ease);
}
.sheet.is-open .sheet__backdrop { opacity: 1; }
.sheet.is-open .sheet__panel { transform: translate(-50%, 0); }

.sheet__handle { display: block; width: 40px; height: 4px; margin: 0 auto 14px; border-radius: 4px; background: #D8D1C9; }
.sheet__x {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
}
.sheet__title { font: 600 24px/1.2 var(--font-serif); color: var(--graphite); text-align: center; }
.sheet__address { margin-top: 4px; font-size: 13.5px; color: var(--muted); text-align: center; }

.sheet__options { display: grid; gap: 10px; margin-top: 18px; }
.option {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 62px;
  padding: 10px 14px 10px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-card);
  font-size: 15.5px;
  font-weight: 600;
  transition: transform .18s var(--ease), border-color .18s;
}
.option__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #F6EFEA;
  color: var(--red);
  font-size: 21px;
}
.option__label { flex: 1; }
.option__arrow { font-size: 18px; color: #A9A29B; }
.option:active { transform: scale(.985); }
@media (hover: hover) { .option:hover { border-color: #D6CCC2; } }

.sheet__copy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  margin-top: 8px;
  border: 0;
  background: transparent;
  color: var(--graphite);
  font: 500 14px var(--font-sans);
  cursor: pointer;
}
.sheet__copy svg { font-size: 17px; }

body.no-scroll { overflow: hidden; }

/* 8. Aviso (toast) --------------------------------------------------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 60;
  max-width: min(90vw, 400px);
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--white);
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
  box-shadow: 0 10px 30px rgba(23, 23, 23, .25);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 12px);
  transition: opacity .22s ease, transform .22s var(--ease), visibility 0s linear .22s;
}
.toast.is-visible { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition-delay: 0s; }

/* 9. Telas maiores -------------------------------------------------------- */
/* Telas estreitas (360px): compacta um pouco o topo para o 1º botão aparecer logo */
@media (max-width: 370px) {
  :root { --gutter: 16px; --logo: 112px; }
  .brand__name { font-size: 28px; }
  .brand__tagline { font-size: 17px; }
}
/* Celulares baixos (ex.: navegador do Instagram com barras visíveis) */
@media (max-height: 640px) and (max-width: 479px) {
  :root { --hero-h: 196px; --logo: 108px; }
  .brand__name { margin-top: 10px; }
}

/* Computador: experiência centralizada em um "cartão" sobre fundo discreto */
@media (min-width: 480px) {
  body {
    background:
      radial-gradient(1200px 600px at 50% -10%, rgba(201, 51, 58, .06), transparent 60%),
      var(--stone);
  }
  .page {
    min-height: auto;
    margin: 40px auto;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(23, 23, 23, .06), 0 24px 60px rgba(38, 48, 54, .14);
    padding-bottom: 36px;
  }
  :root { --hero-h: 272px; --gutter: 24px; }
  .sheet__panel {
    top: 50%;
    bottom: auto;
    border-radius: 20px;
    transform: translate(-50%, -46%);
    opacity: 0;
    transition: transform .26s var(--ease), opacity .2s ease;
  }
  .sheet.is-open .sheet__panel { transform: translate(-50%, -50%); opacity: 1; }
  .sheet__handle { display: none; }
  .sheet__panel { padding-top: 26px; }
}

/* 10. Movimento reduzido -------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
  .link:active, .option:active, .social a:active { transform: none; }
}
