/* ---------------------------------------------------------------------------
   filahub landing page.

   Dark only, on purpose: the screenshots are dark and the page is meant to
   read as one surface with the app. The colour tokens below are the app's own
   dark theme (src/index.css, the 3.0 palette) measured from the running app
   and written as hex, and the four accent values are the fill-level ramp from
   src/lib/format.ts — red at 10 % and under, orange to 25 %, yellow to 50 %,
   green above.

   The ramp values are Tailwind's palette, and Tailwind 4 restated it in OKLCH:
   the hexes below are what the browser actually paints and what the
   screenshots in assets/ show. They are not the Tailwind 3 values the app used
   until it moved over. Re-measure them from a fresh screenshot rather than
   copying them out of the docs.

   The two typefaces are the app's own, self-hosted from assets/fonts/ (the
   latin subsets of the variable fonts the app ships), so the page makes no
   request to anyone else.
--------------------------------------------------------------------------- */

@font-face {
  font-family: "Manrope Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(assets/fonts/manrope-latin-ext-wght-normal.woff2)
    format("woff2-variations");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Manrope Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(assets/fonts/manrope-latin-wght-normal.woff2)
    format("woff2-variations");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "JetBrains Mono Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url(assets/fonts/jetbrains-mono-latin-ext-wght-normal.woff2)
    format("woff2-variations");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "JetBrains Mono Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url(assets/fonts/jetbrains-mono-latin-wght-normal.woff2)
    format("woff2-variations");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #121417; /* --background   216 12% 8%   */
  --panel: #1b1e23; /* --card         218 13% 12%  */
  --panel-2: #16191d; /* --sidebar-bg   214 14% 10%  */
  --rule: #252a31; /* --border       215 14% 17%  */
  --text: #eaedf0; /* --foreground   210 16% 93%  */
  --dim: #8b93a2; /* --muted-fg     218 11% 59%  */

  --crit: #fb2c36; /* red-500     */
  --low: #ff6900; /* orange-500  */
  --mid: #f0b100; /* yellow-500  */
  --full: #00bc7d; /* emerald-500 */

  --mono:
    "JetBrains Mono Variable", ui-monospace, "SF Mono", SFMono-Regular,
    "Cascadia Mono", Menlo, Consolas, monospace;
  --sans:
    "Manrope Variable", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;

  --radius: 0.75rem; /* the app's --radius */
  --wrap: 76rem;
  --col: 44rem;

  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 0.3rem;
  padding: 0.1em 0.35em;
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 50;
  background: var(--text);
  color: var(--ink);
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius);
}

:focus-visible {
  outline: 2px solid var(--mid);
  outline-offset: 3px;
  border-radius: 0.25rem;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.col {
  max-width: var(--col);
}

/* --- header ------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--ink) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 3.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  width: 1.15rem;
  height: 1.15rem;
  color: var(--text);
}

.header-nav {
  display: none;
  gap: 1.5rem;
  margin-left: auto;
  font-size: 0.9375rem;
}

.header-nav a {
  color: var(--dim);
  text-decoration: none;
}

.header-nav a:hover {
  color: var(--text);
}

.header-cta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-left: auto;
}

@media (min-width: 62rem) {
  .header-nav {
    display: flex;
  }
  .header-cta {
    margin-left: 0;
  }
}

/* --- buttons ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  padding: 0.5rem 0.9rem;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

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

.btn-solid:hover {
  background: #d5dae0;
}

.btn-ghost {
  border-color: var(--rule);
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--panel);
  border-color: #3a4149;
}

.btn-lg {
  padding: 0.7rem 1.25rem;
  font-size: 1rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.25rem;
}

/* --- type --------------------------------------------------------------- */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1.25rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
}

.dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--dim);
  flex: none;
}
.dot-crit {
  background: var(--crit);
}
.dot-low {
  background: var(--low);
}
.dot-mid {
  background: var(--mid);
}
.dot-full {
  background: var(--full);
}

.display {
  margin: 0;
  font-family: var(--mono);
  font-size: clamp(2.1rem, 6.2vw, 3.6rem);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

h2 {
  margin: 0 0 1.1rem;
  font-family: var(--mono);
  font-size: clamp(1.5rem, 3.6vw, 2.05rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.lede {
  margin: 1.5rem 0 0;
  font-size: clamp(1.0625rem, 2.2vw, 1.25rem);
  line-height: 1.55;
  color: var(--dim);
}

.band p {
  margin: 0 0 1.1rem;
  color: var(--dim);
}

.band p:last-child {
  margin-bottom: 0;
}

/* Bewusst auf p beschränkt: ein pauschales `.band a` schlägt sonst die
   Button-Farben (gleiche Klasse, höhere Spezifität) und macht den weissen
   Primärbutton unlesbar. */
.band p a {
  color: var(--text);
  text-decoration-color: var(--rule);
  text-underline-offset: 0.2em;
}

.band p a:hover {
  text-decoration-color: var(--accent, var(--mid));
}

.band p.formula {
  font-family: var(--mono);
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--rule);
  /* der Streifen trägt die Akzentfarbe des jeweiligen Abschnitts */
  border-left: 2px solid var(--accent, var(--dim));
  border-radius: var(--radius);
  padding: 0.85rem 1.1rem;
}

/* Begriff und Erklärung – Materialarten, Gebindeformen, Freigabe- und
   Mitgliedsstufen. Bewusst dieselbe Kiste wie .formula statt einer Tabelle:
   die Seite kommt so mit einem einzigen Auszeichnungsmuster aus. */
.band dl.spec {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.55rem 1.35rem;
  margin: 0 0 1.4rem;
  padding: 1.1rem 1.25rem;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-left: 2px solid var(--accent, var(--dim));
  border-radius: var(--radius);
  font-size: 0.97rem;
}

.band dl.spec dt {
  font-family: var(--mono);
  font-size: 0.84rem;
  letter-spacing: 0.01em;
  color: var(--text);
  white-space: nowrap;
}

.band dl.spec dd {
  margin: 0;
  color: var(--dim);
}

/* Die Füllstandsskala als Legende – erklärt die Balkenfarben in den
   Abbildungen und ist die einzige Stelle, an der alle vier Werte vorkommen. */
.ramp {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  margin: 0 0 1.4rem;
  padding: 0;
  list-style: none;
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

.ramp li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--dim);
}

.ramp li::before {
  content: "";
  width: 1.4rem;
  height: 0.3rem;
  border-radius: 999px;
  background: var(--c);
  flex: none;
}

@media (max-width: 34rem) {
  .band dl.spec {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
  .band dl.spec dd {
    margin-bottom: 0.7rem;
  }
  .band dl.spec dd:last-child {
    margin-bottom: 0;
  }
}

/* --- hero --------------------------------------------------------------- */

.hero {
  padding: clamp(3.5rem, 9vw, 6rem) 0 clamp(2.5rem, 6vw, 4rem);
}

.hero-grid {
  display: grid;
  gap: clamp(2.5rem, 6vw, 4rem);
  align-items: center;
}

.hero-text {
  max-width: var(--col);
}

@media (min-width: 68rem) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  }
}

/* --- the ledger: signature element -------------------------------------- */

.ledger {
  margin: 0;
  max-width: 40rem;
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem 1.25rem;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.ledger-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 0.4rem 0.9rem;
  padding: 0.42rem 0;
  font-size: 0.9375rem;
}

.ledger-key {
  color: var(--text);
}

.ledger-note {
  font-size: 0.75rem;
  letter-spacing: 0.01em;
  color: #6f7784;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ledger-val {
  color: var(--text);
  white-space: nowrap;
}

.ledger-sub {
  color: var(--dim);
}

.ledger-rule {
  height: 1px;
  margin: 0.5rem 0;
  background: var(--rule);
  transform-origin: left;
}

.ledger-total {
  padding-top: 0.15rem;
  font-size: 1.0625rem;
  font-weight: 600;
}

.ledger-total .ledger-val em {
  font-style: normal;
  font-weight: 500;
  color: var(--mid);
  margin-left: 0.5rem;
}

.bar {
  height: 0.4rem;
  margin-top: 0.9rem;
  border-radius: 999px;
  background: var(--rule);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  width: 36%;
  border-radius: 999px;
  background: var(--mid);
}

.ledger figcaption {
  margin-top: 1.1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #6f7784;
}

/* one orchestrated reveal: the subtraction assembles itself */
@media (prefers-reduced-motion: no-preference) {
  .ledger-row,
  .ledger-rule,
  .bar {
    animation: rise 0.5s cubic-bezier(0.22, 1, 0.36, 1) backwards;
    animation-delay: calc(0.32s + var(--i) * 0.09s);
  }

  .bar-fill {
    animation: fill 0.85s cubic-bezier(0.22, 1, 0.36, 1) backwards;
    animation-delay: 0.95s;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(0.4rem);
  }
}

@keyframes fill {
  from {
    width: 0;
  }
}

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

.band {
  padding: clamp(3.5rem, 9vw, 6.5rem) 0;
  border-top: 1px solid var(--rule);
}

.band-close {
  border-bottom: 1px solid var(--rule);
}

/* --- screenshots -------------------------------------------------------- */

.shot {
  margin: 2.75rem auto 0;
  width: 100%;
  max-width: var(--wrap);
  padding: 0 1.5rem;
}

.shot-lead {
  margin-top: 0;
}

.shot img {
  width: 100%;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--panel-2);
  box-shadow: 0 1.5rem 3.5rem rgb(0 0 0 / 0.5);
}

.shot figcaption {
  margin: 0.9rem auto 0;
  max-width: var(--col);
  font-size: 0.8125rem;
  color: #6f7784;
}

.band .shot + .wrap {
  margin-top: clamp(2.5rem, 6vw, 4rem);
}

/* --- self-hosting split ------------------------------------------------- */

.split {
  display: grid;
  gap: clamp(2.5rem, 6vw, 4rem);
  align-items: start;
}

.split-text {
  max-width: var(--col);
}

.split-text p {
  margin: 0 0 1.1rem;
  color: var(--dim);
}

.phone {
  margin: 0;
  max-width: 15rem;
}

.phone img {
  width: 100%;
  border: 1px solid var(--rule);
  border-radius: 1.4rem;
  box-shadow: 0 1.5rem 3.5rem rgb(0 0 0 / 0.5);
}

.phone figcaption {
  margin-top: 0.9rem;
  font-size: 0.8125rem;
  color: #6f7784;
}

@media (min-width: 56rem) {
  .split {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

/* --- footer ------------------------------------------------------------- */

.site-footer {
  padding: 3rem 0 4rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem 2rem;
}

.footer-brand {
  margin: 0;
  font-family: var(--mono);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.9375rem;
}

.footer-nav a {
  color: var(--dim);
  text-decoration: none;
}

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

.footer-note {
  flex-basis: 100%;
  margin: 0.5rem 0 0;
  font-size: 0.8125rem;
  color: #6f7784;
}

/* --- small screens ------------------------------------------------------ */

@media (max-width: 34rem) {
  .header-cta .btn-solid {
    display: none;
  }

  .ledger {
    padding: 1.1rem 1.1rem 1rem;
  }

  .ledger-row {
    grid-template-columns: 1fr auto;
  }

  .ledger-note {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-top: -0.2rem;
  }
}
