/* ============================================================
   Felse — static landing page
   Design tokens
   ============================================================ */
:root {
  --gold: #C9991D;
  --gold-soft: #C9B891;
  --gold-deep: #A87D14;
  --ink: #1B1D1F;
  --header-bg: rgba(201, 153, 29, 0.85);
  --white: #ffffff;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background-color: var(--gold); /* fallback while the image loads */
  -webkit-font-smoothing: antialiased;
}

/* ---- Page-wide parallax background (fixed layer) ---- */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: url("../img/background.jpg") center / cover no-repeat;
}
@media (max-width: 767px) {
  /* fixed attachment is unreliable on mobile browsers; scroll is a safe fallback */
  .page-bg { position: absolute; top: 0; height: 100vh; }
}

.container { max-width: 1152px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .container { padding: 0 24px; } }
.container-narrow { max-width: 768px; }

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

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.header-logo { height: 32px; width: auto; cursor: pointer; }
.main-nav { display: none; gap: 24px; }
@media (min-width: 768px) {
  .main-nav { display: flex; }
  .main-nav button {
    background: none; border: 0; padding: 0; cursor: pointer;
    font-size: 14px; font-weight: 600; color: var(--ink);
    transition: opacity .2s;
  }
  .main-nav button:hover { opacity: .6; }
}
.header-right { display: flex; align-items: center; gap: 12px; }

/* The App Store button in the header appears once the hero CTA scrolls away */
.header-cta { display: none; }
.header-cta.show { display: block; animation: headerCtaIn .25s ease-out; }
@keyframes headerCtaIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   App Store button
   ============================================================ */
.btn-appstore {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 9999px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: var(--white);
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
  padding: 8px 16px;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
  transition: transform .3s, box-shadow .3s;
}
.btn-appstore:hover { transform: translateY(-2px); box-shadow: 0 10px 15px -3px rgba(0,0,0,.15); }
.btn-appstore svg { width: 18px; height: 18px; }
.btn-appstore-big { padding: 12px 24px; font-size: 16px; }
.btn-appstore-big svg { width: 24px; height: 24px; }
@media (min-width: 768px) { .btn-appstore-big { font-size: 18px; } }

/* ============================================================
   Hero
   ============================================================ */
.hero { position: relative; overflow: hidden; padding-top: 96px; }
.hero-grid {
  position: relative;
  display: grid;
  gap: 40px;
  padding-top: 40px;
  padding-bottom: 40px;
}
@media (min-width: 768px) {
  .hero-grid { grid-template-columns: 1fr 1fr; align-items: center; padding-bottom: 28px; }
}
.hero-copy h1 {
  font-size: 36px;
  line-height: 1.15;
  font-weight: 700;
  margin: 0;
  color: var(--ink);
}
@media (min-width: 768px) { .hero-copy h1 { font-size: 48px; } }
.hero-sub {
  margin: 16px 0 0;
  max-width: 448px;
  font-size: 18px;
  font-weight: 500;
  color: rgba(27, 29, 31, 0.8);
}
.hero-cta { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }

.hero-phones {
  position: relative;
  margin: 0 auto;
  width: 100%;
  max-width: 448px;
  height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
}
@media (min-width: 768px) { .hero-phones { height: 420px; } }
.phone {
  width: 44%;
  aspect-ratio: 1 / 2;
  object-fit: cover;
  border-radius: 35px;
}
.phone-left  { position: absolute; left: 2%;  transform: rotate(-6deg); }
.phone-center { position: relative; z-index: 10; width: 50%; }
.phone-right { position: absolute; right: 2%; transform: rotate(6deg); }
@media (min-width: 768px) { .phone-left { left: 6%; } .phone-right { right: 6%; } }

/* ============================================================
   Wave dividers
   ============================================================ */
.wave { width: 100%; overflow: hidden; line-height: 0; }
.wave svg { display: block; width: 100%; height: 80px; }
@media (min-width: 768px) { .wave svg { height: 80px; } }
.wave-flip { transform: rotate(180deg); margin-top: -1px; }
.wave-short svg { height: 56px; }
@media (min-width: 768px) { .wave-short svg { height: 80px; } }

/* ============================================================
   Sections
   ============================================================ */
.band-white { position: relative; background: var(--white); }

/* ---- Features ---- */
.features-container { padding: 80px 0; }
@media (min-width: 768px) { .features-container { padding: 112px 0; } }

.feature-row {
  display: grid;
  gap: 40px;
  align-items: center;
  margin-bottom: 80px;
  /* Narrow layouts: modest side inset so text is not glued to the
     screen edge (desktop adds 24px margins in the media query below). */
  margin-left: 8px;
  margin-right: 8px;
}
.feature-row:last-child { margin-bottom: 0; }
@media (min-width: 768px) {
  .feature-row { grid-template-columns: 1fr 1fr; }
  .feature-row:nth-child(even) .feature-media { order: -1; }
  .feature-row { margin-bottom: 112px; margin-left: 24px; margin-right: 24px;}
  .feature-row:last-child { margin-bottom: 0; }
}
.accent-bar {
  display: inline-block;
  width: 48px; height: 6px;
  border-radius: 9999px;
  background: var(--gold);
  margin-bottom: 12px;
}
.feature-text h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
}
@media (min-width: 768px) { .feature-text h2 { font-size: 30px; } }
.feature-text p {
  margin: 16px 0 0;
  font-size: 18px;
  line-height: 1.65;
  color: rgba(27, 29, 31, 0.7);
}
.feature-media { display: flex; justify-content: center; }

.demo-phone {
  position: relative;
  width: 190px;
  aspect-ratio: 1 / 2;
  border-radius: 35px;
  overflow: hidden;
  transform: rotate(var(--tilt, 0deg));
}
@media (min-width: 768px) { .demo-phone { width: 230px; } }
.demo-phone img, .demo-phone video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.demo-phone video { opacity: 0; transition: opacity .5s; }
.demo-phone video.ready { opacity: 1; }

/* ---- How it works ---- */
.how-it-works { position: relative; }
.how-inner { text-align: center; padding-top: 16px; padding-bottom: 16px; }
.how-inner h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
}
@media (min-width: 768px) { .how-inner h2 { font-size: 30px; } }
.how-inner p {
  margin: 20px 0 0;
  font-size: 18px;
  line-height: 1.65;
  color: rgba(27, 29, 31, 0.8);
}

/* ---- Gallery ---- */
.gallery-band { padding: 24px 0 40px; }
@media (min-width: 768px) { .gallery-band { padding: 32px 0 48px; } }
.gallery-viewport {
  overflow: hidden;
  cursor: grab;
  user-select: none;
  touch-action: pan-y;
}
.gallery-viewport:active { cursor: grabbing; }
.gallery-track { display: flex; width: max-content; gap: 24px; will-change: transform; }
.gallery-item {
  width: 170px;
  aspect-ratio: 1 / 2;
  object-fit: cover;
  border-radius: 35px;  
}
@media (min-width: 768px) { .gallery-item { width: 200px; } }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { background: var(--ink); color: #fff; padding: 16px 0 40px; }
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
@media (min-width: 768px) {
  .footer-inner { flex-direction: row; align-items: center; justify-content: space-between; }
}
.footer-logo { height: 32px; width: auto; }
.footer-copy { margin: 12px 0 0; font-size: 14px; color: rgba(255, 255, 255, .5); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 12px 32px; font-size: 14px; font-weight: 500; }
@media (min-width: 768px) { .footer-nav { font-size: 14px; } }
.footer-nav a { color: rgba(255, 255, 255, .7); text-decoration: none; transition: color .2s; }
.footer-nav a:hover { color: #fff; }

/* ============================================================
   Language switcher
   ============================================================ */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 9999px;
  background: rgba(0, 0, 0, .05);
  font-size: 12px;
  font-weight: 600;
}
.lang-switcher button {
  border: 0;
  background: none;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: rgba(27, 29, 31, .6);
  transition: color .2s;
}
.lang-switcher button:hover { color: var(--ink); }
.lang-switcher button.active { background: var(--gold); color: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.15); }

/* ============================================================
   404 page
   ============================================================ */
.notfound { text-align: center; padding-top: 160px; }
.notfound h1 { font-size: 72px; margin: 0; color: var(--ink); }
.notfound p { font-size: 18px; color: rgba(27, 29, 31, 0.8); }

/* ============================================================
   Reveal-on-scroll animation
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .6s ease-out, transform .6s ease-out;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
/* Fade-only reveal for elements that carry their own transform (phones) */
.reveal-fade { opacity: 0; transition: opacity .6s ease-out; }
.reveal-fade.visible { opacity: 1; }

/* ============================================================
   Subpages (terms, support, impressum, referral)
   Same header/footer language as the landing page; plain white
   content column for reading.
   ============================================================ */
body.subpage {
  background: var(--white);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.subpage-main {
  flex: 1 0 auto; /* grows so the dark footer is always pinned to the viewport bottom */
  max-width: 768px;
  padding-top: 112px;
  padding-bottom: 96px;
}
.subpage-main h1 {
  margin: 0 0 24px;
  font-size: 32px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--ink);
}
@media (min-width: 768px) { .subpage-main h1 { font-size: 40px; } }
.subpage-main h2 {
  margin: 48px 0 16px;
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
}
.subpage-main h3 {
  margin: 28px 0 8px;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}
.subpage-main p, .subpage-main li {
  font-size: 17px;
  line-height: 1.7;
  color: rgba(27, 29, 31, .8);
}
.subpage-main p { margin: 0 0 12px; }
.subpage-main ul, .subpage-main ol { margin: 0 0 12px; padding-left: 24px; }
.subpage-main a { color: var(--gold-deep); }
.subpage-back {
  display: inline-block;
  margin-top: 48px;
  font-size: 15px;
  font-weight: 600;
  color: var(--gold-deep);
  text-decoration: none;
}
.subpage-back:hover { text-decoration: underline; }

/* ---- FAQ accordion (support page) ----
   Single-open accordion: JS toggles the .open class, the answer
   expands via a grid-template-rows transition. */
.faq-group { margin-top: 32px; }
.faq-group > h3 {
  margin: 24px 0 12px;
  font-size: 20px;
  font-weight: 700;
  color: var(--gold-deep); /* mustard gold section headers */
}
.faq-item {
  border: 1px solid rgba(27, 29, 31, .12);
  border-radius: 16px;
  margin-bottom: 8px;
  background: var(--white);
}
.faq-q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}
.faq-q::after { content: "+"; font-size: 20px; font-weight: 400; color: var(--gold-deep); flex: none; }
.faq-item.open .faq-q::after { content: "–"; }
.faq-a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .3s ease;
}
.faq-item.open .faq-a { grid-template-rows: 1fr; }
.faq-a > div { overflow: hidden; }
.faq-a p {
  margin: 0;
  padding: 0 16px 14px;
}

/* ---- Contact form (support page) ---- */
.contact-form {
  margin-top: 24px;
  display: grid;
  gap: 16px;
  max-width: 560px;
}
.contact-form label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.contact-form input, .contact-form select, .contact-form textarea {
  font: inherit;
  font-weight: 400;
  padding: 10px 12px;
  border: 1px solid rgba(27, 29, 31, .25);
  border-radius: 12px;
  background: var(--white);
  color: var(--ink);
}
.contact-form textarea { min-height: 120px; resize: vertical; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
  border-color: var(--gold);
}
/* Honeypot: invisible to humans, attractive to bots */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  height: 1px;
  width: 1px;
  overflow: hidden;
}
.form-note { font-size: 14px; line-height: 1.6; color: rgba(27, 29, 31, .6); }
.form-note.error { color: #b91000; font-weight: 600; }

/* ---- Referral (App Store redirect) page ---- */
.referral {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  padding: 120px 16px 48px;
}
.referral h1 { margin: 24px 0 0; font-size: 32px; font-weight: 700; color: var(--ink); }
.referral p { max-width: 480px; margin: 12px 0 0; font-size: 17px; line-height: 1.65; color: rgba(27, 29, 31, .8); }
.referral .btn-appstore { margin-top: 24px; }
.referral .spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(27, 29, 31, .2);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- News page ---- */
.news-date { font-size: 13px; font-weight: 600; color: rgba(27, 29, 31, .45); margin: -8px 0 12px; }

/* Gold variant: support form submit button */
.btn-send { background: var(--gold); color: #fff; border-color: rgba(0, 0, 0, .1); }
.btn-send:hover { background: var(--gold-deep); color: #fff; }

/* ============================================================
   Floating scroll-to-top button
   Appears after the visitor scrolls past the first screen.
   Browsers keep their native scrollbars - this is a convenience
   on top, not a replacement.
   ============================================================ */
.scroll-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 40;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 9999px;
  background: var(--gold);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 20px -6px rgba(0, 0, 0, .3);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease, background .2s;
}
.scroll-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.scroll-top:hover { background: var(--gold-deep); }
.scroll-top svg { width: 20px; height: 20px; }
@media (min-width: 768px) {
  .scroll-top { right: 24px; bottom: 24px; width: 48px; height: 48px; }
}

/* ============================================================
   Header on narrow screens
   When the App Store button appears (scrolled past the hero),
   it takes the logo's place and sits left of the language
   switcher; the logo steps aside so nothing is pushed off-screen.
   ============================================================ */
@media (max-width: 479px) {
  /* The right group is pinned right in every state, the flexible
     gap sits between it and the logo. */
  .header-right { margin-left: auto; gap: 8px; }
  .header-cta { order: -1; }
  .header-cta .btn-appstore { padding: 8px 12px; font-size: 13px; }
  /* Below 480px the logo, button and switcher cannot fit side by
     side - so only when the button is shown, the logo yields. */
  .site-header.has-cta .header-logo { display: none; }
}
