/*
 * Visual style follows homag.com (inspected Nov 2026): dark blue text & heavy headings,
 * cyan pill buttons, light blue-grey page background, navy dark sections,
 * square-cornered teasers without shadows. See CLAUDE.md > "Style guide".
 */

/* ---------- Theme tokens ---------- */
:root {
  /* HOMAG palette (from homag.com Tailwind classes "hmg-*") */
  --hmg-darkblue: #053059;
  --hmg-midblue: #0c5d93;
  --hmg-cyan: #00a0dc;
  --hmg-cyan-hover: #008cc2;
  --hmg-navy: #031d35;
  --hmg-grey-dark: #475160;
  --hmg-grey-mid: #919dac;
  --hmg-grey-light: #bdc6d1;
  --hmg-grey-extralight: #dee2e8;
  --hmg-grey-ultralight: #f0f4f9;
  --hmg-page: #f3f7fa;

  /* Semantic tokens used by components */
  --brand: var(--hmg-cyan);
  --brand-ink: #ffffff;
  --heading: var(--hmg-darkblue);
  --ink: var(--hmg-darkblue);
  --muted: var(--hmg-grey-dark);
  --bg: var(--hmg-page);
  --surface: #ffffff;
  --surface-2: var(--hmg-grey-ultralight);
  --line: var(--hmg-grey-extralight);
  --control-line: var(--hmg-grey-light);
  --ok: #1f8a4c;
  --bad: #c0392b;
  --warn-bg: #fff4e0; --warn-ink: #8a5300; --warn-line: #f3d29b;

  /* HOMAG uses "HOMAG Inter" (licensed); Inter from Google Fonts is the closest public match.
     Offline the stack falls back to Helvetica/Arial like homag.com itself. */
  --font: "Inter", Helvetica, Arial, sans-serif;
  --fs-body: clamp(14px, 0.85rem + 0.25vw, 17px);
  --radius-pill: 9999px;

  /* Process steps: a cyan → dark blue progression (left → right on the map) */
  --s-design: #00a0dc;
  --s-prep: #0184bb;
  --s-planning: #03689b;
  --s-assist: #044c7a;
  --s-service: #053059;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  font-size: var(--fs-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  /* Column layout keeps the footer at the bottom of short pages */
  min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { color: var(--heading); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-weight: 800; letter-spacing: -.01em; }
h2, h3 { font-weight: 700; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--hmg-cyan); outline-offset: 2px; }

/* ---------- Top bar (white, like the homag.com header) ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 24px;
  padding: 0 32px; min-height: 68px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--heading); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-logo { display: block; height: 22px; width: auto; }
.brand-divider { width: 2px; height: 22px; background: currentColor; }
.brand-name { font-weight: 700; font-size: 15px; }
.nav { display: flex; gap: 4px; flex: 1; justify-content: center; overflow-x: auto; align-self: stretch; }
.nav a {
  display: flex; align-items: center; gap: 6px;
  padding: 0 12px; color: var(--heading); font-weight: 700; font-size: 15px;
  white-space: nowrap; border-bottom: 3px solid transparent; border-top: 3px solid transparent;
}
.nav a:hover { color: var(--hmg-cyan); text-decoration: none; }
.nav a.active { border-bottom-color: var(--hmg-cyan); }
.count {
  display: inline-block; min-width: 20px; padding: 0 6px; border-radius: var(--radius-pill);
  background: var(--hmg-cyan); color: #fff; font-size: 12px; text-align: center; line-height: 20px;
}

main { flex: 1; width: 100%; max-width: 1440px; margin: 0 auto; padding: 40px 32px 64px; outline: none; }

/* ---------- Footer (white, like homag.com) ---------- */
.site-footer {
  background: var(--surface); border-top: 1px solid var(--line);
  padding: 16px 32px; text-align: center; font-size: 14px; color: var(--muted);
}
.site-footer a { font-weight: 700; }

/* ---------- Generic UI ---------- */
.card {
  background: var(--surface); border: 0; border-radius: 0; padding: 24px;
}
.grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.muted { color: var(--muted); }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.spacer { flex: 1; }

/* Buttons: homag.com pills — primary cyan, secondary white with grey border */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 20px; border-radius: var(--radius-pill); border: 1px solid var(--control-line);
  background: var(--surface); color: var(--heading); font-weight: 700; line-height: 1.4;
}
.btn:hover { border-color: var(--heading); text-decoration: none; }
.btn.primary { background: var(--hmg-cyan); color: #fff; border-color: var(--hmg-cyan); }
.btn.primary:hover { background: var(--hmg-cyan-hover); border-color: var(--hmg-cyan-hover); }
.btn.small { padding: 6px 16px; font-size: 14px; }
.btn:disabled { opacity: .45; cursor: default; }
.btn:disabled:hover { border-color: var(--control-line); }

/* Tags: like homag.com "btn--tag" */
.chip {
  display: inline-block; padding: 3px 12px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 700;
  background: var(--surface); color: var(--heading); border: 1px solid var(--control-line);
}
a.chip:hover { border-color: var(--heading); text-decoration: none; }
.chip.step { color: #fff; border-color: transparent; }
.chip.warn { background: var(--warn-bg); color: var(--warn-ink); border-color: var(--warn-line); }

input[type="search"], select {
  font: inherit; padding: 9px 18px; border-radius: var(--radius-pill);
  border: 1px solid var(--control-line); background: var(--surface); color: var(--ink);
}
input[type="search"]:focus, select:focus { border-color: var(--hmg-cyan); outline: none; }
input[type="search"] { flex: 1; min-width: 200px; }
.lang-select { padding: 6px 12px; font-weight: 700; color: var(--heading); }

.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 32px; }
.page-head h1 { font-size: clamp(28px, 1.2rem + 1.6vw, 40px); margin-bottom: 8px; }
.page-head p { margin: 0; max-width: 760px; }

/* ---------- Home: navy stage like the homag.com hero ---------- */
.hero {
  background: linear-gradient(100deg, var(--hmg-navy) 0%, var(--hmg-darkblue) 60%, var(--hmg-midblue) 100%);
  color: #fff; padding: clamp(32px, 5vw, 72px); margin: -40px -32px 40px;
}
.hero h1 { color: #fff; font-size: clamp(32px, 1.4rem + 2.6vw, 60px); font-weight: 800; max-width: 900px; }
.hero p { max-width: 640px; font-weight: 700; font-size: clamp(15px, .9rem + .4vw, 20px); }
.hero .btn { border-color: rgba(255,255,255,.6); background: transparent; color: #fff; }
.hero .btn:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.hero .btn.primary { background: var(--hmg-cyan); border-color: var(--hmg-cyan); }
.stats { display: flex; gap: 48px; margin-top: 40px; flex-wrap: wrap; }
.stats b { display: block; font-size: 40px; font-weight: 800; color: var(--hmg-cyan); line-height: 1.1; }
.tile { color: inherit; border-top: 4px solid; transition: transform .15s; }
.tile:hover { transform: translateY(-3px); text-decoration: none; }
.tile h3 { display: flex; gap: 8px; align-items: center; font-size: 20px; }

/* ---------- Product cards ---------- */
.product-card { display: flex; flex-direction: column; gap: 12px; color: inherit; border-top: 4px solid var(--c, var(--brand)); transition: transform .15s; }
.product-card:hover { transform: translateY(-3px); text-decoration: none; }
.product-card h3 { margin: 0; font-size: 22px; font-weight: 800; }
.product-card p { margin: 0; flex: 1; }
.product-card .row { justify-content: space-between; }

/* ---------- Product detail ---------- */
.detail-head { border-top: 6px solid var(--c, var(--brand)); margin-bottom: 24px; padding: 32px; }
.detail-head h1 { font-size: clamp(32px, 1.3rem + 2vw, 52px); margin-bottom: 4px; }
.detail-head .tagline { font-size: clamp(17px, 1rem + .4vw, 22px); font-weight: 700; color: var(--muted); margin: 0 0 12px; }
.pitch { font-size: 18px; border-left: 4px solid var(--hmg-cyan); padding: 4px 0 4px 18px; margin: 20px 0 0; max-width: 900px; }
.detail-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.detail-grid h2 { font-size: 18px; font-weight: 800; }
.detail-grid ul { margin: 0; padding-left: 20px; }
.detail-grid li { margin: 6px 0; }
.detail-grid li::marker { color: var(--hmg-cyan); }
.internal { background: var(--surface-2); border: 1px dashed var(--control-line); }
.internal h2 small { font-weight: 400; color: var(--muted); font-size: inherit; }
.objection { margin: 10px 0; }
.objection b { display: block; }

/* ---------- Process map ---------- */
/* Column count is set inline by app.js from the number of categories */
.map { display: grid; grid-template-rows: auto 1fr; column-gap: 8px; overflow-x: auto; padding-bottom: 8px; }
/* subgrid: all column headers share the height of the tallest one, so product lists line up */
.map-col { background: var(--surface); display: grid; grid-row: span 2; grid-template-rows: subgrid; }.map-col header { background: var(--c); color: #fff; padding: 14px 14px 14px 18px; position: relative; min-height: 120px; }
.map-col header::after {
  content: ""; position: absolute; right: -12px; top: 50%; transform: translateY(-50%);
  border: 12px solid transparent; border-left-color: var(--c); border-right: 0; z-index: 1;
}
.map-col:last-child header::after { display: none; }
/* Long words must wrap inside narrow columns */
.map-col header b { display: block; hyphens: manual; overflow-wrap: anywhere; font-weight: 800; margin-bottom: 4px; }
.map-col header small { opacity: .85; font-size: 12px; hyphens: auto; display: block; }
.map-col .items { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.map-item {
  display: block; padding: 10px 12px; border: 1px solid var(--line); border-left: 3px solid var(--c);
  color: var(--heading); background: var(--surface); font-weight: 700; font-size: 14px; transition: opacity .15s;
}
.map-item:hover { border-color: var(--c); text-decoration: none; }
.map-item small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.map-item.dim { opacity: .25; }
.map-item.hl { background: var(--hmg-cyan); border-color: var(--hmg-cyan); color: #fff; }
.map-item.hl small { color: rgba(255,255,255,.85); }

/* ---------- Needs finder / pain tags ---------- */
.pains { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.pain {
  padding: 8px 16px; border-radius: var(--radius-pill); border: 1px solid var(--control-line);
  background: var(--surface); color: var(--heading); font-weight: 700; font-size: 14px;
}
.pain:hover { border-color: var(--heading); }
.pain[aria-pressed="true"] { background: var(--hmg-darkblue); color: #fff; border-color: var(--hmg-darkblue); }
.score-bar { height: 4px; background: var(--surface-2); overflow: hidden; }
.score-bar span { display: block; height: 100%; background: var(--hmg-cyan); }

/* ---------- Deck ---------- */
.deck-meta { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-bottom: 24px; }
.deck-meta input { width: 100%; margin-top: 6px; }
.deck-group { margin: 24px 0 8px; }
.deck-list { display: flex; flex-direction: column; gap: 8px; }
.deck-item { display: flex; align-items: center; gap: 12px; padding: 14px 20px; }
.deck-item .num { font-weight: 800; color: var(--hmg-cyan); width: 24px; font-size: 18px; }
.deck-item b { flex: 1; color: var(--heading); }

/* ---------- Presenter overlay (navy stage) ---------- */
.presenter {
  position: fixed; inset: 0; z-index: 100; color: #fff;
  background: linear-gradient(110deg, var(--hmg-navy) 0%, var(--hmg-darkblue) 100%);
  display: flex; flex-direction: column;
}
.presenter[hidden] { display: none; }
/* Same dark-blue logo file, turned white for the navy stage */
.pres-logo { position: absolute; top: 4vh; right: 4vw; height: clamp(18px, 2.2vw, 32px); filter: brightness(0) invert(1); }
/* "safe center": when a slide is taller than the screen it scrolls from the top instead of being cut off */
.slide { flex: 1; display: flex; flex-direction: column; justify-content: safe center; padding: 6vh 8vw; overflow: auto; }
.slide .kicker { color: var(--hmg-cyan) !important; font-weight: 700; font-size: clamp(14px, 1.2vw, 20px); }
.slide h1 { color: #fff; font-size: clamp(40px, 7vw, 104px); font-weight: 800; margin: .1em 0; }
.slide .tagline { font-size: clamp(18px, 2.2vw, 32px); font-weight: 700; opacity: .9; max-width: 1100px; }
.slide .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 5vw; margin-top: 5vh; font-size: clamp(16px, 1.6vw, 24px); }
.slide h3 { color: var(--hmg-cyan); font-weight: 800; }
.slide ul { padding-left: 1.2em; margin: 0; }
.slide li { margin: .4em 0; }
.slide li::marker { color: var(--hmg-cyan); }
.slide.title-slide h1 { font-size: clamp(36px, 6vw, 88px); max-width: 1200px; }
.slide .subtitle { font-size: clamp(20px, 2.4vw, 36px); font-weight: 700; color: var(--hmg-cyan); margin: 2vh 0 0; }
.slide .subtitle b { color: #fff; font-weight: 800; }
.slide .date { opacity: .7; font-size: clamp(14px, 1.3vw, 20px); margin-top: 4vh; }

/* Agenda slide: one column per category, products numbered by slide */
/* Compact so a full catalog (~30 products) fits one screen */
.slide.agenda-slide { padding: 5vh 5vw 3vh; }
.slide .agenda-title { font-size: clamp(28px, 3.5vw, 56px); margin-bottom: 3vh; }
.agenda { display: grid; gap: 1.2vw; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.agenda-col { border-top: 6px solid var(--c); background: rgba(255,255,255,.05); padding: 12px 14px; }
.agenda-col h3 { color: #fff; font-size: clamp(15px, 1.3vw, 22px); margin-bottom: 8px; }
.agenda-col ol { list-style: none; margin: 0; padding: 0; }
.agenda-col button {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px; width: 100%;
  background: none; border: 0; border-bottom: 1px solid rgba(255,255,255,.12);
  color: #fff; text-align: left; padding: 5px 0; font-size: clamp(13px, 1.05vw, 19px); font-weight: 700; line-height: 1.3;
}
.agenda-col button:hover { color: var(--hmg-cyan); }
.agenda-col button small { opacity: .6; font-weight: 400; }
.presenter-bar {
  display: flex; align-items: center; gap: 12px; padding: 12px 24px;
  background: rgba(0,0,0,.25); font-size: 14px; font-weight: 700;
}
.presenter-bar button {
  background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.5);
  border-radius: var(--radius-pill); padding: 6px 16px; font-weight: 700;
}
.presenter-bar button:hover { border-color: #fff; }
.notes {
  background: var(--hmg-grey-ultralight); color: var(--hmg-darkblue); padding: 16px 8vw;
  max-height: 35vh; overflow: auto; font-size: 15px; border-top: 4px solid var(--hmg-cyan);
}
.notes h4 { margin: 8px 0 4px; }
.notes ul { margin: 0; padding-left: 20px; }

/* ---------- Training ---------- */
.tabs { display: flex; gap: 8px; margin-bottom: 32px; }
.tabs button {
  border: 1px solid var(--control-line); background: var(--surface); color: var(--heading);
  padding: 8px 20px; border-radius: var(--radius-pill); font-weight: 700;
}
.tabs button:hover { border-color: var(--heading); }
.tabs button.active { background: var(--hmg-darkblue); color: #fff; border-color: var(--hmg-darkblue); }
.flashcard { perspective: 1200px; max-width: 720px; height: 360px; margin: 0 auto 20px; cursor: pointer; }
.flashcard-inner { position: relative; width: 100%; height: 100%; transition: transform .5s; transform-style: preserve-3d; }
.flashcard.flipped .flashcard-inner { transform: rotateY(180deg); }
.face {
  position: absolute; inset: 0; backface-visibility: hidden;
  display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
  padding: 32px; background: var(--surface); border-top: 6px solid var(--hmg-cyan);
}
.face.front h2 { font-size: 44px; font-weight: 800; margin-top: 12px; }
.face.back { transform: rotateY(180deg); overflow: auto; background: var(--hmg-darkblue); color: #fff; }
.face.back h3 { color: #fff; }
.face.back .muted { color: rgba(255,255,255,.8); }
.quiz { max-width: 760px; margin: 0 auto; }
.quiz .q { font-size: 22px; font-weight: 800; color: var(--heading); margin-bottom: 20px; }
.options { display: grid; gap: 8px; }
.option {
  text-align: left; padding: 14px 20px; border: 1px solid var(--line); border-left: 4px solid var(--control-line);
  background: var(--surface); color: var(--heading); font-weight: 700;
}
.option:hover:not(:disabled) { border-left-color: var(--hmg-cyan); }
.option.correct { background: #e3f5ea; border-color: var(--ok); color: #0d4d28; }
.option.wrong { background: #fbe6e3; border-color: var(--bad); color: #6b1d14; }
.progress { height: 4px; background: var(--line); margin-bottom: 16px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--hmg-cyan); transition: width .3s; }
.big-score { font-size: 72px; font-weight: 800; color: var(--hmg-cyan); line-height: 1.1; }

/* ---------- Responsive / print ---------- */
@media (max-width: 900px) {
  .topbar { flex-wrap: wrap; padding: 8px 16px 0; gap: 12px; }
  .nav { order: 3; flex-basis: 100%; justify-content: flex-start; min-height: 44px; }
  .brand-name, .brand-divider { display: none; }
  .lang-select { margin-left: auto; }
  main { padding: 24px 16px 48px; }
  .hero { margin: -24px -16px 24px; }
  .slide .cols { grid-template-columns: 1fr; }
}
@media print {
  .topbar, .site-footer, .no-print { display: none !important; }
  body { background: #fff; }
  .card { break-inside: avoid; }
}
