/* ============================================
   EURO PADEL AWARDS 2027 — Master Stylesheet
   ============================================

   COLOUR RULE — read before touching --yellow.
   #FFCC00 on white is 1.51:1 and fails WCAG AA badly. Yellow is a
   dark-ground accent and fill colour ONLY; it must never carry text on a
   light background. On light sections, emphasis comes from --blue.
   tests/test-palette.php enforces this. Run: php tests/run.php

   The blue is a vivid ultramarine, deliberately NOT EU Reflex Blue
   (#003399). The brand reads as European without reading as an EU
   institution. Do not "correct" it.
   ============================================ */

@font-face {
  font-family: 'Neuething Sans';
  src: url('fonts/NeuethingSans-BoldUltraExpanded.woff2') format('woff2'),
       url('fonts/NeuethingSans-BoldUltraExpanded.woff')  format('woff');
  font-weight: 400 900;   /* stops the browser faux-bolding an already-bold face */
  font-style: normal;
  font-display: swap;
}

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

:root {
  --blue-deep:   #080B33;
  --blue-mid:    #0E1466;
  --blue:        #131CB9;
  --blue-hover:  #2831D6;
  --yellow:      #FFCC00;
  --yellow-soft: #FFE066;
  --cream:       #F5F1E8;
  --white:       #FFFFFF;
  --gray-100:    #F7F7F8;
  --gray-200:    #E8E8EC;
  --gray-300:    #D0D0D8;
  --gray-600:    #6B6B7B;
  --gray-800:    #2A2A3A;
  --error:       #B00020;

  --font-display: 'Neuething Sans', 'Oswald', 'Segoe UI', sans-serif;
  --font-body: 'DM Sans', 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --max-w: 1240px;
  --radius: 12px;
  --radius-sm: 8px;
  --transition: .3s cubic-bezier(.4,0,.2,1);
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; font-family: inherit; }

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

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; }
h1 { font-size: clamp(1.7rem, 3.4vw, 2.9rem); letter-spacing: -.005em; text-transform: uppercase; }
h2 { font-size: clamp(1.35rem, 2.3vw, 2rem);  letter-spacing: -.005em; text-transform: uppercase; }
h3 { font-size: clamp(1rem, 1.4vw, 1.2rem); margin-bottom: 12px; }
h4 { font-size: 1.1rem; letter-spacing: .01em; }

/* Visible focus for keyboard users — never remove without a replacement. */
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

.skip-link {
  position: absolute; left: -9999px;
  background: var(--blue-deep); color: var(--white);
  padding: 12px 20px; z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 32px; border-radius: 50px;
  font-weight: 600; font-size: .95rem; letter-spacing: .02em;
  transition: var(--transition);
}
.btn--primary { background: var(--blue); color: var(--white); }
.btn--primary:hover { background: var(--blue-hover); transform: translateY(-2px); }
.btn--yellow { background: var(--yellow); color: var(--blue-deep); }
.btn--yellow:hover { background: var(--yellow-soft); transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--white); border: 1px solid rgba(255,255,255,.4); }
.btn--ghost:hover { border-color: var(--yellow); color: var(--yellow); }

/* --- Header --- */
.site-header { background: var(--blue-deep); color: var(--white); position: sticky; top: 0; z-index: 50; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 14px 24px; position: relative; }
.site-header__logo img { height: 46px; width: auto; }
.site-nav ul { display: flex; align-items: center; gap: 28px; }
.site-nav a { font-weight: 500; font-size: .95rem; }
.site-nav a:hover { color: var(--yellow); }
.site-nav a[aria-current="page"] { color: var(--yellow); }
.site-nav .btn:hover { color: var(--white); }
.nav-toggle { display: none; background: none; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--white); margin: 5px 0; transition: var(--transition); }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; inset: 100% 0 auto 0; background: var(--blue-deep); padding: 24px; border-top: 1px solid rgba(255,255,255,.12); }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: flex-start; gap: 20px; }
  .site-header__logo img { height: 38px; }
}

/* --- Footer --- */
.site-footer { background: var(--blue-deep); color: var(--white); padding: 64px 0 32px; margin-top: 0; }
.site-footer__inner { display: grid; gap: 32px; }
.site-footer__brand img { height: 54px; width: auto; margin-bottom: 16px; }
.site-footer__brand p { color: var(--gray-300); max-width: 46ch; }
.site-footer__links, .site-footer__legal { display: flex; flex-wrap: wrap; gap: 24px; }
.site-footer__legal { font-size: .875rem; color: var(--gray-300); }
.site-footer a:hover { color: var(--yellow); }
.site-footer__note { color: var(--gray-300); font-size: .875rem; border-top: 1px solid rgba(255,255,255,.15); padding-top: 24px; }
.site-footer__note a { color: var(--yellow); }

/* --- Consent banner --- */
.consent {
  position: fixed; inset: auto 16px 16px 16px; z-index: 90;
  background: var(--blue-deep); color: var(--white);
  padding: 24px; border-radius: var(--radius);
  display: grid; gap: 16px; max-width: 480px;
  box-shadow: 0 12px 48px rgba(0,0,0,.35);
}
.consent__actions { display: flex; gap: 12px; }
.consent__actions .btn { flex: 1; padding: 12px 20px; }
/* Yellow on --blue-deep is 12.56:1. It would NOT be permitted on white. */
.consent__more { font-size: .8125rem; }
.consent__more a { color: var(--yellow); text-decoration: underline; }

/* --- Section scaffolding --- */
.section { padding: 72px 0; }
.page-head { background: var(--blue-deep); color: var(--white); padding: 72px 0 64px; }
.page-head .lede { color: var(--gray-300); }
.container--narrow { max-width: 720px; }

.lede { font-size: clamp(1.05rem, 1.6vw, 1.25rem); max-width: 62ch; margin-top: 16px; }

.section-label {
  display: inline-block; font-family: var(--font-mono);
  font-size: .75rem; font-weight: 500; letter-spacing: .18em;
  text-transform: uppercase; color: var(--blue); margin-bottom: 12px;
}
/* On dark grounds only — 12.56:1 on --blue-deep. Never on white (1.51:1). */
.section-label--light { color: var(--yellow); }
.page-head .section-label { color: var(--yellow); }

.prose { max-width: 68ch; }
.prose h2 { margin: 40px 0 16px; color: var(--blue); }
.prose h2:first-child { margin-top: 0; }
.prose p { margin-bottom: 16px; }
.prose a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.prose a:hover { color: var(--blue-hover); }
.prose code { font-family: var(--font-mono); font-size: .875em; background: var(--gray-100); padding: 2px 6px; border-radius: 4px; }

/* --- Hero --- */
.hero { background: var(--blue-deep); color: var(--white); padding: 80px 0 88px; }
.hero__inner { display: grid; justify-items: start; }
.hero__logo { width: min(460px, 80%); height: auto; margin-bottom: 32px; }
.hero .lede { color: var(--gray-300); }
.hero__when { font-family: var(--font-mono); font-size: .875rem; letter-spacing: .1em; text-transform: uppercase; color: var(--yellow); margin-top: 24px; }
.hero__when:empty { display: none; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* --- Category and group grids --- */
.category-group { padding: 56px 0; }
.category-group:nth-child(even) { background: var(--gray-100); }
.category-grid, .group-grid {
  display: grid; gap: 20px; margin-top: 28px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.category-card, .group-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 26px; }
.category-group:nth-child(even) .category-card { background: var(--white); }
.category-card h3, .group-card h3 { color: var(--blue); }
.category-card p, .group-card p { color: var(--gray-600); font-size: .95rem; }
.group-teaser { padding: 72px 0; }
.group-teaser .btn { margin-top: 32px; }
.group-card__count { font-family: var(--font-mono); font-size: .8125rem; color: var(--blue); margin-top: 12px; }

.intro { padding: 72px 0; background: var(--cream); }
.ceremony { background: var(--blue-mid); color: var(--white); padding: 72px 0; }
.ceremony a { color: var(--yellow); text-decoration: underline; }

.cta-band { background: var(--blue-deep); color: var(--white); padding: 72px 0; text-align: center; }
.cta-band h2 { margin-bottom: 28px; }

/* --- Forms --- */
.stack-form, .nomination-form { display: grid; gap: 24px; max-width: 720px; }
.nomination-form fieldset { border: 0; display: grid; gap: 20px; padding: 28px; background: var(--gray-100); border-radius: var(--radius); }
.nomination-form legend { font-family: var(--font-display); text-transform: uppercase; font-size: 1rem; color: var(--blue); padding: 0 8px; }
.form-field { display: grid; gap: 6px; }
.form-field label { font-weight: 600; font-size: .9375rem; }
.form-field input[type="text"], .form-field input[type="email"], .form-field input[type="url"],
.form-field select, .form-field textarea {
  font-family: inherit; font-size: 1rem; padding: 12px 14px;
  border: 1px solid var(--gray-300); border-radius: var(--radius-sm);
  background: var(--white); color: var(--gray-800); width: 100%;
}
.form-field textarea { resize: vertical; line-height: 1.6; }
.form-field--check label { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.form-field--check input { margin-top: 5px; flex: none; }
.form-hint { font-size: .8125rem; color: var(--gray-600); }
.form-hint.is-over { color: var(--error); font-weight: 600; }

.form-error, .form-success, .form-notice {
  border-radius: var(--radius); padding: 24px; margin-bottom: 32px;
}
.form-error   { background: #FDECEF; border: 1px solid var(--error); color: var(--error); }
.form-error ul { margin-top: 8px; padding-left: 20px; list-style: disc; }
.form-success { background: var(--cream); border: 1px solid var(--blue); }
.form-success h2, .form-notice h2 { color: var(--blue); margin-bottom: 8px; }
.form-notice  { background: var(--gray-100); border: 1px solid var(--gray-300); }
.form-notice a, .form-success a { color: var(--blue); text-decoration: underline; }
.contact-direct { margin-top: 32px; color: var(--gray-600); }
.contact-direct a { color: var(--blue); text-decoration: underline; }

/* Ghost button needs a dark outline when it sits on a light ground. */
.btn--ghost-dark { color: var(--blue); border-color: var(--blue); }
.btn--ghost-dark:hover { background: var(--blue); color: var(--white); }

/* The honeypot must be invisible but reachable by bots, and skipped by
   screen readers and keyboards. type="hidden" would be read and skipped
   by the bots we are trying to catch. */
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 700px) {
  .section, .group-teaser, .intro, .ceremony, .cta-band { padding: 48px 0; }
  .page-head { padding: 48px 0 40px; }
  .hero { padding: 56px 0 64px; }
  .hero__actions .btn { width: 100%; }
}
