/*
 * Site-specific fixes on top of the Webflow CSS (loaded after it).
 * Keep Webflow's files untouched; put corrections here.
 */

/*
 * Wide screens: Webflow gives .container a fixed 2rem side margin and relies on the
 * parent section to center it. Sections that don't (pricing calculator, trust,
 * campaign, blog list, case studies) left the content stuck to the left with an
 * empty right side. Auto margins center the max-width container; below the
 * breakpoint (1200px + 2 × 2rem) the original 2rem gutters stay in place.
 * Containers nested in other wrappers (e.g. page heroes) are not affected.
 */
/*
 * Home hero: interactive product mockup (iframe → /mockup/de|en) instead of the video.
 * Fills the whole frame (the fake macOS title bar was removed).
 */
.mockup-frame {
  position: relative;
  height: 100%;
  background: #f5f5f5;
}

.mockup-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Touch devices: show it like a screenshot so swiping scrolls the page, not the mockup. */
@media (hover: none) {
  .mockup-frame iframe {
    pointer-events: none;
  }
}

@media screen and (min-width: 1265px) {
  section > .container {
    margin-left: auto;
    margin-right: auto;
  }

  /* Trust hero: text block intentionally sits left over the background image */
  section.hero.background-img > .container {
    margin-left: 2rem;
    margin-right: 2rem;
  }
}

/*
 * Top navigation, desktop (≥ 992px; below that Webflow's hamburger menu is unchanged).
 * Linear-style: pill hover on menu items, a thin divider before "Anmelden / Jetzt starten",
 * dropdowns open on hover as a light panel (title + muted description, column dividers,
 * footer row) with a short fade-in.
 */
@keyframes nav-dropdown-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media screen and (min-width: 992px) {
  /* menu items as pills */
  .navigation .nav-menu-2 {
    grid-column-gap: 2px;
  }

  .navigation .nav-dropdown-2,
  .navigation .nav-dropdown-2:hover {
    position: relative;
    background-color: transparent;
    border-radius: 9999px;
  }

  .navigation .nav-dropdown-toggle,
  .navigation .nav-link-2 {
    height: 32px;
    padding: 0 12px;
    color: #3f3f46;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    transition: color 0.1s ease, background-color 0.1s ease;
  }

  .navigation .nav-dropdown-toggle {
    gap: 4px;
  }

  .navigation .nav-dropdown-toggle .nav-dropdown-arrow {
    position: static;
    margin: 0;
    font-size: 9px;
    color: #a1a1aa;
    transition: transform 0.15s ease;
  }

  .navigation .nav-dropdown-2:hover .nav-dropdown-toggle,
  .navigation .nav-dropdown-toggle.w--open,
  .navigation .nav-link-2:hover {
    color: #09090b;
    background-color: rgba(0, 0, 0, 0.05);
  }

  .navigation .nav-dropdown-2:hover .nav-dropdown-arrow {
    transform: rotate(180deg);
  }

  /* divider before the login / sign-up buttons */
  .navigation .nav-menu-buttons {
    align-items: center;
  }

  .navigation .nav-menu-buttons::before {
    content: '';
    width: 1px;
    height: 20px;
    margin-right: 12px;
    background-color: #e4e4e7;
  }

  /* dropdown panel: opens on hover, directly below the item */
  .navigation .nav-dropdown-list-small,
  .navigation .nav-dropdown-list-small.w--open {
    top: 100%;
    left: -8px;
    min-width: 0;
    padding-top: 10px; /* invisible hover bridge between item and panel */
    background-color: transparent;
    overflow: visible;
  }

  .navigation .nav-dropdown-2:hover > .nav-dropdown-list-small,
  .navigation .nav-dropdown-2:focus-within > .nav-dropdown-list-small {
    display: block;
    animation: nav-dropdown-in 0.16s ease-out;
  }

  .navigation .nav-dropdown-card-small {
    width: max-content;
    min-width: 320px;
    background-color: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.14), 0 2px 6px rgba(0, 0, 0, 0.04);
  }

  .navigation .nav-link-list {
    grid-row-gap: 2px;
    padding: 8px;
  }

  .navigation .nav-dropdown-card-small.horiz .nav-link-list + .nav-link-list {
    border-left: 1px solid rgba(0, 0, 0, 0.06);
  }

  .navigation .nav-link-large {
    padding: 10px 12px;
    border-radius: 8px;
    transition: background-color 0.1s ease;
  }

  .navigation .nav-link-large:hover,
  .navigation .nav-link-large.w--current {
    background-color: #f4f4f5;
  }

  .navigation .nav-link-large .subheading-small-3 {
    color: #18181b;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
  }

  .navigation .nav-link-large .paragraph-small-12.short {
    max-width: 240px;
    margin-top: 2px;
    color: #71717a;
    font-size: 13px;
    line-height: 18px;
  }

  .navigation .nav-dropdown-footer {
    padding: 10px 20px;
    background-color: #fafafa;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
  }

  .navigation .nav-dropdown-footer .nav-dropdown-caption,
  .navigation .nav-dropdown-footer .paragraph-small-12 {
    padding: 0;
    color: #71717a;
    font-size: 13px;
  }

  .navigation .nav-dropdown-footer .button-outline-2 {
    min-height: 28px;
    padding: 4px 12px;
    color: #18181b;
    background-color: #fff;
    border-color: rgba(0, 0, 0, 0.12);
    border-radius: 9999px;
    font-size: 13px;
  }

  .navigation .nav-dropdown-footer .button-outline-2:hover {
    background-color: #f4f4f5;
  }
}

/*
 * Shared dropdown panel (src/scripts/nav-dropdown.ts adds .js-nav-viewport to the nav):
 * one panel that stays open while moving between menu items, slides to the hovered item,
 * animates its size and cross-fades the content in the direction of movement.
 * Without JS the per-item CSS hover above still works.
 */
.nav-viewport {
  display: none; /* mobile: Webflow's hamburger menu only */
}

@media screen and (min-width: 992px) {
  .nav-viewport {
    display: block;
  }

  .navigation.js-nav-viewport .nav-dropdown-list-small,
  .navigation.js-nav-viewport .nav-dropdown-list-small.w--open {
    display: none !important;
  }

  .navigation.js-nav-viewport .navigation-container {
    position: relative;
  }

  .navigation .nav-dropdown-2.is-active .nav-dropdown-toggle {
    color: #09090b;
    background-color: rgba(0, 0, 0, 0.05);
  }

  .navigation .nav-dropdown-2.is-active .nav-dropdown-arrow {
    transform: rotate(180deg);
  }

  .nav-viewport {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 100;
    padding-top: 6px; /* hover bridge */
    opacity: 0;
    visibility: hidden;
    translate: 0 -4px;
    transition:
      transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
      opacity 0.15s ease,
      translate 0.15s ease,
      visibility 0s linear 0.15s;
  }

  .nav-viewport.is-open {
    opacity: 1;
    visibility: visible;
    translate: 0 0;
    transition:
      transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
      opacity 0.15s ease,
      translate 0.15s ease,
      visibility 0s;
  }

  .nav-viewport.no-transition,
  .nav-viewport.no-transition .nav-viewport-panel {
    transition: none !important;
  }

  .nav-viewport-panel {
    position: relative;
    overflow: hidden;
    background-color: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.14), 0 2px 6px rgba(0, 0, 0, 0.04);
    transition:
      width 0.25s cubic-bezier(0.22, 1, 0.36, 1),
      height 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .navigation .nav-viewport .nav-viewport-content {
    position: absolute;
    top: 0;
    left: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    opacity: 0;
    transform: translateX(var(--nav-from, 0px));
    transition:
      opacity 0.2s ease,
      transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .navigation .nav-viewport .nav-viewport-content.is-visible {
    opacity: 1;
    transform: translateX(0);
  }

  .navigation .nav-viewport .nav-viewport-content.is-leaving {
    opacity: 0;
    transform: translateX(var(--nav-to, 0px));
    pointer-events: none;
  }
}

/*
 * Mobile navigation (< 992px), Linear-style: login + sign-up stay in the header, a plain
 * two-line icon that turns into an ✕, and a full-screen white menu with small grey section
 * titles and large links (no accordions, no descriptions).
 */
@media screen and (max-width: 991px) {
  .navigation .nav-menu-buttons {
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .navigation .nav-menu-buttons::before {
    content: none;
  }

  .navigation .btn.login.header {
    padding: 6px 8px;
  }

  .navigation .btn.small.header {
    padding: 7px 12px;
    border-radius: 9999px;
  }

  .navigation .btn.header,
  .navigation .btn.header * {
    font-size: 13px;
    line-height: 18px;
  }

  .navigation .nav-right {
    width: auto;
    align-items: center;
  }

  /* empty middle column would cost two 24px gaps */
  .navigation .nav-mid {
    display: none;
  }

  .navigation .navigation-container {
    grid-column-gap: 12px;
  }

  /* hamburger → two lines / ✕ */
  .navigation .menu-button-3,
  .navigation .menu-button-3.w--open {
    position: relative;
    width: 36px;
    height: 36px;
    padding: 0;
    background-color: transparent;
    border: 0;
    box-shadow: none;
  }

  .navigation .menu-button-3 .icon-3 {
    position: absolute;
    inset: 0;
    width: auto;
  }

  .navigation .menu-button-3 .icon-3::before,
  .navigation .menu-button-3 .icon-3::after {
    content: '';
    position: absolute;
    left: 9px;
    width: 18px;
    height: 1.5px;
    background-color: #18181b;
    border-radius: 2px;
    font-family: inherit;
    transition: transform 0.2s ease, top 0.2s ease;
  }

  .navigation .menu-button-3 .icon-3::before {
    top: 14px;
  }

  .navigation .menu-button-3 .icon-3::after {
    top: 21px;
  }

  .navigation .menu-button-3.w--open .icon-3::before {
    top: 17.5px;
    transform: rotate(45deg);
  }

  .navigation .menu-button-3.w--open .icon-3::after {
    top: 17.5px;
    transform: rotate(-45deg);
  }

  /* full-screen menu */
  .navigation .w-nav-overlay .nav-menu-2 {
    display: block;
    min-height: calc(100vh - 66px);
    min-height: calc(100dvh - 66px);
    padding: 4px 20px 48px;
    background-color: #fff;
  }

  .navigation .w-nav-overlay .nav-dropdown-2,
  .navigation .w-nav-overlay .nav-dropdown-2:hover {
    display: block;
    width: 100%;
    margin-top: 20px;
    background: none;
  }

  /* dropdown toggle becomes a section title */
  .navigation .w-nav-overlay .nav-dropdown-toggle,
  .navigation .w-nav-overlay .nav-dropdown-toggle.w--open {
    width: auto;
    padding: 0 0 6px;
    color: #71717a;
    background: none;
    font-size: 12px;
    font-weight: 500;
    line-height: 16px;
    pointer-events: none;
  }

  .navigation .w-nav-overlay .nav-dropdown-arrow {
    display: none;
  }

  .navigation .w-nav-overlay .nav-dropdown-list-small,
  .navigation .w-nav-overlay .nav-dropdown-list-small.w--open {
    display: block !important;
    position: static;
    padding: 0;
    background: none;
  }

  .navigation .w-nav-overlay .nav-dropdown-card-small,
  .navigation .w-nav-overlay .nav-dropdown-card-small.horiz {
    flex-direction: column;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .navigation .w-nav-overlay .nav-link-list {
    padding: 0;
    gap: 0;
  }

  .navigation .w-nav-overlay .nav-link-large {
    padding: 6px 0;
    border-radius: 0;
  }

  .navigation .w-nav-overlay .nav-link-large > div {
    width: 100%;
    max-width: none;
  }

  .navigation .w-nav-overlay .nav-link-large:hover {
    background: none;
  }

  .navigation .w-nav-overlay .nav-link-large .subheading-small-3 {
    color: #18181b;
    font-size: 18px;
    font-weight: 400;
    line-height: 26px;
  }

  .navigation .w-nav-overlay .nav-link-large .paragraph-small-12,
  .navigation .w-nav-overlay .nav-dropdown-footer {
    display: none;
  }

  /* plain links (Enterprise, Preise) as one more group */
  .navigation .w-nav-overlay .nav-link-2 {
    width: 100%;
    padding: 6px 0;
    color: #18181b;
    background: none;
    font-size: 18px;
    font-weight: 400;
    line-height: 26px;
  }

  .navigation .w-nav-overlay .nav-link-2 .nav-text {
    font-size: 18px;
    font-weight: 400;
    line-height: 26px;
  }

  .navigation .w-nav-overlay .nav-dropdown-2 + .nav-link-2 {
    margin-top: 20px;
  }
}

/*
 * Home hero mockup on phones: like linear.app the app frame stays visible, scaled down,
 * starting at the left gutter and cropped by the right screen edge.
 */
@media screen and (max-width: 767px) {
  .hero-wrap {
    width: 100%;
    min-width: 0;
  }

  .hero-wrap > .tabs {
    display: flex;
    justify-content: flex-start;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin-top: 2rem;
    padding-left: 16px;
    overflow: hidden;
  }

  .hero-wrap > .tabs .background-video-6 {
    flex: 0 0 auto;
    width: 640px;
    max-width: none;
    height: 440px;
    aspect-ratio: auto;
    border-bottom: 1px solid #ddd;
    border-radius: 10px;
  }
}

/*
 * Home page on phones (< 768px): calmer hero spacing, a headline size that stays at
 * 2–3 lines on every phone width, breathing room below the product mockup and an even
 * logo grid.
 */
@media screen and (max-width: 767px) {
  section.hero .hero-wrap {
    grid-row-gap: 40px;
  }

  section.hero .hero-content {
    margin-bottom: 0;
  }

  section.hero h1.text-72.blue {
    font-size: clamp(28px, 6.6vw, 36px);
    line-height: 1.15;
    letter-spacing: -0.02em;
  }

  .hero-wrap > .tabs {
    margin-top: 0;
  }

  section.hero {
    padding-bottom: 56px;
  }

  /* logos */
  section.section.py-80.teams {
    padding-bottom: 56px; /* same rhythm as above the logos (beats Webflow's .section.py-80) */
  }

  section.teams .text-blog.logos {
    max-width: none;
    font-size: 14px;
    line-height: 20px;
    text-align: center;
  }

  section.teams .f-title-wrapper-center {
    width: 100%;
    margin-bottom: 16px;
  }

  section.teams .f-logo-wrapper {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-column-gap: 16px;
    grid-row-gap: 8px;
    width: 100%;
  }

  section.teams .f-logo-plain {
    min-height: 64px;
    padding: 8px 0;
  }

  section.teams .image2 {
    width: auto;
    max-width: min(100%, 112px); /* keeps very wide logos from dominating */
    height: 38px;
    object-fit: contain;
  }
}

/* Home: on desktop the customer logo bar sticks to the bottom of the viewport and docks at
   its normal position while scrolling. main.main has overflow:hidden from Webflow, which
   would stop sticky; overflow:clip still clips but is not a scroll container. */
@media (min-width: 992px) {
  main.main:has(> section.logo-bar-sticky) {
    overflow: clip;
  }
  section.logo-bar-sticky {
    position: sticky;
    bottom: 0;
    z-index: 5;
    background-color: #fff;
  }
  /* slimmer bar: 112px -> ~72px */
  section.logo-bar-sticky > .container {
    min-height: 0;
    padding-top: 8px;
    padding-bottom: 8px;
    gap: 0; /* .w-container's clearfix ::before/::after would add 2 x 16px */
  }
  section.logo-bar-sticky .f-logo-plain {
    min-height: 0;
    height: 56px;
    padding: 6px 10px;
  }
}

/* SEO heading fixes: one <h1> per page. The tags changed (home: 2nd h1 → h2, trust:
   h2 → h1), these rules keep the look of the original tags. */
h2.text-64.center {
  color: inherit;
  margin-top: 0;
  margin-bottom: 0;
}
h1.heading-4 {
  font-size: 32px;
  line-height: 36px;
  margin-top: 20px;
  margin-bottom: 10px;
}
