/* =========================================================
   Xavion Commodity Trading & Financing Limited
   Stylesheet — vanilla CSS, mobile-first responsive
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
  --color-slate: #4b545a;       /* dark section backgrounds, footer, logo accent */
  --color-slate-dark: #3a4247;
  --color-near-black: #16191c;  /* sustainability / ethical policy overlay */
  --color-teal: #4f7f98;        /* nav links, outlined buttons */
  --color-teal-bright: #57abbf; /* service icon circles */
  --color-red: #c41c2f;         /* primary CTA buttons */
  --color-red-dark: #a41727;
  --color-light-gray: #eff0f1;  /* contact section background */
  --color-white: #ffffff;
  --color-text: #2c2f33;
  --color-text-muted: #5b6167;
  --color-border: #d8dbdd;

  --font-heading: "Poppins", "Segoe UI", sans-serif;
  --font-body: "Nunito Sans", "Segoe UI", sans-serif;

  --max-width: 1200px;
  --section-pad-y: clamp(48px, 8vw, 96px);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  line-height: 1.65;
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.5em;
}
p { margin: 0 0 1em; }
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 4px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn-red {
  background: var(--color-red);
  color: var(--color-white);
}
.btn-red:hover { background: var(--color-red-dark); }

.btn-outline-white {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.85);
  color: var(--color-white);
}
.btn-outline-white:hover { background: rgba(255, 255, 255, 0.12); }

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

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-white);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 84px;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand img {
  width: 44px;
  height: 44px;
}
.brand-text {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.2;
  color: var(--color-slate-dark);
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.main-nav {
  display: flex;
  align-items: center;
}
.main-nav ul {
  display: flex;
  gap: clamp(16px, 2.4vw, 32px);
}
.main-nav a {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--color-teal);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.main-nav a:hover,
.main-nav a[aria-current="page"] {
  border-bottom-color: var(--color-teal);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: none;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-slate-dark);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero (interior pages) ---------- */
.page-hero {
  position: relative;
  min-height: 340px;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
  color: var(--color-white);
}
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 18, 20, 0.15) 0%, rgba(15, 18, 20, 0.55) 100%);
}
.page-hero .container {
  position: relative;
  z-index: 1;
  padding-bottom: 40px;
}
.page-hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0;
}

/* ---------- Home hero ---------- */
.home-hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  color: var(--color-white);
}
.home-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10, 14, 16, 0.6) 0%, rgba(10, 14, 16, 0.25) 55%, rgba(10, 14, 16, 0.15) 100%);
}
.home-hero .container { position: relative; z-index: 1; }
.home-hero .eyebrow-title {
  font-size: clamp(2.4rem, 7vw, 4.2rem);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.1em;
}
.home-hero .sub-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: clamp(1.3rem, 3.4vw, 1.9rem);
  margin-bottom: 0.6em;
  max-width: 620px;
}
.home-hero .tagline {
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.95rem;
  margin-bottom: 2em;
  opacity: 0.95;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* ---------- Generic sections ---------- */
section { padding: var(--section-pad-y) 0; }
.section-slate { background: var(--color-slate); color: var(--color-white); }
.section-near-black {
  position: relative;
  color: var(--color-white);
  background-size: cover;
  background-position: center;
}
.section-near-black::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(10, 12, 14, 0.72);
}
.section-near-black .container { position: relative; z-index: 1; }
.section-light-gray { background: var(--color-light-gray); }

.section-heading {
  text-transform: uppercase;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}
.text-center { text-align: center; }
.lede {
  max-width: 820px;
  font-size: 1.08rem;
}
.lede.text-center { margin-left: auto; margin-right: auto; }

/* ---------- Split (image + text) layout ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
}
.split-text {
  padding: clamp(32px, 5vw, 64px) clamp(24px, 5vw, 64px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.split-image {
  min-height: 260px;
  background-size: cover;
  background-position: center;
}
@media (min-width: 800px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split.reverse .split-text { order: 2; }
  .split.reverse .split-image { order: 1; }
}

/* ---------- About Us (home) ---------- */
.about-home p { max-width: 780px; margin-left: auto; margin-right: auto; }

/* ---------- Products grid (home teaser) ---------- */
.products-teaser {
  position: relative;
  background: var(--color-near-black) center/cover no-repeat;
  color: var(--color-white);
}
.products-teaser::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(8, 9, 10, 0.82);
}
.products-teaser .container { position: relative; z-index: 1; }
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin: 40px 0;
}
@media (min-width: 700px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
}
.product-card { text-align: center; }
.product-card .thumb {
  aspect-ratio: 16 / 13;
  overflow: hidden;
  border-radius: 4px;
  margin-bottom: 14px;
}
.product-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.product-card:hover img { transform: scale(1.06); }
.product-card .name {
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.95rem;
}

/* ---------- Services teaser (home) ---------- */
.services-teaser {
  background-size: cover;
  background-position: right center;
}
.services-teaser .grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
}
@media (min-width: 800px) {
  .services-teaser .grid { grid-template-columns: 1.3fr 1fr; }
}
.service-icon-list li {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.15rem;
}
.service-icon-list .icon-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--color-teal-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.service-icon-list svg { width: 24px; height: 24px; stroke: var(--color-white); fill: none; }

/* ---------- Contact section ---------- */
.contact-form {
  max-width: 760px;
  margin: 40px auto 0;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
@media (min-width: 640px) {
  .form-row.two-col { grid-template-columns: 1fr 1fr; }
}
.field label {
  display: block;
  font-family: var(--font-heading);
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--color-text);
}
.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--color-white);
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--color-teal);
  box-shadow: 0 0 0 3px rgba(79, 127, 152, 0.18);
}
.form-actions { text-align: center; margin-top: 8px; }
.form-note {
  border: none;
  background: transparent;
  font-family: var(--font-body);
  padding: 0;
  margin-top: 16px;
  text-align: center;
  font-size: 0.95rem;
}
.form-note.success { color: #1c7c3f; }
.form-note.error { color: var(--color-red); }

/* ---------- About page sections ---------- */
.sustainability-section blockquote {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 600;
  border-left: 3px solid var(--color-teal-bright);
  padding-left: 20px;
  margin: 1.6em 0;
}
.ethical-section blockquote {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  margin-top: 1.6em;
}

/* ---------- Services page numbered blocks ---------- */
.service-block {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
  padding: 40px 0;
  border-bottom: 1px solid var(--color-border);
}
.service-block:last-child { border-bottom: none; }
.service-block img { border-radius: 4px; width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; }
.service-block .index {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 2.6rem;
  color: var(--color-text);
  line-height: 1;
  margin-bottom: 0.1em;
}
.service-block h3 {
  font-size: 1.8rem;
  text-transform: none;
  font-weight: 500;
}
.service-block .subhead {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-slate-dark);
  margin-bottom: 0.6em;
}
@media (min-width: 760px) {
  .service-block { grid-template-columns: 0.9fr 1.4fr; gap: 48px; }
}

/* ---------- Products page listing ---------- */
.product-listing {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.product-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding: 32px 0;
  border-bottom: 1px solid var(--color-border);
}
.product-row:last-child { border-bottom: none; }
.product-row img { border-radius: 4px; width: 100%; height: 220px; object-fit: cover; }
.product-row h3 {
  text-transform: uppercase;
  font-size: 1.4rem;
  margin-bottom: 0.5em;
}
.product-row dl { margin: 0; }
.product-row dt {
  font-weight: 700;
  display: inline;
}
.product-row dd {
  display: inline;
  margin: 0;
}
.product-row .spec { margin-bottom: 0.5em; font-size: 0.98rem; color: var(--color-text-muted); }
@media (min-width: 760px) {
  .product-row { grid-template-columns: 260px 1fr; gap: 36px; align-items: start; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-slate);
  color: rgba(255, 255, 255, 0.85);
  padding: 56px 0 32px;
}
.footer-nav ul {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(16px, 3vw, 36px);
  margin-bottom: 24px;
}
.footer-nav a {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-white);
}
.footer-nav a:hover { color: var(--color-teal-bright); }
.footer-contact-icons {
  display: flex;
  justify-content: center;
  gap: 22px;
  margin-bottom: 28px;
}
.footer-contact-icons a {
  width: 22px;
  height: 22px;
  opacity: 0.85;
}
.footer-contact-icons svg { width: 100%; height: 100%; stroke: var(--color-white); fill: none; }
.footer-meta {
  text-align: center;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.9;
}

/* ---------- Mobile nav ---------- */
@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed;
    top: 84px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-white);
    transform: translateX(100%);
    transition: transform 0.28s ease;
    align-items: flex-start;
    padding: 32px 24px;
    overflow-y: auto;
  }
  .main-nav.open { transform: translateX(0); }
  .main-nav ul { flex-direction: column; gap: 4px; width: 100%; }
  .main-nav a { display: block; padding: 14px 4px; border-bottom: 1px solid var(--color-border); font-size: 1.1rem; }
  .brand-text { font-size: 0.88rem; }
}

@media (max-width: 480px) {
  .brand img { width: 36px; height: 36px; }
}
