/*
  TimeSpent · Landing Page
  Farben und Schriften folgen der App (constants/theme.ts):
  British Racing Green, warmes Off-White, Gold nur als Belohnungs-Akzent.
  Fraunces nur für Überschriften und den Schriftzug, Inter für Text und alle Zahlen.
  Alle Schriften liegen lokal in assets/fonts (keine externen Anfragen).
*/

/* ---------- Schriften ---------- */

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-var.woff2") format("woff2");
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-italic.woff2") format("woff2");
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}

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

/* ---------- Tokens ---------- */

:root {
  color-scheme: light;

  --green: #004225;
  --green-deep: #00301a;
  --green-glow: #0b5c3e;
  --green-tint: #e4ede8;

  --gold-from: #c9a227;
  --gold-to: #ffd700;
  --gold-gradient: linear-gradient(115deg, #c9a227 0%, #f1c814 38%, #ffd700 55%, #e4b92a 78%, #c9a227 100%);

  --paper: #faf7f0;
  --cream: #f7f2e7;
  --line: #e7dfd2;

  --ink: #0f172a;
  --ink-soft: rgba(15, 23, 42, 0.74);
  --ink-faint: rgba(15, 23, 42, 0.64);

  --on-green: #faf7f0;
  --on-green-soft: rgba(250, 247, 240, 0.8);
  --on-green-faint: rgba(250, 247, 240, 0.66);
  --on-green-line: rgba(250, 247, 240, 0.18);

  --error-on-green: #ffc4b8;
  --error-border: #e5484d;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --gutter: clamp(24px, 5vw, 64px);
  --maxw: 1200px;
  --section-y: clamp(72px, 10vw, 136px);
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- Grundlagen ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-optical-sizing: auto;
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--green);
  text-wrap: balance;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
  border-radius: 4px;
}

.on-green :focus-visible {
  outline-color: var(--gold-to);
}

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

.wrap {
  width: 100%;
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
}

.num {
  font-variant-numeric: tabular-nums;
}

/* ---------- Grüne Flächen ---------- */

.on-green {
  position: relative;
  isolation: isolate;
  color: var(--on-green);
  background:
    radial-gradient(110% 70% at 100% 0%, rgba(11, 92, 62, 0.95) 0%, rgba(11, 92, 62, 0) 62%),
    radial-gradient(90% 60% at 0% 100%, rgba(0, 48, 26, 0.9) 0%, rgba(0, 48, 26, 0) 70%),
    var(--green);
}

/* feines Korn für eine papierne, ruhige Fläche */
.on-green::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.on-green h1,
.on-green h2,
.on-green h3 {
  color: var(--on-green);
}

/* ---------- Kopfzeile ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  padding-top: env(safe-area-inset-top);
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.01em;
  color: inherit;
  text-decoration: none;
}

.wordmark:hover {
  text-decoration: none;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--on-green-soft);
}

.status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold-gradient);
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.14);
}

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

.hero {
  padding-bottom: clamp(40px, 7vw, 104px);
  border-bottom: 1px solid rgba(201, 162, 39, 0.45);
}

.hero__claim {
  margin-top: clamp(20px, 5vw, 64px);
  font-size: clamp(2.25rem, 1.25rem + 4.4vw, 5.25rem);
  line-height: 1.03;
  letter-spacing: -0.022em;
}

.claim-line {
  display: block;
}

.claim-line--muted {
  color: var(--on-green-faint);
}

.claim-gold {
  font-style: italic;
  padding-right: 0.08em;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.hero__body {
  display: grid;
  gap: 24px;
  margin-top: clamp(20px, 3.4vw, 48px);
}

.hero__lead {
  max-width: 34ch;
  font-size: clamp(17px, 0.95rem + 0.35vw, 20px);
  line-height: 1.5;
  color: var(--on-green-soft);
}

@media (min-width: 960px) {
  .hero__body {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    gap: 48px;
    align-items: start;
  }

  .hero__lead {
    padding-top: 10px;
  }
}

/* ---------- Anmeldeformular ---------- */

/* Das Formular richtet sich nach seiner eigenen Breite, nicht nach der Bildschirmbreite. */
.signup {
  container-type: inline-size;
}

.signup__fields {
  display: grid;
  gap: 10px;
}

@container (min-width: 480px) {
  .signup__fields {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  }

  .signup__fields .btn {
    grid-column: 1 / -1;
  }
}

@container (min-width: 720px) {
  .signup__fields {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto;
  }

  .signup__fields .btn {
    grid-column: auto;
  }
}

.input {
  width: 100%;
  height: 56px;
  padding: 0 22px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font: 500 17px/1 var(--font-body);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.08);
  -webkit-appearance: none;
  appearance: none;
}

.input::placeholder {
  color: rgba(15, 23, 42, 0.62);
  opacity: 1;
}

.input:focus-visible {
  outline: 3px solid var(--gold-to);
  outline-offset: 2px;
  border-radius: 999px;
}

.input[aria-invalid="true"] {
  border-color: var(--error-border);
}

/* Spam-Schutz von Brevo: muss leer bleiben, für Menschen unsichtbar */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.signup__status {
  min-height: 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
}

.signup__status:not(:empty) {
  margin-top: 12px;
  padding: 10px 16px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.18);
  color: var(--error-on-green);
}

.signup__status.is-info:not(:empty) {
  color: var(--on-green);
}

.signup__note {
  margin-top: 12px;
  max-width: 52ch;
  font-size: 13px;
  line-height: 1.5;
  color: var(--on-green-faint);
}

.signup__note a {
  color: var(--on-green-soft);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  font: 600 17px/1.2 var(--font-body);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.18s var(--ease-out), filter 0.18s var(--ease-out), box-shadow 0.18s var(--ease-out);
}

.btn:hover {
  text-decoration: none;
}

.btn--gold {
  color: var(--green);
  background: var(--gold-gradient);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 -1px 0 rgba(0, 48, 26, 0.18),
    0 12px 28px -14px rgba(0, 20, 10, 0.65);
}

.btn--gold:hover {
  filter: brightness(1.05) saturate(1.05);
}

.btn--gold:active {
  transform: translateY(1px) scale(0.99);
}

.btn[disabled] {
  cursor: progress;
  filter: saturate(0.6);
}

.btn__icon {
  width: 18px;
  height: 18px;
  flex: none;
}

/* ---------- Abschnitte ---------- */

.section {
  padding-block: var(--section-y);
}

.section--cream {
  background: var(--cream);
  border-block: 1px solid var(--line);
}

.label {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
}

.label::after {
  content: "";
  display: block;
  width: 40px;
  height: 2px;
  margin-top: 12px;
  background: var(--gold-gradient);
}

.on-green .label {
  color: var(--on-green-soft);
}

.section__title {
  margin-top: 24px;
  font-size: clamp(2rem, 1.35rem + 2.6vw, 3.5rem);
}

.section__text {
  margin-top: 20px;
  max-width: 36em;
  font-size: clamp(17px, 0.98rem + 0.2vw, 19px);
  color: var(--ink-soft);
}

/* ---------- Problem und Statistik ---------- */

.problem__grid {
  display: grid;
  gap: 48px;
}

.stat {
  margin: 0;
}

.stat__number {
  display: flex;
  align-items: flex-start;
  margin: 0 0 0 -0.06em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(8.5rem, 4.5rem + 20vw, 17rem);
  line-height: 0.82;
  letter-spacing: -0.065em;
  color: var(--green);
  font-variant-numeric: tabular-nums;
}

.stat__unit {
  margin: 0.06em 0 0 0.1em;
  font-size: 0.36em;
  letter-spacing: -0.02em;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat__caption {
  margin-top: 24px;
  max-width: 30ch;
  font-size: clamp(19px, 1.05rem + 0.5vw, 23px);
  line-height: 1.45;
  font-weight: 500;
  color: var(--ink);
}

.stat__source {
  margin-top: 16px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-faint);
}

@media (min-width: 840px) {
  .problem__grid {
    gap: 72px;
  }

  .problem__grid > div {
    max-width: 640px;
  }

  /* Die große Zahl bekommt eine eigene Zeile über die ganze Breite. */
  .stat {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: end;
    gap: clamp(32px, 5vw, 72px);
    padding-top: 56px;
    border-top: 1px solid var(--line);
  }

  .stat__caption {
    margin-top: 0;
  }
}

/* ---------- So funktioniert es ---------- */

.how__grid {
  display: grid;
  gap: 40px;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}

.step {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 4px 16px;
  padding-block: 28px;
  border-top: 1px solid var(--line);
}

.step:last-child {
  border-bottom: 1px solid var(--line);
}

.step__num {
  padding-top: 6px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--green);
  font-variant-numeric: tabular-nums;
}

.step__title {
  font-size: clamp(1.5rem, 1.25rem + 0.9vw, 2rem);
}

.step__text {
  grid-column: 2;
  margin-top: 8px;
  color: var(--ink-soft);
}

.unlock {
  display: grid;
  gap: 8px;
  margin-top: 32px;
  padding: 24px;
  border-radius: 20px;
  background: var(--green-tint);
  border: 1px solid rgba(0, 66, 37, 0.12);
}

.unlock__q {
  font-weight: 600;
  color: var(--green);
}

.unlock__a {
  color: var(--ink-soft);
}

@media (min-width: 960px) {
  .how__grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 64px;
    align-items: start;
  }

  .how__intro {
    position: sticky;
    top: 48px;
  }

  .step {
    grid-template-columns: 72px minmax(0, 1fr);
    padding-block: 36px;
  }
}

/* ---------- Gründer ---------- */

.founder__grid {
  display: grid;
  gap: 32px;
}

.founder__photo {
  position: relative;
  width: min(100%, 260px);
  aspect-ratio: 4 / 5;
  margin: 0;
  overflow: hidden;
  border-radius: 20px;
  background: var(--green);
  box-shadow: 0 24px 48px -28px rgba(0, 48, 26, 0.55);
}

.founder__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Platzhalter, solange kein Foto da ist: Monogramm in Fraunces */
.founder__monogram {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 88px;
  letter-spacing: -0.03em;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.founder__text {
  margin-top: 20px;
  max-width: 38em;
  font-size: clamp(17px, 0.98rem + 0.25vw, 20px);
  color: var(--ink-soft);
}

.founder__text + .founder__text {
  margin-top: 16px;
}

.founder__sign {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-faint);
}

.founder__name {
  display: block;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}

@media (min-width: 840px) {
  .founder__grid {
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
    gap: 64px;
    align-items: center;
  }

  .founder__photo {
    width: 100%;
    max-width: 380px;
  }
}

/* ---------- Song-Teaser (standardmäßig ausgeblendet) ---------- */

.song__grid {
  display: grid;
  gap: 32px;
  align-items: center;
}

.song__media {
  width: 100%;
  border-radius: 20px;
  background: var(--green-deep);
}

.song__media--audio {
  background: transparent;
}

@media (min-width: 840px) {
  .song__grid {
    grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
    gap: 64px;
  }
}

/* ---------- Zweite Anmeldung ---------- */

.final {
  padding-block: var(--section-y);
}

.final__grid {
  display: grid;
  gap: 32px;
}

.final__title {
  margin-top: 24px;
  font-size: clamp(2.25rem, 1.4rem + 3.4vw, 4.25rem);
}

.final__text {
  margin-top: 16px;
  max-width: 34ch;
  font-size: clamp(17px, 0.98rem + 0.25vw, 20px);
  color: var(--on-green-soft);
}

@media (min-width: 960px) {
  .final__grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 48px;
    align-items: end;
  }
}

/* ---------- Fußzeile ---------- */

.footer {
  padding-block: 40px calc(40px + env(safe-area-inset-bottom));
  background: var(--green-deep);
  color: var(--on-green-faint);
  font-size: 15px;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
}

.footer .wordmark {
  font-size: 20px;
  color: var(--on-green);
}

.footer__by {
  margin-top: 8px;
}

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.footer__nav a {
  display: inline-block;
  padding-block: 10px;
  color: var(--on-green-soft);
}

.footer :focus-visible {
  outline-color: var(--gold-to);
}

/* ---------- Kurze Seiten (Danke, Bestätigt, 404) ---------- */

.page-hero {
  padding-bottom: clamp(48px, 8vw, 96px);
}

.page-hero__title {
  margin-top: clamp(32px, 7vw, 72px);
  font-size: clamp(2.5rem, 1.5rem + 4vw, 4.75rem);
}

.page-hero__text {
  margin-top: 20px;
  max-width: 36ch;
  font-size: clamp(17px, 0.98rem + 0.35vw, 21px);
  line-height: 1.5;
  color: var(--on-green-soft);
}

.page-hero__hint {
  margin-top: 16px;
  max-width: 48ch;
  font-size: 15px;
  color: var(--on-green-faint);
}

.offer {
  max-width: 720px;
  padding: clamp(24px, 5vw, 48px);
  border-radius: 24px;
  background: var(--cream);
  border: 1px solid var(--line);
}

.offer__title {
  margin-top: 20px;
  font-size: clamp(1.75rem, 1.35rem + 1.6vw, 2.5rem);
}

.offer__text {
  margin-top: 16px;
  color: var(--ink-soft);
}

.offer__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  margin-top: 28px;
}

.offer__note {
  margin-top: 16px;
  font-size: 13px;
  color: var(--ink-faint);
}

.offer__status {
  font-size: 15px;
  font-weight: 500;
  color: var(--green);
}

.textlink {
  font-weight: 600;
  color: var(--green);
}

.back {
  margin-top: 40px;
}

/* ---------- Rechtstexte ---------- */

.legal-head {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.legal-head .wordmark {
  color: var(--green);
}

.legal {
  max-width: 760px;
  padding-block: clamp(40px, 7vw, 88px);
}

.legal h1 {
  font-size: clamp(2.25rem, 1.6rem + 2.6vw, 3.5rem);
}

.legal h2 {
  margin-top: 48px;
  font-size: clamp(1.5rem, 1.3rem + 0.8vw, 1.875rem);
}

.legal h3 {
  margin-top: 28px;
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink);
}

.legal p,
.legal ul {
  margin-top: 12px;
  color: var(--ink-soft);
}

.legal ul {
  padding-left: 1.2em;
}

.legal li + li {
  margin-top: 6px;
}

.legal address {
  margin-top: 12px;
  font-style: normal;
  color: var(--ink);
}

.legal .meta {
  margin-top: 12px;
  font-size: 15px;
  color: var(--ink-faint);
}

/* Vorlagen-Hinweis und Platzhalter: vor dem Livegang entfernen bzw. ersetzen */
.template-banner {
  margin-bottom: 40px;
  padding: 20px 24px;
  border: 2px solid #b45309;
  border-radius: 16px;
  background: #fff4e5;
  color: #5c2c06;
  font-size: 15px;
  line-height: 1.55;
}

.template-banner strong {
  display: block;
  margin-bottom: 4px;
  font-size: 17px;
}

.ph {
  padding: 1px 6px;
  border-radius: 6px;
  background: #ffe08a;
  color: #4a2a00;
  font-weight: 600;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.check {
  display: block;
  margin-top: 12px;
  padding: 12px 16px;
  border-left: 4px solid #b45309;
  border-radius: 0 12px 12px 0;
  background: #fff4e5;
  color: #5c2c06;
  font-size: 15px;
}

/* ---------- Einblenden im Hero (ein einziger, ruhiger Moment) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .rise {
    animation: rise 0.9s var(--ease-out) both;
  }

  .rise--2 {
    animation-delay: 0.12s;
  }

  .rise--3 {
    animation-delay: 0.28s;
  }

  .rise--4 {
    animation-delay: 0.42s;
  }

  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(14px);
    }

    to {
      opacity: 1;
      transform: none;
    }
  }
}

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

  .btn {
    transition: none;
  }
}
