/* ============================================================
   Nomocard – Landing Page
   Vanilla CSS · Design-Tokens nach AGENTS.md · Mobile first
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --color-bg: #fafafa;
  --color-card: #ffffff;
  --color-text: #111111;
  --color-muted: #6b7280;
  --color-border: #e5e7eb;
  --color-accent: #2563eb;
  --color-accent-soft: #dbeafe;
  --color-accent-hover: #1d4ed8;

  --radius-btn: 14px;
  --radius-input: 16px;
  --radius-card: 24px;
  --radius-wallet: 32px;

  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-6: 48px;
  --space-8: 64px;
  --space-12: 96px;
  --space-16: 128px;

  --shadow-sm: 0 1px 2px rgba(17, 17, 17, 0.04), 0 2px 8px rgba(17, 17, 17, 0.04);
  --shadow-md: 0 2px 6px rgba(17, 17, 17, 0.05), 0 16px 40px -8px rgba(17, 17, 17, 0.12);
  --shadow-phone: 0 2px 8px rgba(17, 17, 17, 0.1), 0 48px 96px -24px rgba(17, 17, 17, 0.35);

  --font:
    -apple-system, 'SF Pro Display', 'SF Pro Text', 'Segoe UI', system-ui, Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  font-family: var(--font);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 18px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
}

h1,
h2,
h3 {
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.5rem, 7vw, 4rem);
}

h2 {
  font-size: clamp(1.75rem, 4.5vw, 2.5rem);
}

h3 {
  font-size: 1.125rem;
  line-height: 1.4;
}

p {
  max-width: 65ch;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: var(--space-3);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  padding: 14px 28px;
  border-radius: var(--radius-btn);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid transparent;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
  cursor: pointer;
}

.btn-primary {
  background: var(--color-text);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: #2b2b2b;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--color-card);
  color: var(--color-text);
  border-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  border-color: #c9cdd4;
  transform: translateY(-1px);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 0.9375rem;
}

.btn-lg {
  padding: 18px 36px;
  font-size: 1.0625rem;
}

.btn-icon {
  width: 20px;
  height: 20px;
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease,
    backdrop-filter 0.3s ease;
}

.nav.scrolled {
  background: rgba(255, 255, 255, 0.8);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--color-border);
}

.nav-inner {
  max-width: 1120px;
  margin-inline: auto;
  padding: var(--space-2) var(--space-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.nav-logo {
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 1rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--color-text);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0;
}

.nav-links {
  display: none;
  gap: var(--space-4);
}

.nav-links a {
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-muted);
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--color-text);
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
}

/* ---------- Sections ---------- */
.section {
  padding-block: var(--space-12);
}

.section-alt {
  background: var(--color-card);
  border-block: 1px solid var(--color-border);
}

.section-head {
  text-align: center;
  margin-bottom: var(--space-8);
}

.section-head p {
  margin-top: var(--space-2);
  color: var(--color-muted);
  margin-inline: auto;
}

.eyebrow {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-accent);
  margin-bottom: var(--space-2);
}

/* ---------- Hero ---------- */
.hero {
  padding-block: calc(88px + var(--space-8)) var(--space-12);
  background:
    radial-gradient(900px 480px at 82% -10%, #edf1f7 0%, rgba(237, 241, 247, 0) 65%),
    radial-gradient(700px 420px at -10% 40%, #f1f3f6 0%, rgba(241, 243, 246, 0) 60%);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-card);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-muted);
  margin-bottom: var(--space-3);
  box-shadow: var(--shadow-sm);
}

.hero-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
}

.hero-grid {
  display: grid;
  gap: var(--space-8);
  align-items: center;
}

.hero-sub {
  margin-top: var(--space-3);
  color: var(--color-muted);
  font-size: 1.125rem;
}

.hero-points {
  list-style: none;
  margin-top: var(--space-3);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-2);
  font-weight: 600;
  font-size: 1rem;
}

.hero-points li::before {
  content: '✓';
  color: var(--color-accent);
  margin-right: 6px;
}

.hero-actions {
  margin-top: var(--space-4);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

/* ---------- iPhone Mockup ---------- */
.hero-visual {
  display: flex;
  justify-content: center;
  position: relative;
}

.hero-visual::before {
  content: '';
  position: absolute;
  inset: 8% -4%;
  background: radial-gradient(closest-side, rgba(37, 99, 235, 0.07), transparent 70%);
  border-radius: 50%;
}

.phone {
  position: relative;
  width: min(310px, 82vw);
  aspect-ratio: 9 / 19.4;
  background: linear-gradient(150deg, #48484c 0%, #1a1a1e 45%, #2e2e33 100%);
  border-radius: 54px;
  padding: 9px;
  box-shadow: var(--shadow-phone);
}

/* Rahmen-Glanzkante */
.phone::before {
  content: '';
  position: absolute;
  inset: 2.5px;
  border-radius: 51px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  pointer-events: none;
  z-index: 3;
}

/* Seitentasten */
.phone-btn {
  position: absolute;
  width: 3px;
  background: linear-gradient(90deg, #3a3a3e, #1c1c20);
  border-radius: 2px;
}

.phone-btn-mute {
  left: -3px;
  top: 15%;
  height: 26px;
}

.phone-btn-volup {
  left: -3px;
  top: 23%;
  height: 44px;
}

.phone-btn-voldown {
  left: -3px;
  top: 31%;
  height: 44px;
}

.phone-btn-power {
  right: -3px;
  top: 25%;
  height: 68px;
}

.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #eef0f5 0%, #e7eaf1 100%);
  border-radius: 45px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Statusbar mit Dynamic Island */
.phone-statusbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 12px 26px 0;
  color: #111;
}

.phone-time {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.phone-island {
  width: 86px;
  height: 25px;
  background: #000;
  border-radius: 999px;
  box-shadow: inset 0 0 2px rgba(255, 255, 255, 0.08);
}

.phone-status-icons {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.phone-status-icons svg {
  height: 11px;
  width: auto;
}

.phone-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 14px;
}

/* ---------- Apple-Wallet-Pass ---------- */
.pass {
  --card-accent: #3e2c23;
  width: 100%;
  background-color: var(--card-accent);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0) 42%);
  color: #fff;
  border-radius: 16px;
  padding: 18px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.18),
    0 16px 32px -8px rgba(0, 0, 0, 0.3);
  transition: background-color 0.3s ease;
}

.pass-top {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.pass-logo {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

.pass-brand-name {
  flex: 1;
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pass-label {
  display: block;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.65;
  line-height: 1.4;
}

.pass-primary-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.pass-header-value {
  display: block;
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.pass-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pass-stamps {
  display: flex;
  gap: 6px;
}

.stamp {
  flex: 1;
  aspect-ratio: 1;
  max-width: 22px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  background: transparent;
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease;
}

.stamp.filled {
  background: #fff;
  border-color: #fff;
}

.pass-reward {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.45;
  max-width: none;
}

.pass-barcode {
  display: flex;
  justify-content: center;
  margin-top: 2px;
}

.pass-qr {
  display: inline-flex;
  background: #fff;
  border-radius: 10px;
  padding: 9px;
}

.pass-qr svg {
  width: 86px;
  height: 86px;
  color: #111;
}

/* Float-Animation (dezent) */
@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.float {
  animation: float 7s ease-in-out infinite;
}

/* ---------- Cards / Grids ---------- */
.grid-3 {
  display: grid;
  gap: var(--space-3);
}

@media (min-width: 700px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card h3 {
  margin-bottom: var(--space-1);
}

.card p {
  font-size: 0.9375rem;
  color: var(--color-muted);
  line-height: 1.7;
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  margin-bottom: var(--space-2);
}

.card-icon svg {
  width: 24px;
  height: 24px;
  color: var(--color-text);
}

/* ---------- Steps / Timeline ---------- */
.steps {
  list-style: none;
  display: grid;
  gap: var(--space-6);
  counter-reset: step;
  position: relative;
}

.step {
  position: relative;
  text-align: center;
  padding-inline: var(--space-2);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-text);
  color: #fff;
  font-weight: 700;
  font-size: 0.9375rem;
  margin-bottom: var(--space-2);
  position: relative;
  z-index: 1;
}

.step-icon {
  display: none;
}

.step h3 {
  margin-bottom: var(--space-1);
}

.step p {
  font-size: 0.9375rem;
  color: var(--color-muted);
  line-height: 1.7;
  margin-inline: auto;
}

@media (min-width: 800px) {
  .steps {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-3);
  }

  /* Verbindungslinie */
  .steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 12.5%;
    right: 12.5%;
    height: 1px;
    background: var(--color-border);
  }
}

/* ---------- Interaktive Demo ---------- */
.demo {
  display: grid;
  gap: var(--space-4);
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
}

@media (min-width: 850px) {
  .demo {
    grid-template-columns: 1fr 1fr;
    padding: var(--space-6);
    gap: var(--space-8);
  }
}

.demo-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.demo-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.demo-field label,
.demo-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.demo-field input[type='text'] {
  font: inherit;
  font-size: 1rem;
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-input);
  background: var(--color-bg);
  color: var(--color-text);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.demo-field input[type='text']:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-soft);
}

.demo-swatches {
  display: flex;
  gap: var(--space-1);
}

.swatch {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid transparent;
  outline-offset: 3px;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.swatch:hover {
  transform: scale(1.08);
}

.swatch.active {
  box-shadow:
    0 0 0 2px var(--color-card),
    0 0 0 4px var(--color-text);
}

.demo-field input[type='range'] {
  width: 100%;
  accent-color: var(--color-text);
  cursor: pointer;
}

.demo-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(420px 320px at 50% 30%, rgba(37, 99, 235, 0.05), transparent 70%), var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: var(--space-6) var(--space-3);
  overflow: hidden;
}

.phone-demo {
  width: min(270px, 74vw);
}

/* ---------- Branchen ---------- */
.industries {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-2);
}

@media (min-width: 700px) {
  .industries {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-3);
  }
}

@media (min-width: 1000px) {
  .industries {
    grid-template-columns: repeat(6, 1fr);
  }
}

.industry {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: var(--space-3) var(--space-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  font-size: 0.9375rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.industry:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.industry-icon svg {
  width: 28px;
  height: 28px;
  color: var(--color-text);
}

/* ---------- Kontakt ---------- */
.contact-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding-block: var(--space-4);
}

.contact-inner p {
  color: var(--color-muted);
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-card);
  padding-block: var(--space-6);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  align-items: flex-start;
}

.footer-logo {
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 0.9375rem;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.footer-brand p {
  font-size: 0.875rem;
  color: var(--color-muted);
  margin-top: 4px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--color-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--color-text);
}

.footer-copy {
  font-size: 0.8125rem;
  color: var(--color-muted);
}

@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

/* ---------- Reveal (Fade-in on scroll) ---------- */
html.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

html.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .float {
    animation: none;
  }

  html.js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
