/* Startseite (Gesamtseite) – im Design der Website der Event Crew Steinfurt */
:root { --wrap: 1180px; --gutter: 16px; --slant: 44px; --topbar-h: 64px; }
@media (min-width: 900px) { :root { --gutter: 28px; --slant: 70px; --topbar-h: 72px; } }

body { min-height: 100vh; font-size: 16px; line-height: 1.6; overflow-x: clip; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { margin: 0 0 0.5em; line-height: 1.15; letter-spacing: -0.015em; }
h2 { font-size: clamp(1.4rem, 3.4vw, 2rem); font-weight: 700; color: var(--heading); }
p { margin: 0 0 1em; }
[hidden] { display: none !important; }
.muted { color: var(--text-2); }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
:focus-visible { outline: 2px solid var(--ecs-sun); outline-offset: 3px; border-radius: 8px; }

/* Kopfzeile */
.topbar {
  position: sticky; top: 0; z-index: 50; height: var(--topbar-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(16px); backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
}
.topbar-in { height: 100%; display: flex; align-items: center; gap: 12px; }
/* „Turniersystem“ steht überall mittig unter dem Logo (wie in der Seitenleiste der Steuerung) */
.brand { display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 0; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { height: 30px; width: auto; }
/* padding-left gleicht den Buchstabenabstand nach dem letzten Zeichen aus: optisch mittig */
.brand span { padding-left: 0.16em; font-size: 11px; line-height: 1; font-weight: 700; text-transform: uppercase; letter-spacing: 0.16em; color: var(--ecs-sun); white-space: nowrap; }
:root[data-theme='light'] .brand span { color: var(--heading); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.iconbtn {
  width: 42px; height: 42px; border-radius: 999px; display: inline-grid; place-items: center;
  color: var(--text); background: transparent; border: 0; cursor: pointer;
}
.iconbtn:hover { background: var(--surface); }
@media (min-width: 900px) { .brand img { height: 40px; } .brand span { font-size: 12px; } }
@media (max-width: 600px) {
  .brand { gap: 4px; }
  .brand img { height: 28px; }
  .brand span { padding-left: 0.18em; font-size: 10px; letter-spacing: 0.18em; }
}
@media (max-width: 359px) { .brand img { height: 22px; } }

/* Schaltflächen */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: 0.96rem; line-height: 1.1; cursor: pointer; text-decoration: none !important;
  transition: transform 0.12s ease, filter 0.15s ease, background 0.15s ease;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.6; cursor: wait; }
.btn-cta { background: var(--cta); color: var(--cta-text); box-shadow: 0 12px 26px -16px var(--cta); }
.btn-cta:hover { filter: brightness(1.05); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 12px 26px -14px var(--primary); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-soft { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.btn-soft:hover { background: color-mix(in srgb, var(--surface-2) 82%, var(--text)); }
.btn-ghost { background: transparent; color: var(--text); border-color: color-mix(in srgb, var(--text) 30%, transparent); }
.btn-ghost:hover { background: color-mix(in srgb, var(--text) 8%, transparent); }
.btn-lg { min-height: 56px; padding: 0 28px; font-size: 1.02rem; }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 0.88rem; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.linkmore { font-weight: 700; font-size: 0.92rem; white-space: nowrap; }

.eyebrow {
  display: block; margin-bottom: 8px; font-size: 0.76rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--text-2);
}
.eyebrow-pill {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 16px; padding: 6px 12px; border-radius: 999px;
  font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
  background: color-mix(in srgb, var(--bg) 55%, transparent); border: 1px solid color-mix(in srgb, #fff 18%, transparent); color: #e8eefc;
}
.eyebrow-pill svg { color: var(--ecs-sun); }

/* Titelbereich mit schräger Unterkante wie auf der Website */
.hero {
  position: relative; isolation: isolate; overflow: hidden; color: #fff;
  padding: 70px 0 calc(var(--slant) + 70px);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--slant)), 0 100%);
  background:
    radial-gradient(120% 80% at 85% 0%, rgba(93, 114, 229, 0.42), transparent 60%),
    radial-gradient(60% 70% at 0% 100%, rgba(255, 225, 86, 0.1), transparent 60%),
    linear-gradient(180deg, #0a1250 0%, #000325 100%);
}
.hero h1 { font-size: clamp(2.2rem, 7.6vw, 4.2rem); font-weight: 700; line-height: 1.05; letter-spacing: -0.03em; max-width: 15ch; margin-bottom: 18px; text-wrap: balance; }
.hero h1 .hl { color: var(--ecs-sun); }
.hero-text { font-size: clamp(1rem, 2.4vw, 1.16rem); max-width: 58ch; color: #e8eefc; opacity: 0.92; margin-bottom: 26px; }
.hero .live-dot { display: inline-block; width: 9px; height: 9px; margin-right: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2); vertical-align: middle; }
.hero .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, 0.3); }
.hero-mark {
  position: absolute; right: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter))); top: 60px;
  width: clamp(120px, 16vw, 200px); height: auto; filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.5));
  display: none; animation: float 7s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-10px) rotate(-3deg); } }
@media (min-width: 900px) { .hero-mark { display: block; } .hero { padding-top: 96px; } }

.main { display: grid; gap: 56px; padding-bottom: 40px; }

/* Einstiege: Karten, die in den Titelbereich ragen */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: calc(var(--slant) * -1 - 24px); position: relative; z-index: 2; }
.tile {
  display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; align-items: center; padding: 18px 20px;
  border-radius: 22px; background: color-mix(in srgb, var(--surface) 94%, transparent); border: 1px solid var(--border);
  color: var(--text); box-shadow: var(--shadow); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.tile:hover { text-decoration: none; transform: translateY(-3px); border-color: var(--primary); }
.tile-icon { grid-row: span 2; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.tile-icon svg { width: 24px; height: 24px; }
.tile:nth-child(2) .tile-icon { background: color-mix(in srgb, var(--ecs-sun) 16%, var(--surface)); color: var(--ecs-sun); }
:root[data-theme='light'] .tile:nth-child(2) .tile-icon { color: #8a6d00; }
.tile:nth-child(3) .tile-icon { background: color-mix(in srgb, #22c55e 18%, var(--surface)); color: #4ade80; }
:root[data-theme='light'] .tile:nth-child(3) .tile-icon { color: #15803d; }
.tile strong { font-size: 1.06rem; }
.tile > span:not(.tile-icon) { color: var(--text-2); font-size: 0.88rem; line-height: 1.4; }

.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 20px; }
.section-head h2 { margin: 0; }
.section-head p { margin: 6px 0 0; }

/* Courts des aktiven Turniers */
.courts { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.court {
  display: grid; gap: 12px; padding: 18px; border-radius: 22px; background: var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow);
}
.court.live { border-color: color-mix(in srgb, var(--live) 50%, var(--border)); }
.court-head { display: flex; align-items: center; gap: 8px; }
.court-head strong { font-size: 1.2rem; }
.court-head small { color: var(--text-3); font-weight: 600; }
.state { margin-left: auto; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; background: var(--surface-2); color: var(--text-2); }
.court.live .state { background: var(--live); color: #fff; }
.court.free .state { background: var(--success-soft); color: var(--success); }
.game { min-height: 44px; font-size: 0.9rem; color: var(--text-2); line-height: 1.45; }
.game b { color: var(--text); }
.game .score { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--text); }
.court-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.court-actions .btn { min-height: 42px; padding: 0 12px; font-size: 0.9rem; }
.note { color: var(--text-2); font-size: 0.88rem; margin: 14px 0 0; }

/* Anmeldung + Funktionen */
.split { display: grid; gap: 22px; align-items: start; scroll-margin-top: calc(var(--topbar-h) + 20px); }
@media (min-width: 900px) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 26px; padding: 26px; box-shadow: var(--shadow); }
.login-card h2 { margin-bottom: 8px; }
.form { display: grid; gap: 14px; margin-top: 6px; }
.form label { display: grid; gap: 7px; font-weight: 600; font-size: 0.92rem; }
.form input {
  width: 100%; min-height: 52px; padding: 13px 15px; border-radius: 14px; border: 1px solid var(--border);
  background: var(--field); color: var(--text); font: inherit; font-size: 16px; -webkit-appearance: none; appearance: none;
}
.form input::placeholder { color: var(--text-3); }
.form input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 35%, transparent); }
.error { margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--live-soft); color: var(--live); font-size: 0.9rem; font-weight: 600; }
.accounts { display: grid; gap: 8px; margin: 4px 0 16px; }
.intent { margin: 0 0 14px; padding: 10px 14px; border-radius: 12px; background: var(--accent-soft); border: 1px solid var(--primary); font-size: 0.9rem; font-weight: 600; }
.accounts > p { margin: 0 0 2px; font-size: 0.88rem; }
.account {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 16px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
}
.account:hover { text-decoration: none; border-color: var(--primary); }
.account span { flex: 1; min-width: 0; display: grid; line-height: 1.35; }
.account strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account small { color: var(--text-2); }
.account i { font-style: normal; color: var(--text-3); }
.accounts .link { justify-self: start; border: 0; background: none; padding: 0; font: inherit; font-size: 0.88rem; font-weight: 600; color: var(--accent); cursor: pointer; }

.features ul { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 12px; }
.features li {
  display: grid; gap: 2px; padding: 16px 18px 16px 52px; position: relative; border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 55%, transparent); border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
.features li::before {
  content: ''; position: absolute; left: 18px; top: 19px; width: 20px; height: 20px; border-radius: 7px;
  background: var(--ecs-sun); -webkit-mask: var(--check) center / 14px no-repeat; mask: var(--check) center / 14px no-repeat;
  --check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m9.6 16.6-4.2-4.2L4 13.8l5.6 5.6L20 9l-1.4-1.4z'/%3E%3C/svg%3E");
}
:root[data-theme='light'] .features li::before { background: var(--primary); }
.features li span { color: var(--text-2); font-size: 0.92rem; }

/* Fußbereich mit schräger Oberkante */
.footer { position: relative; margin-top: 60px; padding: 56px 0 40px; background: #00021a; color: #98a0b6; font-size: 0.92rem; }
.footer::before { content: ''; position: absolute; left: 0; right: 0; top: -40px; height: 41px; background: #00021a; clip-path: polygon(0 100%, 100% 0, 100% 100%); }
.footer-in { display: grid; gap: 26px; }
@media (min-width: 760px) { .footer-in { grid-template-columns: 1.4fr 1fr; align-items: center; } }
.footer-logo { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 14px; }
.footer-logo img { display: block; height: 42px; width: auto; }
.footer-logo span { padding-left: 0.16em; font-size: 12px; line-height: 1; font-weight: 700; text-transform: uppercase; letter-spacing: 0.16em; color: var(--ecs-sun); }
.footer-brand p { max-width: 46ch; margin: 0; }
.footer-brand b { color: #dfe9fb; font-weight: 600; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: flex-start; }
@media (min-width: 760px) { .footer-links { justify-content: flex-end; } }
.footer a { color: #98a0b6; font-weight: 500; }
.footer a:hover { color: #dfe9fb; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
