/* ===== MAIN WEBSITE – polish (header, menu underline, capitals, justified text, card animation) ===== */

/* bigger header + logo */
:root { --header-h: 104px; }
.logo img { height: 92px !important; }
@media (max-width: 1100px) { :root { --header-h: 76px; } .logo img { height: 58px !important; } }

/* menu: underline on hover, on keyboard focus and on the selected item */
@media (min-width: 1101px) {
  .nav > ul > li > a { position: relative; }
  .nav > ul > li > a::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 3px; border-radius: 3px;
    background: var(--red, #c8202a); transform: scaleX(0); transform-origin: center; transition: transform .28s ease;
  }
  .nav > ul > li > a:hover::after, .nav > ul > li > a:focus-visible::after,
  .nav > ul > li > a.is-selected::after, .nav > ul > li > a[aria-current="page"]::after { transform: scaleX(1); }
  .nav > ul > li > a:hover, .nav > ul > li > a.is-selected { color: var(--red, #c8202a) !important; }
}

/* every word starts with a capital letter in titles and short card lines */
.pr-cap { text-transform: capitalize !important; }

/* longer descriptions: justified */
.pr-just { text-align: justify !important; text-justify: inter-word; hyphens: none; word-break: normal; }

/* bigger logo + menu text (desktop) */
@media (min-width: 1101px) {
  :root { --header-h: 120px; }
  .logo img { height: 108px !important; }
  .nav > ul > li > a { font-size: 19px !important; letter-spacing: .02em; }
  .nav > ul { gap: 14px; }
  .header .btn, .header [class*="quote"] { font-size: 18px !important; }
  /* only one underlined item: when another item is selected, the page item loses its line */
  .nav.has-sel > ul > li > a[aria-current="page"]:not(.is-selected)::after { transform: scaleX(0) !important; }
  .nav.has-sel > ul > li > a[aria-current="page"]:not(.is-selected) { color: inherit !important; }
  .nav.has-sel > ul > li > a[aria-current="page"]:not(.is-selected):hover { color: var(--red, #c8202a) !important; }
}

/* ===== hero slider: bigger titles, description in normal letters ===== */
.slide-title { font-size: clamp(40px, 6.2vw, 92px) !important; line-height: 1.04 !important; }
.slide-text  { text-transform: none !important; font-size: clamp(15px, 1.35vw, 22px) !important; line-height: 1.6 !important; max-width: 620px; }
.slide-text br { display: none; }
@media (max-width: 640px) { .slide-title { font-size: 38px !important; } .slide-text { font-size: 15px !important; } }

/* ===== company strip cards: glowing white line runs along the BOTTOM edge only ===== */
.sg-card::before {
  animation: none !important;
  background: linear-gradient(rgba(var(--rgb), .55), rgba(var(--rgb), .55)) !important;   /* calm coloured border */
}
.sg-card::after {
  content: ""; position: absolute; left: 6%; right: 6%; bottom: 0; height: 3px; border-radius: 3px; pointer-events: none;
  background: linear-gradient(90deg, transparent 0%, rgb(var(--rgb)) 35%, #fff 50%, rgb(var(--rgb)) 65%, transparent 100%) no-repeat;
  background-size: 40% 100%;
  filter: drop-shadow(0 0 6px #fff) drop-shadow(0 0 10px rgb(var(--rgb)));
  animation: sgBottom 3.2s ease-in-out infinite alternate;
}
.sg-card:nth-child(2)::after { animation-delay: -1.1s; }
.sg-card:nth-child(3)::after { animation-delay: -2.2s; }
@keyframes sgBottom { from { background-position: 0% 0; } to { background-position: 100% 0; } }
@media (prefers-reduced-motion: reduce) { .sg-card::after { animation: none; background-position: 50% 0; } }
.btn-hero { font-size: clamp(14px, 1.1vw, 19px) !important; padding: 16px 32px !important; }

/* ===== hero: light line leans further right at the bottom (more room for the text) ===== */
@media (min-width: 768px) {
  .hero-slider {
    --top: max(34%, calc(var(--cx) + var(--pad) + 560px)) !important;
    --bottom: calc(var(--top) + clamp(280px, 21vw, 460px)) !important;
  }
}
/* every word of the slide description starts with a capital letter */
.slide-text { text-transform: capitalize !important; }

/* ===== top bar: bigger ===== */
.topbar { height: 58px !important; font-size: 19px !important; }
.topbar__item svg { width: 21px !important; height: 21px !important; }
.topbar__social a { width: 38px !important; height: 38px !important; }
.topbar__social svg { width: 18px !important; height: 18px !important; }
@media (max-width: 820px) { .topbar { height: auto !important; font-size: 15px !important; } }

/* ===== hero titles: bigger, ALL CAPITALS, words fly in from right to left ===== */
.slide-title { text-transform: uppercase !important; font-size: clamp(42px, 6.8vw, 110px) !important; letter-spacing: -.01em; }
@keyframes txFlyLeft {
  0%   { opacity: 0; transform: translateX(1.4em); filter: blur(3px); }
  100% { opacity: 1; transform: none; filter: blur(0); }
}
.slide.active .tx-hero .tx-word { animation: txFlyLeft .9s cubic-bezier(.2,.75,.2,1) calc(.25s + var(--w, 0) * 110ms) both !important; }
@media (max-width: 640px) { .slide-title { font-size: 36px !important; } }

/* ===== Why The First Group: bigger cards, tidy justified text ===== */
.wy-intro { max-width: 760px !important; }
.wy-list { gap: 20px !important; }
.wy-card .wy-txt h3, .wy-card h3 { font-size: clamp(18px, 1.5vw, 26px) !important; }
.wy-card p { font-size: clamp(14.5px, 1.1vw, 19px) !important; line-height: 1.5 !important;
  text-align: justify !important; text-align-last: left !important; hyphens: auto; -webkit-hyphens: auto; word-spacing: -.02em; }
.wy-card > * { padding-top: 6px; padding-bottom: 6px; }

/* ===== "Information Technology Portfolio" heading band + quote ===== */
.itp-head { position: relative; background: linear-gradient(90deg, #0b1c5a, #1349d8); color: #fff; font-family: "Poppins", Inter, sans-serif; }
.itp-head__in { max-width: var(--maxw, 1920px); margin: 0 auto; padding: clamp(26px, 2.6vw, 44px) var(--pad, 40px);
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.itp-head__k { display: block; font-size: clamp(13px, .95vw, 16px); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #ff6b73; }
.itp-head h2 { margin: 6px 0 0; font-size: clamp(30px, 3vw, 54px); font-weight: 800; line-height: 1.08; letter-spacing: -.02em; }
.itp-head h2 span { color: #8fb4ff; }
.itp-quote { display: flex; align-items: flex-start; gap: 14px; }
.itp-quote svg { width: clamp(30px, 2.4vw, 44px); height: auto; flex: none; margin-top: 4px; }
.itp-quote p { margin: 0; font-size: clamp(20px, 1.7vw, 32px); font-weight: 600; line-height: 1.25; }
.itp-quote p span { color: #8fb4ff; }
.wy-list { max-width: 640px !important; }
.wy-card p { word-spacing: normal !important; }
.slide-title { font-size: clamp(40px, 4.6vw, 80px) !important; line-height: 1.05 !important; }

/* ===== ALL titles: words fly in from the right side of the window to their place ===== */
html, body { overflow-x: clip; }
@keyframes txFlyWindow {
  0%   { opacity: 0; transform: translateX(70vw); }
  60%  { opacity: 1; }
  100% { opacity: 1; transform: none; }
}
.tx-title.tx-go .tx-word {
  animation: txFlyWindow 1.1s cubic-bezier(.16,.84,.3,1) calc(var(--w, 0) * 90ms) both !important;
}
.slide.active .tx-hero .tx-word {
  animation: txFlyWindow 1.1s cubic-bezier(.16,.84,.3,1) calc(.2s + var(--w, 0) * 110ms) both !important;
}
.tx-title.tx-done .tx-word { animation: none !important; }
@media (prefers-reduced-motion: reduce) { .tx-title .tx-word, .tx-hero .tx-word { animation: none !important; opacity: 1 !important; } }

/* ===== ALL titles: the whole title flies in from the right edge of the window to its place ===== */
@keyframes txWholeFly {
  0%   { opacity: 1; transform: translateX(100vw); }
  100% { opacity: 1; transform: translateX(0); }
}
.tx-title .tx-word, .tx-hero .tx-word { animation: none !important; opacity: 1 !important; transform: none !important; filter: none !important; }
.tx-title.tx-wait { opacity: 0; }
.tx-title.tx-go { animation: txWholeFly 1.2s cubic-bezier(.16,.84,.3,1) both; }
.tx-title.tx-done { animation: none; }
.slide .slide-title.tx-hero { opacity: 0; }
.slide.active .slide-title.tx-hero { opacity: 1; animation: txWholeFly 1.3s cubic-bezier(.16,.84,.3,1) .2s both !important; }
@media (prefers-reduced-motion: reduce) { .tx-title, .slide-title.tx-hero { animation: none !important; opacity: 1 !important; transform: none !important; } }

/* ===== bigger titles ===== */
.slide-title { font-size: clamp(44px, 5.6vw, 96px) !important; }
.tfg-title, .xs__title, .itp-head h2 { font-size: clamp(36px, 3.6vw, 66px) !important; line-height: 1.06 !important; }
@media (max-width: 640px) { .slide-title { font-size: 38px !important; } .tfg-title, .xs__title { font-size: 32px !important; } }

/* ===== all other text flies in from the right side of the window too ===== */
@keyframes txFlyText { 0% { opacity: 0; transform: translateX(60vw); } 100% { opacity: 1; transform: none; } }
.fly-wait { opacity: 0; }
.fly-go { animation: txFlyText 1.1s cubic-bezier(.16,.84,.3,1) var(--fd, 0s) both; }
.slide .slide-content > :not(.slide-title) { opacity: 0; }
.slide.active .slide-content > :not(.slide-title) { opacity: 1; animation: txFlyText 1.15s cubic-bezier(.16,.84,.3,1) both; }
.slide.active .slide-content > :nth-child(1) { animation-delay: .05s; }
.slide.active .slide-content > :nth-child(3) { animation-delay: .45s; }
.slide.active .slide-content > :nth-child(4) { animation-delay: .65s; }
.slide.active .slide-content > :nth-child(5) { animation-delay: .8s; }
@media (prefers-reduced-motion: reduce) { .fly-wait, .slide .slide-content > * { opacity: 1 !important; animation: none !important; } }

/* ===== IT portfolio heading merged into How We Work, same left edge ===== */
.xs--how .itp-row { grid-column: 1 / -1; margin-bottom: clamp(14px, 1.6vw, 28px); font-family: "Poppins", Inter, sans-serif; }
.itp-row__k { display: block; font-size: clamp(12px, .9vw, 15px); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #d81f26; }
.itp-row__t { margin: 6px 0 0; font-size: clamp(30px, 2.8vw, 54px) !important; font-weight: 800; line-height: 1.08; letter-spacing: -.02em; color: #0b1c5a; }
.itp-row__t span { color: #1349d8; }
/* How We Work / What We Do titles fit their column (no running into the cards) */
.xs__title { font-size: clamp(28px, 2.5vw, 48px) !important; }
/* quote with red underline, same as "Innovate Today" */
.xs__quote--how p::after { content: ""; display: block; width: 90px; height: 4px; border-radius: 3px; background: #e3141b; margin-top: 16px; }

/* ===== step cards + hexagons fly in from the right, one after another ===== */
@keyframes cardFly { 0% { opacity: 0; transform: translateX(45vw); } 100% { opacity: 1; transform: none; } }
.card-wait { opacity: 0; }
.card-go { animation: cardFly 1s cubic-bezier(.16,.84,.3,1) var(--cd, 0s) both; }
@media (prefers-reduced-motion: reduce) { .card-wait { opacity: 1; } .card-go { animation: none; } }


/* =====================================================================
   "One Group – Four Specialized Companies" card descriptions – ALIGNMENT
   left = straight left edge, no big gaps between words
   (change to "justify" to get straight edges on both sides)
   ===================================================================== */
.og-card .og-body p,
.og-card .og-body p.pr-just {
  text-align: left !important;
  text-align-last: left !important;
  word-spacing: normal !important;
}


/* =====================================================================
   HERO SLIDER – HEIGHT ON PHONES AND TABLETS
   100svh = full phone screen height; the number after "-" leaves room for the menu bar
   ===================================================================== */
@media (max-width: 767px) {
  html body .hero-slider { height: calc(100svh - 64px) !important; min-height: 640px !important; max-height: none !important; }
}
@media (min-width: 768px) and (max-width: 1023px) {
  html body .hero-slider { height: calc(100svh - 120px) !important; min-height: 760px !important; max-height: none !important; }
}