/* Revolution Hoodie Collection. Fontes da marca (Praktika e Graphie), servidas daqui. */
@font-face { font-family: "Praktika"; src: url("assets/fonts/praktika-bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Praktika Ext"; src: url("assets/fonts/praktika-black-ext.woff2") format("woff2"); font-weight: 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Praktika Ext"; src: url("assets/fonts/praktika-light-ext.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Graphie"; src: url("assets/fonts/graphie-book.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Graphie"; src: url("assets/fonts/graphie-semibold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  --papel: #eeebe6;
  --papel-2: #e6e2dc;
  --tinta: #27272a;
  --tinta-2: #6b6862;
  --linha: rgba(39, 39, 42, .14);
  --vermelho: #e23339;
  --tecido: #151214;          /* muda com a cor escolhida */
  --estampa: #dcd2bf;
  --raio: 6px;
  --fundo-estudio: #c4c2c0;
  --t-cor: 700ms;
  --pad: clamp(18px, 3.2vw, 56px);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--papel);
  color: var(--tinta);
  font-family: "Graphie", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}
button { font: inherit; color: inherit; }
img { display: block; }

/* grão subtil, como papel de catálogo */
.grao {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .5;
  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='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.15 0 0 0 0 0.14 0 0 0 0 0.13 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- topo ---------- */
.topo {
  position: relative; z-index: 3;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(env(safe-area-inset-top) + 18px) var(--pad) 0;
}
.marca { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--tinta); }
.marca img { width: 30px; height: auto; }
.marca span { font-family: "Praktika Ext"; font-weight: 300; font-size: 11px; letter-spacing: .32em; text-transform: uppercase; }
.ligacao-tv {
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--tinta-2);
  text-decoration: none; padding: 8px 0; border-bottom: 1px solid transparent; transition: color .2s, border-color .2s;
}
.ligacao-tv:hover { color: var(--tinta); border-color: var(--tinta); }

/* ---------- estrutura (telemóvel primeiro) ---------- */
.palco {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas: "titulo" "cena" "cores";
  gap: 22px;
  padding: 22px var(--pad) 28px;
}
.titulo { grid-area: titulo; text-align: center; container-type: inline-size; }
.cena { grid-area: cena; position: relative; display: flex; flex-direction: column; align-items: center; }
.cores { grid-area: cores; display: flex; flex-direction: column; align-items: center; gap: 18px; }

/* ---------- título ---------- */
.sobre {
  margin: 0 0 14px; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--tinta-2);
}
h1 { margin: 0; font-weight: normal; line-height: .9; }
.t1 {
  display: block; font-family: "Praktika Ext"; font-weight: 900; text-transform: uppercase;
  font-size: clamp(34px, 10.4vw, 64px); letter-spacing: -.005em;
}
.t2 {
  display: block; margin-top: 12px; font-family: "Praktika Ext"; font-weight: 300; text-transform: uppercase;
  font-size: clamp(11px, 3.1vw, 15px); letter-spacing: .46em; padding-left: .46em; color: var(--tinta);
}
.slogan {
  display: none;
  margin: 0; font-family: "Praktika"; font-weight: 700; text-transform: uppercase;
  font-size: 15px; letter-spacing: .06em; line-height: 1.15;
}

/* ---------- cena: o estúdio ---------- */
.pack-fundo {
  position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%);
  font-family: "Praktika Ext"; font-weight: 900; font-size: clamp(120px, 44vw, 520px); line-height: 1;
  color: transparent; -webkit-text-stroke: 1.2px rgba(39, 39, 42, .09); letter-spacing: -.02em;
  pointer-events: none; user-select: none; white-space: nowrap; z-index: 0;
}
.aura {
  position: absolute; left: 50%; top: 46%; width: 86%; aspect-ratio: 1; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, color-mix(in srgb, var(--tecido) 26%, transparent), transparent 72%);
  filter: blur(18px); opacity: .9; transition: background var(--t-cor) ease; z-index: 0; pointer-events: none;
}
.estudio {
  position: relative; z-index: 1;
  width: min(100%, 520px, calc((100svh - 330px) * .8));
  min-width: 240px;
  aspect-ratio: 720 / 900;
  perspective: 1800px; -webkit-perspective: 1800px;
  touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent; outline: none;
}
.estudio:focus-visible { outline: 2px solid var(--tinta); outline-offset: 6px; border-radius: var(--raio); }
.estudio.a-arrastar { cursor: grabbing; }
.camada {
  position: absolute; inset: 0; perspective: 1800px; -webkit-perspective: 1800px;
  transition: opacity var(--t-cor) cubic-bezier(.4, 0, .2, 1);
}
.camada[data-ativo="0"] { opacity: 0; pointer-events: none; }
.cartao {
  position: absolute; inset: 0; border-radius: var(--raio); overflow: hidden;
  background: var(--fundo-estudio); will-change: transform;
  box-shadow: 0 1px 0 rgba(255,255,255,.5) inset, 0 30px 60px -28px rgba(30, 26, 22, .45), 0 8px 18px -10px rgba(30, 26, 22, .25);
}
.cartao img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.cartao[data-lado="frente"] img.costas, .cartao[data-lado="costas"] img.frente { visibility: hidden; }
/* sombreado durante a volta, para o cartão se ler como um objeto a rodar */
.cartao::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(var(--sombra-dir, 90deg), rgba(0,0,0,.3), rgba(0,0,0,0) 60%);
  opacity: var(--sombra, 0);
}

.sim {
  position: absolute; left: 0; right: 0; top: 50%; width: 100%; aspect-ratio: 1; transform: translateY(-50%);
  object-fit: cover; border-radius: var(--raio); background: var(--fundo-estudio);
  opacity: 0; pointer-events: none; transition: opacity .45s ease;
  box-shadow: 0 30px 60px -28px rgba(30, 26, 22, .45);
}
.modo-sim .sim { opacity: 1; }
.modo-sim .camada { opacity: 0 !important; }

.dica {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: rgba(39,39,42,.62);
  background: rgba(238, 235, 230, .72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  padding: 7px 12px; border-radius: 999px; pointer-events: none; white-space: nowrap;
  transition: opacity .6s ease;
}
.dica.escondida { opacity: 0; }

.sem-js { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; max-width: 720px; }
.sem-js img { width: 100%; border-radius: var(--raio); }

/* ---------- controlos ---------- */
.controlos { position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.segmento { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(39,39,42,.07); }
.segmento button {
  border: 0; background: transparent; padding: 9px 18px; border-radius: 999px; cursor: pointer;
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--tinta-2);
  transition: background .25s, color .25s, box-shadow .25s;
}
.segmento button[aria-pressed="true"] { background: #fff; color: var(--tinta); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.botao-icone {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--linha); background: transparent;
  display: inline-grid; place-items: center; cursor: pointer; transition: background .2s, border-color .2s;
}
.botao-icone:hover, .botao-sim:hover { border-color: var(--tinta); }
.botao-icone svg { width: 16px; height: 16px; fill: var(--tinta); grid-area: 1 / 1; }
.botao-icone[aria-pressed="true"] .i-rodar,
.botao-icone[aria-pressed="false"] .i-pausa { display: none; }
.botao-sim {
  height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--linha); background: transparent; cursor: pointer;
  font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--tinta-2); transition: all .2s;
}
.botao-sim[aria-pressed="true"] { background: var(--tinta); color: var(--papel); border-color: var(--tinta); }
button:focus-visible { outline: 2px solid var(--tinta); outline-offset: 3px; }
.nota { max-width: 420px; margin: 12px auto 0; font-size: 12px; color: var(--tinta-2); text-align: center; }

/* ---------- cores ---------- */
.indicador { text-align: center; display: grid; gap: 3px; }
.num { font-family: "Praktika Ext"; font-weight: 300; font-size: 11px; letter-spacing: .3em; color: var(--tinta-2); }
.nome-cor { margin: 0; font-family: "Praktika Ext"; font-weight: 900; font-size: 22px; text-transform: uppercase; letter-spacing: .02em; line-height: 1.05; }
.estampa { font-size: 13px; color: var(--tinta-2); display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.estampa::before {
  content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--estampa);
  box-shadow: 0 0 0 1px rgba(39,39,42,.25); transition: background var(--t-cor);
}
.amostras { display: flex; gap: clamp(10px, 3vw, 18px); justify-content: center; flex-wrap: nowrap; }
.amostra {
  position: relative; border: 0; padding: 0; background: none; cursor: pointer;
  display: grid; justify-items: center; gap: 8px; -webkit-tap-highlight-color: transparent;
}
.amostra .disco {
  width: clamp(48px, 13vw, 64px); aspect-ratio: 1; border-radius: 50%; overflow: hidden; position: relative;
  box-shadow: 0 0 0 1px rgba(39,39,42,.12), 0 6px 14px -8px rgba(0,0,0,.45);
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s;
}
.amostra .disco img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.02); }
.amostra::after {
  content: ""; position: absolute; top: -5px; left: 50%; transform: translateX(-50%) scale(.9);
  width: calc(clamp(48px, 13vw, 64px) + 10px); aspect-ratio: 1; border-radius: 50%;
  border: 1.5px solid var(--tinta); opacity: 0; transition: opacity .3s, transform .35s cubic-bezier(.2, .8, .2, 1);
}
.amostra[aria-checked="true"]::after { opacity: 1; transform: translateX(-50%) scale(1); }
.amostra:hover .disco { transform: translateY(-2px); }
.amostra .rotulo { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--tinta-2); white-space: nowrap; }
.amostra[aria-checked="true"] .rotulo { color: var(--tinta); }
.amostra:focus-visible { outline: none; }
.amostra:focus-visible .disco { box-shadow: 0 0 0 2px var(--papel), 0 0 0 4px var(--tinta); }
.progresso { display: none; }

/* ---------- rodapé e aviso ---------- */
.rodape {
  position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px var(--pad) calc(env(safe-area-inset-bottom) + 18px);
  font-size: 11px; letter-spacing: .08em; color: var(--tinta-2);
}
.aviso {
  position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 20px); transform: translateX(-50%); z-index: 9;
  max-width: min(92vw, 460px); padding: 12px 16px; border-radius: 10px; background: var(--tinta); color: var(--papel);
  font-size: 13px; box-shadow: 0 10px 30px rgba(0,0,0,.2);
}

/* telemóvel pequeno: as legendas das amostras saem, o indicador diz a cor */
@media (max-width: 400px) {
  .amostra .rotulo { display: none; }
}

/* ---------- tablet vertical ---------- */
@media (min-width: 700px) and (orientation: portrait) {
  .estudio { width: min(100%, 600px, calc((100svh - 420px) * .8)); }
  .amostra .rotulo { font-size: 11px; }
}

/* ---------- computador, tablet deitado e televisão: três colunas ---------- */
@media (min-width: 900px) and (orientation: landscape), (min-width: 1100px) {
  body { min-height: 100svh; display: flex; flex-direction: column; }
  .palco {
    flex: 1;
    grid-template-columns: minmax(250px, 1fr) minmax(0, auto) minmax(230px, 1fr);
    grid-template-areas: "titulo cena cores";
    align-items: center; gap: clamp(24px, 3.5vw, 80px);
    padding-top: clamp(8px, 2vh, 30px); padding-bottom: clamp(8px, 2vh, 24px);
  }
  .titulo { text-align: left; align-self: stretch; display: flex; flex-direction: column; justify-content: center; gap: clamp(20px, 6vh, 90px); }
  .sobre { margin-bottom: 0; }
  .t1 { font-size: clamp(26px, 11cqi, 120px); }
  .t2 { font-size: clamp(11px, .95vw, 22px); padding-left: 0; margin-top: clamp(12px, 1.6vh, 24px); }
  .slogan { display: block; font-size: clamp(14px, 1.25vw, 28px); }
  .slogan::before { content: ""; display: block; width: 34px; height: 2px; background: var(--vermelho); margin-bottom: 16px; }
  .estudio { width: min(40vw, calc((100svh - 210px) * .8)); min-width: 300px; }
  .pack-fundo { font-size: min(34vw, 46svh); top: 46%; }
  .cores { align-items: flex-start; gap: clamp(18px, 3.4vh, 44px); }
  .indicador { text-align: left; }
  .estampa { justify-content: flex-start; }
  .nome-cor { font-size: clamp(22px, 2vw, 44px); }
  .num { font-size: clamp(11px, .8vw, 16px); }
  .estampa { font-size: clamp(13px, .9vw, 19px); }
  .amostras { flex-direction: column; gap: clamp(10px, 1.6vh, 22px); }
  .amostra { grid-template-columns: auto 1fr; align-items: center; justify-items: start; gap: 16px; }
  .amostra .disco { width: clamp(46px, 3.6vw, 84px); }
  .amostra::after { top: 50%; left: 0; width: calc(clamp(46px, 3.6vw, 84px) + 10px); transform: translate(-5px, -50%) scale(.9); }
  .amostra[aria-checked="true"]::after { transform: translate(-5px, -50%) scale(1); }
  .amostra .rotulo { display: block; font-size: clamp(10px, .75vw, 15px); }
  .amostra:hover .disco { transform: translateX(3px); }
}

/* ---------- modo TV: ecrã inteiro, sem controlos, cores a alternar ---------- */
.tv body, body.tv { cursor: none; overflow: hidden; height: 100svh; }
body.tv .topo-acoes, body.tv .controlos, body.tv .nota, body.tv .dica, body.tv .rodape { display: none; }
body.tv .palco {
  height: calc(100svh - 60px); flex: none;
  grid-template-columns: minmax(0,1fr) auto minmax(0,.8fr); grid-template-areas: "titulo cena cores";
  align-items: center; gap: 4vw; padding: 0 5vw 3vh;
}
body.tv .titulo { text-align: left; align-self: stretch; display: flex; flex-direction: column; justify-content: center; gap: 9vh; }
body.tv .t1 { font-size: min(11cqi, 6vw); }
body.tv .t2 { font-size: 1.15vw; padding-left: 0; }
body.tv .sobre { font-size: .8vw; }
body.tv .slogan { display: block; font-size: 1.5vw; }
body.tv .slogan::before { content: ""; display: block; width: 2.2vw; height: .16vw; background: var(--vermelho); margin-bottom: 1.4vw; }
body.tv .estudio { width: min(40vw, calc((100svh - 150px) * .8)); min-width: 0; cursor: none; }
body.tv .pack-fundo { font-size: 48svh; }
body.tv .cores { align-items: flex-start; gap: 4.5vh; }
body.tv .indicador { text-align: left; }
body.tv .estampa { justify-content: flex-start; font-size: 1vw; }
body.tv .num { font-size: .85vw; }
body.tv .nome-cor { font-size: 2.6vw; }
body.tv .amostras { flex-direction: column; gap: 2vh; }
body.tv .amostra { grid-template-columns: auto 1fr; align-items: center; justify-items: start; gap: 1vw; cursor: none; }
body.tv .amostra .disco { width: 4.2vw; }
body.tv .amostra::after { top: 50%; left: 0; width: calc(4.2vw + 10px); transform: translate(-5px, -50%) scale(.9); }
body.tv .amostra[aria-checked="true"]::after { transform: translate(-5px, -50%) scale(1); }
body.tv .amostra .rotulo { display: block; font-size: .8vw; }
body.tv .topo { padding-top: 3vh; }
body.tv .marca img { width: 2vw; }
body.tv .marca span { font-size: .7vw; }
body.tv .progresso { display: block; width: 12vw; height: 2px; background: rgba(39,39,42,.12); overflow: hidden; }
body.tv .progresso i { display: block; height: 100%; width: 100%; background: var(--tinta); transform-origin: left; transform: scaleX(0); }
body.tv .ecra-cheio-pedido {
  position: fixed; right: 3vw; bottom: 3vh; font-size: .8vw; letter-spacing: .14em; text-transform: uppercase; color: var(--tinta-2);
}
/* TV na vertical (raro): volta à composição empilhada */
@media (orientation: portrait) {
  body.tv .palco { grid-template-columns: 1fr; grid-template-areas: "titulo" "cena" "cores"; height: auto; }
  body.tv .estudio { width: min(80vw, calc((100svh - 520px) * .8)); }
}

@media (prefers-reduced-motion: reduce) {
  :root { --t-cor: 1ms; }
  .amostra .disco, .amostra::after { transition: none; }
}
