/* Cristiano Ronaldo All Jerseys
   The shirt is the design. The interface stays quiet: neutral ground, one
   typeface, hairlines, and as little chrome as the page can get away with. */

:root {
  --page: #f4f4f2;
  --content: #ffffff;
  --ink: #111111;
  --ink-2: #707070;
  --ink-3: #8c8c8c;
  --line: #dadada;
  --line-soft: #e8e8e6;
  --accent: #8a6a2f;
  --focus: #111111;
  --wrap: 1560px;
  --gut: 20px;
  --sans: "Helvetica Neue", Helvetica, Arial, "Inter", "Segoe UI", system-ui, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
p { margin: 0 0 1em; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.025em;
}

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

.skip {
  position: absolute;
  left: -9999px;
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  z-index: 100;
}
.skip:focus { left: 0; top: 0; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: var(--gut);
}

/* ---------- micro label ---------- */
.eyebrow,
.shirt-club,
.shirt-meta,
.masthead-nav a,
.crumbs,
.spec dt,
.foot-nav a,
.filter-label,
.filter-opts button,
.more,
.pending span,
.season-rule h2,
.step-k {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
}

/* ---------- masthead ---------- */
.masthead {
  border-bottom: 1px solid var(--line);
  background: var(--page);
}
.masthead-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 64px;
}
.wordmark {
  display: grid;
  gap: 1px;
  text-decoration: none;
  line-height: 1.1;
  padding: 12px 0;
}
.wordmark b {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-2);
}
.wordmark span {
  font-size: 15px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-weight: 700;
}

.masthead-nav ul { display: flex; gap: 26px; }
.masthead-nav a {
  text-decoration: none;
  color: var(--ink-2);
  padding: 22px 0;
  display: block;
  transition: color 0.2s ease;
}
.masthead-nav a:hover { color: var(--ink); }
.masthead-nav a[aria-current] { color: var(--ink); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink);
  padding: 12px 0;
  cursor: pointer;
}

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .masthead-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    background: var(--page);
    border-bottom: 1px solid var(--line);
    padding: 0 var(--gut) 14px;
    z-index: 40;
  }
  .masthead { position: relative; }
  .masthead-nav.is-open { display: block; }
  .masthead-nav ul { display: grid; gap: 0; }
  .masthead-nav a { padding: 13px 0; border-top: 1px solid var(--line-soft); }
}

/* ---------- page opening ---------- */
.opening { padding: 54px 0 34px; }
.opening h1 {
  font-size: clamp(30px, 6.4vw, 62px);
  text-transform: uppercase;
  letter-spacing: -0.03em;
  max-width: 18ch;
}
.opening h1 .dim { color: var(--ink-2); display: block; }
.opening .sub {
  margin: 18px 0 0;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-2);
}
.opening .note {
  margin: 20px 0 0;
  max-width: 62ch;
  color: var(--ink-2);
  font-size: 15px;
}

/* run of team names under the title */
.teams {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.teams a {
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-2);
  transition: color 0.2s ease;
}
.teams a:hover { color: var(--ink); }

/* ---------- section head ---------- */
.band {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 44px 0 20px;
  flex-wrap: wrap;
}
.band h2 {
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
}
.more {
  text-decoration: none;
  color: var(--ink-2);
  transition: color 0.2s ease;
}
.more:hover { color: var(--ink); }

/* ---------- the grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 18px;
  row-gap: 46px;
  padding-bottom: 20px;
}
@media (min-width: 700px) { .grid { grid-template-columns: repeat(3, 1fr); column-gap: 24px; row-gap: 56px; } }
@media (min-width: 1080px) { .grid { grid-template-columns: repeat(4, 1fr); column-gap: 28px; } }
@media (min-width: 1400px) { .grid { grid-template-columns: repeat(5, 1fr); } }

.shirt.is-hidden { display: none; }

.shirt a {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.shirt-img {
  position: relative;
  background: var(--content);
  aspect-ratio: 4 / 5;
  overflow: hidden;
}
.shirt-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transition: transform 0.5s cubic-bezier(0.2, 0, 0.2, 1), opacity 0.3s ease;
}
.shirt-img .is-cover { object-fit: cover; }
.shirt-img .is-contain { object-fit: contain; padding: 6%; }
.shirt-img .view-back { opacity: 0; }

@media (hover: hover) {
  .shirt a:hover .shirt-img img { transform: scale(1.035); }
  .shirt a:hover .view-back { opacity: 1; }
  .shirt a:hover .view-front.has-back { opacity: 0; }
}
.shirt a:focus-visible .view-back { opacity: 1; }
.shirt a:focus-visible .view-front.has-back { opacity: 0; }

/* pending state — deliberate, not a broken image */
.pending {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  background: var(--content);
  border: 1px solid var(--line-soft);
}
.pending::before {
  content: "";
  width: 34px;
  border-top: 1px solid var(--line);
}
.pending span {
  color: var(--ink-3);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-align: center;
  padding: 0 14px;
  line-height: 1.6;
}


/* gallery label */
.shirt-label { padding-top: 12px; display: grid; gap: 3px; }
.shirt-club { color: var(--ink-2); }
.shirt-name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  text-transform: uppercase;
}
.shirt-player { font-size: 13px; color: var(--ink-2); }
.shirt-meta { color: var(--ink-3); font-size: 10px; padding-top: 2px; }

/* ---------- season divisions on club pages ---------- */
.season-rule {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding: 40px 0 22px;
  margin-top: 16px;
}
.season-rule h2 { font-size: 12px; color: var(--ink); }
.season-rule .count { font-size: 11px; color: var(--ink-3); letter-spacing: 0.08em; text-transform: uppercase; }

/* ---------- breadcrumbs ---------- */
.crumbs { padding: 20px 0 0; color: var(--ink-3); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 7px; }
.crumbs li + li::before { content: "/"; margin-right: 7px; color: var(--line); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs li[aria-current] { color: var(--ink-2); }

/* ---------- shirt page ---------- */
.study { padding: 10px 0 0; }
.study-grid { display: grid; gap: 30px; }
@media (min-width: 1000px) {
  .study-grid { grid-template-columns: 60fr 40fr; gap: 56px; align-items: start; }
}

.plate {
  background: var(--content);
  aspect-ratio: 4 / 5;
  max-height: 76vh;
  position: relative;
  overflow: hidden;
}
.plate img { position: absolute; inset: 0; width: 100%; height: 100%; }
.plate .is-cover { object-fit: cover; }
.plate .is-contain { object-fit: contain; padding: 4%; }
.plate .pending { border: 1px solid var(--line-soft); }
.plate .pending span { font-size: 11px; }

.caption {
  margin: 12px 0 0;
  font-size: 12.5px;
  color: var(--ink-2);
  max-width: 62ch;
  line-height: 1.6;
}
.caption a { color: var(--ink-2); }

.study-head { padding-bottom: 26px; }
.study-head h1 {
  font-size: clamp(24px, 4.6vw, 40px);
  text-transform: uppercase;
  letter-spacing: -0.025em;
}

.spec { margin: 0; border-top: 1px solid var(--ink); }
.spec > div {
  display: grid;
  grid-template-columns: 40% 1fr;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-soft);
}
.spec dt { color: var(--ink-3); margin: 2px 0 0; }
.spec dd { margin: 0; font-size: 14px; }
.spec dd a { color: var(--ink); text-underline-offset: 3px; }

.secondary { padding: 44px 0 0; }
.secondary-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media (min-width: 760px) { .secondary-grid { grid-template-columns: repeat(4, 1fr); } }
.secondary figure { margin: 0; }
.secondary .plate { aspect-ratio: 1 / 1; max-height: none; }
.secondary figcaption {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-3);
  padding-top: 9px;
}

.prose { max-width: 66ch; }
.prose h2 {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 30px 0 10px;
}
.prose h2:first-child { margin-top: 0; }
.prose p { font-size: 15px; color: #2b2b2b; }
.prose a { color: var(--ink); text-underline-offset: 3px; }
.prose ul { display: grid; gap: 8px; margin: 0 0 16px; }
.prose li { font-size: 14.5px; color: #2b2b2b; padding-left: 16px; position: relative; }
.prose li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 8px;
  border-top: 1px solid var(--line);
}

.rights {
  margin-top: 26px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.7;
}
.rights a { color: var(--ink-2); }

/* prev / next */
.steps {
  display: grid;
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-top: 46px;
}
@media (min-width: 620px) { .steps { grid-template-columns: 1fr 1fr; } }
.steps a {
  background: var(--page);
  text-decoration: none;
  padding: 20px 0;
  display: grid;
  gap: 5px;
}
.steps a:last-child { text-align: right; }
.step-k { color: var(--ink-3); }
.step-v { font-size: 14px; text-transform: uppercase; letter-spacing: -0.01em; }

/* ---------- filters ---------- */
.filters { padding: 8px 0 28px; display: grid; gap: 14px; }
.filter-row { display: grid; gap: 9px; }
@media (min-width: 760px) {
  .filter-row { grid-template-columns: 90px 1fr; align-items: start; gap: 14px; }
}
.filter-label { color: var(--ink-3); padding-top: 7px; }
.filter-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-opts button {
  font-family: inherit;
  background: none;
  border: 1px solid var(--line);
  color: var(--ink-2);
  padding: 8px 12px;
  min-height: 34px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.filter-opts button:hover { border-color: var(--ink); color: var(--ink); }
.filter-opts button[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.search-field {
  font-family: inherit;
  font-size: 14px;
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  background: var(--content);
  color: var(--ink);
}
.search-field::placeholder { color: var(--ink-3); }

.result-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--ink-2);
  border-top: 1px solid var(--line);
  padding: 14px 0 26px;
}
.result-line button {
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 0 0 2px;
  color: var(--ink);
  cursor: pointer;
}
.no-results { padding: 40px 0 60px; color: var(--ink-2); }

/* ---------- text pages ---------- */
.textpage { padding: 34px 0 60px; }
.textpage h1 {
  font-size: clamp(26px, 5vw, 44px);
  text-transform: uppercase;
  letter-spacing: -0.03em;
  margin-bottom: 26px;
}

/* ---------- footer ---------- */
.foot {
  border-top: 1px solid var(--line);
  margin-top: 70px;
  padding: 30px 0 46px;
}
.foot-in {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  flex-wrap: wrap;
  align-items: baseline;
}
.foot-nav { display: flex; gap: 22px; flex-wrap: wrap; }
.foot-nav a { text-decoration: none; color: var(--ink-2); }
.foot-nav a:hover { color: var(--ink); }
.foot-legal {
  margin: 22px 0 0;
  font-size: 12px;
  color: var(--ink-3);
  max-width: 88ch;
  line-height: 1.7;
}

/* ---------- 404 ---------- */
.notfound { padding: 90px 0 120px; }
.notfound h1 { font-size: clamp(30px, 7vw, 62px); text-transform: uppercase; letter-spacing: -0.03em; }
.notfound p { color: var(--ink-2); max-width: 46ch; margin: 18px 0 26px; }
.notfound-links { display: flex; gap: 22px; flex-wrap: wrap; }
.notfound-links a {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 3px;
}
.notfound-links a:hover { border-color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* image credits listing */
.credit-shirt { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; margin: 24px 0 8px; }
.credit-shirt a { text-decoration: none; }
.credit-shirt a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* jersey page: entity h1 + intro */
.h1-kicker { display: block; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; color: var(--ink-2); margin-bottom: 12px; }
.study-intro { margin: 18px 0 22px; font-size: 15px; color: #2b2b2b; max-width: 52ch; }

/* club spell separation */
.spell-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; border-top: 2px solid var(--ink); padding: 44px 0 4px; margin-top: 24px; }
.spell-head h2 { font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600; }
.spell-head .count { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }

/* utility classes — replace inline style attributes so a strict
   Content-Security-Policy (style-src 'self') can be served */
.pos-28 { object-position: 50% 28%; }
.pos-30 { object-position: 50% 30%; }
.pos-32 { object-position: 50% 32%; }
.pos-35 { object-position: 50% 35%; }
.pos-40 { object-position: 50% 40%; }
.plain-link { text-decoration: none; }
.muted { color: var(--ink-3); }
.page-note { max-width: 62ch; color: var(--ink-2); margin-bottom: 30px; }
