/* =====================================================
   ProjectRed – Shared Stylesheet
   projectred.de
   ===================================================== */

:root {
  --bg:           #0b0b14;
  --surface:      #13131f;
  --card:         #1a1a2e;
  --card-hover:   #1f1f38;
  --primary:      #c0392b;
  --primary-hov:  #e74c3c;
  --accent:       #f39c12;
  --text:         #eaeaf4;
  --text-muted:   #8a8aaa;
  --border:       #252540;
  --border-hover: #383860;
  --radius:       16px;
  --radius-sm:    10px;
  --shadow:       0 12px 40px rgba(0,0,0,.6);
  --transition:   all .22s ease;
  --font:         -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

/* ── Reset ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-hov); }
ul { list-style: none; }

/* ── Typography ────────────────────────────────────── */
h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 800; line-height: 1.15; letter-spacing: -.02em; overflow-wrap: break-word; hyphens: auto; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 700; overflow-wrap: break-word; hyphens: auto; }
h3 { font-size: clamp(1.1rem, 2vw, 1.5rem); font-weight: 700; overflow-wrap: break-word; hyphens: auto; }

/* ── Layout ─────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
main { flex: 1; }

/* ── Header ─────────────────────────────────────────── */
.site-header {
  background: rgba(11,11,20,.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 200;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem 0;
}
.logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text);
  letter-spacing: -.02em;
}
.logo-icon {
  width: 34px; height: 34px;
  background: var(--primary);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 900; font-size: .8rem;
  flex-shrink: 0;
}
.site-nav { display: flex; gap: 1.5rem; align-items: center; }
.site-nav a { color: var(--text-muted); font-size: .9rem; font-weight: 500; }
.site-nav a:hover { color: var(--text); }

/* ── Hero ───────────────────────────────────────────── */
.hero {
  padding: 5rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(192,57,43,.12) 0%, transparent 65%);
  pointer-events: none;
}
.eyebrow {
  display: inline-block;
  color: var(--primary);
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-bottom: 1rem;
}
.hero h1 {
  background: linear-gradient(135deg, var(--text) 0%, var(--text-muted) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: .75rem;
}
.hero-sub {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto 2rem;
}

/* ── Section ────────────────────────────────────────── */
.section { padding: 4rem 0; }
.section-head { text-align: center; margin-bottom: 3rem; }
.section-head h2 { margin-bottom: .5rem; }
.section-head p { color: var(--text-muted); }
.divider { width: 48px; height: 3px; background: var(--primary); border-radius: 2px; margin: .75rem auto 0; }

/* ── App Grid ────────────────────────────────────────── */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 480px);
  gap: 1.5rem;
  justify-content: center;
}
.apps-grid .app-card {
  width: 480px;
  height: 480px;
  overflow: hidden;
  padding-right: 240px;
}
.apps-grid .card-img {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 50%;
  width: 50%;
  height: 100%;
  border-radius: 0 var(--radius) var(--radius) 0;
  border: none;
  border-left: 3px solid var(--border-hover);
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.12);
  object-fit: cover;
  object-position: top center;
  transform: none;
}
.apps-grid .app-card:hover .card-img {
  border-left-color: var(--primary);
  transform: none;
}
.apps-grid .app-card .app-tag,
.apps-grid .app-card .app-name {
  padding-left: 0;
}
.app-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  transition: var(--transition);
  color: var(--text);
  cursor: pointer;
  position: relative;
}
.app-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(192,57,43,.06) 0%, transparent 60%);
  opacity: 0;
  transition: var(--transition);
  border-radius: var(--radius);
  pointer-events: none;
}
.app-card:hover {
  border-color: rgba(192,57,43,.5);
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  color: var(--text);
}
.app-card:hover::after { opacity: 1; }
.app-icon {
  width: 72px; height: 72px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
  flex-shrink: 0;
}

/* ── App card screenshot thumbnail (top-left corner) ── */
.card-img {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  width: 52px;
  height: 86px;
  border-radius: 9px;
  object-fit: cover;
  object-position: top;
  border: 1px solid var(--border);
  flex-shrink: 0;
  transition: var(--transition);
}
.app-card:hover .card-img {
  border-color: rgba(192,57,43,.5);
  transform: scale(1.06);
}
.app-tag { font-size: .75rem; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: .08em; }
.app-name { font-size: 1.35rem; font-weight: 800; }
.app-card .app-tag,
.app-card .app-name { padding-left: calc(52px + 1rem); }
.app-desc { color: var(--text-muted); font-size: .9rem; line-height: 1.65; flex: 1; margin-top: .5rem; }
.app-cta {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .875rem; font-weight: 700; color: var(--primary);
  margin-top: .25rem;
  transition: var(--transition);
}
.app-card:hover .app-cta { gap: .8rem; }

/* ── Buttons ────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem; padding: .65rem 1.4rem;
  border-radius: var(--radius-sm);
  font-size: .9rem; font-weight: 700;
  cursor: pointer; transition: var(--transition);
  border: none; text-decoration: none;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hov); color: #fff; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text-muted); }
.btn-outline:hover { border-color: var(--text-muted); color: var(--text); background: transparent; }
.btn-sm { padding: .45rem 1rem; font-size: .8rem; }

/* ── Footer ─────────────────────────────────────────── */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
}
.footer-copy { color: var(--text-muted); font-size: .85rem; }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { color: var(--text-muted); font-size: .85rem; }
.footer-links a:hover { color: var(--text); }

/* ── Cookie Banner ──────────────────────────────────── */
.cookie-banner {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  width: min(92vw, 620px);
  display: flex; align-items: center; justify-content: space-between; gap: 1.25rem;
  z-index: 1000;
  box-shadow: var(--shadow);
  animation: slideUp .35s ease;
}
.cookie-banner.hidden { display: none; }
@keyframes slideUp {
  from { transform: translateX(-50%) translateY(16px); opacity: 0; }
  to   { transform: translateX(-50%) translateY(0);   opacity: 1; }
}
.cookie-text { font-size: .85rem; color: var(--text-muted); line-height: 1.55; }
.cookie-text a { color: var(--primary); }
.cookie-actions { display: flex; gap: .6rem; flex-shrink: 0; }

/* ── Language Switcher ──────────────────────────────── */
.lang-switcher {
  display: flex; gap: .2rem;
  background: var(--surface);
  border: 2px solid #f0c040;
  border-radius: var(--radius-sm);
  padding: .2rem;
}
.lang-btn {
  padding: .35rem .9rem;
  border: none; border-radius: 7px;
  background: transparent; color: var(--text-muted);
  font-size: .85rem; font-weight: 700;
  cursor: pointer; transition: var(--transition);
  font-family: var(--font);
}
.lang-btn.active { background: var(--primary); color: #fff; }
.lang-btn:hover:not(.active) { background: var(--border); color: var(--text); }

/* ── Language visibility helpers (used on all pages) ── */
[data-lang]        { display: none; }
[data-lang].active { display: block; }
[data-lang-inline]        { display: none; }
[data-lang-inline].active { display: inline; }

/* ── App Hero (NineStones page) ─────────────────────── */
.app-hero {
  padding: 3.5rem 0 2.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.app-hero::before {
  content: '';
  position: absolute;
  top: -30%; left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(192,57,43,.13) 0%, transparent 65%);
  pointer-events: none;
}
.hero-app-icon {
  width: 110px; height: 110px;
  margin: 0 auto 1.5rem;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(192,57,43,.35), 0 4px 20px rgba(0,0,0,.4);
}
.app-hero h1 {
  background: linear-gradient(135deg, var(--text) 0%, var(--text-muted) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: .4rem;
}
.hero-sub-app { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 1.75rem; }

/* ── Screenshot Gallery ─────────────────────────────── */
.screenshots-section { padding: 3rem 0; }
.screenshots-scroll {
  display: flex; gap: 1.5rem;
  overflow-x: auto;
  padding: 1rem 1.5rem 1.5rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  -webkit-overflow-scrolling: touch;
  justify-content: safe center;
}
.screenshots-scroll::-webkit-scrollbar { height: 5px; }
.screenshots-scroll::-webkit-scrollbar-track { background: transparent; }
.screenshots-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── Phone Frame ────────────────────────────────────── */
.phone-frame {
  flex-shrink: 0;
  width: 188px; height: 370px;
  background: #090912;
  border: 3.5px solid #2c2c3e;
  border-radius: 34px;
  overflow: hidden;
  scroll-snap-align: start;
  position: relative;
  box-shadow: 0 16px 50px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,255,255,.05);
}
.phone-frame::before { /* notch */
  content: '';
  position: absolute; top: 9px; left: 50%; transform: translateX(-50%);
  width: 52px; height: 5px;
  background: #2c2c3e; border-radius: 3px; z-index: 2;
}
.phone-screen {
  width: 100%; height: 100%;
  overflow: hidden;
  background: #0d0d1a;
}
.phone-screen img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.screen-placeholder {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: .5rem; padding: 1rem;
  text-align: center;
  font-size: .7rem; color: var(--text-muted);
}

/* ── Features ───────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-top: 2.5rem;
}
.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  transition: var(--transition);
}
.feature-card:hover { border-color: rgba(192,57,43,.4); background: var(--card-hover); }
.feature-icon { font-size: 1.9rem; margin-bottom: .9rem; line-height: 1; }
.feature-card h3 { font-size: .95rem; font-weight: 700; margin-bottom: .4rem; overflow-wrap: break-word; hyphens: auto; }
.feature-card p { font-size: .85rem; color: var(--text-muted); line-height: 1.6; overflow-wrap: break-word; hyphens: auto; }

/* ── About / History ────────────────────────────────── */
.about-section {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  padding: 4rem 0;
}
.about-text h2 { margin-bottom: .5rem; }
.about-text .divider { margin: .75rem 0 1.25rem; }
.about-text p { color: var(--text-muted); line-height: 1.8; margin-bottom: 1rem; }
.board-svg-wrap { display: flex; justify-content: center; }

/* ── Download CTA ───────────────────────────────────── */
.download-section {
  padding: 5rem 0;
  text-align: center;
}
.download-section h2 { margin-bottom: .5rem; }
.download-section p { color: var(--text-muted); margin-bottom: 2rem; }
.appstore-btn {
  display: inline-flex; align-items: center; gap: .75rem;
  background: #fff; color: #000;
  padding: .9rem 1.75rem;
  border-radius: 14px;
  font-weight: 700; font-size: 1rem;
  transition: var(--transition);
  border: none; cursor: pointer;
}
.appstore-btn:hover { background: #f0f0f0; color: #000; transform: translateY(-3px); box-shadow: 0 12px 30px rgba(255,255,255,.15); }
.appstore-small { font-size: .65rem; font-weight: 500; text-align: left; line-height: 1.2; opacity: .7; }
.appstore-big { font-size: 1.05rem; text-align: left; line-height: 1; }

/* ── Back Link ──────────────────────────────────────── */
.back-link {
  display: inline-flex; align-items: center; gap: .4rem;
  color: var(--text-muted); font-size: .875rem; font-weight: 600;
}
.back-link:hover { color: var(--text); }

/* ── Legal Pages ─────────────────────────────────────── */
.legal-page { padding: 3rem 0 5rem; }
.legal-page h1 { font-size: 2rem; margin-bottom: .3rem; }
.legal-page .last-updated { color: var(--text-muted); font-size: .85rem; margin-bottom: 2.5rem; }
.legal-page h2 { font-size: 1.15rem; margin: 2.25rem 0 .6rem; color: var(--text); }
.legal-page p, .legal-page li {
  color: var(--text-muted); line-height: 1.8; margin-bottom: .85rem; font-size: .95rem;
}
.legal-page ul { padding-left: 1.25rem; list-style: disc; }
.legal-page address {
  font-style: normal;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.5rem;
  line-height: 2.1; color: var(--text-muted);
  margin: .75rem 0 1.25rem;
}
.legal-page a { color: var(--primary); }

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 768px) {
  .site-nav { display: none; }
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .board-svg-wrap { order: -1; }
  .footer-inner { flex-direction: column; text-align: center; }
  .cookie-banner { flex-direction: column; text-align: center; }
  .cookie-actions { justify-content: center; }
  .hero { padding: 3.5rem 0 3rem; }
}

@media (max-width: 480px) {
  .features-grid { grid-template-columns: 1fr 1fr; }
}

/* ── Skip-to-content (Accessibility) ─────────────────── */
.skip-link {
  position: absolute; top: -100%; left: 1rem;
  background: var(--primary); color: #fff;
  padding: .5rem 1rem; border-radius: 4px;
  font-size: .875rem; font-weight: 700; z-index: 9999;
}
.skip-link:focus { top: 1rem; }
