/* =============================================================================
   Einkaufsliste — Website
   Dieselben Tokens wie die App (src/lib/theme.ts): tiefes Schwarz, Haarlinien
   in #222, Schweizer Rot als einziger Akzent.
   ========================================================================== */

:root {
  --ink-950: #0a0a0a;
  --ink-900: #0f0f0f;
  --ink-850: #131313;
  --ink-800: #161616;
  --ink-700: #1c1c1c;
  --ink-600: #222222;
  --ink-500: #2e2e2e;

  --chalk: #fafafa;
  --chalk-muted: #8a8a8a;
  --chalk-faint: #5a5a5a;
  --chalk-ghost: #3a3a3a;

  --accent: #ff3b30;
  --positive: #4ade80;

  --migros: #ff6600;
  --coop: #e2001a;
  --aldi: #00a0e1;
  --lidl: #0050aa;

  --shell: min(1180px, 100% - 48px);
  --radius: 20px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ink-950);
  color: var(--chalk);
  font-family:
    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica,
    Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* ------------------------------------------------------------------ Layout */

.shell {
  width: var(--shell);
  margin-inline: auto;
}

.section {
  padding: clamp(72px, 11vw, 132px) 0;
  position: relative;
}

.section + .section {
  border-top: 1px solid var(--ink-600);
}

.grid {
  display: grid;
  gap: 24px;
}

@media (min-width: 760px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* -------------------------------------------------------------- Typografie */

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

h1 {
  font-size: clamp(42px, 8.5vw, 92px);
}

h2 {
  font-size: clamp(30px, 4.6vw, 52px);
}

h3 {
  font-size: 19px;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

p {
  margin: 0;
  color: var(--chalk-muted);
}

.lead {
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.55;
  max-width: 56ch;
}

.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--chalk-faint);
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.eyebrow::before {
  content: '';
  width: 22px;
  height: 1px;
  background: var(--ink-500);
}

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

.faint {
  color: var(--chalk-faint);
}

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

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

.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: rgba(10, 10, 10, 0.72);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.topbar.scrolled {
  border-bottom-color: var(--ink-600);
  background: rgba(10, 10, 10, 0.92);
}

.topbar__inner {
  width: var(--shell);
  margin-inline: auto;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: 15px;
}

.brand__mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--ink-600);
  background: var(--ink-850);
  display: grid;
  place-items: center;
  flex: none;
}

.brand__mark svg {
  width: 15px;
  height: 15px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav a {
  padding: 8px 13px;
  border-radius: 9px;
  font-size: 14px;
  color: var(--chalk-muted);
  transition: color 0.2s, background 0.2s;
}

.nav a:hover {
  color: var(--chalk);
  background: var(--ink-800);
}

.nav a.active {
  color: var(--chalk);
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--ink-600);
  background: var(--ink-850);
  border-radius: 10px;
  cursor: pointer;
  padding: 0;
  place-items: center;
}

.nav-toggle span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--chalk);
  position: relative;
  transition: transform 0.3s var(--ease), opacity 0.2s;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: '';
  position: absolute;
  left: 0;
  width: 16px;
  height: 1.5px;
  background: var(--chalk);
  transition: transform 0.3s var(--ease);
}

.nav-toggle span::before {
  top: -5px;
}
.nav-toggle span::after {
  top: 5px;
}

body.nav-open .nav-toggle span {
  background: transparent;
}
body.nav-open .nav-toggle span::before {
  transform: translateY(5px) rotate(45deg);
}
body.nav-open .nav-toggle span::after {
  transform: translateY(-5px) rotate(-45deg);
}

@media (max-width: 780px) {
  .nav-toggle {
    display: grid;
  }

  .nav {
    position: fixed;
    inset: 68px 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 24px 24px;
    background: rgba(10, 10, 10, 0.97);
    border-bottom: 1px solid var(--ink-600);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.24s var(--ease), transform 0.24s var(--ease);
  }

  body.nav-open .nav {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .nav a {
    padding: 14px 12px;
    font-size: 16px;
    border-bottom: 1px solid var(--ink-600);
    border-radius: 0;
  }

  .nav .btn {
    margin-top: 14px;
    border-bottom: 0;
    justify-content: center;
  }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 46px;
  padding: 0 22px;
  border-radius: 12px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s var(--ease), background 0.2s, border-color 0.2s,
    color 0.2s;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

.btn--primary {
  background: var(--chalk);
  color: var(--ink-950);
}

.btn--primary:hover {
  background: #fff;
}

.btn--ghost {
  border-color: var(--ink-500);
  color: var(--chalk);
}

.btn--ghost:hover {
  background: var(--ink-800);
  border-color: var(--chalk-ghost);
}

.btn--lg {
  height: 54px;
  padding: 0 28px;
  font-size: 16px;
}

.btn svg {
  width: 17px;
  height: 17px;
  flex: none;
}

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

.hero {
  padding-top: clamp(128px, 17vw, 190px);
  padding-bottom: clamp(72px, 10vw, 120px);
  position: relative;
  overflow: hidden;
}

/* Farbwäsche im Hintergrund – dieselbe Idee wie die Ladenfarben in der App:
   Farbe, die ins Schwarz ausläuft, statt harter Kanten. */
.hero__wash {
  position: absolute;
  inset: -20% -10% auto;
  height: 90%;
  background:
    radial-gradient(52% 62% at 18% 8%, rgba(255, 102, 0, 0.16), transparent 68%),
    radial-gradient(46% 58% at 82% 4%, rgba(226, 0, 26, 0.14), transparent 66%),
    radial-gradient(60% 70% at 50% 0%, rgba(0, 160, 225, 0.08), transparent 72%);
  filter: blur(14px);
  pointer-events: none;
  animation: drift 22s ease-in-out infinite alternate;
}

@keyframes drift {
  from {
    transform: translate3d(-2%, 0, 0) scale(1);
  }
  to {
    transform: translate3d(2%, 2%, 0) scale(1.06);
  }
}

.hero__grid {
  display: grid;
  gap: clamp(48px, 6vw, 72px);
  align-items: center;
  position: relative;
}

@media (min-width: 940px) {
  .hero__grid {
    grid-template-columns: 1.05fr 0.95fr;
  }
}

.hero h1 .line {
  display: block;
  overflow: hidden;
}

.hero h1 .line > span {
  display: block;
  transform: translateY(105%);
  animation: riseIn 0.9s var(--ease) forwards;
}

.hero h1 .line:nth-child(2) > span {
  animation-delay: 0.09s;
}
.hero h1 .line:nth-child(3) > span {
  animation-delay: 0.18s;
}

@keyframes riseIn {
  to {
    transform: translateY(0);
  }
}

.hero__accent {
  color: var(--chalk-faint);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 28px;
  font-size: 13px;
  color: var(--chalk-faint);
}

.hero__meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--positive);
  flex: none;
}

/* ------------------------------------------------------ Telefon-Attrappe */

.phone {
  width: min(310px, 78vw);
  margin-inline: auto;
  aspect-ratio: 310 / 640;
  border-radius: 42px;
  border: 1px solid var(--ink-500);
  background: var(--ink-950);
  padding: 9px;
  position: relative;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03),
    0 40px 90px -30px rgba(0, 0, 0, 0.9);
  animation: float 7s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-11px);
  }
}

.phone__screen {
  height: 100%;
  border-radius: 34px;
  background: var(--ink-950);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

.phone__notch {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 78px;
  height: 20px;
  border-radius: 12px;
  background: #000;
  z-index: 3;
}

.screen__head {
  padding: 34px 18px 14px;
  border-bottom: 1px solid var(--ink-600);
  position: relative;
  overflow: hidden;
}

.screen__wash {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    125deg,
    color-mix(in srgb, var(--store) 26%, transparent),
    color-mix(in srgb, var(--store) 7%, transparent) 55%,
    transparent
  );
  pointer-events: none;
}

.screen__title {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.03em;
  position: relative;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  border: 1px solid color-mix(in srgb, var(--store) 34%, transparent);
  background: color-mix(in srgb, var(--store) 9%, transparent);
  color: var(--store);
  margin-top: 9px;
  position: relative;
}

.badge i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--store);
}

.screen__bar {
  height: 3px;
  border-radius: 3px;
  background: var(--ink-600);
  margin-top: 14px;
  overflow: hidden;
  position: relative;
}

.screen__bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 3px;
  background: var(--store);
  transition: width 1.4s var(--ease);
}

.phone.in .screen__bar span {
  width: 62%;
}

.screen__rows {
  flex: 1;
  overflow: hidden;
}

.row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--ink-600);
  opacity: 0;
  transform: translateY(6px);
  animation: rowIn 0.5s var(--ease) forwards;
}

.phone .row:nth-child(1) {
  animation-delay: 0.5s;
}
.phone .row:nth-child(2) {
  animation-delay: 0.6s;
}
.phone .row:nth-child(3) {
  animation-delay: 0.7s;
}
.phone .row:nth-child(4) {
  animation-delay: 0.8s;
}
.phone .row:nth-child(5) {
  animation-delay: 0.9s;
}

@keyframes rowIn {
  to {
    opacity: 1;
    transform: none;
  }
}

.row__box {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 1.5px solid var(--ink-500);
  flex: none;
  display: grid;
  place-items: center;
  transition: background 0.3s, border-color 0.3s;
}

.row__box svg {
  width: 12px;
  height: 12px;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.25s, transform 0.25s var(--ease);
}

.row.done .row__box {
  background: var(--chalk);
  border-color: var(--chalk);
}

.row.done .row__box svg {
  opacity: 1;
  transform: none;
}

.row__body {
  flex: 1;
  min-width: 0;
}

.row__name {
  font-size: 14px;
  position: relative;
  display: inline-block;
}

.row__name::after {
  content: '';
  position: absolute;
  left: 0;
  top: 52%;
  height: 1.5px;
  width: 0;
  background: var(--chalk-muted);
  transition: width 0.4s var(--ease);
}

.row.done .row__name::after {
  width: 100%;
}

.row.done .row__body,
.row.done .row__price {
  opacity: 0.45;
}

.row__sub {
  font-size: 11px;
  color: var(--chalk-faint);
  margin-top: 2px;
}

.row__price {
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
  flex: none;
}

.screen__foot {
  border-top: 1px solid var(--ink-600);
  background: var(--ink-900);
  padding: 11px 14px 15px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.screen__input {
  flex: 1;
  height: 38px;
  border-radius: 11px;
  border: 1px solid var(--ink-600);
  background: var(--ink-850);
  display: flex;
  align-items: center;
  padding: 0 13px;
  font-size: 13px;
  color: var(--chalk-ghost);
}

.screen__fab {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--store);
  display: grid;
  place-items: center;
  flex: none;
}

.screen__fab svg {
  width: 17px;
  height: 17px;
}

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

.card {
  border: 1px solid var(--ink-600);
  border-radius: var(--radius);
  background: var(--ink-850);
  padding: 26px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.card:hover {
  border-color: var(--ink-500);
  transform: translateY(-3px);
}

/* Farbverlauf statt Farbstrich – dasselbe Prinzip wie in der App. */
.card--wash::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    125deg,
    color-mix(in srgb, var(--store) 22%, transparent),
    color-mix(in srgb, var(--store) 6%, transparent) 46%,
    transparent 72%
  );
  pointer-events: none;
}

.card > * {
  position: relative;
}

.card__icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--ink-600);
  background: var(--ink-800);
  display: grid;
  place-items: center;
  margin-bottom: 20px;
}

.card__icon svg {
  width: 19px;
  height: 19px;
}

.card h3 {
  margin-bottom: 9px;
}

.card p {
  font-size: 14.5px;
  line-height: 1.6;
}

/* ------------------------------------------------------------------ Zahlen */

.stats {
  display: grid;
  gap: 1px;
  background: var(--ink-600);
  border: 1px solid var(--ink-600);
  border-radius: var(--radius);
  overflow: hidden;
}

@media (min-width: 700px) {
  .stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat {
  background: var(--ink-850);
  padding: 30px 24px;
}

.stat__value {
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 600;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.stat__label {
  font-size: 12.5px;
  color: var(--chalk-faint);
  margin-top: 10px;
}

/* ---------------------------------------------------------------- Schritte */

.steps {
  counter-reset: step;
  display: grid;
  gap: 1px;
  background: var(--ink-600);
  border: 1px solid var(--ink-600);
  border-radius: var(--radius);
  overflow: hidden;
}

.step {
  background: var(--ink-850);
  padding: 30px 26px;
  counter-increment: step;
  position: relative;
}

.step::before {
  content: counter(step, decimal-leading-zero);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--chalk-ghost);
  display: block;
  margin-bottom: 16px;
}

@media (min-width: 860px) {
  .steps--3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .steps--4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ------------------------------------------------------------------- Liste */

.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}

.checklist li {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  font-size: 15px;
  color: var(--chalk-muted);
}

.checklist svg {
  width: 17px;
  height: 17px;
  flex: none;
  margin-top: 3px;
  color: var(--positive);
}

/* ------------------------------------------------------------------ Tabelle */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--ink-600);
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  min-width: 480px;
}

th,
td {
  text-align: left;
  padding: 15px 20px;
  border-bottom: 1px solid var(--ink-600);
}

th {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--chalk-faint);
  font-weight: 600;
  background: var(--ink-900);
}

td {
  color: var(--chalk-muted);
}

td:first-child {
  color: var(--chalk);
}

tr:last-child td {
  border-bottom: 0;
}

/* --------------------------------------------------------------- Codeblock */

.code {
  border: 1px solid var(--ink-600);
  border-radius: 14px;
  background: var(--ink-900);
  padding: 16px 18px;
  overflow-x: auto;
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 13px;
  color: var(--chalk-muted);
  line-height: 1.7;
}

.code .k {
  color: var(--chalk);
}

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

.footer {
  border-top: 1px solid var(--ink-600);
  padding: 56px 0 44px;
}

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

@media (min-width: 760px) {
  .footer__grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.footer h4 {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--chalk-faint);
  margin: 0 0 14px;
  font-weight: 600;
}

.footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.footer a {
  font-size: 14px;
  color: var(--chalk-muted);
  transition: color 0.2s;
}

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

.footer__bottom {
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--ink-600);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--chalk-ghost);
}

/* -------------------------------------------------------- Scroll-Animation */

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.7s var(--ease),
    transform 0.7s var(--ease);
}

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
  .hero h1 .line > span {
    transform: none;
  }
}

/* --------------------------------------------------------------- Seitenkopf */

.pagehead {
  padding: clamp(122px, 15vw, 168px) 0 clamp(48px, 6vw, 72px);
  border-bottom: 1px solid var(--ink-600);
  position: relative;
  overflow: hidden;
}

.pagehead__wash {
  position: absolute;
  inset: -40% -10% auto;
  height: 150%;
  background: radial-gradient(
    46% 52% at 22% 12%,
    rgba(255, 59, 48, 0.11),
    transparent 68%
  );
  pointer-events: none;
}

/* ------------------------------------------------------------------ Hinweis */

.note {
  border: 1px solid var(--ink-600);
  border-left: 2px solid var(--accent);
  border-radius: 0 14px 14px 0;
  background: var(--ink-850);
  padding: 18px 22px;
  font-size: 14.5px;
  color: var(--chalk-muted);
}

.note strong {
  color: var(--chalk);
  font-weight: 600;
}
