/* V9.3 pilot: responsive navigation and a consistent interaction language. */
body {
  --focus-ring: #7ad6aa;
  --interactive-border: rgba(76, 175, 132, 0.56);
  --interactive-fill: rgba(76, 175, 132, 0.09);
  --panel-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

body.light {
  --focus-ring: #155f43;
  --interactive-border: rgba(43, 100, 77, 0.5);
  --interactive-fill: rgba(43, 100, 77, 0.07);
  --panel-shadow: 0 14px 34px rgba(54, 48, 35, 0.12);
}

:where(a, button, [role="button"], summary):focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

:where(a, button, [role="button"], summary) {
  touch-action: manipulation;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: inherit;
  background: var(--bg-alt, var(--bg-card));
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
}

.menu-icon,
.menu-icon::before,
.menu-icon::after {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.menu-icon { position: relative; }
.menu-icon::before,
.menu-icon::after { content: ""; position: absolute; left: 0; }
.menu-icon::before { top: -6px; }
.menu-icon::after { top: 6px; }
.menu-open .menu-icon { background: transparent; }
.menu-open .menu-icon::before { top: 0; transform: rotate(45deg); }
.menu-open .menu-icon::after { top: 0; transform: rotate(-45deg); }

/* Navigation and action states shared by the landing and Garden pages. */
.site-nav .nav-logo { min-height: 44px; }

.site-nav .nav-logo,
.site-nav .nav-links > a,
.site-nav .theme-btn {
  display: inline-flex;
  align-items: center;
}

.site-nav .lang-switch {
  min-height: 32px;
  padding: 0 14px 0 0;
  border: 0;
  border-right: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
}

.site-nav .lang-switch a { min-height: auto; }

.page-landing .site-nav .nav-gh {
  gap: 0.4rem;
  padding: 7px 12px;
  border-color: var(--border);
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
}

.page-landing .site-nav .nav-gh:hover {
  border-color: var(--border-strong);
  color: var(--text);
  background: var(--bg-alt);
}

.page-landing .site-nav .nav-gh svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  fill: currentColor;
}

/* Landing: distinguish navigation from static installation information. */
.route-link[href] {
  position: relative;
  border-color: var(--interactive-border);
  background: var(--interactive-fill);
  padding-right: 48px;
}

.route-link[href]::after {
  content: "\2192";
  position: absolute;
  top: 50%;
  right: 18px;
  color: var(--teal-bright);
  transform: translateY(-50%);
  transition: transform 0.15s ease;
}

.route-link[href]:hover {
  border-color: var(--teal-bright);
  background: rgba(76, 175, 132, 0.13);
}

.route-link[href]:hover::after { transform: translate(3px, -50%); }

.route-panel {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-alt);
}

.route-panel strong {
  display: block;
  margin-bottom: 3px;
  color: var(--text);
  font-size: 14px;
}

.route-panel span,
.route-panel code {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.route-panel code {
  overflow-wrap: anywhere;
  color: var(--teal-bright);
}

.page-landing .workshop-banner .btn-ghost {
  border-color: var(--interactive-border);
  background: var(--interactive-fill);
  color: var(--text);
}

.page-landing .workshop-banner .btn-ghost:hover {
  border-color: var(--teal-bright);
  background: rgba(76, 175, 132, 0.15);
  color: var(--teal-bright);
}

body.page-landing.light .workshop-banner .btn-ghost {
  border-color: var(--interactive-border);
  background: var(--interactive-fill);
}

/* Product: static cards remain calm; controls carry the interaction signal. */
.feature-card,
.why-vcard,
.audience-card {
  transition: background-color 0.18s ease, box-shadow 0.18s ease;
}

.feature-card:hover,
.why-vcard:hover,
.audience-card:hover {
  border-color: var(--border);
}

.btn,
.btn-primary,
.btn-secondary,
.btn-ghost,
.mini-link {
  min-height: 44px;
  transition-property: background-color, border-color, color, box-shadow, transform;
  transition-duration: 0.16s;
  transition-timing-function: ease;
}

.btn-secondary,
.btn-ghost,
.mini-link {
  border-color: var(--interactive-border);
}

body.light .btn-primary {
  box-shadow: 0 8px 20px rgba(43, 100, 77, 0.14);
}

body.page-product.light .btn-primary {
  box-shadow: 0 8px 20px rgba(9, 105, 218, 0.14);
}

body.light .btn-secondary,
body.light .btn-ghost,
body.light .mini-link {
  background: rgba(255, 255, 255, 0.28);
}

/* EN and DE Garden hubs share the same component geometry and states. */
.page-garden .wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding-left: 48px;
  padding-right: 48px;
}

.page-garden main { padding: 112px 0 72px; }

.page-garden .hero,
.page-garden .hub-note {
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: var(--panel-shadow);
}

.page-garden .hero {
  margin-bottom: 24px;
  padding: 28px;
  border-radius: 8px;
}

.page-garden h1,
.page-garden h2,
.page-garden h3 {
  color: var(--text);
  font-family: var(--font-display);
  line-height: 1.08;
}

.page-garden h1 { margin: 16px 0 12px; }
.page-garden h2 { margin-bottom: 10px; font-size: 1.6rem; }
.page-garden .hero p { max-width: 67ch; font-size: 1.04rem; }

.hub-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.hub-card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  box-shadow: var(--panel-shadow);
}

.hub-card p { flex: 1; }
.hub-card .btn { align-self: flex-start; }
.hub-num {
  margin-bottom: 12px;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.hub-note {
  margin-top: 18px;
  padding: 18px 20px;
  border-radius: 8px;
}

.page-garden footer { margin-top: 0; }

.hub-card .btn-secondary:hover {
  border-color: var(--teal-bright);
  color: var(--teal-bright);
  background: var(--green-soft);
}

body.light .hub-card {
  background: #f0ece4;
  border-color: #d2ccbf;
  box-shadow: 0 10px 26px rgba(54, 48, 35, 0.08);
}

body.light .hub-note {
  background: #ebe6dc;
  border-color: #d2ccbf;
  box-shadow: none;
}

@media (max-width: 1100px) {
  html { scroll-padding-top: 72px; }
  [id] { scroll-margin-top: 72px; }

  .menu-toggle { display: inline-flex; }

  .site-nav .nav-inner {
    min-height: 58px;
    height: 58px;
    padding: 0 18px;
    align-items: center;
    flex-wrap: nowrap;
  }

  .site-nav .nav-brand { max-width: none; }

  .site-nav .nav-links {
    position: fixed;
    top: 58px;
    left: 0;
    right: 0;
    display: none;
    width: auto;
    max-height: calc(100dvh - 58px);
    overflow-y: auto;
    padding: 14px 18px calc(18px + env(safe-area-inset-bottom));
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    background: var(--nav-bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--panel-shadow);
  }

  .site-nav.menu-open .nav-links { display: flex; }

  .site-nav .nav-links > a {
    width: 100%;
    min-height: 44px;
    padding: 8px 12px;
    justify-content: flex-start;
    border-radius: 6px;
  }

  .site-nav .lang-switch,
  .site-nav .theme-btn {
    width: 100%;
    min-height: 44px;
    justify-content: flex-start;
    border-radius: 6px;
  }

  .site-nav .lang-switch {
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid var(--border);
    background: var(--bg-alt);
  }

  .site-nav .lang-switch a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
  }

  .page-garden .site-nav + main,
  .page-garden-article .site-nav + main { padding-top: 82px; }

  .site-header {
    padding: 0;
    min-height: 64px;
  }

  .site-header .header-inner {
    min-height: 64px;
    height: 64px;
    padding: 0 18px;
    gap: 12px;
  }

  .site-header .header-brand .brand-wordmark {
    width: auto;
    max-width: min(54vw, 188px);
    height: 38px;
    object-fit: contain;
  }

  .site-header .menu-toggle {
    margin-left: auto;
    color: var(--fg);
    background: var(--bg-card);
  }

  .site-header .header-nav {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    display: none;
    width: auto;
    max-height: calc(100dvh - 64px);
    overflow-y: auto;
    margin: 0;
    padding: 14px 18px calc(18px + env(safe-area-inset-bottom));
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    background: rgba(14, 17, 23, 0.98);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--panel-shadow);
  }

  body.light .site-header .header-nav { background: rgba(244, 241, 235, 0.98); }
  .site-header.menu-open .header-nav { display: flex; }

  .site-header .header-nav .nav-link,
  .site-header .header-gh,
  .site-header .theme-btn,
  .site-header .lang-sel {
    display: flex;
    width: 100%;
    min-height: 44px;
    align-items: center;
    padding: 8px 12px;
    border-radius: 6px;
  }

  .site-header .lang-sel {
    gap: 12px;
    margin: 0;
    padding-right: 12px;
    border: 1px solid var(--border);
  }

  .site-header .lang-sel a,
  .site-header .lang-sel strong {
    display: inline-flex;
    min-width: 44px;
    min-height: 36px;
    align-items: center;
    justify-content: center;
  }

  .hub-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .page-product .audience-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .wrap,
  .container,
  .container-wide,
  .footer-inner {
    padding-left: 18px;
    padding-right: 18px;
  }

  .page-garden .wrap {
    padding-left: 18px;
    padding-right: 18px;
  }

  .term-body {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .term-divider {
    width: 100%;
    height: 1px;
  }

  .term-foot {
    grid-column: 1;
    flex-direction: column;
    gap: 4px;
  }

  .atrocity-banner,
  .workshop-banner {
    min-height: min(78dvh, 520px);
  }

  .hub-card,
  .hero,
  .hub-note { border-radius: 8px; }

  .page-utility { padding: 18px; }

  .page-utility main {
    padding: 22px;
    border-radius: 8px;
  }

  .page-utility .links a {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    border-radius: 6px;
  }

  .page-legal .wrap {
    width: min(100% - 28px, 860px);
    padding-top: 18px;
  }

  .page-legal .card {
    padding: 22px 18px;
    border-radius: 8px;
  }

  .page-legal .topbar {
    align-items: flex-start;
    gap: 8px 12px;
  }

  .page-legal .topbar-group {
    width: 100%;
    min-height: 44px;
    flex-wrap: wrap;
  }

  .page-legal .topbar-spacer,
  .page-legal .topbar > .topbar-sep { display: none; }

  .page-legal .topbar > a,
  .page-legal .topbar > strong {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  .site-nav .nav-links,
  .site-header .header-nav {
    padding-top: 8px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
  }

  .atrocity-banner,
  .workshop-banner,
  .cinematic-banner img {
    min-height: 0;
    height: min(82dvh, 360px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
