/* setafo.com site stylesheet (hugo-kit: kit.css, theme file, then this file): header, footer, logo, the site blocks
   of layouts/_partials/blocks/, the contact form and the site layouts (legal, data-deletion, blog). Colours from the
   tokens of assets/theme.css; the dark footer and the logo have their own values below. */
@layer site {
  /* Border-box sizing, as on the other hugo-kit sites: the kit's sizes (button min-height, block widths) assume it. */
  *, *::before, *::after { box-sizing: border-box; }
  /* Anchors and focused fields stay clear of the sticky header (a11y review PR A, A6). */
  html { scroll-behavior: smooth; scroll-padding-top: 6rem; }
  @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

  /* Logo (header, footer, campaign header): the manage app's wordmark. A logotype, so its grey tagline is exempt
     from the contrast minimum. */
  .sf-logo-name { display: block; font-family: 'Open Sans Condensed', sans-serif; font-size: 36px; font-weight: 300; line-height: 1; color: #565656; }
  .sf-logo-tagline { display: block; font-size: 12px; color: #999; }
  .sf-hl { color: #e8b32a; font-weight: 700; }

  /* Header: white, sticky; menu inline from 64rem, behind the menu button below. */
  .sf-header {
    position: sticky; top: 0; z-index: 50;
    background: var(--color-bg); border-bottom: 2px solid #51d466; box-shadow: 0 1px 3px rgb(15 23 42 / 0.06);
    font-family: var(--font-body);
  }
  .sf-header__inner {
    max-width: 80rem; margin-inline: auto; padding: var(--space-2) 20px;
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-4);
  }
  .sf-header__logo { text-decoration: none; padding-block: var(--space-2); }
  .sf-header__toggle {
    display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0;
    border: 0; border-radius: var(--radius); background: none; color: var(--color-text); cursor: pointer;
  }
  /* Open menu on narrow screens: below the logo row, scrolling on its own at 400 % zoom and in landscape (A3). */
  .sf-header__menu {
    flex-basis: 100%; max-height: calc(100dvh - 5rem); overflow-y: auto;
    display: flex; flex-direction: column; gap: var(--space-2); padding-block: var(--space-2) var(--space-3);
    border-top: 1px solid var(--color-line);
  }
  .sf-header__menu[hidden] { display: none; }
  .sf-header__links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
  .sf-header__links a, .sf-header__login {
    display: block; padding: 0.6rem var(--space-3); border-radius: var(--radius);
    color: var(--color-text-muted); font-size: 0.95rem; font-weight: 500; text-decoration: none;
    &:hover { color: var(--color-accent); background: color-mix(in oklch, var(--color-accent), white 94%); }
  }
  .sf-header__links a[aria-current="page"] { color: var(--color-accent); font-weight: 700; }
  .sf-header__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
  @media (min-width: 64rem) {
    .sf-header__toggle { display: none; }
    .sf-header__menu, .sf-header__menu[hidden] {
      display: flex; flex-direction: row; align-items: center; flex: 1; justify-content: space-between;
      max-height: none; overflow: visible; padding: 0; border: 0;
    }
    .sf-header__links { flex-direction: row; gap: var(--space-2); margin-inline: auto; }
    .sf-header__links a { padding-inline: var(--space-2); }
  }

  /* Footer: navy band, light text; the focus ring in a teal that holds 3:1 on navy. */
  .sf-footer {
    --color-focus: #2dd4bf;
    background: #0f172a; color: #d1d5db; font-family: var(--font-body); font-size: 0.95rem;
    & a { color: inherit; text-decoration: none; }
    & a:hover { color: #2dd4bf; }
    & .kit-button, & .kit-button:hover { color: var(--color-accent-contrast); }
    & .sf-logo-name { color: #fff; font-size: 22px; }
    & .sf-logo-tagline { color: #888; }
  }
  .sf-footer__cta {
    padding: var(--space-5) 20px; text-align: center; border-bottom: 1px solid rgb(255 255 255 / 0.1);
    & h2 { margin: 0 0 var(--space-3); color: #fff; font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 2.25rem); line-height: 1.2; }
    & p { max-width: 42rem; margin: 0 auto var(--space-4); color: #9ca3af; font-size: 1.1rem; }
    & p:last-child { margin-bottom: 0; }
  }
  .sf-footer__booking { color: #9ca3af; font-size: 0.9rem; }
  .sf-footer__inner { max-width: 80rem; margin-inline: auto; padding: var(--space-5) 20px; }
  .sf-footer__columns {
    display: grid; gap: var(--space-4); grid-template-columns: repeat(2, 1fr);
    @media (min-width: 48rem) { grid-template-columns: repeat(4, 1fr); }
    & h3 { margin: 0 0 var(--space-3); color: #fff; font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
    & ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
  }
  .sf-footer__brand {
    grid-column: 1 / -1;
    @media (min-width: 48rem) { grid-column: auto; }
    & p { color: #9ca3af; line-height: 1.6; }
  }
  .sf-footer__logo { display: inline-block; }
  .sf-footer__bottom {
    margin-top: var(--space-5); padding-top: var(--space-4); border-top: 1px solid rgb(255 255 255 / 0.1);
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2); color: #9ca3af; font-size: 0.85rem;
    & p { margin: 0; }
  }

  /* Hero title: break only at the hyphen of compound words ("Online-Bestellungen"), never inside a word, and at most
     3rem, so the product hero's half column holds it at 1440 px. */
  .kit-hero__title { hyphens: manual; }
  .kit-hero--product .kit-hero__title { font-size: clamp(2rem, 5vw, 3rem); }

  /* Campaign header logo: baker icon plus the wordmark (.sf-logo-name, .sf-logo-tagline above). */
  .kit-campaign-header__logo { display: inline-flex; align-items: center; gap: var(--space-2); text-decoration: none; }
  .sf-campaign-logo__icon { display: block; width: 40px; height: 40px; }
  .sf-campaign-logo__text { line-height: 1; }

  /* stats: key figures in a row, wrapping on narrow screens. */
  .sf-stats__list {
    list-style: none; padding: 0; margin: 0; max-width: none;
    display: grid; gap: var(--space-4); text-align: center;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr));
    & li { display: flex; flex-direction: column; gap: var(--space-2); }
  }
  .sf-stats__value { font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 2.4rem); font-weight: 700; color: var(--color-accent); }
  .sf-stats__label { color: var(--color-text-muted); font-size: 0.95rem; }

  /* steps: numbered tiles. */
  .sf-steps__list {
    list-style: none; padding: 0; max-width: none;
    display: grid; gap: var(--space-4);
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
    & h3 { margin: var(--space-3) 0 var(--space-2); font-family: var(--font-display); }
    & p { margin: 0; color: var(--color-text-muted); }
  }
  .sf-steps__n {
    display: inline-flex; align-items: center; justify-content: center; inline-size: 3rem; block-size: 3rem;
    border-radius: var(--radius); background: color-mix(in oklch, var(--color-accent), white 85%);
    color: var(--color-accent); font-family: var(--font-display); font-size: 1.4rem; font-weight: 700;
  }

  /* trust: badges and integration logos. */
  .sf-trust__badges, .sf-trust__logos {
    list-style: none; padding: 0; max-width: none; display: flex; flex-wrap: wrap; gap: var(--space-3);
  }
  .sf-trust__badges li {
    padding: var(--space-2) var(--space-3); border: 1px solid var(--color-line); border-radius: 999px;
    background: var(--color-surface); font-weight: 600; font-size: 0.95rem;
    &::before { content: "✓" / ""; margin-inline-end: 0.4em; color: var(--color-accent); font-weight: 700; }
  }
  .sf-trust__label { margin-block: var(--space-4) var(--space-3); color: var(--color-text-muted); font-size: 0.9rem; font-weight: 600; }
  .sf-trust__logos { gap: var(--space-4); align-items: center; & .kit-img { width: 32px; height: 32px; border-radius: 0; } }

  /* pricing: plan cards from data/plans.yaml. */
  .sf-pricing__note { padding: var(--space-3); border-radius: var(--radius); background: color-mix(in oklch, var(--color-accent), white 90%); font-weight: 600; }
  .sf-pricing__plans {
    list-style: none; padding: 0; max-width: none;
    display: grid; gap: var(--space-3);
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  }
  .sf-plan {
    display: flex; flex-direction: column; padding: var(--space-4);
    border: 1px solid var(--color-line); border-radius: var(--radius); background: var(--color-bg);
    & h3 { margin: 0; font-family: var(--font-display); font-size: 1.3rem; }
    & .kit-button { justify-content: center; margin-top: auto; }
  }
  .sf-plan--highlight { border: 2px solid var(--color-accent); }
  .sf-plan__badge {
    align-self: flex-start; margin: 0 0 var(--space-2); padding: 0.2em 0.7em; border-radius: 999px;
    background: color-mix(in oklch, var(--color-accent), white 88%); color: var(--color-accent); font-size: 0.8rem; font-weight: 700;
  }
  .sf-plan__tagline { margin: var(--space-2) 0 var(--space-3); color: var(--color-text-muted); font-size: 0.95rem; }
  .sf-plan__price { margin: 0 0 var(--space-3); }
  .sf-plan__amount { font-family: var(--font-display); font-size: 2rem; font-weight: 800; }
  .sf-plan__period { color: var(--color-text-muted); font-size: 0.9rem; }
  .sf-plan__features {
    list-style: none; padding: 0; margin: 0 0 var(--space-4); font-size: 0.95rem;
    & li { position: relative; padding-left: 1.5em; margin-block: var(--space-2); }
    & li::before { content: "✓" / ""; position: absolute; left: 0; color: var(--color-accent); font-weight: 700; }
    & .sf-plan__base { padding-left: 0; font-weight: 700; &::before { content: none; } }
  }
  .sf-pricing__vat { color: var(--color-text-muted); font-size: 0.9rem; }

  /* price-compare: two cost tiles. */
  .sf-price-compare__list {
    list-style: none; padding: 0; max-width: 36rem;
    display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  }
  .sf-price-compare__item {
    display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-4); text-align: center;
    border: 1px solid var(--color-line); border-radius: var(--radius); background: var(--color-surface);
  }
  .sf-price-compare__item--bad { border-color: #fca5a5; background: #fef2f2; }
  .sf-price-compare__item--good { border-color: color-mix(in oklch, var(--color-accent), white 60%); background: color-mix(in oklch, var(--color-accent), white 92%); }
  .sf-price-compare__label { font-weight: 700; }
  .sf-price-compare__value { font-family: var(--font-display); font-size: 1.8rem; font-weight: 800; }
  .sf-price-compare__item--bad .sf-price-compare__value { color: #b91c1c; }
  .sf-price-compare__item--good .sf-price-compare__value { color: var(--color-accent); }
  .sf-price-compare__text { color: var(--color-text-muted); font-size: 0.9rem; }

  /* feature (/funktionen/): the kit's features layout, image first on wide screens with flip. */
  .sf-feature__eyebrow {
    display: inline-block; margin: 0 0 var(--space-2); padding: 0.2em 0.8em; border-radius: 999px;
    background: color-mix(in oklch, var(--color-accent), white 88%); color: var(--color-accent); font-size: 0.8rem; font-weight: 700;
  }
  .sf-feature__aside { font-size: 0.95rem; & a { font-weight: 600; } }
  .sf-feature .kit-features__image .kit-img { border: 1px solid var(--color-line); box-shadow: 0 20px 40px -20px color-mix(in oklch, var(--color-text), transparent 60%); }
  .sf-feature__image--portrait .kit-img { max-width: 20rem; margin-inline: auto; }
  @container (min-width: 48rem) { .sf-feature--flip .kit-features__image { order: -1; } }
  .sf-feature__entries {
    list-style: none; padding: 0; margin-block: var(--space-4); max-width: none; display: grid; gap: var(--space-3);
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
    & li { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-3);
      border: 1px solid var(--color-line); border-radius: var(--radius); background: var(--color-surface); }
    & strong { display: block; }
  }
  .sf-feature__mark {
    display: inline-flex; flex: none; align-items: center; justify-content: center; inline-size: 2.5rem; block-size: 2.5rem;
    border-radius: var(--radius); background: color-mix(in oklch, var(--color-accent), white 85%); color: var(--color-accent);
    font-size: 0.8rem; font-weight: 700;
  }
  .sf-feature__entry-text { display: block; color: var(--color-text-muted); font-size: 0.9rem; }

  /* plans-included (/preise/): the shared features in columns. */
  .sf-included__list { max-width: none; columns: 16rem; column-gap: var(--space-4); & li { break-inside: avoid; margin-block: 0 var(--space-2); } }

  /* downloads (/apps/): one tile per platform; downloads.js hides tiles and alternates with the hidden attribute. */
  .sf-downloads__version { font-weight: 700; color: var(--color-accent); }
  .sf-downloads__list {
    list-style: none; padding: 0; margin-top: var(--space-4); max-width: none; display: grid; gap: var(--space-4);
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  }
  .sf-download {
    display: flex; flex-direction: column; align-items: center; gap: var(--space-2); padding: var(--space-4); text-align: center;
    border: 1px solid var(--color-line); border-radius: var(--radius); background: var(--color-surface);
    & h3 { margin: var(--space-2) 0 0; font-family: var(--font-display); }
    & p { margin: 0 0 var(--space-2); color: var(--color-text-muted); font-size: 0.95rem; }
    & .kit-button { align-self: stretch; justify-content: center; }
  }
  .sf-download[hidden], .sf-download__alt[hidden] { display: none; }
  .sf-download__alt { font-size: 0.9rem; padding-block: 0.6em; }

  /* store placeholders (kit/site/store-badges.html): not links, greyed. */
  .sf-stores {
    list-style: none; padding: 0; max-width: none; display: flex; flex-wrap: wrap; gap: var(--space-3);
    & li { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-4);
      border: 1px solid var(--color-line); border-radius: var(--radius); background: var(--color-surface); color: var(--color-text-muted); }
  }
  .sf-stores__name { display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; }
  .sf-stores__soon { display: block; font-weight: 700; }

  /* contact (/kontakt/): form beside the details, stacked on narrow screens. */
  .sf-contact {
    display: grid; gap: var(--space-5); align-items: start;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
    & h2 { margin-top: 0; }
  }
  .sf-contact__details {
    margin: 0; display: grid; gap: var(--space-3);
    & dt { font-weight: 700; }
    & dd { margin: 0; }
    & address { font-style: normal; }
  }
  .sf-contact__booking {
    margin-top: var(--space-4); padding: var(--space-4); border-radius: var(--radius);
    background: color-mix(in oklch, var(--color-accent), white 90%);
    & h3 { margin: 0 0 var(--space-2); }
    & p { margin: 0 0 var(--space-2); }
    & a { font-weight: 700; }
  }

  /* Site layouts (legal, data-deletion, blog): the kit's width and spacing, without blocks. */
  .sf-page {
    max-width: var(--kit-width); margin-inline: auto; padding: var(--space-5) 20px;
    & h1 { font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; line-height: 1.1; margin: 0 0 var(--space-3); overflow-wrap: break-word; }
    & a { color: var(--color-accent); }
  }
  .sf-page__head { text-align: center; margin-bottom: var(--space-5); & p { max-width: var(--measure); margin-inline: auto; color: var(--color-text-muted); font-size: 1.15rem; } }
  .sf-page__body { max-width: 56rem; margin-inline: auto; }
  .sf-tags {
    list-style: none; margin: var(--space-3) 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2);
    & li { padding: 0.15em 0.7em; border-radius: 999px; background: color-mix(in oklch, var(--color-accent), white 90%);
      color: var(--color-accent); font-size: 0.8rem; font-weight: 600; }
  }
  .sf-blog__list {
    list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-4);
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  }
  .sf-blog__post article {
    height: 100%; box-sizing: border-box; padding: var(--space-4); border: 1px solid var(--color-line); border-radius: var(--radius);
    background: var(--color-bg);
    & h2 { margin: 0 0 var(--space-2); font-family: var(--font-display); font-size: 1.2rem; line-height: 1.3; }
    & h2 a { color: var(--color-text); text-decoration: none; }
    & h2 a:hover { color: var(--color-accent); }
    & > p { color: var(--color-text-muted); font-size: 0.95rem; }
  }
  .sf-blog__more { font-weight: 600; font-size: 0.95rem; }
  .sf-pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: var(--space-3); margin-top: var(--space-5); }

  /* hugo-kit 404 page: its link in the accent colour. */
  .kit-page a { color: var(--color-accent); }

  /* Long text (legal pages, data deletion, blog posts): Markdown and shared/legal/*.html. */
  /* kit-legal pages: the contact form after the Impressum text keeps the text's width; without the form the kit
     leaves the text without bottom padding (kit.css: .kit-legal__body). */
  .kit-legal__contact > * { max-width: var(--measure); }
  .kit-legal__body:last-child { padding-bottom: var(--space-5); }

  .sf-prose {
    color: var(--color-text-muted); line-height: 1.75; max-width: var(--measure);
    & section { margin-bottom: var(--space-5); padding-bottom: var(--space-4); border-bottom: 1px solid var(--color-line); }
    & section:last-child { border-bottom: 0; }
    & h2 { margin: var(--space-5) 0 var(--space-3); color: var(--color-text); font-family: var(--font-display); font-size: 1.5rem; line-height: 1.3; }
    & h3 { margin: var(--space-4) 0 var(--space-2); color: var(--color-text); font-size: 1.125rem; }
    & section > h2:first-child, & > h2:first-child { margin-top: 0; }
    & p, & ul, & ol { margin: 0 0 var(--space-3); }
    & ul, & ol { padding-left: 1.5rem; }
    & li { margin-bottom: 0.25rem; }
    & a { color: var(--color-accent); }
    & strong { color: var(--color-text); }
    & hr { border: 0; border-top: 1px solid var(--color-line); margin: var(--space-5) 0; }
    & code { padding: 0.1em 0.35em; border-radius: 4px; background: var(--color-surface); font-size: 0.875em; }
  }

  /* Contact form (layouts/_partials/contact-form.html); hugo-kit contact-form.js sets the status classes. */
  .sf-form {
    display: grid; gap: var(--space-4);
    & label { display: block; margin-bottom: 0.3rem; font-size: 0.9rem; font-weight: 600; }
    & :is(input[type="text"], input[type="email"], select, textarea) {
      box-sizing: border-box; width: 100%; padding: 0.75rem 1rem; font: inherit; font-size: 0.95rem; color: var(--color-text);
      background: var(--color-bg); border: 1px solid #8a8780; border-radius: var(--radius);
    }
    & textarea { resize: vertical; }
    & .kit-button { gap: var(--space-2); }
  }
  .sf-form__note { margin: 0; color: var(--color-text-muted); font-size: 0.9rem; }
  .sf-form__req { color: #b91c1c; font-weight: 700; }
  .sf-form__consent {
    display: flex; align-items: flex-start; gap: var(--space-2); font-size: 0.9rem; color: var(--color-text-muted);
    & label { display: inline; margin: 0; font-weight: 400; }
    & input { flex: none; width: 1.1rem; height: 1.1rem; margin-top: 0.15rem; accent-color: var(--color-accent); }
    & a { color: var(--color-accent); }
  }
  .contact-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
  .contact-status { margin-top: var(--space-3); font-size: 0.9rem; }
  .contact-status--ok { color: var(--color-accent); }
  .contact-status--error { color: #b91c1c; }
}
