/*
 * Styles der Turnier-Seite.
 *
 * Übernommen aus dem Design-Entwurf (Claude Design, «Unihockey Turnier»).
 * Farben, Schriftgrössen und clamp()-Werte entsprechen dem Entwurf; die dort als
 * style-hover-Attribute notierten Zustände sind hier echte :hover-Regeln.
 */

/* --- Grundlagen ----------------------------------------------------------- */

/*
 * Farben: Rot und Gelb sind die Markenfarben der Pfadi Speicher.
 * --red-dark ist der Hover-Ton zu Rot, --orange der schmale Streifen im
 * Titelbereich — eine Nuance des Gelbs in Richtung Orange.
 */
:root {
  --red: #e63329;
  --red-dark: #b7241c;
  --yellow: #fab400;
  --orange: #e68a00;
  --ink: #1a1a1a;
  --paper: #f4f1ec;
  --white: #ffffff;
  --grey: #4a4a4a;
  --grey-light: #bdbdbd;
  --sans: 'Fira Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --condensed: 'Fira Sans Condensed', 'Fira Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 28px);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--red);
  text-decoration: none;
}

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

/* Tastatur-Navigation muss sichtbar sein. */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.hero a:focus-visible,
.signup-box a:focus-visible,
.site-footer a:focus-visible {
  outline-color: var(--white);
}

/* Nur für Screenreader — z. B. die Überschrift des Anmelde-Links. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.site {
  min-height: 100vh;
}

/* Punktraster, im Entwurf mehrfach als eigenes div. */
.dots {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.dots--light {
  background-image: radial-gradient(var(--white) 1.4px, transparent 1.5px);
  background-size: 14px 14px;
  opacity: 0.16;
}

.dots--dark {
  background-image: radial-gradient(var(--ink) 1.3px, transparent 1.4px);
  background-size: 14px 14px;
  opacity: 0.1;
}

/* --- Skewed Buttons ------------------------------------------------------- */

/*
 * Der Button selbst ist um -8deg geschert, der Text darin um +8deg zurück —
 * so steht die Schrift gerade in einem schrägen Kasten.
 */
.btn {
  display: inline-block;
  border: 0;
  font-family: var(--sans);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transform: skewX(-8deg);
}

.btn > span {
  display: inline-block;
  transform: skewX(8deg);
}

.btn--nav {
  background: var(--red);
  color: var(--white);
  font-size: 15px;
  padding: 10px 18px;
}

.btn--nav:hover {
  background: var(--red-dark);
  color: var(--white);
}

.btn--hero {
  background: var(--ink);
  color: var(--white);
  font-family: var(--condensed);
  font-size: clamp(19px, 3.4vw, 24px);
  letter-spacing: 0.02em;
  padding: 16px var(--gutter);
}

.btn--hero:hover {
  background: var(--yellow);
  color: var(--ink);
}

.btn--schedule {
  background: var(--ink);
  color: var(--white);
  font-family: var(--condensed);
  font-size: clamp(17px, 3vw, 21px);
  letter-spacing: 0.02em;
  padding: 13px 24px;
}

.btn--schedule:hover {
  background: var(--yellow);
  color: var(--ink);
}

.btn--signup {
  background: var(--red);
  color: var(--white);
  font-family: var(--condensed);
  font-size: clamp(21px, 4vw, 28px);
  padding: 18px clamp(24px, 5vw, 38px);
}

.btn--signup:hover {
  background: var(--yellow);
  color: var(--ink);
}

/* --- Kopfbereich ---------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  padding: 14px var(--gutter);
  background: var(--white);
  border-bottom: 3px solid var(--red);
}

/*
 * Das Logo ist inline eingebettet und mit fill="currentColor" gezeichnet —
 * die color-Eigenschaft bestimmt also seine Farbe.
 */
.brand {
  display: flex;
  align-items: center;
  color: var(--red);
}

.brand:hover {
  color: var(--red-dark);
}

.brand-logo {
  display: block;
  height: 30px;
  width: auto;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px clamp(14px, 2.5vw, 26px);
}

.nav-link {
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
}

.nav-link:hover {
  color: var(--red);
}

/*
 * Auf kleinen Bildschirmen bleibt der Kopf nicht kleben: die Navigation bricht
 * dort auf mehrere Zeilen um und würde sonst einen grossen Teil des Bildschirms
 * dauerhaft belegen.
 */
@media (max-width: 640px) {
  .site-header {
    position: static;
  }
}

/* --- Jubiläums-Banner ----------------------------------------------------- */

.jubi {
  display: block;
  position: relative;
  overflow: hidden;
  background: var(--yellow);
  text-decoration: none;
}

.jubi-inner {
  position: relative;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
}

.jubi-badge {
  display: inline-block;
  background: var(--ink);
  color: var(--yellow);
  font-family: var(--condensed);
  font-weight: 800;
  font-size: clamp(18px, 3.2vw, 24px);
  letter-spacing: 0.02em;
  padding: 5px 14px 7px;
  transform: rotate(-1.5deg);
}

.jubi-text {
  flex: 1;
  min-width: 220px;
  font-weight: 700;
  font-size: clamp(15px, 2.4vw, 19px);
  line-height: 1.3;
  color: var(--ink);
  text-wrap: pretty;
}

.jubi-cta {
  font-family: var(--condensed);
  font-weight: 800;
  font-size: clamp(15px, 2.4vw, 18px);
  letter-spacing: 0.02em;
  color: var(--red);
}

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

.hero {
  position: relative;
  overflow: hidden;
  background: var(--red);
}

/* Die zwei schrägen Balken rechts im Hintergrund. */
.hero-stripe {
  position: absolute;
  top: -10%;
  height: 130%;
  transform: rotate(9deg);
  pointer-events: none;
}

.hero-stripe--wide {
  right: 6%;
  width: 120px;
  background: var(--yellow);
}

.hero-stripe--narrow {
  right: 14%;
  width: 52px;
  background: var(--orange);
}

.hero-inner {
  position: relative;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(44px, 7vw, 78px) var(--gutter) clamp(50px, 8vw, 88px);
}

.hero-date {
  display: inline-block;
  background: var(--yellow);
  padding: 8px 22px 10px;
  margin-bottom: 26px;
  transform: rotate(-2.2deg);
}

.hero-date > span {
  display: inline-block;
  transform: rotate(2.2deg);
  font-family: var(--condensed);
  font-weight: 800;
  font-size: clamp(30px, 7vw, 56px);
  letter-spacing: 0.02em;
  color: var(--ink);
}

.hero-title {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.hero-title span {
  display: inline-block;
  max-width: 100%;
  background: var(--white);
  font-family: var(--condensed);
  font-weight: 800;
  font-size: clamp(46px, 11vw, 104px);
  line-height: 0.98;
  padding: 6px clamp(12px, 3vw, 24px) 12px;
  transform: rotate(-1deg);
}

.hero-title .hero-title-1 {
  color: var(--red);
}

.hero-title .hero-title-2 {
  color: var(--ink);
  margin-left: clamp(12px, 4vw, 34px);
}

.hero-claim {
  margin: 34px 0 0;
  max-width: 520px;
  font-style: italic;
  font-weight: 800;
  font-size: clamp(20px, 4vw, 30px);
  line-height: 1.15;
  color: var(--white);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 34px;
}

.hero-note {
  display: inline-block;
  background: var(--yellow);
  color: var(--ink);
  font-weight: 800;
  font-style: italic;
  font-size: 17px;
  padding: 10px 16px;
  transform: rotate(-1.5deg);
}

/* Flyer-Download: bewusst zurückhaltend, damit er den Anmelde-Button nicht konkurriert. */
.hero-flyer {
  display: inline-block;
  margin-top: 26px;
  color: var(--white);
  font-weight: 700;
  font-size: 16px;
  padding-bottom: 2px;
  border-bottom: 3px solid rgba(255, 255, 255, 0.45);
}

.hero-flyer:hover {
  color: var(--yellow);
  border-bottom-color: var(--yellow);
}

/* --- Hauptsponsoren im Titelbereich -------------------------------------- */

.hero-sponsors {
  position: relative;
  margin-top: clamp(34px, 5vw, 48px);
}

.hero-sponsors-label {
  display: block;
  margin-bottom: 14px;
  font-family: var(--condensed);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
}

.hero-sponsors-row {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(12px, 2vw, 18px);
}

/*
 * Weisse Tafel, leicht gekippt wie das Datum darüber. Das Logo selbst wird
 * gegengedreht, damit es gerade steht — Sponsorenlogos sollen nicht schief hängen.
 */
.hero-sponsor {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 1 auto;
  min-width: 132px;
  min-height: 84px;
  padding: 14px 20px;
  background: var(--white);
  transform: rotate(-1.2deg);
}

.hero-sponsor:nth-child(even) {
  transform: rotate(1.2deg);
}

.hero-sponsor img,
.hero-sponsor > span {
  transform: rotate(1.2deg);
}

.hero-sponsor:nth-child(even) img,
.hero-sponsor:nth-child(even) > span {
  transform: rotate(-1.2deg);
}

.hero-sponsor img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(190px, 40vw);
  max-height: 56px;
  object-fit: contain;
}

/* Ohne Logo steht der Name in der Tafel. */
.hero-sponsor > span {
  font-family: var(--condensed);
  font-weight: 800;
  font-size: clamp(18px, 3vw, 22px);
  line-height: 1.1;
  color: var(--ink);
  text-align: center;
}

a.hero-sponsor:hover {
  background: var(--yellow);
}

a.hero-sponsor:hover > span {
  color: var(--ink);
}

/* --- Abschnitte ----------------------------------------------------------- */

.section {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(40px, 6vw, 64px) var(--gutter) 10px;
}

.section--days {
  padding-top: clamp(46px, 7vw, 76px);
}

.section--extra {
  padding: clamp(36px, 5vw, 56px) var(--gutter) 0;
}

.section--signup {
  padding: clamp(36px, 5vw, 56px) var(--gutter) clamp(56px, 8vw, 90px);
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 26px;
}

.section-head h2 {
  margin: 0;
  font-family: var(--condensed);
  font-weight: 800;
  font-size: clamp(30px, 5vw, 44px);
  color: var(--ink);
}

/* Der farbige Balken neben der Überschrift. */
.section-bar {
  flex: 1;
  height: 6px;
}

.section-bar--red {
  background: var(--red);
}

.section-bar--yellow {
  background: var(--yellow);
}

.section-actions {
  margin-top: 24px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
}

.cards--rules {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

/* --- Turniertage ---------------------------------------------------------- */

.day-card {
  position: relative;
  overflow: hidden;
  background: var(--white);
  border: 3px solid var(--ink);
  padding: 28px 26px 30px;
}

/* Gelbe Ecke oben rechts. */
.day-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 96px;
  height: 96px;
  background: var(--yellow);
  transform: rotate(45deg) translate(34px, -52px);
}

.day-card h3 {
  margin: 0 0 6px;
  font-family: var(--condensed);
  font-weight: 800;
  font-size: 30px;
  color: var(--red);
}

.day-time {
  margin: 0;
  font-weight: 700;
  font-size: 19px;
  color: var(--ink);
}

.day-note {
  margin: 12px 0 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--grey);
  text-wrap: pretty;
}

/* --- Turnierregeln -------------------------------------------------------- */

.rule-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 3px solid var(--ink);
}

.rule-card-head {
  background: var(--red);
  padding: 14px 22px 16px;
}

.rule-card-head h3 {
  margin: 0;
  font-family: var(--condensed);
  font-weight: 800;
  font-size: 28px;
  color: var(--white);
}

.rule-list {
  margin: 0;
  padding: 22px 24px 26px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rule-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 16.5px;
  line-height: 1.45;
  color: var(--ink);
  text-wrap: pretty;
}

/* Die gelbe Raute als Aufzählungszeichen. */
.rule-list li::before {
  content: '';
  flex: none;
  width: 11px;
  height: 11px;
  margin-top: 7px;
  background: var(--yellow);
  transform: rotate(45deg);
}

/* --- Infobox -------------------------------------------------------------- */

.extra-box {
  position: relative;
  overflow: hidden;
  background: var(--yellow);
  border: 3px solid var(--ink);
  padding: 34px 32px 38px;
}

.extra-box .dots--dark {
  background-size: 15px 15px;
  opacity: 0.09;
}

.extra-inner {
  position: relative;
  max-width: 760px;
}

.extra-box h3 {
  margin: 0 0 12px;
  font-family: var(--condensed);
  font-weight: 800;
  font-size: clamp(26px, 4.5vw, 34px);
  color: var(--ink);
}

.extra-box p {
  margin: 0;
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink);
  text-wrap: pretty;
}

/* --- Anmeldung ------------------------------------------------------------ */

.signup-box {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  padding: 52px 32px 58px;
  text-align: center;
}

.signup-box .dots--light {
  background-size: 15px 15px;
  opacity: 0.1;
}

.signup-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.signup-box h2 {
  margin: 0;
  font-family: var(--condensed);
  font-weight: 800;
  font-size: clamp(28px, 5.5vw, 52px);
  line-height: 1.02;
  color: var(--white);
}

.signup-url {
  font-size: 16px;
  color: var(--grey-light);
  word-break: break-all;
}

/* --- Logo-Wand der Sponsoren ---------------------------------------------- */

/*
 * Steht zwischen dem Anmelde-Kasten und dem Fuss. Oben kein Abstand: den bringt
 * die Anmelde-Sektion schon mit.
 */
.section--sponsors {
  padding: 0 var(--gutter) clamp(48px, 7vw, 76px);
}

/*
 * auto-fill statt auto-fit: die Kästchen bleiben schmal, auch wenn nur zwei
 * Logos erfasst sind — sonst würde ein einzelnes Logo über die ganze Breite gehen.
 */
.sponsor-wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 14px;
}

.sponsor {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 104px;
  padding: 16px 18px;
  background: var(--white);
  border: 3px solid var(--ink);
}

.sponsor img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 60px;
  object-fit: contain;
}

/* Ohne Logo steht der Name im Kästchen. */
.sponsor > span {
  font-family: var(--condensed);
  font-weight: 800;
  font-size: 19px;
  line-height: 1.15;
  color: var(--ink);
  text-align: center;
  text-wrap: balance;
}

a.sponsor:hover {
  border-color: var(--red);
}

a.sponsor:hover > span {
  color: var(--red);
}

/* --- Fuss ----------------------------------------------------------------- */

.site-footer {
  background: var(--red);
  color: var(--white);
  padding: 30px 28px;
}

.footer-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
  align-items: center;
}

.footer-logo {
  display: block;
  height: 26px;
  width: auto;
  color: var(--white);
}

.footer-note {
  font-size: 15px;
  opacity: 0.9;
}

.footer-admin {
  font-size: 13px;
  color: var(--white);
  opacity: 0.65;
}

.footer-admin:hover {
  color: var(--white);
  opacity: 1;
  text-decoration: underline;
}
