/* ==========================================================================
   Cantina D'Itália — Link da Bio
   Direção de arte: "carte editorial italiana"
   Papel marfim, tipografia serifada de alto contraste, fios de latão e o
   vermelho da marca usado com parcimônia. Mobile-first, sem dependências.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens de design
   -------------------------------------------------------------------------- */
:root {
  /* Superfícies — fundo claro para que a logomarca (texto grafite) renda
     exatamente como foi desenhada. */
  --paper: #fcf8f2;
  --paper-2: #f5ede2;
  --surface: #ffffff;

  /* Tinta */
  --ink: #2a2522;
  --ink-2: #5f554e;
  --ink-3: #8f857c;

  /* Marca */
  --brand: #c93f2e;
  --brand-2: #a8301f;
  --brand-3: #e0563f;

  /* Fios de latão (detalhe de requinte) */
  --gold: #b9915a;
  --gold-2: #d9bc8c;

  /* Linhas */
  --line: #e6dbcd;
  --line-2: rgba(42, 37, 34, 0.1);
  --line-3: rgba(42, 37, 34, 0.06);

  --shell: 520px;

  /* Editáveis pelo painel (admin.html) */
  --card-radius: 14px;
  --fonte-titulo: 'Cormorant Garamond', Georgia, serif;

  --shadow-1: 0 1px 2px rgba(42, 37, 34, 0.04), 0 6px 18px rgba(42, 37, 34, 0.05);
  --shadow-2: 0 2px 4px rgba(42, 37, 34, 0.05), 0 14px 34px rgba(42, 37, 34, 0.09);
  --shadow-brand: 0 10px 26px rgba(168, 48, 31, 0.26);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  color-scheme: light;
}

/* --------------------------------------------------------------------------
   2. Reset enxuto
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  /* Papel marfim: brilho quente no topo, latão nos cantos */
  background-color: var(--paper);
  background-image:
    radial-gradient(125% 62% at 50% -12%, rgba(201, 63, 46, 0.075) 0%, rgba(201, 63, 46, 0) 62%),
    radial-gradient(95% 52% at -6% 102%, rgba(185, 145, 90, 0.11) 0%, rgba(185, 145, 90, 0) 66%),
    radial-gradient(85% 48% at 104% 26%, rgba(201, 63, 46, 0.05) 0%, rgba(201, 63, 46, 0) 62%),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
  background-attachment: fixed;
}

/* Grão de papel — textura finíssima, puro CSS (desativável pelo painel) */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(42, 37, 34, 0.045) 0.5px, transparent 0.6px);
  background-size: 4px 4px;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

.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;
}

.shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 22px;
}

/* --------------------------------------------------------------------------
   3. Ornamentos (fios + losango)
   -------------------------------------------------------------------------- */
.rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line));
}

.rule--r { background: linear-gradient(270deg, transparent, var(--line)); }

.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 26px 22px 22px;
}

/* Losango decorativo reutilizável (fio de latão) */
.dm {
  flex: 0 0 auto;
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 0.5px;
  background: var(--gold);
  transform: rotate(45deg);
}

.dm--lg {
  width: 7px;
  height: 7px;
}

/* --------------------------------------------------------------------------
   4. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  z-index: 1;
  padding: max(34px, env(safe-area-inset-top)) 22px 4px;
  text-align: center;
}

/* Fio superior com rótulo em versalete */
.hero__eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  max-width: 300px;
  margin: 0 auto 26px;
}

.hero__eyebrow span {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
  animation: fade-in 0.8s var(--ease) both;
}

/* A logomarca: arte original, sem filtros que alterem as cores */
.hero__logo {
  width: min(222px, 58vw);
  margin: 0 auto;
  filter: drop-shadow(0 16px 32px rgba(42, 37, 34, 0.13));
  animation: logo-in 1s var(--ease) both;
}

.hero__tagline {
  max-width: 26ch;
  margin: 24px auto 0;
  font-family: var(--fonte-titulo);
  font-size: 21px;
  font-style: italic;
  font-weight: 500;
  line-height: 1.42;
  color: var(--ink);
  animation: fade-up 0.8s var(--ease) 0.16s both;
}

.hero__traits {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  animation: fade-up 0.8s var(--ease) 0.24s both;
}

.hero__traits span {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.hero__traits i {
  font-size: 6px;
  font-style: normal;
  color: var(--gold);
  transform: rotate(45deg);
}

/* --------------------------------------------------------------------------
   5. Rótulo de seção
   -------------------------------------------------------------------------- */
.section-label {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 20px;
}

.section-label__text {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-2);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   6. Lista de links — tratada como a "carte" da casa
   -------------------------------------------------------------------------- */
.links {
  display: grid;
  gap: 11px;
  padding-bottom: 8px;
}

.link-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 16px 18px;
  border-radius: var(--card-radius);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-1);
  overflow: hidden;
  isolation: isolate;
  touch-action: manipulation;
  animation: fade-up 0.65s var(--ease) both;
  transition: transform 0.24s var(--ease), box-shadow 0.24s var(--ease),
              border-color 0.24s var(--ease);
}

.link-card:active { transform: scale(0.988); }

@media (hover: hover) {
  .link-card:hover {
    border-color: rgba(42, 37, 34, 0.18);
    box-shadow: var(--shadow-2);
  }
}

/* Ícone em medalhão de fio fino */
.link-card__icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(201, 63, 46, 0.045);
  color: var(--brand);
  transition: background 0.24s var(--ease), border-color 0.24s var(--ease),
              color 0.24s var(--ease);
}

.link-card__icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Ícones de traço */
.link-card__icon svg.stroke {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.link-card__body { flex: 1 1 auto; min-width: 0; }

.link-card__title {
  display: block;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--ink);
}

.link-card__sub {
  display: block;
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--ink-3);
}

/* Seta de link externo */
.link-card__arrow {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  fill: none;
  stroke: var(--ink-3);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.65;
  transition: transform 0.26s var(--ease), stroke 0.26s var(--ease), opacity 0.26s var(--ease);
}

@media (hover: hover) {
  .link-card:hover .link-card__arrow {
    stroke: var(--brand);
    opacity: 1;
    transform: translate(2px, -2px);
  }
  .link-card:hover .link-card__icon {
    background: rgba(201, 63, 46, 0.09);
    border-color: rgba(201, 63, 46, 0.3);
  }
}

/* --- Ação principal: Delivery (vermelho da marca + fio de latão) --- */
.link-card--primary {
  padding: 19px 18px;
  border: 1px solid rgba(185, 145, 90, 0.7);
  background: linear-gradient(138deg, var(--brand-3) 0%, var(--brand) 44%, var(--brand-2) 100%);
  box-shadow: var(--shadow-brand), inset 0 0 0 1px rgba(255, 255, 255, 0.13);
}

.link-card--primary .link-card__icon {
  width: 46px;
  height: 46px;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.link-card--primary .link-card__icon svg { width: 21px; height: 21px; }

.link-card--primary .link-card__title {
  font-size: 16.5px;
  color: #fff;
  letter-spacing: 0.005em;
}

.link-card--primary .link-card__sub { color: rgba(255, 255, 255, 0.82); }

.link-card--primary .link-card__arrow { stroke: #fff; opacity: 0.9; }

@media (hover: hover) {
  .link-card--primary:hover {
    border-color: rgba(217, 188, 140, 0.95);
    box-shadow: 0 16px 36px rgba(168, 48, 31, 0.34), inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  }
  .link-card--primary:hover .link-card__icon {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
  }
}

/* Reverberação luminosa discreta */
.link-card--primary::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(104deg, transparent 34%, rgba(255, 255, 255, 0.2) 48%, transparent 62%);
  transform: translateX(-125%);
  animation: sheen 6.5s ease-in-out 1.6s infinite;
  pointer-events: none;
}

/* --- Acento do Instagram: fio degradê --- */
.link-card--instagram::before {
  content: '';
  position: absolute;
  left: 0;
  top: 22%;
  bottom: 22%;
  width: 2px;
  border-radius: 0 2px 2px 0;
  background: linear-gradient(180deg, #f9ce34, #ee2a7b 52%, #6228d7);
  opacity: 0.85;
}

@media (hover: hover) {
  .link-card--instagram:hover .link-card__icon {
    background: linear-gradient(140deg, #f9ce34, #ee2a7b 55%, #6228d7);
    border-color: transparent;
    color: #fff;
  }
}

/* --- Acento de avaliação: medalhão dourado --- */
.link-card--review .link-card__icon {
  background: rgba(185, 145, 90, 0.09);
  border-color: rgba(185, 145, 90, 0.34);
  color: var(--gold);
}

@media (hover: hover) {
  .link-card--review:hover .link-card__icon {
    background: rgba(185, 145, 90, 0.16);
    border-color: rgba(185, 145, 90, 0.5);
  }
  .link-card--review:hover .link-card__arrow { stroke: var(--gold); }
}

/* --------------------------------------------------------------------------
   7. Bloco de avaliação (peça editorial)
   -------------------------------------------------------------------------- */
.review {
  position: relative;
  margin-top: 22px;
  padding: 32px 24px 30px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-1), inset 0 0 0 1px rgba(185, 145, 90, 0.16);
  text-align: center;
  overflow: hidden;
}

.review::before {
  content: '';
  position: absolute;
  top: -70px;
  left: 50%;
  width: 300px;
  height: 300px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(201, 63, 46, 0.08), transparent 68%);
  pointer-events: none;
}

.review__ornament {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.review__ornament i {
  font-size: 6px;
  font-style: normal;
  color: var(--gold);
  transform: rotate(45deg);
}

.review__stars {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 15px;
}

.review__stars svg { width: 17px; height: 17px; fill: var(--gold); }

.review__title {
  position: relative;
  margin: 0 0 8px;
  font-family: var(--fonte-titulo);
  font-size: 25px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.005em;
  color: var(--ink);
}

.review__text {
  position: relative;
  max-width: 28ch;
  margin: 0 auto 22px;
  font-size: 13.5px;
  color: var(--ink-2);
}

/* --------------------------------------------------------------------------
   8. Botões
   -------------------------------------------------------------------------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 52px;
  padding: 0 24px;
  border: 1px solid rgba(185, 145, 90, 0.7);
  border-radius: 999px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(138deg, var(--brand-3), var(--brand-2));
  box-shadow: var(--shadow-brand), inset 0 0 0 1px rgba(255, 255, 255, 0.13);
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}

.btn:active { transform: scale(0.982); box-shadow: 0 6px 16px rgba(168, 48, 31, 0.24); }

.btn svg { width: 15px; height: 15px; fill: currentColor; }

@media (hover: hover) {
  .btn:hover {
    border-color: rgba(217, 188, 140, 0.95);
    box-shadow: 0 16px 34px rgba(168, 48, 31, 0.32), inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  }
}

/* --------------------------------------------------------------------------
   9. Rodapé
   -------------------------------------------------------------------------- */
.footer {
  position: relative;
  z-index: 1;
  padding: 34px 22px calc(36px + env(safe-area-inset-bottom));
  text-align: center;
}

.footer__rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 26px;
}

/* Logomarca horizontal: versão desenhada para faixas de largura média */
.footer__logo {
  width: min(248px, 68vw);
  margin: 0 auto;
  opacity: 0.92;
}

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 24px;
}

.footer__nav a {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding: 6px 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.22s var(--ease), border-color 0.22s var(--ease);
}

@media (hover: hover) {
  .footer__nav a:hover { color: var(--brand); border-bottom-color: rgba(201, 63, 46, 0.4); }
}

.footer__nav i {
  font-size: 5px;
  font-style: normal;
  color: var(--gold);
  transform: rotate(45deg);
}

.footer__copy {
  margin: 26px 0 0;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}

/* --------------------------------------------------------------------------
   10. Animações
   -------------------------------------------------------------------------- */
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes logo-in {
  from { opacity: 0; transform: translateY(-12px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes sheen {
  0%, 60% { transform: translateX(-125%); }
  88%, 100% { transform: translateX(125%); }
}

/* Revelação ao rolar (aplicada pelo JS) */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.reveal.is-visible { opacity: 1; transform: none; }

/* Efeito de toque */
.ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  background: rgba(201, 63, 46, 0.14);
  animation: ripple 0.62s ease-out;
  pointer-events: none;
  z-index: 2;
}

.link-card--primary .ripple { background: rgba(255, 255, 255, 0.3); }

@keyframes ripple {
  to { transform: scale(2.6); opacity: 0; }
}

/* Desligado pelo painel (tema.animacoes = false) */
body.sem-animacao *,
body.sem-animacao *::before,
body.sem-animacao *::after {
  animation: none !important;
  transition: none !important;
}

body.sem-animacao .reveal { opacity: 1; transform: none; }

/* Grão desligado (tema.mostrarGrao = false) */
body.sem-grao::before { display: none; }

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

/* --------------------------------------------------------------------------
   11. Ajustes finos de tela
   -------------------------------------------------------------------------- */
@media (min-width: 560px) {
  .shell { padding: 0 26px; }
  .hero { padding-left: 26px; padding-right: 26px; }
  .hero__logo { width: min(272px, 50vw); }
  .hero__tagline { font-size: 22px; }
  .footer { padding-left: 26px; padding-right: 26px; }
}

/* Telas muito estreitas (320–360px) */
@media (max-width: 360px) {
  .link-card { gap: 12px; padding: 14px 15px; }
  .link-card__icon { width: 38px; height: 38px; }
  .link-card__title { font-size: 14.5px; }
  .hero__logo { width: 210px; }
}

/* Celular deitado: enxuga o hero para não exigir rolagem */
@media (max-height: 660px) and (orientation: landscape) {
  .hero { padding-top: 20px; }
  .hero__logo { width: min(180px, 34vw); }
  .hero__eyebrow { margin-bottom: 14px; }
  .hero__tagline { font-size: 18px; margin-top: 16px; }
}
