/* ==========================================================================
   Sheffield University RFC — athletic editorial theme
   Fonts: Anton (display) + Inter (body). Zero JS; animations are pure CSS.
   ========================================================================== */

:root {
  --bg: #0a0a0b;
  --bg-2: #121214;
  --panel: #17171a;
  --line: #26262b;
  --gold: #fdc500;
  --gold-2: #ffdf5e;
  --text: #f7f6f2;
  --muted: #a9a8a3;
  --display: "Anton", "Arial Narrow", sans-serif;
  --body: "Inter", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--gold); color: #111; }

img { max-width: 100%; display: block; }
a { color: var(--gold); }
a:focus-visible, .btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  line-height: 0.95;
  letter-spacing: 0.01em;
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 2.5rem;
  padding: 0.7rem 4vw;
  background: rgba(10, 10, 11, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 0.9rem; text-decoration: none; }
.brand img { width: 52px; }
.brand span {
  font-family: var(--display);
  font-size: 1.5rem;
  color: var(--text);
  letter-spacing: 0.06em;
}
.site-header nav { display: flex; flex-wrap: wrap; gap: 2rem; margin-left: auto; }
.site-header nav a {
  position: relative;
  color: var(--text);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 0.4rem 0;
}
.site-header nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: 0;
  height: 2px;
  background: var(--gold);
  transition: right 0.25s ease;
}
.site-header nav a:hover::after,
.site-header nav a[aria-current]::after { right: 0; }
.site-header nav a[aria-current] { color: var(--gold); }
.site-header .btn { margin-left: 1rem; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-block;
  background: var(--gold);
  color: #111;
  font-weight: 800;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.85rem 1.8rem;
  border-radius: 3px;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:hover {
  background: var(--gold-2);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(253, 197, 0, 0.25);
}
.btn-ghost {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold);
}
.btn-ghost:hover { background: rgba(253, 197, 0, 0.1); box-shadow: none; }
.btn-small { padding: 0.55rem 1.2rem; font-size: 0.8rem; }

/* --------------------------------------------------------------------------
   Hero (home) & page banners
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
  padding: 6rem 4vw 5rem;
  isolation: isolate;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  animation: heroZoom 18s ease-out both;
}
@keyframes heroZoom { from { transform: scale(1.12); } to { transform: scale(1); } }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(10,10,11,0.55) 0%, rgba(10,10,11,0.25) 40%, rgba(10,10,11,0.92) 88%),
    linear-gradient(100deg, rgba(10,10,11,0.85) 0%, rgba(10,10,11,0.1) 60%);
}
.hero h1 {
  font-size: clamp(3rem, 9.5vw, 8.5rem);
  max-width: 12ch;
}
.hero h1 .outline {
  color: transparent;
  -webkit-text-stroke: 2px var(--gold);
}
.hero p {
  margin: 1.8rem 0 2.4rem;
  color: #d6d4cd;
  max-width: 52ch;
  font-size: 1.05rem;
}
.hero .cta-row { display: flex; gap: 1rem; flex-wrap: wrap; }

.banner {
  position: relative;
  min-height: 46vh;
  display: flex;
  align-items: flex-end;
  padding: 6rem 4vw 3rem;
  isolation: isolate;
  overflow: hidden;
}
.banner .hero-bg { animation: none; }
.banner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(10,10,11,0.4) 0%, rgba(10,10,11,0.95) 95%);
}
.banner h1 { font-size: clamp(2.6rem, 7vw, 5.5rem); }

/* Marquee band */
.marquee {
  overflow: hidden;
  background: var(--gold);
  padding: 0.7rem 0;
  white-space: nowrap;
  border-block: 3px solid #111;
}
.marquee .track {
  display: inline-block;
  animation: marquee 28s linear infinite;
}
.marquee span {
  font-family: var(--display);
  text-transform: uppercase;
  color: #111;
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  padding-right: 3rem;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* --------------------------------------------------------------------------
   Layout & sections
   -------------------------------------------------------------------------- */
main { max-width: 1250px; margin: 0 auto; padding: 0 4vw; }
section { margin: 6.5rem 0; }

.section-head { margin-bottom: 2.5rem; }
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  margin-bottom: 0.9rem;
}
.kicker::before { content: ""; width: 34px; height: 2px; background: var(--gold); }
.section-head h1, .section-head h2 { font-size: clamp(2.2rem, 5vw, 4rem); }
.section-head .lede { color: var(--muted); max-width: 68ch; margin-top: 1.2rem; }

/* Scroll-driven reveals (Chrome/Edge; static elsewhere) */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    animation: fadeUp 0.9s ease both;
    animation-timeline: view();
    animation-range: entry 0% entry 45%;
  }
  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(36px); }
    to { opacity: 1; transform: none; }
  }
}

/* --------------------------------------------------------------------------
   Fixtures scoreboard
   -------------------------------------------------------------------------- */
.fixtures { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.board {
  background: linear-gradient(160deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line);
  border-top: 4px solid var(--gold);
  padding: 1.8rem;
}
.board h3 {
  font-size: 1.5rem;
  margin-bottom: 1.2rem;
  color: var(--gold);
}
.board ul { list-style: none; }
.board li {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem 0.4rem;
  border-bottom: 1px solid var(--line);
  transition: background 0.2s ease;
}
.board li:last-child { border-bottom: none; }
.board li:hover { background: rgba(253, 197, 0, 0.05); }
.board .opp { flex: 1; font-weight: 500; }
.board .score {
  font-family: var(--display);
  font-size: 1.15rem;
  letter-spacing: 0.06em;
}
.badge {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 1rem;
  border-radius: 3px;
}
.badge.w { background: #1f7a3d; color: #eafff1; }
.badge.l { background: #8c1d2f; color: #ffecef; }
.badge.tba { background: var(--line); color: var(--muted); }
.bucs { display: flex; align-items: center; gap: 2rem; margin-top: 2.2rem; flex-wrap: wrap; }
.bucs img { width: 170px; border-radius: 3px; }

/* --------------------------------------------------------------------------
   Events
   -------------------------------------------------------------------------- */
.events { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.event-card {
  background: var(--panel);
  border: 1px solid var(--line);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.event-card:hover { transform: translateY(-6px); border-color: var(--gold); }
.event-card .thumb { height: 190px; overflow: hidden; }
.event-card .thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.event-card:hover .thumb img { transform: scale(1.07); }
.event-card .body { padding: 1.4rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.event-card .when {
  align-self: flex-start;
  background: rgba(253, 197, 0, 0.12);
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
}
.event-card h3 { font-size: 1.5rem; }
.event-card .where { color: var(--muted); font-size: 0.95rem; }
.event-card .btn { margin-top: auto; align-self: flex-start; }

/* --------------------------------------------------------------------------
   Cards (teams, staff, media strip)
   -------------------------------------------------------------------------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 1.5rem; }
.card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.card:hover { transform: translateY(-6px); border-color: var(--gold); }
.card .thumb { overflow: hidden; aspect-ratio: 4 / 3; }
.card.portrait .thumb { aspect-ratio: 3 / 4; }
.card .thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, filter 0.5s ease;
}
.card:hover .thumb img { transform: scale(1.06); }
.card .body { padding: 1.4rem; }
.card h3 { font-size: 1.35rem; margin-bottom: 0.5rem; }
.card p { color: var(--muted); font-size: 0.95rem; }
.card.staff .thumb img { filter: grayscale(65%); }
.card.staff:hover .thumb img { filter: grayscale(0%); }

/* Media strip on home */
.strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.strip figure {
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 4 / 3;
}
.strip img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, filter 0.5s ease;
  filter: saturate(0.9);
}
.strip figure:hover img { transform: scale(1.06); filter: saturate(1.1); }

/* Full-bleed helpers */
.bleed { width: 100vw; margin-left: calc(50% - 50vw); }

/* Kit hoops — the black/gold jersey stripe, used as the page hem */
.hoops {
  height: 21px;
  background: repeating-linear-gradient(180deg, var(--gold) 0 7px, var(--bg) 7px 14px);
  border-block: 1px solid var(--line);
}

/* --------------------------------------------------------------------------
   Gallery (masonry via CSS columns)
   -------------------------------------------------------------------------- */
.gallery { columns: 4 260px; column-gap: 0.9rem; counter-reset: shot; }
.gallery figure {
  position: relative;
  margin-bottom: 0.9rem;
  overflow: hidden;
  break-inside: avoid;
  counter-increment: shot;
}
.gallery img {
  width: 100%;
  transition: transform 0.5s ease;
}
.gallery figure::after {
  content: counter(shot, decimal-leading-zero);
  position: absolute;
  left: 0.7rem; bottom: 0.6rem;
  font-family: var(--display);
  font-size: 1rem;
  color: var(--gold);
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.gallery figure::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(10,10,11,0.75));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}
.gallery figure:hover img { transform: scale(1.05); }
.gallery figure:hover::after, .gallery figure:hover::before { opacity: 1; }

/* --------------------------------------------------------------------------
   Sponsors
   -------------------------------------------------------------------------- */
.sponsor-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }
.sponsor-grid .card .thumb { aspect-ratio: 16 / 10; background: #0f0f10; }
.sponsor-grid .card .thumb img { object-fit: cover; }
.sponsor-grid .card h3 { margin: 0; text-align: center; }

.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 1.5rem; }
.tier {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 2.2rem 1.8rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease;
}
.tier:hover { transform: translateY(-6px); }
.tier::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: var(--metal, var(--gold));
}
.tier.bronze { --metal: linear-gradient(90deg, #8a5a2b, #d29a5e, #8a5a2b); }
.tier.silver { --metal: linear-gradient(90deg, #8e9196, #dfe3e8, #8e9196); }
.tier.gold   { --metal: linear-gradient(90deg, #b8860b, #ffdf5e, #b8860b); }
.tier h3 { font-size: 1.9rem; margin-bottom: 1rem; }
.tier.bronze h3 { color: #d29a5e; }
.tier.silver h3 { color: #dfe3e8; }
.tier.gold h3 { color: var(--gold-2); }
.tier ul { list-style: none; color: var(--muted); margin-bottom: 1.8rem; font-size: 0.95rem; }
.tier li { padding: 0.45rem 0; border-bottom: 1px dashed var(--line); }
.tier li:last-child { border-bottom: none; }

.partners { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; }
.partners div {
  border: 1px dashed var(--line);
  padding: 2.4rem 1rem;
  text-align: center;
  font-family: var(--display);
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  transition: border-color 0.25s ease, color 0.25s ease;
}
.partners div:hover { border-color: var(--gold); color: var(--gold); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  margin-top: 7rem;
  border-top: 1px solid var(--line);
  background:
    radial-gradient(60% 120% at 50% 0%, rgba(253, 197, 0, 0.07), transparent 70%),
    var(--bg-2);
  padding: 4rem 4vw 2rem;
}
.footer-grid {
  max-width: 1250px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 2.5rem;
}
.site-footer h3 {
  font-size: 1.05rem;
  color: var(--gold);
  margin-bottom: 1rem;
  letter-spacing: 0.08em;
}
.site-footer p, .site-footer a { color: var(--muted); font-size: 0.95rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.site-footer ul { list-style: none; }
.site-footer li { padding: 0.25rem 0; }
.footer-crest { width: 64px; margin-bottom: 1rem; }
.copyright {
  max-width: 1250px;
  margin: 3rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .fixtures { grid-template-columns: 1fr; }
}
/* Mobile header: crest + CTA on top, nav as a swipeable strip below */
@media (max-width: 760px) {
  .site-header { flex-wrap: wrap; gap: 0.5rem 1rem; padding: 0.6rem 4vw; }
  .brand img { width: 42px; }
  .brand span { font-size: 1.25rem; }
  .site-header .btn { margin-left: auto; }
  .site-header nav {
    order: 3;
    flex-basis: 100%;
    margin-left: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 1.4rem;
    scrollbar-width: none;
  }
  .site-header nav::-webkit-scrollbar { display: none; }
  .site-header nav a { white-space: nowrap; font-size: 0.85rem; }
}
@media (max-width: 600px) {
  .hero { min-height: 72vh; padding-bottom: 3rem; }
  .hero p { font-size: 1rem; }
  .banner { min-height: 34vh; padding-top: 4rem; }
  section { margin: 4.5rem 0; }
}
