/* ----- AI Engine product page (/{lang}/services|tjanster/aiengine/) ----- */
/* Loaded only by the AI Engine pages. Portal gold stays the action colour; */
/* the AI purple from the product illustrations marks AI Engine itself.     */

.productPage#aiengine {
  --aiPurple: #5b54b7;
  --aiPurpleSoft: #efeefa;
  --aiText: #505050;
  --aiHeading: #1f1f2e;
  --aiGlow: #f1f0ff;
  --aiBorder: #e2e2e8;
  --aiWarnBorder: #e0b3b3;
  /* 28% tint of --aiPurple on white. */
  --aiPurpleBorder: #d1cfeb;
  color: var(--aiText);
}

.productPage#aiengine .container {
  font-size: 16px;
  line-height: 1.6;
}

/* Hero */
.productPage#aiengine .aiHero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 48px;
  padding: 80px 0 0 60px;
  background-color: #e7e8ed;
}
.productPage#aiengine .aiHeroText {
  position: relative;
  z-index: 1;
  flex: 0 1 46%;
  padding-bottom: 88px;
}
.productPage#aiengine .aiHeroText .heading1 {
  margin: 0 0 16px;
  /* A shade softer than the section headings: at 84px the near-black reads
     heavier than the same colour does at 30px. */
  color: #333333;
  font-family: "playfair display";
  font-size: 84px;
  font-weight: 600;
  letter-spacing: 8px;
  line-height: 1.05;
  text-align: left;
}
.productPage#aiengine .aiHeroText p {
  max-width: 560px;
  font-size: 18px;
}
/* Kept for its spacing only; the rule in main.css draws a grey line here. */
.productPage#aiengine .aiHeroText .topContainerBorder2 {
  margin: 24px 0;
  border-top-color: transparent;
}
.productPage#aiengine .aiHero .buttonContainer {
  justify-content: flex-start;
  margin: 0;
  padding: 0;
}
/* The product shot peeps up out of the bottom-right corner: it bleeds past the
   hero's right and bottom edges, which clip it. The SVG carries its own shadow
   and ~3% transparent margin, so the bleed value looks larger than it reads.
   The sides stay fully visible: 56px of breathing room on the right, and
   margin-left keeps it pinned there once max-width takes over from the 54%
   basis rather than letting it drift into the middle. */
.productPage#aiengine .aiHeroImage {
  position: relative;
  z-index: 1;
  flex: 1 1 54%;
  max-width: 880px;
  align-self: flex-end;
  min-width: 0;
  margin: 48px 56px -88px auto;
}
.productPage#aiengine .aiHeroImage img {
  display: block;
  width: 100%;
  height: auto;
  /* drop-shadow rather than box-shadow: it follows the mockup's own silhouette
     instead of boxing the SVG's transparent margin. */
  filter: drop-shadow(0 26px 50px rgba(40, 40, 80, 0.18));
}

/* Hero entrance. Opacity and transform only, so it stays on the compositor and
   costs nothing to run. fill-mode backwards means each element shows its normal
   styles once the animation ends, and if animations never run at all nothing is
   left hidden. */
@keyframes aiHeroIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}
@keyframes aiHeroImageIn {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
}
.productPage#aiengine .aiHeroText .heading1,
.productPage#aiengine .aiHeroText p,
.productPage#aiengine .aiHero .buttonContainer {
  animation: aiHeroIn 0.75s cubic-bezier(0.33, 1, 0.68, 1) backwards;
}
.productPage#aiengine .aiHeroText p {
  animation-delay: 0.1s;
}
.productPage#aiengine .aiHero .buttonContainer {
  animation-delay: 0.2s;
}
.productPage#aiengine .aiHeroImage {
  animation: aiHeroImageIn 0.9s cubic-bezier(0.33, 1, 0.68, 1) 0.12s backwards;
}

/* Hero background decoration. Two soft organic blobs, a purple glow lifting off
   the bottom edge, and a radar ping that fires roughly once every 18s. Purely
   decorative: behind the content, hidden from assistive tech, no pointer events.
   The hero's overflow:hidden crops whatever runs past its edges. */
.productPage#aiengine .aiHeroDecor {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 0;
  pointer-events: none;
}
.productPage#aiengine .aiBlob {
  position: absolute;
  display: block;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  will-change: transform;
}
/* Pale blob high on the right, clear of the headline and body copy. */
.productPage#aiengine .aiBlob-1 {
  top: -52%;
  right: -20%;
  width: 62vw;
  min-width: 460px;
  height: 62vw;
  min-height: 460px;
  background-image: url("/resources/images/ai-engine-blob-1.svg");
  opacity: 0.55;
  animation: aiBlobDrift1 46s ease-in-out infinite;
}
/* Darker blob low and further left, overlapping the pale one in the middle. */
.productPage#aiengine .aiBlob-2 {
  right: 22%;
  bottom: -62%;
  width: 54vw;
  min-width: 400px;
  height: 46vw;
  min-height: 340px;
  background-image: url("/resources/images/ai-engine-blob-2.svg");
  opacity: 0.2;
  animation: aiBlobDrift2 62s ease-in-out infinite;
}
/* Slow drift. Different periods so the two never settle into a shared rhythm. */
@keyframes aiBlobDrift1 {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  33% {
    transform: translate3d(3%, -3%, 0) scale(1.06);
  }
  66% {
    transform: translate3d(-3%, 2%, 0) scale(0.96);
  }
}
@keyframes aiBlobDrift2 {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1) rotate(0deg);
  }
  50% {
    transform: translate3d(-5%, -3%, 0) scale(1.09) rotate(5deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .productPage#aiengine .aiBlob,
  .productPage#aiengine .aiHeroText .heading1,
  .productPage#aiengine .aiHeroText p,
  .productPage#aiengine .aiHero .buttonContainer,
  .productPage#aiengine .aiHeroImage {
    animation: none;
  }
}
/* The slight purple lifting off the bottom edge of the hero. */
.productPage#aiengine .aiHero::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 0;
  height: 200px;
  background: linear-gradient(to top, var(--aiGlow) 0%, rgba(241, 240, 255, 0) 100%);
  pointer-events: none;
}

/* Sections */
.productPage#aiengine .aiSection {
  padding: 88px 60px;
}
.productPage#aiengine .aiSection-tinted {
  background-color: #fafafa;
}
.productPage#aiengine .aiSection .heading2,
.productPage#aiengine .aiCta .heading2,
.productPage#aiengine .aiMinutes .heading2 {
  margin: 0 0 20px;
  color: var(--aiHeading);
  line-height: 1.15;
  font-family: "Open Sans", sans-serif;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: 0;
}
/* The closing call to action is the one place besides the hero that keeps the
   serif, so the page opens and closes on the same voice. */
.productPage#aiengine .aiCta .heading2 {
  max-width: 900px;
  margin: 0 auto 24px;
  /* Evens out the last line instead of leaving one word stranded. Ignored by
     browsers that do not support it, which just fall back to a normal wrap. */
  text-wrap: balance;
  font-family: "Playfair Display", serif;
  font-size: 38px;
  font-weight: 400;
  letter-spacing: 1px;
}
.productPage#aiengine .aiSection .heading2,
.productPage#aiengine .aiSection h3,
.productPage#aiengine .aiMinutes .heading2 {
  text-align: left;
}
.productPage#aiengine .aiEyebrow {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--aiPurple);
}
.productPage#aiengine .aiIntro {
  max-width: 720px;
  margin: 0 0 44px;
  line-height: 1.7;
}

/* Cards */
.productPage#aiengine .aiCards {
  display: grid;
  gap: 24px;
}
.productPage#aiengine .aiCards-four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.productPage#aiengine .aiCards-2up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

/* Section header sits above its cards, held to a readable measure. */
.productPage#aiengine .aiSectionHeader {
  max-width: 720px;
  margin-bottom: 48px;
}
.productPage#aiengine .aiSectionHeader .aiIntro {
  margin-bottom: 0;
}
/* The problems the product solves: dashed and faintly red, so they read as the
   state of things without AI Engine rather than as features. Border only, no
   shadow. Numbered via a counter so the markup stays language-neutral. */
.productPage#aiengine .aiCards-2up {
  counter-reset: aiProblem;
}
.productPage#aiengine .aiCard-problem {
  border: 1px dashed var(--aiWarnBorder);
  counter-increment: aiProblem;
}
.productPage#aiengine .aiCard-problem::before {
  content: "0" counter(aiProblem);
  display: block;
  margin-bottom: 10px;
  color: var(--aiPurple);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
}
.productPage#aiengine .aiCard {
  padding: 24px;
  border: 1px solid var(--aiBorder);
  border-radius: 10px;
  background-color: #ffffff;
}
.productPage#aiengine .aiCard h3 {
  margin: 0 0 8px;
  color: var(--aiHeading);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
}
.productPage#aiengine .aiCard p {
  margin: 0;
  font-size: 15px;
}
/* Icon sits on the title's line. The card is a two-column grid so the icon and
   the h3 share a row and everything below spans the full width. */
.productPage#aiengine .aiCard-icon {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 12px;
}
.productPage#aiengine .aiCard-icon i {
  align-self: center;
  color: var(--aiPurple);
  font-size: 17px;
  line-height: 1;
}
.productPage#aiengine .aiCard-icon h3 {
  align-self: center;
  margin: 0;
  font-size: 17px;
  line-height: 1.2;
}
.productPage#aiengine .aiCard-icon p,
.productPage#aiengine .aiCard-icon .aiRoleQuestions {
  grid-column: 1 / -1;
}
.productPage#aiengine .aiCard-icon p {
  margin-top: 10px;
}

/* Centred section variant: add aiSection-center alongside aiSection to centre
   the heading, intro and every card in that section. The icon/title row becomes
   two content-sized columns so the pair can be centred as a unit. */
.productPage#aiengine .aiSection-center,
.productPage#aiengine .aiSection-center .heading2,
.productPage#aiengine .aiSection-center h3 {
  text-align: center;
}
.productPage#aiengine .aiSection-center .aiIntro {
  margin-left: auto;
  margin-right: auto;
}
/* Flex rather than the default grid: the icon and title share one centred line
   and the text below wraps onto its own full-width line, so the title is only
   broken when it genuinely does not fit. */
.productPage#aiengine .aiSection-center .aiCard-icon {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  column-gap: 12px;
}
.productPage#aiengine .aiSection-center .aiCard-icon p,
.productPage#aiengine .aiSection-center .aiCard-icon .aiRoleQuestions {
  flex: 0 0 100%;
}

/* Role cards: off-white panel, keeping the 1px border from .aiCard and lifted
   by a soft two-part shadow -- a tight one for the edge, a wide one for depth. */
.productPage#aiengine .aiCard-role {
  border-color: var(--aiPurpleBorder);
  background-color: #fafafb;
  box-shadow: 0 1px 2px rgba(40, 40, 60, 0.04),
    0 10px 30px rgba(40, 40, 60, 0.08);
}

.productPage#aiengine .aiRoleQuestions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--aiBorder);
  list-style: none;
}
/* Question chips: a very light purple on the card, body text colour, lifted
   just enough to separate them from the card behind. */
.productPage#aiengine .aiRoleQuestions li {
  padding: 10px 14px;
  border-radius: 12px;
  background-color: var(--aiPurpleSoft);
  box-shadow: 0 1px 3px rgba(40, 40, 60, 0.09);
  color: var(--aiText);
  font-size: 14px;
  font-style: italic;
  line-height: 1.45;
}

/* Security */
.productPage#aiengine .aiSection.aiSecure {
  text-align: center;
}
.productPage#aiengine .aiSection.aiSecure .heading2 {
  text-align: center;
}
.productPage#aiengine .aiSecure p {
  max-width: 760px;
  margin: 0 auto;
}
.productPage#aiengine .aiBadges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px 64px;
  margin: 44px 0 0;
}
.productPage#aiengine .aiBadge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  font-size: 16px;
  line-height: 1.4;
  text-align: center;
}
/* 64px keeps the smallest source image (160px tall) sharp on a 2x display. */
.productPage#aiengine .aiBadge img {
  height: 64px;
  width: auto;
  max-width: 100%;
}

/* Minutes */
.productPage#aiengine .aiMinutes {
  padding: 32px 60px;
}
.productPage#aiengine .aiMinutes p {
  text-align: left;
}
.productPage#aiengine .aiMinutes .imgContainer img {
  border-radius: 16px;
}

/* FAQ */
.productPage#aiengine .aiFaq {
  max-width: 820px;
  margin: 0 auto;
  border-top: 1px solid var(--aiBorder);
}
.productPage#aiengine .aiFaq details {
  border-bottom: 1px solid var(--aiBorder);
}
.productPage#aiengine .aiFaq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 44px;
  padding: 14px 0;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.productPage#aiengine .aiFaq summary::-webkit-details-marker {
  display: none;
}
.productPage#aiengine .aiFaqChevron {
  flex: 0 0 auto;
  color: var(--aiPurple);
  font-size: 18px;
  transition: transform 0.2s ease;
}
.productPage#aiengine .aiFaq details[open] .aiFaqChevron {
  transform: rotate(180deg);
}
.productPage#aiengine .aiFaq details p {
  margin: 0 0 16px;
  max-width: 720px;
}

.productPage#aiengine .aiFaqSection {
  padding-top: 50px;
}
.productPage#aiengine .aiFaqSection .heading2 {
  max-width: 820px;
  margin-right: auto;
  margin-left: auto;
}

/* Closing call to action */
.productPage#aiengine .aiCta {
  position: relative;
  overflow: hidden;
  padding: 104px 60px;
  background-color: var(--aiGlow);
  text-align: center;
}
/* Dashed arrows converging on the button from every side. Decorative, so it is
   a background layer with no markup of its own; cover keeps the strokes from
   being stretched out of shape by the section's aspect ratio. */
.productPage#aiengine .aiCta::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 0;
  background-image: url("/resources/images/ai-cta-arrows.svg?v=2");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  pointer-events: none;
}
.productPage#aiengine .aiCta > * {
  position: relative;
  z-index: 1;
}
/* One rule for both paragraphs, so the pair can never drift apart in size. */
.productPage#aiengine .aiCta p {
  max-width: 620px;
  margin: 0 auto;
  text-wrap: balance;
  font-size: 17px;
  line-height: 1.65;
}
.productPage#aiengine .aiCta p + p {
  margin-top: 18px;
}
.productPage#aiengine .aiCta .buttonContainer {
  justify-content: center;
  margin-top: 40px;
}
/* Sits under the button as a quiet footnote rather than part of the pitch. */
.productPage#aiengine .aiCta .aiCtaSmall {
  margin-top: 28px;
  color: #6f6f80;
  font-size: 15px;
}
.productPage#aiengine .aiCta .aiCtaSmall i {
  margin-right: 8px;
}

/* The hero headline steps down in stages: in a row it cannot shrink below its
   longest word, and German runs longest, so each step keeps "AI ENGINE" on one
   line until the layout stacks. */
@media screen and (max-width: 1400px) {
  .productPage#aiengine .aiHeroText .heading1 {
    font-size: 68px;
    letter-spacing: 6px;
  }
}

/* Tablet */
@media screen and (max-width: 1100px) {
  .productPage#aiengine .aiCards-four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .productPage#aiengine .aiCta::before {
    display: none;
  }
}

@media screen and (max-width: 800px) {
  .productPage#aiengine .aiCards-2up {
    grid-template-columns: minmax(0, 1fr);
  }
  .productPage#aiengine .aiSectionHeader {
    margin-bottom: 32px;
  }
}

/* Stacked hero. Breaks far above the 767px mobile breakpoint: side by side the
   headline stops shrinking at its longest word, so the mockup loses its share
   of the row and turns into an odd-looking sliver long before the page is
   phone-width. Below this it sits under the text instead, centred. */
@media screen and (max-width: 1200px) {
  .productPage#aiengine .aiHero {
    flex-direction: column;
    gap: 0;
    padding: 64px 40px 0;
  }
  .productPage#aiengine .aiHeroText {
    flex: 1 1 auto;
    padding-bottom: 0;
  }
  .productPage#aiengine .aiHeroText .heading1 {
    font-size: 56px;
    letter-spacing: 5px;
  }
  /* Centred once it sits below the text, still peeping up from the bottom. */
  .productPage#aiengine .aiHeroImage {
    flex: 0 0 auto;
    align-self: center;
    width: 100%;
    max-width: 560px;
    margin: 40px 0 -56px;
  }
}

/* Mobile */
@media screen and (max-width: 767px) {
  .productPage#aiengine .aiHero {
    padding: 48px 20px 0;
  }
  .productPage#aiengine .aiHeroText .heading1 {
    font-size: 48px;
    letter-spacing: 4px;
  }
  .productPage#aiengine .aiHeroImage {
    margin: 32px 0 -40px;
  }
  .productPage#aiengine .aiSection,
  .productPage#aiengine .aiCta {
    padding: 68px 20px;
  }
  .productPage#aiengine .aiMinutes {
    padding: 24px 20px;
  }
  .productPage#aiengine .aiSection .heading2,
  .productPage#aiengine .aiCta .heading2 {
    font-size: 26px;
  }
  .productPage#aiengine .aiCards-four {
    grid-template-columns: minmax(0, 1fr);
  }
  .productPage#aiengine .aiBadges {
    gap: 32px 40px;
  }
  .productPage#aiengine .aiBadge img {
    height: 56px;
  }
}
