/* =========================================================
   remo.me – digitales Portfolio
   Eigenständige Website (kein WordPress / Elementor)
   ========================================================= */

:root {
  --bg:        #0a0500;
  --bg-soft:   #141414;
  --card:      #ffffff;
  --card-text: #1a1a1a;
  --accent:    #fcb424;
  --accent-2:  #ffce5c;
  --text:      #f4f4f4;
  --muted:     #a8a8a8;
  --border:    rgba(255, 255, 255, 0.08);
  --radius:    14px;
  --shadow:    0 10px 30px rgba(0, 0, 0, 0.45);
  --maxw:      980px;
  --font:      "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--accent-2); }

img { max-width: 100%; display: block; }

/* ---------- Eleganter Seitenübergang (View Transitions API) ---------- */
/* Cross-Document-Übergang für interne Navigation (Home ↔ Tools ↔ Tool-Seiten).
   Browser ohne Unterstützung navigieren ganz normal – reine Progressive Enhancement. */
@view-transition { navigation: auto; }

::view-transition-old(root) {
  animation: vt-fade-out .38s cubic-bezier(.4, 0, .2, 1) both;
}
::view-transition-new(root) {
  animation: vt-fade-in .46s cubic-bezier(.22, .61, .36, 1) both;
}
@keyframes vt-fade-out {
  to   { opacity: 0; transform: translateY(-10px) scale(.992); }
}
@keyframes vt-fade-in {
  from { opacity: 0; transform: translateY(14px) scale(.992); }
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) { animation: none; }
}

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
  padding: 48px 0 28px;
  text-align: center;
}
.site-header .container { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.brand {
  font-size: clamp(2rem, 5vw, 3.1rem);
  font-weight: 700;
  letter-spacing: .04em;
  margin: 0;
  line-height: 1.05;
}
.brand a { color: var(--text); }
.brand a:hover { color: var(--accent); }
.tagline {
  font-size: .82rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}
.social { margin-top: 14px; }
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.icon-btn:hover { transform: translateY(-2px); border-color: var(--accent); background: #1c1c1c; }
.icon-btn svg { width: 20px; height: 20px; fill: var(--text); }

/* ---------- Section titles ---------- */
.section-title {
  text-align: center;
  color: var(--accent);
  font-size: clamp(1.3rem, 3.5vw, 1.9rem);
  letter-spacing: .05em;
  text-transform: uppercase;
  margin: 30px 0 26px;
}

/* ---------- Cards ---------- */
main { padding-bottom: 60px; }

.card {
  background: var(--card);
  color: var(--card-text);
  border-radius: var(--radius);
  border-bottom: 4px solid var(--accent);
  box-shadow: var(--shadow);
  padding: 24px 28px;
  margin: 0 0 40px;
  /* translate = Scroll-Parallax · transform = Hover · scale/opacity = Reveal (getrennte Ebenen) */
  translate: 0 var(--py, 0px);
  transition: opacity .7s cubic-bezier(.22,.61,.36,1), scale .7s cubic-bezier(.22,.61,.36,1), transform .22s ease, box-shadow .22s ease;
  will-change: translate, transform;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, .42);
}
/* Reveal: nur aktiv, wenn JS die Parallax-Steuerung uebernimmt */
body.parallax-ready .card,
body.parallax-ready .tool-card { opacity: 0; scale: .97; }
body.parallax-ready .card.in,
body.parallax-ready .tool-card.in { opacity: 1; scale: 1; }
@media (prefers-reduced-motion: reduce) {
  .card { transition: box-shadow .2s ease; translate: none !important; }
  .card:hover { transform: none; }
  body.parallax-ready .card,
  body.parallax-ready .tool-card { opacity: 1; scale: 1; }
}

/* Scroll-Fortschrittsleiste */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 3px;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  z-index: 200;
  pointer-events: none;
  will-change: transform;
}

.project-card {
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 24px;
  align-items: center;
}
.project-card .media { display: grid; place-items: center; }
.project-card .media img { max-height: 74px; width: auto; object-fit: contain; }
.project-card .body { min-width: 0; }
.project-card h2 {
  margin: 0 0 8px;
  font-size: 1.5rem;
  letter-spacing: .03em;
  color: #111;
}
.project-card h2 a { color: #111; }
.project-card h2 a:hover { color: var(--accent); }
.project-card p { margin: 0 0 8px; color: #333; font-size: .92rem; }
.project-card .links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 10px; }
.project-card .body p a,
.project-card .links a { color: var(--accent); font-weight: 600; font-size: .92rem; }
.project-card .body p a:hover,
.project-card .links a:hover { color: var(--accent-2); }

/* ---------- Domains (details) ---------- */
.domains-card { text-align: center; }
.domains-card .icon-title { display: flex; justify-content: center; align-items: center; gap: 10px; margin: 0 0 8px; }
.domains-card h2 { color: #111; margin: 0; }
.domains-card p { margin: 0 0 8px; }
details.domains { margin-top: 14px; margin-bottom: 8px; }
details.domains > summary {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--accent);
  list-style: none;
  user-select: none;
}
details.domains > summary::-webkit-details-marker { display: none; }
details.domains > summary .plus { transition: transform .2s ease; font-weight: 700; }
details.domains[open] > summary .plus { transform: rotate(45deg); }
.domain-list {
  list-style: none;
  padding: 0;
  margin: 18px auto 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 10px;
  max-width: 640px;
}
.domain-list li { display: flex; }
.domain-list li a {
  background: #f3f3f0;
  border: 1px solid #e3e3df;
  color: #333;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.domain-list li a:hover {
  background: #fff6e6;
  border-color: var(--accent);
  color: #111;
}

/* ---------- Tools grid ---------- */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.tool-card {
  background: var(--card);
  color: var(--card-text);
  border-radius: var(--radius);
  border-bottom: 4px solid var(--accent);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  translate: 0 var(--py, 0px);
  transition: opacity .7s cubic-bezier(.22,.61,.36,1), scale .7s cubic-bezier(.22,.61,.36,1), transform .15s ease, box-shadow .15s ease;
}
.tool-card:hover { transform: translateY(-4px); box-shadow: 0 16px 38px rgba(0,0,0,.55); }
a.tool-card { text-decoration: none; color: inherit; }
a.tool-card:hover h3 { color: #b07d00; }
.tool-card h3 {
  margin: 0;
  padding: 20px 18px 14px;
  text-align: center;
  font-size: 1.05rem;
  letter-spacing: .02em;
  color: #111;
}
.tool-card .thumb {
  background: #f6f6f4;
  padding: 0 16px 18px;
  flex: 1;
  display: grid;
  place-items: center;
}
.tool-card .thumb img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  border-radius: 8px;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 26px 0 40px;
  text-align: center;
}
.site-footer p { margin: 0; color: var(--muted); font-weight: 600; letter-spacing: .04em; font-size: .9rem; }
.site-footer .nav { margin-bottom: 10px; display: flex; gap: 18px; justify-content: center; }
.site-footer .nav a { color: var(--muted); font-weight: 600; }
.site-footer .nav a:hover { color: var(--accent); }

/* ---------- Tool pages ---------- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--muted);
  margin-top: 12px;
}
.back-link:hover { color: var(--accent); }
.tool-frame {
  position: relative;
  background: #ffffff;
  color: #1a1a1a;
  border-radius: var(--radius);
  border-bottom: 4px solid var(--accent);
  box-shadow: var(--shadow);
  padding: 26px;
  margin-bottom: 40px;
  /* Tools mit fixem Layout auf schmalen Schirmen horizontal scrollbar machen,
     statt Inhalt abzuschneiden */
  overflow: auto;
}

/* Breiteres Layout für Vollbild-taugliche Tools */
body.tool-wide .container { max-width: 1320px; }

/* Vollbild-Umschalter (sitzt im Tool-Rahmen, auch im Vollbild sichtbar) */
.fs-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 8px 14px;
  font-family: inherit;
  font-weight: 600;
  font-size: .82rem;
  cursor: pointer;
  opacity: .85;
  transition: opacity .15s ease, background .15s ease;
}
.fs-btn:hover { opacity: 1; background: #000; }
.fs-btn svg { width: 15px; height: 15px; fill: currentColor; }
.fs-btn .fs-label-off { display: none; }
.tool-frame:fullscreen .fs-btn .fs-label-on { display: none; }
.tool-frame:fullscreen .fs-btn .fs-label-off { display: inline; }

/* Tool-Rahmen im nativen Vollbild */
.tool-frame:fullscreen {
  margin: 0;
  border-radius: 0;
  border-bottom: none;
  width: 100vw;
  height: 100vh;
  max-width: none;
  overflow: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(16px, 3vw, 56px);
}
.tool-frame:fullscreen .ipvt-root,
.tool-frame:fullscreen .zahlenstrahl-app {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
}
/* Zahlenstrahl im Vollbild auch in der Breite mitwachsen lassen (kein Cap) */
.tool-frame:fullscreen .zahlenstrahl-app,
.tool-frame:-webkit-full-screen .zahlenstrahl-app { max-width: none; }
/* Zahlenstrahl: feste 95vh-Höhe aus dem Original aufheben (erzeugte grossen
   Leerraum unter dem Zahlenstrahl, v. a. im Vollbild). Höhe folgt dem Inhalt,
   sodass das Tool im Vollbild sauber vertikal zentriert wird. */
.tool-frame .zahlenstrahl-app { height: auto; }
/* Rahmen des Zahlenstrahls in derselben grauen Farbe wie das Tool (#f4f5f7),
   damit die Fläche wie im Original durchgehend grau ist (statt weissem Rand). */
.tool-frame:has(.zahlenstrahl-app) { background: #f4f5f7; }
/* Im Vollbild oben ausrichten, damit der (per JS mitwachsende) Zahlenstrahl
   die Fläche von oben nach unten füllt und die Höhenmessung stabil bleibt. */
.tool-frame:fullscreen:has(.zahlenstrahl-app),
.tool-frame:-webkit-full-screen:has(.zahlenstrahl-app) { justify-content: flex-start; }
/* Webkit-Präfix für :fullscreen */
.tool-frame:-webkit-full-screen {
  margin: 0; border-radius: 0; border-bottom: none;
  width: 100vw; height: 100vh; max-width: none; overflow: auto;
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(16px, 3vw, 56px);
}
.tool-frame :is(input, button, select, textarea) { font-family: inherit; }
.tool-frame--bare {
  background: transparent;
  box-shadow: none;
  border-bottom: none;
  padding: 0;
  display: flex;
  justify-content: center;
}
.tool-intro {
  text-align: center;
  color: var(--muted);
  max-width: 640px;
  margin: -10px auto 26px;
}

/* QR tool (scoped – original used global body rules) */
.qr-tool { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.qr-tool #qrCode { width: auto; display: flex; justify-content: center; align-items: center; }
.qr-tool #qrCode img, .qr-tool #qrCode canvas { max-width: 100%; height: auto; }
.qr-tool #qrInput {
  width: 100%; max-width: 520px; padding: 12px 14px; font-size: 16px;
  color: #333; text-align: center; border: 1px solid #ccc; border-radius: 8px;
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .site-header { text-align: center; }
  .site-header .container { align-items: center; }
  .project-card { grid-template-columns: 1fr; text-align: center; }
  .project-card .links { justify-content: center; }
  .tools-grid { grid-template-columns: 1fr; }
}
@media (min-width: 761px) and (max-width: 900px) {
  .tools-grid { grid-template-columns: repeat(2, 1fr); }
}
