/* ============================================================
   nicos-apps.de - Design-System
   Hell, freundlich, modern. System-Fonts, keine externen Requests.
   ============================================================ */

:root {
  --bg: #f8f8fb;
  --surface: #ffffff;
  --ink: #17171f;
  --ink-soft: #3f3f4b;
  --muted: #6a6a76;
  --line: #e8e8f0;
  --accent: #4f46e5;
  --accent-deep: #3b34c4;
  --accent-soft: #eef0ff;
  --amber: #f59e0b;
  --coral: #fb7185;
  --sky: #0ea5e9;
  --mint: #10b981;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(23, 23, 31, 0.05), 0 4px 16px rgba(23, 23, 31, 0.05);
  --shadow-md: 0 2px 6px rgba(23, 23, 31, 0.06), 0 18px 44px rgba(23, 23, 31, 0.1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-display: ui-rounded, -apple-system, BlinkMacSystemFont, "SF Pro Display",
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --container: 1120px;
}

/* ---------- Reset & Basis ---------- */

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

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

body {
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-deep);
}

::selection {
  background: var(--accent);
  color: #fff;
}

:focus-visible {
  outline: 3px solid rgba(79, 70, 229, 0.45);
  outline-offset: 2px;
  border-radius: 4px;
}

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
  color: #fff;
}

/* ---------- Header / Navigation ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 248, 251, 0.82);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-block: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent) 0%, #7c6cf0 100%);
  display: grid;
  place-items: center;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

.brand-mark svg {
  width: 18px;
  height: 18px;
}

.brand small {
  display: block;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1;
}

.brand-text {
  line-height: 1.15;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  flex-wrap: wrap;
}

.site-nav a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: background 0.18s ease, color 0.18s ease;
}

.site-nav a:hover {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.site-nav a[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.site-nav .nav-cta {
  background: var(--ink);
  color: #fff;
  margin-left: 6px;
}

.site-nav .nav-cta:hover {
  background: var(--accent);
  color: #fff;
}

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

.hero {
  position: relative;
  overflow: clip;
  padding: clamp(72px, 12vw, 128px) 0 clamp(56px, 9vw, 104px);
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% -30% auto -30%;
  height: 720px;
  background:
    radial-gradient(42% 46% at 22% 34%, rgba(79, 70, 229, 0.14), transparent 70%),
    radial-gradient(36% 42% at 74% 22%, rgba(14, 165, 233, 0.12), transparent 70%),
    radial-gradient(30% 36% at 58% 62%, rgba(245, 158, 11, 0.1), transparent 70%);
  pointer-events: none;
}

.hero .container {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(32px, 6vw, 72px);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 16px 7px 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
  box-shadow: var(--shadow-sm);
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.18);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.4vw, 3.9rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin-top: 26px;
}

.u-squiggle {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 12' preserveAspectRatio='none'%3E%3Cpath d='M2 8 Q 20 2 40 7 T 78 6 T 118 5' fill='none' stroke='%23f5a30b' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 0 96%;
  background-size: 100% 0.32em;
  padding-bottom: 0.14em;
}

.hero-lead {
  margin-top: 22px;
  font-size: clamp(1.08rem, 1.6vw, 1.22rem);
  color: var(--ink-soft);
  max-width: 34rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease,
    background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.btn svg {
  width: 17px;
  height: 17px;
  transition: transform 0.18s ease;
}

.btn:hover svg {
  transform: translateX(3px);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 22px rgba(79, 70, 229, 0.32);
}

.btn-primary:hover {
  background: var(--accent-deep);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(79, 70, 229, 0.38);
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  color: var(--accent-deep);
  border-color: #d4d4e2;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ---------- Hero-Visual (schwebende App-Kacheln) ---------- */

.hero-visual {
  position: relative;
  min-height: 380px;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 8% 4%;
  border-radius: 48% 52% 55% 45% / 45% 48% 52% 55%;
  background: linear-gradient(140deg, rgba(79, 70, 229, 0.12), rgba(14, 165, 233, 0.1));
}

.tile {
  position: absolute;
  display: grid;
  place-items: center;
  border-radius: 26%;
  box-shadow: var(--shadow-md);
  animation: float 7s ease-in-out infinite;
}

.tile svg {
  width: 46%;
  height: 46%;
  color: #fff;
}

.tile-1 {
  width: 128px;
  height: 128px;
  top: 6%;
  left: 12%;
  background: linear-gradient(140deg, var(--accent), #7c6cf0);
  transform: rotate(-7deg);
}

.tile-2 {
  width: 96px;
  height: 96px;
  top: 38%;
  right: 8%;
  background: linear-gradient(140deg, var(--coral), #fda4af);
  transform: rotate(9deg);
  animation-delay: -2.4s;
}

.tile-3 {
  width: 76px;
  height: 76px;
  bottom: 10%;
  left: 30%;
  background: linear-gradient(140deg, var(--amber), #fbbf24);
  transform: rotate(-11deg);
  animation-delay: -4.8s;
}

.tile-4 {
  width: 60px;
  height: 60px;
  top: 2%;
  right: 30%;
  background: linear-gradient(140deg, var(--sky), #38bdf8);
  transform: rotate(13deg);
  animation-delay: -1.2s;
}

.hero-card {
  position: absolute;
  bottom: 4%;
  right: 12%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  transform: rotate(-2deg);
  animation: float 8s ease-in-out infinite;
  animation-delay: -3s;
}

.hero-card .check {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.14);
  display: grid;
  place-items: center;
  color: var(--mint);
  flex: none;
}

.hero-card .check svg {
  width: 18px;
  height: 18px;
}

.hero-card strong {
  display: block;
  font-size: 0.92rem;
  line-height: 1.3;
}

.hero-card span {
  font-size: 0.8rem;
  color: var(--muted);
}

@keyframes float {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -14px;
  }
}

/* ---------- Sektionen ---------- */

.section {
  padding: clamp(64px, 9vw, 110px) 0;
}

.section-head {
  max-width: 620px;
  margin-bottom: clamp(36px, 5vw, 56px);
}

.section-label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.section-head p {
  margin-top: 14px;
  color: var(--muted);
  font-size: 1.08rem;
}

/* ---------- App-Karten ---------- */

.apps-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.app-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.app-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: #dcdce8;
}

.app-icon {
  width: 58px;
  height: 58px;
  border-radius: 17px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  transition: transform 0.25s ease;
}

.app-card:hover .app-icon {
  transform: rotate(-6deg) scale(1.06);
}

.app-icon svg {
  width: 28px;
  height: 28px;
  color: #fff;
}

.app-icon img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.app-icon.tone-iris {
  background: linear-gradient(140deg, var(--accent), #7c6cf0);
  box-shadow: 0 8px 18px rgba(79, 70, 229, 0.3);
}

.app-icon.tone-coral {
  background: linear-gradient(140deg, var(--coral), #fda4af);
  box-shadow: 0 8px 18px rgba(251, 113, 133, 0.3);
}

.app-icon.tone-sky {
  background: linear-gradient(140deg, var(--sky), #38bdf8);
  box-shadow: 0 8px 18px rgba(14, 165, 233, 0.3);
}

.app-icon.tone-mint {
  background: linear-gradient(140deg, var(--mint), #34d399);
  box-shadow: 0 8px 18px rgba(16, 185, 129, 0.3);
}

.app-card h3 {
  font-family: var(--font-display);
  font-size: 1.32rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 8px;
}

.app-card p {
  color: var(--muted);
  font-size: 0.99rem;
  margin-bottom: 22px;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  font-size: 0.97rem;
  text-decoration: none;
  color: var(--accent);
}

.card-link svg {
  width: 16px;
  height: 16px;
  transition: transform 0.18s ease;
}

.app-card:hover .card-link svg {
  transform: translateX(4px);
}

/* Stretched Link: ganze Karte klickbar, ohne Inline-Styles */
.card-link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.card-link:focus-visible::after {
  outline: 3px solid rgba(79, 70, 229, 0.45);
  outline-offset: 3px;
}

/* ---------- Datenschutz-Band ---------- */

.privacy-band {
  position: relative;
  overflow: hidden;
  background: linear-gradient(120deg, #17171f 0%, #23233a 100%);
  color: #fff;
  border-radius: 32px;
  padding: clamp(36px, 6vw, 64px);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(24px, 4vw, 48px);
}

.privacy-band::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(40% 60% at 85% 20%, rgba(79, 70, 229, 0.35), transparent 70%),
    radial-gradient(30% 50% at 10% 90%, rgba(14, 165, 233, 0.22), transparent 70%);
  pointer-events: none;
}

.privacy-band > * {
  position: relative;
}

.privacy-band .shield {
  width: 74px;
  height: 74px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.1);
  display: grid;
  place-items: center;
  flex: none;
}

.privacy-band .shield svg {
  width: 38px;
  height: 38px;
  color: #a5b4fc;
}

.privacy-band h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.privacy-band p {
  color: rgba(255, 255, 255, 0.78);
  max-width: 44rem;
  font-size: 1rem;
}

.privacy-band .btn {
  flex: none;
}

.privacy-band .btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
  box-shadow: none;
}

.privacy-band .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

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

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 40px 0 48px;
  background: var(--surface);
}

.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-note {
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-note strong {
  color: var(--ink-soft);
  font-weight: 600;
}

.footer-links {
  display: flex;
  gap: 6px;
  list-style: none;
  flex-wrap: wrap;
}

.footer-links a {
  display: inline-block;
  padding: 7px 13px;
  border-radius: 999px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: background 0.18s ease, color 0.18s ease;
}

.footer-links a:hover {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

/* ---------- Rechtstexte (Prose) ---------- */

.page-main {
  flex: 1;
  padding: clamp(48px, 8vw, 88px) 0 clamp(72px, 9vw, 110px);
}

.prose {
  max-width: 46rem;
}

.backlink {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.94rem;
  color: var(--muted);
  margin-bottom: 30px;
  transition: color 0.18s ease;
}

.backlink svg {
  width: 15px;
  height: 15px;
  transition: transform 0.18s ease;
}

.backlink:hover {
  color: var(--accent-deep);
}

.backlink:hover svg {
  transform: translateX(-3px);
}

.prose h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.12;
  margin-bottom: 18px;
}

.prose .updated {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 40px;
}

.prose h2 {
  font-family: var(--font-display);
  font-size: 1.42rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 44px 0 14px;
}

.prose h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 28px 0 10px;
}

.prose p,
.prose ul,
.prose ol {
  margin-bottom: 16px;
  color: var(--ink-soft);
}

.prose ul,
.prose ol {
  padding-left: 24px;
}

.prose li {
  margin-bottom: 7px;
}

.prose address {
  font-style: normal;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 22px 26px;
  margin: 18px 0 24px;
  line-height: 1.8;
  box-shadow: var(--shadow-sm);
}

.prose address strong {
  font-size: 1.06rem;
}

.notice {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--accent-soft);
  border: 1px solid #dcdffc;
  border-radius: var(--radius-md);
  padding: 22px 24px;
  margin: 26px 0 34px;
}

.notice svg {
  width: 26px;
  height: 26px;
  color: var(--accent);
  flex: none;
  margin-top: 2px;
}

.notice strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
}

.notice p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

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

.error-hero {
  text-align: center;
  padding: clamp(80px, 14vw, 150px) 0;
}

.error-code {
  font-family: var(--font-display);
  font-size: clamp(4.5rem, 14vw, 8rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  background: linear-gradient(120deg, var(--accent), var(--sky));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.error-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 18px 0 12px;
}

.error-hero p {
  color: var(--muted);
  max-width: 30rem;
  margin: 0 auto 32px;
}

/* ---------- Scroll-Reveal ---------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

[data-reveal="1"] { transition-delay: 0.08s; }
[data-reveal="2"] { transition-delay: 0.16s; }
[data-reveal="3"] { transition-delay: 0.24s; }

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

@media (max-width: 900px) {
  .hero .container {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: 320px;
    max-width: 460px;
  }

  .privacy-band {
    grid-template-columns: 1fr;
    text-align: left;
  }
}

@media (max-width: 640px) {
  .apps-grid {
    grid-template-columns: 1fr;
  }

  .site-nav ul {
    gap: 2px;
  }

  .site-nav a {
    padding: 7px 11px;
    font-size: 0.9rem;
  }

  .hero-visual {
    min-height: 280px;
  }

  .tile-1 { width: 104px; height: 104px; }
  .tile-2 { width: 80px; height: 80px; }
}

/* ---------- Reduced Motion ---------- */

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
