/* Carrickfergus RFC — 2026 one-page site */

:root {
  --red: #810200;
  --red-bright: #a80300;
  --ink: #151515;
  --grey: #4b4b4b;
  --muted: #6b6b6b;
  --line: #e4e5e7;
  --tint: #f4f4f2;
  --white: #fff;
  --maxol: #0063a4;

  --display: 'Teko', 'Arial Narrow', Helvetica, Arial, sans-serif;
  --body: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;

  --wrap: 1180px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section: clamp(4rem, 9vw, 7rem);
  --radius: 10px;
  --header-h: 72px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--red); }
a:hover { color: var(--red-bright); }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 0.95;
  margin: 0 0 0.5em;
  letter-spacing: 0.01em;
}
h2 { font-size: clamp(2.5rem, 5vw, 3.75rem); }
h3 { font-size: 1.75rem; line-height: 1; }

p { margin: 0 0 1em; }

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

.eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.75rem;
}

.lede { font-size: 1.15rem; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.85rem 1.5rem;
  background: var(--red);
  color: var(--white);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: 999px;
  border: 2px solid var(--red);
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.btn:hover { background: var(--red-bright); border-color: var(--red-bright); color: var(--white); transform: translateY(-1px); }
.btn-sm { padding: 0.55rem 1.1rem; font-size: 0.875rem; }
.btn-ghost { background: transparent; border-color: rgba(255,255,255,0.7); }
.btn-ghost:hover { background: var(--white); border-color: var(--white); color: var(--ink); }

.text-link {
  font-weight: 600;
  text-decoration: none;
}
.text-link::after { content: ' \2192'; }

/* 1st XV sponsor bar */
.sponsor-bar {
  background: var(--maxol);
  color: var(--white);
}
.sponsor-bar-inner {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sponsor-bar-tag {
  font-family: var(--display);
  font-size: 1.2rem;
  letter-spacing: 0.04em;
  line-height: 1;
  padding-top: 0.15em;
  opacity: 0.85;
}
.sponsor-bar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--white);
  text-decoration: none;
}
.sponsor-bar-link:hover { color: var(--white); }
.sponsor-bar-label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.85;
}
.sponsor-bar-link img { height: 28px; width: auto; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.94);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand img { height: 46px; width: auto; }

.nav { display: flex; align-items: center; gap: 1.75rem; }
.nav a:not(.btn) {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}
.nav a:not(.btn):hover { color: var(--red); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 0.5rem;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
  transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hero */
.hero {
  position: relative;
  min-height: min(88vh, 780px);
  display: flex;
  align-items: flex-end;
  color: var(--white);
  overflow: hidden;
  background: var(--ink);
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(10,10,10,0.92) 0%, rgba(10,10,10,0.45) 45%, rgba(10,10,10,0.15) 100%),
    url(img/hero.jpg) center 35% / cover no-repeat;
}
.hero-content {
  position: relative;
  width: 100%;
  padding-block: 6rem clamp(3rem, 8vw, 6rem);
}
.hero .eyebrow { color: rgba(255,255,255,0.85); }
.hero h1 {
  font-size: clamp(4rem, 12vw, 8.5rem);
  line-height: 0.82;
  margin-bottom: 1.5rem;
}
.hero .lede { max-width: 34ch; color: rgba(255,255,255,0.9); margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Sections */
.section { padding-block: var(--section); }
.section-tint { background: var(--tint); }
.section-dark { background: var(--ink); color: var(--white); }

.section-head { max-width: 640px; margin-bottom: 3rem; }
.section-head p:last-child { color: var(--grey); }

/* Membership cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}
.card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}
.card p { color: var(--grey); font-size: 0.95rem; }
.card > :last-child { margin-top: auto; }
.card-logo { height: 30px; width: auto; margin-bottom: 1.25rem; }
.card-feature {
  border-color: var(--red);
  box-shadow: 0 0 0 1px var(--red);
}
.link-list { list-style: none; padding: 0; margin: 0; }
.link-list li + li { margin-top: 0.5rem; }
.link-list a { font-weight: 600; text-decoration: none; font-size: 0.95rem; }

/* Sevens */
.sevens-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}
.sevens-logo {
  background: var(--white);
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  width: 180px;
}
.sevens-intro .lede { color: rgba(255,255,255,0.8); }
.dates { display: flex; gap: 1rem; margin: 2rem 0; }
.date {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 96px;
  padding: 0.9rem 1rem 0.7rem;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius);
}
.date-day, .date-month { font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.7); }
.date-num { font-family: var(--display); font-size: 3.5rem; line-height: 0.9; font-weight: 600; margin-top: 0.3rem; }

.sevens-detail {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  background:
    linear-gradient(rgba(21,21,21,0.88), rgba(21,21,21,0.94)),
    url(img/sevens.jpg) center / cover;
  border: 1px solid rgba(255,255,255,0.1);
}
.events {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: rgba(255,255,255,0.12);
  border-radius: 8px;
  overflow: hidden;
}
.event { background: rgba(21,21,21,0.92); padding: 1.25rem; }
.event-day { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: #ff8a80; font-weight: 600; }
.event h3 { margin: 0.4rem 0 0.3rem; font-size: 1.6rem; }
.event p { margin: 0; font-size: 0.875rem; color: rgba(255,255,255,0.7); }

.rules {
  margin-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 1rem;
}
.rules summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
}
.rules summary::-webkit-details-marker { display: none; }
.rules summary::after { content: '+'; font-size: 1.25rem; line-height: 1; }
.rules[open] summary::after { content: '\2212'; }
.rules ul { margin: 1rem 0 0; padding-left: 1.1rem; color: rgba(255,255,255,0.8); font-size: 0.9rem; }
.rules li + li { margin-top: 0.4rem; }
.sevens-sponsors { margin: 1.5rem 0 0; font-size: 0.85rem; color: rgba(255,255,255,0.6); }

/* History */
.history-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}
.history-intro { position: sticky; top: calc(var(--header-h) + 2rem); }
.history-intro p { color: var(--grey); }
.history-photo { margin: 2rem 0 0; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 10; }
.history-photo img { width: 100%; height: 100%; object-fit: cover; }

.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 1.75rem 2rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 0.55rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--red);
}
.timeline li:first-child::before { background: var(--red); }
.year { font-family: var(--display); font-size: 2rem; font-weight: 600; color: var(--red); line-height: 1.1; }
.timeline p { margin: 0.2rem 0 0; color: var(--grey); }

/* Sponsors */
.logo-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
}
.logo-row img {
  width: 100%;
  height: 110px;
  object-fit: contain;
  padding: 1.5rem;
  background: var(--white);
  border-radius: var(--radius);
  filter: grayscale(1);
  opacity: 0.85;
  transition: filter 0.2s, opacity 0.2s;
}
.logo-row img:hover { filter: none; opacity: 1; }

.sponsor-table dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 0 2.5rem;
  margin: 0 0 3rem;
}
.sponsor-table dl > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid #dcdcd8;
}
.sponsor-table dt { font-weight: 600; white-space: nowrap; }
.sponsor-table dd { margin: 0; text-align: right; color: var(--grey); }

.subhead { font-size: 2rem; margin-bottom: 1rem; }
.tag-list { list-style: none; padding: 0; margin: 0 0 2.5rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag-list li {
  padding: 0.4rem 0.85rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.875rem;
}
.sponsor-cta { color: var(--grey); margin: 0; }
.sponsor-cta a { font-weight: 600; overflow-wrap: anywhere; }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: stretch;
}
address { font-style: normal; font-size: 1.1rem; line-height: 1.7; margin-bottom: 2rem; }
.contact-list { list-style: none; padding: 0; margin: 0 0 2rem; }
.contact-list li { padding: 0.85rem 0; border-top: 1px solid var(--line); }
.contact-list li:last-child { border-bottom: 1px solid var(--line); }
.contact-list span { display: block; font-size: 0.8rem; color: var(--muted); }
.contact-list a { font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }

.socials { display: flex; gap: 0.75rem; }
.socials a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ink);
  transition: background 0.2s;
}
.socials a:hover { background: var(--red); }
.socials svg { width: 20px; height: 20px; fill: var(--white); }

.map { min-height: 380px; border-radius: var(--radius); overflow: hidden; background: var(--tint); }
.map iframe { width: 100%; height: 100%; min-height: 380px; border: 0; display: block; }

/* Footer */
.site-footer { background: var(--ink); color: rgba(255,255,255,0.6); padding-block: 2.5rem; font-size: 0.875rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; }
.footer-inner p { margin: 0; }
.hashtag { font-family: var(--display); font-size: 1.75rem; color: var(--white); letter-spacing: 0.02em; }

/* Responsive */
@media (max-width: 960px) {
  .sevens-grid, .history-grid, .contact-grid { grid-template-columns: 1fr; }
  .history-intro { position: static; }
  .logo-row { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem var(--gutter) 1.5rem;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 1rem; text-align: center; }
}

@media (max-width: 560px) {
  :root { --header-h: 64px; }
  .brand img { height: 38px; }
  .sponsor-bar-inner { justify-content: center; }
  .sponsor-bar-tag { display: none; }
  .events { grid-template-columns: 1fr; }
  .logo-row { grid-template-columns: repeat(2, 1fr); }
  .logo-row img { height: 90px; padding: 1rem; }
  .sponsor-table dl > div { flex-direction: column; gap: 0.15rem; }
  .sponsor-table dd { text-align: left; }
  .hero-actions .btn { flex: 1 1 100%; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
