/* =========================================================
   FLEMATES — Coming-soon-Seite
   =========================================================
   Farben, Schriften und Abstände stehen hier oben. Ton aus der
   orangen Sonne: Sand als Grund, Orange nach Rot, dunkles Braun.
   Schriften seit 2026-10-12: Fraunces mit weichem Schnitt (SOFT 100)
   für Überschriften, Jost für alles andere; das Logo ist seit dem
   Abend ein Bild (Wortmarke von Gian). Gian fand
   Instrument Serif und DM Sans „nicht Pilates".
   ========================================================= */
@font-face { font-family: "Fraunces"; src: url("/assets/fonts/Fraunces-normal.woff2") format("woff2"); font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("/assets/fonts/Fraunces-italic.woff2") format("woff2"); font-weight: 300 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Jost"; src: url("/assets/fonts/Jost-normal.woff2") format("woff2"); font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Jost"; src: url("/assets/fonts/Jost-italic.woff2") format("woff2"); font-weight: 300 700; font-style: italic; font-display: swap; }

:root {
  --bg: #f5e1c8;             /* Sand */
  --bg-2: #ecd3b2;
  --ink: #2b1d14;            /* dunkles Braun */
  --ink-2: #5a4636;
  --muted: #9a826b;
  --line: rgba(43, 29, 20, 0.14);
  --sun-1: #ffb45f;
  --sun-2: #fb5a3d;
  --sun-3: #d6355a;
  --ridge: #9a3412;          /* dunkles Orange der Bergkette */
  --accent: #e2572f;
  --sun-light: #ff9b63;      /* Orange auf dunklem Grund */
  --on-image: #fff8ee;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-ui: "Jost", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --pad: 28px;
  --gap: 12px;
  --radius: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
/* Das hidden-Attribut muss gewinnen. Ohne diese Zeile schlug
   `.waitlist { display: grid }` das hidden des Formulars: nach dem
   Absenden blieb das Formular mit dem Lade-Knopf stehen. */
[hidden] { display: none !important; }

html { height: 100%; }
body {
  margin: 0;
  min-height: 100vh; min-height: 100svh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
.display, h1, h2, .tile-label, .sun-year, .fenster-title, .done-title {
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 100, "WONK" 0;
}

/* ---------- Seite ---------- */
.page {
  min-height: 100vh; min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto auto auto auto;
  padding: 0 var(--pad);
  transition: filter 0.55s ease, transform 0.55s ease;
}
body.is-open .page, body.is-open .teaser { filter: blur(14px); }
body.is-open .page { transform: scale(1.012); }

/* ---------- Kopf ---------- */
.top {
  display: flex; align-items: center; gap: 20px;
  padding: 18px 0 0;
}
.logo { display: inline-flex; align-items: center; text-decoration: none; }
/* Die Wortmarke ist ein Bild mit Alphakanal (aus der gelieferten Vorlage
   geschnitten, vorlagen/logo); die Hoehe bestimmt die Groesse, die Breite folgt. */
.logo-img { display: block; height: 36px; width: auto; }
.top-note {
  margin: 0 0 0 auto;
  font-size: 12px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-2);
}

/* Die Bergkette: ein Umriss und sieben offene Grate, wie eine Strichzeichnung
   (Vorlage von Gian, 2026-10-13). Der Umriss zeichnet sich beim Laden zuerst,
   dann folgen die Grate nacheinander. */
.ridge {
  display: block; width: 100%; overflow: visible;
  /* Die Zeichnung behält ihr Seitenverhältnis (aspect-ratio = viewBox). Wird
     der Schirm zu niedrig, drückt max-height sie flacher, nie höher: flache
     Berge sehen natürlich aus, gestreckte spitz. Sie sitzt am unteren Rand
     des freien Raums unter dem Kopf. */
  height: auto; aspect-ratio: 1200 / 170; max-height: clamp(56px, 15vh, 170px);
  align-self: end; margin-top: 18px;
}
.ridge path {
  fill: none; stroke: var(--ridge); stroke-width: 2.2;
  stroke-linecap: round; stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  /* In Bildschirmpunkten, nicht mit pathLength: zusammen mit
     non-scaling-stroke rechnet Chrome die Strichlänge im Bildschirm, die
     Pfadlänge aber im viewBox. 2600 deckt den Umriss auf jeder Breite. */
  stroke-dasharray: 2600; stroke-dashoffset: 2600;
  animation: draw 2.4s cubic-bezier(0.45, 0.05, 0.35, 1) 0.2s forwards;
}
/* Die Grate sind kurz; mit dem langen Strichmuster erschienen sie schlagartig. */
.ridge path + path {
  stroke-dasharray: 380; stroke-dashoffset: 380;
  animation-duration: 1.1s; animation-delay: 1.7s;
}
.ridge path:nth-child(3) { animation-delay: 1.9s; }
.ridge path:nth-child(4) { animation-delay: 2.1s; }
.ridge path:nth-child(5) { animation-delay: 2.3s; }
.ridge path:nth-child(6) { animation-delay: 2.5s; }
.ridge path:nth-child(7) { animation-delay: 2.7s; }
.ridge path:nth-child(8) { animation-delay: 2.9s; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- Opener-Text ---------- */
.hero {
  display: grid; grid-template-columns: 1fr; gap: 0; align-items: end;
  padding: 14px 0 28px;
}
.eyebrow {
  margin: 0 0 14px;
  font-size: 12px; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent);
}
h1 {
  margin: 0;
  font-weight: 360;
  font-size: clamp(46px, 5.6vw, 88px); line-height: 0.98; letter-spacing: -0.02em;
}
h1 em { font-style: italic; color: var(--accent); }
.intro { margin: 0; max-width: 44ch; font-size: 17px; line-height: 1.55; color: var(--ink-2); }
.facts {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none;
}
.facts li {
  padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 12.5px; font-weight: 500; letter-spacing: 0.06em; color: var(--ink);
}

/* ---------- Die vier Kacheln ----------
   Klein, 5:4, das Bild füllt die Kachel. Ein dunkler Verlauf von oben
   trägt die Schrift und dunkelt die Personen ab; unten, wo die Reformer
   stehen, bleibt das Bild klar. Gian, 2026-10-12. */
.grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap);
  align-content: end;
}
.tile {
  position: relative; overflow: hidden; isolation: isolate;
  aspect-ratio: 16 / 10;
  margin: 0; padding: 0; border: 0; border-radius: var(--radius);
  background: #3a2a20; color: var(--on-image);
  font: inherit; text-align: left; cursor: pointer;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.5s ease;
}
.tile img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  /* --pos schiebt den Ausschnitt waagrecht, --posy senkrecht (Fotos im
     Querformat 16:10 zeigen sonst die Mitte; das Probelektion-Foto ist 4:3
     und braucht den oberen Teil mit dem Bildschirm). */
  object-fit: cover; object-position: var(--pos, 50%) var(--posy, 60%);
  display: block;
  filter: saturate(0.92) contrast(1.03);
  transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.tile::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(to bottom,
    rgba(18, 11, 7, 0.9) 0%, rgba(18, 11, 7, 0.7) 32%, rgba(18, 11, 7, 0.28) 60%, rgba(18, 11, 7, 0) 82%);
}
.tile-text {
  position: absolute; left: 18px; right: 16px; top: 16px; z-index: 2;
  display: flex; flex-direction: column; gap: 4px;
}
.tile-label {
  font-size: clamp(22px, 2.1vw, 30px); font-weight: 420; line-height: 1.02; letter-spacing: -0.01em;
  color: var(--sun-light);
}
.tile-desc { font-size: 13.5px; line-height: 1.35; color: rgba(255, 248, 238, 0.88); }
.tile:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

@media (pointer: fine) {
  .tile:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(43, 29, 20, 0.2); }
  .tile:hover img { transform: scale(1.04); }
  .tile:hover .sun { transform: scale(1.06); }
}
.tile:active { transform: translateY(-1px); }

/* ---------- Die Sonne ---------- */
.tile-sun { background: var(--sun-1); display: grid; place-items: center; text-align: center; }
.tile-sun::after { display: none; }
.sun {
  position: absolute; inset: -20%;
  background: radial-gradient(circle at 50% 55%, var(--sun-3) 0%, var(--sun-2) 28%, #fb7a45 46%, var(--sun-1) 68%, #ffc98a 100%);
  transform-origin: 50% 60%;
  animation: sunrise 2.8s cubic-bezier(0.2, 0.7, 0.2, 1) both, breathe 7s ease-in-out 2.8s infinite;
  transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}
@keyframes sunrise { from { opacity: 0; transform: scale(0.55) translateY(12%); } to { opacity: 1; transform: none; } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.035); } }
.sun-text {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px;
  color: var(--on-image); text-shadow: 0 1px 10px rgba(120, 30, 20, 0.25);
}
.sun-title { font-size: clamp(14px, 1.25vw, 18px); font-weight: 500; letter-spacing: 0.01em; }
.sun-year { font-style: italic; font-weight: 380; font-size: clamp(44px, 4.6vw, 72px); line-height: 0.95; }
.sun-btn {
  margin-top: 10px; display: inline-block; padding: 9px 18px; border-radius: 999px;
  background: var(--on-image); color: var(--ink); font-size: 13px; font-weight: 600; text-shadow: none;
}

/* ---------- Knöpfe ---------- */
.btn {
  display: inline-flex; justify-content: center; align-items: center;
  padding: 15px 24px; border: 0; border-radius: 999px;
  background: var(--ink); color: var(--bg);
  font: 600 15px/1 var(--font-ui); letter-spacing: 0.03em;
  cursor: pointer; transition: background-color 0.25s ease, transform 0.25s ease;
}
.btn:hover { background: var(--sun-2); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.btn-small { padding: 10px 18px; font-size: 13px; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--ink); color: var(--bg); }

/* ---------- Fuss ---------- */
/* Der kurze Absatz über dem Fuss: klein und ruhig, aber lesbar. */
.about { margin: 14px 0 0; max-width: 78ch; font-size: 12.5px; line-height: 1.5; color: var(--ink-2); }
.foot {
  display: flex; justify-content: space-between; align-items: center; gap: 12px 20px; flex-wrap: wrap;
  padding: 18px 0 20px;
  font-size: 12.5px; color: var(--ink-2);
}
.foot a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); }
.foot a:hover { border-color: var(--ink); }
/* Das Matrix-Logo ist weiss mit rotem Punkt, darum auf dunklem Grund. */
.matrix {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 5px 10px; border-radius: 999px;
  background: var(--ink); color: rgba(255, 248, 238, 0.8);
  font-size: 10px; letter-spacing: 0.04em;
}
.matrix img { display: block; height: 8px; width: auto; }
.more { font-weight: 600; color: var(--ink) !important; }
.more span { display: inline-block; animation: nudge 1.8s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3px); } }
.foot-copy { color: var(--muted); }

/* ---------- Die angedeutete Fortsetzung ---------- */
.teaser { padding: 48px var(--pad) 80px; max-width: 760px; transition: filter 0.55s ease; }
.teaser-block { margin-bottom: 48px; filter: blur(3.5px); opacity: 0.55; pointer-events: none; user-select: none; }
.teaser h2 { margin: 0 0 12px; font-weight: 400; font-size: 40px; line-height: 1; color: var(--accent); }
.teaser p { margin: 0 0 10px; font-size: 17px; line-height: 1.55; color: var(--ink-2); }

/* ---------- Das Fenster ---------- */
.fenster {
  border: 0; padding: 0; margin: auto;
  width: min(420px, calc(100vw - 32px));
  background: transparent; color: var(--ink); overflow: visible;
}
.fenster::backdrop { background: rgba(43, 29, 20, 0.3); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.fenster[open] { animation: fenster-in 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes fenster-in { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }
.fenster-card {
  position: relative; padding: 34px 32px 26px; border-radius: 24px;
  background: var(--bg); box-shadow: 0 40px 100px rgba(43, 29, 20, 0.35);
  text-align: center;
}
.fenster-close {
  position: absolute; top: 12px; right: 12px; width: 38px; height: 38px;
  border: 0; border-radius: 50%; background: transparent; color: var(--ink-2);
  font: 26px/1 var(--font-ui); cursor: pointer;
}
.fenster-close:hover { background: rgba(43, 29, 20, 0.08); }
.fenster-mark { width: 52px; height: 52px; display: block; margin: 0 auto 10px; }
.fenster-title { margin: 0; font-style: italic; font-weight: 380; font-size: 48px; line-height: 1; letter-spacing: -0.01em; }
.fenster-text { margin: 12px auto 0; max-width: 30ch; font-size: 16px; line-height: 1.45; color: var(--ink-2); }

.waitlist { margin-top: 20px; display: grid; gap: 10px; text-align: left; }
.waitlist input[type="text"], .waitlist input[type="email"] {
  width: 100%; padding: 15px 18px;
  border: 1px solid var(--line); border-radius: 999px;
  background: #fff; color: var(--ink);
  font: 16px/1.3 var(--font-ui);   /* 16 px, sonst zoomt iOS hinein */
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.waitlist input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(43, 29, 20, 0.08); }
.waitlist input::placeholder { color: var(--muted); }
.waitlist .btn { margin-top: 4px; width: 100%; }
.form-msg { margin: 2px 0 0; font-size: 14px; color: var(--sun-3); text-align: center; }
.form-msg:empty { display: none; }
.small { margin: 4px 0 0; font-size: 12px; color: var(--muted); text-align: center; }
.small a { color: var(--ink-2); }
.hp-field { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.fenster.is-done .fenster-text { display: none; }
.done { margin-top: 18px; display: grid; gap: 8px; justify-items: center; }
.done-title { margin: 0; font-style: italic; font-weight: 380; font-size: 34px; line-height: 1; color: var(--accent); }
.done-text { margin: 0 0 10px; font-size: 16px; color: var(--ink-2); }

/* ---------- Unterseite (Datenschutz) ---------- */
.prose { max-width: 620px; margin: 0 auto; padding: 24px 0 80px; }
.prose h1 { margin: 20px 0 30px; font-weight: 380; font-size: clamp(40px, 6vw, 56px); line-height: 1; }
.prose h2 { margin: 36px 0 8px; font-family: var(--font-ui); font-size: 12px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); }
.prose p { margin: 0 0 12px; color: var(--ink-2); line-height: 1.65; }
.prose a { color: var(--ink); }
.prose .stand { margin-top: 40px; font-size: 13px; color: var(--muted); }
.page-sub { grid-template-rows: auto auto 1fr auto; }
.page-sub .ridge { width: min(100%, 520px); max-height: none; align-self: start; }

/* ---------- Tablet ---------- */
@media (max-width: 1000px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .hero { grid-template-columns: 1fr; gap: 14px; }
}

/* ---------- Telefon ---------- */
@media (max-width: 700px) {
  :root { --pad: 16px; --gap: 8px; --radius: 12px; }
  .top { gap: 12px; padding-top: 14px; }
  .logo-img { height: 28px; }
  .top-note { display: none; }
  .btn-small { margin-left: auto; padding: 9px 14px; font-size: 12px; }
  .ridge { max-height: none; margin-top: 8px; }
  .hero { padding: 10px 0 16px; }
  .eyebrow { font-size: 10.5px; margin-bottom: 8px; }
  h1 { font-size: clamp(36px, 10.5vw, 46px); }
  .intro { font-size: 14.5px; }
  .facts { display: none; }
  /* Auf dem Telefon 5:4; der Ausschnitt rückt auf Person und Kiosk. */
  .tile { aspect-ratio: 5 / 4; }
  .tile-text { left: 11px; right: 10px; top: 10px; gap: 2px; }
  .tile-label { font-size: 18px; }
  .tile-desc { font-size: 11px; }
  .sun-text { padding: 8px; }
  .sun-title { font-size: 11.5px; }
  .sun-year { font-size: 34px; }
  .sun-btn { margin-top: 6px; padding: 6px 12px; font-size: 11px; }
  .about { font-size: 12px; margin-top: 12px; }
  .foot { flex-direction: column; align-items: flex-start; gap: 10px; padding-top: 16px; font-size: 12px; }
  .matrix { font-size: 9.5px; padding: 5px 9px; }
  .matrix img { height: 7px; }
  .teaser { padding-top: 32px; }
  .teaser h2 { font-size: 30px; }
  .teaser p { font-size: 15px; }
  .fenster-card { padding: 28px 20px 20px; border-radius: 20px; }
  .fenster-title { font-size: 42px; }
}

/* ---------- Bewegung ---------- */
@media (prefers-reduced-motion: reduce) {
  .sun, .more span { animation: none; }
  .ridge path { animation: none; stroke-dashoffset: 0; }
  .tile, .tile img, .sun, .page, .teaser { transition: none; }
  .fenster[open] { animation: none; }
}
