/* ==========================================================================
   Kipo home — "water column" direction.
   Deep navy-to-teal hero with a wave edge, porthole imagery, rising bubbles,
   and depth markers (0 m → seabed) on each section. Page-scoped: kh- prefix.
   ========================================================================== */

/* ---------- Depth markers ---------- */
.kh-depth { position: relative; }
.kh-depth::before,
.kh-hero::before {
  content: attr(data-depth);
  position: absolute;
  top: var(--space-5);
  left: var(--gutter);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding-left: 1.75rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-400);
  background: linear-gradient(var(--red-500), var(--red-500)) left center / 1.25rem 2px no-repeat;
}
.section--dark.kh-depth::before { color: var(--color-text-inverse-muted); }
@media (max-width: 720px) { .kh-depth::before, .kh-hero::before { top: var(--space-3); } }

/* ---------- Hero ---------- */
.kh-hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(4.5rem, 3rem + 6vw, 8rem) clamp(6rem, 4rem + 6vw, 9rem);
  background:
    radial-gradient(ellipse at 80% 10%, rgba(53, 203, 226, 0.28), transparent 55%),
    radial-gradient(ellipse at 10% 90%, rgba(81, 168, 177, 0.22), transparent 50%),
    linear-gradient(180deg, #0f3a4f 0%, var(--ink-900) 55%, var(--ink-950) 100%);
  color: var(--color-text-inverse-muted);
}
.kh-hero::before { color: var(--red-500); }
.kh-hero::after {
  /* light caustics */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.025) 0 2px, transparent 2px 60px);
}
.kh-hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: center;
}
@media (min-width: 980px) { .kh-hero__grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); } }
.kh-hero h1 {
  margin-top: var(--space-5);
  font-size: clamp(2.75rem, 1.4rem + 4.8vw, 5.25rem);
  line-height: 0.95;
  color: var(--white);
}
.kh-hero__accent {
  display: block;
  background: linear-gradient(90deg, var(--red-500), var(--kipo-teal-logo));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.kh-hero__lead { max-width: 56ch; margin-block: var(--space-5) var(--space-6); font-size: var(--fs-lg); line-height: 1.55; }

/* Porthole images */
.kh-hero__media { position: relative; aspect-ratio: 1 / 0.85; max-width: 560px; width: 100%; justify-self: center; }
.kh-porthole {
  position: absolute;
  margin: 0;
  overflow: hidden;
  border-radius: 50%;
  border: 6px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 1px rgba(53, 203, 226, 0.4), 0 30px 60px -20px rgba(0, 0, 0, 0.6);
}
.kh-porthole img { width: 100%; height: 100%; object-fit: cover; }
.kh-porthole--lg { top: 0; left: 0; width: 72%; aspect-ratio: 1; }
.kh-porthole--sm { right: 0; bottom: 0; width: 46%; aspect-ratio: 1; border-color: rgba(53, 203, 226, 0.35); }
.kh-bubble {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid rgba(53, 203, 226, 0.55);
  animation: kh-rise 7s ease-in infinite;
}
.kh-bubble--1 { width: 18px; height: 18px; right: 30%; bottom: 10%; }
.kh-bubble--2 { width: 10px; height: 10px; right: 22%; bottom: 4%; animation-delay: 2s; }
.kh-bubble--3 { width: 14px; height: 14px; right: 40%; bottom: 0; animation-delay: 4s; }
@keyframes kh-rise {
  0% { transform: translateY(0); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: translateY(-260px); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .kh-bubble { animation: none; opacity: 0.6; } }

.kh-hero__wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  width: 100%;
  height: clamp(40px, 6vw, 90px);
  fill: var(--white);
}

/* ---------- Values ---------- */
.kh-values { padding-block: var(--space-5) var(--space-6); border-bottom: 1px solid var(--color-border); }
.kh-values__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3) var(--space-7);
  list-style: none;
  padding: 0;
}
.kh-values__list li {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ink-800);
}
.kh-values__list svg { width: 22px; height: 22px; color: var(--color-accent); }

/* ---------- Intro / QHSE images ---------- */
.kh-intro__img,
.kh-qhse__img { aspect-ratio: 4 / 3; }

/* ---------- Services ---------- */
.kh-services { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }

/* ---------- IRM ---------- */
.kh-irm { position: relative; isolation: isolate; overflow: hidden; }
.kh-irm__bg { position: absolute; inset: 0; z-index: -2; opacity: 0.25; }
.kh-irm__bg img { width: 100%; height: 100%; object-fit: cover; }
.kh-irm::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, var(--ink-950) 35%, rgba(6, 21, 32, 0.75));
}
.kh-irm .lead { color: var(--color-text-inverse-muted); }
.kh-irm__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 1px;
  list-style: none;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--color-border-dark);
  border-radius: var(--radius-lg);
  background: var(--color-border-dark);
}
.kh-irm__list li {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  padding: var(--space-4);
  background: rgba(11, 34, 51, 0.92);
  font-size: var(--fs-sm);
  color: var(--white);
}
.kh-irm__list svg { width: 18px; height: 18px; margin-top: 0.15rem; flex: none; color: var(--red-500); }

/* ---------- Steps ---------- */
.kh-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: var(--space-5);
  list-style: none;
  padding: 0;
}
.kh-steps li {
  position: relative;
  padding: var(--space-6) var(--space-5);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--red-50), var(--white) 70%);
  border: 1px solid var(--color-border);
}
.kh-steps__no {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: var(--space-4);
  border-radius: 50%;
  border: 2px solid var(--color-accent);
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-accent);
}
.kh-steps h3 { margin-bottom: var(--space-2); text-transform: uppercase; }
.kh-steps p { font-size: var(--fs-sm); color: var(--color-text-muted); }
