/* =========================================================
   Employment Agency Singapore — design system
   Brand tokens (colours, fonts, spacing, radii, shadows), base styles,
   typography, buttons and links. Shared by every page; load it first.
   Change a token in :root and every page follows.
   ========================================================= */

/* ---------- Font fallback ----------
   Arial resized to take the same space as Poppins (measured 19 Oct 2026), so the page doesn't
   jump when Poppins arrives from Google Fonts (Alex's review: layout shift 0.20 on laptops). */
@font-face {
  font-family: "Poppins Fallback"; font-weight: 400 500; src: local("Arial"), local("ArialMT");
  size-adjust: 111.0%; ascent-override: 94.59%; descent-override: 31.53%; line-gap-override: 9.01%;
}
@font-face {
  font-family: "Poppins Fallback"; font-weight: 600 700; src: local("Arial Bold"), local("Arial-BoldMT");
  size-adjust: 106.0%; ascent-override: 99.06%; descent-override: 33.02%; line-gap-override: 9.43%;
}

/* ---------- Colour system ----------
   Change a colour here and it updates everywhere.            */
:root {
  /* Light only: stops Android browsers' auto dark mode recolouring the page */
  color-scheme: only light;

  /* Palette */
  --depth:   #030f18;  /* H1 + H2, body text, dark sections, footer     */
  --harbor:  #1d4052;  /* icons, secondary button, dark panels          */
  --marine:  #446e87;  /* eyebrow labels, muted text, roles, captions   */
  --glacier: #72a3bf;  /* decorative: dotted globe, dots, text on dark  */
  --frost:   #e0e8e6;  /* shapes: FAQ items, chips, icon tiles, borders */
  --sea:     #075056;  /* highlighted phrase in H1/H2, numbers, links   */
  --orange:  #c2410c;  /* PRIMARY CONVERSION: Request a Quote. White text 5.2:1 (Alex's review; was #ff5b04, 3.1:1) */
  --white:   #ffffff;

  /* Derived tints */
  --orange-hover: #9a3412;
  --frost-soft:   #f3f6f5;  /* alternating section background */
  --frost-line:   #d3dedb;  /* hairlines on light backgrounds */
  --text:         var(--depth);
  --text-muted:   var(--marine);

  /* Type */
  --font: "Poppins", "Poppins Fallback", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Shape */
  --radius-sm: 10px;
  --radius:    16px;
  --radius-lg: 24px;
  --shadow:    0 10px 30px -12px rgba(3, 15, 24, .18);
  --shadow-lg: 0 24px 60px -20px rgba(3, 15, 24, .28);
  --container: 1200px;
  --gutter:    24px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 1rem; line-height: 1.65;
  color: var(--text); background: var(--white); -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
:focus-visible { outline: 3px solid var(--glacier); outline-offset: 3px; border-radius: 6px; }
.ico { width: 20px; height: 20px; flex: none; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--depth); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }
.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: 112px 0; }
.bg-soft { background: var(--frost-soft); }
.bg-frost { background: var(--frost); }

/* ---------- Typography ---------- */
h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); font-weight: 700; letter-spacing: -0.02em; color: var(--depth); }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.75rem); font-weight: 700; letter-spacing: -0.02em; color: var(--depth); }
h3 { font-size: 1.25rem; font-weight: 600; line-height: 1.35; color: var(--depth); }
.accent { color: var(--sea); }
.accent.block { display: block; }
.eyebrow {
  font-size: 0.8125rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--marine); margin-bottom: 14px;
}
.lead { font-size: 1.125rem; color: var(--text); opacity: .85; }
.section-head { max-width: 760px; margin-bottom: 56px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head .lead { margin-top: 14px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 26px; border-radius: 999px;
  font-weight: 600; font-size: 1rem; line-height: 1; white-space: nowrap;
  border: 2px solid transparent; transition: background .2s, color .2s, border-color .2s, transform .2s, box-shadow .2s;
}
.btn-sm { min-height: 42px; padding: 0 20px; font-size: 0.9375rem; }
.btn-lg { min-height: 56px; padding: 0 32px; font-size: 1.0625rem; }

/* Request Workers — Blaze Orange */
.btn-primary { background: var(--orange); color: var(--white); box-shadow: 0 8px 20px -8px rgba(194, 65, 12, .55); }
.btn-primary:hover { background: var(--orange-hover); }

/* Find a Job — white with Harbor outline (on light backgrounds) */
.btn-secondary { background: var(--white); color: var(--harbor); border-color: var(--harbor); }
.btn-secondary:hover { background: var(--harbor); color: var(--white); }

/* Find a Job on dark backgrounds — Frost fill */
.btn-light { background: var(--frost); color: var(--depth); }
.btn-light:hover { background: var(--white); }
/* WhatsApp green with dark text: white on this green was 2.0:1 (Alex's review) */
.btn-whatsapp { background: #25d366; color: var(--depth); }
.btn-whatsapp:hover { background: #1fb457; }
.btn-whatsapp .ico { width: 20px; height: 20px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }
.text-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--sea); }
.text-link .ico { width: 18px; height: 18px; transition: transform .2s; }
.text-link:hover .ico { transform: translateX(4px); }
.text-link.on-dark { color: var(--frost); }
.round-btn {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: var(--white); color: var(--harbor); border: 1px solid var(--frost-line); transition: background .2s, color .2s;
}
.round-btn:hover { background: var(--harbor); color: var(--white); }
.round-btn:disabled { opacity: .35; pointer-events: none; }
.round-btn.on-dark { background: transparent; border-color: rgba(114, 163, 191, .4); color: var(--white); }
.round-btn.on-dark:hover { background: var(--white); color: var(--depth); }
@media (max-width: 900px) {
  .section { padding: 80px 0; }
}
@media (max-width: 600px) {
  :root { --gutter: 16px; }
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 36px; }
  .btn-row .btn { flex: 1 1 100%; }
}
@media (max-width: 600px) {
  /* Shorter header, menu opens right under it */
  html { scroll-padding-top: 72px; }
  /* Hero: H1 fits narrow screens, smaller picture */
  h1 { font-size: clamp(1.875rem, 8.6vw, 2.25rem); }
  /* Bigger tap targets */
  .btn, .btn-sm { min-height: 48px; }
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Button feedback (Alex's review, 6.10): every button presses in slightly when tapped (100ms);
   only the orange button lifts on hover, and only with a mouse (200ms) */
.btn:active, .round-btn:active { transform: scale(.97); transition-duration: .1s; }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 26px -10px rgba(194, 65, 12, .6); }
  .btn-primary:active { transform: translateY(0) scale(.97); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 900px) {
  body { font-size: 0.9375rem; }
  h1 { font-size: clamp(1.875rem, 4.6vw, 2.375rem); }
  h2 { font-size: clamp(1.5rem, 3.8vw, 1.875rem); }
  h3 { font-size: 1.0625rem; }
  .lead { font-size: 1rem; }
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 32px; }
  .btn { min-height: 44px; padding: 0 20px; font-size: 0.9375rem; }
  .btn-lg { min-height: 48px; padding: 0 24px; font-size: 1rem; }
  .round-btn { width: 42px; height: 42px; }
}
@media (max-width: 600px) {
  body { font-size: 0.90625rem; }
  h1 { font-size: clamp(1.625rem, 7.2vw, 1.875rem); }
  h2 { font-size: clamp(1.375rem, 6vw, 1.5625rem); }
  h3 { font-size: 1rem; }
  .lead { font-size: 0.9375rem; }
  .eyebrow { font-size: 0.8125rem; margin-bottom: 10px; }
  .section { padding: 48px 0; }
  .section-head { margin-bottom: 24px; }
  html { scroll-padding-top: 64px; }
  .btn, .btn-sm { min-height: 44px; font-size: 0.9375rem; }
  .btn-lg { min-height: 46px; font-size: 0.9375rem; }
  .round-btn { width: 40px; height: 40px; }
  .btn-row { gap: 10px; }
}

/* Tap targets: at least 44 by 44px for anything tappable (Alex's review, 4.4) */
.btn-sm { min-height: 44px; }
.round-btn { width: 44px; height: 44px; }
@media (min-width: 901px) { .round-btn { width: 48px; height: 48px; } }
.text-link { min-height: 44px; }
