/* Rexil Agrotech Malaysia */

:root {
  --olive: #b2ba43;
  --olive-dark: #7b7d2e;
  --olive-deep: #5c6420;
  --olive-ink: #4a4e1c;
  --green: #139c4e;
  --gold: #f8c916;
  --red: #cb343d;
  --ink: #1c1c1c;
  --ink-soft: #2f2f2f;
  --muted: #5c5c5c;
  --line: #e3e6d3;
  --cream: #f5f6ec;
  --cream-2: #eef0dc;
  --white: #ffffff;
  --header-h: 4.75rem;
  --max: 1140px;
  --radius: 1.25rem;
  --radius-lg: 2rem;
  --shadow: 0 18px 40px rgba(28, 28, 28, 0.08);
  --font: "Outfit", "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 0.75rem); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink-soft);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--olive-deep); }
a:hover { color: var(--green); }
h1, h2, h3 {
  font-weight: 600;
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
}
h1 { font-size: clamp(2.25rem, 6vw, 4.15rem); font-weight: 600; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.35rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.01em; }
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ink);
  color: #fff;
  padding: 0.5rem 0.85rem;
  z-index: 100;
  border-radius: 0.35rem;
}
.skip-link:focus { top: 0.75rem; }

.wrap {
  width: min(var(--max), calc(100% - 2.5rem));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 8px 24px rgba(28, 28, 28, 0.05);
}
.header-inner {
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand img { width: 168px; height: auto; }
.site-nav {
  display: flex;
  align-items: center;
  gap: 0.2rem 1.35rem;
}
.site-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.25rem 0;
}
.site-nav a:hover { color: var(--olive-deep); }
.nav-cta {
  background: var(--olive);
  color: var(--olive-ink) !important;
  padding: 0.5rem 1rem !important;
  border-radius: 999px;
  font-weight: 600 !important;
}
.nav-cta:hover { background: var(--olive-dark); color: #fff !important; }

.nav-toggle {
  display: none;
  width: 2.6rem;
  height: 2.6rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 1.3rem;
  margin: 5px auto;
  background: var(--ink);
  transition: transform 0.2s, opacity 0.2s;
}

/* Hero */
.hero {
  position: relative;
  min-height: min(92vh, 820px);
  display: flex;
  align-items: flex-end;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
.hero-media, .hero-shade { position: absolute; inset: 0; }
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
.hero-shade {
  background:
    linear-gradient(180deg, rgba(20, 22, 8, 0.15) 0%, rgba(20, 22, 8, 0.25) 40%, rgba(16, 18, 6, 0.78) 100%);
}
.hero-blob {
  position: absolute;
  right: -8%;
  bottom: -30%;
  width: 55%;
  height: 70%;
  background: var(--olive);
  opacity: 0.22;
  border-radius: 50% 40% 0 60%;
  z-index: 1;
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 2;
  width: min(var(--max), calc(100% - 2.5rem));
  margin: 0 auto 4.5rem;
  max-width: 42rem;
  margin-left: max((100% - var(--max)) / 2, 1.25rem);
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--olive-dark);
  margin: 0 0 0.7rem;
}
.eyebrow.light { color: #f3f6d8; }
.hero .eyebrow { color: var(--gold); }
.hero h1 { color: #fff; margin-bottom: 1rem; max-width: 16ch; }
.hero-lead {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 38rem;
  margin-bottom: 1.6rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
  padding: 0.8rem 1.25rem;
  border-radius: 999px;
  transition: background 0.15s, color 0.15s, transform 0.15s;
}
.btn-primary { background: var(--olive); color: var(--olive-ink); }
.btn-primary:hover { background: #c4cc5a; color: var(--ink); }
.btn-ghost { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,0.7); }
.btn-ghost:hover { background: #fff; color: var(--ink); }
.btn-on-olive { background: #fff; color: var(--olive-ink); margin-top: 0.5rem; }
.btn-on-olive:hover { background: var(--cream); color: var(--ink); }

/* Sections */
.section { padding: 4.75rem 0; }
.section-head { margin-bottom: 2rem; }
.lede { font-size: 1.1rem; max-width: 46rem; color: var(--muted); margin-bottom: 2rem; }
.media-round { overflow: hidden; border-radius: var(--radius-lg); }
.media-round img { width: 100%; height: 100%; object-fit: cover; }

/* About */
.about { background: var(--white); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}
.about-photo { min-height: 280px; box-shadow: var(--shadow); }
.about-photo img { min-height: 280px; object-position: center; }

/* CEO */
.ceo { background: var(--cream); }
.ceo-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 3rem;
  align-items: start;
}
.ceo-photo { position: sticky; top: calc(var(--header-h) + 1rem); }
.ceo-photo img { aspect-ratio: 4/5; object-position: 20% center; }
.highlight {
  color: var(--olive-deep);
  font-weight: 500;
  font-size: 1.08rem;
}
.closing-line {
  font-weight: 600;
  color: var(--ink);
  font-style: italic;
}
.signoff {
  margin-top: 1.5rem;
  font-size: 0.98rem;
  color: var(--ink);
}
.signoff-label {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--olive-dark);
  margin-bottom: 0.3rem;
}
.signoff strong { display: block; font-weight: 600; }

/* Chairman */
.chairman-hero { position: relative; margin-bottom: 2.5rem; }
.chairman-hero img { width: 100%; aspect-ratio: 16/5; object-fit: cover; }
.chairman-hero-label {
  position: absolute;
  left: 0;
  bottom: 0;
  background: var(--olive);
  color: #fff;
  padding: 0.85rem 1.5rem 0.75rem;
  border-top-right-radius: 1.5rem;
}
.chairman-hero-label .eyebrow { margin: 0; }
.chairman-body {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: start;
}
.chairman-side img { aspect-ratio: 3/4; object-position: center 28%; }

/* Products */
.products { background: var(--cream); padding-top: 4rem; }
.flagship {
  background: var(--olive);
  color: var(--olive-ink);
  border-radius: 2.25rem;
  padding: 2.75rem 2.5rem;
  margin-bottom: 3.5rem;
  position: relative;
  overflow: hidden;
}
.flagship::after {
  content: "";
  position: absolute;
  right: -6rem;
  bottom: -8rem;
  width: 22rem;
  height: 22rem;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  pointer-events: none;
}
.flagship-inner { position: relative; z-index: 1; max-width: 44rem; }
.flagship h2 { color: #fff; }
.flagship-sub {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--olive-ink);
  margin-bottom: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.92rem;
}
.flagship p, .flagship li { color: var(--olive-ink); }
.benefit-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem 1.5rem;
}
.benefit-list li {
  position: relative;
  padding-left: 1.15rem;
  font-weight: 600;
}
.benefit-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #fff;
}
.flagship-close { font-weight: 500; }

.offer-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.offer {
  background: #fff;
  border-radius: 1.35rem;
  padding: 1.35rem 1.4rem 1.45rem;
  border: 1px solid var(--line);
}
.offer:hover { border-color: var(--olive); }
.offer-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--olive-deep);
  background: var(--cream-2);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  margin-bottom: 0.55rem;
}
.offer h3 { margin: 0 0 0.4rem; }
.offer p { color: var(--muted); font-size: 0.98rem; }

/* Team */
.team-intro {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 2rem;
  align-items: end;
  margin-bottom: 3rem;
}
.team-forest { height: 200px; }
.team-forest img { object-position: center 40%; }
.person {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2.25rem;
  align-items: start;
  margin-bottom: 3rem;
}
.person-alt { grid-template-columns: 240px 1fr; }
.person-photo {
  margin: 0;
  background: var(--cream);
  border-radius: 1.75rem;
  overflow: hidden;
  aspect-ratio: 3/4;
}
.person-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
}
.person .role {
  color: var(--olive-dark);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  margin-bottom: 0.9rem;
}
.credential {
  font-weight: 500;
  color: var(--ink);
  font-size: 0.98rem;
}
.dew-break {
  margin: 0 0 3rem;
  max-height: 280px;
}
.dew-break img { width: 100%; height: 280px; object-fit: cover; object-position: center; }

/* Closing + contact */
.close-contact { background: var(--cream); }
.close-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
  align-items: start;
}
.contact-card {
  background: var(--olive);
  color: var(--olive-ink);
  border-radius: 2rem;
  padding: 2.1rem 2rem 2.2rem;
}
.contact-card h2 { color: #fff; margin-bottom: 1.25rem; }
.contact-label {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--olive-ink);
  margin-bottom: 0.25rem;
}
.contact-item { margin-bottom: 1.15rem; }
.contact-card a { color: var(--olive-ink); font-weight: 600; text-decoration: none; word-break: break-word; }
.contact-card a:hover { color: #fff; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.25rem 0 2.5rem;
  background: #fff;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
}
.footer-meta { color: var(--muted); font-size: 0.92rem; }
.footer-meta p { margin: 0 0 0.15rem; }
.footer-meta a { text-decoration: none; }

/* Responsive */
@media (max-width: 860px) {
  .nav-toggle { display: block; z-index: 50; }
  .site-nav {
    position: fixed;
    inset: 0 0 auto 0;
    top: 0;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    padding: calc(var(--header-h) + 0.5rem) 1.5rem 1.5rem;
    gap: 0;
    border-bottom: 1px solid var(--line);
    transform: translateY(-110%);
    transition: transform 0.25s ease;
    box-shadow: var(--shadow);
  }
  body.nav-open .site-nav { transform: translateY(0); }
  body.nav-open { overflow: hidden; }
  .site-nav a { padding: 0.85rem 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav-cta { text-align: center; margin-top: 0.75rem; }
  body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .about-grid,
  .ceo-grid,
  .chairman-body,
  .offer-list,
  .close-grid,
  .team-intro,
  .person,
  .person-alt {
    grid-template-columns: 1fr;
  }
  .ceo-photo { position: static; }
  .ceo-photo img, .chairman-side img { aspect-ratio: 16/9; }
  .chairman-side { order: -1; max-height: 360px; }
  .chairman-hero img { aspect-ratio: 16/8; }
  .team-forest { height: 180px; }
  .person-photo { max-width: 260px; }
  .benefit-list { grid-template-columns: 1fr; }
  .flagship { padding: 2rem 1.4rem; border-radius: 1.5rem; }
  .hero { min-height: min(86vh, 720px); }
  .hero-inner { margin-bottom: 2.25rem; }
  .section { padding: 3.25rem 0; }
  .wrap { width: min(var(--max), calc(100% - 1.75rem)); }
}

@media (max-width: 520px) {
  .brand img { width: 140px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; }
  .contact-card { padding: 1.6rem 1.3rem; border-radius: 1.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
