/* ============================================================
   HTP Shell — Header, Navigation, Footer, Cookie-Banner
   Eigenständig (eigene Variablen), damit jede Seite — auch die
   Tools mit eigenem CSS — dieselbe Shell bekommt.
   Quelle: partials/*.html, eingesetzt durch scripts/build-shell.py
   ============================================================ */
:root {
  --htp-primary: #1a1a2e;
  --htp-primary-light: #2d2d44;
  --htp-accent: #c9a84c;
  --htp-accent-hover: #b8943f;
  --htp-bg: #faf9f7;
  --htp-surface: #ffffff;
  --htp-text: #1a1a2e;
  --htp-border: #edecea;
  --htp-font-display: 'DM Serif Display', Georgia, serif;
  --htp-font-body: 'Source Sans 3', 'Source Sans Pro', -apple-system, BlinkMacSystemFont, sans-serif;
  --htp-header-height: 88px;
  --htp-max-width: 1200px;
}

/* --- Header --- */
.htp-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--htp-header-height);
  background-color: rgba(250, 249, 247, 0.94);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--htp-border);
  font-family: var(--htp-font-body);
  transition: box-shadow 0.35s ease;
}
.htp-header.scrolled { box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06); }
.htp-header-inner {
  max-width: var(--htp-max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.htp-logo {
  font-family: var(--htp-font-display);
  font-size: 1.2rem;
  color: var(--htp-primary);
  text-decoration: none;
  letter-spacing: -0.01em;
  line-height: 1.15;
  flex-shrink: 0;
  transition: color 0.2s ease;
}
.htp-logo span {
  display: block;
  font-family: var(--htp-font-body);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--htp-accent);
  margin-top: 3px;
}
.htp-logo:hover { color: var(--htp-primary-light); }
.htp-logo--light, .htp-logo--light:hover { color: #ffffff; }

/* --- Navigation --- */
.htp-nav {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}
.htp-nav a {
  font-family: var(--htp-font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--htp-text);
  text-decoration: none;
  position: relative;
  padding: 0.25em 0;
  white-space: nowrap;
  transition: color 0.2s ease;
}
.htp-nav a:not(.htp-nav-cta)::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--htp-accent);
  transition: width 0.35s ease;
}
.htp-nav a:hover, .htp-nav a.active { color: var(--htp-accent); }
.htp-nav a:hover::after, .htp-nav a.active::after { width: 100%; }

.htp-nav-cta, .htp-nav a.htp-nav-cta {
  margin-left: 0.4rem;
  padding: 0.7em 1.4em;
  background-color: var(--htp-accent);
  color: var(--htp-primary);
  border-radius: 4px;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.htp-nav a.htp-nav-cta:hover {
  background-color: var(--htp-accent-hover);
  color: var(--htp-primary);
  transform: translateY(-1px);
}

/* --- Mobile toggle --- */
.htp-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: none;
  border: 0;
  cursor: pointer;
  z-index: 1001;
}
.htp-menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--htp-primary);
  transition: all 0.35s ease;
  transform-origin: center;
}
.htp-menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.htp-menu-toggle.active span:nth-child(2) { opacity: 0; }
.htp-menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1080px) {
  .htp-nav { gap: 1.1rem; }
  .htp-nav a { font-size: 0.74rem; }
}
@media (max-width: 968px) {
  :root { --htp-header-height: 76px; }
  .htp-menu-toggle { display: flex; }
  .htp-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(320px, 85vw);
    height: 100vh;
    height: 100dvh;
    background-color: var(--htp-surface);
    flex-direction: column;
    justify-content: center;
    gap: 1.6rem;
    padding: 4rem 2.5rem;
    transition: right 0.35s ease;
    box-shadow: -4px 0 30px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
  }
  .htp-nav.open { right: 0; }
  .htp-nav a { font-size: 1.05rem; }
  .htp-nav a.htp-nav-cta { margin: 0.5rem 0 0; }
}

/* --- Footer --- */
.htp-footer {
  background-color: var(--htp-primary);
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--htp-font-body);
  font-size: 0.9rem;
  line-height: 1.6;
  padding: 5rem 0 2rem;
  margin-top: 0;
}
.htp-footer-inner { max-width: var(--htp-max-width); margin: 0 auto; padding: 0 24px; }
.htp-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
.htp-footer-brand .htp-logo { display: inline-block; margin-bottom: 1rem; }
.htp-footer-brand p { margin: 0; max-width: 340px; }
.htp-footer-col h4 {
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 1rem;
}
.htp-footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5em; }
.htp-footer-col li { margin: 0; }
.htp-footer-col a { color: rgba(255, 255, 255, 0.55); text-decoration: none; transition: color 0.2s ease; }
.htp-footer-col a:hover { color: var(--htp-accent); }
.htp-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.8rem;
}
.htp-footer-bottom p { margin: 0; }
.htp-footer-legal { display: flex; gap: 1.5rem; }
.htp-footer-legal a { color: rgba(255, 255, 255, 0.45); text-decoration: none; }
.htp-footer-legal a:hover { color: var(--htp-accent); }
@media (max-width: 900px) {
  .htp-footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .htp-footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .htp-footer { padding-top: 3.5rem; }
  .htp-footer-grid { grid-template-columns: 1fr; }
  .htp-footer-bottom { flex-direction: column; text-align: center; }
}

/* --- Cookie-Banner --- */
.htp-cookie {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--htp-primary);
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--htp-font-body);
  padding: 1.25rem 0;
  z-index: 9999;
  transform: translateY(100%);
  transition: transform 0.35s ease;
  border-top: 1px solid rgba(201, 168, 76, 0.2);
}
.htp-cookie.visible { transform: translateY(0); }
.htp-cookie-inner {
  max-width: var(--htp-max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.htp-cookie-text { flex: 1; min-width: 280px; margin: 0; font-size: 0.85rem; line-height: 1.5; }
.htp-cookie-text a { color: var(--htp-accent); text-decoration: underline; }
.htp-cookie-buttons { display: flex; gap: 0.5rem; flex-shrink: 0; }
.htp-cookie-btn {
  padding: 0.6em 1.4em;
  font-family: var(--htp-font-body);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 4px;
  border: 0;
  cursor: pointer;
  transition: all 0.2s ease;
}
.htp-cookie-btn--accept { background-color: var(--htp-accent); color: var(--htp-primary); }
.htp-cookie-btn--accept:hover { background-color: var(--htp-accent-hover); }
.htp-cookie-btn--decline { background-color: rgba(255, 255, 255, 0.1); color: rgba(255, 255, 255, 0.75); }
.htp-cookie-btn--decline:hover { background-color: rgba(255, 255, 255, 0.16); color: #ffffff; }

/* --- Print --- */
@media print {
  .htp-header, .htp-footer, .htp-cookie { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  .htp-header, .htp-nav, .htp-nav a, .htp-cookie, .htp-menu-toggle span { transition: none; }
}
