/* PioneerUnion Group — Maldives · site stylesheet
   Base normalisation + responsive layer that turns the 1200px design canvas
   into a fluid, mobile-first site. Desktop fidelity comes from the inline
   styles carried over from the design; the rules here adapt them for small
   screens and add accessibility/landmark behaviour. */

:root { --head: 112px; }   /* sticky header: 36px topbar + 76px nav (as in the design) */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

/* ---- home: full-screen-per-pillar scroll-snap (matches the design canvas,
        where each 648px stage = the 760px viewport minus the 112px header) ---- */
html.snap { scroll-snap-type: y proximity; scroll-padding-top: var(--head); }
html.snap .hero,
html.snap .stage,
html.snap .teaser { scroll-snap-align: start; }
html.snap .stage,
html.snap .teaser { height: calc(100vh - var(--head)) !important; min-height: 560px; }
html.snap .hero { scroll-snap-align: start; }
body { margin: 0; background: #FFFFFF; color: #0A1F33;
       font-family: Lato, system-ui, sans-serif;
       overflow-x: hidden; text-rendering: optimizeLegibility; }
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}

/* ---- Dhivehi (RTL, Thaana script) ---- */
:root[lang="dv"] body,
:root[lang="dv"] body * {
  font-family: "Noto Sans Thaana", "Lato", system-ui, sans-serif !important;
}
:root[lang="dv"] { direction: rtl; }

/* ---- accessibility skip link ---- */
.skip-link { position: absolute; left: -999px; top: 0; z-index: 200;
  background: #071A2B; color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
  font: 700 12px Lato, sans-serif; }
.skip-link:focus { left: 0; }
:focus-visible { outline: 2px solid #1481C0; outline-offset: 2px; }

/* ---- fluid page container ---- */
.page { width: 100%; max-width: 100%; }
.page.home { min-height: 100vh; }

/* ---- scenes: <pnu-scene> fills its stage ---- */
.scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* ---- sticky header ---- */
.site-header { position: sticky; top: 0; }
.nav-menu-btn { display: none; }

/* ============================================================= DESKTOP ↓ */
/* The design's inline styles already cover ≥1120px. We center the canvas. */
.page > .site-header,
.page > div { margin-left: auto; margin-right: auto; }

/* ============================================================= TABLET ≤1024 */
@media (max-width: 1024px) {
  /* header: collapse the horizontal nav into a toggle panel */
  .nav-menu-btn {
    display: inline-flex; align-items: center; justify-content: center;
    align-self: center; width: 44px; height: 40px; margin-left: 10px;
    border: 1px solid rgba(20,129,192,.28); border-radius: 12px;
    background: rgba(255,255,255,.7); cursor: pointer; color: #0E3350;
  }
  .nav-menu-btn svg { width: 20px; height: 20px; }
  .nav-links {
    position: absolute; top: 100%; right: 12px; left: 12px;
    flex-direction: column !important; align-items: stretch !important;
    background: #fff; border: 1px solid rgba(20,129,192,.16);
    border-radius: 16px; padding: 10px !important; gap: 2px;
    box-shadow: 0 20px 50px rgba(14,51,80,.18); display: none !important;
  }
  .nav-links.open { display: flex !important; }
  .nav-links > a { height: auto !important; padding: 12px 14px !important;
    justify-content: flex-start; }
}

/* ---- full-screen microsite / pillar hero ---- */
.pillar-hero { height: auto !important; min-height: 92vh !important; }

/* ============================================================= MOBILE ≤760 */
@media (max-width: 760px) {
  /* any block with the design's fixed 80px side padding -> tight mobile gutter */
  .wpad { padding-left: 20px !important; padding-right: 20px !important; }
  /* footer "wider group" CTA: stack the copy above the global-site button so it
     doesn't squash into a narrow column beside the pill on phones */
  .wider-group { flex-direction: column !important; align-items: flex-start !important;
    gap: 26px !important; padding-left: 24px !important; padding-right: 24px !important; }
  .wider-group > a { width: 100%; justify-content: center; }
  .wider-group h2 { font-size: 27px !important; }
  .pillar-hero { min-height: 88vh !important; }
  .pillar-hero .stage-copy { padding: 0 20px !important; }
  .pillar-hero [style*="190px"] { font-size: 96px !important; right: 8px !important; top: 60px !important; }

  .hero { padding: 64px 22px 48px !important; }
  .hero h1 { font-size: 34px !important; line-height: 1.1 !important; }
  .hero > div[style*="font-size:17px"] { font-size: 15px !important; }

  /* pillar card grid + all 2/3-col grids -> single column */
  [style*="grid-template-columns:repeat(3,1fr)"],
  [style*="grid-template-columns:repeat(2,1fr)"],
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns:1.02fr .98fr"],
  [style*="grid-template-columns:1.7fr 1fr 1fr 1.2fr"],
  [style*="grid-template-columns:1fr 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* full-screen pillar stages -> auto height, static copy (override desktop snap calc) */
  .stage, .teaser,
  html.snap .stage, html.snap .teaser { height: auto !important; min-height: 90vh; }
  .stage-copy {
    position: static !important; transform: none !important;
    max-width: 100% !important; left: auto !important; right: auto !important;
    text-align: left !important; padding: 120px 22px 56px !important;
  }
  .stage-copy.copy-right { text-align: left !important; }
  .stage-copy [style*="margin-left:auto"] { margin-left: 0 !important; }
  .stage-copy h1, .stage-copy h2,
  .stage-copy [style*="font:600 60px"] { font-size: 40px !important; line-height: 1.08 !important; }

  .teaser { height: auto !important; padding: 56px 22px !important; }
  .contact { padding: 48px 22px 28px !important; }

  /* footer + wider-group band padding */
  .page > div[style*="padding:56px 80px"] { padding: 44px 22px !important; }
  .page > div[style*="padding:56px 80px 26px"] { padding: 44px 22px 22px !important; }

  /* big display headings across sub-pages */
  h1[style*="Playfair"] { font-size: 38px !important; line-height: 1.08 !important; }
  h2[style*="Playfair"] { font-size: 28px !important; line-height: 1.12 !important; }
  [style*="font:600 72px"] { font-size: 40px !important; }

  /* generic: pull inline 80px horizontal padding down site-wide */
  [style*="padding:70px 80px"], [style*="padding:56px 80px 64px"],
  [style*="padding:60px 80px"], [style*="padding:56px 80px 30px"],
  [style*="padding:64px 80px"] { padding-left: 22px !important; padding-right: 22px !important; }
}

/* ============================================================= SMALL ≤400 */
@media (max-width: 400px) {
  .hero h1 { font-size: 29px !important; }
  .stage-copy h1, .stage-copy h2 { font-size: 32px !important; }
  .hero { padding: 52px 18px 40px !important; }
}

/* ============================================================= HOVER FX
   Modern, subtle, futuristic hover treatments layered on top of the design's
   own hover styles. Respect reduced-motion. */

/* nav tabs: a thin gradient underline that slides in from the left */
.site-nav-link { position: relative; }
.site-nav-link::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 5px; height: 2px;
  border-radius: 2px; background: linear-gradient(90deg, #1481C0, #63C6EF);
  transform: scaleX(0); transform-origin: left;
  transition: transform .38s cubic-bezier(.22, 1, .36, 1);
  box-shadow: 0 0 10px rgba(63, 169, 224, .55);
}
.site-nav-link:hover::after,
.site-nav-link:focus-visible::after { transform: scaleX(1); }

/* pillar cards — a slow specular light sweep (a pass, not a flash) plus a
   pillar-colour left edge bar that fades in. Design supplies the lift/shadow. */
.pillar-card { position: relative; overflow: hidden; isolation: isolate;
  transition: box-shadow .3s ease; }
/* left edge bar in the pillar's signature colour, fades in on hover */
.pillar-card::after {
  content: ""; position: absolute; left: 0; top: 14%; bottom: 14%; width: 3px;
  border-radius: 2px; z-index: 2; pointer-events: none; opacity: 0;
  transition: opacity .3s ease;
  background: linear-gradient(180deg, var(--pillar, #1481C0),
             color-mix(in srgb, var(--pillar, #1481C0) 55%, #ffffff));
}
.pillar-card:hover::after,
.pillar-card:focus-visible::after { opacity: 1; }
/* modern cursor-follow spotlight — a soft pillar-colour glow tracks the pointer
   (position fed by site.js via --mx/--my); reads cleanly on the white cards */
.pillar-card::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; border-radius: 18px;
  opacity: 0; transition: opacity .4s ease;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%),
    color-mix(in srgb, var(--pillar, #1481C0) 20%, transparent) 0%, transparent 55%);
}
.pillar-card:hover::before,
.pillar-card:focus-visible::before { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .site-nav-link::after, .pillar-card::after { transition: none; }
  .pillar-card:hover::before, .pillar-card:focus-visible::before { animation: none; }
}

/* ---- careers interactivity (JS-driven collapse) ---- */
.dc-collapse[hidden] { display: none; }
.role-row { cursor: pointer; }
[data-filter-hidden] { display: none !important; }

/* ---- apply modal ---- */
.apply-modal { position: fixed; inset: 0; z-index: 120; display: none;
  align-items: center; justify-content: center; padding: 20px;
  background: rgba(7,26,43,.62); backdrop-filter: blur(4px); }
.apply-modal.open { display: flex; }

/* ---- legal / content pages (Privacy, Terms, Cookie, Newsroom, Sustainability) ---- */
.legal-main { padding: 56px 24px 96px; background: #FFFFFF; }
.legal-wrap { max-width: 800px; margin: 0 auto; }
.legal-doc { color: #1E3A4C; font: 400 17px/1.72 Lato, system-ui, sans-serif; }
.legal-doc h1 { font: 600 40px/1.15 "Playfair Display", Georgia, serif;
  color: #071A2B; margin: 0 0 8px; letter-spacing: -.01em; }
.legal-doc h2 { font: 600 25px/1.3 "Playfair Display", Georgia, serif;
  color: #0A2A44; margin: 44px 0 12px; }
.legal-doc h3 { font: 700 16px/1.4 Lato, sans-serif; color: #0A2A44; margin: 28px 0 8px; }
.legal-doc p { margin: 0 0 16px; }
.legal-doc ul { margin: 0 0 18px; padding-left: 22px; }
.legal-doc li { margin: 0 0 8px; }
.legal-doc a { color: #0F6A9E; text-decoration: underline; text-underline-offset: 2px;
  text-decoration-thickness: 1px; }
.legal-doc a:hover { color: #0A4E76; }
.legal-doc strong { color: #0A2A44; font-weight: 700; }
.legal-doc code { font: 500 .92em IBM Plex Mono, ui-monospace, monospace;
  background: #F2ECDD; padding: 1px 6px; border-radius: 5px; }
.legal-doc hr { border: 0; border-top: 1px solid #E7DFCD; margin: 40px 0; }
.legal-doc > h1 + p { color: #5A7386; font-size: 15px; margin-top: 0; }
.legal-doc .table-wrap { overflow-x: auto; margin: 0 0 22px;
  border: 1px solid #E7DFCD; border-radius: 12px; -webkit-overflow-scrolling: touch; }
.legal-doc table { border-collapse: collapse; width: 100%; min-width: 460px; font-size: 15px; }
.legal-doc th, .legal-doc td { text-align: left; padding: 11px 15px;
  border-bottom: 1px solid #EDE6D6; vertical-align: top; }
.legal-doc thead th { background: #F6EFE1; color: #0A2A44; font-weight: 700;
  font-size: 12px; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.legal-doc tbody tr:last-child td { border-bottom: 0; }
.legal-doc td code { white-space: nowrap; }
:root[lang="zh"] .legal-doc, .legal-doc[lang="zh"] { line-height: 1.85; }
@media (max-width: 640px) {
  .legal-main { padding: 32px 18px 72px; }
  .legal-doc { font-size: 16px; }
  .legal-doc h1 { font-size: 31px; }
  .legal-doc h2 { font-size: 22px; }
}

/* ---- cookie notice (slim, dismissible; strictly-necessary only) ---- */
.cookie-notice { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 300;
  max-width: 720px; margin: 0 auto; display: flex; align-items: center; gap: 16px;
  flex-wrap: wrap; justify-content: center;
  background: #071A2B; color: #DDE7EF; padding: 13px 18px; border-radius: 14px;
  font: 400 13.5px/1.5 Lato, sans-serif; box-shadow: 0 16px 40px rgba(7,26,43,.34);
  animation: kfNavIn .4s ease both; }
.cookie-notice a { color: #7FC4E8; text-decoration: underline; text-underline-offset: 2px; }
.cookie-notice .cookie-ok { flex: none; cursor: pointer; border: 0; border-radius: 999px;
  background: #F6EFE1; color: #0A2A44; font: 700 12px Lato, sans-serif;
  letter-spacing: .04em; padding: 9px 20px; transition: background .2s, transform .2s; }
.cookie-notice .cookie-ok:hover { background: #fff; transform: translateY(-1px); }
@media (max-width: 480px) { .cookie-notice { font-size: 13px; padding: 12px 14px; } }

/* ---- language toggle hidden while the Dhivehi translation is under review ---- */
.lang-toggle { display: none !important; }

/* ---- home: vision / mission / values (Purpose) section ---- */
.purpose-section .pv-grid { align-items: start; }
@media (max-width: 860px) {
  .purpose-section .pv-grid { grid-template-columns: 1fr !important; gap: 34px !important; }
  .purpose-section .pv-values { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 520px) {
  .purpose-section .pv-values { grid-template-columns: 1fr !important; }
}
