/* Entity landings — club / brand / country / decade (modern archive) */

.entity-page{background:var(--cream);--entity-accent:var(--lime)}
.entity-page[data-kind="brand"]{--entity-accent:#e6aa47}
.entity-page[data-kind="country"]{--entity-accent:#d2f3ae}
.entity-page[data-kind="decade"]{--entity-accent:#b1ee78}

/* —— Hero (height/copy shared via .sub-hero) —— */
.entity-hero h1{max-width:16ch}
.entity-hero-lead{margin:0 0 14px}
.entity-hero-floaters img{animation:entity-float 8s ease-in-out infinite}
.entity-hero-floaters img:nth-child(1){right:6%;bottom:-4%;left:auto;transform:rotate(-9deg)}
.entity-hero-floaters img:nth-child(2){right:22%;top:12%;left:auto;width:clamp(90px,11vw,150px);opacity:.38;transform:rotate(11deg);animation-delay:-2.5s}
.entity-hero-floaters img:nth-child(3){right:38%;bottom:8%;left:auto;width:clamp(75px,9vw,120px);opacity:.24;transform:rotate(-15deg);animation-delay:-4s}
.entity-hero-floaters img:nth-child(4){right:10%;top:28%;left:auto;width:clamp(70px,8vw,110px);opacity:.18;transform:rotate(18deg);animation-delay:-1s}
@keyframes entity-float{0%,100%{translate:0 0}50%{translate:0 -12px}}

.entity-back{
  display:inline-flex;align-items:center;gap:8px;margin-bottom:8px;
  color:#dfece2;font-size:12px;font-weight:700;
}
.entity-back:hover{color:#fff}

.entity-flag{
  width:36px;height:26px;object-fit:cover;border-radius:5px;
  box-shadow:0 0 0 1px rgba(255,255,255,.25);margin-bottom:6px;
}

/* —— Overview band —— */
.entity-overview{
  display:grid;grid-template-columns:1.15fr .85fr;gap:16px;
  padding:22px 0 8px;
}
.entity-panel{
  background:#fff;border:1px solid #e5e1d6;border-radius:16px;
  padding:20px 22px;min-width:0;
}
.entity-panel-head{
  display:flex;align-items:baseline;justify-content:space-between;gap:10px;
  margin:0 0 14px;
}
.entity-panel-head h2{
  margin:0;font-size:1.15rem;letter-spacing:-.02em;
}
.entity-panel-head span{
  font-size:11px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:#6a756e;
}

.hoop-fingerprint{
  display:flex;gap:3px;height:clamp(64px,9vw,96px);
  margin:0;border-radius:12px;overflow:hidden;background:#ebe8de;
}
.hoop-fingerprint .strip{
  flex:1 1 0;min-width:5px;display:block;position:relative;
  transition:flex-grow .22s ease,filter .2s,transform .2s;
}
.hoop-fingerprint .strip:hover,
.hoop-fingerprint .strip:focus-visible{
  flex-grow:3.4;outline:none;filter:brightness(1.05);
  z-index:1;
}
/* Many shirts → two chronological rows (oldest → newest, left→right then next row) */
.hoop-fingerprint--dense{
  display:grid;
  grid-template-columns:repeat(var(--dna-cols,12),minmax(0,1fr));
  grid-template-rows:1fr 1fr;
  height:clamp(118px,16vw,176px);
  column-gap:3px;
  row-gap:6px;
}
.hoop-fingerprint--dense .strip{
  flex:none;min-width:0;width:auto;height:auto;
  border-radius:2px;
}
.hoop-fingerprint--dense .strip:hover,
.hoop-fingerprint--dense .strip:focus-visible{
  flex-grow:0;
  transform:scaleY(1.08);
  filter:brightness(1.08);
}
.fingerprint-cap{
  margin:12px 0 0;font-size:12px;font-weight:600;color:var(--muted);line-height:1.45;
}

.entity-editorial{margin:0;padding:0;border:0;max-width:none}
.entity-editorial .editorial{margin:0;padding:0;border:0;max-width:none}
.entity-editorial .editorial-label{
  margin:0 0 10px;font-size:11px;font-weight:750;letter-spacing:.16em;
  text-transform:uppercase;color:#6a756e;
}
.entity-editorial .editorial-body{
  font-family:var(--serif);font-size:16px;line-height:1.7;color:#27362b;
}
.entity-editorial .editorial-lead{
  font-size:1.12em;font-weight:700;letter-spacing:-.02em;
}
.entity-editorial-empty{
  color:var(--muted);font-size:14px;line-height:1.5;margin:0;
}

/* Featured shirt */
.entity-featured{
  display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);
  gap:0;overflow:hidden;border-radius:16px;border:1px solid #e5e1d6;
  background:#fff;margin:18px 0 8px;
}
.entity-featured-visual{
  position:relative;min-height:280px;
  background:
    radial-gradient(120% 90% at 50% 100%, rgba(177,238,120,.2), transparent 55%),
    linear-gradient(165deg,#f4f1e8,#e4ebe6);
  display:grid;place-items:center;padding:28px;
}
.entity-featured-visual img{
  max-height:320px;width:auto;max-width:100%;object-fit:contain;
  filter:drop-shadow(0 18px 28px rgba(7,27,21,.2));
  transition:transform .35s ease;
}
.entity-featured:hover .entity-featured-visual img{transform:scale(1.03) translateY(-4px)}
.entity-featured-copy{padding:28px 32px;display:flex;flex-direction:column;justify-content:center}
.entity-featured-copy .eyebrow{margin-bottom:8px}
.entity-featured-copy h2{font-size:clamp(26px,3vw,36px);margin:0 0 8px;line-height:1.05}
.entity-featured-copy p{margin:0 0 18px;color:#536058;font-size:14px;line-height:1.55;max-width:36ch}
.entity-featured-copy .button{align-self:flex-start}

/* —— Sticky shirt tools —— */
.entity-tools{
  position:sticky;top:0;z-index:25;
  margin:18px -4px 12px;padding:12px 4px;
  background:linear-gradient(180deg,rgba(247,245,238,.97) 65%,rgba(247,245,238,.85));
  backdrop-filter:blur(10px);
  border-bottom:1px solid transparent;
  transition:border-color .2s,box-shadow .2s;
}
@media (max-width:850px){
  .entity-tools{top:var(--site-header-h,70px)}
}
.entity-tools.is-stuck{
  border-bottom-color:var(--line);
  box-shadow:0 10px 28px rgba(7,27,21,.06);
}
.entity-tools-row{
  display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;
}
.entity-tools .search-field{
  flex:1 1 220px;max-width:340px;min-height:42px;background:#fff;border-color:#ddd9ce;
}
.decade-links{
  display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:10px 0 0;
}
.decade-links-label{
  font-size:10px;font-weight:750;letter-spacing:.14em;text-transform:uppercase;color:#6a756e;margin-right:4px;
}
.decade-chip,.decade-links button{
  display:inline-flex;padding:7px 12px;border-radius:999px;
  border:1px solid #d5d1c5;background:#f7f5ee;color:#31443a;
  font-size:12px;font-weight:700;cursor:pointer;
  transition:background .15s,border-color .15s,color .15s,transform .15s;
}
.decade-chip:hover,.decade-links button:hover{transform:translateY(-1px);border-color:#9bb59a;background:#fff}
.decade-chip.is-active,.decade-links button.is-active{
  background:var(--forest);border-color:var(--forest);color:#fff;
}

.entity-section-head{
  display:flex;align-items:baseline;justify-content:space-between;gap:12px;
  margin:8px 0 14px;
}
.entity-section-head h2{margin:0;font-size:clamp(1.35rem,2.1vw,1.85rem)}
.entity-section-head .muted{font-size:12px;font-weight:650;color:var(--muted)}
.entity-section-head .muted strong{
  color:var(--ink);font-family:var(--serif);font-size:18px;font-weight:700;
}

.entity-content{padding-top:8px;padding-bottom:56px;background:var(--cream)}

.entity-page .jersey-grid{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px 14px;
}
.entity-page .jersey-card[hidden]{display:none!important}

.entity-empty-filter{
  text-align:center;padding:36px 16px;color:var(--muted);font-size:14px;
}

/* Bottom CTA — named entity, count, jersey stage */
.entity-cta{
  margin-top:40px;display:grid;grid-template-columns:minmax(0,1.15fr) minmax(200px,.85fr);gap:0;
  border-radius:22px;overflow:hidden;isolation:isolate;
  background:
    radial-gradient(70% 90% at 0% 100%,rgba(177,238,120,.12),transparent 55%),
    linear-gradient(118deg,#041f17 0%,#05291e 42%,#0c3d2e 100%);
  color:#e8f0ea;
  min-height:248px;
  box-shadow:0 18px 40px rgba(4,31,23,.18);
  animation:entity-cta-in .7s cubic-bezier(.22,1,.36,1) both;
}
@keyframes entity-cta-in{
  from{opacity:0;transform:translateY(14px)}
  to{opacity:1;transform:none}
}
.entity-cta-copy{
  position:relative;z-index:1;
  padding:32px clamp(24px,3.2vw,40px);
  display:flex;flex-direction:column;justify-content:center;
}
.entity-cta-eyebrow{
  display:inline-flex;align-items:center;gap:10px;margin:0 0 14px;
  font-size:10px;font-weight:800;letter-spacing:.16em;text-transform:uppercase;color:var(--lime);
}
.entity-cta-eyebrow::before{
  content:"";width:8px;height:8px;border-radius:50%;background:var(--lime);
  box-shadow:0 0 0 4px rgba(177,238,120,.18);
}
.entity-cta-eyebrow::after{
  content:"";display:block;width:40px;height:2px;background:var(--lime);
}
.entity-cta h3{
  margin:0 0 12px;font-size:clamp(1.7rem,3.1vw,2.35rem);
  color:#fff;letter-spacing:-.035em;line-height:1.02;max-width:16ch;
}
.entity-cta-meta{
  display:flex;flex-wrap:wrap;gap:8px;align-items:center;
  list-style:none;margin:0 0 14px;padding:0;
}
.entity-cta-meta li{
  display:inline-flex;align-items:center;
  padding:5px 11px;border-radius:999px;
  background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.12);
  font-size:11px;font-weight:700;letter-spacing:.02em;color:#d5e6da;
}
.entity-cta p{
  margin:0 0 20px;font-size:14.5px;line-height:1.55;color:#b7caba;max-width:42ch;
}
.entity-cta-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.entity-cta-actions .button{min-height:44px;padding:0 18px;font-weight:750}
.entity-cta-actions .button-ghost{
  border-color:rgba(255,255,255,.28);color:#eef3ee;background:transparent;
}
.entity-cta-actions .button-ghost:hover{
  border-color:rgba(255,255,255,.5);background:rgba(255,255,255,.06);
}
.entity-cta-visual{
  position:relative;display:grid;place-items:center;
  padding:28px 24px 36px;text-decoration:none;overflow:hidden;
  background:
    radial-gradient(55% 55% at 50% 42%,rgba(177,238,120,.22),transparent 70%),
    linear-gradient(180deg,rgba(255,255,255,.04),rgba(0,0,0,.28));
  border-left:1px solid rgba(255,255,255,.08);
}
.entity-cta-hoops{
  position:absolute;inset:0;pointer-events:none;opacity:.55;
  background:repeating-linear-gradient(
    0deg,
    rgba(177,238,120,.07) 0 14px,
    rgba(255,255,255,.03) 14px 28px
  );
  mask-image:radial-gradient(ellipse 70% 80% at 50% 45%,#000 20%,transparent 75%);
}
.entity-cta-visual img{
  position:relative;z-index:1;
  width:clamp(140px,20vw,210px);height:auto;object-fit:contain;
  filter:drop-shadow(0 22px 32px rgba(0,0,0,.45));
  transform:rotate(-7deg) translateY(4px);
  transition:transform .45s cubic-bezier(.22,1,.36,1);
}
.entity-cta:hover .entity-cta-visual img{
  transform:rotate(-2deg) translateY(-8px) scale(1.03);
}
.entity-cta-badge{
  position:absolute;z-index:2;left:50%;bottom:18px;transform:translateX(-50%);
  display:inline-flex;align-items:baseline;gap:6px;
  padding:7px 14px;border-radius:999px;
  background:rgba(4,31,23,.72);border:1px solid rgba(177,238,120,.35);
  backdrop-filter:blur(10px);
  font-size:10px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:#e8f3ea;
  white-space:nowrap;pointer-events:none;
}
.entity-cta-badge strong{
  font-family:var(--serif);font-size:1.15rem;font-weight:800;
  letter-spacing:-.02em;color:var(--lime);line-height:1;
}

@media (max-width:1100px){
  .entity-overview{grid-template-columns:1fr}
  .entity-featured{grid-template-columns:1fr}
  .entity-featured-visual{min-height:240px}
  .entity-cta{grid-template-columns:1fr}
  .entity-cta-visual{
    order:-1;min-height:200px;border-left:0;border-bottom:1px solid rgba(255,255,255,.08);
  }
  .entity-cta-visual img{width:clamp(120px,30vw,160px)}
}
@media (max-width:900px){
  .entity-page .jersey-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
  .entity-hero-floaters img:nth-child(n+3){display:none}
}
@media (max-width:640px){
  .entity-page .jersey-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .entity-hero-floaters img:nth-child(n+2){display:none}
  .entity-featured-copy{padding:20px}
  .entity-panel{padding:16px}
  .entity-editorial .editorial-body{font-size:15px}
  .entity-cta{min-height:0;border-radius:18px}
  .entity-cta-copy{padding:22px 20px 26px}
  .entity-cta h3{max-width:none;font-size:clamp(1.45rem,7vw,1.85rem)}
  .entity-cta-actions .button{width:100%;justify-content:center}
  /* Hero stats: grelha partilhada em styles.css (.sub-hero-stats @640) */
}
@media (prefers-reduced-motion:reduce){
  .entity-hero-floaters img,.entity-featured-visual img,.entity-cta-visual img{animation:none;transition:none}
  .entity-cta{animation:none}
}
