/* responsive sits after components so media-query overrides beat every base rule. */
@layer reset, tokens, base, layout, components, responsive, utilities;

@layer reset {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  html {
    scroll-behavior: smooth;
  }

  body,
  h1,
  h2,
  h3,
  p,
  ol,
  ul {
    margin: 0;
  }

  img,
  svg {
    display: block;
    max-width: 100%;
  }

  a {
    color: inherit;
    text-decoration: none;
  }

  button,
  input,
  textarea,
  select {
    font: inherit;
  }
}

@layer tokens {
  :root {
    color-scheme: light;
    --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --bg: #f6f9fb;
    --bg-strong: #ffffff;
    --ink: #061525;
    --ink-soft: #183149;
    --muted: #627588;
    --line: #dbe6ee;
    --line-strong: #c8d6df;
    --accent: #c9941a;
    --accent-strong: #6f4f00;
    --accent-soft: #fff3cf;
    --blue-soft: #edf5ff;
    --dark: #062033;
    --dark-2: #0a2a41;
    --shadow-sm: 0 10px 28px rgb(6 21 37 / 0.07);
    --shadow-md: 0 20px 60px rgb(6 21 37 / 0.12);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 34px;
    --container: min(1160px, calc(100vw - 40px));
    --section: clamp(72px, 9vw, 132px);
    --ease: cubic-bezier(0.2, 0.9, 0.2, 1);
  }
}

@layer base {
  body {
    min-width: 320px;
    overflow-x: hidden;
    background:
      radial-gradient(circle at 14% 8%, rgb(201 148 26 / 0.1), transparent 34rem),
      linear-gradient(180deg, #f9fbfc 0%, var(--bg) 46%, #ffffff 100%);
    color: var(--ink);
    font-family: var(--font-sans);
    line-height: 1.5;
    text-rendering: optimizeLegibility;
  }

  ::selection {
    background: rgb(201 148 26 / 0.22);
  }

  :focus-visible {
    outline: 3px solid color-mix(in srgb, var(--accent) 65%, white);
    outline-offset: 4px;
  }
}

@layer layout {
  .site-header {
    position: sticky;
    z-index: 40;
    top: 0;
    border-bottom: 1px solid transparent;
    background: rgb(246 249 251 / 0.78);
    backdrop-filter: blur(18px);
    transition: border-color 180ms var(--ease), box-shadow 180ms var(--ease);
  }

  .site-header.is-scrolled {
    border-color: rgb(219 230 238 / 0.86);
    box-shadow: 0 10px 30px rgb(6 21 37 / 0.05);
  }

  .nav-shell {
    width: var(--container);
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin-inline: auto;
  }

  .nav-menu {
    display: flex;
    align-items: center;
    gap: 24px;
    color: var(--ink-soft);
    font-size: 14px;
    font-weight: 700;
  }

  .section {
    width: var(--container);
    margin-inline: auto;
    padding-block: var(--section);
  }

  .hero {
    width: min(1360px, calc(100vw - 48px));
    min-height: calc(100svh - 78px);
    display: grid;
    align-items: center;
    padding-block: clamp(70px, 8vw, 112px);
  }

  .hero-content {
    display: grid;
    grid-template-columns: minmax(320px, 0.82fr) minmax(620px, 1.18fr);
    align-items: center;
    gap: clamp(50px, 6vw, 88px);
  }

  .hero-copy {
    display: grid;
    gap: 28px;
  }

  .hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
  }

  .hero-points {
    display: grid;
    gap: 14px;
    margin-block-start: 6px;
  }

  .section-lead {
    max-width: 760px;
    display: grid;
    gap: 18px;
    margin-block-end: 48px;
  }

  .steps {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--line);
    box-shadow: var(--shadow-sm);
  }

  .management {
    display: grid;
    grid-template-columns: minmax(280px, 0.86fr) minmax(0, 1.14fr);
    gap: clamp(40px, 6vw, 84px);
    align-items: start;
  }

  .management-copy {
    position: sticky;
    top: 110px;
    display: grid;
    gap: 18px;
  }

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

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

  .included-card {
    grid-column: 1 / -1;
  }
}

@layer components {
  .skip-link {
    position: fixed;
    z-index: 100;
    top: 14px;
    left: 14px;
    transform: translateY(-140%);
    border-radius: 999px;
    background: var(--dark);
    color: #fff;
    padding: 10px 14px;
    font-weight: 800;
    transition: transform 160ms var(--ease);
  }

  .skip-link:focus {
    transform: translateY(0);
  }

  .brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-size: 20px;
    font-weight: 900;
    letter-spacing: -0.02em;
  }

  .brand-mark,
  .mini-mark {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 12px;
    background: var(--dark);
    color: #fff;
    font-weight: 900;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .brand-mark.large {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    font-size: 24px;
  }

  .mini-mark {
    width: 26px;
    height: 26px;
    border-radius: 9px;
    font-size: 13px;
  }

  .nav-menu a:not(.button) {
    color: color-mix(in srgb, var(--ink-soft) 88%, white);
    transition: color 160ms var(--ease);
  }

  .nav-menu a:not(.button):hover {
    color: var(--accent);
  }

  .login-link {
    margin-inline-start: 4px;
  }

  .mobile-login-link {
    display: none;
  }

  .nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--bg-strong);
    color: var(--ink);
  }

  .nav-toggle span:not(.sr-only) {
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: transform 180ms var(--ease), opacity 180ms var(--ease);
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(2) {
    transform: translateY(6px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(3) {
    opacity: 0;
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(4) {
    transform: translateY(-6px) rotate(-45deg);
  }

  h1,
  h2,
  h3 {
    color: var(--ink);
    letter-spacing: -0.055em;
    line-height: 0.98;
  }

  h1 {
    max-width: 14ch;
    font-size: clamp(46px, 6.4vw, 76px);
    font-weight: 900;
  }

  h2 {
    max-width: 13ch;
    font-size: clamp(40px, 5.4vw, 68px);
    font-weight: 900;
  }

  h3 {
    font-size: 22px;
    font-weight: 850;
    letter-spacing: -0.035em;
  }

  .hero-copy > p,
  .section-lead p,
  .management-copy p,
  .ai-panel p,
  .final-cta p {
    max-width: 66ch;
    color: var(--muted);
    font-size: clamp(17px, 1.55vw, 20px);
    line-height: 1.6;
  }

  .button {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0 20px;
    font-size: 15px;
    font-weight: 850;
    letter-spacing: -0.01em;
    transition:
      transform 180ms var(--ease),
      border-color 180ms var(--ease),
      background 180ms var(--ease),
      color 180ms var(--ease),
      box-shadow 180ms var(--ease);
  }

  .button:hover {
    transform: translateY(-2px);
  }

  .button svg {
    width: 20px;
    height: 20px;
  }

  .button svg path,
  .hero-points svg path,
  .hero-points svg circle,
  .capability-grid svg path {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
  }

  .button-primary {
    background: var(--accent);
    color: var(--ink);
    box-shadow: 0 16px 32px rgb(201 148 26 / 0.24);
  }

  .button-primary:hover {
    background: var(--accent-strong);
  }

  .button-secondary {
    border-color: var(--line);
    background: rgb(255 255 255 / 0.72);
    color: var(--ink);
  }

  .button-secondary:hover {
    border-color: var(--line-strong);
    background: #fff;
  }

  .button-dark {
    background: var(--dark);
    color: #fff;
  }

  .button-small {
    min-height: 42px;
    padding-inline: 16px;
    font-size: 14px;
  }

  .hero-points span {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--ink-soft);
    font-size: 15px;
    font-weight: 800;
  }

  .hero-points svg {
    width: 24px;
    height: 24px;
    color: var(--accent);
  }

  .product-frame {
    position: relative;
    width: min(100%, 840px);
    justify-self: end;
    perspective: 1400px;
    isolation: isolate;
  }

  .product-frame::before {
    content: "";
    position: absolute;
    inset: 26px -18px -20px 42px;
    z-index: -1;
    border-radius: 34px;
    background:
      linear-gradient(135deg, rgb(201 148 26 / 0.16), rgb(8 125 82 / 0.12)),
      linear-gradient(180deg, rgb(255 255 255 / 0.45), rgb(255 255 255 / 0));
    filter: blur(18px);
  }

  .app-window {
    position: relative;
    display: grid;
    grid-template-columns: 184px minmax(0, 1fr);
    min-height: 600px;
    overflow: hidden;
    border: 1px solid rgb(200 214 223 / 0.8);
    border-radius: 28px;
    background: #fff;
    box-shadow: var(--shadow-md);
    transform: rotateX(2deg) rotateY(-3deg);
    transform-origin: center;
  }

  .app-window.premium-preview {
    grid-template-columns: 1fr;
    min-height: 590px;
    border-color: rgb(150 168 177 / 0.7);
    background: #fff;
    box-shadow:
      0 32px 84px rgb(6 21 37 / 0.2),
      0 1px 0 rgb(255 255 255 / 0.9) inset;
    transform: rotateX(1.4deg) rotateY(-2.4deg);
  }

  .app-window::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(135deg, rgb(255 255 255 / 0.5), transparent 36%);
  }

  .app-sidebar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 22px 14px;
    border-right: 1px solid var(--line);
    background: #f7fafc;
  }

  .preview-browser-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 42px;
    border-bottom: 1px solid var(--line);
    background:
      linear-gradient(180deg, #ffffff 0%, #f6f9fb 100%);
    padding: 0 16px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
  }

  .preview-browser-bar strong {
    color: var(--ink);
    font-size: 13px;
    font-weight: 900;
  }

  .window-dots {
    display: inline-flex;
    gap: 6px;
  }

  .window-dots i {
    width: 9px;
    height: 9px;
    display: block;
    border-radius: 999px;
    background: #d8e1e7;
  }

  .window-dots i:first-child {
    background: #c9941a;
  }

  .preview-app-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    min-height: 548px;
  }

  .app-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-block-end: 16px;
    color: var(--ink);
    font-size: 14px;
  }

  .nav-item,
  .club-switcher {
    border-radius: 12px;
    padding: 9px 10px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
  }

  .nav-item.active {
    background: var(--accent-soft);
    color: var(--accent-strong);
  }

  .club-switcher {
    margin-block-start: auto;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    line-height: 1.35;
  }

  .club-switcher small {
    color: var(--muted);
    font-weight: 700;
  }

  .app-main {
    min-width: 0;
    padding: 22px;
    background:
      linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
  }

  .preview-main {
    display: grid;
    align-content: start;
    gap: 18px;
    padding: 24px;
    background:
      linear-gradient(180deg, #ffffff 0%, #f7fafb 54%, #f3f7f9 100%);
  }

  .preview-product-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-width: 0;
  }

  .preview-product-nav .app-brand {
    flex: 0 0 auto;
    margin: 0;
  }

  .preview-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #f6f9fb;
    padding: 4px;
  }

  .preview-tabs span {
    border-radius: 999px;
    color: var(--muted);
    padding: 8px 11px;
    white-space: nowrap;
    font-size: 11px;
    font-weight: 900;
  }

  .preview-tabs .active {
    background: var(--accent-soft);
    color: var(--accent-strong);
    box-shadow: 0 8px 18px rgb(201 148 26 / 0.14);
  }

  .preview-club-pill {
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--ink-soft);
    padding: 9px 12px;
    font-size: 11px;
    font-weight: 900;
  }

  .preview-command {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
  }

  .preview-command > div {
    display: grid;
    gap: 5px;
  }

  .preview-command strong {
    color: var(--ink);
    font-size: clamp(24px, 2.6vw, 34px);
    font-weight: 900;
    letter-spacing: -0.045em;
    line-height: 1.08;
  }

  .preview-command span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
    line-height: 1.35;
  }

  .preview-state {
    flex: 0 0 auto;
    border: 1px solid color-mix(in srgb, var(--accent) 44%, white);
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-strong) !important;
    padding: 8px 11px;
    font-size: 11px !important;
    font-weight: 900 !important;
  }

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

  .preview-kpis article,
  .preview-chart-card,
  .preview-fit-card,
  .preview-workflow {
    border: 1px solid var(--line);
    background: rgb(255 255 255 / 0.94);
    box-shadow: 0 16px 36px rgb(6 21 37 / 0.055);
  }

  .preview-kpis article {
    display: grid;
    gap: 5px;
    border-radius: 16px;
    padding: 14px;
  }

  .preview-kpis span,
  .preview-kpis small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 820;
    line-height: 1.35;
  }

  .preview-kpis strong {
    color: var(--ink);
    font-size: 17px;
    font-weight: 900;
    letter-spacing: -0.035em;
  }

  .preview-dashboard {
    display: grid;
    grid-template-columns: minmax(0, 1.22fr) minmax(260px, 0.78fr);
    gap: 16px;
  }

  .preview-chart-card,
  .preview-fit-card {
    min-height: 300px;
    border-radius: 22px;
    padding: 20px;
  }

  .preview-hero-chart {
    position: relative;
    min-height: 186px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 20px;
    background:
      linear-gradient(90deg, rgb(218 228 235 / 0.55) 1px, transparent 1px) 0 0 / 16.666% 100%,
      linear-gradient(180deg, rgb(218 228 235 / 0.45) 1px, transparent 1px) 0 0 / 100% 25%,
      #fff;
  }

  .preview-hero-chart i {
    position: absolute;
    bottom: 18px;
    left: var(--x);
    width: 26px;
    height: var(--h);
    border-radius: 999px 999px 0 0;
    background: linear-gradient(180deg, #19b772, #087d52);
    box-shadow: 0 10px 22px rgb(8 125 82 / 0.2);
  }

  .preview-hero-chart .bar-1 {
    --x: 10%;
    --h: 22%;
  }

  .preview-hero-chart .bar-2 {
    --x: 26%;
    --h: 38%;
  }

  .preview-hero-chart .bar-3 {
    --x: 42%;
    --h: 58%;
  }

  .preview-hero-chart .bar-4 {
    --x: 58%;
    --h: 74%;
  }

  .preview-hero-chart .bar-5 {
    --x: 74%;
    --h: 68%;
  }

  .preview-hero-chart .bar-6 {
    --x: 90%;
    --h: 82%;
  }

  .path-line {
    position: absolute;
    left: 24px;
    right: 24px;
    height: 5px;
    border-radius: 999px;
  }

  .path-plan {
    top: 31%;
    background: #0a2b40;
  }

  .path-forecast {
    top: 49%;
    background: repeating-linear-gradient(90deg, #c9941a 0 12px, transparent 12px 18px);
  }

  .preview-match-hero {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 13px;
    align-items: center;
    margin-bottom: 12px;
    border: 1px solid color-mix(in srgb, var(--accent) 44%, white);
    border-radius: 20px;
    background:
      radial-gradient(circle at 14% 20%, rgb(201 148 26 / 0.22), transparent 8rem),
      linear-gradient(180deg, #fff9e8 0%, #fff 100%);
    padding: 14px;
  }

  .match-score {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: #0a2b40;
    color: #fff;
    font-size: 22px;
    font-weight: 950;
    letter-spacing: -0.04em;
  }

  .preview-match-hero strong {
    color: var(--ink);
    display: block;
    font-size: 15px;
    font-weight: 950;
    line-height: 1.22;
  }

  .preview-match-hero small {
    color: var(--muted);
    display: block;
    margin-top: 4px;
    font-size: 11px;
    font-weight: 760;
    line-height: 1.35;
  }

  .preview-rights-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-top: 14px;
  }

  .preview-rights-strip span {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--muted);
    padding: 9px 8px;
    text-align: center;
    font-size: 11px;
    font-weight: 900;
  }

  .preview-sponsor-list {
    display: grid;
    gap: 10px;
  }

  .preview-sponsor-list > div {
    position: relative;
    display: grid;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: linear-gradient(180deg, #fff 0%, #f9fbfc 100%);
    padding: 12px 70px 12px 13px;
  }

  .preview-sponsor-list strong {
    color: var(--ink);
    font-size: 13px;
    font-weight: 900;
    line-height: 1.25;
  }

  .preview-sponsor-list span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
    line-height: 1.35;
  }

  .preview-sponsor-list em {
    position: absolute;
    top: 12px;
    right: 12px;
    border-radius: 999px;
    background: #edf7f1;
    color: #087d52;
    padding: 6px 8px;
    font-size: 10px;
    font-style: normal;
    font-weight: 900;
  }

  .preview-workflow {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    border-radius: 18px;
    background: var(--line);
  }

  .preview-workflow span {
    display: grid;
    gap: 3px;
    background: #fff;
    padding: 13px 14px;
  }

  .preview-workflow strong {
    color: var(--ink);
    font-size: 13px;
    font-weight: 900;
  }

  .preview-workflow small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
  }

  .app-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-block-end: 18px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
  }

  .app-topbar .app-brand {
    margin: 0;
  }

  .preview-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #f7fafc;
  }

  .preview-nav .nav-item {
    padding: 8px 11px;
    border-radius: 999px;
    white-space: nowrap;
  }

  .preview-club-switcher {
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    padding: 9px 12px;
    font-size: 12px;
    font-weight: 850;
  }

  .preview-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-block-end: 18px;
  }

  .preview-header > div {
    display: grid;
    gap: 5px;
  }

  .preview-header span {
    color: var(--accent-strong);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .preview-header strong {
    color: var(--ink);
    font-size: clamp(22px, 2.4vw, 30px);
    line-height: 1.08;
    letter-spacing: -0.04em;
  }

  .preview-export {
    flex: 0 0 auto;
    border: 1px solid color-mix(in srgb, var(--accent) 46%, white);
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-strong);
    padding: 10px 13px;
    font-size: 12px;
    font-weight: 900;
  }

  .app-topbar strong {
    color: var(--ink);
    font-size: 16px;
  }

  .metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-block-end: 12px;
  }

  .metric-grid article,
  .pipeline-card,
  .activity-card,
  .price-card,
  .included-card,
  .capability-grid article {
    border: 1px solid var(--line);
    background: rgb(255 255 255 / 0.92);
    box-shadow: 0 12px 30px rgb(6 21 37 / 0.05);
  }

  .metric-grid article {
    display: grid;
    gap: 4px;
    border-radius: 16px;
    padding: 14px;
  }

  .metric-grid span,
  .metric-grid small,
  .card-head span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
  }

  .metric-grid strong {
    color: var(--ink);
    font-size: 14px;
  }

  .dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 12px;
  }

  .pipeline-card,
  .activity-card {
    min-height: 252px;
    border-radius: 18px;
    padding: 18px;
  }

  .card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-block-end: 18px;
    color: var(--ink);
    font-size: 14px;
  }

  .funnel {
    display: grid;
    gap: 9px;
    margin-block-end: 18px;
  }

  .funnel span {
    width: var(--w);
    height: 22px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), #e0b13a);
  }

  .stage-list,
  .rights-strip {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
  }

  .stage-list span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid #edf2f6;
    padding-block-start: 8px;
  }

  .stage-list.compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 14px;
  }

  .stage-list.compact span {
    justify-content: center;
    border-top: 0;
    border-radius: 999px;
    background: #f6f9fb;
    padding: 8px;
  }

  .preview-chart {
    position: relative;
    min-height: 170px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background:
      linear-gradient(90deg, rgb(218 228 235 / 0.55) 1px, transparent 1px) 0 0 / 20% 100%,
      linear-gradient(180deg, rgb(218 228 235 / 0.45) 1px, transparent 1px) 0 0 / 100% 25%,
      #fff;
  }

  .preview-chart i {
    position: absolute;
    bottom: 18px;
    left: var(--x);
    width: 32px;
    height: var(--h);
    border-radius: 999px 999px 0 0;
    background: linear-gradient(180deg, #16b36b, #087d52);
  }

  .chart-line {
    position: absolute;
    left: 24px;
    right: 24px;
    height: 4px;
    border-radius: 999px;
  }

  .chart-line.plan {
    top: 34%;
    background: #09283d;
  }

  .chart-line.actual {
    top: 57%;
    width: 44%;
    background: #087d52;
  }

  .chart-line.forecast {
    top: 48%;
    background: repeating-linear-gradient(90deg, #c9941a 0 10px, transparent 10px 16px);
  }

  .preview-donut {
    width: min(210px, 72%);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 4px;
    margin: 12px auto 18px;
    border-radius: 999px;
    background:
      radial-gradient(circle, #fff 0 52%, transparent 53%),
      conic-gradient(#087d52 0 72%, #cfe6d7 72% 86%, #09283d 86% 100%);
  }

  .preview-donut strong {
    color: var(--ink);
    font-size: 24px;
    letter-spacing: -0.04em;
  }

  .preview-donut span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
  }

  .activity-card ul,
  .price-card ul,
  .included-card ul {
    display: grid;
    gap: 13px;
    padding: 0;
    list-style: none;
  }

  .activity-card li,
  .price-card li,
  .included-card li {
    position: relative;
    padding-inline-start: 18px;
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 700;
  }

  .activity-card li::before,
  .price-card li::before,
  .included-card li::before {
    content: "";
    position: absolute;
    top: 0.65em;
    left: 0;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--accent);
  }

  .rights-strip {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-block-start: 12px;
  }

  .rights-strip span {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    padding: 9px 10px;
    text-align: center;
  }

  .steps li {
    min-height: 242px;
    display: grid;
    align-content: start;
    gap: 15px;
    padding: 28px 20px;
    background: var(--bg-strong);
  }

  .steps span {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-size: 15px;
    font-weight: 900;
  }

  .steps strong {
    color: var(--ink);
    font-size: 21px;
    letter-spacing: -0.03em;
  }

  .steps p,
  .capability-grid p,
  .price-card p,
  .included-card li {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.55;
  }

  .capability-grid article {
    min-height: 224px;
    display: grid;
    align-content: start;
    gap: 16px;
    border-radius: var(--radius-lg);
    padding: 26px;
  }

  .capability-grid svg {
    width: 34px;
    height: 34px;
    color: var(--accent);
  }

  .intelligence {
    width: 100%;
    max-width: none;
    padding-inline: max(20px, calc((100vw - 1160px) / 2));
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 72%, #0f3b52 100%);
  }

  .ai-panel {
    width: min(1160px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
    gap: clamp(34px, 5vw, 80px);
    align-items: center;
    margin-inline: auto;
    color: #fff;
  }

  .ai-panel h2 {
    max-width: 14ch;
    color: #fff;
  }

  .ai-panel p {
    color: #c6d8e4;
    margin-block-start: 22px;
  }

  .ai-list {
    display: grid;
    gap: 12px;
  }

  .ai-list span {
    border: 1px solid rgb(255 255 255 / 0.14);
    border-radius: 18px;
    background: rgb(255 255 255 / 0.08);
    color: #eef7fb;
    padding: 18px 20px;
    font-size: 16px;
    font-weight: 850;
  }

  .price-card,
  .included-card {
    position: relative;
    display: grid;
    gap: 18px;
    border-radius: var(--radius-lg);
    padding: 28px;
  }

  .price-card.featured {
    border-color: color-mix(in srgb, var(--accent) 50%, white);
    box-shadow: 0 22px 64px rgb(201 148 26 / 0.18);
  }

  .price-card strong {
    color: var(--ink);
    font-size: 44px;
    letter-spacing: -0.05em;
    line-height: 1;
  }

  .pricing-grid-simple {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .price-card strong.price-on-request {
    font-size: clamp(28px, 3vw, 40px);
    overflow-wrap: anywhere;
  }

  .price-card strong span {
    color: var(--muted);
    font-size: 16px;
    letter-spacing: 0;
  }

  .plan-label {
    width: fit-content;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-strong);
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 900;
  }

  .included-card {
    grid-template-columns: minmax(0, 1fr) minmax(220px, auto);
    align-items: center;
    background: var(--dark);
    color: #fff;
  }

  .included-card h3 {
    color: #fff;
  }

  .included-card li {
    color: #d6e4ec;
  }

  .final-cta {
    width: min(1160px, calc(100vw - 40px));
    margin: 0 auto var(--section);
  }

  .final-cta-inner {
    display: grid;
    justify-items: center;
    gap: 24px;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background:
      radial-gradient(circle at 20% 20%, rgb(201 148 26 / 0.2), transparent 22rem),
      linear-gradient(180deg, #ffffff 0%, #f1f6f8 100%);
    padding: clamp(54px, 8vw, 92px) 24px;
    text-align: center;
    box-shadow: var(--shadow-sm);
  }

  .demo-request-inner {
    grid-template-columns: minmax(260px, 0.82fr) minmax(360px, 1.18fr);
    align-items: start;
    justify-items: stretch;
    gap: clamp(28px, 5vw, 64px);
    padding: clamp(34px, 5vw, 56px);
    text-align: left;
  }

  .demo-request-copy {
    display: grid;
    gap: 20px;
    position: sticky;
    top: 104px;
  }

  .final-cta h2 {
    max-width: 14ch;
  }

  .final-cta p {
    max-width: 680px;
  }

  .not-found-shell {
    min-height: 100svh;
    display: grid;
    place-items: center;
    margin-block: 0;
  }

  .not-found-title {
    max-width: 12ch;
    font-size: clamp(42px, 7vw, 76px);
    text-align: center;
  }

  .demo-form {
    display: grid;
    gap: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgb(255 255 255 / 0.86);
    padding: clamp(20px, 3vw, 28px);
    box-shadow: 0 20px 58px rgb(6 21 37 / 0.08);
  }

  .demo-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .demo-form label {
    display: grid;
    gap: 7px;
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 850;
  }

  .demo-form input,
  .demo-form textarea {
    width: 100%;
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: 15px;
    font-weight: 650;
    outline: none;
    padding: 13px 14px;
    transition: border-color 180ms var(--ease), box-shadow 180ms var(--ease);
  }

  .demo-form input:focus,
  .demo-form textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgb(201 148 26 / 0.16);
  }

  .demo-form textarea {
    min-height: 120px;
    resize: vertical;
  }

  .consent-row {
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
  }

  .consent-row input {
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
    accent-color: var(--accent);
  }

  .demo-form-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
  }

  .demo-form button[disabled] {
    cursor: progress;
    opacity: 0.72;
  }

  .demo-status {
    min-height: 22px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
  }

  .demo-status.success {
    color: #087d52;
  }

  .demo-status.error {
    color: #9a3412;
  }

  .site-footer {
    width: var(--container);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-inline: auto;
    border-top: 1px solid var(--line);
    padding-block: 28px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 750;
  }

  .site-footer a:hover {
    color: var(--accent);
  }

  .footer-legal {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 20px;
  }

  .legal-page {
    padding-block: 56px 72px;
  }

  .legal-container {
    max-width: 78ch;
  }

  .legal-page h1 {
    max-width: none;
    font-size: clamp(30px, 7vw, 44px);
    margin-bottom: 8px;
  }

  .legal-page h2 {
    max-width: none;
    font-size: clamp(20px, 4.5vw, 24px);
    margin-top: 40px;
    margin-bottom: 10px;
  }

  /* Long German compound words must not force the page wider than the viewport. */
  .legal-page h1,
  .legal-page h2,
  .legal-page p,
  .legal-page li {
    overflow-wrap: anywhere;
  }

  .legal-page p,
  .legal-page li {
    color: var(--ink-soft);
    font-size: 16px;
    line-height: 1.7;
  }

  .legal-page ul {
    margin: 0 0 16px;
    padding-left: 22px;
    display: grid;
    gap: 6px;
  }

  .legal-page a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
  }

  .legal-page code {
    background: var(--bg);
    border-radius: 6px;
    padding: 1px 6px;
    font-size: 14px;
  }

  .legal-meta {
    color: var(--muted);
    font-weight: 750;
  }

  .legal-notice {
    border: 1px solid var(--line);
    border-left: 4px solid var(--accent);
    border-radius: 14px;
    background: var(--bg);
    padding: 16px 18px;
    margin-block: 24px 8px;
  }
}

@layer utilities {
  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
  /* Only hide content once JavaScript has taken over the reveal animation. */
  .js-reveal .reveal {
    opacity: 0;
    transform: translateY(22px);
    transition:
      opacity 620ms var(--ease),
      transform 620ms var(--ease);
  }

  .js-reveal .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
  }

  @media (prefers-reduced-motion: reduce) {
    .js-reveal .reveal {
      opacity: 1;
      transform: none;
      transition: none;
    }
  }
}

@media (max-width: 1080px) {
  @layer responsive {
    .hero-content,
    .management,
    .ai-panel,
    .demo-request-inner {
      grid-template-columns: 1fr;
    }

    .product-frame {
      max-width: 780px;
    }

    .management-copy {
      position: static;
    }

    .demo-request-copy {
      position: static;
    }

    .steps {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    h1,
    h2 {
      max-width: 14ch;
    }

    .app-window {
      transform: none;
    }
  }
}

@media (max-width: 860px) {
  @layer responsive {
    .nav-shell {
      position: relative;
      min-height: 68px;
      gap: 10px;
    }

    .brand {
      margin-right: auto;
    }

    .nav-menu {
      position: absolute;
      z-index: 80;
      inset: calc(100% + 10px) 0 auto;
      display: none;
      flex-direction: column;
      align-items: stretch;
      gap: 12px;
      border: 1px solid var(--line);
      border-radius: 18px;
      background: #fff;
      padding: 16px;
      box-shadow: var(--shadow-md);
    }

    .nav-menu a:not(.button) {
      border-radius: 12px;
      padding: 11px 12px;
    }

    .nav-menu a:not(.button):hover {
      background: var(--bg);
    }

    .nav-menu .login-link {
      display: none;
    }

    .nav-menu .button {
      width: 100%;
    }

    .nav-menu.is-open {
      display: flex;
    }

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

    .hero {
      min-height: auto;
    }

    .hero-content {
      gap: 34px;
    }

    .product-frame {
      justify-self: stretch;
      width: 100%;
    }

    .app-window {
      grid-template-columns: 1fr;
      min-height: auto;
      border-radius: 24px;
    }

    .app-window.premium-preview {
      min-height: auto;
    }

    .preview-app-shell {
      grid-template-columns: 1fr;
      min-height: auto;
    }

    .preview-main {
      padding: 16px;
    }

    .preview-product-nav {
      flex-wrap: wrap;
      align-items: flex-start;
    }

    .preview-tabs {
      order: 3;
      width: 100%;
      overflow-x: auto;
    }

    .preview-club-pill {
      display: none;
    }

    .preview-command {
      flex-direction: column;
      gap: 10px;
    }

    .app-sidebar {
      display: none;
    }

    .metric-grid,
    .dashboard-grid,
    .demo-form-grid,
    .capability-grid,
    .pricing-grid,
    .included-card {
      grid-template-columns: 1fr;
    }

    .preview-kpis,
    .preview-dashboard,
    .preview-workflow {
      grid-template-columns: 1fr;
    }

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

    .included-card {
      justify-items: start;
    }
  }

  @layer responsive {
    .mobile-login-link {
      min-height: 38px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex: 0 0 auto;
      border: 1px solid var(--line);
      border-radius: 999px;
      background: #fff;
      color: var(--ink);
      padding: 0 14px;
      font-size: 13px;
      font-weight: 900;
      box-shadow: 0 10px 24px rgb(6 21 37 / 0.06);
    }

    h1 {
      max-width: 12ch;
    }

    .button {
      width: 100%;
    }

    .hero-actions {
      width: 100%;
    }

    .app-topbar,
    .card-head,
    .preview-header,
    .site-footer {
      align-items: flex-start;
      flex-direction: column;
    }

    .preview-nav {
      width: 100%;
      overflow-x: auto;
    }

    .preview-export,
    .preview-club-switcher {
      display: none;
    }
  }
}

@media (max-width: 560px) {
  @layer tokens {
    :root {
      --container: min(100vw - 28px, 1160px);
    }
  }

  @layer responsive {
    h1 {
      font-size: 46px;
    }

    .legal-page h1 {
      font-size: clamp(26px, 8vw, 34px);
    }

    h2 {
      font-size: 38px;
    }

    .hero-copy > p,
    .section-lead p,
    .management-copy p,
    .ai-panel p,
    .final-cta p {
      font-size: 17px;
    }

    .app-main {
      padding: 16px;
    }

    .metric-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rights-strip {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .preview-rights-strip {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .preview-browser-bar > span:last-child {
      display: none;
    }

    .capability-grid article,
    .price-card,
    .included-card {
      padding: 22px;
    }
  }
}

.language-switch { display: flex; align-items: center; gap: .2rem; flex-shrink: 0; margin: 0 .75rem; }
.language-switch a { padding: .35rem .45rem; border-radius: .35rem; font-size: .8rem; font-weight: 700; text-decoration: none; color: inherit; }
html[lang="de"] .language-switch a[lang="de"], html[lang="en"] .language-switch a[lang="en"] { background: #062033; color: white; }
.language-switch a:focus-visible { outline: 2px solid #007e87; outline-offset: 2px; }
@media (max-width: 480px) { .language-switch { margin: 0 .2rem; } .language-switch a { padding: .35rem .3rem; } }

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

  .reveal {
    opacity: 1;
    transform: none;
  }
}
