/*
 * Football3D project page
 * Edit the color variables below to quickly retheme the site.
 */
:root {
  --ink: #172028;
  --muted: #62707c;
  --green: #16775b;
  --green-dark: #0c493a;
  --green-soft: #e7f3ee;
  --line: #dce5e1;
  --paper: #ffffff;
  --off-white: #f6f8f7;
  --shadow: 0 14px 40px rgba(20, 48, 39, 0.1);
  --radius: 18px;
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

img,
video {
  display: block;
  width: 100%;
}

.section-shell {
  width: min(calc(100% - 40px), var(--max-width));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 0 max(24px, calc((100vw - var(--max-width)) / 2));
  border-bottom: 1px solid rgba(220, 229, 225, 0.8);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
}

.site-mark {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.site-mark span,
.hero h1 span {
  color: var(--green);
}

nav {
  display: flex;
  gap: 28px;
}

nav a {
  color: #46535c;
  font-size: 0.85rem;
  font-weight: 650;
  text-decoration: none;
  transition: color 160ms ease;
}

nav a:hover {
  color: var(--green);
}

.hero {
  padding-top: clamp(70px, 10vw, 120px);
  padding-bottom: 54px;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  padding: 7px 13px;
  border: 1px solid #c8e1d7;
  border-radius: 999px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 1000px;
  margin: 25px auto 20px;
  font-size: clamp(2.25rem, 5.5vw, 4.6rem);
  line-height: 1.07;
  letter-spacing: -0.055em;
}

.authors {
  margin: 0;
  font-size: clamp(1.05rem, 2vw, 1.27rem);
}

.authors a {
  text-decoration-color: #b9d3ca;
  text-underline-offset: 4px;
}

.author-separator {
  margin: 0 9px;
  color: #a3ada9;
}

sup {
  color: var(--green);
  font-size: 0.65em;
  font-weight: 700;
}

.affiliation {
  margin: 5px 0 18px;
  color: var(--muted);
}

.tagline {
  margin: 0 auto 27px;
  color: #44515a;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  font-style: italic;
}

.resource-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 43px;
  padding: 0 17px;
  border: 1px solid #cbd7d2;
  border-radius: 9px;
  color: #28342f;
  background: #fff;
  box-shadow: 0 2px 5px rgba(18, 48, 38, 0.04);
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

a.button:hover {
  transform: translateY(-2px);
  border-color: #86b6a5;
  box-shadow: 0 7px 15px rgba(18, 48, 38, 0.1);
}

.button.primary {
  border-color: var(--green);
  color: #fff;
  background: var(--green);
}

.button.primary.unavailable {
  border-color: #78978c;
  background: #78978c;
}

.button-icon {
  margin-right: 7px;
  font-size: 0.8rem;
}

.button.unavailable {
  cursor: not-allowed;
  color: #8a9590;
  background: #f7f8f8;
}

.button small {
  margin-left: 7px;
  font-size: 0.62rem;
  font-weight: 650;
  text-transform: uppercase;
}

.teaser {
  padding-bottom: clamp(75px, 10vw, 120px);
}

.media-frame {
  position: relative;
  overflow: hidden;
  min-height: 250px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #eef3f1;
}

.hero-media {
  min-height: 0;
  padding: clamp(10px, 1.8vw, 20px);
  box-shadow: var(--shadow);
}

.media-frame.hero-media img {
  height: auto;
  border-radius: calc(var(--radius) - 7px);
  object-fit: contain;
}

.hero-media.is-missing {
  min-height: clamp(300px, 55vw, 620px);
}

.media-frame img {
  height: 100%;
  object-fit: cover;
}

.media-frame.is-missing {
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(22, 119, 91, 0.08), rgba(255, 255, 255, 0.5)),
    repeating-linear-gradient(45deg, transparent, transparent 18px, rgba(22, 119, 91, 0.035) 18px, rgba(22, 119, 91, 0.035) 36px);
}

.media-frame.is-missing::after {
  content: attr(data-placeholder);
  padding: 12px 18px;
  border: 1px solid #bcd2ca;
  border-radius: 999px;
  color: var(--green-dark);
  background: rgba(255, 255, 255, 0.8);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.figure-caption {
  max-width: 780px;
  margin: 18px auto 0;
  color: var(--muted);
  text-align: center;
}

.figure-caption strong {
  color: var(--ink);
}

.content-section {
  padding-top: clamp(72px, 9vw, 110px);
  padding-bottom: clamp(72px, 9vw, 110px);
  border-top: 1px solid var(--line);
  scroll-margin-top: 60px;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 38px;
}

.section-heading span {
  color: var(--green);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 700;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  letter-spacing: -0.04em;
}

.section-heading::after {
  width: 60px;
  height: 1px;
  margin-left: 3px;
  background: var(--line);
  content: "";
}

.abstract-text {
  max-width: 900px;
  margin: 0 auto;
  color: #39464e;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.1rem, 2.25vw, 1.35rem);
  line-height: 1.85;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.method-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 7px 22px rgba(20, 48, 39, 0.06);
}

.card-number {
  width: 38px;
  height: 38px;
  margin-bottom: 18px;
  border-radius: 50%;
  color: var(--green);
  background: var(--green-soft);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.75rem;
  font-weight: 750;
  line-height: 38px;
  text-align: center;
}

.method-media {
  aspect-ratio: 16 / 10;
  min-height: 0;
  margin-bottom: 22px;
  padding: clamp(8px, 1.2vw, 14px);
  border-radius: 11px;
  background: #f7f9f8;
}

.media-frame.method-media img {
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.method-card-featured {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(240px, 0.8fr);
  grid-template-rows: auto 1fr;
  grid-column: 1 / -1;
  column-gap: 30px;
}

.method-card-featured .card-number {
  grid-column: 1 / -1;
}

.method-card-featured .method-media {
  grid-column: 1;
  grid-row: 2;
  margin-bottom: 0;
}

.method-card-featured .method-copy {
  align-self: center;
  grid-column: 2;
  grid-row: 2;
}

.method-card-featured h3 {
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
}

.method-card h3 {
  margin: 0 0 13px;
  font-size: 1.05rem;
  line-height: 1.35;
}

.method-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.91rem;
}

.results-section {
  color: #fff;
  background: #102c25;
  border-top: 0;
}

.section-heading.light span {
  color: #7bd2b5;
}

.section-heading.light::after {
  background: rgba(255, 255, 255, 0.2);
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.result-card {
  margin: 0;
}

.result-card.wide {
  grid-column: 1 / -1;
}

.result-card .media-frame {
  height: 350px;
  border-color: rgba(255, 255, 255, 0.16);
  border-radius: 13px;
  background-color: #173c32;
}

.result-card.wide .media-frame {
  height: min(58vw, 600px);
}

.result-card .media-frame.is-missing {
  background:
    linear-gradient(135deg, rgba(94, 190, 157, 0.13), rgba(16, 44, 37, 0.2)),
    repeating-linear-gradient(45deg, transparent, transparent 18px, rgba(255, 255, 255, 0.025) 18px, rgba(255, 255, 255, 0.025) 36px);
}

.result-card .media-frame.is-missing::after {
  border-color: rgba(164, 220, 201, 0.35);
  color: #b9e7d7;
  background: rgba(9, 32, 26, 0.65);
}

.result-card figcaption {
  padding: 13px 2px 2px;
  color: #adc0b9;
  font-size: 0.88rem;
}

.result-card figcaption strong {
  color: #fff;
}

.result-card video {
  height: 100%;
  background: #071b16;
  object-fit: contain;
}

.citation-section > p {
  margin-top: -20px;
  color: var(--muted);
}

.code-block {
  position: relative;
  margin-top: 25px;
  border-radius: 13px;
  color: #d8eee7;
  background: #132b25;
  box-shadow: var(--shadow);
}

.code-block pre {
  overflow-x: auto;
  margin: 0;
  padding: 28px 80px 28px 28px;
  font-size: 0.84rem;
  line-height: 1.75;
}

.code-block button {
  position: absolute;
  z-index: 2;
  top: 15px;
  right: 15px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 7px;
  color: #d8eee7;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
}

footer {
  padding: 46px 0;
  border-top: 1px solid var(--line);
  background: var(--off-white);
}

.footer-inner {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
}

.footer-inner p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.footer-inner p a {
  color: var(--green);
}

.updated {
  white-space: nowrap;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 760px) {
  .site-header {
    min-height: 60px;
    padding-inline: 20px;
  }

  nav {
    gap: 15px;
  }

  nav a:nth-child(2),
  nav a:nth-child(3) {
    display: none;
  }

  .hero {
    padding-top: 62px;
  }

  .hero h1 {
    letter-spacing: -0.045em;
  }

  .method-grid,
  .results-grid {
    grid-template-columns: 1fr;
  }

  .method-card-featured {
    display: block;
  }

  .method-card-featured .method-media {
    margin-bottom: 22px;
  }

  .result-card.wide {
    grid-column: auto;
  }

  .result-card .media-frame,
  .result-card.wide .media-frame {
    height: min(68vw, 430px);
    min-height: 250px;
  }

  .method-card {
    padding: 24px;
  }

  .card-number {
    margin-bottom: 22px;
  }

  .footer-inner {
    display: block;
  }
}

@media (max-width: 480px) {
  .section-shell {
    width: min(calc(100% - 28px), var(--max-width));
  }

  .eyebrow {
    font-size: 0.66rem;
  }

  .resource-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .button {
    padding-inline: 11px;
  }

  .section-heading {
    margin-bottom: 28px;
  }

  .section-heading::after {
    width: 35px;
  }

  .code-block pre {
    padding: 58px 20px 22px;
    font-size: 0.72rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
