/* ==========================================================================
   ANU Subs – Webseite
   Alle Design-Werte als Variablen. Keine externen Einbindungen.
   ========================================================================== */

/* ---------- Schriften (lokal, Open Font License) ---------- */

@font-face {
  font-family: "Cormorant Garamond";
  src: url("/fonts/cormorant-garamond-300.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

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

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

/* ---------- Design-Variablen ---------- */

:root {
  /* Farben */
  --color-bg: #030305;
  --color-text: #ffffff;
  --color-text-muted: #9a9aa5;
  --color-gold: #e9a25a;
  --color-gold-light: #ffd27a;
  --color-bronze: #c76b2e;
  --color-violet: #6f4dff;
  --color-violet-light: #8a70ff; /* für kleinen Text und Links */
  --color-turquoise: #2fcfbf;
  --color-turquoise-light: #5ce8d8;
  --color-surface: rgba(255, 255, 255, 0.04);
  --color-border: rgba(255, 255, 255, 0.08);
  --color-header-bg: rgba(3, 3, 5, 0.72);     /* halbtransparent, mit Unschärfe */
  --color-phone-frame: #16161c;                /* neutraler Gerät-Rahmen */
  --color-aura-gold: rgba(233, 162, 90, 0.30); /* Gold, nur hinter dem iPhone */
  --color-aura-violet: rgba(111, 77, 255, 0.34); /* Violett, nur hinter dem iPhone */

  /* Schriften */
  --font-title: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --font-text: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --weight-title: 300;
  --weight-text: 400;
  --weight-strong: 600;

  /* Schriftgrössen (mobile first, wachsen mit dem Bildschirm) */
  --size-small: 0.875rem;
  --size-base: 1.0625rem;
  --size-lead: clamp(1.125rem, 1rem + 0.6vw, 1.3rem);
  --size-h1: clamp(2.75rem, 2rem + 4vw, 4.75rem);
  --size-h2: clamp(2rem, 1.6rem + 2vw, 3rem);
  --size-h3: 1.5rem;
  --size-display: clamp(3.25rem, 1.6rem + 6.6vw, 8rem);     /* Startseite: H1 */
  --size-statement: clamp(2.6rem, 1.5rem + 4.6vw, 6rem);    /* Startseite: Leitsätze */
  --size-chapter: clamp(2.4rem, 1.5rem + 3.6vw, 4.75rem);   /* Startseite: Abschnittstitel */

  /* Abstände */
  --space-xs: 0.5rem;
  --space-s: 1rem;
  --space-m: 1.5rem;
  --space-l: 2.5rem;
  --space-xl: 4rem;
  --space-xxl: clamp(5rem, 4rem + 5vw, 8rem);

  /* Layout */
  --width-content: 68rem;
  --gutter: 1.25rem;
  --radius: 1.25rem;
  --radius-pill: 999px;
  --header-height: 3.5rem;
  --ratio-screenshot: 1290 / 2796; /* App-Store-Screenshot (6,9-Zoll-iPhone) */
}

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

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

html {
  scroll-padding-top: var(--header-height); /* Sprungziele nicht unter der Kopfzeile */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  color-scheme: dark;
}

/* Sanft scrollen nur, wenn «Bewegung reduzieren» aus ist */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

[id] {
  scroll-margin-top: var(--space-m);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-text);
  font-weight: var(--weight-text);
  font-size: var(--size-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
}

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

h1,
h2,
h3 {
  font-family: var(--font-title);
  font-variant-numeric: lining-nums;
  font-weight: var(--weight-title);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-s);
}

h1 { font-size: var(--size-h1); }
h2 { font-size: var(--size-h2); }
h3 { font-size: var(--size-h3); }

p {
  margin: 0 0 var(--space-s);
}

a {
  color: var(--color-violet-light);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--color-text);
}

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

.container {
  width: 100%;
  max-width: var(--width-content);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.text-width {
  max-width: 65ch; /* angenehme Zeilenbreite für lange Texte */
}

.muted {
  color: var(--color-text-muted);
}

/* Nur für Screenreader sichtbar */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: var(--gutter);
  top: var(--space-s);
  z-index: 200;
  padding: var(--space-xs) var(--space-s);
  background: var(--color-text);
  color: var(--color-bg);
}

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

/* Fix oben. Ohne Unschärfe-Unterstützung: deckend dunkel. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .site-header {
    background: var(--color-header-bg);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
  }
}

.site-header .container {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-s);
}

/* Schriftzug «ANU SUBS» (Kopie aus der App). Nie schmaler als 180 px, sonst werden die Linien zu dünn. */
.logo {
  display: inline-flex;
  flex: none;
  border-radius: 4px;
  transition: opacity 0.2s ease;
}

.logo img {
  height: 0.875rem; /* 14 px, ca. 197 px breit */
  width: auto;
}

.logo:hover {
  opacity: 0.75;
}

.logo:focus-visible {
  outline: 2px solid var(--color-turquoise);
  outline-offset: 6px;
}

@media (min-width: 52rem) {
  .logo img {
    height: 1.0625rem; /* 17 px, ca. 239 px breit */
  }
}

.header-nav {
  display: flex;
  gap: var(--space-m);
}

/* Auf schmalen iPhones reicht der Platz nicht für beide Links */
@media (max-width: 25.99rem) {
  .nav-wide {
    display: none;
  }
}

.header-nav a {
  font-size: var(--size-small);
  color: var(--color-text-muted);
  text-decoration: none;
  white-space: nowrap;
}

.header-nav a:hover {
  color: var(--color-text);
}

/* ---------- Fusszeile ---------- */

.site-footer {
  margin-top: var(--space-xxl);
  padding-block: var(--space-l);
  border-top: 1px solid var(--color-border);
  font-size: var(--size-small);
  color: var(--color-text-muted);
}

.site-footer .container {
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-m);
}

.footer-nav a {
  color: var(--color-text-muted);
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--color-text);
}

@media (min-width: 40rem) {
  .site-footer .container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

/* ---------- Knopf ---------- */

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.95rem 1.6rem;
  border-radius: var(--radius-pill);
  background: var(--color-violet);
  color: var(--color-text);
  font-weight: var(--weight-strong);
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.button:hover {
  background: var(--color-violet-light);
  color: var(--color-text);
}

.button:active {
  transform: scale(0.98);
}

.button svg {
  width: 1.15em;
  height: 1.15em;
  fill: currentColor;
}

/* ==========================================================================
   Startseite (W2b, Apple-Stil)
   Ein Gedanke pro Abschnitt. Die Aura gibt es nur hinter dem iPhone.
   ========================================================================== */

/* Überzeile: klein, farbig, normale Schreibweise */
.overline {
  margin: 0 0 var(--space-s);
  font-size: var(--size-lead);
  font-weight: var(--weight-strong);
  line-height: 1.3;
}

.overline--gold { color: var(--color-gold); }
.overline--violet { color: var(--color-violet-light); }
.overline--turquoise { color: var(--color-turquoise-light); }

/* «Mehr erfahren ›» */
.more {
  display: inline-block;
  font-size: var(--size-lead);
  text-decoration: none;
}

.more:hover {
  text-decoration: underline;
}

.more span[aria-hidden] {
  display: inline-block;
  transition: transform 0.2s ease;
}

.more:hover span[aria-hidden] {
  transform: translateX(2px);
}

/* ---------- iPhone-Rahmen ---------- */

/* Neutraler Rahmen. Der Bildbereich hat genau das Format der App-Store-Screenshots. */
.phone {
  padding: 0.5rem;
  border-radius: 2.75rem;
  background: var(--color-phone-frame);
  box-shadow: 0 0 0 1px var(--color-border), 0 2rem 4rem rgba(0, 0, 0, 0.6);
}

.phone img {
  width: 100%;
  height: auto;
  aspect-ratio: var(--ratio-screenshot);
  object-fit: cover;
  border-radius: 2.25rem;
}

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

.hero {
  padding-top: var(--space-xl);
  text-align: center;
  overflow: hidden;
}

.hero h1 {
  max-width: 12ch;
  margin: 0 auto;
  font-size: var(--size-display);
  line-height: 1;
}

.hero .lead {
  max-width: 34rem;
  margin: var(--space-m) auto var(--space-l);
  font-size: var(--size-lead);
  color: var(--color-text-muted);
}

.hero .note {
  margin: var(--space-s) 0 0;
  font-size: var(--size-small);
  color: var(--color-text-muted);
}

/* Das iPhone mit der Aura. Steht unter dem Text, damit die Aura nie hinter Text liegt. */
.hero-device {
  position: relative;
  isolation: isolate;
  width: min(68vw, 20rem);
  margin: var(--space-xxl) auto 0;
  padding-bottom: var(--space-xxl);
}

.hero-device::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 8% -55% 0;
  background:
    radial-gradient(closest-side at 35% 45%, var(--color-aura-gold), transparent),
    radial-gradient(closest-side at 65% 60%, var(--color-aura-violet), transparent);
  pointer-events: none;
}

/* ---------- Leitsatz und Kapitel ---------- */

.statement,
.chapter {
  padding-block: var(--space-xxl);
  text-align: center;
}

.statement h2 {
  max-width: 14ch;
  margin: 0 auto;
  font-size: var(--size-statement);
  line-height: 1.02;
}

.chapter h3 {
  margin: 0 auto var(--space-m);
  font-size: var(--size-chapter);
  line-height: 1.05;
}

.chapter-text {
  max-width: 32rem;
  margin: 0 auto var(--space-m);
  font-size: var(--size-lead);
  color: var(--color-text-muted);
}

/* Am grösseren Bildschirm füllen die Abschnitte fast die ganze Höhe */
@media (min-width: 52rem) {
  .statement,
  .chapter {
    min-height: 85svh;
    display: grid;
    place-content: center;
  }
}

/* ---------- So funktioniert's ---------- */

.steps-section {
  padding-block: var(--space-xxl);
}

.steps-section h2 {
  margin: 0 0 var(--space-xl);
  font-size: var(--size-statement);
  line-height: 1.02;
  text-align: center;
}

.steps {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 24rem;
  display: grid;
  gap: var(--space-xl);
  text-align: center;
}

.step h3 {
  margin-bottom: var(--space-xs);
  font-size: 1.85rem;
}

.step p {
  margin: 0;
  color: var(--color-text-muted);
}

.step-number {
  display: block;
  margin-bottom: var(--space-s);
  font-family: var(--font-title);
  font-variant-numeric: lining-nums;
  font-weight: var(--weight-title);
  font-size: 4.5rem;
  line-height: 1;
}

.step:nth-child(1) .step-number { color: var(--color-gold); }
.step:nth-child(2) .step-number { color: var(--color-turquoise-light); }
.step:nth-child(3) .step-number { color: var(--color-violet-light); }

@media (min-width: 52rem) {
  .steps {
    max-width: none;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-l);
  }
}

/* ---------- Einblick: wischbare Galerie ---------- */

.gallery-section {
  padding-block: var(--space-xxl);
}

.gallery-section h2 {
  margin: 0 0 var(--space-xl);
  font-size: var(--size-statement);
  line-height: 1.02;
  text-align: center;
}

.gallery {
  list-style: none;
  margin: 0;
  padding: var(--space-s) var(--gutter) var(--space-l);
  display: flex;
  gap: var(--space-m);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  -webkit-overflow-scrolling: touch;
}

.gallery .phone {
  flex: 0 0 68%;
  max-width: 17rem;
  scroll-snap-align: center;
}

@media (min-width: 52rem) {
  .gallery {
    justify-content: center;
    overflow: visible;
  }

  .gallery .phone {
    flex: 0 1 17rem;
  }
}

/* ---------- Abschluss ---------- */

.closing {
  padding-block: var(--space-xxl) var(--space-xl);
  text-align: center;
}

.closing h2 {
  margin: 0 0 var(--space-m);
  font-size: var(--size-statement);
  line-height: 1.02;
}

.closing p {
  max-width: 30rem;
  margin: 0 auto var(--space-l);
  font-size: var(--size-lead);
  color: var(--color-text-muted);
}

/* ---------- Bewegung (nur CSS) ----------
   Ohne Unterstützung oder bei «Bewegung reduzieren» ist alles sofort sichtbar.
   Der unsichtbare Startzustand steht nur innerhalb dieser Bedingungen. */

@media (prefers-reduced-motion: no-preference) {
  /* Einmal beim Laden: Text, dann das iPhone mit der Aura */
  @keyframes rise-in {
    from { opacity: 0; transform: translateY(1.5rem); }
    to { opacity: 1; transform: none; }
  }

  .hero-intro > * {
    animation: rise-in 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .hero-intro > :nth-child(2) { animation-delay: 0.08s; }
  .hero-intro > :nth-child(3) { animation-delay: 0.16s; }
  .hero-intro > :nth-child(4) { animation-delay: 0.24s; }
  .hero-intro > :nth-child(5) { animation-delay: 0.3s; }

  .hero-device {
    animation: rise-in 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) 0.35s both;
  }

  /* Beim Scrollen: ruhiges Einblenden */
  @supports (animation-timeline: view()) {
    @keyframes reveal {
      from { opacity: 0; transform: translateY(2rem); }
      to { opacity: 1; transform: none; }
    }

    .reveal {
      animation: reveal linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 70%;
    }
  }
}

/* ---------- Textseiten (Support, Datenschutz, Impressum) ----------
   Lesbarkeit zuerst: linksbündig, ca. 65 Zeichen pro Zeile, keine Bewegung, keine Aura. */

.page {
  padding-block: var(--space-xxl) 0;
}

.page h1 {
  margin-bottom: var(--space-m);
  font-size: var(--size-chapter);
  line-height: 1.05;
  /* Lange Wörter wie «Datenschutzerklärung» trennen statt über den Rand ragen */
  -webkit-hyphens: auto;
  hyphens: auto;
  overflow-wrap: break-word;
}

.page h2 {
  margin: var(--space-xxl) 0 var(--space-m);
  font-size: var(--size-h2);
}

/* Rechtstexte: Abschnitte klar getrennt, etwas mehr Zeilenabstand */
.legal section {
  margin-top: var(--space-xl);
  padding-top: var(--space-l);
  border-top: 1px solid var(--color-border);
}

.legal h2 {
  margin: 0 0 var(--space-m);
  font-size: clamp(1.75rem, 1.5rem + 1vw, 2.25rem);
}

.legal h3 {
  margin: var(--space-l) 0 var(--space-xs);
  font-family: var(--font-text);
  font-weight: var(--weight-strong);
  font-size: 1.125rem;
  line-height: 1.4;
  letter-spacing: 0;
}

.legal p {
  line-height: 1.75;
}

/* Lange Links (z. B. Datenschutzerklärung von Cloudflare) dürfen umbrechen */
.legal a {
  overflow-wrap: anywhere;
}

/* Platzhalter in [eckigen Klammern], die noch ersetzt werden müssen */
.todo {
  color: var(--color-gold);
  text-decoration: underline dashed var(--color-gold);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

/* Hinweis «Entwurf» – vor dem Livegang entfernen */
.draft-note {
  display: flex;
  align-items: center;
  gap: 0.6em;
  width: fit-content;
  margin: 0 0 var(--space-l);
  padding: 0.5rem 1rem;
  border: 1px solid var(--color-bronze);
  border-radius: var(--radius-pill);
  color: var(--color-gold-light);
  font-size: var(--size-small);
  font-weight: var(--weight-strong);
  line-height: 1.4;
}

.draft-note::before {
  content: "";
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--color-bronze);
}

.contact-card {
  margin-block: var(--space-xl);
  padding: var(--space-m);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
}

.contact-card p {
  margin: 0;
}

.contact-card .email {
  display: inline-block;
  margin-top: var(--space-xs);
  font-size: var(--size-lead);
  font-weight: var(--weight-strong);
  overflow-wrap: anywhere; /* nur trennen, wenn es wirklich nicht passt */
}

@media (min-width: 40rem) {
  .contact-card {
    padding: var(--space-l);
  }
}

/* Häufige Fragen: <details> statt JavaScript. Jede Frage hat eine feste id als Sprungziel. */

.faq {
  border-top: 1px solid var(--color-border);
}

.faq details {
  border-bottom: 1px solid var(--color-border);
}

.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-m);
  padding-block: var(--space-m);
  cursor: pointer;
  list-style: none;
  font-size: var(--size-lead);
  font-weight: var(--weight-strong);
  line-height: 1.4;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  flex: none;
  font-family: var(--font-title);
  font-variant-numeric: lining-nums;
  font-size: 2rem;
  line-height: 1;
  color: var(--color-gold);
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

/* Angesprungene Frage (z. B. /support/#erinnerungen) */
.faq details:target summary {
  color: var(--color-gold-light);
}

.faq details p {
  margin: 0;
  padding-bottom: var(--space-m);
  color: var(--color-text-muted);
}

/* ---------- 404 ---------- */

.not-found {
  min-height: 70svh;
  display: grid;
  place-content: center;
  padding-block: var(--space-xxl);
  text-align: center;
}

.not-found .code {
  margin: 0 0 var(--space-s);
  font-family: var(--font-title);
  font-variant-numeric: lining-nums;
  font-weight: var(--weight-title);
  font-size: clamp(6rem, 4rem + 9vw, 11rem);
  line-height: 1;
  color: var(--color-gold);
}

.not-found h1 {
  font-size: var(--size-chapter);
  line-height: 1.05;
}

.not-found p {
  max-width: 30rem;
  margin: 0 auto var(--space-l);
  font-size: var(--size-lead);
  color: var(--color-text-muted);
}

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

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
