/* Montserrat (SIL Open Font License, siehe /fonts/OFL.txt), lokal eingebunden */
@font-face {
  font-family: "Montserrat";
  src: url("/fonts/montserrat.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  /* Farben aus dem Logo */
  --yellow: #ffc421;
  --ink: #3d3d3d;
  --white: #fff;
  --muted: #6b6b6b;
  --cream: #fff8e6;
  --rule: rgba(61, 61, 61, .14);
  --sans: "Montserrat", "Helvetica Neue", Arial, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }

body {
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 450;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
strong { font-weight: 700; }

/* ---------- Layout ---------- */

.home {
  --max: 76rem;
  --pad: clamp(1.25rem, 5vw, 4rem);
  /* Seitenabstand: mindestens --pad, auf breiten Bildschirmen zentriert */
  --gutter: max(var(--pad), (100vw - var(--max)) / 2);
  --gl: max(var(--gutter), env(safe-area-inset-left));
  --gr: max(var(--gutter), env(safe-area-inset-right));
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  min-height: 100svh;
  overflow-x: clip;
}

/* ---------- Kopf- und Fußzeile ---------- */

.bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .5rem 1.5rem;
  padding: max(.9rem, env(safe-area-inset-top)) var(--gr) .9rem var(--gl);
  font-size: .9rem;
}
.home > .bar:first-child { background: var(--yellow); }

.mark {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  font-weight: 700;
  text-decoration: none;
}
.mark img { width: 40px; height: 40px; border-radius: 10px; box-shadow: 0 0 0 2px var(--white); }

.bar-link {
  text-decoration: none;
  font-weight: 600;
  padding: .55rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .55);
  transition: background .2s;
}

.bar-bottom {
  border-top: 1px solid var(--rule);
  padding-top: 1.1rem;
  padding-bottom: max(1.1rem, env(safe-area-inset-bottom));
  color: var(--muted);
  font-size: .82rem;
}
.bar-bottom nav { display: flex; gap: 1.5rem; }
.bar-bottom nav a { text-decoration: none; padding: .5rem 0; }

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

.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100svh - 4.5rem);
  padding: clamp(1.5rem, 5svh, 4rem) var(--gr) clamp(2.5rem, 7svh, 5rem) var(--gl);
  background: var(--yellow);
}

/*
 * Der Schriftzug ist dem Logo nachgebaut: weiße Form links,
 * „timos“ klein darüber, „3Ddrucke“ groß und über die Form hinaus.
 * Die Form trägt feine Schichtlinien und baut sich beim Laden
 * einmal kurz von unten nach oben auf – wie ein 3D-Druck.
 */
.lockup {
  --s: clamp(2.6rem, min(13.5vw, 19svh), 8.5rem);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 0 0 clamp(2rem, 5vw, 3.5rem);
  padding: 1.25em 0 1.55em .92em;
  font-size: var(--s);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.01em;
}
.lockup .blob {
  position: absolute;
  left: 0; top: 0;
  width: 2.97em;
  height: 4.3em;
  background: repeating-linear-gradient(to bottom,
    var(--white) 0, var(--white) .055em, #fff2cc .055em, #fff2cc .068em);
  -webkit-mask: url("/img/blob.svg") center / 100% 100% no-repeat;
  mask: url("/img/blob.svg") center / 100% 100% no-repeat;
  animation: build 1.3s steps(26, end) both;
}
.lockup .l1, .lockup .l2 { position: relative; }
.lockup .l1 { font-size: .5em; font-weight: 600; margin: 0 0 .05em .04em; }
.lockup .l2 { white-space: nowrap; }
.lockup .l1, .lockup .l2 { animation: rise .7s .9s cubic-bezier(.2, .7, .2, 1) both; }

.intro {
  display: grid;
  grid-template-columns: minmax(0, 34rem) auto;
  justify-content: space-between;
  align-items: end;
  gap: 1.75rem 3rem;
  padding-top: 1.75rem;
  border-top: 2px solid rgba(61, 61, 61, .18);
}
.intro p {
  margin: 0;
  font-size: clamp(1.02rem, .95rem + .4vw, 1.2rem);
  text-wrap: pretty;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  min-height: 3.4rem;
  padding: .9rem 1.8rem;
  background: var(--ink);
  color: var(--white);
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
  border-radius: 999px;
  transition: background .2s, color .2s;
}
.button span { transition: transform .2s; }
.button:focus-visible { outline: 3px solid var(--white); outline-offset: 3px; }

/* ---------- So funktioniert’s ---------- */

.how {
  padding: clamp(3.5rem, 9vw, 6.5rem) var(--gr) clamp(3.5rem, 9vw, 6.5rem) var(--gl);
}
.how h2 {
  margin: 0 0 clamp(2rem, 4vw, 3rem);
  font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -.01em;
}

.steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin: 0;
  padding: 0;
}
.steps li {
  counter-increment: step;
  padding: 1.75rem 1.6rem 1.9rem;
  background: var(--cream);
  border-radius: 22px;
}
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  margin-bottom: 1.1rem;
  border-radius: 50%;
  background: var(--yellow);
  font-weight: 700;
}
.steps h3 { margin: 0 0 .4rem; font-size: 1.1rem; font-weight: 700; }
.steps p { margin: 0; color: var(--muted); text-wrap: pretty; }

/* ---------- Bewegung ---------- */

@keyframes build {
  from { clip-path: inset(100% 0 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(.15em); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .lockup .blob, .lockup .l1, .lockup .l2 { animation: none; }
}

@media (hover: hover) {
  .bar-link:hover { background: var(--white); }
  .bar-bottom nav a:hover { color: var(--ink); }
  .button:hover { background: var(--white); color: var(--ink); }
  .button:hover span { transform: translateX(3px); }
}

/* ---------- Kleinere Bildschirme ---------- */

/* Tablet hochkant und kleiner: Button unter den Text, Schritte untereinander */
@media (max-width: 52rem) {
  .intro { grid-template-columns: minmax(0, 1fr); justify-items: start; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .steps li {
    display: grid;
    grid-template-columns: 2.4rem minmax(0, 1fr);
    column-gap: 1.1rem;
    padding: 1.4rem 1.3rem;
  }
  .steps li::before { grid-row: span 2; margin: 0; }
}

/* Handy */
@media (max-width: 40rem) {
  .mark span { display: none; }
  .hero { min-height: auto; }
  .button { width: 100%; }
  .bar-bottom { flex-direction: column-reverse; align-items: flex-start; gap: .25rem; }
}

/* Querformat auf dem Handy */
@media (max-height: 30rem) and (orientation: landscape) {
  .hero { min-height: auto; }
}

/* ---------- Rechtliche Seiten ---------- */

.legal-top {
  background: var(--yellow);
  padding: max(.9rem, env(safe-area-inset-top)) 1.5rem .9rem;
}
.legal-top .inner { max-width: 40rem; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; }

.legal {
  max-width: 40rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}
.legal h1 {
  font-size: clamp(2rem, 7vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.1;
  margin: 0 0 2.25rem;
}
.legal h2 {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 2.2rem 0 .5rem;
}
.legal p { margin: 0 0 1rem; }
.legal a { text-underline-offset: 2px; text-decoration-color: var(--yellow); text-decoration-thickness: 2px; }

.back { font-size: .9rem; font-weight: 600; text-decoration: none; }

.legal-footer {
  max-width: 40rem;
  margin: 0 auto;
  padding: 1.4rem 1.5rem max(1.5rem, env(safe-area-inset-bottom));
  border-top: 1px solid var(--rule);
  font-size: .82rem;
}
.legal-footer a { color: var(--muted); text-decoration: none; margin-right: 1.5rem; }
