/* Our Story (PCGBUR-4, Fase 3). Carregado so no template-our-story.php. Prefixos: os- (secoes) e tl (timeline). */

/* ── A historia + valores ─────────────────────────────────────────────── */
/* uma coluna centrada (antes titulo a esquerda e texto a direita): titulo em cima, texto em coluna de leitura */
.os-historia__grade { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(28px, 3vw, 40px); justify-items: center; text-align: center; }
.os-historia__texto { display: grid; gap: 1.1em; justify-items: center; color: var(--texto-2); font-size: 1.1875rem; max-width: 52ch; }
.os-historia__texto p { text-wrap: pretty; }
.os-historia__texto p { margin: 0; }
.os-historia__lead { color: var(--texto); font-size: clamp(1.375rem, 2vw, 1.75rem); line-height: 1.35; font-weight: 700; }

.os-valores { margin-top: clamp(56px, 8vw, 104px); text-align: center; }
.os-valores__titulo { font: 400 clamp(2.2rem, 4.6vw, 3.6rem)/1 var(--f-display); text-transform: uppercase; letter-spacing: .005em; }
.os-valores__titulo span { color: var(--ouro); }
.os-valores__lista {
  list-style: none; margin: clamp(24px, 3vw, 36px) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(20px, 2.4vw, 32px) clamp(20px, 3vw, 40px);
}
.os-valores__lista li {
  padding-top: 16px; border-top: 2px solid var(--ouro);
  font: 400 clamp(1.25rem, 1.8vw, 1.625rem)/1.1 var(--f-display); text-transform: uppercase; letter-spacing: .02em;
}

/* ── Timeline ─────────────────────────────────────────────────────────── */
.os-timeline .pcg-secao__cabeca { margin-inline: auto; justify-items: center; text-align: center; }
.tl { list-style: none; margin: 0 auto; padding: 0; max-width: 1080px; position: relative; }
.tl::before { /* linha central: dourado que some nas pontas */
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; transform: translateX(-50%);
  background: linear-gradient(180deg, transparent, var(--ouro) 8%, var(--ouro) 92%, transparent);
}
.tl__item {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr);
  align-items: center; padding-block: clamp(20px, 3vw, 40px);
}
.tl__item { scroll-margin-top: 96px; }
.tl__no { /* no da linha */
  grid-column: 2; grid-row: 1; justify-self: center; z-index: 1;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--fundo); border: 3px solid var(--ouro); box-shadow: 0 0 0 6px var(--fundo);
}
.tl__lado { grid-row: 1; min-width: 0; padding-inline: clamp(8px, 2vw, 28px); }
.tl__lado img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--raio); box-shadow: 0 24px 48px -20px rgba(0, 0, 0, .7); }
.tl__ano { display: block; margin: 0 0 var(--tl-vao, 10px); font: 400 clamp(3.5rem, 7vw, 6rem)/.9 var(--f-display); color: var(--ouro); letter-spacing: .01em; }
.tl__foto-vazia { /* placeholder: icone da marca sobre fundo escuro, sem prometer foto */
  position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; border-radius: var(--raio); overflow: hidden;
  background: radial-gradient(ellipse at 50% 45%, #2a2418, #111 70%); border: 1px dashed rgba(202, 165, 95, .45);
}
.tl .tl__foto-vazia img { width: min(46%, 220px); height: auto; aspect-ratio: auto; border-radius: 0; box-shadow: none; object-fit: contain; }
.tl__foto-vazia span { position: absolute; bottom: 10px; left: 0; right: 0; text-align: center; font: 700 .6875rem/1 var(--f-texto); letter-spacing: .08em; text-transform: uppercase; color: var(--texto-2); }
.tl__texto { grid-row: 1; min-width: 0; padding-inline: clamp(8px, 2vw, 28px); display: grid; gap: 10px; justify-items: start; }
/* alternancia: impar = lado a esquerda; par = lado a direita */
.tl__item:nth-child(odd) .tl__lado { grid-column: 1; }
.tl__item:nth-child(odd) .tl__texto { grid-column: 3; }
.tl__item:nth-child(even) .tl__lado { grid-column: 3; }
.tl__item:nth-child(even) .tl__texto { grid-column: 1; justify-items: end; text-align: right; }

.tl__nome { font: 400 clamp(1.75rem, 2.8vw, 2.5rem)/1 var(--f-display); text-transform: uppercase; letter-spacing: .015em; }
.tl__nome a { text-decoration: none; transition: color .2s var(--ease); }
@media (hover: hover) { .tl__nome a:hover { color: var(--ouro-vivo); } }
.tl__data { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; color: var(--texto); font-weight: 900; letter-spacing: .06em; text-transform: uppercase; font-size: .9375rem; }
.tl__item:nth-child(even) .tl__data { justify-content: flex-end; }
.tl__selo { /* dado provisorio / loja ainda fechada: discreto, contorno */
  font: 700 .6875rem/1 var(--f-texto); letter-spacing: .08em; text-transform: uppercase;
  padding: 5px 8px; border: 1px dashed var(--ouro); color: var(--ouro-vivo); border-radius: 2px;
}
.tl__desc { color: var(--texto-2); max-width: 38ch; }

/* reveal (so com JS e sem reduced-motion: o JS poe .tl--rv) */
.tl--rv .tl__item { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.tl--rv .tl__item.is-in { opacity: 1; transform: none; }

/* ── Fecho ────────────────────────────────────────────────────────────── */
.os-fecho { display: grid; gap: 20px; justify-items: center; text-align: center; }
.os-fecho p { color: var(--texto-2); font-size: 1.1875rem; max-width: 40ch; text-wrap: balance; }
.os-fecho .pcg-acoes { justify-content: center; margin-top: 12px; }

/* ── Celular / tablet: historia empilhada, linha na esquerda, ano/imagem antes do texto ─────────────── */
@media (max-width: 899.98px) {
  .os-valores__lista { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .tl::before { left: 9px; transform: none; background: linear-gradient(180deg, transparent, var(--ouro) 4%, var(--ouro) 96%, transparent); }
  .tl__item { grid-template-columns: 18px minmax(0, 1fr); column-gap: 24px; row-gap: 14px; align-items: start; padding-block: 28px; }
  .tl__no { grid-column: 1; grid-row: 1; margin-top: 6px; }
  /* lado (imagem ou ano) em cima, texto embaixo: o item termina em texto */
  .tl .tl__item:nth-child(n) .tl__lado { grid-column: 2; grid-row: 1; padding: 0; text-align: left; }
  .tl .tl__item:nth-child(n) .tl__texto { grid-column: 2; grid-row: 2; padding: 0; justify-items: start; text-align: left; }
  .tl .tl__item:nth-child(even) .tl__data { justify-content: flex-start; }
  .tl__ano { font-size: clamp(3rem, 15vw, 4.5rem); }
  .tl__no { box-shadow: 0 0 0 5px var(--fundo); }
}
@media (max-width: 479.98px) {
  .os-valores__lista { grid-template-columns: minmax(0, 1fr); }
}
