@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --accent: #1559cf;
  --ink: #0d0d0d;
  --muted: #5a5a5a;
  --panel-border: #e2e2e2;
  --hairline: #ebebeb;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: #fff;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

.iig-vessels {
  min-height: 100vh;
}

[hidden] {
  display: none !important;
}

/* ---------- Header ---------- */

.site-header {
  text-align: center;
  padding: 52px 24px 28px;
  border-bottom: 1px solid var(--hairline);
}

.site-header__title {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 700;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.025em;
  line-height: 1.2;
  font-family: 'Inter', sans-serif;
}

.site-header__subtitle {
  font-size: 16px;
  color: var(--muted);
  margin: 10px 0 0;
  font-weight: 400;
}

/* ---------- Vessel switch ---------- */

.vessel-switch {
  display: flex;
  justify-content: center;
  padding: 28px 24px 0;
}

.vessel-switch__group {
  display: inline-flex;
  border-radius: 7px;
  border: 1px solid #d8d8d8;
  overflow: hidden;
  background: #f5f5f5;
}

.vessel-switch__btn {
  padding: 10px 28px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  background: transparent;
  color: #3a3a3a;
  border: none;
  cursor: pointer;
  transition: background 180ms, color 180ms;
  line-height: 1;
}

.vessel-switch__btn.is-active {
  font-weight: 600;
  background: var(--accent);
  color: #fff;
}

/* ---------- Layout ---------- */

.layout {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  overflow-anchor: none;
  gap: 28px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px 24px 60px;
}

.stage-wrap {
  flex: 1 1 480px;
  min-width: 0;
  position: relative;
}

@media (min-width: 916px) {
  .stage-wrap {
    position: sticky;
    top: 24px;
    align-self: flex-start;
  }
}

/* ---------- Stage ---------- */

.stage {
  position: relative;
  aspect-ratio: 2760 / 1504;
}

.vessel[data-vessel='satellite'] .stage {
  aspect-ratio: 2816 / 1536;
}

.stage__base {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  user-select: none;
}

/* Cutaway overlay — one layer per section, expands from its hotspot centre */

.stage__reveal {
  position: absolute;
  inset: 0;
  pointer-events: none;
  clip-path: circle(0% at var(--cx, 50%) var(--cy, 50%));
  transition: clip-path 600ms ease-out;
}

.stage__reveal.is-open {
  clip-path: circle(160% at var(--cx, 50%) var(--cy, 50%));
}

.reveal__window {
  position: absolute;
  overflow: hidden;
  left: var(--x, 0%);
  top: var(--y, 0%);
  width: var(--w, 100%);
  height: var(--h, 100%);
  border-radius: var(--r, 0);
}

.reveal__image {
  position: absolute;
  left: var(--ix, 0%);
  top: var(--iy, 0%);
  width: var(--iw, 100%);
  height: var(--ih, 100%);
  max-width: none;
  user-select: none;
  display: block;
}

/* ---------- Glow (highlight sections) ---------- */

.stage__glow {
  position: absolute;
  left: var(--x, 0%);
  top: var(--y, 0%);
  width: var(--s, 18%);
  padding-bottom: var(--s, 18%);
  border-radius: 50%;
  background: radial-gradient(
    ellipse at center,
    rgba(21, 89, 207, 0.45) 0%,
    rgba(21, 89, 207, 0.18) 45%,
    transparent 70%
  );
  filter: blur(8px);
  opacity: 0;
  transition: opacity 400ms;
  pointer-events: none;
}

.stage__glow.is-on {
  opacity: 1;
}

/* ---------- Hotspots ---------- */

.hotspot {
  position: absolute;
  left: var(--x, 50%);
  top: var(--y, 50%);
  transform: translate(-50%, -50%);
  z-index: 10;
}

.hotspot__btn {
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: opacity 200ms;
}

.hotspot__ring {
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  animation: pulse-ring 2.4s ease-out infinite;
  opacity: 0.8;
  pointer-events: none;
}

.hotspot.is-open .hotspot__ring {
  opacity: 0;
}

.hotspot__dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent);
  display: block;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.8);
  transition: box-shadow 200ms;
}

.hotspot.is-open .hotspot__dot {
  box-shadow: 0 0 0 4px rgba(21, 89, 207, 0.25), 0 0 0 7px rgba(21, 89, 207, 0.1);
}

/* ---------- Tooltip ---------- */

.hotspot__tip {
  position: absolute;
  top: 50%;
  display: inline-block;
  width: max-content;
  max-width: 320px;
  background: var(--accent);
  color: #fff;
  padding: 8px 14px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
  white-space: normal;
  text-wrap: balance;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 150ms;
  z-index: 1000;
}

/* The hotspot box is centred on the point, so 50% is exactly the hotspot. */
.hotspot[data-side='right'] .hotspot__tip {
  left: 50%;
  margin-left: 38px;
  transform: translateY(-50%);
}

.hotspot[data-side='left'] .hotspot__tip {
  right: 50%;
  margin-right: 38px;
  transform: translateY(-50%);
}

.hotspot:hover .hotspot__tip,
.hotspot:focus-within .hotspot__tip {
  opacity: 1;
  visibility: visible;
}

/* An open hotspot shows its panel instead of the tooltip. */
.hotspot.is-open .hotspot__tip,
.hotspot.is-open:hover .hotspot__tip,
.hotspot.is-open:focus-within .hotspot__tip {
  opacity: 0;
  visibility: hidden;
}

/* ---------- Info panel ---------- */

.panel {
  flex: 0 0 min(360px, 100%);
  width: min(360px, 100%);
  background: #fff;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 28px 28px 32px;
  position: relative;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
  animation: panel-in 260ms ease-out;
}

.panel__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f2f2f2;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  font-size: 16px;
  color: #444;
  line-height: 1;
  transition: background 150ms;
}

.panel__close:hover {
  background: #e6e6e6;
}

.panel__tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(21, 89, 207, 0.08);
  padding: 3px 8px;
  border-radius: 3px;
  margin-bottom: 12px;
}

.panel__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 36px 20px 0;
  line-height: 1.35;
  letter-spacing: -0.01em;
  font-family: 'Inter', 'sans-serif';
}

.panel__rule {
  width: 32px;
  height: 2px;
  background: var(--accent);
  margin-bottom: 20px;
  border-radius: 1px;
}

.panel__label {
  font-size: 13px;
  font-weight: 700;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 8px;
}

.panel__list {
  margin: 0 0 24px;
  padding-left: 20px;
  font-size: 16px;
  color: #222;
  line-height: 1.7;
}

.panel__list li {
  padding-left: 4px;
}

.panel__text {
  font-size: 16px;
  color: #333;
  line-height: 1.75;
  margin: 0;
}

/* ---------- Motion ---------- */

@keyframes pulse-ring {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  70% {
    transform: scale(2.2);
    opacity: 0;
  }
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .hotspot__ring {
    display: none !important;
  }

  .stage__reveal,
  .stage__reveal.is-open {
    clip-path: none;
    opacity: 0;
    transition: opacity 400ms ease;
  }

  .stage__reveal.is-open {
    opacity: 1;
  }

  .panel {
    animation: none;
  }
}
