/* ============================================================
   DERRICK ADVISORY — DESIGN SYSTEM
   Premium Insurance Advisory Platform
   Version 1.0 · 2025
   ============================================================ */

/* ── 1. DESIGN TOKENS ───────────────────────────────────────── */
:root {

  /* Navy palette */
  --navy-950: #030C1A;
  --navy-900: #050F22;
  --navy-800: #0A1628;
  --navy-700: #0E1F3D;
  --navy-600: #132B55;
  --navy-500: #1246A0;
  --navy-400: #1D5FCC;
  --navy-300: #4A80D4;
  --navy-200: #A8C4E8;
  --navy-100: #EBF2FC;
  --navy-50:  #F4F8FE;

  /* Gold palette */
  --gold-700: #6B4E0A;
  --gold-600: #8B6914;
  --gold-500: #B8860B;
  --gold-400: #C9A84C;
  --gold-300: #D4AF5A;
  --gold-200: #E8D099;
  --gold-100: #F8F0D8;
  --gold-50:  #FDFBF4;

  /* Neutral */
  --white:    #FFFFFF;
  --gray-50:  #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;

  /* Semantic aliases */
  --c-primary:      var(--navy-500);
  --c-primary-dark: var(--navy-800);
  --c-accent:       var(--gold-400);
  --c-accent-dark:  var(--gold-600);
  --c-bg:           var(--white);
  --c-bg-alt:       var(--gray-50);
  --c-bg-dark:      var(--navy-800);
  --c-text:         var(--navy-800);
  --c-text-muted:   var(--gray-500);
  --c-text-light:   var(--gray-400);
  --c-border:       var(--gray-200);
  --c-success:      #10B981;
  --c-warning:      #F59E0B;
  --c-error:        #EF4444;

  /* Typography */
  /* JOMPLAN PHASE 4B (2026-10-03): Inter stays the Latin face; Inter has no
     CJK glyphs, so Chinese characters fall through to Noto Sans SC (loaded on
     the /zh/ pages), then the platform CJK fonts. */
  --font: 'Inter', 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

  /* Fluid type scale */
  --t-xs:   clamp(0.7rem,   0.65rem  + 0.2vw, 0.75rem);
  --t-sm:   clamp(0.8rem,   0.75rem  + 0.25vw, 0.875rem);
  --t-base: clamp(0.9375rem, 0.9rem  + 0.2vw, 1rem);
  --t-lg:   clamp(1rem,     0.95rem  + 0.3vw, 1.125rem);
  --t-xl:   clamp(1.1rem,   1rem     + 0.5vw, 1.25rem);
  --t-2xl:  clamp(1.25rem,  1.1rem   + 0.8vw, 1.5rem);
  --t-3xl:  clamp(1.5rem,   1.2rem   + 1.5vw, 1.875rem);
  --t-4xl:  clamp(1.8rem,   1.4rem   + 2vw,   2.25rem);
  --t-5xl:  clamp(2.2rem,   1.6rem   + 3vw,   3rem);
  --t-6xl:  clamp(2.75rem,  1.8rem   + 4.5vw, 3.75rem);
  --t-7xl:  clamp(3rem,     1.8rem   + 6vw,   4.5rem);
  --t-8xl:  clamp(3.5rem,   2rem     + 7.5vw, 5.25rem);

  /* Spacing — 4px grid */
  --s-1:  0.25rem;   /* 4px  */
  --s-2:  0.5rem;    /* 8px  */
  --s-3:  0.75rem;   /* 12px */
  --s-4:  1rem;      /* 16px */
  --s-5:  1.25rem;   /* 20px */
  --s-6:  1.5rem;    /* 24px */
  --s-8:  2rem;      /* 32px */
  --s-10: 2.5rem;    /* 40px */
  --s-12: 3rem;      /* 48px */
  --s-16: 4rem;      /* 64px */
  --s-20: 5rem;      /* 80px */
  --s-24: 6rem;      /* 96px */
  --s-32: 8rem;      /* 128px */

  /* Border radius */
  --r-xs:   4px;
  --r-sm:   8px;
  --r-md:   12px;
  --r-lg:   18px;
  --r-xl:   24px;
  --r-2xl:  32px;
  --r-3xl:  48px;
  --r-full: 9999px;

  /* Shadows */
  --sh-xs:   0 1px 2px rgba(10, 22, 40, 0.06);
  --sh-sm:   0 1px 4px rgba(10, 22, 40, 0.08), 0 1px 2px rgba(10, 22, 40, 0.04);
  --sh-md:   0 4px 16px rgba(10, 22, 40, 0.10), 0 2px 6px rgba(10, 22, 40, 0.05);
  --sh-lg:   0 8px 32px rgba(10, 22, 40, 0.12), 0 3px 10px rgba(10, 22, 40, 0.06);
  --sh-xl:   0 16px 48px rgba(10, 22, 40, 0.14), 0 6px 18px rgba(10, 22, 40, 0.08);
  --sh-2xl:  0 24px 64px rgba(10, 22, 40, 0.18), 0 10px 28px rgba(10, 22, 40, 0.10);
  --sh-gold: 0 4px 24px rgba(201, 168, 76, 0.35);
  --sh-gold-lg: 0 8px 40px rgba(201, 168, 76, 0.40);
  --sh-navy: 0 4px 24px rgba(18, 70, 160, 0.25);
  --sh-inset: inset 0 1px 3px rgba(10, 22, 40, 0.10);

  /* Transitions */
  --t-fast:   150ms ease;
  --t-base:   250ms ease;
  --t-slow:   400ms ease;
  --t-bounce: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Z-index stack */
  --z-below:    -1;
  --z-base:      0;
  --z-raised:   10;
  --z-dropdown: 100;
  --z-sticky:   200;
  --z-modal:    300;
  --z-toast:    400;

  /* Layout */
  --max-w:      1280px;
  --max-w-sm:    640px;
  --max-w-md:    768px;
  --max-w-lg:   1024px;
  --max-w-xl:   1200px;
  --nav-h:       72px;
  --section-py:  clamp(64px, 8vw, 112px);
}

/* ── 2. RESET & BASE ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: var(--t-base);
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
ul, ol { list-style: none; }
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--c-text);
}

/* ── 3. LAYOUT ──────────────────────────────────────────────── */
.da-container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: clamp(var(--s-5), 5vw, var(--s-12));
}

.da-section {
  padding-block: var(--section-py);
}

.da-section-alt { background: var(--gray-50); }
.da-section-dark { background: var(--navy-800); }
.da-section-navy { background: var(--navy-900); }
.da-section-gold { background: var(--gold-50); }

.da-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-8); }
.da-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-8); }
.da-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-6); }
.da-grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--s-6); }

/* ── 4. NAVIGATION ──────────────────────────────────────────── */
.da-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: var(--z-sticky);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  /* Always-on dark background prevents GPU compositing layer being
     created/destroyed on scroll, which caused nav flicker */
  background: rgba(4, 12, 36, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  will-change: background, box-shadow;
  /* Remove backdrop-filter from transition — its creation/destruction
     caused the scroll-position feedback loop that made nav flicker */
  transition: background var(--t-base), box-shadow var(--t-base);
}

.da-nav.scrolled {
  background: rgba(4, 12, 36, 0.97);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06), var(--sh-lg);
}

.da-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.da-logo {
  font-size: var(--t-xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--white);
  line-height: 1;
  display: flex;
  flex-direction: column;
}

.da-logo span {
  font-size: var(--t-xs);
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #E5B95C; /* Plan Gold (brand/tokens) */
  display: block;
  margin-top: 2px;
}

/* JOMPLAN PHASE 4B (2026-10-03): the wordmark is the official artwork
   (/assets/brand/jomplan-logo-primary.svg, an exact copy of
   brand/logo/jomplan-logo-primary.svg) shown as an <img>; the descriptor
   below it stays live text. Never retype the wordmark. */
.da-logo:has(.da-logo-img) {
  align-items: flex-start; /* keep the artwork at its own aspect ratio */
  flex-shrink: 0;
}
.da-logo:has(.da-logo-img) span { white-space: nowrap; }
.da-logo .da-logo-img {
  display: block;
  align-self: flex-start;
  height: 24px;
  width: auto;
  max-width: none;
  margin-bottom: 3px;
}
@media (max-width: 480px) {
  .da-logo .da-logo-img { height: 21px; }
  .da-logo span { font-size: 9px; letter-spacing: 0.1em; }
}
.da-footer-logo img {
  display: block;
  width: 190px;
  max-width: 100%;
  height: auto;
}

.da-nav-links {
  display: flex;
  align-items: center;
  gap: var(--s-8);
  /* The two-line logo's mathematical center (used by .da-nav-inner's
     align-items:center) sits a hair lower than its visual weight, since
     "Derrick Advisory" is much larger/bolder than the subtitle beneath
     it — nudge the single-line nav links up slightly to match the
     logo's optical center instead of its box center. */
  margin-top: -2px;
}

.da-nav-links a {
  font-size: var(--t-sm);
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  transition: color var(--t-fast);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.da-nav-links a:hover { color: var(--white); }
.da-nav-links a.active { color: var(--white); }

.da-nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--s-2);
  color: var(--white);
  flex-direction: column;
  gap: 5px;
}

.da-nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all var(--t-base);
}

.da-mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--navy-900);
  z-index: calc(var(--z-sticky) - 1);
  padding: calc(var(--nav-h) + var(--s-8)) var(--s-6) var(--s-8);
  flex-direction: column;
  gap: var(--s-2);
  overflow-y: auto;
}

.da-mobile-menu.open { display: flex; }

.da-mobile-menu a {
  font-size: var(--t-2xl);
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  padding: var(--s-4) 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: color var(--t-fast);
}

.da-mobile-menu a:hover { color: var(--gold-300); }

/* ── 5. BUTTONS ─────────────────────────────────────────────── */
.da-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  font-size: var(--t-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 11px 22px;
  border-radius: var(--r-full);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--t-base);
  white-space: nowrap;
  line-height: 1;
  text-decoration: none;
  -webkit-user-select: none;
  user-select: none;
}

.da-btn:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 3px;
}

/* Size variants */
.da-btn-sm { font-size: var(--t-xs); padding: 8px 16px; }
.da-btn-lg { font-size: var(--t-base); padding: 15px 30px; }
.da-btn-xl { font-size: var(--t-lg);  padding: 18px 36px; }

/* Style variants */
.da-btn-primary {
  background: var(--navy-500);
  color: var(--white);
  border-color: var(--navy-500);
}
.da-btn-primary:hover {
  background: var(--navy-400);
  border-color: var(--navy-400);
  box-shadow: var(--sh-navy);
}

.da-btn-gold {
  background: linear-gradient(135deg, var(--gold-400) 0%, var(--gold-300) 100%);
  color: var(--navy-900);
  border-color: transparent;
  font-weight: 700;
}
.da-btn-gold:hover {
  background: linear-gradient(135deg, var(--gold-300) 0%, var(--gold-200) 100%);
  box-shadow: var(--sh-gold-lg);
}

.da-btn-navy {
  background: var(--navy-800);
  color: var(--white);
  border-color: var(--navy-800);
}
.da-btn-navy:hover {
  background: var(--navy-700);
  box-shadow: var(--sh-xl);
}

.da-btn-outline {
  background: transparent;
  color: var(--navy-500);
  border-color: var(--navy-500);
}
.da-btn-outline:hover {
  background: var(--navy-500);
  color: var(--white);
}

.da-btn-ghost {
  background: transparent;
  color: rgba(255,255,255,0.85);
  border-color: rgba(255,255,255,0.3);
}
.da-btn-ghost:hover {
  background: rgba(255,255,255,0.1);
  color: var(--white);
  border-color: rgba(255,255,255,0.6);
}

.da-btn-ghost-light {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.35);
}
.da-btn-ghost-light:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.65);
}

.da-btn-text {
  background: none;
  border: none;
  color: var(--navy-500);
  padding-left: 0;
  padding-right: 0;
}
.da-btn-text:hover { color: var(--navy-400); text-decoration: underline; }

/* ── 6. CARDS ───────────────────────────────────────────────── */
.da-card {
  background: var(--white);
  border-radius: var(--r-xl);
  padding: var(--s-8);
  box-shadow: var(--sh-md);
  border: 1px solid var(--gray-100);
  transition: transform var(--t-base), box-shadow var(--t-base);
}

.da-card:hover {
  box-shadow: var(--sh-xl);
}

.da-card-dark {
  background: var(--navy-800);
  border-color: rgba(255,255,255,0.08);
  color: var(--white);
}

.da-card-navy {
  background: var(--navy-900);
  border-color: rgba(255,255,255,0.06);
  color: var(--white);
}

.da-card-gold {
  background: var(--gold-50);
  border-color: var(--gold-200);
}

.da-card-glass {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.12);
}

.da-card-featured {
  border: 2px solid var(--gold-400);
  position: relative;
  overflow: hidden;
}

.da-card-featured::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(201,168,76,0.04) 0%, transparent 60%);
  pointer-events: none;
}

/* ── 7. BADGES ──────────────────────────────────────────────── */
.da-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: var(--r-full);
}

.da-badge-navy { background: var(--navy-100); color: var(--navy-500); }
.da-badge-gold { background: var(--gold-100); color: var(--gold-600); border: 1px solid var(--gold-200); }
.da-badge-white { background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.85); border: 1px solid rgba(255,255,255,0.2); }
.da-badge-success { background: #D1FAE5; color: #065F46; }
.da-badge-outline { background: transparent; border: 1.5px solid var(--c-border); color: var(--gray-600); }

/* ── 8. SECTION HEADER PATTERN ──────────────────────────────── */
.da-section-header {
  text-align: center;
  max-width: 700px;
  margin-inline: auto;
  margin-bottom: clamp(40px, 6vw, 72px);
}

.da-eyebrow {
  display: inline-block;
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: var(--s-4);
}

.da-eyebrow-light { color: var(--gold-300); }
.da-eyebrow-muted { color: var(--gray-500); }

.da-section-title {
  font-size: var(--t-5xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--navy-800);
  margin-bottom: var(--s-5);
}

.da-section-title-light { color: var(--white); }

.da-section-sub {
  font-size: var(--t-lg);
  color: var(--gray-500);
  line-height: 1.7;
  max-width: 600px;
  margin-inline: auto;
}

.da-section-sub-light { color: rgba(255,255,255,0.65); }

/* ── 9. TYPOGRAPHY UTILITIES ────────────────────────────────── */
.da-gradient-text {
  background: linear-gradient(135deg, var(--gold-400) 0%, var(--gold-200) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.da-gradient-text-blue {
  background: linear-gradient(135deg, var(--navy-300) 0%, var(--navy-100) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.fw-400 { font-weight: 400; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }

.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

.text-muted  { color: var(--gray-500); }
.text-light  { color: rgba(255,255,255,0.65); }
.text-gold   { color: var(--gold-400); }
.text-white  { color: var(--white); }

/* ── 10. DIVIDERS ───────────────────────────────────────────── */
.da-divider {
  height: 1px;
  background: var(--gray-200);
  border: none;
  margin-block: var(--s-8);
}

.da-divider-gold { background: linear-gradient(90deg, transparent, var(--gold-300), transparent); }
.da-divider-dark { background: rgba(255,255,255,0.08); }

/* ── 11. FEATURE LIST ───────────────────────────────────────── */
.da-feature-list {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  margin: var(--s-6) 0;
}

.da-feature-item {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
  font-size: var(--t-sm);
  color: rgba(255,255,255,0.8);
  line-height: 1.5;
}

.da-feature-item-dark { color: var(--gray-600); }

.da-feature-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(201,168,76,0.15);
  border: 1.5px solid var(--gold-400);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
  font-size: 10px;
  color: var(--gold-400);
}

/* ── 12. STATS ──────────────────────────────────────────────── */
.da-stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-8);
  justify-content: center;
}

.da-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-1);
}

.da-stat-num {
  font-size: var(--t-4xl);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--white);
}

.da-stat-lbl {
  font-size: var(--t-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}

.da-stat-divider {
  width: 1px;
  height: 48px;
  background: rgba(255,255,255,0.12);
  align-self: center;
}

/* ── 13. FORM ELEMENTS ──────────────────────────────────────── */
.da-input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-md);
  font-size: var(--t-base);
  color: var(--c-text);
  background: var(--white);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  outline: none;
}

.da-input:focus {
  border-color: var(--navy-500);
  box-shadow: 0 0 0 3px rgba(18, 70, 160, 0.12);
}

.da-label {
  display: block;
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: var(--s-2);
  letter-spacing: 0.01em;
}

/* ── 14. FOOTER ─────────────────────────────────────────────── */
.da-footer {
  background: var(--navy-950);
  color: rgba(255,255,255,0.6);
  padding-top: clamp(48px, 6vw, 80px);
  padding-bottom: var(--s-8);
  border-top: 1px solid rgba(255,255,255,0.04);
}

.da-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--s-10);
  padding-bottom: var(--s-12);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.da-footer-logo {
  font-size: var(--t-xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--white);
  margin-bottom: var(--s-3);
}

.da-footer-tagline {
  font-size: var(--t-sm);
  color: rgba(255,255,255,0.45);
  line-height: 1.7;
  max-width: 280px;
  margin-bottom: var(--s-6);
}

.da-footer-col h4 {
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: var(--s-5);
}

.da-footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}

.da-footer-links a {
  font-size: var(--t-sm);
  color: rgba(255,255,255,0.55);
  transition: color var(--t-fast);
}

.da-footer-links a:hover { color: var(--white); }

.da-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s-4);
  padding-top: var(--s-8);
}

.da-footer-copy {
  font-size: var(--t-xs);
  color: rgba(255,255,255,0.3);
}

.da-footer-legal {
  font-size: var(--t-xs);
  color: rgba(255,255,255,0.25);
  max-width: 600px;
  line-height: 1.6;
  margin-top: var(--s-4);
}

.da-footer-contact {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}

.da-footer-contact a {
  font-size: var(--t-sm);
  color: rgba(255,255,255,0.55);
  transition: color var(--t-fast);
}

.da-footer-contact a:hover { color: var(--gold-300); }

/* ── 15. SCROLL ANIMATIONS ──────────────────────────────────── */
.da-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.da-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.da-reveal-left {
  opacity: 0;
  transform: translateX(-28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.da-reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.da-reveal-right {
  opacity: 0;
  transform: translateX(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.da-reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.da-reveal-delay-1 { transition-delay: 0.1s; }
.da-reveal-delay-2 { transition-delay: 0.2s; }
.da-reveal-delay-3 { transition-delay: 0.3s; }
.da-reveal-delay-4 { transition-delay: 0.4s; }
.da-reveal-delay-5 { transition-delay: 0.5s; }

/* ── 16. KEYFRAMES ──────────────────────────────────────────── */
@keyframes da-fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes da-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes da-scale-in {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes da-shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes da-pulse-gold {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201, 168, 76, 0); }
  50%       { box-shadow: 0 0 0 8px rgba(201, 168, 76, 0.15); }
}

.da-animate-fade-up   { animation: da-fade-up   0.65s ease both; }
.da-animate-fade-in   { animation: da-fade-in   0.65s ease both; }
.da-animate-scale-in  { animation: da-scale-in  0.65s ease both; }

/* ── 17. UTILITY CLASSES ────────────────────────────────────── */
.da-sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  border: 0;
}

.da-spacer-sm  { height: var(--s-8); }
.da-spacer-md  { height: var(--s-16); }
.da-spacer-lg  { height: var(--s-24); }

.da-flex       { display: flex; }
.da-flex-col   { display: flex; flex-direction: column; }
.da-items-center { align-items: center; }
.da-justify-center { justify-content: center; }
.da-justify-between { justify-content: space-between; }
.da-gap-2  { gap: var(--s-2); }
.da-gap-4  { gap: var(--s-4); }
.da-gap-6  { gap: var(--s-6); }
.da-gap-8  { gap: var(--s-8); }
.da-gap-12 { gap: var(--s-12); }

.da-w-full { width: 100%; }
.da-max-w-sm { max-width: var(--max-w-sm); }
.da-max-w-md { max-width: var(--max-w-md); }

.da-mt-4  { margin-top: var(--s-4); }
.da-mt-6  { margin-top: var(--s-6); }
.da-mt-8  { margin-top: var(--s-8); }
.da-mt-12 { margin-top: var(--s-12); }
.da-mb-4  { margin-bottom: var(--s-4); }
.da-mb-6  { margin-bottom: var(--s-6); }
.da-mb-8  { margin-bottom: var(--s-8); }
.da-mb-12 { margin-bottom: var(--s-12); }
.da-mx-auto { margin-inline: auto; }

/* ── 18. RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  .da-footer-grid { grid-template-columns: 1fr 1fr; gap: var(--s-8); }
  .da-grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .da-nav-links { display: none; }
  .da-nav-toggle { display: flex; }

  .da-grid-2, .da-grid-3 { grid-template-columns: 1fr; }
  .da-grid-4 { grid-template-columns: repeat(2, 1fr); gap: var(--s-4); }

  .da-footer-grid { grid-template-columns: 1fr 1fr; gap: var(--s-6); }
  .da-footer-bottom { flex-direction: column; align-items: flex-start; }

  .da-stats-row { gap: var(--s-6); }
  .da-stat-divider { display: none; }
}

@media (max-width: 480px) {
  .da-grid-4 { grid-template-columns: 1fr; }
  .da-footer-grid { grid-template-columns: 1fr; }
  .da-btn-xl { padding: 15px 28px; font-size: var(--t-base); }
}

/* ============================================================
   DESIGN SYSTEM — v1.1 TWO-TIER NAVIGATION
   Secondary utility bar + dropdown menus
   ============================================================ */

/* ── SECONDARY / UTILITY NAV BAR ───────────────────────────── */
:root {
  --sec-nav-h: 40px;
  --header-h: calc(var(--nav-h) + var(--sec-nav-h));
}

/* ── PRIMARY NAV — offset for secondary bar ─────────────────── */
.da-nav {
  top: var(--sec-nav-h);  /* push below utility bar */
}

/* Body padding for both bars */
.da-page-body {
  padding-top: var(--header-h);
}

/* ── DROPDOWN MENUS ─────────────────────────────────────────── */
.da-has-dropdown {
  position: relative;
}

.da-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 210px;
  background: var(--navy-900);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--r-lg);
  padding: var(--s-2);
  box-shadow: var(--sh-2xl);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  pointer-events: none;
  z-index: var(--z-dropdown);
}

/* Arrow pointer */
.da-dropdown::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 10px;
  height: 10px;
  background: var(--navy-900);
  border-left: 1px solid rgba(255,255,255,0.1);
  border-top: 1px solid rgba(255,255,255,0.1);
}

.da-has-dropdown:hover .da-dropdown,
.da-has-dropdown:focus-within .da-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: all;
}

.da-dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: 9px 14px;
  border-radius: var(--r-sm);
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
  transition: background var(--t-fast), color var(--t-fast);
  white-space: nowrap;
  text-decoration: none;
}

.da-dropdown-item:hover {
  background: rgba(255,255,255,0.07);
  color: var(--white);
}

.da-dropdown-item-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

.da-dropdown-divider {
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin: var(--s-1) var(--s-2);
}

/* Chevron on dropdown trigger */
.da-nav-caret {
  display: inline-block;
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid rgba(255,255,255,0.5);
  margin-left: 4px;
  transition: transform var(--t-fast);
  vertical-align: middle;
}

.da-has-dropdown:hover .da-nav-caret { transform: rotate(180deg); }

/* ── SECONDARY NAV DROPDOWN (left-aligned) ───────────────────── */
.da-sec-has-dropdown {
  position: relative;
}

.da-sec-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 210px;
  background: var(--navy-900);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--r-lg);
  padding: var(--s-2);
  box-shadow: var(--sh-2xl);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  pointer-events: none;
  z-index: var(--z-dropdown);
}

.da-sec-has-dropdown:hover .da-sec-dropdown,
.da-sec-has-dropdown:focus-within .da-sec-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: all;
}

/* Right-aligned secondary dropdown */
.da-sec-has-dropdown.align-right .da-sec-dropdown {
  left: auto;
  right: 0;
}

.da-sec-dropdown-trigger {
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  padding: 4px 0;
  transition: color var(--t-fast);
  background: none;
  border: none;
  letter-spacing: 0.01em;
}

.da-sec-dropdown-trigger:hover { color: rgba(255,255,255,0.85); }

.da-sec-dropdown-trigger .da-nav-caret {
  border-top-color: rgba(255,255,255,0.4);
}

.da-sec-has-dropdown:hover .da-sec-dropdown-trigger { color: rgba(255,255,255,0.85); }

/* ── ACTIVE PAGE INDICATOR ───────────────────────────────────── */
.da-nav-links a.da-active,
.da-nav-links a[aria-current="page"] {
  color: var(--white);
  font-weight: 700; /* brighter/more prominent active state — same white, more weight */
  position: relative;
}

.da-nav-links a.da-active::after,
.da-nav-links a[aria-current="page"]::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0; right: 0;
  height: 2px;
  background: var(--gold-400);
  border-radius: 2px;
}

/* ── MOBILE — hide secondary nav dropdowns; show in menu ─────── */
@media (max-width: 768px) {
  :root { --header-h: var(--nav-h); }
  .da-nav { top: 0; }

  .da-mobile-menu {
    gap: 0;
  }

  .da-mobile-section-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.3);
    padding: 20px 0 8px;
  }

  .da-mobile-menu a {
    font-size: var(--t-lg);
    padding: 12px 0;
  }

  .da-mobile-menu a.sub-link {
    font-size: var(--t-base);
    color: rgba(255,255,255,0.55);
    padding: 9px 0 9px 16px;
    border-bottom-color: rgba(255,255,255,0.04);
  }
}

/* ── DESKTOP — remove sticky/fixed nav behavior (Desktop Header Fix, 2026-08-23) ──
   .da-nav is fixed globally (see the base rule above) and, on root-family
   pages only, .da-sec-nav is a second fixed bar with .da-page-body's
   padding-top compensating for both. Mobile (the @media (max-width:768px)
   block just above) is untouched — this query's min-width guard can never
   overlap it. On desktop, both bars return to normal document flow and the
   compensating padding is removed so no blank gap is left above the
   content; the mobile rules above (.da-nav{top:0}, .da-sec-nav{display:none},
   the mobile --header-h override) are not modified or referenced here. */
@media (min-width: 769px) {
  .da-nav {
    position: static;
    top: auto;
  }

  .da-page-body {
    padding-top: 0;
  }
}

/* ── SCROLL OFFSET for anchor links ────────────────────────────── */
[id] { scroll-margin-top: calc(var(--header-h) + 20px); }

/* M4 batch 1 (PUB-1): between the phone menu (768 px and below) and a wide desktop, the English menu was about 215 px wider
   than the screen, so every English page scrolled sideways at 1024 px. The same links are kept; they sit closer together
   and slightly smaller at these widths only. */
/* Our Agency (24 Nov 2026): the menu gained one top-level link. Without a change it was 19 px wider than a 1366 px screen and
   wider than the screen again below about 1075 px. Two small rules keep every width inside the screen:
   - from 1280 px the links sit a little closer together (gap 32 px -> 20 px);
   - at 1100 px and below the phone menu takes over (it used to start at 768 px). Phone menu markup is unchanged. */
@media (min-width: 1280px) {
  .da-nav-links { gap: 20px; }
}
@media (min-width: 769px) and (max-width: 1100px) {
  .da-nav-links { display: none; }
  .da-nav-toggle { display: flex; }
  /* From 769 px the header is position:static (Desktop Header Fix above), so the open phone menu (fixed, z-index 199) would
     cover it, hiding the menu button. Giving the header a stacking position keeps the button on top so the menu can be closed. */
  .da-nav { position: relative; z-index: var(--z-sticky); }
}
@media (min-width: 769px) and (max-width: 1279px) {
  .da-nav-links { gap: 9px; }
  .da-nav-links a, .da-nav-links .da-nav-trigger { font-size: 13px; }
  .da-nav-links a.da-btn { padding-left: 10px; padding-right: 10px; margin-left: 0 !important; }
  .da-nav-links a.da-nav-link { margin-left: 0 !important; }
  .da-nav-logo img, .da-nav-brand img, .da-nav-inner > a > img { width: 150px; }
}

/* M4 batch 1 (PUB-3): three small sideways overflows on phones, fixed here once for every language copy of the pages.
   - Legacy Boost: a block waiting to slide in from the right sat 8 px outside the screen. On phones it only fades in.
   - Careers: the quick-links strip was wider than a 320 px screen; it now stays inside the screen and scrolls within itself.
   - Apply: the three IC number boxes did not shrink on a 320 px screen. */
@media (max-width: 480px) {
  .da-reveal-right { transform: none; }
  #cn-tabbar { max-width: 100%; min-width: 0; box-sizing: border-box; flex-wrap: nowrap; }
  #cn-tabbar .cn-tab { flex: 0 0 auto; padding-left: 14px; padding-right: 14px; }
  .aw-nric-trio { max-width: 100%; min-width: 0; }
  .aw-nric-trio .aw-nric-box { min-width: 0; flex: 1 1 0; width: auto; }
  .aw-f { min-width: 0; }
  /* Careers: the two-column figures grid let long figures push it wider than the screen */
  .recruit-stat-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .recruit-stat-grid > * { min-width: 0; overflow-wrap: anywhere; }
  /* a large button with a long label wraps instead of running past the edge */
  .da-btn.da-btn-xl { max-width: 100%; box-sizing: border-box; white-space: normal; text-align: center; }
}

/* M4 batch 2a (CX-4): the Protection Check's lower calculator was wider than the screen (up to 154 px at 320 px wide, and its
   result card 64 px at 1024 px). The grid columns took the width of their widest content; they may now shrink, and long
   figures wrap inside their card. Applies to every language copy of the page. */
.phc-calc-card { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.phc-calc-form, .phc-calc-result { min-width: 0; max-width: 100%; box-sizing: border-box; }
.phc-calc-form .phc-form-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.phc-calc-form .phc-form-grid > *, .phc-calc-result > * { min-width: 0; }
.phc-calc-form input, .phc-calc-form select { max-width: 100%; min-width: 0; box-sizing: border-box; }
.phc-calc-result { overflow-wrap: anywhere; }
.phc-calc-result .da-btn { white-space: normal; text-align: center; max-width: 100%; box-sizing: border-box; height: auto; }   /* a long button label wraps inside the card */
.phc-form-grid > * { min-width: 0; }
.phc-form-grid input, .phc-form-grid select { max-width: 100%; min-width: 0; box-sizing: border-box; }
@media (max-width: 900px) { .phc-calc-card { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) { .phc-calc-form .phc-form-grid { grid-template-columns: minmax(0, 1fr); } }

/* M4 batch 2b (CX-4): Protection Check - the message under a field that must be filled in (it used to be a pop-up). */
.phc-field-err { margin-top: 6px; font-size: 0.82rem; line-height: 1.45; font-weight: 600; color: #b91c1c; }
.phc-field-err[hidden] { display: none; }
.phc-field input.phc-input-err, .phc-field input.phc-input-err:focus { border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15); }
