/* Riantek — riantek.com
   Static site, no frameworks, no external fonts (GDPR-safe). site.js only loads
   the site's own images (slideshow/gallery) — still no third-party requests. */

:root {
  --bg: #0b0e13;
  --bg-raised: #11151d;
  --line: #1f2733;
  --text: #dfe4ea;
  --text-dim: #8b95a3;
  --accent: #6ea8d8;
  --accent-dim: #3d5a75;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.serif {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* safety net: no image may ever exceed its container, even if a stale
   stylesheet skips the specific rules below (preview-cache lesson) */
img { max-width: 100%; }

/* ---------- top navigation ---------- */

.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 14, 19, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.topnav .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.topnav .home {
  color: var(--text);
  letter-spacing: 0.22em;
  font-size: 0.95rem;
}

.topnav .links a {
  color: var(--text-dim);
  margin-left: 22px;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
}

.topnav a:hover { color: var(--accent); text-decoration: none; }
.topnav .links a.on { color: var(--text); }

/* ---------- hero ---------- */

/* full-bleed hero, SAME on every screen width: the Riantek banner docks to the top
   edge right under the nav, spans the full width, and its height simply follows the
   width (16:9 = 56.25vw) — always fully visible, never distorted, never cropped.
   The padding pushes the tagline below the image edge; a fade hands over to the page. */
.hero {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: calc(56.25vw + 36px);
  padding-bottom: 56px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(to bottom, rgba(10, 10, 10, 0) 72%, var(--bg) 100%),
    url("images/hero.jpg") center top / contain no-repeat,
    #0a0a0a;
}

/* hero.jpg missing (site.js probe failed) -> plain centered text look */
.hero.no-banner {
  min-height: 60vh;
  justify-content: center;
  padding-top: 0;
  padding-bottom: 0;
  background:
    radial-gradient(ellipse 80% 55% at 50% -10%, rgba(110, 168, 216, 0.08), transparent),
    var(--bg);
}

/* the ILLYROS: SERPENT THRONE banner heads the game section as a free-standing image;
   an inset vignette in the page color melts its edges into the page (h2 stays for SEO). */
.game-banner {
  position: relative;
  width: min(820px, 100%);
  margin: 6px auto 34px;
}

.game-banner img {
  display: block;
  width: 100%;
  height: auto;
}

.game-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 90px 45px var(--bg);
  pointer-events: none;
}

/* nav brand: the high-res R logo replaces the text (the favicon stays the small tab icon) */
.topnav .home { display: flex; align-items: center; }

.nav-logo {
  display: block;
  height: 34px;
  width: auto;
}

/* visually hidden, still read by search engines / screen readers */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.hero .brand {
  font-size: clamp(2.6rem, 8vw, 5rem);
  letter-spacing: 0.28em;
  text-indent: 0.28em; /* balances the tracking */
  text-align: center;
  color: var(--text);
}

.hero .tagline {
  margin-top: 22px;
  text-align: center;
  color: var(--text-dim);
  font-size: 1.1rem;
}

.hero .tagline strong { color: var(--text); font-weight: 600; }

.hero .down {
  margin-top: 64px;
  text-align: center;
}

.hero .down a {
  color: var(--text-dim);
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero .down a:hover { color: var(--accent); text-decoration: none; }

/* ---------- sections ---------- */

section { padding: 96px 0; border-bottom: 1px solid var(--line); }

.kicker {
  color: var(--accent);
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

h2 {
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  line-height: 1.2;
  margin-bottom: 22px;
}

.lead {
  max-width: 660px;
  color: var(--text);
}

.lead p + p { margin-top: 14px; }

/* status chips — flex-wrap so the row folds on small screens instead of
   overflowing (dev report: line ran off the phone screen) */
.meta {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta span {
  white-space: nowrap;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-raised);
  color: var(--text-dim);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

/* ---------- feature cards ---------- */

.features {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.feature {
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg-raised);
}

.feature h3 {
  font-size: 1rem;
  margin-bottom: 6px;
  color: var(--text);
}

.feature p {
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.55;
}

/* ---------- gameplay loop ---------- */

.gameplay { margin-top: 44px; }

.gameplay-stage {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px 6px 0 0;
  background: var(--bg-raised);
  touch-action: pan-y;
}

.gameplay video {
  width: 100%;
  aspect-ratio: 2340 / 1080;
  object-fit: cover;
  display: block;
  background: #05070a;
  opacity: 1;
  transform: translateX(0);
  transition: opacity 150ms ease, transform 150ms ease;
}

.gameplay video.slide-next { opacity: 0; transform: translateX(-18px); }
.gameplay video.slide-prev { opacity: 0; transform: translateX(18px); }

.video-prev,
.video-next {
  position: absolute;
  z-index: 2;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 64px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: rgba(11, 14, 19, 0.62);
  color: var(--text);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}

.video-prev { left: 12px; }
.video-next { right: 12px; }
.video-prev:hover,
.video-next:hover,
.video-prev:focus-visible,
.video-next:focus-visible {
  background: rgba(11, 14, 19, 0.9);
  border-color: var(--accent-dim);
  color: var(--accent);
}

.video-navigation {
  padding: 15px 16px 14px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 6px 6px;
  background: var(--bg-raised);
}

.video-meta {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 18px;
  margin-bottom: 7px;
}

.video-count {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}

.video-slider {
  --video-slider-progress: 0%;
  width: 100%;
  height: 24px;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
}

.video-slider::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(to right,
    var(--accent) 0,
    var(--accent) var(--video-slider-progress),
    var(--line) var(--video-slider-progress),
    var(--line) 100%);
}

.video-slider::-moz-range-track {
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: var(--line);
}

.video-slider::-moz-range-progress {
  height: 4px;
  border-radius: 999px;
  background: var(--accent);
}

.video-slider::-webkit-slider-thumb {
  width: 17px;
  height: 17px;
  margin-top: -6.5px;
  appearance: none;
  -webkit-appearance: none;
  border: 2px solid var(--bg);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px rgba(194, 154, 88, 0.25);
}

.video-slider::-moz-range-thumb {
  width: 15px;
  height: 15px;
  border: 2px solid var(--bg);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px rgba(194, 154, 88, 0.25);
}

.video-slider:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }
.video-slider:disabled { cursor: default; opacity: 0.45; }

.video-ticks {
  display: flex;
  justify-content: space-between;
  padding: 0 5px;
  margin-top: -4px;
}

.video-ticks span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--line);
}

.video-ticks span.active {
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(194, 154, 88, 0.12);
}

.video-hint {
  margin-top: 8px;
  color: var(--text-dim);
  font-size: 0.78rem;
}

.gameplay.single-video .video-ticks,
.gameplay.single-video .video-hint { display: none; }

.gameplay .capture-note { margin-top: 10px; }

/* ---------- slideshow ---------- */

.slideshow {
  position: relative;
  margin-top: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-raised);
}

.slideshow img {
  width: 100%;
  aspect-ratio: 2340 / 1080; /* Galaxy A54 capture format — shows the shots uncropped */
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}

.slideshow .prev,
.slideshow .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 64px;
  border: none;
  border-radius: 6px;
  background: rgba(11, 14, 19, 0.55);
  color: var(--text);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.slideshow .prev { left: 12px; }
.slideshow .next { right: 12px; }

.slideshow .prev:hover,
.slideshow .next:hover { background: rgba(11, 14, 19, 0.85); color: var(--accent); }

.slideshow .count {
  position: absolute;
  right: 14px;
  bottom: 12px;
  padding: 3px 10px;
  border-radius: 4px;
  background: rgba(11, 14, 19, 0.7);
  color: var(--text-dim);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
}

.capture-note {
  margin-top: 14px;
  color: var(--text-dim);
  font-size: 0.92rem;
  max-width: 660px;
}

/* ---------- media gallery ---------- */

.gallery {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

.gallery img {
  width: 100%;
  aspect-ratio: 2340 / 1080; /* Galaxy A54 capture format — shows the shots uncropped */
  object-fit: cover;
  display: block;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg-raised);
  cursor: zoom-in;
}

.gallery img:hover { border-color: var(--accent-dim); }

/* ---------- media page ---------- */

.page-head { padding: 72px 0 96px; border-bottom: none; }

/* ---------- lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(5, 7, 10, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}

.lightbox img {
  max-width: 94vw;
  max-height: 92vh;
  border-radius: 4px;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  margin-top: 16px;
  padding: 13px 26px;
  border: 1px solid var(--accent-dim);
  border-radius: 6px;
  color: var(--text);
  background: var(--bg-raised);
  letter-spacing: 0.04em;
}

.btn:hover {
  border-color: var(--accent);
  text-decoration: none;
}

/* ---------- about / contact ---------- */

.about p, .contact p { max-width: 620px; }
.about p + p { margin-top: 14px; }

.contact .mail {
  display: inline-block;
  margin-top: 10px;
  font-size: 1.15rem;
}

.contact .community {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.contact .community p { color: var(--text-dim); }

/* ---------- footer ---------- */

footer {
  padding: 44px 0 60px;
  color: var(--text-dim);
  font-size: 0.88rem;
}

footer .row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
  align-items: center;
  justify-content: space-between;
}

footer a { color: var(--text-dim); }
footer a:hover { color: var(--accent); }

/* ---------- legal pages ---------- */

.legal { padding: 72px 0; }
.legal h1 { font-size: 2rem; margin-bottom: 28px; }
.legal h2 { font-size: 1.2rem; margin: 34px 0 10px; }
.legal p { max-width: 680px; margin-bottom: 12px; }
.legal .back { display: inline-block; margin-bottom: 40px; color: var(--text-dim); }
.placeholder { color: var(--accent); }

/* legal pages: language toggle (browser language picks the default; both
   versions render when JavaScript is off — German first, legally binding) */
.lang-switch { margin-bottom: 28px; color: var(--text-dim); font-size: 0.92rem; }
.lang-switch a { color: var(--text-dim); }
.lang-switch a.on { color: var(--text); font-weight: 600; }
.lang-note { color: var(--text-dim); font-size: 0.92rem; margin-bottom: 24px; }

/* ---------- responsive ---------- */

@media (max-width: 720px) {
  section { padding: 68px 0; }
  .topnav .links a { margin-left: 14px; font-size: 0.85rem; }
  .slideshow .prev, .slideshow .next { width: 38px; height: 52px; font-size: 1.6rem; }
  .video-prev, .video-next { width: 38px; height: 52px; font-size: 1.6rem; }
  .video-navigation { padding: 13px 14px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .gameplay video { transition: none; }
}
