/* ============================================================
   KH GLOBAL TRADING FZE — Design System
   Palette: signal red / near-black / steel / warning amber
   Type: Space Grotesk (display) + IBM Plex Sans (body) + IBM Plex Mono (spec/labels)
   Signature: hazard-stripe dividers + inspection-tag corner folds
   ============================================================ */

:root {
  --ink: #0a0a0b;
  --ink-2: #141416;
  --ink-3: #1c1c1f;
  --line: #2a2a2e;
  --paper: #f2f0ea;
  --paper-2: #e8e5dc;
  --red: #c4122f;
  --red-dark: #7a0e1f;
  --red-bright: #e2233f;
  --amber: #e8a93a;
  --steel: #9aa0aa;
  --steel-dark: #565a62;
  --white: #f6f5f2;

  --font-display: 'Space Grotesk', 'Arial Narrow', sans-serif;
  --font-body: 'IBM Plex Sans', -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  --max: 1200px;
  --radius: 2px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

body {
  background: var(--ink);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

ul { list-style: none; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 32px;
}

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

/* ---------- Hazard stripe signature element ---------- */
.hazard-bar {
  height: 10px;
  width: 100%;
  background: repeating-linear-gradient(
    -45deg,
    var(--ink) 0px, var(--ink) 16px,
    var(--red) 16px, var(--red) 32px
  );
}
.hazard-bar--thin { height: 6px; }

/* ---------- Eyebrow / mono labels ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--red-bright);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: '';
  width: 22px;
  height: 2px;
  background: var(--red-bright);
}
.eyebrow--dark { color: var(--red); }

/* ================= NAV ================= */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10, 10, 11, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}
.nav.scrolled { background: rgba(10, 10, 11, 0.92); }

.nav__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand__mark { width: 40px; height: 40px; object-fit: contain; }
.brand__text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.02em;
  line-height: 1.15;
}
.brand__tag {
  display: block;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  color: var(--steel);
  text-transform: uppercase;
  margin-top: 2px;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 36px;
}
.nav__links a {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--steel);
  position: relative;
  padding: 4px 0;
  transition: color 0.2s;
}
.nav__links a:hover { color: var(--white); }
.nav__links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--red-bright);
  transition: width 0.25s var(--ease);
}
.nav__links a:hover::after { width: 100%; }

.nav__cta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.btn--sm { padding: 9px 18px; font-size: 11.5px; }
.btn--primary {
  background: var(--red);
  color: var(--white);
  border: 1px solid var(--red);
  box-shadow: 0 0 0 0 rgba(196,18,47,0.5);
}
.btn--primary:hover {
  background: var(--red-bright);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px -8px rgba(196,18,47,0.7);
}
.btn--outline {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.25);
}
.btn--outline:hover {
  border-color: var(--white);
  transform: translateY(-2px);
}
.btn--outline-dark {
  background: transparent;
  color: var(--ink);
  border: 1px solid rgba(10,10,11,0.3);
}
.btn--outline-dark:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
}
.btn--whatsapp {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.25);
}
.btn--whatsapp:hover { border-color: var(--red-bright); color: var(--red-bright); transform: translateY(-2px); }
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
}
.nav__toggle span {
  height: 2px;
  background: var(--white);
  transition: transform 0.25s var(--ease), opacity 0.25s;
}
.nav__toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.active span:nth-child(2) { opacity: 0; }
.nav__toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ================= HERO ================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 140px 0 90px;
  overflow: hidden;
  background: var(--ink);
}

.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 65% at 60% 40%, black 30%, transparent 78%);
  animation: gridDrift 40s linear infinite;
}
@keyframes gridDrift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 96px 48px, 48px 96px; }
}

.hero__glow {
  position: absolute;
  top: -10%;
  right: -8%;
  width: 620px;
  height: 620px;
  background: radial-gradient(circle, rgba(196,18,47,0.28) 0%, rgba(196,18,47,0) 70%);
  filter: blur(10px);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 2;
  max-width: 780px;
}

.hero__eyebrow {
  margin-bottom: 26px;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(38px, 5.6vw, 68px);
  line-height: 1.06;
  letter-spacing: -0.01em;
  margin-bottom: 26px;
}
.hero h1 em {
  font-style: normal;
  color: var(--red-bright);
}

.hero__sub {
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--steel);
  max-width: 560px;
  margin-bottom: 44px;
  line-height: 1.7;
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 64px;
}

.hero__meta {
  display: flex;
  gap: 40px;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.1);
  max-width: 620px;
}
.hero__meta-item {
  font-family: var(--font-mono);
}
.hero__meta-item .k {
  display: block;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel-dark);
  margin-bottom: 6px;
}
.hero__meta-item .v {
  font-size: 14px;
  color: var(--white);
  letter-spacing: 0.02em;
}

/* ================= VISION ================= */
.vision {
  background: var(--paper);
  color: var(--ink);
  padding: 120px 0;
  position: relative;
}
.vision__inner {
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
}
.vision .eyebrow { justify-content: center; margin-bottom: 30px; }
.vision blockquote {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(24px, 3.4vw, 38px);
  line-height: 1.42;
  letter-spacing: -0.005em;
  color: var(--ink);
}
.vision blockquote span { color: var(--red); }

/* ================= PRODUCTS ================= */
.products {
  background: var(--ink);
  padding: 120px 0;
}
.products__head {
  max-width: 640px;
  margin-bottom: 64px;
}
.products__head .eyebrow { margin-bottom: 22px; }
.products__head h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(30px, 3.8vw, 46px);
  line-height: 1.1;
  margin-bottom: 20px;
}
.products__head p {
  color: var(--steel);
  font-size: 16px;
  line-height: 1.75;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.card {
  position: relative;
  background: var(--ink-2);
  padding: 40px 34px;
  transition: background 0.3s var(--ease);
}
.card:hover { background: var(--ink-3); }

/* inspection-tag corner fold — signature detail */
.card::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 0; height: 0;
  border-style: solid;
  border-width: 0 26px 26px 0;
  border-color: transparent var(--red) transparent transparent;
  transition: border-color 0.3s var(--ease);
}
.card__num {
  position: absolute;
  top: 6px; right: 6px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--white);
  z-index: 1;
  letter-spacing: 0.05em;
}

.card__icon {
  width: 46px;
  height: 46px;
  color: var(--red-bright);
  margin-bottom: 26px;
}
.card__icon svg { width: 100%; height: 100%; }

.card h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.005em;
}
.card p {
  color: var(--steel);
  font-size: 14.5px;
  line-height: 1.65;
  margin-bottom: 22px;
}

.card__toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  border-top: 1px solid rgba(255,255,255,0.14);
  padding-top: 16px;
  width: 100%;
}
.card__toggle svg {
  width: 12px; height: 12px;
  transition: transform 0.3s var(--ease);
}
.card.open .card__toggle svg { transform: rotate(45deg); }

.card__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s var(--ease);
}
.card__panel-inner { overflow: hidden; }
.card.open .card__panel { grid-template-rows: 1fr; }

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 20px;
}
.pill {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.03em;
  padding: 7px 12px;
  border: 1px solid rgba(255,255,255,0.14);
  color: var(--steel);
  border-radius: 20px;
}

.card--ecom p.long {
  color: var(--steel);
  font-size: 14.5px;
  line-height: 1.75;
  padding-top: 4px;
}

/* ================= CONTACT ================= */
.contact {
  background: var(--paper);
  color: var(--ink);
  padding: 120px 0;
}
.contact__grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 80px;
}
.contact__intro h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.12;
  margin: 22px 0 20px;
}
.contact__intro p {
  color: var(--steel-dark);
  font-size: 15.5px;
  line-height: 1.75;
  margin-bottom: 44px;
  max-width: 420px;
}

.contact-tags { display: flex; flex-direction: column; gap: 14px; }
.contact-tag {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: rgba(10,10,11,0.04);
  border: 1px solid rgba(10,10,11,0.12);
  border-left: 3px solid var(--red);
  transition: background 0.2s, transform 0.2s var(--ease);
}
.contact-tag:hover { background: rgba(10,10,11,0.07); transform: translateX(4px); }
.contact-tag__icon {
  width: 20px; height: 20px;
  color: var(--red);
  flex-shrink: 0;
}
.contact-tag__icon svg { width: 100%; height: 100%; }
.contact-tag .k {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel-dark);
  margin-bottom: 3px;
}
.contact-tag .v { font-size: 14.5px; font-weight: 500; }

.form {
  background: var(--ink);
  color: var(--white);
  padding: 44px;
  position: relative;
}
.form::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 0; height: 0;
  border-style: solid;
  border-width: 0 30px 30px 0;
  border-color: transparent var(--red) transparent transparent;
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.field { margin-bottom: 18px; display: flex; flex-direction: column; gap: 8px; }
.field label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--steel);
}
.field input,
.field select,
.field textarea {
  background: var(--ink-2);
  border: 1px solid var(--line);
  color: var(--white);
  padding: 13px 14px;
  font-family: var(--font-body);
  font-size: 14.5px;
  border-radius: var(--radius);
  transition: border-color 0.2s;
  width: 100%;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--red-bright);
  outline: none;
}
.field textarea { resize: vertical; min-height: 100px; }
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%239aa0aa'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.form__note {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--steel-dark);
  margin-top: 16px;
  line-height: 1.6;
}
.form__status {
  font-family: var(--font-mono);
  font-size: 12px;
  margin-top: 14px;
  color: var(--amber);
  min-height: 16px;
}

/* ================= FOOTER ================= */
.footer {
  background: var(--ink-2);
  padding: 48px 0;
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}
.footer__brand { display: flex; align-items: center; gap: 12px; }
.footer__brand img { width: 32px; height: 32px; object-fit: contain; }
.footer__brand span {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--steel);
  text-transform: uppercase;
}
.footer__links { display: flex; gap: 32px; }
.footer__links a {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--steel);
  transition: color 0.2s;
}
.footer__links a:hover { color: var(--white); }
.footer__copy {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--steel-dark);
  letter-spacing: 0.04em;
}

/* ================= Scroll reveal ================= */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ================= Responsive ================= */
@media (max-width: 980px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .contact__grid { grid-template-columns: 1fr; gap: 56px; }
  .form__row { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .nav__links { display: none; }
  .nav__toggle { display: flex; }
  .nav__cta .btn--outline { display: none; }
  .nav.open .nav__links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: rgba(10,10,11,0.98);
    padding: 24px 32px 32px;
    gap: 22px;
    border-bottom: 1px solid var(--line);
  }
  .hero { padding-top: 120px; }
  .hero__meta { flex-wrap: wrap; gap: 24px; }
  .grid { grid-template-columns: 1fr; }
  .wrap { padding: 0 20px; }
  .form { padding: 30px 24px; }
  .vision { padding: 90px 0; }
  .products, .contact { padding: 90px 0; }
}
