/* ============================================================
   Agensi Pekerjaan River Overseas Sdn. Bhd. — riveroverseas.my
   Palette derived from the TRO logo:
   navy #20409a · red-orange #ef4323 · green #00a651 · amber #e09900
   ============================================================ */

:root {
  --navy-900: #101d40;
  --navy-800: #16274f;
  --navy-700: #20409a;
  --navy-600: #2b4fb0;
  --orange-600: #d63a1c;
  --orange-500: #ef4323;
  --amber-500: #e09900;
  --green-500: #00a651;
  --ink-900: #17203a;
  --ink-600: #4b5570;
  --ink-400: #7d86a0;
  --line: #e3e7f0;
  --bg: #f6f8fc;
  --surface: #ffffff;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(16, 29, 64, 0.08);
  --shadow-md: 0 10px 30px -12px rgba(16, 29, 64, 0.22);
  --font-head: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;
  --container: 1160px;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink-900);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--navy-700); }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.15;
  margin: 0 0 0.6em;
  color: var(--navy-900);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); font-weight: 800; }
h3 { font-size: 1.25rem; font-weight: 700; }

p { margin: 0 0 1em; }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section--alt { background: var(--surface); }

.kicker {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange-500);
  margin-bottom: 0.9rem;
}

.section-head { max-width: 46rem; margin-bottom: 2.5rem; }
.section-head--center { margin-inline: auto; text-align: center; }

.lead { font-size: 1.125rem; color: var(--ink-600); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  border: 2px solid transparent;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.btn--primary { background: var(--orange-500); color: #fff; }
.btn--primary:hover,
.btn--primary:focus-visible { background: var(--orange-600); color: #fff; }

.btn--outline { border-color: currentColor; color: var(--navy-700); background: transparent; }
.btn--outline:hover,
.btn--outline:focus-visible { background: var(--navy-700); border-color: var(--navy-700); color: #fff; }

.btn--outline-light { border-color: rgba(255, 255, 255, 0.7); color: #fff; background: transparent; }
.btn--outline-light:hover,
.btn--outline-light:focus-visible { background: #fff; color: var(--navy-800); border-color: #fff; }

:focus-visible {
  outline: 3px solid var(--amber-500);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy-800);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 200;
}
.skip-link:focus { left: 0; }

/* ---------- Top bar ---------- */
.topbar {
  background: var(--navy-900);
  color: #cfd8ef;
  font-size: 0.82rem;
}
.topbar__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.5rem;
  justify-content: space-between;
  padding-block: 0.45rem;
}
.topbar a { color: #fff; text-decoration: none; }
.topbar a:hover { text-decoration: underline; }
.topbar__item { white-space: nowrap; }
.topbar__license { color: #9fb2dd; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 74px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  margin-right: auto;
}
.brand img { height: 44px; width: auto; }
.brand__name {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1.2;
  color: var(--navy-800);
}
.brand__name small {
  display: block;
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--ink-400);
}

.site-nav ul {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  display: block;
  padding: 0.55rem 0.9rem;
  border-radius: 8px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink-900);
  text-decoration: none;
}
.site-nav a:hover { background: var(--bg); color: var(--navy-700); }
.site-nav a[aria-current="page"] { color: var(--orange-500); }

.header-cta { white-space: nowrap; }

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
  cursor: pointer;
}
.nav-toggle__bars {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy-800);
  position: relative;
}
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  background: var(--navy-800);
}
.nav-toggle__bars::before { top: -7px; }
.nav-toggle__bars::after { top: 7px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: #fff;
  background: var(--navy-900);
  isolation: isolate;
  overflow: hidden;
}
.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(100deg, rgba(13, 22, 48, 0.92) 12%, rgba(13, 22, 48, 0.72) 48%, rgba(13, 22, 48, 0.35) 100%);
}
.hero__inner {
  padding-block: clamp(4.5rem, 10vw, 8.5rem);
  max-width: 44rem;
}
.hero h1 { color: #fff; }
.hero .kicker { color: var(--amber-500); }
.hero p {
  font-size: 1.15rem;
  color: #dbe3f5;
  max-width: 36rem;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.8rem;
}

.hero--page .hero__inner { padding-block: clamp(3.5rem, 7vw, 5.5rem); }

/* ---------- Stats band ---------- */
.stats {
  background: var(--navy-800);
  color: #fff;
  padding-block: 2.2rem;
}
.stats__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  text-align: center;
}
.stat__number {
  font-family: var(--font-head);
  font-size: clamp(1.9rem, 3.5vw, 2.6rem);
  font-weight: 800;
  color: var(--amber-500);
  line-height: 1.1;
}
.stat__label {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c3cfe9;
  margin-top: 0.35rem;
}

/* ---------- Split (image + text) ---------- */
.split {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
@media (min-width: 880px) {
  .split { grid-template-columns: 1fr 1fr; gap: 4rem; }
  .split--flip > .split__media { order: 2; }
}
.split__media img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  width: 100%;
  object-fit: cover;
}

.badge-note {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-top: 1.6rem;
  padding: 0.9rem 1.1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green-500);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.badge-note img { height: 46px; width: auto; flex: none; }
.badge-note p { margin: 0; font-size: 0.92rem; color: var(--ink-600); }
.badge-note strong { color: var(--ink-900); }

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.card__img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.card__body { padding: 1.5rem 1.5rem 1.75rem; display: flex; flex-direction: column; flex: 1; }
.card__body p { color: var(--ink-600); flex: 1; }
.card__link {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--orange-500);
  text-decoration: none;
}
.card__link:hover { text-decoration: underline; }

/* ---------- Value cards (mission/vision/value) ---------- */
.value-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.value-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent, var(--navy-700));
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}
.value-card--mission { --accent: var(--navy-700); }
.value-card--vision { --accent: var(--green-500); }
.value-card--value { --accent: var(--orange-500); }
.value-card h3 {
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.value-card p { margin: 0; color: var(--ink-600); }

/* ---------- Process steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: 1rem; }
@media (min-width: 780px) { .steps { grid-template-columns: 1fr 1fr; } }
.steps li {
  counter-increment: step;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem 1.2rem 4.4rem;
  position: relative;
  box-shadow: var(--shadow-sm);
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 1.2rem;
  top: 1.15rem;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--orange-500);
}
.steps h3 { font-size: 1.05rem; margin-bottom: 0.25rem; }
.steps p { margin: 0; font-size: 0.95rem; color: var(--ink-600); }

/* ---------- Network list ---------- */
.network {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.network li {
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 1.1rem;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--navy-700);
}
ul.network { margin: 0; padding: 0; }

/* ---------- Clients ---------- */
.clients-wall {
  display: grid;
  gap: 1.5rem;
}
.clients-wall img {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1rem;
  width: 100%;
}

/* ---------- Quote ---------- */
.quote {
  border-left: 4px solid var(--amber-500);
  margin: 0;
  padding: 0.4rem 0 0.4rem 1.5rem;
  font-family: var(--font-head);
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  font-weight: 600;
  color: var(--navy-800);
}

/* ---------- CTA band ---------- */
.cta-band {
  position: relative;
  background: var(--navy-800);
  color: #fff;
  isolation: isolate;
  overflow: hidden;
}
.cta-band__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.14;
  z-index: -1;
}
.cta-band__inner {
  padding-block: clamp(3rem, 6vw, 4.5rem);
  text-align: center;
  max-width: 46rem;
  margin-inline: auto;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #d5def2; }
.cta-band .hero__actions { justify-content: center; }

/* ---------- Contact page ---------- */
.contact-grid {
  display: grid;
  gap: 2.5rem;
}
@media (min-width: 900px) {
  .contact-grid { grid-template-columns: 5fr 6fr; gap: 3.5rem; }
}
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.contact-list li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  box-shadow: var(--shadow-sm);
}
.contact-list h3 {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-400);
  margin-bottom: 0.3rem;
}
.contact-list p, .contact-list a { margin: 0; font-size: 1rem; color: var(--ink-900); }
.contact-list a { text-decoration: none; font-weight: 600; color: var(--navy-700); }
.contact-list a:hover { text-decoration: underline; }

.form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}
.form__row { margin-bottom: 1.1rem; }
.form label {
  display: block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}
.form input,
.form textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  color: var(--ink-900);
  background: var(--bg);
}
.form input:focus,
.form textarea:focus {
  outline: 2px solid var(--navy-600);
  outline-offset: 0;
  background: #fff;
}
.form .hp { position: absolute; left: -9999px; }
.form__note { font-size: 0.85rem; color: var(--ink-400); margin-top: 0.9rem; }

.map-embed {
  border: 0;
  width: 100%;
  height: 360px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.form-status {
  margin-top: 1rem;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius);
  font-weight: 600;
  display: none;
}
.form-status--ok { display: block; background: #e7f6ee; color: #0c6b3d; border: 1px solid #b5e2c9; }
.form-status--err { display: block; background: #fdecea; color: #a02818; border: 1px solid #f3c4bd; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-900);
  color: #b9c5e4;
  font-size: 0.95rem;
}
.site-footer a { color: #e6ecfa; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid {
  display: grid;
  gap: 2.5rem;
  padding-block: 3.5rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.footer-brand img { height: 42px; width: auto; margin-bottom: 1rem; background: #fff; padding: 6px 10px; border-radius: 8px; }
.site-footer h3 {
  color: #fff;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.footer-legal {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-block: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  font-size: 0.82rem;
  color: #8794b8;
}

/* ---------- Reveal animation ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  .reveal.is-visible { opacity: 1; transform: none; }
}

/* ---------- Mobile nav ---------- */
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .header-cta { display: none; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    display: none;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; padding: 0.75rem 1rem 1rem; }
  .site-nav a { padding: 0.8rem 0.9rem; font-size: 1rem; }
  .brand__name small { display: none; }
}

@media (max-width: 480px) {
  .topbar__license { display: none; }
  .brand__name { display: none; }
}
