/* ==========================================================================
   BARBEARIA CARAMUJO — folha de estilos
   Mobile-first: os estilos base são para telemóvel; os @media (min-width)
   acrescentam o layout para ecrãs maiores.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. PALETA E VARIÁVEIS (extraídas do logótipo)
   -------------------------------------------------------------------------- */
:root {
  --ink: #111111;        /* Principal: preto do logótipo */
  --beige: #C4BBA9;      /* Secundária: bege do logótipo */
  --red: #A8242A;        /* Destaque: vermelho do poste de barbeiro (usar com moderação) */
  --paper: #F4F1EA;      /* Fundo claro, papel quente */
  --night: #141414;      /* Fundo escuro, como a placa da loja */
  --night-2: #1E1D1B;    /* Cartões em fundo escuro */
  --muted: #5A554C;      /* Texto secundário em fundo claro */
  --muted-dark: #B5AE9F; /* Texto secundário em fundo escuro */
  --line: rgba(17, 17, 17, .14);
  --line-dark: rgba(196, 187, 169, .22);

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gothic: "UnifrakturCook", "Old English Text MT", serif;

  --radius: 6px;
  --gutter: 20px;
  --section-y: clamp(72px, 12vw, 136px);
  --header-h: 64px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }

h1, h2, h3 {
  margin: 0 0 .5em;
  font-weight: 800;
  font-stretch: 112%;
  line-height: 1.02;
  letter-spacing: -.01em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 10vw, 5.2rem); text-transform: uppercase; }
h2 { font-size: clamp(2rem, 7vw, 3.6rem); text-transform: uppercase; }
h3 { font-size: 1.2rem; font-stretch: 100%; letter-spacing: 0; line-height: 1.2; }

/* Palavra em letra gótica, a ecoar o "Caramujo" do logótipo */
.gothic {
  font-family: var(--gothic);
  font-weight: 700;
  text-transform: none;
  font-stretch: normal;
  letter-spacing: 0;
  font-size: 1.08em;
}

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section-y) 0; }

/* Pequena etiqueta por cima dos títulos */
.kicker {
  margin-bottom: 14px;
  font-size: .78rem;
  font-weight: 700;
  font-stretch: 125%;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--red);
}

.section-head { max-width: 720px; margin-bottom: clamp(36px, 6vw, 56px); }
.section-intro { font-size: 1.15rem; color: var(--muted); }

/* Acessibilidade */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 16px; background: var(--beige); color: var(--ink); font-weight: 700;
}
.skip-link:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

/* --------------------------------------------------------------------------
   3. BOTÕES
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 700;
  font-stretch: 112%;
  font-size: .95rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-sm { min-height: 42px; padding: 0 18px; font-size: .8rem; }
.btn-beige { background: var(--beige); color: var(--ink); }
.btn-beige:hover { background: var(--paper); }
.btn-ghost { border-color: var(--line-dark); color: var(--paper); }
.btn-ghost:hover { border-color: var(--beige); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: var(--red); }

.icon { width: 22px; height: 22px; flex: none; }

/* --------------------------------------------------------------------------
   4. CABEÇALHO E MENU
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: var(--night);
  border-bottom: 1px solid var(--line-dark);
  color: var(--paper);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-emblem { width: 22px; }
.brand-word { width: 118px; }

/* Botão hambúrguer (só telemóvel) */
.nav-toggle {
  width: 46px; height: 46px; margin-right: -8px;
  display: grid; place-items: center;
  background: none; border: 0; color: var(--paper); cursor: pointer;
}
.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  display: block; width: 24px; height: 2px; background: currentColor;
  transition: transform .25s, opacity .25s;
}
.nav-toggle-bar { position: relative; }
.nav-toggle-bar::before, .nav-toggle-bar::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bar::before { top: -7px; }
.nav-toggle-bar::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-7px) rotate(-45deg); }

.site-nav {
  position: fixed; inset: var(--header-h) 0 auto 0;
  padding: 12px var(--gutter) 28px;
  background: var(--night);
  border-bottom: 1px solid var(--line-dark);
  transform: translateY(-110%);
  visibility: hidden;
  transition: transform .3s ease, visibility .3s;
}
.site-nav.is-open { transform: none; visibility: visible; }
.site-nav ul { margin-bottom: 20px; }
.site-nav li a {
  display: block; padding: 14px 0;
  border-bottom: 1px solid var(--line-dark);
  font-weight: 700; font-stretch: 112%; letter-spacing: .08em; text-transform: uppercase;
  text-decoration: none;
}
.site-nav .btn { width: 100%; }

/* --------------------------------------------------------------------------
   5. HERO
   -------------------------------------------------------------------------- */
.hero {
  background: var(--night);
  color: var(--paper);
  padding: 48px 0 72px;
  overflow: hidden;
}
.hero-inner { display: grid; gap: 36px; }
.hero-logo img { width: min(62vw, 260px); margin: 0 auto; }
.hero-text { text-align: center; }
.hero .kicker { color: var(--beige); }
.hero h1 .gothic { color: var(--beige); }
.hero-sub { max-width: 34em; margin: 0 auto 32px; font-size: 1.15rem; color: var(--muted-dark); }
.hero-actions { display: flex; flex-direction: column; gap: 12px; }
.hero-status {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 28px 0 0; font-size: .9rem; color: var(--muted-dark);
}

/* Indicador aberto/fechado (a cor muda em script.js) */
.status-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--muted-dark); flex: none;
}
.is-open-now .status-dot { background: #4C9A5B; box-shadow: 0 0 0 4px rgba(76, 154, 91, .2); }
.is-closed-now .status-dot { background: var(--red); }

/* Faixa às riscas, como o poste do barbeiro */
.pole-stripe {
  height: 12px;
  background: repeating-linear-gradient(
    -45deg,
    var(--red) 0 12px, var(--paper) 12px 24px,
    var(--ink) 24px 36px, var(--paper) 36px 48px
  );
}

/* --------------------------------------------------------------------------
   6. SOBRE NÓS
   -------------------------------------------------------------------------- */
.about-grid { display: grid; gap: 44px; }
.about-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); }
.about-photo figcaption { margin-top: 10px; font-size: .85rem; color: var(--muted); }
.about-text p { max-width: 36em; }

.facts {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line);
}
.facts strong {
  display: block; font-size: clamp(1.15rem, 4.5vw, 1.6rem); font-weight: 800; font-stretch: 112%; line-height: 1.1;
}
.facts span { font-size: .85rem; color: var(--muted); }

/* --------------------------------------------------------------------------
   7. SERVIÇOS (fundo escuro, ao estilo da tabela de preços na parede)
   -------------------------------------------------------------------------- */
.services { background: var(--night); color: var(--paper); }
.services .kicker { color: var(--beige); }

/* Aviso de preços de exemplo: só aparece enquanto a secção tiver a classe .a-confirmar */
.price-note { display: none; }
.a-confirmar .price-note {
  display: inline-block; margin-top: 8px; padding: 8px 12px;
  border: 2px dashed var(--red); border-radius: var(--radius);
  font-size: .8rem; font-weight: 700; letter-spacing: .06em; color: #F2A7A0;
}
.a-confirmar .price { outline: 2px dashed var(--red); outline-offset: 3px; }

.cards { display: grid; gap: 14px; }
.card {
  position: relative;
  display: flex; flex-direction: column;
  padding: 26px 24px 22px;
  background: var(--night-2);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted-dark); font-size: .98rem; }
.card .card-price {
  margin: auto 0 0; padding-top: 18px;
  border-top: 1px dashed var(--line-dark);
  font-size: 2.2rem; font-weight: 800; font-stretch: 112%; line-height: 1;
  color: var(--beige);
}
.price-from { font-size: .8rem; font-weight: 600; font-stretch: 100%; letter-spacing: .08em; text-transform: uppercase; }

/* Cartão em destaque */
.card-featured { background: var(--beige); border-color: var(--beige); color: var(--ink); }
.card-featured p { color: #3A362F; }
.card-featured .card-price { color: var(--ink); border-top-color: rgba(17, 17, 17, .3); }
.card-tag {
  align-self: flex-start;
  margin-bottom: 14px !important; padding: 4px 10px;
  background: var(--ink); color: var(--paper) !important;
  border-radius: 3px;
  font-size: .72rem !important; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
}

.services-cta {
  display: flex; flex-direction: column; align-items: flex-start; gap: 16px;
  margin-top: 44px; padding-top: 32px; border-top: 1px solid var(--line-dark);
}
.services-cta p { margin: 0; font-size: 1.1rem; color: var(--muted-dark); }

/* --------------------------------------------------------------------------
   8. GALERIA
   -------------------------------------------------------------------------- */
/* Galeria "justificada": as fotos de cada linha ficam com a mesma altura e
   a largura de cada uma é proporcional à sua proporção (--r = largura ÷ altura).
   Resultado: linhas cheias, sem cortes e sem deformar nenhuma foto.
   --g-h é a altura de referência; controla quantas fotos cabem por linha
   (telemóvel: 2 por linha · tablet e computador: 3 por linha). */
.gallery-grid {
  --g-h: 150px;
  --g-gap: 10px;
  display: flex; flex-wrap: wrap; gap: var(--g-gap);
}
.g-item {
  --r: 1;
  flex: calc(var(--r) * 100) 1 calc(var(--r) * var(--g-h));
  aspect-ratio: var(--r);
  overflow: hidden; border-radius: var(--radius); background: var(--beige);
}
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.g-item:hover img { transform: scale(1.03); }
.gallery-more { margin-top: 28px; color: var(--muted); }
.gallery-more a { font-weight: 700; color: var(--ink); }

/* --------------------------------------------------------------------------
   9. TESTEMUNHOS
   -------------------------------------------------------------------------- */
.reviews { background: var(--beige); }
.reviews .kicker { color: var(--ink); }
.reviews-grid { display: grid; gap: 14px; }
.review {
  display: flex; flex-direction: column;
  padding: 28px 24px;
  background: var(--paper);
  border-radius: var(--radius);
}
.stars { margin-bottom: 14px; color: var(--red); letter-spacing: .15em; }
.review blockquote { margin: 0 0 20px; font-size: 1.1rem; line-height: 1.5; }
.review blockquote p { margin: 0; }
.review figcaption { margin-top: auto; font-size: .88rem; font-weight: 700; color: var(--muted); }
.reviews-more { margin: 36px 0 0; }

/* --------------------------------------------------------------------------
   10. HORÁRIO E LOCALIZAÇÃO
   -------------------------------------------------------------------------- */
.location-grid { display: grid; gap: 40px; }
.open-now { display: flex; align-items: center; gap: 10px; font-weight: 700; }

.hours { width: 100%; max-width: 440px; margin: 8px 0 28px; border-collapse: collapse; }
.hours th, .hours td { padding: 11px 0; border-bottom: 1px solid var(--line); text-align: left; }
.hours th { font-weight: 600; }
.hours td { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.hours tr.is-today th, .hours tr.is-today td { color: var(--ink); font-weight: 800; }
.hours tr.is-today th::before {
  content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 10px;
  background: var(--red); border-radius: 50%; vertical-align: middle;
}

address { margin-bottom: 20px; font-style: normal; font-size: 1.15rem; font-weight: 600; }

.map {
  min-height: 340px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--beige);
  border: 1px solid var(--line);
}
.map iframe { display: block; width: 100%; height: 100%; min-height: 340px; border: 0; filter: grayscale(.35); }

/* --------------------------------------------------------------------------
   11. CONTACTOS
   -------------------------------------------------------------------------- */
.contact { background: var(--night); color: var(--paper); }
.contact .kicker { color: var(--beige); }
.contact .section-intro { color: var(--muted-dark); }

/* Todas as caixas com a mesma altura (a mais alta dita a altura das outras) */
.contact-list { display: grid; gap: 12px; grid-auto-rows: 1fr; }
.contact-list li { display: flex; }
.contact-card {
  flex: 1; min-width: 0;
  container-type: inline-size; /* o tamanho do texto acompanha a largura da caixa */
  display: grid; grid-template-columns: auto 1fr; column-gap: 18px; row-gap: 2px;
  align-content: center; align-items: center;
  padding: 22px;
  background: var(--night-2);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color .2s, transform .2s;
}
.contact-card:hover { border-color: var(--beige); transform: translateY(-2px); }
.contact-card .icon { grid-row: 1 / span 3; width: 28px; height: 28px; color: var(--beige); }
.contact-card > span, .contact-card > small { grid-column: 2; min-width: 0; }
.contact-label { font-size: .75rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted-dark); }
/* Valor numa só linha; encolhe com a caixa (entre 15px e 21px) para nunca ser cortado */
.contact-value {
  font-size: clamp(.95rem, 6.6cqi, 1.3rem);
  font-weight: 800; font-stretch: 104%; line-height: 1.25;
  white-space: nowrap;
}
/* O email pode ser comprido: se não couber numa linha, parte a seguir ao "@" (ver <wbr> no HTML) */
.contact-value.is-email { white-space: normal; overflow-wrap: anywhere; }
.contact-card small { font-size: .8rem; color: var(--muted-dark); }

.contact-main { background: var(--beige); border-color: var(--beige); color: var(--ink); }
.contact-main .icon, .contact-main .contact-label { color: var(--ink); }
.contact-main small { color: #3A362F; }

/* --------------------------------------------------------------------------
   12. RODAPÉ
   -------------------------------------------------------------------------- */
.site-footer { background: #0C0C0C; color: var(--muted-dark); padding: 64px 0 110px; font-size: .95rem; }
.footer-inner { display: grid; gap: 32px; }
.footer-logo { width: 110px; }
.footer-title { margin-bottom: 10px; font-weight: 800; font-stretch: 112%; letter-spacing: .08em; text-transform: uppercase; color: var(--paper); }
.social li { margin-bottom: 6px; }
.social a, .footer-bottom a { text-decoration-color: var(--line-dark); text-underline-offset: 4px; }
.social a:hover, .footer-bottom a:hover { color: var(--paper); }
.footer-bottom { padding-top: 24px; border-top: 1px solid var(--line-dark); font-size: .85rem; }
.footer-bottom p { margin: 0 0 6px; }

/* --------------------------------------------------------------------------
   13. BOTÃO FLUTUANTE DE WHATSAPP
   -------------------------------------------------------------------------- */
.whatsapp-float {
  position: fixed; right: 16px; bottom: 16px; z-index: 60;
  display: inline-flex; align-items: center; gap: 8px;
  height: 56px; padding: 0 20px 0 18px;
  background: var(--red); color: #fff;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .28);
  font-weight: 800; font-stretch: 112%; letter-spacing: .06em; text-transform: uppercase; font-size: .85rem;
  text-decoration: none;
  transition: transform .2s, background-color .2s;
}
.whatsapp-float svg { width: 24px; height: 24px; }
/* No telemóvel fica só o ícone, para não tapar o conteúdo */
@media (max-width: 559px) {
  .whatsapp-float { width: 58px; height: 58px; padding: 0; justify-content: center; }
  .whatsapp-float-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}
.whatsapp-float:hover { transform: translateY(-3px); background: #8E1D22; }

/* --------------------------------------------------------------------------
   14. ANIMAÇÕES AO FAZER SCROLL (subtis)
   O script.js adiciona .is-visible quando o elemento entra no ecrã.
   -------------------------------------------------------------------------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .g-item img, .contact-card, .whatsapp-float { transition: none; }
}

/* --------------------------------------------------------------------------
   15. ECRÃS MAIORES
   -------------------------------------------------------------------------- */
@media (min-width: 560px) {
  .hero-actions { flex-direction: row; justify-content: center; }
  .cards, .contact-list { grid-template-columns: 1fr 1fr; }
  /* A partir do tablet: ícone em cima e texto por baixo, para dar largura ao texto */
  .contact-card { grid-template-columns: 1fr; row-gap: 6px; align-content: start; padding: 26px 22px; }
  .contact-card .icon { grid-row: auto; margin-bottom: 14px; }
  .contact-card > span, .contact-card > small { grid-column: 1; }
  .contact-value { font-size: clamp(.95rem, 8.2cqi, 1.3rem); }
  .gallery-grid { --g-h: 200px; }
}

@media (min-width: 900px) {
  :root { --gutter: 32px; --header-h: 76px; }
  .brand-emblem { width: 26px; }
  .brand-word { width: 140px; }

  /* Menu horizontal */
  .nav-toggle { display: none; }
  .site-nav {
    position: static; display: flex; align-items: center; gap: 28px;
    padding: 0; background: none; border: 0; transform: none; visibility: visible;
  }
  .site-nav ul { display: flex; gap: 26px; margin: 0; }
  .site-nav li a { padding: 6px 0; border: 0; font-size: .82rem; color: var(--muted-dark); transition: color .2s; }
  .site-nav li a:hover { color: var(--paper); }
  .site-nav .btn { width: auto; }

  .hero { padding: 88px 0 104px; }
  .hero-inner { grid-template-columns: 5fr 7fr; align-items: center; gap: 64px; }
  .hero-logo img { width: 100%; max-width: 380px; }
  .hero-text { text-align: left; }
  .hero-sub { margin-left: 0; }
  .hero-actions { justify-content: flex-start; }

  .about-grid { grid-template-columns: 5fr 6fr; align-items: center; gap: 72px; }

  .cards { grid-template-columns: repeat(4, 1fr); }

  .services-cta { flex-direction: row; align-items: center; justify-content: space-between; }

  .gallery-grid { --g-h: 300px; --g-gap: 14px; }

  .reviews-grid { grid-template-columns: repeat(3, 1fr); }

  .location-grid { grid-template-columns: 5fr 7fr; gap: 64px; align-items: stretch; }
  .map, .map iframe { min-height: 460px; }


  .footer-inner { grid-template-columns: auto 1fr 1fr; gap: 56px; align-items: start; }
  .footer-bottom { grid-column: 1 / -1; display: flex; justify-content: space-between; }

  .whatsapp-float { right: 28px; bottom: 28px; }
  .site-footer { padding-bottom: 64px; }
}

/* 4 caixas de contacto lado a lado só quando há largura para o texto caber */
@media (min-width: 1100px) {
  .contact-list { grid-template-columns: repeat(4, 1fr); }
}
