/*
 * Keep site design system (DE + EN): dark campfire look shared by every page.
 * Tokens, base typography, buttons, store badges, navigation, FAQ, finale and footer.
 * Page-specific styles live in css/home.css, css/feature-page.css and css/blog.css.
 */

@font-face {
  font-family: 'Fraunces';
  src: url('../assets/fonts/fraunces-latin.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Geist';
  src: url('../assets/fonts/geist-latin.woff2') format('woff2');
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;

  --bg: #0b0910;
  --bg-raised: #120f19;
  --surface: #17131f;
  --surface-2: #1e1928;
  --line: rgba(243, 233, 218, 0.09);
  --line-strong: rgba(243, 233, 218, 0.16);
  --highlight: inset 0 1px 0 rgba(243, 233, 218, 0.07);

  --ink: #f3e9da;
  --ink-soft: #bcae9e;
  --ink-faint: #8c8079;

  --ember: #f28a48;
  --ember-strong: #ff9b55;
  --ember-ink: #1c0e05;
  --glow: #ffd56b;
  --cold: #7d8fc4;

  --font-display: 'Fraunces', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --font-body: 'Geist', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --t-sm: 0.875rem;
  --t-base: clamp(1rem, 0.96rem + 0.22vw, 1.125rem);
  --t-lg: clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem);
  --t-xl: clamp(1.5rem, 1.3rem + 1vw, 2.125rem);
  --t-2xl: clamp(2rem, 1.45rem + 2.6vw, 3.5rem);
  --t-hero: clamp(2.5rem, 1.55rem + 4.3vw, 5.25rem);

  --space-section: clamp(5rem, 10vw, 10rem);
  --gutter: clamp(1.25rem, 5vw, 5rem);
  --content: 74rem;

  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  --nav-h: 4.25rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: clip;
  scroll-padding-top: calc(var(--nav-h) + 1rem);
  background: var(--bg);
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--t-base);
  line-height: 1.6;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg {
  display: block;
}

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

a {
  color: inherit;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  text-wrap: balance;
  font-variation-settings: 'opsz' 96;
}

h1 {
  font-size: var(--t-hero);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

h2 {
  font-size: var(--t-2xl);
  line-height: 1.08;
  letter-spacing: -0.025em;
}

h3 {
  font-family: var(--font-body);
  font-size: var(--t-lg);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  font-variation-settings: normal;
}

p {
  margin: 0;
  text-wrap: pretty;
}

::selection {
  background: rgba(242, 138, 72, 0.35);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--glow);
  outline-offset: 3px;
  border-radius: 6px;
}

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

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.wrap {
  width: 100%;
  max-width: calc(var(--content) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Film grain keeps the dark gradients from banding */
.grain {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Buttons and store badges ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.625rem 1.125rem;
  border-radius: 999px;
  font: 600 0.9375rem/1 var(--font-body);
  text-decoration: none;
  white-space: nowrap;
  transition: transform 140ms var(--ease-out), background-color 160ms var(--ease-out), border-color 160ms var(--ease-out);
}

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

.btn--ember {
  background: var(--ember);
  color: var(--ember-ink);
}

.btn--ghost {
  border: 1px solid var(--line-strong);
  color: var(--ink);
}

@media (hover: hover) and (pointer: fine) {
  .btn--ember:hover {
    background: var(--ember-strong);
  }

  .btn--ghost:hover {
    border-color: rgba(243, 233, 218, 0.32);
  }
}

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.store {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 3.5rem;
  padding: 0.625rem 1.25rem 0.625rem 1rem;
  border-radius: 14px;
  text-decoration: none;
  transition: transform 140ms var(--ease-out), background-color 160ms var(--ease-out), border-color 160ms var(--ease-out);
}

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

.store svg {
  width: 1.625rem;
  height: 1.625rem;
  flex: none;
}

.store__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  text-align: left;
}

.store__small {
  font-size: 0.75rem;
  opacity: 0.8;
}

.store__name {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.store--primary {
  background: var(--ink);
  color: #120c08;
}

.store--secondary {
  border: 1px solid var(--line-strong);
  background: rgba(11, 9, 16, 0.55);
  color: var(--ink);
}

@media (hover: hover) and (pointer: fine) {
  .store--primary:hover {
    background: #fff6e8;
  }

  .store--secondary:hover {
    border-color: rgba(243, 233, 218, 0.34);
  }
}

.fineprint {
  color: var(--ink-soft);
  font-size: var(--t-sm);
}

.fineprint a {
  color: var(--ink);
  text-decoration-color: rgba(243, 233, 218, 0.35);
  text-underline-offset: 3px;
}


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

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--nav-h);
  transition: background-color 240ms var(--ease-out), border-color 240ms var(--ease-out);
  border-bottom: 1px solid transparent;
}

.nav.is-scrolled {
  background: rgba(11, 9, 16, 0.82);
  border-bottom-color: var(--line);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.nav__inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 100%;
}

.nav__logo {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font: 600 1.125rem/1 var(--font-body);
  letter-spacing: -0.02em;
  text-decoration: none;
}

.nav__logo img {
  width: 2rem;
  height: 2rem;
  border-radius: 9px;
}

.nav__links {
  display: flex;
  gap: 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav__links a {
  display: inline-block;
  padding-block: 0.75rem;
  color: var(--ink-soft);
  font-size: 0.9375rem;
  text-decoration: none;
  transition: color 160ms var(--ease-out);
}

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

.nav__right {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}

.nav__lang {
  display: inline-grid;
  place-items: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  color: var(--ink-soft);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

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

.nav__burger {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  margin-right: -0.5rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  cursor: pointer;
}

.nav__burger span {
  display: block;
  width: 1.25rem;
  height: 1.5px;
  margin: 5px auto;
  background: currentColor;
  transition: transform 200ms var(--ease-out), opacity 160ms var(--ease-out);
}

.nav__burger[aria-expanded='true'] span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.nav__burger[aria-expanded='true'] span:nth-child(2) {
  opacity: 0;
}

.nav__burger[aria-expanded='true'] span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

.nav-sheet {
  position: fixed;
  inset: var(--nav-h) 0 auto;
  z-index: 49;
  display: grid;
  gap: 0.25rem;
  padding: 1rem var(--gutter) 1.5rem;
  background: rgba(11, 9, 16, 0.96);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.nav-sheet[hidden] {
  display: none;
}

@media (min-width: 901px) {
  .nav-sheet {
    display: none;
  }
}

.nav-sheet a:not(.btn) {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 1.0625rem;
  text-decoration: none;
}

.nav-sheet .btn {
  margin-top: 1rem;
}

@media (max-width: 900px) {
  .nav__links {
    display: none;
  }

  .nav__burger {
    display: block;
  }
}

@media (max-width: 420px) {
  .nav__right .btn {
    display: none;
  }
}


/* ---------- Generic sections ---------- */

.section {
  position: relative;
  padding-block: var(--space-section);
}

.section__head {
  display: grid;
  gap: 1rem;
  max-width: 42rem;
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

.section__head p {
  color: var(--ink-soft);
  font-size: var(--t-lg);
}


/* ---------- FAQ ---------- */

.faq__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}

.faq__list {
  border-top: 1px solid var(--line);
}

.faq__item {
  border-bottom: 1px solid var(--line);
}

.faq__item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding: 1.375rem 0;
  font-weight: 600;
  font-size: var(--t-lg);
  line-height: 1.35;
  letter-spacing: -0.01em;
  cursor: pointer;
  list-style: none;
}

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

.faq__item summary::after {
  content: '';
  flex: none;
  width: 0.75rem;
  height: 0.75rem;
  border-right: 1.5px solid var(--ink-soft);
  border-bottom: 1.5px solid var(--ink-soft);
  transform: translateY(-25%) rotate(45deg);
  transition: transform 200ms var(--ease-out);
}

.faq__item[open] summary::after {
  transform: translateY(25%) rotate(-135deg);
}

.faq__item p {
  max-width: 40rem;
  padding-bottom: 1.5rem;
  color: var(--ink-soft);
}

.faq__item a {
  color: var(--ink);
  text-underline-offset: 3px;
}

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


/* ---------- Finale and footer ---------- */

.finale {
  position: relative;
  padding-block: clamp(7rem, 14vw, 12rem) clamp(5rem, 10vw, 8rem);
  overflow: hidden;
  text-align: center;
}

.finale::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(140vw, 90rem);
  aspect-ratio: 1.6 / 1;
  transform: translate(-50%, 38%);
  background: radial-gradient(closest-side, rgba(255, 155, 85, 0.42), rgba(226, 72, 43, 0.18) 45%, rgba(226, 72, 43, 0) 100%);
  pointer-events: none;
}

.finale__inner {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 1.5rem;
}

.finale__inner h2 {
  max-width: 16ch;
  font-size: clamp(2.25rem, 1.5rem + 3.4vw, 4.5rem);
}

.finale__inner > p:not(.fineprint) {
  max-width: 34rem;
  color: var(--ink-soft);
  font-size: var(--t-lg);
}

.finale .stores {
  justify-content: center;
}

.finale__fire {
  width: 7rem;
  height: auto;
  margin-bottom: 0.5rem;
}

/* The finale fire flickers on every page; the homepage scene reuses these keyframes */
@media (prefers-reduced-motion: no-preference) {
  .finale__fire .flame {
    transform-box: fill-box;
    transform-origin: 50% 100%;
    animation: flame-a 1.6s ease-in-out infinite;
  }

  .finale__fire .flame--2 {
    animation-name: flame-b;
    animation-duration: 1.2s;
    animation-delay: -0.4s;
  }

  .finale__fire .flame--3 {
    animation-duration: 0.9s;
    animation-delay: -0.2s;
  }

  .finale__fire .flame--4 {
    animation-name: flame-b;
    animation-duration: 0.7s;
  }
}

@keyframes flame-a {
  0%, 100% { transform: scale(1, 1) skewX(0deg); }
  25% { transform: scale(0.96, 1.06) skewX(-2deg); }
  50% { transform: scale(1.03, 0.95) skewX(1.5deg); }
  75% { transform: scale(0.98, 1.04) skewX(2deg); }
}

@keyframes flame-b {
  0%, 100% { transform: scale(1, 1) skewX(0deg); }
  30% { transform: scale(1.04, 0.93) skewX(2.5deg); }
  60% { transform: scale(0.95, 1.08) skewX(-2deg); }
}

.footer {
  position: relative;
  padding-block: 2.5rem max(2.5rem, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}

.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 2rem;
}

.footer__brand p {
  max-width: 18rem;
  margin-top: 0.75rem;
  color: var(--ink-faint);
  font-size: var(--t-sm);
}

.footer h3 {
  margin-bottom: 0.75rem;
  color: var(--ink-faint);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.footer ul a {
  display: inline-block;
  padding-block: 0.25rem;
  color: var(--ink-soft);
  font-size: var(--t-sm);
  text-decoration: none;
}

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

.footer__legal {
  margin-top: 2.5rem;
  color: var(--ink-faint);
  font-size: 0.8125rem;
}

@media (max-width: 760px) {
  .footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer__brand {
    grid-column: 1 / -1;
  }
}


/* ---------- Scroll reveals for regular sections ---------- */

@media (prefers-reduced-motion: no-preference) {
  /* translate (not transform) so hover transforms on revealed tiles keep working */
  .js .reveal {
    opacity: 0;
    translate: 0 24px;
    transition: opacity 700ms var(--ease-out), translate 900ms var(--ease-out), transform 200ms var(--ease-out), border-color 200ms var(--ease-out);
  }

  .js .reveal.is-visible {
    opacity: 1;
    translate: none;
  }
}


.nav__links a[aria-current='page'],
.nav-sheet a[aria-current='page'] {
  color: var(--ink);
}

/* ---------- Subpages: page hero, kicker, long-form text ---------- */

.kicker {
  color: var(--ember-strong);
  font-size: var(--t-sm);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.accent {
  color: var(--ember-strong);
}

/* Section heads normally set their paragraphs as leads; a kicker stays small */
.section__head .kicker {
  color: var(--ember-strong);
  font-size: var(--t-sm);
}

.page-hero {
  position: relative;
  isolation: isolate;
  padding-block: calc(var(--nav-h) + clamp(3.5rem, 9vw, 7.5rem)) clamp(3.5rem, 7vw, 6rem);
  /* Clip sideways only, so the firelight can spill softly into the next section */
  overflow-x: clip;
}

/* Firelight from below the fold, as if the campfire sits just out of frame */
.page-hero::before {
  content: '';
  position: absolute;
  z-index: -1;
  right: -10%;
  bottom: -55%;
  width: min(120vw, 70rem);
  aspect-ratio: 1.4 / 1;
  background: radial-gradient(closest-side, rgba(255, 155, 85, 0.26), rgba(226, 72, 43, 0.1) 50%, rgba(226, 72, 43, 0) 100%);
  pointer-events: none;
}

/* Later sections paint above the spilled glow */
.page-hero ~ * {
  position: relative;
}

.page-hero::after {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  background: radial-gradient(70% 60% at 20% 0%, rgba(125, 143, 196, 0.07), rgba(125, 143, 196, 0) 70%);
  pointer-events: none;
}

.page-hero__inner {
  display: grid;
  justify-items: start;
  gap: 1.5rem;
}

.page-hero h1 {
  max-width: 50rem;
  font-size: clamp(2.375rem, 1.55rem + 3.6vw, 4.5rem);
  line-height: 1.04;
}

.page-hero__lead {
  max-width: 38rem;
  color: var(--ink-soft);
  font-size: var(--t-lg);
  line-height: 1.55;
}

.page-hero .stores {
  margin-top: 0.5rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  color: var(--ink-soft);
  font-size: var(--t-sm);
  font-weight: 600;
  text-decoration: none;
  transition: color 160ms var(--ease-out);
}

.back-link svg {
  width: 1rem;
  height: 1rem;
  transition: transform 180ms var(--ease-out);
}

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

@media (hover: hover) and (pointer: fine) {
  .back-link:hover svg {
    transform: translateX(-3px);
  }
}

.prose {
  max-width: 44rem;
  color: var(--ink-soft);
  overflow-wrap: break-word;
}

.prose > * + * {
  margin-top: 1.25rem;
}

.prose h1,
.prose h2 {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  color: var(--ink);
  font-size: var(--t-xl);
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.prose h3 {
  margin-top: 2rem;
  color: var(--ink);
}

.prose h4 {
  margin: 1.75rem 0 0;
  color: var(--ink);
  font-size: var(--t-base);
  font-weight: 600;
}

.prose h1 + *,
.prose h2 + *,
.prose h3 + *,
.prose h4 + * {
  margin-top: 0.75rem;
}

.prose ul,
.prose ol {
  padding-left: 1.25rem;
}

.prose li + li {
  margin-top: 0.5rem;
}

.prose li::marker {
  color: var(--ember);
}

.prose strong {
  color: var(--ink);
  font-weight: 600;
}

.prose a {
  color: var(--ink);
  text-decoration-color: rgba(242, 138, 72, 0.6);
  text-underline-offset: 3px;
}

.prose a:hover {
  text-decoration-color: var(--ember-strong);
}

.prose blockquote {
  margin-inline: 0;
  padding-left: 1.25rem;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: var(--t-lg);
  line-height: 1.45;
  box-shadow: inset 2px 0 0 var(--ember);
}

.prose hr {
  height: 1px;
  border: 0;
  background: var(--line);
}

.prose code {
  padding: 0.125rem 0.375rem;
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.9em;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--t-sm);
}

.prose th,
.prose td {
  padding: 0.75rem 0.75rem 0.75rem 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.prose th {
  color: var(--ink);
  font-weight: 600;
}

.table-scroll {
  overflow-x: auto;
}

/* Legal pages: imprint and privacy policy */
.legal {
  padding-block: calc(var(--nav-h) + clamp(2.5rem, 6vw, 5rem)) var(--space-section);
}

.legal__head {
  display: grid;
  justify-items: start;
  gap: 1rem;
  max-width: 44rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.legal__head h1 {
  font-size: var(--t-2xl);
  line-height: 1.08;
}

.prose .legal__meta {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
  font-size: var(--t-sm);
}

.prose .toc {
  padding: clamp(1.25rem, 3vw, 1.75rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
  box-shadow: var(--highlight);
}

.prose .toc h2 {
  margin-top: 0;
  font-family: var(--font-body);
  font-size: var(--t-base);
  font-weight: 600;
  letter-spacing: 0;
}

.prose .toc ul {
  padding-left: 0;
  list-style: none;
  columns: 2 16rem;
  column-gap: 2rem;
}

.prose .toc li {
  break-inside: avoid;
}

.prose .toc a {
  color: var(--ink-soft);
  font-size: var(--t-sm);
  text-decoration: none;
}

.prose .toc a:hover {
  color: var(--ink);
}

@media (forced-colors: active) {
  .grain {
    display: none;
  }
}
