:root {
  --bg: #f4ecdd;
  --surface: #fbf5ea;
  --surface-2: #efe1c9;
  --text: #211a11;
  --text-soft: #5b4a35;
  --line: #d9c6a4;
  --line-soft: #e7d8bd;
  --accent: #9a7529;
  --accent-strong: #7d5e1d;
  --on-accent: #fdf8ee;
  --noir: #100e0c;
  --noir-text: #f0e6d2;
  --shadow: 24px 24px 60px -30px rgba(45, 32, 15, .45);
  color-scheme: light;
}
:root:not([data-theme="light"]) {
  @media (prefers-color-scheme: dark) {
    --bg: #14100b;
    --surface: #1d1710;
    --surface-2: #2a2016;
    --text: #efe3cf;
    --text-soft: #b6a184;
    --line: #3a2d1f;
    --line-soft: #2f2418;
    --accent: #c9a24b;
    --accent-strong: #e2c072;
    --on-accent: #17120b;
    --noir: #0b0a08;
    --noir-text: #f0e6d2;
    --shadow: 24px 24px 70px -34px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #14100b;
  --surface: #1d1710;
  --surface-2: #2a2016;
  --text: #efe3cf;
  --text-soft: #b6a184;
  --line: #3a2d1f;
  --line-soft: #2f2418;
  --accent: #c9a24b;
  --accent-strong: #e2c072;
  --on-accent: #17120b;
  --noir: #0b0a08;
  --noir-text: #f0e6d2;
  --shadow: 24px 24px 70px -34px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Karla", "Segoe UI", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: "Marcellus", "Cormorant Garamond", Georgia, serif;
  font-weight: 400;
  line-height: 1.12;
  text-wrap: balance;
  margin: 0;
}

a { color: var(--accent-strong); }
:root[data-theme="dark"] a,
:root:not([data-theme="light"]) a { color: var(--accent-strong); }

abbr[title] { text-decoration-style: dotted; cursor: help; }

.wrap {
  width: min(1080px, 100% - 3rem);
  margin-inline: auto;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Top bar ---------- */
.utilitybar {
  background: color-mix(in srgb, var(--noir), #000 35%);
  color: var(--noir-text);
  border-bottom: 1px solid rgba(201, 162, 75, .16);
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.utilitybar .wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.4rem;
  padding-block: .4rem;
}
.utilitybar a {
  color: var(--noir-text);
  text-decoration: none;
  opacity: .8;
  transition: opacity .2s, color .2s;
}
.utilitybar a:hover { opacity: 1; color: #dab659; }
@media (max-width: 680px) {
  .utilitybar .wrap { justify-content: center; gap: 1.1rem; }
}

.topbar {
  background: var(--noir);
  color: var(--noir-text);
  border-bottom: 1px solid rgba(201, 162, 75, .35);
}
.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: .95rem;
}
.brand {
  font-family: "Marcellus SC", "Marcellus", serif;
  font-size: 1.15rem;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: #dab659;
  text-decoration: none;
  white-space: nowrap;
}
.nav {
  display: flex;
  gap: 1.6rem;
  font-size: .82rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.nav a {
  color: var(--noir-text);
  text-decoration: none;
  opacity: .78;
  transition: opacity .2s;
}
.nav a:hover { opacity: 1; color: #dab659; }
.nav a[aria-current="page"] { opacity: 1; color: #dab659; }
@media (max-width: 680px) {
  .nav { display: none; }
  .topbar .wrap { justify-content: center; }
}

/* ---------- Hero ---------- */
.hero {
  background: var(--noir);
  color: var(--noir-text);
  padding-top: 1cm;
  padding-bottom: clamp(2.5rem, 6vw, 4.5rem);
}
.hero-figure {
  position: relative;
  line-height: 0;
  width: min(1200px, 100% - 3rem);
  margin-inline: auto;
}
.hero-figure img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 100vh;
  object-fit: cover;
  object-position: center 22%;
}
.hero-figure::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(11,10,8,.15) 0%, rgba(11,10,8,0) 30%, rgba(11,10,8,.65) 100%);
  pointer-events: none;
}
.hero-lede {
  max-width: 44ch;
  margin: clamp(2rem, 5vw, 3rem) auto 0;
  text-align: center;
}
.hero-eyebrow {
  font-family: "Marcellus SC", serif;
  letter-spacing: .3em;
  text-transform: uppercase;
  font-size: .8rem;
  color: #dab659;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .9rem;
  margin-bottom: 1.1rem;
}
.hero-eyebrow::before,
.hero-eyebrow::after {
  content: "";
  width: 34px;
  height: 1px;
  background: rgba(201, 162, 75, .5);
}
.hero-lede p {
  margin: 0;
  font-size: 1.08rem;
  color: #e7dcc6;
}

/* ---------- Seitenkopf der Unterseiten ---------- */
.page-hero {
  background: var(--noir);
  color: var(--noir-text);
  padding-block: clamp(2.5rem, 7vw, 4.75rem);
  border-bottom: 1px solid rgba(201, 162, 75, .25);
}
.page-hero .eyebrow { color: #dab659; }
.page-hero .lozenge {
  box-shadow: 0 0 0 3px var(--noir), 0 0 0 4px rgba(201, 162, 75, .45);
}
.page-hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
}
.page-hero p {
  margin: 1rem 0 0;
  max-width: 60ch;
  color: #e7dcc6;
}

/* ---------- Section scaffolding ---------- */
section { padding-block: clamp(3.5rem, 8vw, 6rem); }
section + section { border-top: 1px solid var(--line-soft); }

.eyebrow {
  font-family: "Marcellus SC", serif;
  letter-spacing: .26em;
  text-transform: uppercase;
  font-size: .78rem;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: .7rem;
  margin-bottom: 1rem;
}
.lozenge {
  width: 9px;
  height: 9px;
  flex: none;
  background: var(--accent);
  transform: rotate(45deg);
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px var(--line);
}
.section-head {
  max-width: 60ch;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.section-head h2 {
  font-size: clamp(1.9rem, 4vw, 2.75rem);
}
.section-head p {
  color: var(--text-soft);
  margin: 1rem 0 0;
}
.section-head--sub {
  margin-top: clamp(2.5rem, 6vw, 4rem);
}
.section-head--sub h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

/* ---------- About ---------- */
.about-text {
  max-width: 65ch;
}
.about-text p { margin: 0 0 1rem; }
.about-text p:last-child { margin-bottom: 0; }

/* ---------- Members ---------- */
.placeholder-note {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent-strong);
  background: var(--surface-2);
  border: 1px dashed var(--line);
  padding: .35rem .8rem;
  margin-bottom: 1.6rem;
}
.herd {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.1rem;
}
.rider {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  min-height: 190px;
}
.rider .crest {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: "Marcellus", serif;
  font-size: 1.1rem;
  margin-bottom: .7rem;
}
.rider .name {
  font-family: "Marcellus", serif;
  font-size: 1.2rem;
}
.rider .name .rider-nick {
  font-family: "Karla", system-ui, sans-serif;
  font-size: .82rem;
  color: var(--text-soft);
  white-space: nowrap;
}
.rider .role {
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-strong);
}
.rider .meta {
  font-size: .9rem;
  color: var(--text-soft);
  margin-top: .1rem;
  display: flex;
  flex-direction: column;
  gap: .15rem;
}
.rider .meta .rider-stall {
  color: var(--accent-strong);
  font-size: .82rem;
  letter-spacing: .04em;
}
.rider.open {
  border-style: dashed;
  color: var(--text-soft);
  justify-content: center;
  align-items: center;
  text-align: center;
}
.rider.open .crest { border-style: dashed; }
.rider.open.has-photo {
  justify-content: flex-start;
  align-items: stretch;
  text-align: left;
}
.rider.open.has-photo .rider-photo { opacity: .5; }
.rider.has-photo { overflow: hidden; }
.rider-photo {
  margin: -1.4rem -1.4rem .9rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.rider-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: top center;
}

/* ---------- Team-Outfit ---------- */
.outfit-grid {
  display: grid;
  grid-template-columns: minmax(240px, 340px) 1fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}
.outfit-figure {
  margin: 0;
  border: 1px solid var(--line);
  background: var(--surface);
}
.outfit-figure img {
  display: block;
  width: 100%;
  height: auto;
}
.outfit-figure figcaption {
  padding: .7rem .9rem;
  font-size: .82rem;
  color: var(--text-soft);
  border-top: 1px solid var(--line);
}
.outfit-lists {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(1.5rem, 4vw, 2.5rem);
}
.outfit-block h3 {
  font-size: 1.15rem;
  padding-bottom: .6rem;
  margin-bottom: .8rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  gap: .6rem;
}
.outfit-block h3::before {
  content: "❖";
  color: var(--accent);
  font-size: .8em;
}
.outfit-block ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .9rem;
}
.outfit-block li {
  font-size: .96rem;
  color: var(--text-soft);
}
.outfit-block li span {
  display: block;
  font-size: .74rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin-bottom: .1rem;
}
.outfit-block li em {
  display: block;
  font-style: normal;
  font-variant-numeric: tabular-nums;
  font-size: .84rem;
  color: var(--text);
  opacity: .75;
  margin-top: .15rem;
}
@media (max-width: 720px) {
  .outfit-grid { grid-template-columns: 1fr; }
  .outfit-figure { max-width: 340px; }
}
.outfit-note {
  margin: clamp(1.5rem, 4vw, 2.25rem) 0 0;
  font-size: .82rem;
  color: var(--text-soft);
  max-width: 60ch;
}

/* ---------- Regeln ---------- */
.rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
}
.rule-block {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 1.75rem;
}
.rule-block h3 {
  font-size: 1.15rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: baseline;
  gap: .6rem;
}
.rule-block h3::before {
  content: "❖";
  color: var(--accent);
  font-size: .8em;
}
.rule-block ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .8rem;
}
.rule-block li {
  position: relative;
  padding-left: 1.6rem;
  color: var(--text-soft);
  font-size: .96rem;
}
.rule-block li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ---------- Verweis-Karten (Startseite -> Unterseiten) ---------- */
.cta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(1.5rem, 4vw, 2.5rem);
}
.cta-card {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--text);
  transition: border-color .2s, transform .2s;
}
.cta-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.cta-card[hidden] { display: none; }
.cta-eyebrow {
  font-family: "Marcellus SC", serif;
  font-size: .74rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent-strong);
}
.cta-title { font-family: "Marcellus", serif; font-size: 1.35rem; }
.cta-text { color: var(--text-soft); font-size: .95rem; }
.cta-more { margin-top: .3rem; color: var(--accent); font-size: 1.25rem; }

/* ---------- News ---------- */
.news-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}
.news-col-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 1.05rem;
  padding-bottom: .8rem;
  margin-bottom: .2rem;
  border-bottom: 1px solid var(--line);
}
.news-col-link {
  font-family: "Karla", sans-serif;
  font-size: .74rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  white-space: nowrap;
}
@media (max-width: 820px) {
  .news-grid { grid-template-columns: 1fr; }
}
.news-col-title--spaced { margin-top: 2.6rem; }

/* feste Team-Treffen */
.meetups {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.meetup {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 1.1rem 1.25rem;
}
.meetup-when {
  font-family: "Marcellus", serif;
  font-size: 1.05rem;
  margin-bottom: .75rem;
  display: flex;
  align-items: baseline;
  gap: .6rem;
  flex-wrap: wrap;
}
.meetup-tag {
  font-family: "Karla", "Segoe UI", sans-serif;
  font-size: .66rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent-strong);
  border: 1px solid var(--line);
  padding: .05rem .45rem;
}
.meetup-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  font-size: .93rem;
}
.meetup-list li { color: var(--text); }
.meetup-list span {
  display: inline-block;
  min-width: 6.5rem;
  color: var(--accent-strong);
  font-size: .72rem;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.timeline {
  display: flex;
  flex-direction: column;
}
.entry {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 1.4rem;
  padding-block: 1.4rem;
  border-bottom: 1px solid var(--line);
}
.entry time {
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
  color: var(--accent-strong);
  font-size: .9rem;
  padding-top: .2rem;
}
.entry h3 { font-size: 1.15rem; margin-bottom: .3rem; }
.entry p { margin: 0; color: var(--text-soft); font-size: .96rem; }
@media (max-width: 620px) {
  .entry { grid-template-columns: 1fr; gap: .4rem; }
}

/* offizielle Star-Stable-News */
.sso-feed {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.sso-item { border-bottom: 1px solid var(--line); }
.sso-link {
  display: flex;
  gap: 1rem;
  padding-block: 1.1rem;
  text-decoration: none;
  color: inherit;
}
.sso-link:hover .sso-headline { color: var(--accent-strong); }
.sso-thumb {
  width: 120px;
  height: 67px;
  flex: none;
  object-fit: cover;
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.sso-body {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  min-width: 0;
}
.sso-meta {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
  font-size: .78rem;
  color: var(--text-soft);
}
.sso-badge {
  --sso-badge: var(--accent);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .14rem .5rem;
  color: #fff;
  background: var(--sso-badge);
  border-radius: 2px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
}
.sso-meta time { font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.sso-headline {
  font-family: "Marcellus", serif;
  font-size: 1.08rem;
  line-height: 1.2;
  transition: color .2s;
}
.sso-preamble {
  font-size: .92rem;
  color: var(--text-soft);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sso-note {
  margin: 1rem 0 0;
  font-size: .78rem;
  color: var(--text-soft);
}
@media (max-width: 460px) {
  .sso-thumb { display: none; }
}

/* ---------- Join ---------- */
.join-grid {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}
.reqs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .8rem; }
.reqs li {
  padding-left: 1.6rem;
  position: relative;
  color: var(--text-soft);
}
.reqs li::before {
  content: "▪";
  position: absolute;
  left: 0;
  color: var(--accent);
}
.discord-cta {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  margin-top: 1.6rem;
  background: var(--noir);
  color: var(--noir-text);
  text-decoration: none;
  padding: .85rem 1.5rem;
  font-family: "Marcellus SC", serif;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: .85rem;
  border: 1px solid var(--accent);
  transition: background .2s, color .2s;
}
.discord-cta:hover { background: var(--accent); color: var(--on-accent); }
.discord-cta[hidden] { display: none; }

form.apply {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: clamp(1.5rem, 4vw, 2.25rem);
  display: grid;
  gap: 1.1rem;
}
form.apply label {
  display: grid;
  gap: .4rem;
  font-size: .8rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-soft);
}
form.apply input,
form.apply textarea,
form.apply select {
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  padding: .7rem .8rem;
  border-radius: 0;
}
form.apply textarea { min-height: 110px; resize: vertical; }
form.apply .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
form.apply .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
form.apply .h-captcha { min-height: 65px; }
form.apply button {
  font-family: "Marcellus SC", serif;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-size: .85rem;
  background: var(--accent);
  color: var(--on-accent);
  border: none;
  padding: .9rem 1.2rem;
  cursor: pointer;
  transition: background .2s;
}
form.apply button:hover { background: var(--accent-strong); }
.form-note {
  font-size: .82rem;
  color: var(--text-soft);
  margin: 0;
}
.form-status {
  font-size: .92rem;
  padding: .8rem 1rem;
  border: 1px solid var(--accent);
  background: var(--surface-2);
  display: none;
}
.form-status.show { display: block; }
.form-status.is-success { border-color: #58BB80; background: color-mix(in srgb, #58BB80 14%, var(--surface-2)); }
.form-status.is-error { border-color: #c65b3c; background: color-mix(in srgb, #c65b3c 12%, var(--surface-2)); }
@media (max-width: 780px) {
  .join-grid { grid-template-columns: 1fr; }
  form.apply .row { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */
footer {
  background: var(--noir);
  color: var(--noir-text);
  padding-block: 3rem;
  font-size: .86rem;
}
footer .wrap { display: flex; flex-direction: column; gap: 1rem; }
footer .foot-brand {
  font-family: "Marcellus SC", serif;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: #dab659;
  font-size: .95rem;
}
footer p { margin: 0; opacity: .72; max-width: 62ch; }
footer a { color: #dab659; }
.foot-legal {
  margin-block: .6rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(201, 162, 75, .25);
  display: flex;
  flex-direction: column;
  gap: .7rem;
}
.foot-legal h2 {
  font-family: "Marcellus SC", "Marcellus", serif;
  font-size: .9rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #dab659;
  opacity: 1;
}
.foot-legal p { font-size: .82rem; }
.theme-toggle {
  align-self: flex-start;
  margin-top: .5rem;
  background: transparent;
  color: var(--noir-text);
  border: 1px solid rgba(201,162,75,.4);
  padding: .5rem .9rem;
  font: inherit;
  font-size: .8rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
}
.theme-toggle:hover { border-color: #dab659; color: #dab659; }
