/* Game Bridge. Every colour and size decision is a custom property here. */

/* Archivo, self-hosted so no visitor data goes to Google. SIL Open Font License: assets/fonts/OFL.txt */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 400 800;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("assets/fonts/archivo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 400 800;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("assets/fonts/archivo-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Brand, sampled from the Game Bridge mark */
  --navy: #2b2f78;
  --berry: #811836;

  --ink: #15172f;
  --berry-dark: #66112a;
  --bg: #ffffff;
  --bg-alt: #f4f4f7;
  --text: #1c1d2b;
  --muted: #5c5e6d;
  --line: #dfe0e7;
  --on-dark: #ffffff;
  --on-dark-muted: #c0c2d6;

  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --display-width: 112%;     /* Archivo's width axis: headings set a touch wide */

  --wrap: 1120px;
  --gutter: 16px;
  --radius: 4px;
}

@media (min-width: 720px) {
  :root { --gutter: 32px; }
}

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

html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
svg { width: 1em; height: 1em; flex: none; }
a { color: inherit; }

h1, h2, h3 {
  font-stretch: var(--display-width);
  font-weight: 750;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: 8px;
  top: -100px;
  z-index: 10;
  background: var(--bg);
  color: var(--text);
  padding: 10px 14px;
}
.skip:focus { top: 8px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Navy focus ring on light sections, white on dark ones. */
:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 3px;
}
.site-header :focus-visible,
.hero :focus-visible,
.newsletter :focus-visible,
.site-footer :focus-visible { outline-color: #fff; }

/* ---------- Buttons and links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font: 600 1rem/1 var(--font);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.btn-primary { background: var(--berry); color: #fff; }
.btn-primary:hover { background: var(--berry-dark); }

.btn-outline-light { color: var(--on-dark); border-color: rgb(255 255 255 / 60%); }
.btn-outline-light:hover { border-color: #fff; background: rgb(255 255 255 / 10%); }

.text-link {
  font-weight: 600;
  color: var(--navy);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.text-link:hover { text-decoration-thickness: 2px; }

/* ---------- Header ---------- */

.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 5;
  padding: 20px 0;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand img { width: 160px; }
@media (min-width: 720px) { .brand img { width: 190px; } }

.header-nav { display: flex; align-items: center; gap: 2px; }
.nav-link {
  display: none;
  color: var(--on-dark);
  text-decoration: none;
  font-weight: 500;
  padding: 10px 12px;
}
.nav-link:hover { text-decoration: underline; text-underline-offset: 4px; }
@media (min-width: 640px) { .nav-link { display: inline-block; } }

.icon-link {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--on-dark);
  opacity: 0.85;
}
.icon-link:hover { opacity: 1; }
.icon-link svg { width: 19px; height: 19px; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  background: var(--ink);
  color: var(--on-dark);
  padding: 132px 0 56px;
}
@media (min-width: 720px) {
  .hero { padding: 180px 0 88px; min-height: min(78vh, 760px); display: flex; align-items: flex-end; }
}

.hero-photo {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 45%;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgb(21 23 47 / 92%) 0%, rgb(21 23 47 / 78%) 50%, rgb(21 23 47 / 45%) 100%);
}
@media (max-width: 719px) {
  .hero::before { background: rgb(21 23 47 / 84%); }
}

.hero h1 {
  font-size: clamp(2.25rem, 6.2vw, 4.1rem);
  font-weight: 800;
  max-width: 15ch;
}

.lede {
  max-width: 50ch;
  margin: 20px 0 0;
  font-size: clamp(1.06rem, 1.5vw, 1.2rem);
  color: var(--on-dark-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

/* ---------- Events ---------- */

.events { padding: 64px 0 56px; }
@media (min-width: 720px) { .events { padding: 96px 0 72px; } }

.events > .wrap > h2 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  color: var(--ink);
  padding-bottom: 20px;
  border-bottom: 2px solid var(--ink);
}

.event-grid { display: grid; }
@media (min-width: 880px) {
  .event-grid { grid-template-columns: 1fr 1fr; }
  .event + .event { border-left: 1px solid var(--line); }
  .event:first-child { padding-right: 48px; }
  .event + .event { padding-left: 48px; }
}

.event {
  display: flex;
  flex-direction: column;
  padding: 36px 0 40px;
}
@media (max-width: 879px) {
  .event + .event { border-top: 1px solid var(--line); }
}

.event-logo { align-self: flex-start; margin-bottom: 20px; }
.event-logo-gb { height: 56px; width: auto; }
.event-logo-gamayo { height: 30px; width: auto; margin: 13px 0 33px; }

.event h3 { font-size: 1.85rem; color: var(--ink); margin-bottom: 12px; }
.event-summary { margin: 0 0 24px; color: var(--muted); max-width: 52ch; }

.details { margin: 0 0 20px; border-top: 1px solid var(--line); }
.details div {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.details dt { font-weight: 600; color: var(--ink); }
.details dd { margin: 0; }

.event-aside { margin: 0 0 20px; font-size: 0.95rem; color: var(--muted); }

.event-status {
  margin: auto 0 0;
  padding-top: 4px;
  font-weight: 600;
  color: var(--ink);
}
.event-status .when { color: var(--berry); }
.event-status small {
  display: block;
  font-size: 0.92rem;
  font-weight: 400;
  color: var(--muted);
}

.event-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  margin-top: 18px;
}

.sponsors {
  margin: 8px 0 0;
  padding-top: 24px;
  color: var(--muted);
  max-width: 78ch;
}
.sponsors a { color: var(--text); text-underline-offset: 3px; }

/* ---------- Newsletter ---------- */

.newsletter {
  background: var(--navy);
  color: var(--on-dark);
  padding: 64px 0;
}
@media (min-width: 720px) { .newsletter { padding: 88px 0; } }

.newsletter-inner { display: grid; gap: 28px; }
@media (min-width: 960px) {
  .newsletter-inner { grid-template-columns: 5fr 7fr; gap: 64px; align-items: end; }
}

.newsletter h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); max-width: 16ch; }
.newsletter-copy p { color: var(--on-dark-muted); max-width: 44ch; margin: 16px 0 0; }

.signup-row {
  display: grid;
  gap: 14px;
  align-items: end;
}
@media (min-width: 600px) {
  .signup-row { grid-template-columns: 1fr 1.4fr auto; }
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.92rem;
}
.field input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 2px solid transparent;
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  font: 400 1rem var(--font);
}
.field input:focus { outline: 2px solid #fff; outline-offset: 2px; }
.field input[aria-invalid="true"] { border-color: #ff9db4; }

.field-error {
  margin: 10px 0 0;
  font-weight: 600;
  color: #ffc2d0;
}

.hp { position: absolute; left: -5000px; }

.form-message {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-left: 3px solid var(--on-dark-muted);
  background: rgb(0 0 0 / 15%);
}
.form-message.is-ok { border-color: #7fd6a8; }
.form-message.is-error { border-color: #ff9db4; }


/* ---------- Footer ---------- */

.site-footer {
  background: var(--ink);
  color: var(--on-dark-muted);
  padding: 56px 0 28px;
  font-size: 0.95rem;
}
.footer-inner {
  display: grid;
  gap: 36px;
}
@media (min-width: 720px) {
  .footer-inner { grid-template-columns: 2fr 1fr 1fr; gap: 48px; }
}
.footer-logo { width: 150px; margin-bottom: 14px; }
.footer-about p { margin: 0; max-width: 34ch; }

.footer-col h2 {
  font-size: 0.95rem;
  font-stretch: 100%;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--on-dark);
  margin-bottom: 12px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-col a { color: var(--on-dark); text-decoration: none; }
.footer-col a:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer-col a span { color: var(--on-dark-muted); margin-left: 4px; }

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px solid rgb(255 255 255 / 12%);
  font-size: 0.88rem;
}
.footer-legal p { margin: 0; }
.footer-legal a { color: var(--on-dark-muted); }
.footer-legal a:hover { color: var(--on-dark); }

/* ---------- Newsletter consent ---------- */

.consent {
  margin: 12px 0 0;
  font-size: 0.88rem;
  color: var(--on-dark-muted);
  max-width: 60ch;
}
.consent a { color: var(--on-dark); text-underline-offset: 3px; }

/* ---------- Inner pages (privacy, 404) ---------- */

.page .site-header {
  position: static;
  background: var(--ink);
}

.page-main { padding: 56px 0 80px; }
@media (min-width: 720px) { .page-main { padding: 80px 0 104px; } }

.prose { max-width: 68ch; }
.prose h1 { font-size: clamp(2.1rem, 5vw, 3rem); color: var(--ink); margin-bottom: 12px; }
.prose h2 { font-size: 1.35rem; color: var(--ink); margin: 40px 0 10px; }
.prose p, .prose ul { margin: 0 0 14px; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 6px; }
.prose a { color: var(--navy); text-underline-offset: 3px; }
.prose .updated { color: var(--muted); margin-bottom: 32px; }

.not-found { padding: 96px 0 120px; }
.not-found h1 { font-size: clamp(2.4rem, 6vw, 3.6rem); color: var(--ink); margin-bottom: 14px; }
.not-found p { color: var(--muted); max-width: 46ch; margin: 0 0 28px; }

.page .site-footer { padding: 28px 0; }
.page .footer-legal { margin-top: 0; padding-top: 0; border-top: 0; }
