/* Sandiacre Town Cricket Club
   Palette: primary #8C160E (dark red), footer #540d08, cream/off-white body
*/
:root {
  --primary: #8C160E;
  --primary-light: #a81a10;
  --primary-dark: #7e130c;
  --header-bg: #69100a;
  --footer-bg: #540d08;
  --ink: #1c1c1c;
  --muted: #6b6b6b;
  --cream: #faf7f1;
  --paper: #ffffff;
  --border: rgba(0,0,0,0.1);
  --shadow: 0 4px 14px rgba(0,0,0,0.06);
  --radius: 6px;
  --wrap: 1180px;
}

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

body {
  font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: 'Anton', 'Montserrat', sans-serif;
  font-weight: 400;
  letter-spacing: 0.5px;
  color: var(--ink);
  margin: 0 0 0.6em;
  line-height: 1.2;
}

h1 { font-size: clamp(2rem, 4.5vw, 3rem); text-transform: uppercase; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); text-transform: uppercase; }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; }

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

/* ============ Header ============ */
.top-bar {
  background: var(--footer-bg);
  color: #fff;
  font-size: 13px;
  padding: 6px 0;
}
.top-bar .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.top-bar a { color: #f5d8d5; }
.top-bar a:hover { color: #fff; }

.site-header {
  background: var(--primary);
  color: #fff;
  border-bottom: 4px solid var(--primary-dark);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 24px;
  max-width: var(--wrap);
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #fff;
  text-decoration: none;
  flex: 1;
  min-width: 0;
}
.brand:hover { text-decoration: none; }
.brand img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #fff;
  padding: 4px;
  flex-shrink: 0;
}
.brand-text {
  font-family: 'Anton', sans-serif;
  font-size: 1.4rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  line-height: 1.1;
}
.brand-sub {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.85);
  margin-top: 4px;
  text-transform: uppercase;
  font-weight: 500;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  color: #fff;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle svg { width: 30px; height: 30px; fill: currentColor; }

.nav {
  background: var(--primary-dark);
  border-top: 1px solid rgba(255,255,255,0.1);
}
.nav-inner {
  display: flex;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 12px;
}
.nav a {
  color: #fff;
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-right: 1px solid rgba(255,255,255,0.08);
  transition: background 0.15s;
}
.nav a:first-child { border-left: 1px solid rgba(255,255,255,0.08); }
.nav a:hover, .nav a.active {
  background: var(--footer-bg);
  text-decoration: none;
}

/* ============ Hero ============ */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--primary) 0%, var(--footer-bg) 100%);
  color: #fff;
  padding: 80px 0 60px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cpath d='M30 30m-20 0a20 20 0 1 0 40 0a20 20 0 1 0 -40 0 M10 30 L50 30 M30 10 L30 50' stroke='rgba(255,255,255,0.03)' stroke-width='1' fill='none'/%3E%3C/svg%3E");
  opacity: 0.5;
}
.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}
.hero h1 {
  color: #fff;
  margin-bottom: 12px;
}
.hero p {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.9);
  margin-bottom: 24px;
}
.hero .est {
  display: inline-block;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.3);
  padding: 6px 18px;
  border-radius: 30px;
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 20px;
}

/* ============ Section ============ */
.section {
  padding: 64px 0;
}
.section-alt { background: var(--paper); }
.section-dark {
  background: var(--footer-bg);
  color: #fff;
}
.section-dark h1, .section-dark h2, .section-dark h3 { color: #fff; }
.section-dark a { color: #f5d8d5; }

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 40px;
}
.section-head .eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--primary);
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 10px;
}
.section-dark .eyebrow { color: #f5d8d5; }

/* Buttons */
.btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 12px 28px;
  border-radius: var(--radius);
  border: 2px solid var(--primary);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.1s;
}
.btn:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-outline {
  background: transparent;
  color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: #fff; }
.section-dark .btn-outline { color: #fff; border-color: #fff; }
.section-dark .btn-outline:hover { background: #fff; color: var(--primary); }

/* Cards / info blocks */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.info-card {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 28px 24px;
  border-top: 4px solid var(--primary);
  box-shadow: var(--shadow);
}
.info-card h3 { color: var(--primary); margin-bottom: 12px; }
.section-dark .info-card {
  background: rgba(255,255,255,0.08);
  border-top-color: #fff;
}
.section-dark .info-card h3 { color: #fff; }
.section-dark .info-card p, .section-dark .info-card li { color: rgba(255,255,255,0.9); }

/* Prose */
.prose { max-width: 780px; margin: 0 auto; }
.prose p { font-size: 1.05rem; margin-bottom: 1.2em; }
.prose h2 { margin-top: 2em; }
.prose h3 { margin-top: 1.5em; color: var(--primary); }
.prose ul { padding-left: 22px; margin-bottom: 1.2em; }
.prose li { margin-bottom: 0.5em; }

/* Sponsors */
.sponsors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  align-items: center;
  justify-items: center;
}
.sponsor-tile {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  width: 100%;
  aspect-ratio: 3 / 2;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s;
}
.sponsor-tile:hover { transform: translateY(-3px); }
.sponsor-tile img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Contact table */
.officials {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.official {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  border-left: 3px solid var(--primary);
}
.official .role {
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 4px;
}
.official .name { font-weight: 700; font-size: 1.05rem; margin-bottom: 6px; }
.official .contact { font-size: 0.95rem; color: var(--muted); }
.official .contact a { color: var(--primary); }

/* Map */
.map-wrap {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  margin: 24px 0;
}
.map-wrap iframe { width: 100%; height: 100%; border: 0; }

/* Two-column split */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

/* ============ Footer ============ */
.footer {
  background: var(--footer-bg);
  color: #fff;
  padding: 60px 0 30px;
}
.footer .wrap { position: relative; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer h4 {
  color: #fff;
  font-size: 12px;
  letter-spacing: 3px;
  margin: 0 0 14px;
  text-transform: uppercase;
  border-bottom: 2px solid rgba(255,255,255,0.15);
  padding-bottom: 8px;
}
.footer p, .footer li {
  color: rgba(255,255,255,0.8);
  font-size: 0.93rem;
  margin: 0 0 6px;
}
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer a { color: rgba(255,255,255,0.9); }
.footer a:hover { color: #fff; }
.footer-brand-line {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.footer-brand-line img {
  width: 48px; height: 48px; border-radius: 50%;
  background: #fff; padding: 3px;
}
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.12);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
}

/* Notice/callout */
.notice {
  background: #fff8e6;
  border-left: 4px solid #d5a017;
  padding: 16px 20px;
  border-radius: var(--radius);
  margin: 24px 0;
  font-size: 0.98rem;
}

/* ============ Mobile ============ */
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none;
  }
  .nav.open { display: block; }
  .nav-inner {
    flex-direction: column;
    padding: 0;
  }
  .nav a {
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding: 14px 24px;
  }
  .nav a:first-child { border-left: 0; }

  .header-inner { padding: 12px 20px; }
  .brand img { width: 48px; height: 48px; }
  .brand-text { font-size: 1.15rem; }
  .brand-sub { font-size: 10px; letter-spacing: 1.5px; }

  .top-bar { font-size: 12px; }
  .top-bar .wrap { flex-direction: column; gap: 4px; text-align: center; }

  .hero { padding: 56px 0 44px; }
  .section { padding: 48px 0; }
  .two-col { grid-template-columns: 1fr; gap: 28px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { justify-content: center; text-align: center; }
  .officials { grid-template-columns: 1fr; }
}
