/* Trashures website. Palette "Waldboden" from the app (app/src/constants/theme.ts), light and dark. */

@font-face { font-family: "Young Serif"; src: url("assets/fonts/YoungSerif-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("assets/fonts/Figtree-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("assets/fonts/Figtree-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("assets/fonts/Figtree-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }

/* Theme: data-theme (set by the inline script) wins; without JS the system decides. */
:root { color-scheme: light dark; }
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

:root {
  --bg: light-dark(#F4EFE6, #100E0B);
  --surface: light-dark(#EBE3D5, #26211B);
  --panel: light-dark(#FFFDF8, #1A1713);
  --line: light-dark(#E6DDCD, #2A251E);
  --outline: color-mix(in oklch, var(--text) 35%, transparent);
  --text: light-dark(#1F1A13, #F3EDE2);
  --muted: light-dark(#6B5D49, #B3A48D);
  --primary: light-dark(#3F5A2A, #B5C97A);
  --primary-deep: light-dark(#2C4220, #8DA457);
  --on-primary: light-dark(#FBF8F1, #13160C);
  --accent: light-dark(#C2652A, #E8945C);
  --accent-text: light-dark(#9E4F1E, #E8945C);
  --gold: light-dark(#9A6B12, #F0C74E);
  --bin-bio: #7A4E2A;
  --bin-rest: #3A3A3A;
  --frame: linear-gradient(160deg, #3A2F21, #1F1A13);

  --serif: "Young Serif", ui-serif, Georgia, serif;
  --sans: "Figtree", ui-sans-serif, system-ui, sans-serif;
  --radius-sm: .875rem;
  --radius: 1.25rem;
  --radius-lg: 1.5rem;
  --shadow-1: 0 1px 0 var(--line), 0 12px 32px -24px rgb(40 30 10 / .45);
  --shadow-2: 0 30px 60px -30px rgb(40 30 10 / .55);
  --max: 68rem;
  --pad: clamp(1.25rem, 4vw, 2.5rem);
  --ease: cubic-bezier(.2, .8, .2, 1);
}
:root[data-theme="dark"] { --shadow-2: 0 30px 60px -30px #000; --frame: linear-gradient(160deg, #4A3F31, #2A241C); }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  /* soft moss and gold glow at the top */
  background-image:
    radial-gradient(60rem 40rem at 85% -10%, color-mix(in oklch, var(--gold) 22%, transparent), transparent 70%),
    radial-gradient(50rem 35rem at -10% 10%, color-mix(in oklch, var(--primary) 16%, transparent), transparent 70%);
  background-repeat: no-repeat;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.08; letter-spacing: -0.01em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 5.5vw, 4.25rem); }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); }
h3 { font-size: 1.3rem; }
p { margin: 0; text-wrap: pretty; }
em { font-style: normal; color: var(--primary); }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }

.skip { position: absolute; left: -999px; top: 1rem; z-index: 99; background: var(--text); color: var(--bg); padding: .5rem 1rem; border-radius: 99px; }
.skip:focus { left: 1rem; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.eyebrow { display: inline-flex; align-items: baseline; gap: .5rem; font-weight: 600; font-size: .8rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.dot { flex: none; translate: 0 -.1em; width: .5rem; height: .5rem; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in oklch, var(--accent) 25%, transparent); }
.lead { font-size: clamp(1.05rem, 1.3vw, 1.2rem); color: var(--muted); max-width: 36rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5rem; white-space: nowrap;
  padding: .85rem 1.35rem; border-radius: 99px;
  background: linear-gradient(160deg, var(--primary), var(--primary-deep));
  color: var(--on-primary); font-weight: 600; text-decoration: none;
  box-shadow: 0 10px 30px -12px color-mix(in oklch, var(--primary) 70%, transparent);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -14px color-mix(in oklch, var(--primary) 80%, transparent); }
.btn--ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--outline); }
.btn--ghost:hover { box-shadow: inset 0 0 0 1.5px var(--text); }
.btn--small { padding: .55rem 1rem; font-size: .92rem; }

/* Header */
.bar {
  position: sticky; top: .75rem; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  width: min(var(--max), calc(100% - 1.5rem)); margin: .75rem auto 0;
  padding: .45rem .45rem .45rem 1rem; border-radius: 99px;
  background: color-mix(in oklch, var(--panel) 72%, transparent);
  backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: inset 0 0 0 1px var(--line), 0 8px 30px -18px rgb(0 0 0 / .4);
}
.bar__brand img { height: 28px; width: auto; }
.bar__nav { display: flex; gap: 1.5rem; font-weight: 600; font-size: .92rem; }
.bar__nav a { text-decoration: none; color: var(--muted); transition: color .2s; }
.bar__nav a:hover { color: var(--text); }
.bar__tools { display: flex; align-items: center; gap: .25rem; }
.icon-btn {
  display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border: 0; border-radius: 50%;
  background: transparent; color: var(--text); cursor: pointer; font: 800 .82rem var(--sans); letter-spacing: .04em;
  transition: background .2s;
}
.icon-btn:hover { background: var(--surface); }
.no-js .icon-btn { display: none; }
@media (max-width: 720px) { .bar__nav { display: none; } }
@media (max-width: 420px) {
  .bar { padding-left: .8rem; gap: .5rem; }
  .bar__brand img { height: 24px; }
  .bar__tools { gap: 0; }
  .icon-btn { width: 2.25rem; height: 2.25rem; }
  .btn--small { padding: .5rem .8rem; font-size: .86rem; }
}

/* Elements for one theme only (logos, toggle icons) */
.only-dark { display: none; }
:root[data-theme="dark"] .only-dark { display: block; }
:root[data-theme="dark"] .only-light { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .only-dark { display: block; }
  :root:not([data-theme]) .only-light { display: none; }
}
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .35s; }

/* English visitors: German text stays hidden until i18n.js has run (theme.js sets the class) */
.i18n-pending main, .i18n-pending .bar { visibility: hidden; }

/* Layout */
main > section { width: min(var(--max), 100% - 2 * var(--pad)); margin-inline: auto; }
.section { padding-block: clamp(3rem, 6vw, 5rem); }
.section__head { display: grid; gap: .75rem; margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.section--tight { padding-top: 0; }

.card {
  background: var(--panel); border-radius: var(--radius-lg); padding: clamp(1.25rem, 2.2vw, 1.75rem);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-1);
}
.card h3 { margin-bottom: .5rem; }
.card p { color: var(--muted); }

/* Hero */
.hero {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: clamp(2rem, 6vw, 5rem);
  padding-block: clamp(2rem, 5vw, 4rem);
}
.hero__text { display: grid; gap: 1.25rem; justify-items: start; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .25rem; }
@media (max-width: 720px) { .hero { grid-template-columns: 1fr; } }

/* Phone with the real app: outer radius = inner radius + padding */
.phone-wrap { justify-self: center; display: grid; justify-items: center; gap: 1rem; width: min(18rem, 100%); }
@media (max-width: 860px) { .phone-wrap { width: min(15.5rem, 72vw); } }
.phone {
  margin: 0; width: 100%; padding: .5rem; border-radius: 2.5rem;
  background: var(--frame);
  box-shadow: var(--shadow-2), inset 0 0 0 1px rgb(255 255 255 / .1);
  animation: float 7s ease-in-out infinite;
}
.phone__screen {
  position: relative; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none;
  border-radius: 2rem; aspect-ratio: 400 / 781; background: #F4EFE6;
}
.phone__screen::-webkit-scrollbar { display: none; }
.phone__screen:focus-visible { outline-offset: -3px; }
.phone__screen img { width: 100%; }
.phone__below { display: flex; align-items: center; gap: .5rem; }
.phone__hint, .phone__replay {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .4rem .85rem; border-radius: 99px; border: 0;
  background: var(--surface); color: var(--muted); font: 600 .8rem var(--sans);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: opacity .4s var(--ease), color .2s;
}
.phone__replay { cursor: pointer; }
.phone__replay:hover { color: var(--text); }
.no-js .phone__replay { display: none; }
.phone-wrap.is-scrolled .phone__hint { opacity: 0; }
.phone-wrap:has(.phone:not([data-step="result"])) .phone__below { opacity: 0; pointer-events: none; }

/* Demo layers over the screen */
.phone { position: relative; }
.demo { position: absolute; inset: .5rem; border-radius: 2rem; overflow: hidden; pointer-events: none; }
.demo__start, .demo__camera { position: absolute; inset: 0; transition: opacity .45s var(--ease), scale .45s var(--ease); }
.demo__start img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.demo__camera { background: #0B0907; display: grid; place-content: center; gap: 1.1rem; padding: 0 .6rem; opacity: 0; scale: 1.04; }
.demo__frame { position: relative; border-radius: .9rem; overflow: hidden; }
.demo__frame img { width: 100%; }
.demo__corners {
  position: absolute; inset: .6rem; border-radius: .5rem;
  background:
    linear-gradient(#F4CB52 0 0) top left / 1.1rem 2px no-repeat, linear-gradient(#F4CB52 0 0) top left / 2px 1.1rem no-repeat,
    linear-gradient(#F4CB52 0 0) top right / 1.1rem 2px no-repeat, linear-gradient(#F4CB52 0 0) top right / 2px 1.1rem no-repeat,
    linear-gradient(#F4CB52 0 0) bottom left / 1.1rem 2px no-repeat, linear-gradient(#F4CB52 0 0) bottom left / 2px 1.1rem no-repeat,
    linear-gradient(#F4CB52 0 0) bottom right / 1.1rem 2px no-repeat, linear-gradient(#F4CB52 0 0) bottom right / 2px 1.1rem no-repeat;
}
.demo__label { text-align: center; color: #F4EFE6; font-weight: 600; font-size: .85rem; letter-spacing: .02em; }
.demo__tap {
  position: absolute; left: 29%; top: 41%; width: 3rem; height: 3rem; margin: -1.5rem 0 0 -1.5rem; border-radius: 50%;
  background: rgb(244 203 82 / .55); box-shadow: 0 0 0 0 rgb(244 203 82 / .5); opacity: 0; scale: .4;
}
.phone[data-step="tap"] .demo__tap { animation: tap .6s var(--ease) forwards; }
.phone[data-step="camera"] .demo__start { opacity: 0; scale: .96; }
.phone[data-step="camera"] .demo__camera { opacity: 1; scale: 1; }
.phone[data-step="result"] .demo { visibility: hidden; transition: visibility 0s .45s; }
.phone[data-step="result"] .demo__start, .phone[data-step="result"] .demo__camera { opacity: 0; }
@keyframes tap { 30% { opacity: 1; scale: 1; } 100% { opacity: 0; scale: 1.5; box-shadow: 0 0 0 1.2rem rgb(244 203 82 / 0); } }

.scan-line {
  position: absolute; inset-inline: 4%; height: 2px; top: 8%;
  background: linear-gradient(90deg, transparent, #F4CB52, transparent);
  box-shadow: 0 0 18px 4px rgb(244 203 82 / .55);
  animation: scan 1.1s var(--ease) infinite alternate;
}
/* Light screenshots glare less on the dark page */
:root[data-theme="dark"] :is(.phone__screen, .gallery__phone) img { filter: brightness(.88); }

@keyframes float { 50% { translate: 0 -8px; } }
@keyframes scan { to { top: 90%; } }

/* Bins */
.bin { display: flex; align-items: center; gap: .75rem; padding: .75rem .9rem; border-radius: var(--radius-sm); background: var(--surface); }
.bin__dot { flex: none; width: 1.25rem; height: 1.25rem; border-radius: 50%; box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--muted); }
.bin--bio .bin__dot { background: var(--bin-bio); }
.bin--rest .bin__dot { background: var(--bin-rest); }

/* Compare */
.compare { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1.25rem; }
.compare__card { display: grid; gap: .2rem; }
.card .compare__plz { font-family: var(--serif); font-size: clamp(2.5rem, 5vw, 3.5rem); line-height: 1; color: var(--text); }
.compare__place { margin-bottom: .9rem; }
.compare__vs { font-size: 2rem; width: 3.75rem; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.compare .bin strong { font-size: 1.05rem; }
@media (max-width: 720px) {
  .compare { grid-template-columns: 1fr; gap: .75rem; }
  .compare__vs { justify-self: center; width: 3rem; font-size: 1.6rem; }
}

/* Steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.step__num {
  display: grid; place-items: center; width: 2.25rem; height: 2.25rem; margin-bottom: 1rem; border-radius: 50%;
  background: color-mix(in oklch, var(--accent) 15%, var(--panel)); color: var(--accent-text);
  font: 800 1rem var(--sans);
}
@media (max-width: 600px) { .steps { grid-template-columns: 1fr; } }

/* App gallery: swipe sideways where it does not fit, snaps to each screen */
.gallery {
  list-style: none; margin: 0 calc(-1 * var(--pad)); padding: .5rem var(--pad) 1.25rem;
  display: flex; gap: clamp(1rem, 2.5vw, 1.75rem);
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--pad); scrollbar-width: thin;
}
@media (min-width: 1000px) { .gallery { justify-content: center; overflow: visible; } }
.gallery__item { flex: 0 0 clamp(11rem, 55vw, 13.5rem); scroll-snap-align: start; margin: 0; display: grid; gap: .8rem; align-content: start; }
.gallery__phone {
  padding: .4rem; border-radius: 1.95rem; background: var(--frame);
  box-shadow: var(--shadow-2), inset 0 0 0 1px rgb(255 255 255 / .1);
  transition: transform .35s var(--ease);
}
.gallery__phone img { border-radius: 1.55rem; width: 100%; }
.gallery__item:hover .gallery__phone { transform: translateY(-4px); }
.gallery__item figcaption { font-size: .9rem; color: var(--muted); padding-inline: .25rem; }

/* Bento */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.bento__wide { grid-column: span 2; }
.bento--moss { background: linear-gradient(150deg, #3F5A2A, #2C4220); color: #FBF8F1; }
:root[data-theme="dark"] .bento--moss { background: linear-gradient(150deg, #2E4220, #1E2C15); color: #F3EDE2; }
.bento--moss p { color: inherit; opacity: .85; }
.bento--gold { background: linear-gradient(150deg, #F4CB52, #D9A031 60%, #C88A28); color: #1F1A13; }
.card.bento--gold p { color: #1F1A13; }
.bento--gold h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); }
@media (max-width: 860px) { .bento { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .bento { grid-template-columns: 1fr; } .bento__wide { grid-column: auto; } }

/* CTA */
.cta { display: grid; justify-items: center; text-align: center; gap: 1rem; }
.section.cta { padding-block: clamp(3rem, 6vw, 4.5rem); }
.cta .lead { margin-bottom: .5rem; }

/* Legal */
.section.legal { border-top: 1px solid var(--line); padding-bottom: 2.5rem; }
.legal__grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: clamp(2rem, 6vw, 4rem); }
.legal h2 { font-size: 1.5rem; margin-bottom: .9rem; }
.legal p, .legal address { font-size: .92rem; color: var(--muted); margin-bottom: .8rem; font-style: normal; }
.legal strong { color: var(--text); font-weight: 600; }
.legal .legal__note { font-size: .82rem; }
@media (max-width: 860px) { .legal__grid { grid-template-columns: 1fr; } }

.foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .25rem 1rem;
  padding: 1.5rem var(--pad) 2rem; color: var(--muted); font-size: .85rem;
}
.foot img { width: 22px; height: 22px; }
.foot__links { display: flex; gap: 1rem; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--text); }

/* Scroll-driven reveal, only where supported and wanted */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal {
      animation: reveal linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 20%;
    }
    @keyframes reveal { from { opacity: 0; translate: 0 1.5rem; } }
  }
}
@media (prefers-reduced-motion: reduce) {
  .phone, .scan-line { animation: none; }
}
