/* Cavallini Tattoo Studio — papel de stencil, tinta preta, linha violeta */
:root {
  --paper: #f1f1ee;
  --white: #ffffff;
  --ink: #000000;
  --stencil: #4b3bd6;
  --stencil-soft: rgba(75, 59, 214, 0.1);
  --grey: #5a5a56;
  --line: #cfcfc9;
  --err: #b3261e;
  --display: "Pirata One", "UnifrakturCook", serif;
  --body: "Familjen Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1160px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-inout: cubic-bezier(0.65, 0, 0.35, 1);
}
*,
*::before,
*::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--body); font-size: 17px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 400; }
h2 { font-family: var(--display); font-size: clamp(40px, 6vw, 64px); line-height: 1; letter-spacing: 0.005em; }
h3 { font-size: 19px; font-weight: 700; line-height: 1.25; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--stencil); outline-offset: 3px; }

.demo-ribbon {
  margin: 0; padding: 8px var(--gutter); text-align: center; font-size: 13.5px; line-height: 1.35;
  background: var(--stencil); color: var(--white);
}

/* ------------ botões ------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 4px; border: 1.5px solid var(--ink);
  font: inherit; font-weight: 600; font-size: 16px; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.12s ease;
}
.btn:active { transform: scale(0.97); }
.btn--ink { background: var(--ink); color: var(--white); }
.btn--line { background: transparent; color: var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .btn--ink:hover { background: #2a2a2a; border-color: #2a2a2a; }
  .btn--line:hover { background: var(--ink); color: var(--white); }
}
.btn--sm { min-height: 40px; padding: 0 16px; font-size: 15px; }
.btn--lg { min-height: 56px; padding: 0 30px; font-size: 17px; }
.link { font-weight: 600; text-underline-offset: 4px; text-decoration-thickness: 1.5px; }

/* ------------ topo ------------ */
.top {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 28px;
  padding: 10px var(--gutter); background: rgba(241, 241, 238, 0.88);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent; transition: border-color 0.2s ease;
}
.top.is-scrolled { border-bottom-color: var(--line); }
.top__brand { font-family: var(--display); font-size: 30px; line-height: 1; text-decoration: none; }
.top__nav { display: flex; gap: 22px; margin-right: auto; }
.top__nav a { font-size: 15.5px; font-weight: 500; text-decoration: none; color: var(--grey); }
@media (hover: hover) and (pointer: fine) { .top__nav a:hover { color: var(--ink); } }
@media (max-width: 760px) {
  .top { justify-content: space-between; }
  .top__nav { display: none; }
}

/* ------------ abertura ------------ */
.hero { max-width: var(--max); margin: 0 auto; padding: clamp(28px, 6vw, 72px) var(--gutter) clamp(48px, 8vw, 96px); }
.wm {
  position: relative; display: block; width: fit-content; margin-left: -0.04em;
  font-family: var(--display); font-size: clamp(92px, 23vw, 310px); line-height: 0.92; letter-spacing: 0.005em;
}
.wm span { display: block; }
.wm__line {
  position: absolute; inset: 0; color: transparent; -webkit-text-stroke: 1.5px var(--stencil);
  transform: translate(0.028em, 0.022em);
  clip-path: inset(0 0 0 0);
}
.wm__ink { position: relative; color: var(--ink); }
.js .wm__line { clip-path: inset(0 100% 0 0); animation: wipe 0.9s var(--ease-inout) 0.15s forwards; }
.js .wm__ink { clip-path: inset(0 100% 0 0); animation: wipe 1.25s var(--ease-inout) 0.85s forwards; }
@keyframes wipe { to { clip-path: inset(0 0 0 0); } }

.hero__row {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px 48px; align-items: end;
  margin-top: clamp(24px, 4vw, 44px); padding-top: 24px; border-top: 1.5px solid var(--ink);
}
.hero__lede { font-size: clamp(19px, 2.2vw, 24px); line-height: 1.4; max-width: 30ch; }
.hero__side { display: grid; gap: 18px; justify-items: start; }
.rating { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 15.5px; color: var(--grey); }
.rating strong { color: var(--ink); font-weight: 700; }
.rating__stars { color: var(--ink); letter-spacing: 2px; font-size: 15px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 760px) {
  .hero__row { grid-template-columns: 1fr; }
}

/* ------------ secções ------------ */
.sec { max-width: var(--max); margin: 0 auto; padding: clamp(56px, 8vw, 104px) var(--gutter) 0; }
.sec--tight { padding-top: clamp(48px, 7vw, 88px); }
.sec__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 24px; margin-bottom: 24px; }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 20px 48px; align-items: start; }
.split__body { display: grid; gap: 20px; justify-items: start; max-width: 62ch; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent;
  font: inherit; font-size: 15px; font-weight: 500; color: var(--grey); cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.chip[aria-pressed="true"], .chip:has(input:checked) { background: var(--ink); border-color: var(--ink); color: var(--white); }
@media (hover: hover) and (pointer: fine) { .chip:hover { border-color: var(--ink); color: var(--ink); } .chip[aria-pressed="true"]:hover, .chip:has(input:checked):hover { color: var(--white); } }

/* folha de flash: grelha com linhas, como uma folha de desenhos */
.sheet {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  background: var(--white); border: 1.5px solid var(--ink);
}
.sheet > * { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sheet > *:nth-child(3n) { border-right: 0; }
@media (max-width: 760px) {
  .sheet { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sheet > *:nth-child(3n) { border-right: 1px solid var(--line); }
  .sheet > *:nth-child(2n) { border-right: 0; }
}
.flash, .work { position: relative; margin: 0; aspect-ratio: 4 / 5; display: grid; grid-template-rows: 1fr auto; }
.flash svg { width: 62%; margin: auto; overflow: visible; }
.flash g { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.flash .f { fill: currentColor; stroke: none; }
.flash text { fill: currentColor; stroke: none; font-family: var(--display); }
.flash .st { color: var(--stencil); transform: translate(1.8px, 1.5px); }
.flash .in { color: var(--ink); }
figcaption { padding: 10px 14px 12px; font-size: 14.5px; color: var(--grey); display: flex; justify-content: space-between; gap: 8px; }
figcaption b { color: var(--ink); font-weight: 600; }
.work img { width: 100%; height: 100%; object-fit: cover; min-height: 0; }
.work { grid-template-rows: minmax(0, 1fr) auto; }
.sheet__note { margin-top: 12px; font-size: 14px; color: var(--grey); }
.sheet__note:empty { display: none; }
.is-out { display: none; }

/* passos (sequência real) */
.steps { list-style: none; counter-reset: s; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1.5px solid var(--ink); }
.steps li { counter-increment: s; padding: 22px 24px 4px 0; display: grid; gap: 8px; align-content: start; }
.steps li + li { padding-left: 24px; border-left: 1px solid var(--line); }
.steps li::before { content: counter(s); font-family: var(--display); font-size: 44px; line-height: 1; color: var(--stencil); }
.steps p { color: var(--grey); max-width: 34ch; }
@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr; }
  .steps li, .steps li + li { padding: 18px 0; border-left: 0; border-bottom: 1px solid var(--line); grid-template-columns: 44px 1fr; column-gap: 12px; }
  .steps li::before { grid-row: span 2; font-size: 38px; }
}

/* ------------ orçamento ------------ */
.quote { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 28px 56px; align-items: start; }
.quote__intro { position: sticky; top: 96px; display: grid; gap: 14px; }
.quote__intro p { color: var(--grey); max-width: 34ch; }
.quote__alt a { color: var(--ink); font-weight: 600; text-underline-offset: 3px; }
@media (max-width: 860px) { .quote { grid-template-columns: 1fr; } .quote__intro { position: static; } }

.form, .done {
  display: grid; gap: 22px; padding: clamp(20px, 3.5vw, 36px); background: var(--white);
  border: 1.5px solid var(--ink); border-radius: 6px;
}
.field { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field__label, legend { padding: 0; font-weight: 600; font-size: 15.5px; }
.opt { font-weight: 400; color: var(--grey); }
.form input:not([type=radio]):not([type=checkbox]):not([type=file]), .form select, .form textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 4px; border: 1px solid var(--line);
  background: var(--paper); color: var(--ink); font: inherit; font-size: 16px;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.form textarea { resize: vertical; min-height: 110px; line-height: 1.45; }
.form select { appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m7 10 5 5 5-5' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 20px; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--stencil); background-color: var(--white); box-shadow: 0 0 0 3px var(--stencil-soft); }
.form ::placeholder { color: #8d8d88; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .two { grid-template-columns: 1fr; } }

.seg { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.seg--3 { grid-template-columns: repeat(3, 1fr); }
.seg label { position: relative; }
.seg label + label { border-left: 1px solid var(--line); }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: grid; place-items: center; min-height: 48px; padding: 0 8px; text-align: center; font-weight: 500; font-size: 15.5px; line-height: 1.2; transition: background-color 0.15s ease, color 0.15s ease; }
.seg input:checked + span { background: var(--ink); color: var(--white); }
.seg input:focus-visible + span { outline: 2px solid var(--stencil); outline-offset: -4px; }
.chips--form .chip { position: relative; display: inline-flex; align-items: center; }
.chips--form .chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chips--form .chip:has(input:focus-visible) { outline: 2px solid var(--stencil); outline-offset: 2px; }

.refs { display: flex; flex-wrap: wrap; gap: 10px; }
.refs__add, .ref { width: 96px; height: 96px; border-radius: 4px; }
.refs__add {
  position: relative; display: grid; place-content: center; justify-items: center; gap: 4px; cursor: pointer;
  border: 1.5px dashed var(--stencil); color: var(--stencil); font-size: 12.5px; font-weight: 600; text-align: center; line-height: 1.2;
}
.refs__add svg { width: 22px; }
.refs__add input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.refs__add:focus-within { outline: 2px solid var(--stencil); outline-offset: 2px; }
.ref { position: relative; overflow: hidden; border: 1px solid var(--line); }
.ref img { width: 100%; height: 100%; object-fit: cover; }
.ref button {
  position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 50%; border: 0;
  display: grid; place-items: center; background: rgba(0, 0, 0, 0.75); color: #fff; cursor: pointer; padding: 0;
}
.ref button::after { content: ""; position: absolute; inset: -8px; }
.ref button svg { width: 14px; }

.check { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; font-size: 15.5px; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--ink); cursor: pointer; }
.form__foot { display: grid; gap: 12px; justify-items: start; }
.form__err { color: var(--err); font-weight: 600; font-size: 15.5px; }
.form__err:empty { display: none; }
[data-only].is-off { display: none; }

.done { justify-items: start; gap: 14px; }
.done:focus { outline: none; }
.done__mark { width: 52px; height: 52px; padding: 8px; border-radius: 50%; background: var(--ink); color: var(--white); }
.done h3 { font-family: var(--display); font-weight: 400; font-size: 42px; line-height: 1; }
.done p { color: var(--grey); max-width: 46ch; }
.done__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.done__demo { font-size: 14px; }
.done__demo a { color: var(--stencil); font-weight: 600; }
.js .done:not([hidden]) .done__mark path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw 0.5s var(--ease-out) 0.15s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ------------ avaliações ------------ */
.reviews { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1.5px solid var(--ink); }
.review { margin: 0; padding: 26px 28px 26px 0; display: grid; gap: 14px; align-content: start; border-bottom: 1px solid var(--line); }
.review:nth-child(2n) { padding-left: 28px; padding-right: 0; border-left: 1px solid var(--line); }
.review blockquote { margin: 0; font-size: clamp(18px, 1.9vw, 21px); line-height: 1.45; max-width: 44ch; }
.review figcaption { padding: 0; display: block; font-size: 15px; }
@media (max-width: 760px) {
  .reviews { grid-template-columns: 1fr; }
  .review, .review:nth-child(2n) { padding: 22px 0; border-left: 0; }
}

/* ------------ cuidados / perguntas ------------ */
.care { margin: 0; padding: 0; list-style: none; display: grid; border-top: 1.5px solid var(--ink); width: 100%; }
.care li { padding: 14px 0 14px 30px; border-bottom: 1px solid var(--line); position: relative; }
.care li::before { content: ""; position: absolute; left: 4px; top: 25px; width: 12px; height: 1.5px; background: var(--stencil); }
.care__note { font-size: 15px; color: var(--grey); }
.faq { gap: 0; border-top: 1.5px solid var(--ink); width: 100%; max-width: none; }
.faq details { border-bottom: 1px solid var(--line); width: 100%; }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  min-height: 60px; padding: 14px 0; font-weight: 600; font-size: 17.5px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 12px; height: 12px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: translateY(-3px) rotate(45deg); transition: transform 0.2s var(--ease-out); }
.faq details[open] summary::after { transform: translateY(3px) rotate(-135deg); }
.faq details p { padding: 0 0 18px; color: var(--grey); max-width: 60ch; }

/* ------------ visita ------------ */
.visit__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px 56px; margin-top: 26px; padding-top: 24px; border-top: 1.5px solid var(--ink); }
.visit__addr { font-size: clamp(20px, 2.3vw, 26px); line-height: 1.35; max-width: 24ch; }
.visit__links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.hours { width: 100%; border-collapse: collapse; font-size: 17px; }
.hours td { padding: 12px 0; border-bottom: 1px solid var(--line); }
.hours td:first-child::first-letter { text-transform: uppercase; }
.hours td:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.hours tr.is-today td { color: var(--stencil); }
.hours tr.is-today td:first-child::after { content: " (hoje)"; font-weight: 400; text-transform: none; }
@media (max-width: 760px) { .visit__grid { grid-template-columns: 1fr; } }

/* ------------ rodapé ------------ */
.foot {
  max-width: var(--max); margin: clamp(64px, 9vw, 120px) auto 0; padding: 26px var(--gutter) 110px;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 24px; border-top: 1px solid var(--line);
  font-size: 14px; color: var(--grey);
}
.foot__brand { font-family: var(--display); font-size: 30px; color: var(--ink); line-height: 1; }
.foot p { margin-right: auto; }
.foot a { color: var(--ink); font-weight: 600; }
@media (min-width: 761px) { .foot { padding-bottom: 40px; } }

/* botão fixo no telemóvel */
.m-cta {
  position: fixed; left: 16px; right: 16px; bottom: max(14px, env(safe-area-inset-bottom)); z-index: 40;
  min-height: 54px; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s var(--ease-out), opacity 0.2s ease;
}
.m-cta.is-away { transform: translateY(140%); opacity: 0; pointer-events: none; }
@media (min-width: 761px) { .m-cta { display: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .wm__line, .js .wm__ink { animation: none; clip-path: none; }
  .js .done:not([hidden]) .done__mark path { animation: none; stroke-dashoffset: 0; }
  * { transition-duration: 0.01ms !important; }
}
