/* ==========================================================================
   Ripiana — Coming Soon
   Brand colors: black / white (monochrome)
   ========================================================================== */

@font-face {
  font-family: "Inter";
  src: url("inter-var.woff") format("woff");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Space Grotesk";
  src: url("space-grotesk-var.woff") format("woff");
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #000000;
  --paper: #ffffff;
  --line: #e6e6e6;
  --text-body: #3a3a3a;
  --text-muted: #6b6b6b;
  --max-width: 1080px;

  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  height: 100%;
  scroll-snap-type: y mandatory;
}

body {
  margin: 0;
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

.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;
}

/* ---------- Topbar ---------- */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(20px, 5vw, 56px);
  color: var(--paper);
  transition: color 0.3s ease;
}

body[data-theme="light"] .topbar {
  color: var(--ink);
}

.brand-mark img {
  display: block;
  height: auto;
  transition: filter 0.3s ease;
}

body[data-theme="light"] .brand-mark img {
  filter: invert(1);
}

.social-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.social-nav a {
  display: flex;
  align-items: center;
  color: inherit;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.social-nav a:hover {
  opacity: 1;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--ink);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.hero-inner {
  max-width: 640px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.hero-brand {
  position: relative;
  display: inline-block;
  margin-bottom: 4px;
}

.hero-wordmark {
  display: block;
  width: min(420px, 78vw);
  height: auto;
}

.hero-brand .reg {
  position: absolute;
  top: 0.35em;
  right: -1.1em;
  font-family: var(--font-body, sans-serif);
  font-size: clamp(0.85rem, 2.2vw, 1.2rem);
  font-weight: 400;
  line-height: 1;
  opacity: 0.9;
}

.hero-headline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 7vw, 4.2rem);
  letter-spacing: -0.01em;
  margin: 0;
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: rgba(255, 255, 255, 0.75);
  max-width: 480px;
  margin: 0;
}

.scroll-cue {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
}

.scroll-cue span {
  display: block;
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, transparent, var(--paper));
  animation: scroll-cue 2s ease-in-out infinite;
}

@keyframes scroll-cue {
  0%, 100% { opacity: 0.3; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(6px); }
}

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

.btn {
  display: inline-block;
  border: none;
  border-radius: 999px;
  padding: 14px 32px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  opacity: 0.85;
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--paper);
  color: var(--ink);
}

/* ---------- Story ---------- */

.story {
  min-height: 100vh;
  min-height: 100svh;
  background: var(--paper);
  padding: 100px 24px;
  display: flex;
  align-items: center;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.story-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}

.story h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin: 0 0 20px;
}

.story > .story-inner > p {
  max-width: 640px;
  font-size: 1.05rem;
  color: var(--text-body);
  margin: 0 0 20px;
}

.story > .story-inner > p:last-of-type {
  margin-bottom: 56px;
}

.feature-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.feature {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.feature-index {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: #a3a3a3;
}

.feature h3 {
  font-size: 1.05rem;
  margin: 10px 0 8px;
}

.feature p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* ---------- Signup ---------- */

.signup {
  min-height: 100vh;
  min-height: 100svh;
  background: var(--ink);
  color: var(--paper);
  padding: 110px 24px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.signup-inner {
  max-width: 520px;
  margin: 0 auto;
}

.signup h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin: 0 0 14px;
}

.signup > .signup-inner > p {
  color: rgba(255, 255, 255, 0.75);
  margin: 0 0 36px;
}

.signup-form {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.signup-form input[type="email"] {
  flex: 1 1 260px;
  padding: 14px 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.06);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s ease;
}

.signup-form input[type="email"]::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.signup-form input[type="email"]:focus {
  border-color: var(--paper);
}

.signup-form .btn {
  flex: 0 0 auto;
}

.signup-message {
  min-height: 1.4em;
  margin: 18px 0 0;
  font-size: 0.9rem;
}

.signup-message.is-success {
  color: #9fe6b8;
}

.signup-message.is-error {
  color: #f0a8a8;
}

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

.signup-legal {
  margin: 6px auto 0;
  max-width: 420px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.5);
}

.signup-legal a {
  color: rgba(255, 255, 255, 0.75);
}

.site-footer {
  scroll-snap-align: end;
  background: var(--ink);
  color: var(--paper);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding: 48px clamp(20px, 5vw, 56px) 26px;
}

.footer-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.footer-brand {
  gap: 22px;
}

.footer-col h4 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.footer-col > a {
  font-size: 0.9rem;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.72);
  transition: color 0.2s ease;
}

.footer-col > a:hover {
  color: var(--paper);
}

.footer-copy {
  max-width: var(--max-width);
  margin: 40px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

/* ---------- Legal pages ---------- */

html.legal {
  scroll-snap-type: none;
}

.legal-page {
  background: var(--paper);
  padding: 130px 24px 90px;
}

.legal-inner {
  max-width: 720px;
  margin: 0 auto;
}

.legal-back {
  display: inline-block;
  margin-bottom: 28px;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
}

.legal-back:hover {
  color: var(--ink);
}

.legal-page h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.8rem);
  margin: 0 0 32px;
}

.legal-page h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 36px 0 10px;
}

.legal-page p,
.legal-page li {
  color: var(--text-body);
  font-size: 0.98rem;
}

.legal-page ul {
  padding-left: 20px;
}

.legal-page address {
  font-style: normal;
  color: var(--text-body);
  line-height: 1.7;
}

.legal-meta {
  margin-top: 44px;
  font-size: 0.85rem !important;
  color: var(--text-muted) !important;
}

/* ---------- Responsive ---------- */

@media (max-width: 720px) {
  .feature-row {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .signup-form {
    flex-direction: column;
    align-items: stretch;
  }

  .signup-form input[type="email"],
  .signup-form .btn {
    flex: 0 0 auto;
    width: 100%;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

/* ---------- Reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(28px) scale(0.98);
  transition: opacity 0.8s cubic-bezier(0.2, 0.7, 0.3, 1),
              transform 0.8s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  html {
    scroll-snap-type: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

html.legal .topbar {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
}

/* ---------- Mobile (v16): Einrasten bleibt, Story kompakt ---------- */
@media (max-width: 720px) {
  .hero { padding: 100px 24px 72px; }
  .hero-inner { gap: 18px; }
  .hero-wordmark { width: min(320px, 72vw); }
  .hero-headline { font-size: clamp(2.1rem, 9vw, 2.6rem); }
  .hero-sub { font-size: 1rem; }

  .story { padding: 88px 22px 32px; }
  .story h2 { font-size: 1.6rem; margin-bottom: 12px; }
  .story > .story-inner > p { font-size: 0.92rem; line-height: 1.5; margin-bottom: 12px; }
  .story > .story-inner > p:last-of-type { margin-bottom: 22px; }
  .feature-row { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .feature { padding-top: 10px; }
  .feature-index { font-size: 0.72rem; }
  .feature h3 { font-size: 0.82rem; line-height: 1.3; margin: 4px 0 0; }
  .feature p { display: none; }

  .signup { padding: 96px 24px; }
}

/* Falls ein Abschnitt trotzdem höher als der Bildschirm ist (sehr kleine Handys) */
html.snap-soft { scroll-snap-type: y proximity; }
html.snap-soft .hero, html.snap-soft .story, html.snap-soft .signup { scroll-snap-stop: normal; }

/* ---------- Morph-Übergang zwischen den Seiten (v16) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(40px) scale(0.94);
  filter: blur(10px);
  transition: opacity 0.9s cubic-bezier(0.2, 0.7, 0.3, 1),
              transform 0.9s cubic-bezier(0.2, 0.7, 0.3, 1),
              filter 0.9s cubic-bezier(0.2, 0.7, 0.3, 1);
  will-change: opacity, transform, filter;
}
.reveal.from-above { transform: translateY(-40px) scale(0.94); }
.reveal.is-visible { opacity: 1; transform: none; filter: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.from-above { opacity: 1; transform: none; filter: none; transition: none; }
}

/* ---------- Alles dunkel (v18) ---------- */
.story { background: var(--ink); color: var(--paper); }
.story > .story-inner > p { color: rgba(255, 255, 255, 0.75); }
.feature { border-top-color: rgba(255, 255, 255, 0.15); }
.feature-index { color: rgba(255, 255, 255, 0.45); }
.feature p { color: rgba(255, 255, 255, 0.6); }
html.layers body { background: var(--ink); }

html.layers body { background: var(--ink); }
html.layers .hero, html.layers .story, html.layers .signup, html.layers .site-footer { background: transparent; }

/* ==========================================================================
   v23 — Bühne mit scroll-gekoppelter Animation (statt Ebenen)
   ========================================================================== */
html { scroll-snap-type: none !important; scroll-behavior: smooth; }
body { background: var(--ink); }
.story, .signup { scroll-snap-align: none; }

.eyebrow {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

/* Bühne: 2.6 Bildschirmhöhen Scrollweg, Inhalt klebt oben */
.stage { position: relative; height: 260vh; height: 260svh; background: var(--ink); }
.stage-sticky {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden;
  color: var(--paper);
}
.stage-bg {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(60% 50% at 50% 45%, rgba(255,255,255,0.10), rgba(255,255,255,0) 70%),
    radial-gradient(120% 90% at 50% 120%, #1a1a1a 0%, #000 60%);
  will-change: transform;
  transform-origin: 50% 50%;
}
.stage-mono {
  width: min(1100px, 150vw);
  height: auto;
  opacity: 0.07;
}
.stage-shade { position: absolute; inset: 0; background: #000; opacity: 0; will-change: opacity; }

.stage-hero {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  text-align: center;
  padding: 0 24px clamp(110px, 16vh, 170px);
  gap: 18px;
  max-width: none;
  will-change: transform, opacity;
}
.stage-hero .hero-headline { font-size: clamp(2.4rem, 6vw, 4.6rem); line-height: 1.05; }
.stage-hero .hero-sub { color: rgba(255,255,255,0.75); }

.btn-glass {
  background: rgba(255, 255, 255, 0.16);
  color: var(--paper);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.18);
}
.btn-dark { background: var(--ink); color: var(--paper); margin-top: 18px; align-self: flex-start; }

.scroll-cue {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
  color: rgba(255,255,255,0.8);
  animation: cue-bob 2s ease-in-out infinite;
}
.scroll-cue span { display: none; }
@keyframes cue-bob { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 6px); } }

/* Karten */
.stage-cards {
  position: absolute; left: 0; right: 0; top: 50%;
  transform: translateY(-50%);
  margin: 0 auto; padding: 0 clamp(20px, 5vw, 56px);
  max-width: 1240px;
  list-style: none;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  pointer-events: none;
}
.card {
  position: relative;
  min-height: clamp(300px, 52vh, 460px);
  border-radius: 18px;
  padding: 28px;
  display: flex; flex-direction: column; justify-content: flex-end;
  background: linear-gradient(180deg, #1c1c1c 0%, #0d0d0d 100%);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--paper);
  opacity: 0;
  will-change: transform, opacity;
  overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0;
  background: url("logo-monogram-white.svg") center 32% / 70% auto no-repeat;
  opacity: 0.06;
}
.card-index { font-family: var(--font-display); font-size: 0.8rem; color: rgba(255,255,255,0.45); letter-spacing: 0.1em; }
.card h3 { font-family: var(--font-display); font-size: clamp(1.3rem, 2vw, 1.7rem); margin: 8px 0 8px; line-height: 1.15; }
.card p { margin: 0; font-size: 0.92rem; color: rgba(255,255,255,0.7); }
.card-light { background: var(--paper); color: var(--ink); border-color: transparent; }
.card-light::before { filter: invert(1); opacity: 0.07; }
.card-light .card-index { color: rgba(0,0,0,0.45); }
.card-light p { color: rgba(0,0,0,0.65); }

/* Story: grosser zentrierter Block */
.story { background: var(--ink); color: var(--paper); text-align: center; padding: 140px 24px; min-height: 90vh; }
.story-inner { max-width: 720px; }
.story .eyebrow { margin-bottom: 14px; }
.story h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin: 0 0 28px; }
.story > .story-inner > p { margin-left: auto; margin-right: auto; color: rgba(255,255,255,0.75); font-size: 1.08rem; }
.story > .story-inner > p:last-of-type { margin-bottom: 0; }

.signup .eyebrow { margin-bottom: 14px; }
.signup h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); }

.footer-sign { display: flex; justify-content: center; padding: 10px 0 40px; opacity: 0.9; }
.footer-sign img { width: 72px; height: auto; }

/* Reveal sanfter für normale Abschnitte */
.reveal { filter: none; }

/* Handy: Karten als wischbare Reihe (wie ein Karussell) */
@media (max-width: 720px) {
  .stage-hero { padding-bottom: 120px; gap: 14px; }
  .stage-hero .hero-wordmark { width: min(300px, 72vw); }
  .stage-cards {
    display: flex; gap: 14px;
    overflow-x: auto; scroll-snap-type: x mandatory;
    padding: 0 24px; scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .stage-cards::-webkit-scrollbar { display: none; }
  .card { flex: 0 0 78vw; min-height: 58svh; scroll-snap-align: center; padding: 24px; }
  .story { padding: 110px 24px; min-height: 0; }
  .story > .story-inner > p { font-size: 1rem; }
}

/* ---------- v24 ---------- */
.topbar { justify-content: flex-end; }

@media (max-width: 720px) {
  .stage { height: 420vh; height: 420svh; }
  /* Karten als Stapel: jede Karte fährt beim Scrollen von unten über die vorherige */
  .stage-cards {
    display: block;
    overflow: visible;
    scroll-snap-type: none;
    top: 50%;
    height: 56svh;
    padding: 0;
  }
  .card {
    position: absolute;
    left: 24px; right: 24px; top: 0;
    height: 56svh; min-height: 0;
    flex: none;
    box-shadow: 0 -18px 40px rgba(0, 0, 0, 0.55);
  }
}
