/* PPS — Hover effects for each component
   Loaded in numeric order; later files may refine earlier ones. */

/* ==========================================================================
   Hover motion — each component has its own behaviour
   ========================================================================== */

/* 1. Capability cards (home) — 3D tilt + spotlight that follows the cursor.
      Angles and cursor position are set by main.js (--rx, --ry, --mx, --my). */
.card.tilt { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); will-change: transform; }
.card.tilt:hover { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-6px); }
.card.tilt::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), rgba(170, 137, 59, .16), transparent 65%);
  transition: opacity .35s;
}
.card.tilt:hover::after { opacity: 1; }
.card.tilt:hover .icon-badge { background: var(--navy); color: var(--gold-light); }
.card.tilt:hover .icon-badge .icon { transform: scale(1.12) rotate(-8deg); }

/* 2. Other icon cards — lift, gold bar sweeps along the bottom, icon spins once */
.card { overflow: hidden; }
.card:not(.tilt)::before { content: ""; position: absolute; inset-inline-start: 0; bottom: 0; height: 3px; width: 100%; background: var(--gold); scale: 0 1; transform-origin: 0 50%; transition: scale .5s var(--ease); }
[dir="rtl"] .card:not(.tilt)::before { transform-origin: 100% 50%; }
.card:not(.tilt):hover::before { scale: 1 1; }
.icon-badge, .icon-badge .icon { transition: background .3s, color .3s, transform .6s var(--ease); }
.card:not(.tilt):hover .icon-badge .icon { transform: rotate(360deg); }

/* 3. Rule cards — the short gold rule stretches across, icon nudges up */
.rule-card { position: relative; border-block-start: none; transition: transform .4s var(--ease), box-shadow .4s; }
.rule-card::before { content: ""; position: absolute; top: 0; inset-inline-start: 0; height: 3px; width: 34%; background: var(--gold); transition: width .5s var(--ease); }
.rule-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.rule-card:hover::before { width: 100%; }
.rule-card > .icon { transition: transform .4s var(--ease); }
.rule-card:hover > .icon { transform: translateY(-4px); }

/* 4. Sector cards (HMC ecosystem) — icon tile flips over */
.sector-card .icon-badge { transition: transform .7s var(--ease), background .3s, color .3s; transform-style: preserve-3d; }
.sector-card:hover .icon-badge { transform: rotateY(180deg); background: var(--navy); color: var(--gold-light); }
.sector-card:hover .icon-badge .icon { transform: scaleX(-1); }

/* 5. Category tiles — glow grows from the corner, big icon rotates */
.cat-tile::after { transition: opacity .5s, scale .7s var(--ease); transform-origin: 100% 0; }
.cat-tile:hover::after { scale: 1.6; }
.cat-tile .icon-big { transition: transform .7s var(--ease); }
.cat-tile:hover .icon-big { transform: rotate(-14deg) scale(1.15); }
.cat-tile .text-link .icon { transition: transform .3s var(--ease); }
.cat-tile:hover .text-link .icon { transform: translateX(6px); }

/* 6. News cards — image zooms inside its frame */
.news-card .ph { transition: transform .7s var(--ease), border-color .3s; }
.news-card:hover .ph { transform: scale(1.06); }
.news-card:hover h3 { color: var(--gold) !important; }
.news-card h3 { transition: color .3s; }

/* 7. Enquiry cards — gold bar drops in from the top, arrow slides */
.enquiry-card { position: relative; overflow: hidden; }
.enquiry-card::before { content: ""; position: absolute; top: 0; inset-inline: 0; height: 4px; background: var(--gold); translate: 0 -4px; transition: translate .4s var(--ease); }
.enquiry-card:hover::before { translate: none; }
.enquiry-card .text-link .icon { transition: transform .3s var(--ease); }
.enquiry-card:hover .text-link .icon { transform: translateX(8px); }

/* 8. Vision & Mission — vision gets a light sweep, mission border turns gold */
.vm-card { transition: transform .45s var(--ease), box-shadow .45s, border-color .35s; }
.vm-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.vm-card.vision::after { content: ""; position: absolute; top: 0; bottom: 0; width: 45%; inset-inline-start: -60%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .08), transparent); transform: skewX(-18deg); transition: inset-inline-start .9s var(--ease); }
.vm-card.vision:hover::after { inset-inline-start: 120%; }
.vm-card.mission:hover { border-color: var(--gold); }
.vm-card .label .icon { transition: transform .6s var(--ease); }
.vm-card:hover .label .icon { transform: rotate(-20deg) scale(1.15); }

/* 9. Sectors list rows — slide sideways */
.sectors li { transition: transform .35s var(--ease), background .3s, border-color .3s; }
.sectors li:hover { transform: translateX(6px); background: rgba(255, 255, 255, .09); border-color: rgba(201, 171, 98, .5); }
[dir="rtl"] .sectors li:hover { transform: translateX(-6px); }
.sectors .icon { transition: transform .35s var(--ease); }
.sectors li:hover .icon { transform: scale(1.2); }

/* 10. Chips — fill with navy */
.chip { transition: background .3s, color .3s, border-color .3s, transform .3s var(--ease); }
.chip .icon { transition: transform .35s var(--ease); }
.chips span.chip:hover, .chips a.chip:hover { background: var(--navy); border-color: var(--navy); color: var(--white); transform: translateY(-3px); }
.chip:hover .icon { transform: rotate(-12deg) scale(1.15); }

/* 11. Timeline — dot fills, card shifts */
.t-item .t-dot { transition: background .35s, color .35s, transform .45s var(--ease); }
.t-item:hover .t-dot { background: var(--navy); color: var(--gold-light); transform: scale(1.1); }
.t-body { transition: transform .4s var(--ease), box-shadow .4s; }
.t-item:hover .t-body { transform: translateX(8px); box-shadow: var(--shadow); }
[dir="rtl"] .t-item:hover .t-body { transform: translateX(-8px); }

/* 12. Journey steps — number turns gold and grows */
.step::before { transition: background .35s, transform .45s var(--ease); }
.step:hover::before { background: var(--gold); transform: scale(1.15); }

/* 13. Flow bubbles — rise and fill gold */
.flow-step .bubble { transition: background .35s, transform .45s var(--ease), border-color .35s; }
.flow-step .icon { transition: color .3s; }
.flow-step:hover .bubble { background: var(--gold); border-color: var(--gold); transform: translateY(-6px); }
.flow-step:hover .icon { color: var(--white); }

/* 14. Metrics — number and border turn gold */
.metric { transition: transform .4s var(--ease), border-color .3s; }
.metric strong { transition: color .3s; }
.metric:hover { border-color: var(--gold); border-style: solid; }
.metric:hover strong { color: var(--gold); }

/* 15. Small pieces */
.hero-points li { transition: transform .35s var(--ease); }
.hero-points li:hover { transform: translateX(6px); }
.hero-points .icon { transition: transform .35s var(--ease); }
.hero-points li:hover .icon { transform: scale(1.2); }
.ph { transition: border-color .35s; }
.ph .icon { transition: transform .5s var(--ease); }
.ph:hover { border-color: var(--gold); }
.ph:hover .icon { transform: translateY(-6px); }
.logo-slot { transition: border-color .3s, transform .35s var(--ease), color .3s; }
.logo-slot:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-4px); }
.job { transition: transform .35s var(--ease), border-color .3s; }
.job:hover { transform: translateX(6px); border-color: var(--gold); }

/* 16. Buttons — light sheen passes across */
.btn-gold, .btn-navy { position: relative; overflow: hidden; }
.btn-gold::after, .btn-navy::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 40%; inset-inline-start: -60%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent);
  transform: skewX(-20deg); transition: inset-inline-start .6s var(--ease);
}
.btn-gold:hover::after, .btn-navy:hover::after { inset-inline-start: 120%; }

/* 17. Ambient motion */
.hero-card { animation: float 7s ease-in-out infinite; }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
.surface-brand > .outline-mark { animation: drift 18s ease-in-out infinite; }
@keyframes drift { 0%, 100% { translate: 0 0; } 50% { translate: -18px -12px; } }

@media (hover: none) { .card.tilt { transform: none !important; } }
@media (prefers-reduced-motion: reduce) {
  .hero-card, .surface-brand > .outline-mark { animation: none; }
  .card.tilt { transform: none !important; }
}

/* Figures stay two per row on phones */
@media (max-width: 640px) {
  .grid.g4:has(> .metric) { grid-template-columns: 1fr 1fr; gap: 14px; }
  .metric.live { padding: 22px 18px; }
  .metric.live strong { font-size: 2rem; }
}
.hero-solo > .container { width: 100%; }
@media (max-width: 640px) {
  .cap-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .cap-mini { flex-direction: column; align-items: flex-start; gap: 12px; padding: 16px; }
  .cap-mini h3 { font-size: .9rem; }
}
