/* ==========================================================
   KIT SCRAPBOOK: papéis, fita, polaroid, carimbo, post-it,
   rabiscos e os botões. Reutilizado por todas as seções.
   ========================================================== */

:root {
  /* grão de papel (ruído bem sutil) */
  --grao: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .23 0 0 0 0 .15 0 0 0 0 .19 0 0 0 .1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  /* fibras do kraft */
  --fibra: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.04 .9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .22 0 0 0 0 .1 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E");
  /* borda de papel rasgado (topo) */
  --rasgo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 16' preserveAspectRatio='none'%3E%3Cpath d='M0 16V7l8-3 7 5 8-6 8 5 7-3 8 5 8-6 7 3 8-5 8 6 8-3 7 5 8-6 8 3 7-4 8 6 8-4 8 3 7-5 8 4 8-3 7 6 8-5 8 3 7-5 8 4v9z'/%3E%3C/svg%3E");
  /* serrilhas das pontas da fita */
  --serra-esq: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 8'%3E%3Cpath d='M6 0v8L1 4z'/%3E%3C/svg%3E");
  --serra-dir: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 8'%3E%3Cpath d='M0 0v8l5-4z'/%3E%3C/svg%3E");
  /* falhas de tinta do carimbo */
  --falha: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='t'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.55' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2.6 0 0 0 2.25'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23t)'/%3E%3C/svg%3E");
}

/* ---------- papéis ---------- */

.papel { background: var(--grao), var(--papel); }

.papel-rosa { background: var(--grao), var(--papel-2); }

.kraft {
  background: var(--fibra), var(--grao), var(--kraft);
  color: #4a3320;
}

.pautado {
  --margem-x: max(.55rem, calc(50% - var(--coluna) / 2 - 1.4rem));
  background:
    linear-gradient(90deg,
      transparent calc(var(--margem-x) - 1px),
      var(--margem) calc(var(--margem-x) - 1px) calc(var(--margem-x) + 1px),
      transparent calc(var(--margem-x) + 1px)),
    repeating-linear-gradient(180deg,
      transparent 0 calc(var(--linha) - 1px),
      var(--pauta) calc(var(--linha) - 1px) var(--linha)),
    var(--grao),
    var(--papel);
}

.quadriculado {
  background:
    repeating-linear-gradient(90deg, transparent 0 calc(1.25rem - 1px), rgba(150, 185, 220, .32) calc(1.25rem - 1px) 1.25rem),
    repeating-linear-gradient(180deg, transparent 0 calc(1.25rem - 1px), rgba(150, 185, 220, .32) calc(1.25rem - 1px) 1.25rem),
    var(--grao),
    var(--papel);
}

/* papel rasgado: a seção sobe um pouco por cima da anterior */
.rasgado {
  margin-top: -14px;
  -webkit-mask:
    var(--rasgo) 0 0 / 220px 16px repeat-x,
    linear-gradient(#000 0 0) 0 15px / 100% calc(100% - 15px) no-repeat;
  mask:
    var(--rasgo) 0 0 / 220px 16px repeat-x,
    linear-gradient(#000 0 0) 0 15px / 100% calc(100% - 15px) no-repeat;
}

/* ---------- cabeçalho de seção ---------- */

.cabecalho-secao {
  margin-bottom: 2.2rem;
  max-width: 34rem;
}

.titulo-secao {
  font-size: clamp(2.05rem, 8.6vw, 3.1rem);
  letter-spacing: -.012em;
  max-width: 17ch;
}

/* a "anotação de caneta" dele embaixo de cada título */
.kicker {
  display: inline-flex;
  align-items: flex-start;
  gap: .35rem;
  margin-top: .85rem;
  font-family: var(--fonte-mao);
  font-weight: 300;
  font-size: .92rem;
  line-height: 1.7;
  color: var(--caneta);
  transform: rotate(-1.6deg);
  transform-origin: left center;
}

.kicker::before {
  content: '';
  flex: none;
  width: 1.6rem;
  height: 1rem;
  margin-top: .25rem;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 20' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 4c6 9 15 11 26 9'/%3E%3Cpath d='M23 8l5 5-6 3'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 20' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 4c6 9 15 11 26 9'/%3E%3Cpath d='M23 8l5 5-6 3'/%3E%3C/svg%3E") center / contain no-repeat;
}

.corpo {
  max-width: 34rem;
  color: var(--tinta-suave);
}

.corpo + .corpo { margin-top: 1rem; }

/* letra de mão em caneta azul */
.mao {
  font-family: var(--fonte-mao);
  font-weight: 300;
  color: var(--caneta);
  line-height: 1.8;
}

.dica {
  font-family: var(--fonte-ui);
  font-size: .9rem;
  color: var(--tinta-apagada);
}

/* ---------- fita washi ---------- */

.washi {
  position: absolute;
  z-index: 4;
  width: var(--l, 92px);
  height: 1.55rem;
  background: rgba(242, 155, 184, .62);
  transform: rotate(var(--r, -4deg));
  pointer-events: none;
  -webkit-mask:
    linear-gradient(#000 0 0) center / calc(100% - 10px) 100% no-repeat,
    var(--serra-esq) left / 5px 7px repeat-y,
    var(--serra-dir) right / 5px 7px repeat-y;
  mask:
    linear-gradient(#000 0 0) center / calc(100% - 10px) 100% no-repeat,
    var(--serra-esq) left / 5px 7px repeat-y,
    var(--serra-dir) right / 5px 7px repeat-y;
}

.washi--listra {
  background: repeating-linear-gradient(-45deg, rgba(242, 155, 184, .78) 0 5px, rgba(255, 228, 236, .78) 5px 10px);
}

.washi--bolinha {
  background:
    radial-gradient(circle, rgba(255, 255, 255, .95) 1.4px, transparent 1.9px) 0 0 / 8px 8px,
    rgba(150, 205, 190, .72);
}

.washi--lisa { background: rgba(255, 226, 120, .7); }

/* ---------- foto (com placeholder automático) ---------- */

.foto {
  position: relative;
  overflow: hidden;
  aspect-ratio: var(--proporcao, 1);
  background: #eadbc6;
}

.foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-user-drag: none;
  user-select: none;
}

.foto--vazia {
  background: repeating-linear-gradient(45deg, #f1e4d2 0 9px, #eadbc6 9px 18px);
}

.foto__vazia {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: .3rem;
  padding: .5rem;
  text-align: center;
  color: #94704b;
}

.foto__vazia svg { width: clamp(18px, 22%, 34px); height: auto; opacity: .75; }

.foto__rotulo {
  font-family: var(--fonte-mao);
  font-weight: 300;
  font-size: clamp(.6rem, 2.6vw, .82rem);
  line-height: 1.5;
}

/* ---------- polaroid ---------- */

.polaroid {
  position: relative;
  margin: 0;
  padding: .6rem .6rem 0;
  background: #fffefb;
  border-radius: 2px;
  box-shadow: var(--sombra-papel);
  transform: rotate(var(--r, 0deg));
}

.polaroid__legenda {
  padding: .75rem .3rem .95rem;
  text-align: center;
  font-family: var(--fonte-mao);
  font-weight: 300;
  font-size: .86rem;
  line-height: 1.55;
  color: var(--caneta);
}

/* ---------- carimbo ---------- */

.carimbo {
  display: inline-block;
  padding: .2rem .55rem .16rem;
  border: 2px solid currentColor;
  border-radius: 5px;
  font-family: var(--fonte-ui);
  font-weight: 800;
  font-size: .78rem;
  letter-spacing: .07em;
  line-height: 1.3;
  color: var(--batom);
  transform: rotate(var(--r, -3deg));
  opacity: .9;
  -webkit-mask: var(--falha);
  mask: var(--falha);
}

/* ---------- clipe ---------- */

.clipe {
  position: absolute;
  z-index: 5;
  width: 20px;
  height: 52px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 52' fill='none' stroke='%23a4a9b3' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 14v26a4 4 0 0 0 8 0V8a6 6 0 0 0-12 0v34a8 8 0 0 0 16 0V16'/%3E%3C/svg%3E") center / contain no-repeat;
  filter: drop-shadow(1px 2px 1px rgba(0, 0, 0, .18));
  pointer-events: none;
}

/* ---------- post-it ---------- */

.post-it {
  position: relative;
  padding: 1.5rem 1.25rem 1.6rem;
  background: #fff1a3;
  color: var(--tinta);
  box-shadow: 0 1px 1px rgba(0, 0, 0, .06), 0 16px 18px -16px rgba(58, 39, 49, .55);
  border-bottom-right-radius: 30px 6px;
}

.post-it--rosa { background: #ffd6e2; }
.post-it--menta { background: #d3f0e3; }
.post-it--azul { background: #d7e6fb; }

/* ---------- rabiscos que se desenham ---------- */

.rabisco {
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rabisco path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.3s cubic-bezier(.6, .1, .3, 1) var(--atraso, .15s);
}

.revelado .rabisco path,
.rabisco.revelado path { stroke-dashoffset: 0; }

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

/* o botão principal parece um adesivo colado no caderno */
.botao-carimbo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 3rem;
  padding: .8rem 1.55rem;
  border-radius: 999px;
  background: var(--batom);
  color: #fff;
  font-family: var(--fonte-ui);
  font-weight: 800;
  font-size: 1.03rem;
  letter-spacing: .01em;
  box-shadow: 0 0 0 3px #fff, 0 12px 22px -8px rgba(201, 42, 90, .6);
  transform: rotate(-1.5deg);
  transition: transform .18s ease, box-shadow .18s ease;
}

.botao-carimbo:hover { transform: rotate(0deg) translateY(-2px); }
.botao-carimbo:active { transform: rotate(0deg) scale(.96); }

.botao-carimbo svg { width: 1.1em; height: 1.1em; }

.botao-carimbo--leve {
  background: #fff;
  color: var(--batom);
  box-shadow: inset 0 0 0 2px var(--batom), 0 10px 18px -12px rgba(201, 42, 90, .5);
}

.botao-texto {
  font-family: var(--fonte-mao);
  font-weight: 300;
  font-size: .92rem;
  color: var(--caneta);
  text-decoration: underline;
  text-decoration-style: wavy;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  padding: .4rem .2rem;
}
