/* ==========================================================================
   105 · HARBOR MUTUAL (مرفأ التكافل) — 1:1 Vintage Lithographed Tin-Plate & Marine Mutual Cover
   Paper #FBF6EA · Cream #F1FAEE · Navy #1D3557 · Red #E63946 · Aqua #A8DADC · Orange #F4A261 · Rivets
   ========================================================================== */

:root {
  --paper: #FBF6EA;
  --cream: #F1FAEE;
  --navy: #1D3557;
  --red: #E63946;
  --aqua: #A8DADC;
  --blue: #457B9D;
  --orange: #F4A261;
  --line: rgba(29, 53, 87, 0.16);
  --rivet: radial-gradient(circle at 35% 35%, #FFFFFF 0 18%, #C9CED6 32%, #7D8794 72%, #4A5361 100%);
  --display: 'Cairo', 'Readex Pro', system-ui, sans-serif;
  --sans: 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

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

html {
  scroll-behavior: smooth;
  background: var(--paper);
  color: var(--navy);
  font-family: var(--sans);
  letter-spacing: 0;
  overflow-x: clip;
}

body {
  background: var(--paper);
  color: var(--navy);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.68;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  letter-spacing: 0;
}

a { color: inherit; text-decoration: none; }
button, input { font-family: inherit; letter-spacing: 0; }
.bidi { unicode-bidi: isolate; font-family: var(--mono); }

/* Metallic Rivet Dot */
.hm-rv {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--rivet);
  box-shadow: 0 1px 2px rgba(29, 53, 87, 0.45);
  display: inline-block;
}

.hm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 14px;
  border: 1.5px solid var(--navy);
  box-shadow: 0 3px 0 rgba(29, 53, 87, 0.3);
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.16s ease;
}

.hm-btn:hover { transform: translateY(-2px); }
.hm-btn-red { background: var(--red); color: #FFFFFF; border-color: var(--navy); }
.hm-btn-cream { background: var(--cream); color: var(--navy); }

/* ======================== FLOATING PILL-GROUP NAVBAR ======================== */
.hm-header {
  position: fixed;
  top: 14px;
  inset-inline: 22px;
  z-index: 80;
  max-width: 1240px;
  margin: 0 auto;
  padding: 10px 20px;
  border-radius: 999px;
  background: rgba(251, 246, 234, 0.92);
  backdrop-filter: blur(10px);
  border: 1.5px solid var(--line);
  box-shadow: 0 4px 0 rgba(29, 53, 87, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.hm-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 900;
  font-size: 18px;
  white-space: nowrap;
}

.hm-pill-nav {
  background: var(--cream);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 4px;
  display: flex;
  gap: 4px;
}

.hm-pill-nav a {
  padding: 6px 15px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
}

.hm-pill-nav a:hover, .hm-pill-nav a.active {
  background: var(--navy);
  color: var(--cream);
}

/* ======================== 1. HERO (RIVETED TIN DIORAMA WINDOW) ======================== */
.hm-hero {
  max-width: 1260px;
  margin: 0 auto;
  min-height: 100dvh;
  padding: 106px 28px 44px;
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 32px;
  align-items: center;
}

.hm-h1 {
  font-family: var(--display);
  font-size: clamp(2.4rem, 4.7vw, 4.1rem);
  font-weight: 900;
  line-height: 1.16;
  margin: 14px 0 16px;
}

.hm-h1 em, .hm-h2 em {
  font-style: normal;
  color: var(--red);
}

.hm-tin-window {
  position: relative;
  aspect-ratio: 16 / 11.5;
  border-radius: 34px;
  background: var(--aqua);
  border: 6px solid var(--cream);
  outline: 6px solid var(--navy);
  overflow: hidden;
  box-shadow: 0 22px 48px rgba(29, 53, 87, 0.22);
}

.hm-tin-window img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hm-tin-rv { position: absolute; z-index: 4; }
.hm-tin-rv.tl { top: 14px; left: 14px; }
.hm-tin-rv.tr { top: 14px; right: 14px; }
.hm-tin-rv.bl { bottom: 14px; left: 14px; }
.hm-tin-rv.br { bottom: 14px; right: 14px; }

.hm-litho-ring {
  position: absolute;
  width: 136px;
  height: 136px;
  border-radius: 50%;
  border: 2px dashed var(--navy);
  background: radial-gradient(rgba(230, 57, 70, 0.14) 1.5px, transparent 2px);
  background-size: 7px 7px;
  pointer-events: none;
  z-index: 3;
  transform: translate(-50%, -50%);
  top: 46%;
  left: 48%;
}

.hm-plate-tag {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  background: var(--navy);
  color: var(--cream);
  padding: 4px 14px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

/* Tilted Navy Ticker */
.hm-ticker {
  background: var(--navy);
  color: var(--cream);
  padding: 12px 0;
  transform: rotate(-1deg) scale(1.02);
  overflow: hidden;
}

.hm-ticker-track {
  display: flex;
  gap: 34px;
  width: max-content;
  font-weight: 700;
  font-size: 14.5px;
  animation: hmTick 26s linear infinite;
}

@keyframes hmTick {
  from { transform: translateX(0); }
  to { transform: translateX(50%); }
}

/* ======================== SECTIONS ======================== */
.hm-sec {
  max-width: 1240px;
  margin: 0 auto;
  padding: 86px 28px;
}

.hm-h2 {
  font-family: var(--display);
  font-size: clamp(2rem, 3.6vw, 3rem);
  font-weight: 900;
  line-height: 1.18;
}

/* 2. Cover 3-Column Cards */
.hm-cover-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 36px;
}

.hm-card {
  background: var(--cream);
  border: 2px solid var(--navy);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 5px 0 rgba(29, 53, 87, 0.16);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hm-windup {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--aqua);
  border: 2px solid var(--navy);
  display: inline-grid;
  place-items: center;
  transition: transform 0.5s ease;
}

.hm-card:hover .hm-windup { transform: rotate(360deg); }

/* 3. Red Split-Flap Odometer Band (#E63946) */
.hm-odo-band {
  background: var(--red);
  color: var(--cream);
  padding: 68px 28px;
  border-top: 3px solid var(--navy);
  border-bottom: 3px solid var(--navy);
}

.hm-odo-3 {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  text-align: center;
}

.hm-odo-tiles {
  display: inline-flex;
  gap: 5px;
  margin-bottom: 10px;
}

.hm-tile {
  background: var(--cream);
  color: var(--navy);
  border: 2px solid var(--navy);
  border-radius: 8px;
  padding: 8px 14px;
  font-family: var(--mono);
  font-size: 30px;
  font-weight: 900;
  box-shadow: 0 4px 0 rgba(29, 53, 87, 0.35);
}

/* 4. Marine Surveyors Filter (#agents) */
.hm-port-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 22px 0;
}

.hm-port-pill {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--navy);
  background: var(--cream);
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
}

.hm-port-pill.active {
  background: var(--navy);
  color: var(--cream);
}

.hm-agents-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.hm-agent-card {
  background-color: var(--cream);
  background-image: radial-gradient(rgba(29, 53, 87, 0.08) 1px, transparent 0);
  background-size: 12px 12px;
  border: 2px solid var(--navy);
  border-radius: 22px;
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.hm-badge-circle {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--aqua);
  border: 3px solid var(--navy);
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 900;
  font-size: 22px;
  flex-shrink: 0;
}

/* Riveted Navy Footer */
.hm-footer {
  background: var(--navy);
  color: var(--cream);
  padding: 58px 28px 36px;
}

.hm-hollow {
  font-family: var(--display);
  font-size: clamp(3rem, 10.5vw, 8.2rem);
  font-weight: 900;
  text-align: center;
  color: transparent;
  -webkit-text-stroke: 1.8px rgba(241, 250, 238, 0.34);
  line-height: 0.95;
  margin: 22px 0 28px;
  direction: ltr;
}

.hm-showcase-nav {
  max-width: 1240px;
  margin: 0 auto;
  padding-top: 20px;
  border-top: 1px solid rgba(241, 250, 238, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 720px) {
  .hm-pill-nav { display: none; }
  .hm-hero,
  .hm-cover-3,
  .hm-odo-3,
  .hm-agents-2 {
    grid-template-columns: 1fr;
  }
}
