/* Startseite, Bereichsseiten und einfache Seiten (Design 0.47 „Werkstatt“). Nutzt die Farb-Tokens aus style.css.
   Leitmotive: Millimeterpapier mit 42-mm-Raster (Gridfinity-Maß), harte Versatzschatten beim Darüberfahren,
   Maße und Kennzeichnungen in Monospace, Signalgelb nur für die Hauptaktion. */
/* Die Seite scrollt als Ganzes (html), der body schneidet seitlich ab: Das Millimeterpapier (.paper) ragt absichtlich
   über den Rand, ohne clip ließe sich die Seite nach rechts schieben. html braucht overflow-y: auto, sonst wanderte
   das overflow des body auf das Fenster. clip (statt hidden) macht den body nicht zum Scroll-Bereich, die Kopfleiste
   bleibt so oben kleben. */
html:has(> body.landing) { overflow-y: auto; height: auto; }
body.landing { display: flex; flex-direction: column; min-height: 100vh; height: auto; overflow: visible; overflow-x: clip; background: var(--bg); }

/* ---------------------------------------------------------------- Kopfleiste */
.landing-head { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px 20px; padding: 10px 24px; min-height: 60px;
  border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--panel) 86%, transparent); backdrop-filter: saturate(1.4) blur(10px); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 1.08rem; letter-spacing: -0.02em; }
.brand-tag { padding: 1px 6px; border: 1px solid var(--line); border-radius: 3px; color: var(--muted); font: 500 0.68rem var(--mono); letter-spacing: 0; }
.head-nav { display: flex; gap: 2px; margin-right: auto; }
.head-nav a { padding: 7px 11px; border-radius: var(--radius-sm); color: var(--muted); font-weight: 600; font-size: 0.9rem; text-decoration: none; transition: background .15s, color .15s; }
.head-nav a:hover { background: var(--panel-2); color: var(--text); }
.landing-head .head-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.head-nav + .head-right { margin-left: 0; }
.landing-head .cmdk-btn { order: -1; }

/* ---------------------------------------------------------------- Inhalt */
.landing-main { display: block; min-height: auto; flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px 48px; }

/* Millimeterpapier: feines 8-mm- und kräftiges 42-mm-Raster, zum Rand hin ausgeblendet */
.paper { position: relative; isolation: isolate; }
.paper::before { content: ""; position: absolute; inset: 0 -100vw; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(var(--grid-major) 1px, transparent 1px), linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 42px 42px, 42px 42px, 8.4px 8.4px, 8.4px 8.4px; background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 70% 90% at 50% 0%, #000 30%, transparent 75%); mask-image: radial-gradient(ellipse 70% 90% at 50% 0%, #000 30%, transparent 75%); }

/* Einstieg */
.hero { margin-bottom: 32px; }
.hero > p { color: var(--muted); font-size: 1.05rem; line-height: 1.55; margin: 0; max-width: 46em; }
.hero-split { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: center; padding: 72px 0 64px; margin-bottom: 0; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.9rem); line-height: 1.02; letter-spacing: -0.045em; margin: 0 0 20px; font-weight: 800; }
.hl { position: relative; white-space: nowrap; background: none; color: inherit; }
.hl::after { content: ""; position: absolute; left: -0.06em; right: -0.06em; bottom: 0.06em; height: 0.32em; z-index: -1; background: var(--cta); transform: skew(-8deg); }
.hero-sub { color: var(--muted); font-size: 1.14rem; line-height: 1.55; margin: 0 0 30px; max-width: 32em; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 26px; }
.btn-cta, .btn-soft { display: inline-flex; align-items: center; gap: 8px; min-height: 50px; padding: 0 22px; border-radius: var(--radius-sm); font-weight: 750; font-size: 1rem; text-decoration: none;
  transition: transform .12s var(--ease), box-shadow .12s var(--ease), background .12s, border-color .12s; }
.btn-cta { background: var(--cta); color: var(--cta-text); border: 1.5px solid var(--text); box-shadow: 4px 4px 0 var(--text); }
.btn-cta:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--text); }
.btn-cta:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--text); }
.btn-soft { background: var(--panel); color: var(--text); border: 1.5px solid var(--line); }
.btn-soft:hover { border-color: var(--text); }
.hero-facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 0.88rem; font-weight: 550; }
.hero-facts li { display: inline-flex; align-items: center; gap: 6px; }
.hero-facts .ico { color: var(--ok); stroke-width: 2.6; }
.hero-art { position: relative; padding: 30px; border-radius: 10px; background: var(--panel); border: 1.5px solid var(--text); box-shadow: 8px 8px 0 var(--cta); }
.hero-art svg { display: block; width: 100%; height: auto; overflow: visible; }
.hero-art::before { content: attr(data-label); position: absolute; top: -11px; left: 18px; padding: 1px 8px; background: var(--text); color: var(--bg); border-radius: 3px; font: 600 0.7rem var(--mono); letter-spacing: 0.04em; }

/* Monospace-Kennzeichnung über Überschriften: „// GRIDFINITY“ */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; color: var(--muted); font: 600 0.78rem var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 10px; height: 10px; background: var(--cta); border: 1.5px solid var(--text); border-radius: 2px; }

/* Kennzahlen-Leiste */
.stats-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 72px; border: 1.5px solid var(--text); border-radius: 10px; background: var(--panel); overflow: hidden; }
.stats-strip > div { padding: 18px 20px; border-left: 1px dashed var(--line); }
.stats-strip > div:first-child { border-left: 0; }
.stats-strip b { display: block; font: 700 clamp(1.5rem, 3vw, 2.1rem)/1.1 var(--mono); letter-spacing: -0.04em; }
.stats-strip span { color: var(--muted); font-size: 0.86rem; }

/* Abschnitte */
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 8px 24px; margin: 0 0 20px; }
.section-head h2, .how h2, .tool-group h2 { font-size: clamp(1.4rem, 2.4vw, 1.85rem); letter-spacing: -0.035em; margin: 0; font-weight: 800; }
.section-head p { margin: 4px 0 0; color: var(--muted); max-width: 40em; }
.section-head .eyebrow { margin-bottom: 8px; }
.link-more { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-weight: 650; font-size: 0.92rem; text-decoration: none; border-bottom: 2px solid var(--cta); padding-bottom: 1px; }
.link-more:hover { border-bottom-color: var(--text); }

/* Harter Versatzschatten: gemeinsames Verhalten aller Karten */
.lift { transition: transform .14s var(--ease), box-shadow .14s var(--ease), border-color .14s; }
.lift:hover, a.tool:hover, a.topic:hover, .tool-links a:hover, .step-list a:hover, .recent-card:hover {
  transform: translate(-3px, -3px); box-shadow: 5px 5px 0 var(--text); border-color: var(--text); }

/* Ablauf in drei Schritten */
.how { margin-bottom: 72px; }
.how h2 { margin-bottom: 20px; }
.step-list { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 0; padding: 0; list-style: none; }
.step-list a { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: center; height: 100%; padding: 18px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line); color: var(--text); text-decoration: none; transition: transform .14s var(--ease), box-shadow .14s var(--ease), border-color .14s; }
.step-num { grid-row: span 2; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 6px; background: var(--cta); color: var(--cta-text); border: 1.5px solid var(--text); font: 700 1.05rem var(--mono); }
.step-list b { font-size: 1.02rem; letter-spacing: -0.01em; }
.step-list small { color: var(--muted); font-size: 0.86rem; }

/* Werkzeuge */
.tool-group { margin-bottom: 64px; }
.tool-group > h2 { margin-bottom: 20px; }
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.tools-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tools-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tool { position: relative; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; color: var(--text); text-decoration: none;
  transition: transform .14s var(--ease), box-shadow .14s var(--ease), border-color .14s; }
a.tool:hover .tool-go, a.topic:hover .tool-go { background: var(--cta); color: var(--cta-text); border-color: var(--text); }
.tool-art { position: relative; display: flex; align-items: center; justify-content: center; height: 160px; padding: 18px; border-bottom: 1px solid var(--line);
  background-color: var(--canvas);
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px); background-size: 12px 12px; }
.tools-grid.two .tool-art, .tools-grid.three .tool-art { height: 186px; }
.tool-art svg { width: 100%; max-width: 280px; height: auto; }
.tool-text { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.tool-text h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-size: 1.1rem; font-weight: 750; letter-spacing: -0.02em; padding-right: 40px; }
.tool-text p { margin: 0 0 14px; color: var(--muted); font-size: 0.92rem; line-height: 1.45; flex: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.chips li { padding: 2px 8px; border-radius: 3px; border: 1px solid var(--line); background: var(--bg); color: var(--muted); font: 500 0.72rem var(--mono); }
.tool-go { position: absolute; right: 14px; top: calc(160px + 14px); display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--panel); color: var(--text); transition: background .15s, color .15s, border-color .15s; }
.tools-grid.two .tool-go, .tools-grid.three .tool-go { top: calc(186px + 14px); }
.badge-new { padding: 2px 7px; border-radius: 3px; background: var(--cta); color: var(--cta-text); border: 1px solid var(--text); font: 700 0.66rem var(--mono); letter-spacing: .04em; text-transform: uppercase; }

/* Bilder der Werkzeuge (SVG-Klassen bleiben gleich) */
.art-photo { fill: var(--panel); stroke: var(--line); stroke-width: 2; }
.art-obj { fill: var(--muted); opacity: .55; }
.art-arrow { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.art-bin rect { fill: color-mix(in srgb, var(--accent) 16%, var(--panel)); stroke: var(--text); stroke-width: 1.8; }
.art-grid { stroke: var(--accent); stroke-width: 1; stroke-dasharray: 4 3; opacity: .6; }
.art-pocket { fill: var(--canvas); stroke: var(--text); stroke-width: 1.8; }
.art-area { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 5 4; }
.art-plate rect { fill: color-mix(in srgb, var(--text) 8%, var(--panel)); stroke: var(--text); stroke-width: 1.8; }
.art-cells rect { fill: var(--canvas); stroke: color-mix(in srgb, var(--text) 45%, transparent); stroke-width: 1.2; }
.art-cells .art-merged { fill: color-mix(in srgb, var(--accent) 30%, var(--canvas)); }
.art-pad { stroke: var(--accent); stroke-width: 1; opacity: .55; }
.art-cut { stroke: #e5484d; stroke-width: 2; stroke-dasharray: 6 4; }
.art-binA { fill: var(--cta); stroke: var(--text); stroke-width: 1.5; }
.art-binB { fill: #3f7fe0; fill-opacity: .85; stroke: var(--text); stroke-width: 1.5; }
.art-binC { fill: #e86a3a; fill-opacity: .85; stroke: var(--text); stroke-width: 1.5; }
.art-divider { stroke: var(--text); stroke-width: 4; stroke-linecap: round; }
.art-divider.sel { stroke: var(--cta); }
.art-move { fill: none; stroke: #e0a100; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.art-ghost { fill: #2fb170; fill-opacity: .35; stroke: #2fb170; stroke-width: 1.5; stroke-dasharray: 4 3; }
.art-shelf rect, .art-shelf circle { fill: var(--muted); opacity: .5; }
.art-bed { stroke: var(--text); stroke-width: 3; stroke-linecap: round; }
.art-layers rect { fill: color-mix(in srgb, var(--text) 10%, var(--panel)); stroke: var(--text); stroke-width: 1.5; }
.art-layers .art-printing { fill: var(--cta); stroke: var(--text); }
.art-path { stroke: var(--cta); stroke-width: 3; stroke-dasharray: 4 4; stroke-linecap: round; }
.art-nozzle rect, .art-nozzle path { fill: var(--panel-2); stroke: var(--text); stroke-width: 2; stroke-linejoin: round; }
/* Maßlinien in den Bildern */
.dim { stroke: var(--accent); stroke-width: 1.2; fill: none; }
.dim-tick { stroke: var(--accent); stroke-width: 1.2; }
.dim-text { fill: var(--accent); font: 600 9px var(--mono); }
.dim-bg { fill: var(--panel); }

/* Themenbereiche (Startseite) und Brotkrumen (Bereichsseiten) */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 24px 0 -40px; color: var(--muted); font: 500 0.8rem var(--mono); }
.crumbs a { color: var(--muted); text-decoration: none; padding: 4px 0; }
.crumbs a:hover { color: var(--text); text-decoration: underline; text-decoration-color: var(--cta); text-decoration-thickness: 2px; }
.crumbs [aria-current] { color: var(--text); }
.topics { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.topic { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; color: var(--text); text-decoration: none;
  transition: transform .14s var(--ease), box-shadow .14s var(--ease), border-color .14s; }
.topic .tool-art { height: auto; min-height: 210px; border-bottom: 0; border-right: 1px solid var(--line); }
.topic .tool-text { justify-content: center; padding: 24px 26px; }
.topic .tool-text h3 { font-size: 1.45rem; letter-spacing: -0.03em; }
.topic .tool-go { top: auto; bottom: 16px; right: 16px; }
.topic-soon { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 6px; padding: 24px; background: transparent; border: 1.5px dashed var(--line); color: var(--muted); }
.topic-soon .ico { width: 34px; height: 34px; padding: 7px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--panel); }
.topic-soon h3 { margin: 6px 0 0; color: var(--text); font-size: 1.05rem; }
.topic-soon p { margin: 0; font-size: 0.9rem; line-height: 1.45; }
.group-title { margin: 0 0 10px; font: 600 0.76rem var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }
.group-title a { color: var(--muted); text-decoration: none; }
.group-title a:hover { color: var(--text); }
.tool-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.tool-links a { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 12px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); color: var(--text); text-decoration: none;
  transition: transform .14s var(--ease), box-shadow .14s var(--ease), border-color .14s; }
.tool-links .tm-ico { flex: none; width: 38px; height: 38px; display: grid; place-items: center; }
.tool-links a:hover .tm-ico { background: var(--cta); color: var(--cta-text); border-color: var(--text); }
.tool-links b { display: block; font-size: 0.95rem; font-weight: 700; letter-spacing: -0.01em; }
.tool-links small { display: block; color: var(--muted); font-size: 0.82rem; }

/* Weitermachen: zuletzt bearbeitete Module (Startseite) */
.recent { margin-bottom: 72px; }
.recent[hidden] { display: none; }
.recent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.recent-card { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); color: var(--text); text-decoration: none;
  transition: transform .14s var(--ease), box-shadow .14s var(--ease), border-color .14s; }
.recent-card .thumb-wrap { flex: none; display: grid; place-items: center; width: 64px; height: 64px; border-radius: var(--radius-sm); background: var(--canvas); }
.recent-card b { display: block; font-size: 0.94rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-card small { display: block; color: var(--muted); font-size: 0.78rem; }
.recent-card .recent-text { min-width: 0; }

/* Vorteile */
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-bottom: 72px; border-top: 1.5px solid var(--text); }
.feature { padding: 22px 22px 6px 0; }
.feature + .feature { padding-left: 22px; border-left: 1px dashed var(--line); }
.feature .ico { width: 26px; height: 26px; margin-bottom: 10px; }
.feature h3 { margin: 0 0 6px; font-size: 1.02rem; letter-spacing: -0.015em; }
.feature p { margin: 0; color: var(--muted); font-size: 0.92rem; line-height: 1.5; }
.feature kbd { font-size: 0.7rem; }

/* Fußzeile */
.landing-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; max-width: 1200px; width: 100%; margin: 0 auto; padding: 22px 24px 84px;
  border-top: 1px solid var(--line); color: var(--muted); font-size: 0.82rem; }   /* unten Platz für den Anleitungs-Knopf */
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.foot-links a { color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--text); }

/* Textseiten (Lizenzen, Impressum, Datenschutz, Meine Module) */
.doc-main { padding-top: 40px; }

@media (max-width: 960px) {
  .hero-split { grid-template-columns: 1fr; gap: 36px; padding: 48px 0 40px; }
  .hero-art { order: 2; padding: 20px; }
  .step-list, .features { grid-template-columns: 1fr; }
  .feature + .feature { padding-left: 0; border-left: 0; border-top: 1px dashed var(--line); }
  .stats-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-strip > div:nth-child(3) { border-left: 0; }
  .stats-strip > div:nth-child(n+3) { border-top: 1px dashed var(--line); }
  .topics { grid-template-columns: 1fr; }
  .tools-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .landing-main { padding: 0 16px 32px; }
  .landing-head { padding: 8px 16px; gap: 8px; }
  .head-nav { display: none; }
  .brand-tag { display: none; }
  .tools-grid.two, .tools-grid.three { grid-template-columns: 1fr; }
  .topic { grid-template-columns: 1fr; }
  .topic .tool-art { min-height: 160px; border-right: 0; border-bottom: 1px solid var(--line); }
  .topic .tool-text { padding: 16px 18px 18px; }
  .topic .tool-text h3 { padding-right: 40px; }
  .topic .tool-go { top: calc(160px + 14px); bottom: auto; }
  .crumbs { margin: 16px 0 -24px; }
  .landing-foot { padding: 20px 16px 84px; }
  .hero-art { box-shadow: 5px 5px 0 var(--cta); }
}
.nowrap { white-space: nowrap; }
@media (max-width: 640px) {
  .landing-head .head-right { gap: 6px; }
  .landing-head .account .button-like { width: 36px; padding: 0; justify-content: center; font-size: 0; gap: 0; }
  .landing-head .account .button-like .ico { margin: 0; }
}

/* Download-Seite der Desktop-App */
.dl-actions { flex-direction: column; align-items: flex-start; gap: 10px; }
.dl-meta { color: var(--muted); font: 500 0.8rem var(--mono); margin: 0; }
.art-plate-win { fill: var(--panel); stroke: var(--text); stroke-width: 1.8; }
.art-win-line { stroke: var(--text); stroke-width: 1.5; }
.art-dot { fill: var(--line); stroke: var(--text); stroke-width: 1; }
