/* Landing de BB-Flow: sin dependencias ni fuentes externas. Tokens → base → secciones → diagrama → movimiento. */
:root {
  --ink: #0c1f1b;
  --paper: #f5f7f4;
  --mint: #1fa37a;
  --mint-ink: #0e6e52;      /* mint con contraste suficiente para texto sobre papel */
  --line: #d5ddd8;
  --muted: #4d625b;
  --measure: 38rem;
  --pad: clamp(1.25rem, 4vw, 3rem);
  font-family: "Avenir Next", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
body { margin: 0; background: var(--paper); color: var(--ink); font-size: 1.0625rem; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--mint); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 20; }
.skip:focus { left: var(--pad); top: .5rem; }
[hidden] { display: none !important; }

/* barra superior */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .75rem var(--pad); background: color-mix(in srgb, var(--paper) 90%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 800; letter-spacing: -.02em; text-decoration: none; font-size: 1.15rem; }
.mark { width: 1.35rem; height: 1.35rem; border-radius: 6px; background: #000606 center/contain no-repeat url("bb-mark.png"); }  /* Bildmarke «BB» del logo (misma que la app) */
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M6 22h6v-5h6v-5h8' fill='none' stroke='%231FA37A' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.top-nav { display: flex; align-items: center; gap: 1.25rem; font-size: .95rem; }
.top-nav > a:not(.btn) { text-decoration: none; color: var(--muted); }
.top-nav > a:not(.btn):hover { color: var(--ink); }
.lang { font: inherit; font-weight: 700; font-size: .85rem; border: 1px solid var(--line); background: transparent; color: var(--ink); border-radius: 999px; padding: .25rem .7rem; cursor: pointer; }
.lang:hover { border-color: var(--ink); }

/* botones */
.btn { display: inline-block; background: var(--ink); color: #fff; text-decoration: none; font-weight: 700; padding: .8rem 1.35rem; border-radius: 10px; border: 2px solid var(--ink); transition: background .15s, color .15s; }
.btn:hover { background: var(--mint-ink); border-color: var(--mint-ink); }
.btn-small { padding: .45rem .9rem; font-size: .92rem; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.75rem 0 0; }

/* héroe */
.hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem; padding: clamp(2.5rem, 7vw, 5.5rem) var(--pad) clamp(2.5rem, 6vw, 4.5rem); max-width: 80rem; margin: 0 auto; align-items: center; }
h1 { font-size: clamp(2.35rem, 6.2vw, 4.4rem); line-height: 1.02; letter-spacing: -.035em; font-weight: 800; margin: 0; max-width: 14ch; text-wrap: balance; }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--muted); max-width: var(--measure); margin: 1.4rem 0 0; }
.hero-fig { margin: 0; }
.takt { width: 100%; height: auto; display: block; }
.takt .grid { stroke: var(--line); stroke-width: 1; }
.takt .axis { fill: var(--muted); font-size: 12px; font-weight: 600; font-family: inherit; }
figcaption { color: var(--muted); font-size: .92rem; margin-top: .75rem; max-width: 34rem; }
@media (min-width: 62rem) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 4rem; }
}

/* producto: cada función = título corto + una línea + su pantalla real */
.show { display: grid; gap: 1.1rem; padding: clamp(2rem, 5vw, 3.5rem) var(--pad); max-width: 80rem; margin: 0 auto; border-top: 1px solid var(--line); align-items: center; }
.show-copy h2 { margin: 0; font-size: clamp(1.5rem, 3vw, 2.15rem); line-height: 1.12; letter-spacing: -.028em; font-weight: 800; text-wrap: balance; }
.show-copy p { margin: .6rem 0 0; color: var(--muted); max-width: 28rem; }
/* micro-UIs: recreaciones mínimas de los elementos de la app, solo HTML/CSS */
.ui { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 1rem; font-size: .8rem; box-shadow: 0 18px 40px -28px rgba(12, 31, 27, .4); --cell: 1.6rem; }
.ui b[style] { display: inline-block; width: .6rem; height: .6rem; border-radius: 3px; background: var(--c); margin-right: .4rem; vertical-align: -1px; }

/* 1 · plan */
.pl-head, .pl-row { display: grid; grid-template-columns: 3.4rem 1fr; align-items: center; gap: .5rem; }
.pl-head { color: var(--muted); font-size: .7rem; margin-bottom: .4rem; }
.pl-weeks, .pl-cells { display: grid; grid-template-columns: repeat(10, 1fr); gap: 2px; }
.pl-weeks i { font-style: normal; text-align: center; }
.pl-row { padding: .25rem 0; border-top: 1px solid var(--line); }
.pl-row span { color: var(--muted); }
.pl-cells { position: relative; height: 1.5rem; }
.pl-cells i { grid-column: var(--s); background: var(--c); border-radius: 4px; }
.pl-cells .pin { position: absolute; left: calc((var(--s) - 1) * 10% - .3rem); top: -.4rem; width: .9rem; height: .9rem; border-radius: 50%; background: #e0392b; border: 2px solid #fff; box-shadow: 0 0 0 1px #e0392b; }
.pl-cells .ms { position: absolute; left: calc((var(--s) - 1) * 10% + 2%); top: .3rem; width: .8rem; height: .8rem; background: #0c1f1b; transform: rotate(45deg); border-radius: 2px; }
.pl-legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin-top: .75rem; color: var(--muted); }

/* 2 · recursos */
.rs-row { display: grid; grid-template-columns: 6.5rem 2.4rem repeat(8, 1fr); gap: 3px; align-items: center; padding: 2px 0; }
.rs-head { color: var(--muted); font-size: .7rem; }
.rs-head i, .rs-row em { font-style: normal; text-align: center; color: var(--muted); }
.rs-row > i { height: var(--cell); display: grid; place-items: center; border-radius: 4px; background: #f1f4f2; font-style: normal; font-weight: 600; }
.rs-row > i.ok { background: #dff3ea; } .rs-row > i.full { background: #fbefc2; } .rs-row > i.hot { background: #fbd4cf; }
.rs-legend { display: flex; gap: 1rem; margin-top: .75rem; color: var(--muted); }
.rs-legend span { display: inline-flex; align-items: center; gap: .35rem; }
.rs-legend i { width: .8rem; height: .8rem; border-radius: 3px; }
.rs-legend .ok { background: #dff3ea; } .rs-legend .full { background: #fbefc2; } .rs-legend .hot { background: #fbd4cf; }

/* 3 · blockers */
.bk-row { display: grid; grid-template-columns: 2fr 1.1fr 1.1fr 1fr .6fr; gap: .6rem; align-items: center; padding: .5rem 0 .5rem .6rem; border-top: 1px solid var(--line); border-left: 3px solid transparent; }
.bk-head { border-top: 0; padding-top: 0; color: var(--muted); font-size: .7rem; border-left-color: transparent; }
.sev-hi { border-left-color: #e0392b; } .sev-mid { border-left-color: #f2c230; } .sev-lo { border-left-color: var(--line); }
.bk-row.done { color: var(--muted); }
.st { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-weight: 600; font-size: .72rem; width: max-content; }
.st-open { background: #fbd4cf; color: #8a1d14; } .st-prog { background: #fbefc2; color: #6b4e00; } .st-done { background: #dff3ea; color: var(--mint-ink); }

/* 4 · portfolio */
.ui-pf { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); background: transparent; border: 0; padding: 0; box-shadow: none; }
.pf { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .9rem; box-shadow: 0 18px 40px -28px rgba(12, 31, 27, .4); }
.pf h3 { margin: 0; font-size: .95rem; line-height: 1.2; } .pf small { color: var(--muted); }
.pf .bar { position: relative; height: .6rem; background: #eef2ef; border-radius: 999px; margin: .7rem 0; }
.pf .bar i { position: absolute; inset: 0 auto 0 0; background: var(--mint); border-radius: 999px; }
.pf .bar span { position: absolute; right: 0; top: -1.1rem; font-size: .7rem; color: var(--muted); }
.pf dl { margin: 0; display: grid; gap: .3rem; }
.pf dl div { display: flex; justify-content: space-between; } .pf dt { color: var(--muted); } .pf dd { margin: 0; font-weight: 600; }
.pf .g { color: var(--mint-ink); } .pf .r { color: #c0392b; }
.pf .dot { display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; margin-right: .3rem; } .pf .dot.low { background: var(--mint); } .pf .dot.mid { background: #f2c230; }

/* 5 · roles */
.ro-row { display: grid; grid-template-columns: 1fr repeat(4, 3.2rem); align-items: center; padding: .45rem 0; border-top: 1px solid var(--line); }
.ro-head { border-top: 0; padding-top: 0; color: var(--muted); font-size: .7rem; text-align: center; }
.ro-row i { font-style: normal; text-align: center; font-weight: 700; }
.ro-row .y { color: var(--mint-ink); } .ro-row .h { color: #b7791f; } .ro-row .n { color: #b8c4be; }
.ro-note { margin: .6rem 0 0; color: var(--muted); font-size: .72rem; }

/* «y además»: una fila de iconos, sin párrafos */
.also { max-width: 80rem; margin: 0 auto; padding: clamp(2rem, 5vw, 3.5rem) var(--pad); border-top: 1px solid var(--line); }
.also h2 { margin: 0 0 1.25rem; font-size: 1.15rem; font-weight: 800; letter-spacing: -.01em; }
.also ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem 2rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.also li { display: flex; align-items: center; gap: .75rem; font-weight: 600; }
.ico { width: 1.75rem; height: 1.75rem; flex: none; color: var(--mint-ink); }

.closing { background: var(--ink); color: #fff; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem 2rem; padding: clamp(2rem, 5vw, 3.25rem) max(var(--pad), calc((100vw - 80rem) / 2 + var(--pad))); }
.closing h2 { margin: 0; font-size: clamp(1.5rem, 3vw, 2.15rem); letter-spacing: -.028em; font-weight: 800; }
.closing .actions { margin: 0; }
.closing .btn { background: var(--mint); border-color: var(--mint); color: var(--ink); }
.closing .btn:hover { background: #fff; border-color: #fff; color: var(--ink); }

.foot { display: flex; flex-wrap: wrap; gap: .75rem 2rem; justify-content: space-between; padding: 1.5rem var(--pad); max-width: 80rem; margin: 0 auto; color: var(--muted); font-size: .92rem; }
.foot a { text-decoration: none; margin-right: 1.25rem; }
.foot a:hover { color: var(--ink); text-decoration: underline; }

/* móvil */
@media (max-width: 40rem) {
  .top-nav > a:not(.btn) { display: none; }
  .ui { font-size: .7rem; padding: .7rem; --cell: 1.3rem; }
  .bk-row { grid-template-columns: 2fr 1fr 1fr; } .bk-row > :nth-child(4), .bk-row > :nth-child(5) { display: none; }
  .rs-row { grid-template-columns: 4.8rem 2rem repeat(8, 1fr); }
  .hero { padding-top: 2rem; }
}

/* diagrama: UN solo momento orquestrado al cargar; sin movimiento si el usuario lo prefiere así */
@media (prefers-reduced-motion: no-preference) {
  .takt .b { opacity: 0; transform-box: fill-box; transform-origin: left center; animation: grow .45s cubic-bezier(.2, .7, .2, 1) forwards; animation-delay: 250ms; }
  /* escalera: cada bloque entra un poco después del anterior (sin style inline por la CSP) */
  .takt .b:nth-of-type(1) { animation-delay: 250ms; }
  .takt .b:nth-of-type(2) { animation-delay: 305ms; }
  .takt .b:nth-of-type(3) { animation-delay: 360ms; }
  .takt .b:nth-of-type(4) { animation-delay: 415ms; }
  .takt .b:nth-of-type(5) { animation-delay: 470ms; }
  .takt .b:nth-of-type(6) { animation-delay: 525ms; }
  .takt .b:nth-of-type(7) { animation-delay: 580ms; }
  .takt .b:nth-of-type(8) { animation-delay: 635ms; }
  .takt .b:nth-of-type(9) { animation-delay: 690ms; }
  .takt .b:nth-of-type(10) { animation-delay: 745ms; }
  .takt .b:nth-of-type(11) { animation-delay: 800ms; }
  .takt .b:nth-of-type(12) { animation-delay: 855ms; }
  .takt .b:nth-of-type(13) { animation-delay: 910ms; }
  .takt .b:nth-of-type(14) { animation-delay: 965ms; }
  .takt .b:nth-of-type(15) { animation-delay: 1020ms; }
  .takt .b:nth-of-type(16) { animation-delay: 1075ms; }
  .takt .b:nth-of-type(17) { animation-delay: 1130ms; }
  .takt .b:nth-of-type(18) { animation-delay: 1185ms; }
  .takt .b:nth-of-type(19) { animation-delay: 1240ms; }
  .takt .b:nth-of-type(20) { animation-delay: 1295ms; }
  @keyframes grow { from { opacity: 0; transform: scaleX(.2); } to { opacity: 1; transform: none; } }
  html { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } }
@media print { .top, .skip, .actions { display: none; } .show { break-inside: avoid; } .closing { background: none; color: inherit; } }

/* ---- Páginas legales (datenschutz, nutzungsbedingungen, impressum): texto largo, una columna ---- */
.legal-main { max-width: 46rem; margin: 0 auto; padding: 2.5rem var(--pad) 4rem; }
.legal-main h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin: 0 0 1rem; }
.legal-main h2 { font-size: 1.15rem; margin: 2rem 0 .5rem; }
.legal-main p, .legal-main li { font-size: 1rem; }
.legal-main ul { padding-left: 1.2rem; }
.legal-draft { background: #fff6d6; border: 1px solid #e8d48a; border-radius: 8px; padding: .6rem .9rem; font-size: .92rem; color: #5a4a00; }
.legal-table { width: 100%; border-collapse: collapse; font-size: .92rem; margin-top: .5rem; }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: .5rem .6rem; border-bottom: 1px solid var(--line); }
.legal-meta, .legal-en { color: var(--muted); font-size: .9rem; margin-top: 2rem; }
.legal .top-nav a { text-decoration: none; color: var(--muted); }
.legal .top-nav a:hover { color: var(--ink); }
