/*
  BianCuisine website – shared styles for every page (landing, legal, 404).
  Landing-only styles live in home.css. No JavaScript, no external resources.
  "Native Calm": warm cream, paper surfaces, Fraunces display type, Source Sans text.
  The fonts are subsets of Fraunces and Source Sans 3, renamed under the SIL OFL (fonts/, README.md).
*/

@font-face {
  font-family: "BianCuisine Display";
  src: url("fonts/display-600.8b17a02a.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "BianCuisine Text";
  src: url("fonts/text-400.d2bee8cc.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "BianCuisine Text";
  src: url("fonts/text-600.15a6254a.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* Local fallbacks with matched metrics, so text does not jump when the fonts arrive. */
@font-face {
  font-family: "Display Fallback";
  src: local("Georgia Bold"), local("Georgia-Bold");
  font-weight: 600;
  size-adjust: 85.38%;
  ascent-override: 114.55%;
  descent-override: 29.87%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Text Fallback";
  src: local("Arial"), local("ArialMT");
  font-weight: 400;
  size-adjust: 93.05%;
  ascent-override: 107.47%;
  descent-override: 35.04%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Text Fallback";
  src: local("Arial Bold"), local("Arial-BoldMT");
  font-weight: 600;
  size-adjust: 89.33%;
  ascent-override: 111.94%;
  descent-override: 36.49%;
  line-gap-override: 0%;
}

:root {
  color-scheme: light dark;

  --bg: #F5EDDF;
  --bg-alt: #EFE5D5;
  --paper: #FFFCF7;
  --warm: #FFF9F0;
  --sand: #E9DDCC;
  --ink: #211B17;
  --muted: #675E56;
  --line: #E6DACB;
  --outline: #D5C9B9;
  --accent: #8A4F3D;
  --accent-soft: #E3A08B;
  --on-accent: #FFFCF7;
  --mark: #356449;
  --tint: #F5EDDF;
  --shadow: 0 1px 2px rgb(33 27 23 / 0.06), 0 22px 44px -22px rgb(33 27 23 / 0.28);

  --display: "BianCuisine Display", "Display Fallback", Georgia, "Iowan Old Style", "Noto Serif", serif;
  --text: "BianCuisine Text", "Text Fallback", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --gutter: 16px;
  --radius: 20px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151914;
    --bg-alt: #1A1E18;
    --paper: #251E1A;
    --warm: #302722;
    --sand: #3B312B;
    --ink: #F5EDDF;
    --muted: #C8BBAD;
    --line: #3B312B;
    --outline: #5A4E43;
    --accent: #E3A08B;
    --accent-soft: #8A4F3D;
    --on-accent: #151914;
    --mark: #AECFB2;
    --tint: #2F2621;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 22px 44px -22px rgb(0 0 0 / 0.7);
  }
}

@media (min-width: 640px) {
  :root {
    --gutter: 24px;
  }
}

@media (min-width: 1024px) {
  :root {
    --gutter: 40px;
  }
}

/* Base */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.875rem, 1.35rem + 2.3vw, 2.625rem);
}

h2 {
  margin: 2.75rem 0 0.75rem;
  font-size: 1.4375rem;
  scroll-margin-top: 16px;
}

h3 {
  margin: 1.75rem 0 0.5rem;
  font-size: 1.1875rem;
}

p,
ul,
ol,
dl,
address {
  margin: 0 0 1rem;
}

p {
  text-wrap: pretty;
}

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

address {
  font-style: normal;
}

strong,
b {
  font-weight: 600;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

code {
  padding: 0.05em 0.3em;
  border-radius: 4px;
  background: var(--tint);
  font-family: var(--mono);
  font-size: 0.875em;
}

svg {
  flex: none;
}

/* Layout */

.shell,
.wrap {
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.shell {
  max-width: calc(760px + 2 * var(--gutter));
}

.wrap {
  max-width: calc(1180px + 2 * var(--gutter));
}

.skip-link {
  position: absolute;
  top: -200px;
  left: 12px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.skip-link:focus {
  top: 12px;
}

.site-header {
  display: flex;
  align-items: center;
  gap: 12px 28px;
  padding-block: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  text-decoration: none;
}

.brand-mark {
  width: 28px;
  height: 26px;
  fill: var(--mark);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-left: auto;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.2s ease;
}

.lang-switch:hover {
  border-color: var(--accent);
}

/* Footer */

.site-footer {
  margin-top: 56px;
  padding-block: 44px 36px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9375rem;
}

.footer-inner {
  display: grid;
  gap: 20px 56px;
}

@media (min-width: 720px) {
  .footer-inner {
    grid-template-columns: 1fr auto auto;
    align-items: start;
  }
}

.footer-brand {
  display: grid;
  justify-items: start;
  gap: 2px;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 720px) {
  .site-footer nav ul {
    flex-direction: column;
  }
}

.site-footer a {
  display: inline-block;
  padding-block: 7px;
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.site-footer .brand {
  color: var(--ink);
}

.site-footer a[aria-current] {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.footer-copy {
  margin-top: 28px;
  margin-bottom: 0;
  font-size: 0.875rem;
}

/* Legal documents */

.sheet {
  margin-inline: calc(-1 * var(--gutter));
  padding: 28px var(--gutter) 40px;
  border-block: 1px solid var(--line);
  background: var(--paper);
  -webkit-hyphens: auto;
  hyphens: auto;
  /* Only hyphenate long words (keeps "DSGVO", "Konto" etc. intact). */
  hyphenate-limit-chars: 10 4 4;
}

@media (min-width: 640px) {
  .sheet {
    margin-inline: 0;
    padding: 44px 48px 52px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
  }
}

.sheet li + li {
  margin-top: 0.375rem;
}

.meta {
  margin-bottom: 1.5rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.lead {
  font-size: 1.125rem;
}

.box {
  margin: 1.5rem 0;
  padding: 16px 20px;
  border-radius: 14px;
  background: var(--tint);
}

.box > :first-child {
  margin-top: 0;
}

.box > :last-child {
  margin-bottom: 0;
}

.box.important {
  border-left: 4px solid var(--accent);
}

.box-title {
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-family: var(--text);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
}

.toc ol {
  margin: 0;
  padding-left: 1.5rem;
}

.toc a {
  text-decoration: none;
}

.toc a:hover {
  text-decoration: underline;
}

@media (min-width: 640px) {
  .toc ol {
    columns: 2;
    column-gap: 2.5rem;
  }

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

/* Legal basis / retention summary at the end of a section */
.facts {
  display: grid;
  gap: 4px 16px;
  margin: 1rem 0 0;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--tint);
  font-size: 0.9375rem;
}

.facts dt {
  font-weight: 600;
}

.facts dd {
  margin: 0;
}

.facts dd + dt {
  margin-top: 6px;
}

@media (min-width: 640px) {
  .facts {
    grid-template-columns: max-content 1fr;
  }

  .facts dd + dt {
    margin-top: 0;
  }
}

/* Numbered clauses: (1), (2), … */
.clauses {
  padding-left: 0;
  list-style: none;
  counter-reset: clause;
}

.clauses > li {
  position: relative;
  padding-left: 2.25rem;
  counter-increment: clause;
}

.clauses > li::before {
  content: "(" counter(clause) ")";
  position: absolute;
  left: 0;
  color: var(--muted);
}

.clauses ul {
  margin: 0.5rem 0 0;
}

.providers {
  margin: 1rem 0 1.25rem;
  border-top: 1px solid var(--line);
}

.providers > div {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}

.providers dt {
  font-weight: 600;
}

.providers dd {
  margin: 0.25rem 0 0;
}

/* Not-found page */

.notfound {
  display: grid;
  justify-items: center;
  padding-block: 32px 24px;
  text-align: center;
}

.notfound-art {
  width: min(240px, 64vw);
  height: auto;
  margin-bottom: 16px;
}

.nf-shadow {
  fill: var(--ink);
  opacity: 0.07;
}

.nf-plate {
  fill: var(--paper);
  stroke: var(--line);
  stroke-width: 2;
}

.nf-rim {
  fill: none;
  stroke: var(--line);
  stroke-width: 2;
}

.nf-mark {
  fill: var(--mark);
}

.notfound .notfound-en {
  margin: 28px 0 0;
  font-size: 1rem;
}

.notfound h1 {
  font-size: clamp(2.25rem, 1.5rem + 3.5vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.notfound p {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 1.125rem;
}

.notfound-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.pill-link {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
}

.pill-link.quiet {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
}

@media print {
  .skip-link,
  .lang-switch,
  .site-footer nav {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }

  .sheet {
    border: 0;
    padding: 0;
  }
}
