/* ============================================
   AMSA General Trading — Design Tokens
   ============================================ */
:root {
  /* Color */
  --ink: #14213D;          /* primary navy */
  --ink-deep: #0D1730;     /* darker navy for footer/hero depth */
  --wheat: #C9A15C;        /* commodity-gold accent */
  --wheat-deep: #A8823F;   /* hover/active accent */
  --paper: #FAF8F4;        /* warm paper background */
  --paper-dim: #F1EDE3;    /* section alternation */
  --line: #DCD5C4;         /* hairline rule on paper */
  --line-dark: rgba(250, 248, 244, 0.18); /* hairline rule on navy */
  --ink-text: #1F2126;     /* body copy */
  --ink-muted: #5B5F6B;    /* secondary copy */
  --paper-text: #F4F1E9;   /* copy on navy */
  --paper-muted: #B9C0D4;  /* secondary copy on navy */

  /* Type */
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Layout */
  --max: 1180px;
  --gutter: clamp(20px, 5vw, 64px);
  --radius: 3px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink-text);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
  color: var(--ink);
  letter-spacing: -0.01em;
}

p { margin: 0; }

::selection { background: var(--wheat); color: var(--ink-deep); }

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

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.85em 1.6em;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--wheat);
  color: var(--ink-deep);
  border-color: var(--wheat);
}
.btn-primary:hover { background: var(--wheat-deep); border-color: var(--wheat-deep); }

.btn-ghost {
  background: transparent;
  color: var(--paper-text);
  border-color: var(--line-dark);
}
.btn-ghost:hover { border-color: var(--wheat); color: var(--wheat); }

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-outline:hover { background: var(--ink); color: var(--paper-text); }

/* ============================================
   Header
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--ink-deep);
  border-bottom: 1px solid var(--line-dark);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.brand img { height: 40px; width: auto; }
.brand-name {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--paper-text);
  line-height: 1.2;
}
.brand-name small {
  display: block;
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--paper-muted);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 2.1rem;
}
.main-nav a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--paper-muted);
  transition: color 150ms ease;
  padding: 0.3rem 0;
  border-bottom: 1px solid transparent;
}
.main-nav a:hover { color: var(--paper-text); border-color: var(--wheat); }

.header-cta { display: flex; align-items: center; gap: 1.5rem; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--paper-text);
}
.nav-toggle svg { width: 24px; height: 24px; }

/* ============================================
   Hero
   ============================================ */
.hero {
  background: var(--ink-deep);
  color: var(--paper-text);
  position: relative;
  overflow: hidden;
  padding: clamp(56px, 9vw, 104px) 0 clamp(48px, 7vw, 80px);
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.hero-eyebrow {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--wheat);
  margin-bottom: 1.1rem;
  letter-spacing: 0.02em;
}

.hero h1 {
  font-size: clamp(2.1rem, 4.2vw, 3.4rem);
  color: var(--paper-text);
  max-width: 15ch;
  opacity: 0;
  transform: translateY(14px);
  animation: rise 700ms cubic-bezier(0.2, 0.7, 0.3, 1) 100ms forwards;
}

.hero-sub {
  margin-top: 1.4rem;
  font-size: 1.06rem;
  color: var(--paper-muted);
  max-width: 46ch;
  opacity: 0;
  transform: translateY(14px);
  animation: rise 700ms cubic-bezier(0.2, 0.7, 0.3, 1) 220ms forwards;
}

.hero-actions {
  margin-top: 2.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  opacity: 0;
  transform: translateY(14px);
  animation: rise 700ms cubic-bezier(0.2, 0.7, 0.3, 1) 340ms forwards;
}

@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

.hero-art {
  position: relative;
}
.hero-art svg { width: 100%; height: auto; }

.hero-stats {
  margin-top: 2.6rem;
  display: flex;
  gap: clamp(20px, 4vw, 44px);
  border-top: 1px solid var(--line-dark);
  padding-top: 1.6rem;
}
.hero-stat b {
  display: block;
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--paper-text);
}
.hero-stat span {
  font-size: 0.8rem;
  color: var(--paper-muted);
}

/* ============================================
   Section scaffolding
   ============================================ */
section { padding: clamp(56px, 8vw, 96px) 0; }
.alt { background: var(--paper-dim); }

.section-head {
  max-width: 640px;
  margin-bottom: clamp(32px, 5vw, 52px);
}
.section-tag {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--wheat-deep);
  margin-bottom: 0.7rem;
}
.section-head h2 {
  font-size: clamp(1.7rem, 3vw, 2.35rem);
}
.section-head p {
  margin-top: 1rem;
  color: var(--ink-muted);
  font-size: 1.02rem;
  max-width: 60ch;
}

.rule {
  border: none;
  border-top: 1px solid var(--line);
  margin: 0;
}

/* ============================================
   About section
   ============================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 72px);
  align-items: start;
}
.about-copy p + p { margin-top: 1.1rem; }
.about-copy { color: var(--ink-muted); font-size: 1.02rem; }

.market-list {
  list-style: none;
  padding: 0;
  margin: 1.6rem 0 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem 1.2rem;
}
.market-list li {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  font-size: 0.95rem;
  color: var(--ink);
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--line);
}
.market-list li::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--wheat-deep);
  flex-shrink: 0;
}

.service-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.service-list li {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 0.9rem;
  font-size: 0.98rem;
  color: var(--ink);
}
.service-list li:first-child { border-top: 1px solid var(--line); }
.service-list li::before {
  content: "";
  width: 6px; height: 6px;
  margin-top: 0.55rem;
  border-radius: 50%;
  background: var(--wheat-deep);
  flex-shrink: 0;
}

/* ============================================
   Products
   ============================================ */
.product-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: clamp(28px, 4vw, 40px);
  border-bottom: 1px solid var(--line);
  padding-bottom: 0;
}
.product-tab {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-muted);
  background: none;
  border: none;
  padding: 0.7rem 1rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transform: translateY(1px);
  transition: color 150ms ease, border-color 150ms ease;
}
.product-tab:hover { color: var(--ink); }
.product-tab[aria-selected="true"] {
  color: var(--ink);
  border-bottom-color: var(--wheat-deep);
}

.product-panel { display: none; }
.product-panel.active { display: block; }

.product-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(28px, 5vw, 56px);
  align-items: start;
}
.product-layout h3 {
  font-size: 1.5rem;
  margin-bottom: 0.9rem;
}
.product-layout > div:first-child p {
  color: var(--ink-muted);
  font-size: 1rem;
}
.product-layout > div:first-child p + p { margin-top: 0.9rem; }

.feature-list {
  list-style: none;
  margin: 1.6rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.55rem 1.2rem;
}
.feature-list li {
  font-size: 0.92rem;
  color: var(--ink);
  padding-left: 1.1rem;
  position: relative;
}
.feature-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.5em;
  width: 6px; height: 1.5px;
  background: var(--wheat-deep);
}

.product-panel .btn-outline {
  margin-top: 1.8rem;
}

.product-card {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: clamp(20px, 3vw, 30px);
}
.product-card-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--wheat-deep);
  margin-bottom: 0.8rem;
}
.product-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.product-card li {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
  color: var(--ink-muted);
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
}
.product-card li:last-child { border-bottom: none; }

/* ============================================
   Why choose us
   ============================================ */
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.why-item {
  background: var(--paper);
  padding: clamp(24px, 3vw, 34px);
}
.why-index {
  font-family: var(--serif);
  font-size: 0.85rem;
  color: var(--wheat-deep);
  margin-bottom: 0.9rem;
}
.why-item h3 {
  font-size: 1.12rem;
  margin-bottom: 0.6rem;
}
.why-item p {
  color: var(--ink-muted);
  font-size: 0.94rem;
}

/* ============================================
   Export markets / logistics
   ============================================ */
.markets-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(32px, 5vw, 64px);
}
.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.pill {
  font-size: 0.86rem;
  font-weight: 500;
  padding: 0.5em 1em;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--paper);
}

.capability-list {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: 2rem;
}
.capability-list li {
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.94rem;
  break-inside: avoid;
}

.logistics-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.logistics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem;
}
.logistics-tag {
  border: 1px solid var(--line-dark);
  padding: 0.9rem 1rem;
  font-size: 0.9rem;
  color: var(--paper-text);
}

.section-dark {
  background: var(--ink-deep);
  color: var(--paper-text);
}
.section-dark .section-head p { color: var(--paper-muted); }
.section-dark h2, .section-dark h3 { color: var(--paper-text); }

/* ============================================
   Certifications
   ============================================ */
.cert-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}
.cert-chip {
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.7em 1.2em;
  border: 1.5px solid var(--ink);
  color: var(--ink);
}

/* ============================================
   RFQ
   ============================================ */
.rfq-layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}
.rfq-copy p { color: var(--ink-muted); font-size: 1.02rem; }
.rfq-copy p + p { margin-top: 1rem; }

.rfq-list {
  list-style: none;
  margin: 1.6rem 0 0;
  padding: 0;
}
.rfq-list li {
  padding: 0.6rem 0 0.6rem 1.6rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
  position: relative;
  counter-increment: rfq;
}
.rfq-list { counter-reset: rfq; }
.rfq-list li::before {
  content: counter(rfq, decimal-leading-zero);
  position: absolute;
  left: 0;
  font-family: var(--serif);
  font-size: 0.78rem;
  color: var(--wheat-deep);
  top: 0.75rem;
}

.rfq-form {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: clamp(24px, 3vw, 36px);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.field {
  margin-bottom: 1.1rem;
}
.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.4rem;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 0.95rem;
  padding: 0.7em 0.85em;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-text);
  border-radius: var(--radius);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--wheat-deep);
}
.field textarea { resize: vertical; min-height: 90px; }
.rfq-form .btn-primary { width: 100%; justify-content: center; margin-top: 0.4rem; }
.form-note {
  font-size: 0.8rem;
  color: var(--ink-muted);
  margin-top: 0.9rem;
  text-align: center;
}

/* ============================================
   Testimonials
   ============================================ */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 32px);
}
.testimonial {
  padding: 1.8rem 0 0;
  border-top: 2px solid var(--ink);
}
.testimonial p {
  font-family: var(--serif);
  font-size: 1.08rem;
  color: var(--ink);
  line-height: 1.5;
}
.testimonial-mark {
  font-size: 0.82rem;
  color: var(--ink-muted);
  margin-top: 1.2rem;
}

/* ============================================
   Final CTA
   ============================================ */
.final-cta {
  background: var(--ink-deep);
  color: var(--paper-text);
  text-align: left;
}
.final-cta .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}
.final-cta h2 { color: var(--paper-text); max-width: 20ch; }
.final-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
  background: var(--ink-deep);
  color: var(--paper-muted);
  padding: clamp(48px, 6vw, 72px) 0 28px;
  border-top: 1px solid var(--line-dark);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: clamp(28px, 5vw, 56px);
  padding-bottom: 2.4rem;
  border-bottom: 1px solid var(--line-dark);
}
.footer-brand { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 1rem; }
.footer-brand img { height: 32px; }
.footer-brand span { font-family: var(--serif); color: var(--paper-text); font-size: 1.05rem; }
.footer-col h4 {
  color: var(--paper-text);
  font-size: 0.9rem;
  font-family: var(--sans);
  font-weight: 600;
  margin-bottom: 1rem;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 0.65rem; font-size: 0.92rem; }
.footer-col a:hover { color: var(--wheat); }
.footer-col p { font-size: 0.92rem; margin-bottom: 0.5rem; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.8rem;
  padding-top: 1.6rem;
  font-size: 0.82rem;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 900px) {
  .main-nav { display: none; }
  .header-cta .btn-outline { display: none; }
  .nav-toggle { display: inline-flex; }

  .hero .wrap { grid-template-columns: 1fr; }
  .hero-art { order: -1; max-width: 240px; margin: 0 auto 8px; }

  .about-grid,
  .product-layout,
  .markets-layout,
  .logistics-layout,
  .rfq-layout { grid-template-columns: 1fr; }

  .why-grid { grid-template-columns: 1fr; }
  .testimonial-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .capability-list { columns: 1; }
  .form-row { grid-template-columns: 1fr; }
  .market-list { grid-template-columns: 1fr; }
  .feature-list { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .site-header .wrap { height: 72px; }
  .brand img { height: 34px; }
  .hero-stats { flex-wrap: wrap; row-gap: 1.2rem; }
  .final-cta .wrap { flex-direction: column; align-items: flex-start; }
}

/* Mobile nav drawer */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--ink-deep);
  z-index: 200;
  padding: var(--gutter);
  flex-direction: column;
}
.mobile-nav.open { display: flex; }
.mobile-nav-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
}
.mobile-nav-top img { height: 36px; }
.mobile-nav-close {
  background: none; border: none; color: var(--paper-text); cursor: pointer; padding: 8px;
}
.mobile-nav-close svg { width: 24px; height: 24px; }
.mobile-nav a {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--paper-text);
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line-dark);
}
.mobile-nav .btn { margin-top: 1.6rem; align-self: flex-start; }
