/* ------------------------------------------------------------------
   nextReality.Contest — Community Award
   Farben aus dem XRC-Branding: Schwarz mit Gold.
   Zum Nachjustieren reichen die Variablen in diesem ersten Block.
   ------------------------------------------------------------------ */
/* ------------------------------------------------------------------ Schrift
   Montserrat, selbst gehostet. Bewusst nicht ueber Google Fonts eingebunden:
   das wuerde bei jedem Aufruf die IP-Adresse der Besucher an Google senden,
   was zu einer Abstimmung ohne Datenerhebung nicht passt.
   Zeichensatz latin und latin-ext (deutsche Umlaute, polnische und
   tschechische Zeichen). Alles darueber hinaus faellt auf die Systemschrift
   zurueck.
   ------------------------------------------------------------------------ */

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/montserrat-400-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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/montserrat-400-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/montserrat-700-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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/montserrat-700-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("fonts/montserrat-800-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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("fonts/montserrat-800-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg:          #000000;
  --surface:     #0d0d0d;
  --surface-2:   #161616;
  --line:        #2a2418;
  --line-strong: #6b5416;
  --text:        #f4f1e8;
  --muted:       #9c968a;

  --gold:        #d9a227;   /* Primärgold: Buttons, Links, Rahmen */
  --gold-light:  #f5d97b;   /* Glanzlicht im Verlauf */
  --gold-deep:   #a0670d;   /* dunkles Ende des Verlaufs */
  --gold-grad:   linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 45%, var(--gold-deep) 100%);

  --ok:          #d9a227;
  --err:         #e88b7d;

  --radius: 4px;             /* kantig, passend zur Facetten-Optik */
  --maxw:   1280px;
  --font:   "Montserrat", "Helvetica Neue", Helvetica, Arial, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
button { font: inherit; }
a { color: inherit; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }

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

.hero {
  position: relative;
  padding: 1.9rem 1.25rem 1.5rem;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
/* Angedeutete Facetten wie auf den Key Visuals — reines CSS, keine Bilddatei. */
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero::before {
  background:
    linear-gradient(122deg, transparent 38%, rgba(217,162,39,.10) 38.4%, transparent 39%),
    linear-gradient(64deg,  transparent 62%, rgba(217,162,39,.07) 62.3%, transparent 63%),
    radial-gradient(120% 90% at 50% -20%, rgba(217,162,39,.10), transparent 60%);
}
.hero::after {
  background: linear-gradient(200deg, transparent 70%, rgba(217,162,39,.06) 70.4%, transparent 71%);
}
.hero-inner { position: relative; max-width: 54rem; margin: 0 auto; text-align: center; }

.logo {
  width: min(240px, 58vw);
  height: auto;
  margin: 0 auto 1rem;
}
@media (min-width: 760px) { .logo { width: 290px; margin-bottom: 1.25rem; } }

.kicker {
  margin: 0 0 .6rem;
  font-size: .62rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: .85;
}
.hero h1 {
  margin: 0;
  font-size: clamp(1.45rem, 5.2vw, 2.9rem);
  line-height: 1.12;
  letter-spacing: -.005em;
  font-weight: 800;
  text-transform: uppercase;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.intro {
  margin: .9rem auto 0;
  max-width: 44rem;
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.55;
  text-align: left;
}
/* Auf dem Handy zuerst nur der Anfang — die Kacheln sollen ohne langes
   Scrollen sichtbar sein, weil der Großteil über Social-Links kommt. */
.intro.clamped {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.intro-toggle {
  margin-top: .5rem;
  background: none;
  border: 0;
  padding: 0;
  color: var(--gold);
  font-size: .78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
}
@media (min-width: 760px) {
  .hero { padding: 3rem 1.25rem 2.25rem; }
  .intro { text-align: center; font-size: .95rem; line-height: 1.65; }
  .intro.clamped { display: block; -webkit-line-clamp: unset; overflow: visible; }
  .intro-toggle { display: none; }
}

/* -------------------------------------------------------------- Hinweise */

.banner {
  margin: 1.25rem 0 0;
  padding: .9rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-left-width: 3px;
  border-radius: var(--radius);
  font-size: .93rem;
}
.banner strong { display: block; margin-bottom: .15rem; color: var(--gold); }
.banner.closed { border-left-color: var(--gold-deep); }

/* --------------------------------------------------------------- Toolbar */

.toolbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(0, 0, 0, .9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  margin-top: 1.25rem;
}
.toolbar-inner { max-width: var(--maxw); margin: 0 auto; padding: .75rem 1.25rem .55rem; }
.search {
  display: flex;
  align-items: center;
  gap: .6rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .55rem 1rem;
}
.search:focus-within { border-color: var(--gold); }
.search svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--gold); stroke-width: 2; stroke-linecap: round; }
.search input {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  color: var(--text);
  font-size: 1rem;
  outline: none;
}
.search input::placeholder { color: var(--muted); }
.count { margin: .45rem 0 .3rem; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* ------------------------------------------------------------------ Grid */

main { max-width: var(--maxw); margin: 0 auto; padding: 1.25rem 1.25rem 3.5rem; }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; }
@media (max-width: 359px)  { .grid { grid-template-columns: 1fr; } }
@media (min-width: 560px)  { .grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; } }
@media (min-width: 900px)  { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1180px) { .grid { grid-template-columns: repeat(4, 1fr); } }

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  scroll-margin-top: 7rem;
  transition: border-color .15s ease;
}
.card:hover { border-color: var(--line-strong); }
.card.highlight { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(217,162,39,.28); }
.card.is-choice { border-color: var(--gold); }

/* Titelbild ist zugleich der Link auf das Projektvideo */
.thumb {
  display: block;
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--surface-2);
  text-decoration: none;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.no-img::after {
  content: attr(data-title);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  text-align: center;
  font-size: .8rem;
  color: var(--gold);
  background: linear-gradient(135deg, #111 0%, #000 100%);
}
.play {
  position: absolute;
  right: .5rem;
  bottom: .5rem;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .28rem .6rem .28rem .5rem;
  background: rgba(0, 0, 0, .74);
  border: 1px solid var(--gold);
  border-radius: 999px;
  color: var(--gold);
  font-size: .7rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 700;
}
.play svg { width: 10px; height: 10px; fill: var(--gold); }

.card-body { padding: .75rem .8rem .8rem; display: flex; flex-direction: column; gap: .45rem; flex: 1; }
.card h2 {
  margin: 0;
  font-size: .95rem;
  line-height: 1.3;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (min-width: 560px) {
  .card-body { padding: .95rem 1rem 1rem; gap: .55rem; }
  .card h2 { font-size: 1.05rem; }
}
.desc {
  margin: 0;
  font-size: .82rem;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.desc.open { -webkit-line-clamp: unset; }
.linklike {
  align-self: flex-start;
  background: none;
  border: 0;
  padding: 0;
  color: var(--gold);
  font-size: .8rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.card-links { display: flex; gap: 1rem; font-size: .8rem; flex-wrap: wrap; }
.card-links a { color: var(--gold); text-decoration: none; }
.card-links a:hover { text-decoration: underline; }
.card-foot { margin-top: auto; padding-top: .3rem; }

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

.btn {
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: .7rem .8rem;
  font-weight: 700;
  font-size: .88rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  line-height: 1.2;
  cursor: pointer;
  min-height: 44px;
}
.btn.primary { background: var(--gold-grad); color: #140f02; }
.btn.primary:hover { filter: brightness(1.1); }
.btn.ghost { background: transparent; color: var(--muted); border-color: var(--line); }
.btn.voted { background: transparent; color: var(--gold); border-color: var(--gold); }
.btn[disabled] { cursor: not-allowed; opacity: .8; }
.btn.full { width: 100%; }

.empty { text-align: center; color: var(--muted); padding: 3rem 1rem; }

/* ---------------------------------------------------------------- Dialog */

dialog {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  padding: 1.5rem;
  max-width: 26rem;
  width: calc(100% - 2rem);
}
dialog::backdrop { background: rgba(0, 0, 0, .8); }
dialog h2 {
  margin: 0 0 .6rem;
  font-size: .8rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
}
.confirm-project { margin: 0 0 .8rem; font-weight: 700; font-size: 1.2rem; line-height: 1.25; }
.warn { margin: 0 0 1.2rem; font-size: .85rem; color: var(--muted); }
.error { color: var(--err); font-size: .85rem; margin: 0 0 .8rem; }
.actions { display: flex; gap: .6rem; }
.actions .btn { flex: 1; }

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

footer {
  border-top: 1px solid var(--line);
  padding: 1.75rem 1.25rem 3rem;
  max-width: var(--maxw);
  margin: 0 auto;
  color: var(--muted);
  font-size: .85rem;
  text-align: center;
}
footer .links a { color: var(--gold); text-decoration: none; }
footer .links a:hover { text-decoration: underline; }
footer .links span { margin: 0 .45rem; opacity: .5; }
.fineprint { max-width: 40rem; margin: .7rem auto 0; font-size: .76rem; opacity: .75; }

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

/* --------------------------------------------------------- Textseite (legal) */

.legal {
  max-width: 44rem;
  padding: 2rem 1.25rem 4rem;
  font-size: .95rem;
}
.legal h2 {
  margin: 2.4rem 0 .2rem;
  font-size: 1.15rem;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--gold);
  scroll-margin-top: 1.5rem;
}
.legal h3 {
  margin: 1.5rem 0 .3rem;
  font-size: .95rem;
  font-weight: 700;
}
.legal p { margin: 0 0 .8rem; color: var(--muted); }
.legal p strong { color: var(--text); }
.legal a { color: var(--gold); }
.legal code {
  font-size: .88em;
  padding: .1em .35em;
  background: var(--surface-2);
  border-radius: 3px;
}
.legal .fineprint { margin-top: 2rem; text-align: left; }
