/* ========== Theme (60/20/10) ========== */
/* 60% Base: white; 20% structure/text; 10% accents */
:root{
  --bg:#ffffff;              /* base background (60%) */
  --surface:#f7f9fc;         /* very light card surface (structural 20%) */
  --ink:#0b1220;             /* primary text (20%) */
  --ink-weak:#475569;        /* muted text */
  --border:#e2e8f0;          /* subtle borders */
  --border-bold:#0b1220;     /* bold borders */

  --accent:#3265d6;          /* primary accent (links, primary buttons) */
  --accent-hover:#30b0ff;    /* accessible hover for primary */
  --accent-contrast:#000000; /* text on primary accent */

  --accent2:#ffd600;         /* secondary accent (badges, highlights, alt buttons) */
  --accent2-ink:#0b1220;     /* text on secondary accent */
}

/* ========== Base ========== */
html,body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font:16px/1.55 system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
  overflow-x:hidden;
}
*, *::before, *::after { box-sizing:border-box; }
a{ color:var(--accent); text-decoration:none; }
a:hover{ text-decoration:underline; }
a:focus{ outline:2px solid var(--accent); outline-offset:2px; }
.container{ max-width:1100px; margin:0 auto; padding:0 16px; }

/* ========== Header / Nav ========== */
.site-header{
  position:sticky; top:0; z-index:50;
  background:var(--accent2);       /* yellow header */
  color:var(--ink);
  border-bottom:1px solid var(--border-bold);
}
.nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  height:150px;                    /* TRUE desktop header height */
}
.brand{
  display:flex;
  align-items:center;
  gap:10px;
  color:var(--ink);
}
.brand picture,
.brand img{ display:block; }
.brand img{
  height:150px;                    /* TRUE desktop logo height */
  width:auto;
}

/* Desktop menu */
.menu{ display:flex; gap:18px }
.menu a{
  color:var(--ink);                /* ensure readable on yellow */
  opacity:.9;
}
.menu a:hover{
  opacity:1; text-decoration:none; color:var(--ink);
  border-bottom:2px solid var(--ink);
}
.menu a[aria-current="page"]{
  color:var(--ink);
  border-bottom:2px solid var(--ink);
  padding-bottom:2px
}
.mobile-toggle{ display:none; background:none; border:0; color:var(--ink); font-size:28px }

/* Mobile menu panel (hidden by default) */
.mobile-panel{ display:none }

/* ========== Mobile layout ========== */
@media (max-width:860px){
  .menu{ display:none }
  .mobile-toggle{ display:block }
  .nav{ height:64px; }             /* compact mobile header */
  .brand img{
    height:60px;                   /* mobile logo height */
    width:auto;
  }
  .mobile-panel{
    position:absolute; left:0; right:0; top:64px;  /* align with mobile header height */
    background:var(--accent2);      /* match header color */
    border-bottom:1px solid var(--border-bold);
    box-shadow:0 6px 12px rgba(2,8,23,.06);
  }
  .mobile-panel a{
    display:block; padding:14px 16px;
    border-top:1px solid var(--border-bold);
    color:var(--ink);
  }
  .mobile-panel a:hover{ background:rgba(0,0,0,.04) }
  body.nav-open .mobile-panel{ display:block }
}

/* ========== Desktop layout ========== */
@media (min-width:861px){
  .mobile-toggle{ display:none }
  .mobile-panel{ display:none !important }
}

/* ========== Main ========== */
main{ padding:24px 0 }
.hero{ padding:48px 0; border-bottom:1px solid var(--border) }
.hero h1{ font-size:clamp(28px,4vw,40px); margin:0 0 6px }
.lead{ color:var(--ink-weak) }

/* ========== Cards / grid ========== */
.grid{ display:grid; gap:16px }
.grid.cols-3{ grid-template-columns:1fr }
@media (min-width:860px){ .grid.cols-3{ grid-template-columns:repeat(3,1fr) } }
.card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:12px;
  padding:18px;
  box-shadow:0 1px 2px rgba(2,8,23,0.04);
}
.card h3{ margin:0 0 6px; font-size:18px }

/* Optional badge using secondary accent */
.badge{
  display:inline-block; padding:4px 8px; border-radius:999px;
  background:var(--accent2); color:var(--accent2-ink); font-weight:700; font-size:12px;
}

/* ========== Footer ========== */
.site-footer{
  margin-top:48px;
  border-top:1px solid var(--border-bold);
  background:var(--accent2);       /* yellow footer */
  color:var(--ink);
}
.footer{ display:grid; gap:18px; padding:24px 0 }
@media (min-width:860px){ .footer{ grid-template-columns:2fr 1fr 1fr } }
.muted{ color:var(--ink-weak) }
.legal{ padding:8px 0 24px; color:var(--ink-weak) }

/* ========== Buttons ========== */
.btn{
  display:inline-block;
  background:var(--accent);
  color:var(--accent-contrast);
  font-weight:600;
  padding:10px 14px;
  border-radius:8px;
  border:1px solid var(--accent);
}
.btn:hover{ text-decoration:none; background:var(--accent-hover); border-color:var(--accent-hover) }
.btn:focus{ outline:2px solid var(--accent-hover); outline-offset:2px }
.btn.ghost{
  background:transparent; color:var(--accent);
  border:1px solid var(--accent);
}
.btn.ghost:hover{ background:rgba(68,135,239,.08) }

/* Secondary accent button (optional) */
.btn.lime{
  background:var(--accent2); color:var(--accent2-ink);
  border:1px solid var(--accent2);
}
.btn.lime:hover{ filter:brightness(.95) }

/* Spacing helpers */
.gap{ margin-top:12px }

/* ========== Tables ========== */
.table{ width:100%; border-collapse:collapse; margin-top:12px }
.table th,.table td{ border-bottom:1px solid var(--border); padding:10px; text-align:left }

/* Keep Date column on one line and wide enough for longest month */
.table-competitions th:first-child,
.table-competitions td:first-child{
  white-space: nowrap;
  width: 140px; /* adjust if needed */
}

/* Table header: dark background with white text */
.table-competitions thead th{
  background: #0b1220;   /* dark */
  color: #ffffff;        /* white text */
  border-bottom: 1px solid #0b1220;
}

/* Alternating row backgrounds for readability */
.table-competitions tbody tr:nth-child(even){
  background: #f3f6fb;   /* very light */
}
.table-competitions tbody tr:nth-child(odd){
  background: #ffffff;
}

/* Preserve your default cell borders */
.table-competitions th,
.table-competitions td{
  border-bottom: 1px solid var(--border);
}


/* ========== Sponsors ========== */
.sponsors{ grid-template-columns:repeat(auto-fit,minmax(180px,1fr)) }

/* ========== Forms (mobile-safe + roomy desktop) ========== */
form{ width:100% }
label{ display:block; margin:12px 0 6px; color:var(--ink) }
input,select,textarea{
  width:100%; max-width:100%; display:block;
  background:#fff; color:var(--ink);
  border:1px solid var(--border); border-radius:8px; padding:12px;
  box-shadow:0 1px 0 rgba(2,8,23,0.02) inset;
}
input::placeholder, textarea::placeholder{ color:#94a3b8 }
input:focus, select:focus, textarea:focus{
  outline:2px solid var(--accent); outline-offset:2px; border-color:var(--accent);
}
textarea{ min-height:120px }
input,textarea{ word-break:break-word }

/* Two-column rows collapse on mobile; generous gap on desktop */
.row{ display:grid; gap:12px }
.row.two{ grid-template-columns:1fr }
@media (min-width:700px){ .row.two{ grid-template-columns:1fr 1fr } }
@media (min-width:1024px){ .row.two{ gap:28px } }   /* more standoff on desktop */
.row.two > *{ min-width:0 }                           /* fix grid overflow */

/* Vertical rhythm between stacked elements */
form > * + *{ margin-top:8px }

/* ===== Sponsors layout ===== */
.sponsor-hero{
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  text-align:center;
  height:550px;                 /* fixed height — uniform */
}
.sponsor-hero img{
  max-height:400px;             /* keep logos contained */
  width:auto;
  object-fit:contain;
  margin-bottom:8px;
}
.sponsor-link{ display:inline-block }

.sponsor-tier-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:16px;
  margin-top:12px;
}
@media (min-width:860px){
  .sponsor-tier-grid{ grid-template-columns:repeat(3,1fr); }
}
.sponsor-tier{
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  text-align:center;
  height:300px;                 /* fixed height — uniform */
  overflow:hidden;              /* hide overflow if any */
}
.sponsor-tier img{
  max-height:150px;
  width:auto;
  object-fit:contain;
  margin-bottom:8px;
}

/* Clamp helper: 1-3 lines */
.clamp-1{ display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:1; line-clamp:1; overflow:hidden; text-overflow:ellipsis; }
.clamp-2{ display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; line-clamp:2; overflow:hidden; text-overflow:ellipsis; }
.clamp-3{ display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3; line-clamp:3; overflow:hidden; text-overflow:ellipsis; }
.clamp-4{ display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:4; line-clamp:4; overflow:hidden; text-overflow:ellipsis; }
.clamp-5{ display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:5; line-clamp:5; overflow:hidden; text-overflow:ellipsis; }
.clamp-6{ display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:6; line-clamp:6; overflow:hidden; text-overflow:ellipsis; }

/* Make all grid cards equal-height and stack content vertically */
.grid .card{
  display:flex;
  flex-direction:column;
  min-height:100%;
}

/* Keep CTA rows aligned at the bottom of each card */
.card-actions{
  margin-top:auto;            /* magic: pushes actions to the bottom */
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}
/* Buttons (theme-driven) */
.btn { 
  display:inline-block; padding:.6rem 1rem; border:0; border-radius:10px;
  cursor:pointer; text-decoration:none;
  background: var(--accent); color:#fff;
}
.btn:hover { filter: brightness(.95); }

.btn-alt {
  background: var(--accent2); color:#fff;
}
.link { color: var(--accent); text-decoration:none; }
.link:hover { text-decoration:underline; }
.badge-brewmaster { background:#d9f7be; }
.badge-supporter  { background:#bae7ff; }

