/* ==========================================================================
   PK Hero Block Styles
   Full-width photo hero with animated waves, two link tiles below.

   Figma "Design [Palangos Ukis]", page "Hero changes":
   1920 = 1-2273, 1440 = 1-2571, 390 = 1-2854;
   second wave position = 37-1392 / 37-1718.

   Above 760px each size is a linear vw formula that is exact in both the
   1440 and the 1920 frame and capped at its 1920 value. Up to 760px the
   390 frame applies.
   ========================================================================== */

.hero {
  --hero-blue: #043f88;
  --hero-line: rgba(255, 255, 255, 0.16);
  --hero-wave-duration: 6s;
  background: var(--hero-blue);
  color: #fff;
  position: relative;
  overflow: hidden;
  font-family: var(--f-body);
}

/* --------------------------------------------------------------------------
   Photo area: photo, shade, waves, copy (bottom to top)
   -------------------------------------------------------------------------- */

.hero .hero-media {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  /* 900px at 1920, 780px at 1440 */
  min-height: min(calc(25vw + 420px), 900px);
  /* Left: 87.5px at 1920, 66px at 1440.
     Bottom: lifts the centred copy to y 217 at 1920 and y 196 at 1440. */
  padding: 0 0 max(60.5px, calc(68.5px - 0.4167vw)) min(calc(4.48vw + 1.5px), 87.5px);
}

.hero .hero-media__img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  display: block;
}

/* Shade: rgb(3, 20, 56) at .62 → .28 → .10 towards the top right.
   Figma defines this gradient in the box's own 0–1 coordinates, so its angle
   follows the box's aspect ratio. An SVG gradient in objectBoundingBox units
   behaves the same way; a CSS angle would only match at one width. */
.hero .hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1' preserveAspectRatio='none'%3E%3ClinearGradient id='g' x1='0' y1='1.0117' x2='.7392' y2='.456'%3E%3Cstop offset='.55' stop-color='%23031438' stop-opacity='.62'/%3E%3Cstop offset='.82' stop-color='%23031438' stop-opacity='.28'/%3E%3Cstop offset='1' stop-color='%23031438' stop-opacity='.1'/%3E%3C/linearGradient%3E%3Crect width='1' height='1' fill='url(%23g)'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
}

/* --------------------------------------------------------------------------
   Waves ("Banga animation")
   The box covers the three lines in their first position:
   1102 × 236 at 1920, 826.5 × 177 at 1440.
   -------------------------------------------------------------------------- */

.hero .hero-waves {
  position: absolute;
  z-index: 2;
  width: min(57.4vw, 1102px);
  aspect-ratio: 1102 / 236;
  /* Runs off the right edge: 68.5px at 1920, 106.5px at 1440 */
  right: calc(-1 * clamp(68.5px, 220.5px - 7.92vw, 106.5px));
  /* 109px above the photo's bottom edge at 1920, 81.25px at 1440 */
  bottom: min(calc(5.78vw - 2px), 109px);
  pointer-events: none;
}

.hero .hero-wave {
  position: absolute;
  width: 67.06%; /* 739 / 1102 */
  height: auto;
  aspect-ratio: 739 / 46;
  fill: #fff;
  will-change: transform;
  animation: var(--hero-wave-duration) ease-in-out infinite alternate both;
}

.hero .hero-wave--1 { left: 0;      top: 0;      animation-name: pk-hero-wave-1; }
.hero .hero-wave--2 { left: 33.03%; top: 41.95%; animation-name: pk-hero-wave-2; }
.hero .hero-wave--3 { left: 0;      top: 80.51%; animation-name: pk-hero-wave-3; }

/* Second position (frames 37-1392 / 37-1718), in % of each line's own 739 × 46 box */
@keyframes pk-hero-wave-1 { to { transform: translate(12.27%, 8.7%); } }
@keyframes pk-hero-wave-2 { to { transform: translate(-18.94%, -11.59%); } }
@keyframes pk-hero-wave-3 { to { transform: translate(17.68%, 14.49%); } }

@media (prefers-reduced-motion: reduce) {
  .hero .hero-wave { animation: none; }
}

/* --------------------------------------------------------------------------
   Copy
   -------------------------------------------------------------------------- */

.hero .hero-copy {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  /* 32px at 1920, 22px at 1440 */
  gap: clamp(18px, calc(2.083vw - 8px), 32px);
  /* 720px at 1920, 600px at 1440 */
  width: min(calc(25vw + 240px), 720px);
}

.hero h1 {
  font-family: var(--f-display);
  font-weight: 500;
  /* 145px / 112px at 1920, 109px / 84px at 1440 */
  font-size: min(calc(7.5vw + 1px), 145px);
  line-height: 0.772;
  letter-spacing: -0.0257em;
  color: #fff;
  text-shadow: 0 2px 30px rgba(0, 10, 31, 0.4);
  margin: 0;
}

.hero h1 em {
  font-style: italic;
  font-weight: inherit;
  color: inherit;
}

/* Same type as the .lede of the other page heroes (pk-svc-hero, pk-kontaktai-hero),
   in light text for the photo. Phones keep 15px / 22px (see max-width: 760px). */
.hero .sub {
  font-family: var(--f-body);
  font-weight: 400;
  font-size: 19px;
  line-height: 1.55;
  color: var(--pu-off);
  max-width: 50ch;
  text-shadow: 0 2px 14px rgba(0, 10, 31, 0.5);
  margin: 8px 0 32px;
}

.hero .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  padding-top: 8px;
}

/* CTA: white pill, label left, blue circle with arrow right (166 × 55.5) */
.hero .hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 5px 5px 5px 25px;
  border: 1px solid #fff;
  border-radius: var(--r-pill);
  background: #fff;
  color: var(--pu-blue-900);
  font: 500 16.5px/1 var(--f-body);
  letter-spacing: 0.005em;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(0, 13, 38, 0.25);
}

.hero .hero-cta__icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 43.5px;
  height: 43.5px;
  border-radius: 50%;
  background: var(--hero-blue);
  color: #fff;
  transition: background-color 0.18s;
}

.hero .hero-cta__icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.18s;
}

.hero .hero-cta:hover .hero-cta__icon {
  background: var(--pu-blue-900);
}

.hero .hero-cta:hover .hero-cta__icon svg {
  transform: translateX(2px);
}

.hero .hero-cta:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Tiles on the blue band
   -------------------------------------------------------------------------- */

.hero .container.outer {
  padding-top: 44px;
  padding-bottom: 53px;
}

.hero .cta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--hero-line);
}

.hero .cta-row a.tile {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 36px 36px 8px 0;
  color: #fff;
  text-decoration: none;
  transition: opacity 0.15s;
}

.hero .cta-row a.tile + a.tile {
  padding: 36px 0 8px 36px;
  border-left: 1px solid var(--hero-line);
}

.hero .cta-row a.tile:hover {
  opacity: 0.85;
}

.hero .cta-row a.tile:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

/* Tile icon */
.hero .cta-row a.tile .ic {
  width: 50px;
  height: 50px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hero .cta-row a.tile .ic svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Tile text */
.hero .cta-row a.tile .text {
  flex: 1 1 0;
  min-width: 0;
}

.hero .cta-row a.tile .text h3 {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 36px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: #fff;
  margin: 0 0 8px;
}

.hero .cta-row a.tile .text p {
  font-size: 17px;
  line-height: 1.45;
  color: var(--pu-blue-200);
  margin: 0;
}

/* Tile arrow */
.hero .cta-row a.tile .arr {
  color: var(--pu-blue-300);
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
  transition: transform 0.15s, color 0.15s;
}

.hero .cta-row a.tile:hover .arr {
  transform: translateX(4px);
  color: #fff;
}

/* --------------------------------------------------------------------------
   Mobile (390 frame)
   -------------------------------------------------------------------------- */

@media (max-width: 760px) {
  .hero .hero-media {
    min-height: 700px;
    align-items: flex-end;
    padding: 0 20px 95px;
  }

  .hero .hero-media::after {
    background:
      linear-gradient(90deg, rgba(3, 20, 56, 0.35) 0%, rgba(3, 20, 56, 0) 80%),
      linear-gradient(180deg, rgba(3, 20, 56, 0) 25%, rgba(3, 20, 56, 0.45) 55%, rgba(3, 20, 56, 0.7) 100%);
  }

  /* 462.84 × 99.12, running 130.84px off the right edge */
  .hero .hero-waves {
    width: 463px;
    right: -131px;
    top: 174px;
    bottom: auto;
  }

  .hero .hero-copy {
    width: 100%;
    gap: 18px;
  }

  .hero h1 {
    font-size: 56px;
    line-height: 48px;
  }

  .hero .sub {
    font-size: 15px;
    line-height: 22px;
    max-width: none;
  }

  .hero .actions {
    gap: 20px;
    padding-top: 4px;
  }

  /* 146 × 44 */
  .hero .hero-cta {
    gap: 13.5px;
    padding: 4px 4px 4px 26.5px;
    font-size: 14.5px;
    letter-spacing: 0.0057em;
    box-shadow: 0 8px 24px rgba(0, 13, 38, 0.25);
  }

  .hero .hero-cta__icon {
    width: 34px;
    height: 34px;
  }

  .hero .container.outer {
    padding-top: 12px;
    padding-bottom: 24px;
  }

  .hero .cta-row {
    grid-template-columns: 1fr;
  }

  .hero .cta-row a.tile,
  .hero .cta-row a.tile + a.tile {
    gap: 16px;
    padding: 24px 0;
    border-left: 0;
  }

  .hero .cta-row a.tile + a.tile {
    border-top: 1px solid var(--hero-line);
  }

  .hero .cta-row a.tile .ic {
    width: 44px;
    height: 44px;
  }

  .hero .cta-row a.tile .text h3 {
    font-size: 26px;
    line-height: 30px;
    margin-bottom: 4px;
  }

  .hero .cta-row a.tile .text p {
    font-size: 14px;
    line-height: 20px;
  }
}
