/* Al Capone Barber Club
   Paleta tirada da própria loja: chumbo da placa da fachada, preto dos móveis,
   branco-osso do piso e o dourado do filete do logo. */

/* Fontes hospedadas junto com o site (licença SIL OFL): carregam mais rápido e não dependem do Google. */
@font-face {
  font-family: "Big Shoulders Display";
  font-weight: 800;
  font-style: normal;
  font-display: swap;
  src: url("assets/fonts/big-shoulders-display-latin-800-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Barlow";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("assets/fonts/barlow-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Barlow";
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url("assets/fonts/barlow-latin-500-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Barlow";
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url("assets/fonts/barlow-latin-600-normal.woff2") format("woff2");
}

:root {
  --chumbo: #2c3033;
  --preto: #000;
  --osso: #f1eee8;
  --osso-suave: #bdb9b1;
  --ouro: #c0a564;
  --ouro-claro: #d4bc80;
  --traco: rgba(241, 238, 232, 0.16);
  --traco-forte: rgba(241, 238, 232, 0.38);

  --fonte-titulo: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --fonte-texto: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --gutter: 20px;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@media (min-width: 700px) {
  :root { --gutter: 32px; }
}

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

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

html.has-sheet { overflow: hidden; }

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--chumbo);
  /* textura sutil de cimento queimado, como as paredes da loja */
  background-image: var(--grain);
  color: var(--osso);
  font-family: var(--fonte-texto);
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--ouro-claro);
  outline-offset: 3px;
}

/* ---------- botões ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 26px;
  border: 1.5px solid transparent;
  border-radius: 14px;
  font: 600 17px/1 var(--fonte-texto);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s, border-color 0.18s, color 0.18s, transform 0.12s;
}

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

.btn--gold {
  background: linear-gradient(180deg, var(--ouro-claro), var(--ouro));
  color: var(--preto);
  box-shadow: 0 8px 24px -10px rgba(192, 165, 100, 0.7);
}

.btn--gold:hover { background: var(--ouro-claro); box-shadow: 0 12px 30px -10px rgba(212, 188, 128, 0.9); }

.btn--line {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--traco-forte);
  color: var(--osso);
}

.btn--line:hover {
  border-color: var(--ouro);
  color: var(--ouro-claro);
}

/* ---------- topo ---------- */

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: min(70vh, 680px);
  min-height: min(70svh, 680px);
  padding: 48px var(--gutter) 40px;
  text-align: center;
}

.hero__slides {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: var(--preto);
}

.hero__slides img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1);
  transition: opacity 1.4s ease, transform 8s linear;
}

.hero__slides img.is-active {
  opacity: 1;
  transform: scale(1.06);
}

.hero__slides::after {
  content: "";
  position: absolute;
  inset: 0;
  /* a textura vai por cima do degradê, igual ao fundo da página, para não sobrar emenda */
  background-image:
    var(--grain),
    linear-gradient(
      180deg,
      rgba(32, 35, 37, 0.8) 0%,
      rgba(32, 35, 37, 0.6) 42%,
      rgba(44, 48, 51, 0.9) 82%,
      var(--chumbo) 100%
    );
}

.hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.hero__logo {
  margin: 0 0 26px;
  width: min(74vw, 340px);
}

.hero__tag {
  margin: 0;
  font: 800 clamp(30px, 8.4vw, 44px) / 1 var(--fonte-titulo);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero__sub {
  margin: 10px 0 30px;
  color: var(--osso-suave);
  font-size: 20px;
  font-weight: 500;
}

@media (min-width: 900px) {
  .hero__logo { width: 400px; }
}

/* Uma única entrada, no carregamento: logo, frase e botão chegam em sequência. */
@media (prefers-reduced-motion: no-preference) {
  .hero__logo,
  .hero__tag,
  .hero__sub,
  .hero__content .btn {
    animation: chegar 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
  .hero__tag { animation-delay: 0.18s; }
  .hero__sub { animation-delay: 0.3s; }
  .hero__content .btn { animation-delay: 0.42s; }
}

@keyframes chegar {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__slides img { transition: opacity 0.01s; }
  .hero__slides img.is-active { transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------- unidades ---------- */

.wrap {
  width: min(1120px, 100%);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.units {
  padding: 40px 0 80px;
  scroll-margin-top: 0;
}

.units__title {
  margin: 0;
  max-width: 13ch;
  font: 800 clamp(46px, 13vw, 88px) / 0.92 var(--fonte-titulo);
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-wrap: balance;
}

.units__lede {
  margin: 18px 0 0;
  max-width: 34ch;
  color: var(--osso-suave);
}

.units__grid {
  display: grid;
  gap: 40px;
  width: min(1120px, 100%);
  margin: 44px auto 0;
  padding-inline: var(--gutter);
}

@media (min-width: 900px) {
  .units__grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

.unit__body {
  padding: 22px 6px 4px;
}

@media (min-width: 900px) {
  .unit__body { padding-inline: 8px; }
}

.unit__address {
  margin: 0 0 20px;
  color: var(--osso-suave);
  font-style: normal;
}

.unit__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.unit__actions .btn--gold { flex: 1 1 150px; }
.unit__actions .btn { padding-inline: 20px; }

/* ---------- carrossel das unidades ---------- */

.slider {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 28px;
  background: var(--preto);
  box-shadow: 0 24px 48px -28px rgba(0, 0, 0, 0.8);
  transition: box-shadow 0.3s;
}

.unit:hover .slider { box-shadow: 0 28px 56px -26px rgba(192, 165, 100, 0.35); }

.slider::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 58%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0));
  pointer-events: none;
}

.slider__track {
  display: flex;
  height: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.slider__track::-webkit-scrollbar { display: none; }

.slide {
  flex: 0 0 100%;
  height: 100%;
  margin: 0;
  scroll-snap-align: start;
}

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

.unit__name {
  position: absolute;
  left: 20px;
  bottom: 18px;
  z-index: 2;
  margin: 0;
  font: 800 clamp(58px, 19vw, 100px) / 0.86 var(--fonte-titulo);
  letter-spacing: 0.005em;
  text-transform: uppercase;
  pointer-events: none;
}

@media (min-width: 900px) {
  .unit__name {
    left: 24px;
    bottom: 22px;
    font-size: clamp(52px, 7vw, 90px); /* reserva para navegadores sem container queries */
  }
}

/* O nome acompanha a largura do bloco da unidade, não a da tela: cabe em qualquer coluna. */
.unit { container-type: inline-size; }

@supports (width: 1cqw) {
  .unit__name { font-size: clamp(52px, 19cqw, 104px); }
}

/* Barrinhas no topo, no estilo dos Stories: a barra cheia mostra quanto falta para a próxima foto. */
.slider__bars {
  position: absolute;
  inset: 14px 16px auto;
  z-index: 3;
  display: flex;
  gap: 4px;
}

.slider__seg {
  position: relative;
  flex: 1;
  height: 18px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.slider__seg::before,
.slider__seg::after {
  content: "";
  position: absolute;
  inset: 7px 0;
  border-radius: 2px;
}

.slider__seg::before { background: rgba(255, 255, 255, 0.32); }

.slider__seg::after {
  background: var(--osso);
  transform: scaleX(0);
  transform-origin: left;
}

.slider__seg.is-done::after { transform: scaleX(1); }

.slider__seg.is-active::after {
  animation: encher 4.5s linear forwards;
}

.slider.is-paused .slider__seg.is-active::after {
  animation-play-state: paused;
}

@keyframes encher {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@media (prefers-reduced-motion: reduce) {
  .slider__seg.is-active::after {
    animation: none;
    transform: scaleX(1);
  }
}

.slider__nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: none;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--traco-forte);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  color: var(--osso);
  cursor: pointer;
  transition: background-color 0.18s, border-color 0.18s;
}

.slider__nav--prev { left: 12px; }
.slider__nav--next { right: 12px; }

.slider__nav:hover {
  border-color: var(--ouro);
  background: rgba(0, 0, 0, 0.8);
}

@media (hover: hover) {
  .slider__nav { display: grid; opacity: 0; }
  .slider:hover .slider__nav,
  .slider:focus-within .slider__nav { opacity: 1; }
}

/* ---------- segunda tela: como marcar ---------- */

.sheet {
  width: 100%;
  max-width: 100%;
  max-height: 100%;
  margin: auto 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--osso);
  overflow: visible;
}

.sheet::backdrop {
  background: rgba(0, 0, 0, 0.74);
  backdrop-filter: blur(3px);
}

.sheet__panel {
  position: relative;
  width: min(540px, 100%);
  margin-inline: auto;
  padding: 34px var(--gutter) calc(28px + env(safe-area-inset-bottom));
  border-top: 3px solid var(--ouro);
  border-radius: 26px 26px 0 0;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(18px);
}

@media (min-width: 640px) {
  .sheet { margin: auto; }
  .sheet__panel {
    padding: 40px 36px 36px;
    border: 1px solid var(--traco);
    border-top: 3px solid var(--ouro);
    border-radius: 26px;
  }
}

.sheet[open] .sheet__panel {
  animation: subir 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes subir {
  from { transform: translateY(28px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .sheet[open] .sheet__panel { animation: none; }
}

.sheet__close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  width: 48px;
  height: 48px;
  padding: 0;
  place-items: center;
  border: 0;
  background: none;
  color: var(--osso-suave);
  cursor: pointer;
}

.sheet__close:hover { color: var(--osso); }

.sheet__unit {
  margin: 0;
  font: 800 clamp(52px, 15vw, 72px) / 0.9 var(--fonte-titulo);
  letter-spacing: 0.005em;
  text-transform: uppercase;
}

.sheet__ask {
  margin: 12px 0 26px;
  color: var(--osso-suave);
}

.choice {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 16px;
  min-height: 76px;
  padding: 14px 20px;
  border: 1.5px solid var(--traco-forte);
  border-radius: 18px;
  text-decoration: none;
  transition: background-color 0.18s, border-color 0.18s, color 0.18s, transform 0.12s;
}

.choice + .choice { margin-top: 12px; }

.choice:active { transform: scale(0.985); }

.choice:hover {
  border-color: var(--ouro);
  color: var(--ouro-claro);
}

.choice--primary {
  border-color: var(--ouro);
  background: var(--ouro);
  color: var(--preto);
}

.choice--primary:hover {
  border-color: var(--ouro-claro);
  background: var(--ouro-claro);
  color: var(--preto);
}

.choice__text {
  display: grid;
  gap: 2px;
}

.choice__text strong {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
}

.choice__text span {
  font-size: 15px;
  line-height: 1.3;
  opacity: 0.8;
}

/* ---------- rodapé ---------- */

.footer {
  padding: 56px var(--gutter) calc(48px + env(safe-area-inset-bottom));
  background: var(--preto);
  text-align: center;
}

.footer__logo {
  width: 150px;
  margin: 0 auto 18px;
}

.footer p {
  margin: 0 auto;
  max-width: 30ch;
  text-wrap: balance;
  color: var(--osso-suave);
  font-size: 16px;
}

/* No computador, a chamada das unidades fica centralizada. */
@media (min-width: 900px) {
  .units .wrap { text-align: center; }
  .units__title { max-width: 20ch; margin-inline: auto; }
  .units__lede { margin-inline: auto; max-width: 44ch; }
}

/* ---------- assinatura da agência ---------- */

.footer__credit {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 32px;
  padding: 10px 22px 10px 20px;
  border: 1px solid var(--traco);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.footer__made {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--osso-suave);
  font-size: 15px;
}

.footer__heart { color: #e5566d; }

.footer__agency {
  display: block;
  line-height: 0;
  transition: transform 0.18s;
}

.footer__agency:hover { transform: scale(1.06); }

.footer__agency img { width: 58px; }
