/* Paleta: veludo quente (não é preto), texto blush claro, batom no preço, na seleção e nas etiquetas. */
:root {
  --velvet: #24101B;
  --velvet-2: #31172A;
  --velvet-3: #45233A;
  --velvet-4: #5B3350;
  --blush: #FBEFEA;
  --blush-2: #E3C8CF;
  --blush-3: #B99CA8;
  --lipstick: #F0416A;
  --satin: #F6D9D0;
  --rose: #C84B78;

  --display: "Young Serif", "Georgia", "Times New Roman", serif;
  --text: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --col: 34rem;
  --gutter: 1.25rem;
  --radius: 1.25rem;
}

* { box-sizing: border-box; }

html { color-scheme: dark; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  overflow-x: clip;
  background: var(--velvet);
  color: var(--blush);
  font: 400 1.0625rem/1.5 var(--text);
  -webkit-font-smoothing: antialiased;
}

/* Grão fino por cima de tudo: tira o aspeto de ecrã liso. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

body:has(dialog[open]) { overflow: hidden; }

a { color: inherit; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: left;
}

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

.page {
  position: relative;
  max-width: var(--col);
  margin: 0 auto;
  padding-bottom: 3rem;
}

/* ---------- Capa ---------- */

.hero {
  position: relative;
  padding: 0 0 3rem;
}

/* A própria foto, desfocada, a iluminar o que está por baixo.
   Fica num quadro próprio, recortado, para nunca cortar o nome nem o botão. */
.hero-ambient {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-ambient::before {
  content: "";
  position: absolute;
  left: -25%;
  right: -25%;
  top: 30%;
  bottom: 0;
  background-image: inherit;
  background-position: center 30%;
  background-size: cover;
  filter: blur(48px) saturate(1.6);
  opacity: 0.55;
}

.hero-ambient::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 45%, var(--velvet) 92%);
}

.hero > :where(:not(.hero-ambient)) { position: relative; z-index: 1; }

.hero-photo {
  aspect-ratio: 4 / 5;
  width: 100%;
  overflow: hidden;
}

/* Autocolante redondo a rodar devagar no canto da foto. */
.sticker {
  position: absolute;
  z-index: 3;
  top: 1rem;
  right: 1rem;
  width: 6.5rem;
  height: 6.5rem;
  display: grid;
  place-items: center;
  color: var(--satin);
}

.sticker svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: turn 26s linear infinite;
}

.sticker-ring {
  font: 400 11.5px var(--display);
  fill: currentColor;
}

.sticker-core {
  position: relative;
  font: 400 1.5rem / 1 var(--display);
  color: var(--blush);
  text-shadow: 0 1px 8px rgba(10, 3, 7, 0.6);
}

@keyframes turn { to { transform: rotate(360deg); } }

.hero-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, var(--velvet) 0%, rgba(36, 16, 27, 0.55) 22%, transparent 50%);
}

.hero-photo img,
.strip-photo img,
.row-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-name {
  z-index: 2;
  margin: -1.1em var(--gutter) 0;
  font: 400 clamp(3rem, 16.5vw, 5.6rem) / 0.95 var(--display);
  letter-spacing: -0.02em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.hero-line {
  position: relative;
  margin: 1rem var(--gutter) 1rem;
  max-width: 24ch;
  font-size: 1.25rem;
  line-height: 1.35;
  color: var(--blush-2);
}

.hero-line { margin-bottom: 1.5rem; }

/* Mais específico que .btn-primary, que também define a largura. */
.hero .hero-cta {
  display: flex;
  margin-inline: var(--gutter);
  width: calc(100% - 2 * var(--gutter));
}

/* ---------- Fotos vazias ---------- */

.ph {
  position: relative;
  background:
    radial-gradient(110% 80% at 20% 15%, #7A3A58 0%, transparent 60%),
    radial-gradient(90% 80% at 85% 90%, #B04C73 0%, transparent 55%),
    linear-gradient(160deg, #4A2740, #31172A);
}

.ph::after {
  content: attr(data-label);
  position: absolute;
  left: 0.75rem;
  top: 0.65rem;
  font-size: 0.75rem;
  color: var(--blush-2);
  opacity: 0.8;
}

.ph:has(img)::after { display: none; }

.ph-thumb {
  background:
    radial-gradient(100% 90% at 25% 20%, var(--a, #7A3A58) 0%, transparent 65%),
    linear-gradient(160deg, var(--b, #4A2740), var(--velvet-2));
}

/* ---------- Sobre: ela a falar ---------- */

.about { padding: 0 0 1rem; }

.about-quote {
  position: relative;
  margin: 0 var(--gutter);
  padding-left: 2.25rem;
  max-width: 34ch;
}

.about-quote::before {
  content: "“";
  position: absolute;
  left: -0.1rem;
  top: -0.9rem;
  font: 400 4.5rem / 1 var(--display);
  color: var(--lipstick);
}

.about-quote p {
  margin: 0;
  font: 400 1.35rem / 1.35 var(--display);
}

/* ---------- Faixa a deslizar ---------- */

.marquee {
  margin: 2.5rem -1rem 3rem;
  padding: 0.6rem 0;
  background: var(--lipstick);
  color: var(--velvet);
  transform: rotate(-1.5deg);
  overflow: hidden;
  white-space: nowrap;
}

.marquee-track {
  display: inline-flex;
  animation: slide 40s linear infinite;
}

.marquee-track > span {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding-right: 1rem;
  font: 400 1.25rem / 1 var(--display);
}

.spark { font-size: 0.9rem; }

@keyframes slide { to { transform: translateX(-33.333%); } }

/* ---------- Mural de fotos ---------- */

.gallery { padding: 0 0 3rem; }

.mosaic {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem 0.9rem;
  padding: 1rem var(--gutter) 1.5rem;
}

.tile {
  display: block;
  width: 100%;
  padding: 0.35rem 0.35rem 0.35rem;
  background: var(--satin);
  border-radius: 0.3rem;
  box-shadow: 0 14px 30px rgba(10, 3, 7, 0.5);
  transition: transform 160ms ease;
}

.tile:nth-child(odd) { transform: rotate(-2.5deg); }
.tile:nth-child(even) { transform: rotate(2deg) translateY(1.5rem); }
.tile:nth-child(3n) { transform: rotate(1deg) translateY(-0.4rem); }

.tile:hover { transform: rotate(0) scale(1.03); }

.tile-photo {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 0.15rem;
}

.tile-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.lightbox {
  max-width: min(96vw, 40rem);
  max-height: 94dvh;
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 0.75rem;
  background: var(--velvet-2);
  overflow: hidden;
  cursor: zoom-out;
}

.lightbox::backdrop { background: rgba(14, 6, 10, 0.88); }

.lightbox img {
  display: block;
  max-width: 100%;
  max-height: 94dvh;
}

/* ---------- Títulos ---------- */

.h-display {
  margin: 0 var(--gutter) 0.5rem;
  font: 400 2.25rem / 1.05 var(--display);
  letter-spacing: -0.01em;
}

/* ---------- Menu ---------- */

.menu { padding: 0 0 3rem; }

.menu-lead {
  margin: 0 var(--gutter) 1.25rem;
  color: var(--blush-2);
}

.menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.row {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 1rem;
  align-items: center;
  width: 100%;
  padding: 0.8rem var(--gutter);
  transition: background-color 120ms ease;
}

.row:hover,
.row:active { background: var(--velvet-2); }

.row-thumb {
  aspect-ratio: 4 / 5;
  border-radius: 0.65rem;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(10, 3, 7, 0.4);
}

.row-body { min-width: 0; }

.row-head {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.row-name {
  font: 400 1.3rem / 1.15 var(--display);
  letter-spacing: -0.01em;
}

.tag {
  display: inline-block;
  vertical-align: 0.1em;
  margin-right: 0.35rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: var(--lipstick);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.row-leader {
  flex: 1;
  border-bottom: 2px dotted var(--velvet-4);
  transform: translateY(-0.3em);
  min-width: 1rem;
}

.row-price {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--lipstick);
  white-space: nowrap;
}

.row-price.is-undefined {
  color: var(--blush-3);
  font-weight: 400;
}

.row-sub {
  display: block;
  margin-top: 0.25rem;
  color: var(--blush-2);
  font-size: 0.9375rem;
  line-height: 1.4;
}

.menu-note {
  margin: 1.5rem var(--gutter) 0;
  color: var(--blush-3);
  font-size: 0.9375rem;
}

/* ---------- Como funciona ---------- */

.how { padding: 0 var(--gutter) 3rem; }

.how-panel {
  padding: 1.5rem 0 0.5rem;
  border-radius: var(--radius);
  background: linear-gradient(170deg, var(--velvet-3), var(--velvet-2));
}

.how-panel .h-display { margin-bottom: 1rem; }

.steps {
  margin: 0 var(--gutter);
  padding: 0;
  list-style: none;
  counter-reset: step;
  max-width: 40ch;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 2.75rem;
  margin-bottom: 1rem;
  color: var(--blush-2);
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -0.1em;
  font: 400 1.6rem / 1 var(--display);
  color: var(--satin);
}

/* ---------- Rodapé ---------- */

.foot {
  padding: 1rem var(--gutter) 0;
  display: grid;
  gap: 1rem;
}

.foot-lead {
  margin: 0;
  font: 400 1.5rem / 1.15 var(--display);
}

.foot-small {
  margin: 0.5rem 0 0;
  color: var(--blush-3);
  font-size: 0.875rem;
  max-width: 40ch;
}

/* ---------- Botões ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1.0625rem;
  text-decoration: none;
  transition: transform 100ms ease, background-color 120ms ease;
}

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

.btn-primary {
  background: var(--satin);
  color: var(--velvet);
  width: 100%;
  box-shadow: 0 10px 30px rgba(240, 65, 106, 0.18);
}

.btn-primary:hover { background: var(--blush); }

.btn-primary:disabled {
  background: var(--velvet-4);
  color: var(--blush-3);
  box-shadow: none;
  cursor: default;
}

.btn-text {
  color: var(--blush-2);
  min-height: 2.5rem;
  padding: 0 0.5rem;
  width: 100%;
  justify-content: center;
  box-shadow: none;
}

.btn-text:hover { color: var(--blush); }

/* ---------- Janela (folha inferior no telemóvel) ---------- */

.sheet {
  width: 100%;
  max-width: var(--col);
  max-height: 92dvh;
  margin: auto auto 0;
  padding: 0;
  border: 0;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--velvet-2);
  color: var(--blush);
  overflow: auto;
  overscroll-behavior: contain;
}

.sheet::backdrop { background: rgba(14, 6, 10, 0.75); }

.sheet[open] { animation: sheet-in 320ms cubic-bezier(0.2, 0.8, 0.2, 1); }
.sheet[open]::backdrop { animation: fade-in 240ms ease; }

@keyframes sheet-in {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.sheet-inner {
  padding: 0.75rem var(--gutter) calc(1.25rem + env(safe-area-inset-bottom));
}

.sheet-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 2.5rem;
  margin-bottom: 0.5rem;
}

.sheet-bar .icon-btn { margin-left: auto; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  color: var(--blush-2);
}

.icon-btn:hover { background: var(--velvet-3); color: var(--blush); }

.icon-btn svg { width: 1.25rem; height: 1.25rem; }

.sheet-hero {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.sheet-thumb {
  aspect-ratio: 4 / 5;
  border-radius: 0.75rem;
  overflow: hidden;
}

.sheet-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.sheet-title {
  margin: 0;
  font: 400 1.9rem / 1.05 var(--display);
  letter-spacing: -0.01em;
}

.sheet-text {
  margin: 0 0 1.5rem;
  color: var(--blush-2);
  max-width: 40ch;
}

.sheet-sub {
  margin: 1.5rem 0 0.5rem;
  font-size: 0.9375rem;
  color: var(--blush-3);
}

.sheet-sub:first-of-type { margin-top: 0; }

.summary {
  margin: 0 0 1rem;
  font-size: 1.125rem;
}

.summary strong {
  font-weight: 600;
  color: var(--lipstick);
  font-variant-numeric: tabular-nums;
}

.demo-note {
  margin: 0 0 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.6rem;
  background: var(--velvet-3);
  color: var(--blush-2);
  font-size: 0.9375rem;
}

/* Listas de escolha: opções e métodos */

.choice-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.choice {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  padding: 0.85rem 0;
  border-top: 1px solid var(--velvet-3);
}

.choice-list li:first-child .choice { border-top: 0; }

.choice-mark {
  flex: 0 0 2.5rem;
  display: grid;
  place-items: center;
  color: var(--blush-2);
}

.choice-mark svg {
  width: 1.4rem;
  height: 1.4rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.choice-ticker {
  flex: 0 0 2.5rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--blush-2);
}

.choice-body { flex: 1; min-width: 0; }

.choice-name { display: block; font-weight: 600; }

.choice-detail {
  display: block;
  color: var(--blush-3);
  font-size: 0.9rem;
}

.choice-price {
  font-variant-numeric: tabular-nums;
  color: var(--lipstick);
  font-weight: 600;
  white-space: nowrap;
}

.choice-price.is-undefined { color: var(--blush-3); font-weight: 400; }

.radio {
  flex: 0 0 1.25rem;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  border: 1.5px solid var(--blush-3);
  position: relative;
  transition: border-color 120ms ease;
}

.choice[aria-checked="true"] .radio { border-color: var(--lipstick); }

.choice[aria-checked="true"] .radio::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--lipstick);
}

.choice[aria-checked="true"] .choice-mark,
.choice[aria-checked="true"] .choice-ticker { color: var(--blush); }

.sheet-actions {
  margin-top: 1.5rem;
  display: grid;
  gap: 0.5rem;
}

/* Estado de ligação */

.wait {
  padding: 3rem 0;
  text-align: center;
  color: var(--blush-2);
}

.wait-dot {
  width: 2.5rem;
  height: 2.5rem;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  border: 2px solid var(--velvet-4);
  border-top-color: var(--satin);
  animation: spin 900ms linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Confirmação */

.ref {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1.5rem;
  padding: 0.9rem 1rem;
  border-radius: 0.75rem;
  background: var(--velvet-3);
}

.ref-label {
  display: block;
  font-size: 0.8125rem;
  color: var(--blush-3);
}

.ref-code {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}

.ref-copy {
  flex: 0 0 auto;
  min-height: 2.25rem;
  padding: 0 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--blush-3);
  font-size: 0.875rem;
  font-weight: 600;
}

.ref-copy:hover { border-color: var(--blush); }

/* ---------- Ecrã largo ---------- */

@media (min-width: 640px) {
  :root { --gutter: 1.75rem; }

  .page { padding-top: 2rem; }

  .hero-photo { border-radius: 1rem; }

  .sheet {
    margin: auto;
    max-width: 30rem;
    max-height: 86vh;
    border-radius: var(--radius);
  }

  .sheet[open] { animation-name: sheet-in-center; }

  @keyframes sheet-in-center {
    from { transform: translateY(12px) scale(0.98); opacity: 0; }
    to { transform: none; opacity: 1; }
  }
}

@media (prefers-reduced-motion: reduce) {
  .sheet[open],
  .sheet[open]::backdrop,
  .sticker svg,
  .marquee-track { animation: none; }
  .wait-dot { animation-duration: 2s; }
  .btn, .row, .radio, .tile { transition: none; }
}
