/*
  Mindset section — matches references/home/4, mindset/mindset.png, a full
  export of slide 12 of the Brunnbauer intro deck ("Gyártási szemléletünk").
  Like capabilities, this is Brunnbauer's own slide (not a sibling-company
  reskin), so its copy is kept verbatim.

  Background photo + navy overlay (originally photo-valve-handwheels-
  reflection, matching capabilities' own background — confirmed via pptx
  extraction, slide12.xml.rels rId3 -> ../media/image18.jpeg) were removed
  per explicit user instruction, then the flat navy fallback that briefly
  replaced them was itself swapped to white per an immediate follow-up.
  Eyebrow/title flipped from white/slate-200 to navy-900/slate-600 to stay
  readable on the new light background (same colors about.css's headline
  block uses on its own white section).

  Icon circles are solid red (not the translucent red used in capabilities'
  tags/photo-rings) — this reference's circles read as opaque, a deliberate
  difference from capabilities' own deviation.
*/

.mindset {
  position: relative;
  overflow: hidden;
  padding-top: var(--space-9); padding-bottom: var(--space-9);
  background: var(--color-white);
}

/* Faint navy section drawing of the 020 valve behind the content, as on
   slide 13 of the intro deck (user request 2026-11-15, replaced the red
   corner quarter-circle). Source: the deck's transparent line-art PNG
   (ppt/media/image87.png), recoloured to navy-900 with the line darkness
   as alpha -> elements/shapes/drawing-valve-020-section-navy.png. */
.mindset__drawing {
  position: absolute;
  top: 50%;
  left: clamp(-100px, calc(50vw - 900px), 40px);
  z-index: var(--z-base);
  width: auto;
  height: min(125%, 1060px);
  opacity: 0.24;
  transform: translateY(-50%);
  pointer-events: none;
  user-select: none;
}

.mindset__inner {
  position: relative;
  z-index: var(--z-elevated);
}

.mindset__eyebrow {
  color: var(--color-slate-600);
  font-family: var(--font-eyebrow);
  font-size: var(--fs-eyebrow);
  font-weight: var(--fw-eyebrow);
  text-transform: uppercase;
  text-align: center;
}

.mindset__title {
  margin-top: var(--space-3);
  max-width: 720px;
  margin-left: auto; margin-right: auto;
  color: var(--color-navy-900);
  font-weight: var(--fw-display);
  letter-spacing: var(--tracking-tight);
  text-align: center;
}

.mindset__divider {
  width: 56px;
  height: 3px;
  margin-top: var(--space-5);
  margin-left: auto; margin-right: auto;
  background: var(--color-red-600);
  border-radius: 2px;
}

/* ---- 2-column x 4-row item grid ---- */
.mindset__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-flow: column;
  grid-template-rows: repeat(4, auto);
  gap: var(--space-6) var(--space-8);
  margin-top: var(--space-8);
}

.mindset__item {
  --icon-size: clamp(64px, 7vw, 88px);
  display: flex;
  align-items: center;
}

.mindset__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  z-index: 1;
  width: var(--icon-size);
  height: var(--icon-size);
  background: #a02117; /* one-off darker red per explicit user color pick, not var(--color-red-600) */
  border-radius: 50%;
  box-shadow: var(--shadow-lg);
  /* Card's left edge lands exactly on the circle's horizontal center, per
     explicit user instruction — half the icon's own width, not a fixed
     spacing value, so the overlap scales with --icon-size at every
     breakpoint. */
  margin-right: calc(-1 * var(--icon-size) / 2);
  transition: transform var(--duration-base) var(--ease-spring), box-shadow var(--duration-base) var(--ease-out);
}

.mindset__icon img {
  width: 44%;
  height: 44%;
  object-fit: contain;
}

/* Same lift + deepened navy-tinted shadow as .capabilities__cert:hover /
   .mindset__card above — the red circle itself only ever lifts, it never
   spins (the glyph inside it does, see .mindset__icon--spinning below). */
.mindset__item:hover .mindset__icon {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(29, 47, 66, 0.2), 0 32px 64px rgba(29, 47, 66, 0.22);
}

.mindset__item:active .mindset__icon {
  transform: translateY(-1px);
}

/* Hovering anywhere on the item (icon or card) spins the glyph image once
   — the circle behind it only lifts (above), it doesn't rotate. Triggered
   by JS (main.js) adding this class to the <img> on mouseenter rather
   than a plain :hover selector, so a quick mouse-out mid-spin doesn't cut
   the animation short — it keeps playing to completion regardless of
   pointer state, then main.js removes the class on `animationend`.
   Uses `transform: rotate()`, not the standalone `rotate` property, which
   iOS 14 WebKit did not animate (iPad, 2026-11-21). The glyph has no other
   transform, so nothing is overwritten. */
.mindset__icon--spinning {
  animation: mindset-icon-spin 1.4s var(--ease-spring);
}

@keyframes mindset-icon-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.mindset__card {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* Matches the icon circle's height, per explicit user instruction — a
     min-height (not a hard height) so a card whose two-line description
     needs more room can still grow instead of clipping text. */
  min-height: var(--icon-size);
  padding-top: var(--space-3); padding-bottom: var(--space-3);
  padding-right: var(--space-5);
  /* Left padding grows with the icon overlap (half the icon's width) so
     the title/text keep the same visual x-position they had before the
     card was extended left to the circle's center — only the card's own
     background/edge moved, not its text, per explicit user instruction. */
  padding-left: calc(var(--icon-size) / 2 + var(--space-2));
  background: #b4c7e7; /* one-off light blue, same literal already used for the capabilities cert box */
  /* Rounded on bottom-right only, per explicit user instruction (order:
     top-left, top-right, bottom-right, bottom-left — top-left was dropped
     in a follow-up). Literal 24px, not var(--radius-lg) (32px, shared with
     capabilities__card) — tuned down specifically for this section. */
  border-radius: 0 0 24px 0;
  box-shadow: var(--shadow-md);
  transition: transform var(--duration-base) var(--ease-spring), box-shadow var(--duration-base) var(--ease-out);
}

/* Same lift + deepened navy-tinted shadow as .capabilities__cert:hover
   (capabilities.css) — that box shares this one's light-blue background,
   so the hover treatment is reused verbatim rather than invented anew. */
.mindset__item:hover .mindset__card {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(29, 47, 66, 0.2), 0 32px 64px rgba(29, 47, 66, 0.22);
}

.mindset__item:active .mindset__card {
  transform: translateY(-1px);
}

.mindset__card-title {
  color: var(--color-navy-900);
  font-weight: var(--fw-bold);
  font-size: var(--fs-body);
  line-height: var(--lh-heading);
}

.mindset__card-text {
  margin-top: var(--space-1);
  color: var(--color-navy-900);
  font-weight: var(--fw-regular);
  font-size: var(--fs-small);
  line-height: 1.4;
}

/* ---- Tablet / mobile (<= 768px) ---- */
@media (max-width: 768px) {
  .mindset {
    padding-top: var(--space-8); padding-bottom: var(--space-8);
  }

  .mindset__grid {
    grid-template-columns: 1fr;
    grid-auto-flow: row;
    grid-template-rows: none;
    gap: var(--space-5);
  }
}

/* 769-1023px: two narrow columns; same tighter boxes as on phones (below),
   so the matched circle size stays under main.js's cap (2026-11-17). */
@media (min-width: 769px) and (max-width: 1023px) {
  .mindset__card {
    padding-top: var(--space-2); padding-bottom: var(--space-2);
    padding-right: var(--space-3);
  }

  .mindset__card-text {
    line-height: 1.35;
  }
}

/* ---- Mobile (<= 480px) ---- */
@media (max-width: 480px) {
  .mindset__item {
    align-items: flex-start;
    --icon-size: 56px;
  }

  /* Tighter boxes, so the circle size main.js matches to the tallest box
     stays moderate (90px at 393 instead of 118; 2026-11-17). */
  .mindset__card {
    padding-top: var(--space-2); padding-bottom: var(--space-2);
    padding-right: var(--space-3);
  }

  .mindset__card-text {
    line-height: 1.35;
  }
}
