html,
body {
  height: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

/*
  Design tokens and base font families.
  Color tokens are stored as "R G B" to be used with rgb(var(--token)).
*/
:root {
  --dark_900: 12 12 12;
  --dark_800: 31 31 31;
  --dark_700: 47 47 47;

  --red: 255 0 0;
  --white: 255 255 255;

  --green: 74 101 37;
  --link: 0 102 153;

  --main-font: "TeX Gyre Heros", sans-serif;
  --highlight-font: "Permanent Marker", cursive;
}

/*
  Self-hosted font faces.
  Inputs: font files in /font/woff2
  Output: consistent typography across platforms with swap for performance.
*/
@font-face {
  font-family: "TeX Gyre Heros";
  src: url("../../font/woff2/texgyreheros-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "TeX Gyre Heros";
  src: url("../../font/woff2/texgyreheros-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "TeX Gyre Heros";
  src: url("../../font/woff2/texgyreheros-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "TeX Gyre Heros";
  src: url("../../font/woff2/texgyreheros-bolditalic.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "TeX Gyre Heros Condensed";
  src: url("../../font/woff2/texgyreheroscn-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "TeX Gyre Heros Condensed";
  src: url("../../font/woff2/texgyreheroscn-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/*
  Global page styling.
  Inputs: design tokens from :root
  Output: default typography and dark theme background for the entire site.
*/
body {
  background-color: rgb(var(--dark_900));
  color: rgb(var(--white));
  font-family: var(--main-font);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.25;
  text-align: center;
}

@media (min-width: 640px) {
  body {
    font-size: 18px;
  }
}
@media (min-width: 1024px) {
  body {
    font-size: 18px;
    text-align: left;
  }
}

.condensed {
  font-family: "TeX Gyre Heros Condensed", sans-serif;
}

/*
  Typography primitives.
  Note: H1 uses the highlight font; H2 uses the main font with responsive alignment rules.
*/
body h1 {
  font-family: var(--highlight-font);
  font-weight: 400;
  font-size: 42px;
  line-height: 0.98;
  text-align: center;
}
@media (min-width: 640px) {
  body h1 {
    font-size: 60px;
  }
}
@media (min-width: 1179px) {
  body h1 {
    font-size: 72px;
    text-align: left;
  }
}

body h2 {
  font-family: var(--main-font);
  font-weight: 500;
  font-size: 24px;
  line-height: 1.1;
  text-align: center;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
@media (min-width: 640px) {
  body h2 {
    font-size: 28px;
    flex-direction: row-reverse;
    justify-content: center;
    gap: 8px;
  }
}
@media (min-width: 1024px) {
  body h2 {
    font-size: 32px;
    justify-content: flex-start;
    text-align: left;
    gap: 12px;
  }
}

p {
  font-size: 16px;
  line-height: 1.25;
  text-align: center;
}
@media (min-width: 640px) {
  p {
    font-size: 18px;
  }
}
@media (min-width: 1024px) {
  p {
    text-align: left;
  }
}

.highlight {
  color: rgb(var(--red));
}

/*
  Shared content container.
  Output: consistent horizontal padding and a fixed max width.
*/
.page-container {
  max-width: 72rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/*
  Background image used behind header/hero.
  Input: hero background image in /images.
*/
.background-img {
  background-image: url("../../images/hero-bg.png");
  background-size: cover;
  background-position: center;
}

/*
  Header layering.
  Note: positioning can be switched to sticky if desired.
*/
header {
  top: 0;
  z-index: 100;
}

/*
  Hero layout and spacing.
  Output: vertical rhythm and layering to keep content above overlays.
*/
.hero {
  padding-top: 30px;
  padding-bottom: 20px;
  display: flex;
  align-items: center;
  min-height: 600px;
  z-index: 2;
}

.hero-text,
.hero-bottom,
.hero-left {
  z-index: 3;
}

@media (min-width: 1024px) {
  .hero {
    min-height: auto;
    align-items: flex-start;
  }
}
@media (min-width: 768px) {
  .hero {
    padding: 100px 56px;
  }
}

.hero-container {
  width: 100%;
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (max-width: 1023px) {
  .hero-container {
    justify-items: center;
    text-align: center;
  }
  .hero-left {
    align-items: center;
  }
}

.hero-left {
  max-width: 528px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/*
  Hero bottom layout: stacks on mobile, splits on desktop.
*/
.hero-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  margin-top: 0.5rem;
}

.hero-bottom-left {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 368px;
}

@media (min-width: 1024px) {
  .hero-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
    gap: 0;
    flex-wrap: nowrap;
  }

  .hero-bottom-left {
    flex: 1 1 auto;
    align-items: flex-start;
    text-align: left;
  }

  .hero-bottom-right {
    flex: 0 0 auto;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
  }

  .hero-qr {
    width: 127px;
    height: 127px;
    flex-shrink: 0;
    margin-left: 12px;
  }
}

/*
  Social proof badge row.
*/
.hero-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-size: 1rem;
  color: rgb(var(--white));
  text-align: center;
}

@media (min-width: 1024px) {
  .hero-social {
    justify-content: flex-start;
    text-align: left;
  }
}

.avatar-group {
  display: flex;
  align-items: center;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgb(var(--white));
  object-fit: cover;
  margin-left: -12px;
}
.avatar:first-child {
  margin-left: 0;
}

/*
  Store buttons used in multiple places (hero + CTA).
  Output: consistent button style across sections.
*/
.hero-stores {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 353px;
}

.store-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;

  width: 100%;
  height: 60px;
  padding: 0 24px;

  background-color: rgb(var(--dark_800));
  color: #fff;

  font-size: 16px;
  font-weight: 500;

  border-radius: 8px;
  border: 1px solid rgb(var(--white));
  cursor: pointer;

  transition: transform 0.2s ease, background-color 0.2s ease;
}

.store-button:hover {
  transform: scale(1.05);
  background-color: rgb(var(--dark_900));
}

.store-button img {
  height: 24px;
  width: 24px;
  object-fit: contain;
}

@media (min-width: 640px) {
  .hero-stores {
    flex-direction: row;
    gap: 16px;
    max-width: none;
  }

  .store-button {
    width: auto;
    min-width: 160px;
  }
}

/*
  Hero right column mockup and decorative scribble animations.
*/
.hero-right {
  position: relative;
  justify-content: flex-end;
  align-items: flex-end;
}

.mockup {
  max-width: 508px;
  height: auto;
  z-index: 2;
  position: relative;
}

@media (min-width: 1024px) and (max-width: 1178px) {
  .mockup {
    max-width: 450px;
  }
}

.decor {
  position: absolute;
  pointer-events: none;
}

.curly {
  bottom: 330px;
  right: 100px;
  width: 100px;
  z-index: 3;
  transform-origin: right top;
  animation: curly-diagonal-stretch 1.5s ease-out forwards;
}

.arrow {
  bottom: 70px;
  left: 0px;
  width: 120px;
  opacity: 0;
  transform-origin: top right;
  animation: arrow-diagonal-stretch 1s ease-out forwards 0.7s;
  z-index: 1;
}

@keyframes curly-diagonal-stretch {
  0% {
    transform: scale(0.2);
    opacity: 0;
  }
  50% {
    transform: scale(1.2) rotate(-5deg);
    opacity: 1;
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

@keyframes arrow-diagonal-stretch {
  0% {
    transform: scale(0.2);
    opacity: 0;
  }
  50% {
    transform: scale(1.2) rotate(-5deg);
    opacity: 1;
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

/*
  Hero overlay gradient used to transition into the benefits section.
*/
.hero-overlay {
  position: relative;
}

.hero-overlay::after {
  content: "";
  position: absolute;
  bottom: 0px;
  left: 0;
  width: 100%;
  height: 261px;

  background: linear-gradient(
    to bottom,
    rgb(var(--dark_900) / 0),
    rgb(var(--dark_900) / 1)
  );

  z-index: 1;
  pointer-events: none;
}

/*
  Benefits section layout and responsive image placement.
*/
.benefits {
  padding: 30px 20px;
  border-radius: 8px;
}

.benefit {
  display: flex;
  flex-direction: column;
  gap: 48px;
  margin-bottom: 96px;
  text-align: center;
  align-items: center;
}

.benefit:last-child {
  margin-bottom: 0;
}

.benefit-text {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 0 20px;
}

.benefit-text p {
  font-size: 18px;
  line-height: 1.25;
  text-align: center;
  max-width: 90%;
  margin: 0 auto;
}

.scribble {
  width: 50px;
  height: 50px;
}

.benefit-image {
  position: relative;
  max-width: 295px;
}

.benefit-image img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.intext-image {
  max-width: 295px;
}

.benefit:nth-of-type(3) .intext-image.mobile-only {
  position: absolute;
  bottom: -70px;
  right: -30px;
  width: 100%;
  z-index: 2;
}

.benefit:nth-of-type(3) .intext-image.mobile-only img {
  display: block;
  width: 100%;
  height: auto;
}

.intext-image.desktop-only {
  display: none;
}

@media (min-width: 640px) {
  .benefit {
    gap: 96px;
    padding: 60px 100px;
  }

  .benefit-text p {
    max-width: 70%;
  }

  .benefit:nth-of-type(3) .benefit-text h2 {
    flex-direction: row;
  }
}

@media (min-width: 1024px) {
  .benefit {
    flex-direction: row;
    align-items: flex-start;
    gap: 95px;
    text-align: left;
    padding-left: 150px;
    padding-right: 150px;
    position: relative;
  }

  .benefit:nth-of-type(odd) {
    flex-direction: row-reverse;
  }

  .benefit-text {
    flex: 1;
    padding: 0;
    align-items: flex-start;
    text-align: left;
  }

  .benefit-text p {
    text-align: left;
    max-width: 100%;
  }

  .benefit-image {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    position: relative;
  }

  .intext-image.mobile-only {
    display: none;
  }

  .intext-image.desktop-only {
    display: block;
    position: absolute;
    bottom: 0;
    width: 100%;
    max-width: 295px;
  }

  .intext-image.desktop-only img {
    display: block;
    width: 100%;
    height: auto;
  }
}

.benefit:nth-of-type(3) .benefit-arrow {
  position: absolute;
  transform: rotate(45deg);
  bottom: 130px;
  left: 130px;
  width: 160px;
  height: auto;
  z-index: 3;
  pointer-events: none;
}

@media (min-width: 1024px) {
  .benefit:nth-of-type(3) .benefit-arrow {
    transform: rotate(10deg);
    bottom: 150px;
    left: 200px;
    width: 250px;
  }
}

@media (max-width: 639px) {
  .benefit:nth-of-type(3) .benefit-text h2 {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .benefit:nth-of-type(3) .benefit-text h2 .scribble {
    order: -1;
    margin-bottom: 12px;
    width: 50px;
    height: auto;
  }
}

/*
  Functions section: responsive grid of feature cards.
*/
.functions {
  padding: 107px 20px;
  text-align: center;
}

.functions h2 {
  font-family: var(--main-font);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.25;
  margin-bottom: 80px;
}

.functions-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  max-width: 834px;
  margin: 0 auto;
  justify-items: center;
  align-items: stretch;
}

.function-card {
  background: rgb(var(--dark_800));
  border-radius: 8px;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  aspect-ratio: 16/9;
  height: 100%;
}

.function-card p {
  font-size: 16px;
  line-height: 1.4;
}

.function-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .functions {
    padding: 107px 56px;
  }

  .functions h2 {
    font-size: 28px;
    max-width: 70%;
    margin: 0 auto 80px;
  }

  .functions-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
  }

  .function-card {
    aspect-ratio: 4/3;
  }

  .function-icon {
    width: 50px;
    height: 50px;
  }
}

@media (min-width: 1024px) {
  .functions {
    padding: 107px 0;
  }

  .functions h2 {
    font-size: 32px;
    text-align: center;
    max-width: 840px;
    margin: 0 auto 80px;
  }

  .functions-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 80px;
    max-width: 1440px;
  }

  .function-card {
    padding: 50px;
    aspect-ratio: 16/9;
  }

  .function-card p {
    font-size: 18px;
  }

  .function-icon {
    width: 60px;
    height: 60px;
  }
}

/*
  Call-to-action section and media grid.
*/
.calltoaction {
  padding: 24px 20px 100px;
  text-align: center;
}

.cta-container {
  width: 100%;
  max-width: 834px;
  margin: 0 auto;
}

@media (min-width: 1024px) {
  .cta-container {
    max-width: 1440px;
  }
}

.cta-title-scribble {
  display: flex;
  justify-content: center;
  margin-bottom: 100px;
}

.cta-title-scribble img {
  width: 50px;
}

@media (min-width: 640px) {
  .cta-title-scribble img {
    width: 60px;
  }
}
@media (min-width: 1024px) {
  .cta-title-scribble img {
    width: 70px;
  }
}

.cta-images {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  max-width: 100%;
  margin: 0 auto 48px;
}

.cta-images img {
  width: 100%;
  max-width: 335px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
}

@media (min-width: 640px) and (max-width: 1023px) {
  .cta-images {
    flex-wrap: nowrap;
  }
  .cta-images img {
    flex: 1 1 0;
    min-width: 0;
    aspect-ratio: 1 / 1;
    max-width: none;
  }
}

@media (min-width: 1024px) {
  .cta-images {
    flex-wrap: nowrap;
  }
  .cta-images img {
    flex: 1 1 0;
    min-width: 0;
    aspect-ratio: 16 / 9;
    max-width: none;
  }
}

.cta-text {
  max-width: 640px;
  margin: 0 auto 48px;
}

.cta-text h2 {
  text-align: center;
}

/*
  CTA download box.
  Note: reuses .store-button styles but changes layout inside the box.
*/
.cta-download {
  display: flex;
  justify-content: center;
}

.cta-download-box {
  margin-top: 2rem;
  background-color: rgb(var(--green));
  padding: 24px;
  border-radius: 12px;
  color: rgb(var(--white));
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  align-items: center;
  max-width: 480px;
  width: 100%;
}

.cta-headline {
  font-family: var(--highlight-font);
  font-size: 20px;
  text-align: center;
}

.cta-stores {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 353px;
  margin-top: 16px;
}

.cta-stores .store-button {
  background-color: rgb(var(--dark_800));
  color: rgb(var(--white));
}

.cta-stores .store-button:hover {
  background-color: #111;
}

.cta-qr {
  display: none;
  width: 100px;
  height: auto;
  flex-shrink: 0;
}

.cta-scribble {
  display: block;
  position: absolute;
  top: -65px;
  right: 120px;
  width: 70px;
  height: auto;
  z-index: 50;
}

@media (min-width: 640px) {
  .cta-download-box {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 36px;
    padding: 32px 48px;
    max-width: 600px;
    text-align: left;
    position: relative;
  }

  .cta-left {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }

  .cta-headline {
    font-size: 24px;
    text-align: left;
    margin: 0;
  }

  .cta-stores {
    flex-direction: row;
    gap: 16px;
    margin-top: 0;
    max-width: none;
  }

  .cta-qr {
    display: block;
    justify-self: end;
    width: 100px;
  }

  .cta-scribble {
    top: -80px;
    right: -40px;
    width: 90px;
  }
}

/*
  Back-to-top button.
  Visibility is controlled by Alpine; styles define position and hover effects.
*/
.back-to-top {
  position: fixed;
  bottom: 180px;
  right: 24px;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.back-to-top:hover {
  transform: scale(1.1);
}

.back-to-top img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

@media (max-width: 768px) {
  .back-to-top {
    width: 35px;
    height: 35px;
  }
  .back-to-top img {
    width: 35px;
    height: 35px;
  }
}

/*
  Footer layout primitives.
*/
footer {
  border-top: 1px solid rgb(var(--white) / 0.16);
}

.blackzone {
  padding: 2rem 1rem;
}

.grayzone {
  background-color: rgb(var(--dark_800));
  color: rgb(var(--white));
  padding: 1rem;
  font-size: 14px;
}

/*
  Logo sizing.
  These are used for header and footer logos; keep in one place to avoid duplication.
*/
.logo-header {
  height: 6rem;
  width: auto;
}

.logo-footer {
  height: 2rem;
  width: auto;
}

@media (min-width: 768px) {
  .logo-header {
    height: 8rem;
  }
  .logo-footer {
    height: 3rem;
  }
}

/*
  Header controls: language dropdown and optional download button.
*/
.header-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/*
  Language dropdown button.
  Note: avoids relying on undefined CSS variables and uses tokenized colors.
*/
.lang-btn {
  background-color: rgb(var(--dark_800));
  color: #fff;
  font-family: var(--main-font);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  border-radius: 0.75rem;
  min-width: 120px;
  font-size: 1.125rem;
  line-height: 1.5rem;
  border: none;
  outline: none;
}

.lang-btn:focus,
.lang-btn:active,
.lang-btn:focus-visible {
  outline: none;
  box-shadow: none;
}

.lang-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 0.25rem;
  background-color: #202020;
  color: #fff;
  border-radius: 0.5rem;
  min-width: 80px;
  z-index: 50;
  text-align: center;
  padding: 0.25rem 0;
}

.lang-menu li {
  padding: 0.5rem 1rem;
  cursor: pointer;
  position: relative;
}

.lang-menu li:hover {
  background-color: #555;
}

.lang-menu li:not(:last-child)::after {
  content: "";
  display: block;
  margin: 1rem auto 0;
  width: 55%;
  border-bottom: 1px solid rgb(var(--white) / 0.16);
}

.arrow-icon {
  width: 1.25rem;
  height: 1.25rem;
  transition: transform 0.2s ease;
  transform-origin: center;
}

.rotate-180 {
  transform: rotate(180deg);
}

/*
  Header download button.
  Hidden by default; shown for Apple desktop/iPad when app.js adds the .apple-only class.
*/
a.download-btn {
  display: none;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  background: rgb(var(--white));
  color: #000;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  text-transform: capitalize;
  border: 1px solid rgb(var(--white));
  transition: all 0.2s ease-in-out;
}

a.download-btn:hover {
  background: color-mix(in srgb, rgb(var(--green)) 10%, white);
  border-color: rgb(var(--green));
  transform: scale(1.05);
}

@media (min-width: 768px) {
  a.download-btn.apple-only {
    display: inline-block;
  }
}

/*
  Impressum modal (sheet).
  sheet-backdrop and impressum-panel are referenced by the x-teleport modal markup.
*/
.sheet-backdrop {
  position: fixed;
  inset: 0;
  backdrop-filter: blur(3px);
  z-index: 9999;
}

.impressum-panel {
  position: relative;
  z-index: 10000;
  background: rgb(var(--dark_800));
  width: 100vw;
}

.impressum-header {
  position: relative;
  padding: 1rem;
}

.impressum-title {
  font-size: 2rem;
  font-weight: 800;
  text-transform: capitalize;
  text-align: center;
}

@media (min-width: 1024px) {
  .impressum-title {
    text-align: left;
    font-size: 3rem;
    padding-left: 30%;
  }
}

a.impressum-link {
  color: rgb(var(--link));
  font-family: var(--main-font);
  font-size: 14px;
  text-decoration: none;
  display: inline-block;
  align-items: center;
  gap: 6px;
}

a.impressum-link:hover {
  text-decoration: underline;
}

.impressum-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  color: #fff;
  background: transparent;
  border: none;
  cursor: pointer;
}

/*
  Overrides for imprint content so the global H2 flex styling does not leak into the modal.
*/
.impressum-panel h2 {
  all: unset;
  display: block;
  padding-top: 1.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
}

.impressum-panel p {
  margin-bottom: 1rem;
  line-height: 1.5;
  text-align: center;
}

@media (min-width: 1024px) {
  .impressum-panel h2 {
    text-align: left;
    font-size: 1.5rem;
    padding-left: 30%;
  }

  .impressum-panel p {
    text-align: left;
    padding-left: 30%;
  }
}

.impressum-panel::-webkit-scrollbar {
  display: none;
}

/*
  Focus styling for keyboard navigation.
  Uses a visible outline color for the dark theme.
*/
button:focus-visible,
a:focus-visible,
select:focus-visible {
  outline: 2px solid rgb(var(--white));
  outline-offset: 2px;
}
