/* Sr. Barbeiro — site de marcações (demonstração)
   Preto e branco como o logótipo; a única cor é a do poste de barbeiro (vermelho e azul). */
:root {
  --black: #000;
  --white: #fff;
  --chalk: #e9e9e9;
  --smoke: #a3a3a3;
  --ash: #141414;
  --ash-2: #1c1c1c;
  --line: #2b2b2b;
  --red: #c8102e;
  --blue: #1f4fa3;
  --gutter: clamp(16px, 4vw, 40px);
  --wrap: max(var(--gutter), calc((100% - 1080px) / 2));
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;
  --font: "Barlow", system-ui, sans-serif;
  --display: "Barlow Condensed", "Barlow", sans-serif;
  --script: "Yellowtail", cursive;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--black); color: var(--chalk);
  font-family: var(--font); font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body.locked { overflow: hidden; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--white); outline-offset: 3px; border-radius: 8px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 99; background: var(--white); color: var(--black); padding: 8px 14px; border-radius: 8px; }
.script { font-family: var(--script); font-weight: 400; }
.opt { color: var(--smoke); font-weight: 400; }

/* ---------- botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font-family: var(--display); font-weight: 700; font-size: 18px; letter-spacing: .02em;
  border: 2px solid transparent; text-decoration: none; white-space: nowrap;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .1s ease;
}
.btn:active { transform: scale(.97); }
.btn--light { background: var(--white); color: var(--black); }
.btn--line { border-color: var(--white); color: var(--white); background: transparent; }
.btn--ghost { color: var(--smoke); background: transparent; }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: 16px; }
.btn--lg { min-height: 56px; padding: 0 28px; font-size: 20px; }
.btn--wide { width: 100%; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
@media (hover: hover) and (pointer: fine) {
  .btn--line:hover { background: var(--white); color: var(--black); }
  .btn--light:hover { background: var(--chalk); }
}
.icon-btn {
  width: 44px; height: 44px; flex: none; border-radius: 50%; border: 1px solid var(--line);
  background: none; display: grid; place-items: center; padding: 0;
}
.icon-btn svg { width: 22px; height: 22px; }

/* ---------- faixa de demonstração ---------- */
.demo-ribbon {
  margin: 0; padding: 8px var(--gutter); text-align: center;
  background: var(--white); color: var(--black); font-size: 13.5px; font-weight: 600;
}

/* ---------- topo ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 18px;
  padding: 10px var(--wrap); background: rgba(0, 0, 0, .88);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top__logo { text-decoration: none; color: var(--white); font-size: 28px; line-height: 1; margin-right: auto; }
.top__nav { display: flex; gap: 18px; }
.top__nav a { color: var(--smoke); text-decoration: none; font-weight: 600; }
.top__nav a:hover { color: var(--white); }
@media (max-width: 560px) { .top__nav { display: none; } }

/* ---------- hero ---------- */
.hero {
  padding: clamp(40px, 9vw, 96px) var(--wrap) clamp(36px, 7vw, 72px);
  display: grid; justify-items: center; text-align: center; gap: 18px;
}
.hero__mark { display: grid; justify-items: center; }
.hero__name {
  margin: 0; color: var(--white); line-height: .9;
  font-size: clamp(76px, 21vw, 190px);
  transform: rotate(-6deg);
}
.hero__stache { width: clamp(150px, 36vw, 300px); color: var(--white); margin-top: clamp(-6px, -1vw, -14px); }
.hero__since {
  margin: 6px 0 0; font-family: var(--display); font-weight: 600; letter-spacing: .32em;
  font-size: 15px; color: var(--smoke); text-transform: lowercase;
}
.hero__lead { margin: 10px 0 0; max-width: 30ch; font-size: clamp(18px, 2.4vw, 22px); color: var(--white); line-height: 1.35; }
.hero__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 6px; }
.hero__rating { margin: 6px 0 0; color: var(--smoke); font-size: 15px; }
.hero__rating strong { color: var(--white); }
.stars { color: #f4c542; letter-spacing: 2px; }

/* Entrada: o nome escreve-se da esquerda para a direita, o bigode aparece a seguir */
.ready .hero__name { animation: write 1.1s cubic-bezier(.19, 1, .22, 1) both; }
.ready .hero__stache { animation: stache .7s cubic-bezier(.19, 1, .22, 1) .55s both; }
@keyframes write { from { clip-path: inset(0 100% 0 0); opacity: .2; } to { clip-path: inset(0 0 0 0); opacity: 1; } }
@keyframes stache { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }

/* Poste de barbeiro: a única cor do site, sempre em movimento lento */
.pole {
  height: 18px;
  background: repeating-linear-gradient(-45deg, var(--red) 0 18px, var(--white) 18px 36px, var(--blue) 36px 54px, var(--white) 54px 72px);
  background-size: 101.82px 18px;
  animation: pole 3s linear infinite;
  box-shadow: inset 0 3px 6px rgba(0, 0, 0, .35), inset 0 -3px 6px rgba(0, 0, 0, .35);
}
@keyframes pole { to { background-position: 101.82px 0; } }

/* ---------- serviços ---------- */
.services, .where { padding: clamp(40px, 7vw, 80px) var(--wrap); }
.services h2, .where h2 {
  margin: 0 0 18px; color: var(--white);
  font-family: var(--display); font-weight: 800; font-size: clamp(40px, 7vw, 64px); line-height: 1;
}
.svc-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; }
@media (min-width: 860px) { .svc-list { grid-template-columns: 1fr 1fr; column-gap: 48px; } }
.svc {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; align-items: center;
  padding: 18px 0; border-bottom: 1px solid var(--line);
}
.svc__name { margin: 0; color: var(--white); font-family: var(--display); font-weight: 700; font-size: 24px; line-height: 1.1; }
.svc__desc { margin: 0; color: var(--smoke); font-size: 15px; }
.svc__meta { grid-column: 1; display: flex; gap: 10px; color: var(--smoke); font-size: 14px; }
.svc__price { grid-row: 1 / span 2; grid-column: 2; text-align: right; }
.svc__price strong { display: block; color: var(--white); font-family: var(--display); font-weight: 800; font-size: 28px; line-height: 1; font-variant-numeric: tabular-nums; }
.svc .btn { margin-top: 8px; }

/* ---------- onde ---------- */
.where { border-top: 1px solid var(--line); }
.where__grid { display: grid; gap: 28px; }
@media (min-width: 760px) { .where__grid { grid-template-columns: 1fr 1fr; align-items: start; } }
.where__addr { margin: 0 0 14px; font-size: 20px; color: var(--white); max-width: 26ch; }
.where__links { display: flex; flex-wrap: wrap; gap: 10px; }
.hours { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.hours td { padding: 9px 0; border-bottom: 1px solid var(--line); }
.hours td:first-child { color: var(--smoke); text-transform: capitalize; }
.hours td:last-child { text-align: right; color: var(--white); }
.hours tr.is-today td { color: var(--white); font-weight: 700; }
.hours tr.is-closed td:last-child { color: var(--smoke); }

.foot {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap;
  padding: 28px var(--wrap) calc(28px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--smoke);
}
.foot .script { color: var(--white); font-size: 28px; }

/* ---------- marcação ---------- */
.book { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .6); }
.book__panel {
  position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--black);
  transform: translateY(24px); opacity: 0; transition: transform .25s cubic-bezier(.215, .61, .355, 1), opacity .25s ease;
}
@media (min-width: 720px) {
  .book__panel { inset: 24px auto 24px 50%; width: 560px; margin-left: -280px; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
}
.book.is-open .book__panel { transform: none; opacity: 1; }
.book__head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.book__title { flex: 1; min-width: 0; text-align: center; }
.book__title h2 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 24px; color: var(--white); line-height: 1.1; }
.steps { list-style: none; margin: 6px 0 0; padding: 0; display: flex; justify-content: center; gap: 6px; }
.steps li { width: 28px; height: 4px; border-radius: 2px; background: var(--line); font-size: 0; transition: background-color .2s ease; }
.steps li.is-done, .steps li.is-on { background: var(--white); }
.book__body { flex: 1; overflow-y: auto; padding: 20px 16px calc(28px + env(safe-area-inset-bottom)); overscroll-behavior: contain; }
.step h3 { margin: 0 0 14px; color: var(--white); font-family: var(--display); font-weight: 700; font-size: 26px; line-height: 1.1; }
.step { animation: stepIn .25s cubic-bezier(.215, .61, .355, 1); }
@keyframes stepIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }

.choices { display: grid; gap: 10px; }
.choice {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; text-align: left;
  padding: 16px 18px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--ash);
  transition: border-color .15s ease, background-color .15s ease;
}
.choice strong { color: var(--white); font-family: var(--display); font-weight: 700; font-size: 21px; line-height: 1.15; }
.choice span { color: var(--smoke); font-size: 14px; }
.choice em { grid-row: 1 / span 2; grid-column: 2; font-style: normal; color: var(--white); font-family: var(--display); font-weight: 800; font-size: 22px; font-variant-numeric: tabular-nums; }
.choice[aria-checked="true"] { border-color: var(--white); background: var(--ash-2); }
@media (hover: hover) and (pointer: fine) { .choice:hover { border-color: #555; } }

.days { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 22px; padding: 2px 16px 6px; }
.days::-webkit-scrollbar { display: none; }
.day {
  flex: none; width: 64px; display: grid; justify-items: center; gap: 2px; padding: 10px 0;
  border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--ash);
}
.day small { color: var(--smoke); font-size: 13px; text-transform: lowercase; }
.day strong { color: var(--white); font-family: var(--display); font-weight: 800; font-size: 24px; line-height: 1; }
.day[aria-checked="true"] { background: var(--white); border-color: var(--white); }
.day[aria-checked="true"] small, .day[aria-checked="true"] strong { color: var(--black); }
.day:disabled { opacity: .35; cursor: not-allowed; }
.day:disabled strong { text-decoration: line-through; }

.slots-title { margin-top: 0; }
.slot-group { margin-bottom: 16px; }
.slot-group p { margin: 0 0 8px; color: var(--smoke); font-size: 14px; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.slot {
  min-height: 46px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--ash);
  font-family: var(--display); font-weight: 700; font-size: 19px; color: var(--white); font-variant-numeric: tabular-nums;
}
.slot[aria-checked="true"] { background: var(--white); color: var(--black); border-color: var(--white); }
.no-slots { color: var(--smoke); padding: 8px 0 16px; }

.summary {
  display: grid; gap: 4px; padding: 14px 16px; margin-bottom: 18px;
  border-radius: var(--r-md); background: var(--ash); border: 1px solid var(--line);
}
.summary strong { color: var(--white); font-family: var(--display); font-weight: 700; font-size: 20px; }
.summary span { color: var(--smoke); }
#book-form { display: grid; gap: 14px; }
#book-form label { display: grid; gap: 6px; color: var(--smoke); font-size: 14px; }
#book-form input {
  min-height: 50px; padding: 0 16px; border-radius: var(--r-sm); border: 1px solid var(--line);
  background: var(--ash); color: var(--white); font: inherit; font-size: 17px;
}
#book-form input:focus { outline: none; border-color: var(--white); }
#book-form [aria-invalid="true"] { border-color: #ff8a8a; }
.form-error { margin: 0; color: #ff9a9a; font-weight: 600; }
.form-error:empty { display: none; }
.fine { margin: 0; color: var(--smoke); font-size: 13px; text-align: center; }

.done { text-align: center; display: grid; justify-items: center; gap: 6px; padding-top: 24px; }
.done__stache { width: 120px; color: var(--white); animation: stache .6s cubic-bezier(.19, 1, .22, 1) both; }
.done h3 { font-size: 34px; margin: 6px 0 0; }
.done__what { margin: 0 0 18px; color: var(--chalk); font-size: 18px; max-width: 30ch; }
.done__actions { display: grid; gap: 10px; width: 100%; max-width: 360px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
