/* ============================================================
   KazSulFert LLP — Design System
   Industrial sulphur & sulphuric acid trading + logistics
   Surface: Decide/Learn (corporate credibility), light, yellow-first
   ============================================================ */

:root {
  /* Brand */
  --yellow:        #F5A800;
  --yellow-deep:   #D98E00;
  --yellow-light:  #FFC93C;
  --yellow-pale:   #FFF6E0;
  --green:         #006024;
  --green-deep:    #00481B;
  --green-light:   #2E8B46;
  --green-pale:    #EAF4EC;
  --blue:          #005490;
  --blue-light:    #48B4E4;
  --blue-pale:     #EAF2F9;

  /* Neutrals (warm, industrial) */
  --ink:        #1A1B16;
  --ink-soft:   #3A3C34;
  --muted:      #6C6F65;
  --silver:     #B9BDB4;
  --silver-dark:#8B8F85;
  --paper:      #FFFFFF;
  --paper-2:    #F6F6F1;
  --line:       #E6E7DF;
  --line-strong:#D2D4CA;

  /* Type */
  --sans: "Archivo", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", "Cascadia Code", Consolas, monospace;

  /* Rhythm */
  --max: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
  --section: clamp(64px, 9vw, 120px);
  --radius: 4px;
  --radius-lg: 10px;

  --shadow-sm: 0 1px 2px rgba(26,27,22,.06);
  --shadow-md: 0 8px 24px rgba(26,27,22,.08);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

/* ---------- Typography ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 3px;
  background: var(--yellow);
  flex: none;
}

h1, h2, h3 { font-weight: 800; line-height: 1.05; letter-spacing: -.025em; color: var(--ink); }
h1 { font-size: clamp(40px, 6.4vw, 76px); }
.hero h1 { font-size: clamp(28px, 4.5vw, 53px); }
h2 { font-size: clamp(30px, 4.2vw, 52px); }
h3 { font-size: clamp(20px, 2.4vw, 26px); }

.lede {
  font-size: clamp(18px, 2.1vw, 23px);
  line-height: 1.5;
  color: var(--ink-soft);
  font-weight: 400;
}
.body-lg { font-size: 18px; color: var(--ink-soft); }
.muted { color: var(--muted); }

.mono {
  font-family: var(--mono);
  letter-spacing: -.02em;
}

/* ---------- Layout ---------- */
.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section) 0; }
.section--tight { padding: calc(var(--section) * .6) 0; }

.grid { display: grid; gap: var(--gutter); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--12 { grid-template-columns: repeat(12, 1fr); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 84px; gap: 24px;
}
.brand { display: flex; align-items: center; }
.brand img { height: 44px; width: auto; }

.nav { display: flex; align-items: center; gap: 8px; }
.nav a {
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-soft);
  border-radius: var(--radius);
  transition: background .15s, color .15s;
}
.nav a:hover { background: var(--paper-2); color: var(--ink); }
.nav a.is-active { color: var(--ink); }
.nav a.is-active::after { content: ""; display: block; height: 2px; background: var(--yellow); margin-top: 2px; }

/* Products dropdown */
.nav-drop { position: relative; }
.nav-drop-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 14px;
  font-family: var(--sans); font-size: 15px; font-weight: 600;
  color: var(--ink-soft);
  background: none; border: 0; cursor: pointer;
  border-radius: var(--radius);
}
.nav-drop-toggle:hover { background: var(--paper-2); color: var(--ink); }
.nav-drop-toggle.is-active { color: var(--ink); }
.nav-drop-toggle .caret { font-size: 10px; transition: transform .15s; }
.nav-drop.open .nav-drop-toggle .caret { transform: rotate(180deg); }
.nav-drop-menu {
  position: absolute; top: calc(100% + 6px); left: 0;
  min-width: 210px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 6px;
  display: none;
  z-index: 60;
}
.nav-drop.open .nav-drop-menu { display: block; }
.nav-drop-menu a {
  display: block; padding: 10px 14px;
  font-size: 15px; font-weight: 600; color: var(--ink-soft);
  border-radius: 6px;
}
.nav-drop-menu a:hover { background: var(--paper-2); color: var(--ink); }

.header-tools { display: flex; align-items: center; gap: 12px; }

/* Language switcher */
.lang { position: relative; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 14px; font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}
.lang-btn:hover { border-color: var(--silver-dark); }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  min-width: 180px;
  padding: 6px;
  display: none;
  z-index: 60;
}
.lang.open .lang-menu { display: block; }
.lang-menu button {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border: 0; background: none;
  font-family: var(--sans); font-size: 14px; font-weight: 500;
  color: var(--ink); cursor: pointer;
  border-radius: 6px;
  text-align: left;
}
.lang-menu button:hover { background: var(--paper-2); }
.lang-menu button.is-active { background: var(--yellow-pale); font-weight: 700; }
.lang-menu .flag { font-size: 18px; line-height: 1; }

/* Hamburger */
.burger {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  border-radius: var(--radius);
  cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.burger span { display: block; width: 20px; height: 2px; background: var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 26px;
  font-family: var(--sans);
  font-size: 16px; font-weight: 700;
  letter-spacing: -.01em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn--yellow { background: var(--yellow); color: var(--ink); }
.btn--yellow:hover { background: var(--yellow-deep); }
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn--ghost:hover { border-color: var(--ink); background: var(--paper-2); }
.btn--green { background: var(--green); color: #fff; }
.btn--green:hover { background: var(--green-deep); }
.btn .arrow { font-family: var(--mono); }

/* ---------- Hero ---------- */
.hero { padding: clamp(48px, 7vw, 96px) 0 clamp(64px, 9vw, 120px); }
.hero .grid { align-items: center; }
.hero-copy { grid-column: span 7; }
.hero-copy h1 { margin: 22px 0 24px; }
.hero-copy .lede { max-width: 34em; margin-bottom: 34px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-aside { grid-column: span 5; }

/* Hero brand mark panel */
.hero-mark {
  position: relative;
  margin-left: auto;
  max-width: 440px;
  aspect-ratio: 1;
  background: var(--yellow);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 44px;
}
.hero-mark img { width: 56%; }
.hero-mark .formula-row {
  font-family: var(--mono);
  font-size: 20px; font-weight: 600;
  letter-spacing: .05em; color: var(--ink);
}
.hero-mark .formula-row .dot { color: var(--green-deep); }
.hero-mark .mark-tag {
  position: absolute; top: 18px; left: 22px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .16em;
  text-transform: uppercase; color: rgba(26,27,22,.55);
}

/* Formula cards */
.formula-stack { display: flex; flex-direction: column; gap: 16px; }
.f-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px; align-items: center;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  transition: transform .15s, box-shadow .15s;
}
.f-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.f-card .formula {
  font-family: var(--mono);
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.03em;
}
.f-card--s .formula { color: var(--yellow-deep); }
.f-card--a .formula { color: var(--blue); }
.f-card .f-name { font-weight: 800; font-size: 18px; }
.f-card .f-sub { font-size: 14px; color: var(--muted); }
.f-card--s { border-left: 5px solid var(--yellow); }
.f-card--a { border-left: 5px solid var(--blue); }

/* ---------- Products ---------- */
.products { background: var(--paper-2); border-block: 1px solid var(--line); }
.products .sec-head { margin-bottom: 44px; }
.sec-head { max-width: 720px; }
.sec-head h2 { margin-top: 18px; }
.sec-head .lede { margin-top: 16px; }

.product-card {
  display: flex; flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .15s, box-shadow .15s;
}
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.product-card .pc-top { padding: 8px 0; }
.product-card .pc-top.haz {
  height: 8px;
  background: repeating-linear-gradient(-45deg, var(--yellow) 0 12px, var(--ink) 12px 24px);
}
.product-card .pc-top.haz--blue {
  background: repeating-linear-gradient(-45deg, var(--blue) 0 12px, var(--yellow) 12px 24px);
}
.product-card .pc-body { padding: 34px; display: flex; flex-direction: column; gap: 16px; flex: 1; }
.product-card .pc-formula {
  font-family: var(--mono);
  font-size: 40px; font-weight: 600; line-height: 1;
}
.product-card .pc-name { font-size: 24px; font-weight: 800; }
.product-card .pc-desc { color: var(--ink-soft); }
.product-card .pc-link {
  margin-top: auto;
  font-weight: 700; font-size: 15px;
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--ink);
}
.product-card .pc-link .arrow { color: var(--yellow-deep); transition: transform .15s; }
.product-card:hover .pc-link .arrow { transform: translateX(4px); }
.pc--s .pc-formula { color: var(--yellow-deep); }
.pc--a .pc-formula { color: var(--blue); }

/* ---------- Services ---------- */
.service-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.service-row {
  display: grid;
  grid-template-columns: 90px 1fr 1.4fr;
  gap: 24px; align-items: baseline;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.service-row .idx {
  font-family: var(--mono);
  font-size: 15px;
  color: var(--muted);
}
.service-row h3 { font-size: 22px; }
.service-row p { color: var(--ink-soft); }

/* ---------- About strip ---------- */
.about-strip .facts {
  margin-top: 34px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.fact { background: var(--paper); padding: 22px 24px; }
.fact .k { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.fact .v { font-weight: 800; font-size: 18px; margin-top: 6px; }

/* ---------- Photos ---------- */
.photo-band { border-radius: var(--radius-lg); overflow: hidden; }
.photo-band img { width: 100%; height: 100%; object-fit: cover; display: block; }
.page-photo { height: 380px; margin-bottom: 48px; }

.product-card .pc-img { height: 240px; overflow: hidden; }
.product-card .pc-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.product-card:hover .pc-img img { transform: scale(1.04); }

/* ---------- Statement (mission) ---------- */
.statement { padding: 8px 0 8px 32px; border-left: 6px solid var(--yellow); }
.statement .eyebrow { margin-bottom: 18px; }
.statement p {
  font-size: clamp(24px, 3.4vw, 40px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.02em;
  color: var(--ink);
  max-width: 24em;
}

/* ---------- CTA band ---------- */
.cta {
  background: var(--yellow);
  color: var(--ink);
}
.cta h2 { color: var(--ink); }
.cta .lede { color: rgba(26,27,22,.82); }
.cta .container { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.cta .cta-mail {
  font-family: var(--mono);
  font-size: clamp(18px, 2.6vw, 26px);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.cta .btn { background: var(--ink); color: var(--yellow); }
.cta .btn:hover { background: #000; }

/* ---------- Footer ---------- */
.site-footer { background: var(--paper-2); border-top: 1px solid var(--line); padding: 64px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.6fr; gap: 40px; padding-bottom: 48px; }
.footer-brand img { height: 40px; margin-bottom: 16px; }
.footer-brand .tagline { color: var(--muted); max-width: 26ch; }
.site-footer h4 {
  font-family: var(--mono);
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 16px; font-weight: 600;
}
.site-footer ul { list-style: none; }
.site-footer ul li { margin-bottom: 10px; }
.site-footer ul a { color: var(--ink-soft); font-size: 15px; }
.site-footer ul a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.footer-contact li { font-size: 15px; color: var(--ink-soft); margin-bottom: 10px; }
.footer-contact .k { font-family: var(--mono); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; display: block; }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 22px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 13px; color: var(--muted);
}
.footer-bottom .mono { color: var(--muted); }

/* ---------- Page header (inner pages) ---------- */
.page-head { padding: 56px 0 40px; border-bottom: 1px solid var(--line); background: var(--paper-2); }
.breadcrumb { font-family: var(--mono); font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb .sep { margin: 0 8px; color: var(--silver); }
.page-head h1 { margin-bottom: 18px; }
.page-head .lede { max-width: 52em; }

/* ---------- Prose / content sections ---------- */
.content-section { padding: 64px 0; border-bottom: 1px solid var(--line); }
.content-section:last-of-type { border-bottom: 0; }
.content-section .grid--12 { gap: var(--gutter); }
.cs-title { grid-column: span 4; }
.cs-body { grid-column: span 8; }
.cs-title h2 { font-size: clamp(26px, 3.2vw, 40px); }
.cs-body p { margin-bottom: 18px; color: var(--ink-soft); font-size: 18px; }
.cs-body p:last-child { margin-bottom: 0; }

.uses-list { list-style: none; margin-top: 8px; }
.uses-list li {
  display: flex; gap: 14px; align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 18px; font-weight: 600;
}
.uses-list li::before {
  content: "";
  width: 8px; height: 8px;
  background: var(--yellow);
  flex: none;
  transform: translateY(-2px);
}
.uses-list li:last-child { border-bottom: 0; }

/* ---------- Contact ---------- */
.contact-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.c-card { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.c-card h3 { font-size: 18px; margin-bottom: 12px; }
.c-card .c-line { margin-bottom: 6px; color: var(--ink-soft); }
.c-card .c-label { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.bank-table { width: 100%; border-collapse: collapse; margin-top: 16px; }
.bank-table td { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; vertical-align: top; }
.bank-table td:first-child { color: var(--muted); font-family: var(--mono); font-size: 13px; width: 40%; padding-right: 16px; }
.bank-table tr:last-child td { border-bottom: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid--2 { grid-template-columns: 1fr; }
  .hero-copy, .hero-aside { grid-column: span 12; }
  .hero-aside { margin-top: 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .service-row { grid-template-columns: 60px 1fr; }
  .service-row p { grid-column: 2; }
  .facts { grid-template-columns: 1fr 1fr; }
  .cs-title, .cs-body { grid-column: span 12; }
  .cs-title { margin-bottom: 20px; }
}

@media (max-width: 720px) {
  .nav {
    position: fixed; inset: 84px 0 auto 0;
    flex-direction: column; align-items: stretch;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 12px var(--gutter) 20px;
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 6px; border-bottom: 1px solid var(--line); }
  .nav-drop-toggle { padding: 14px 6px; width: 100%; justify-content: space-between; border-bottom: 1px solid var(--line); }
  .nav-drop-menu { position: static; box-shadow: none; border: 0; min-width: 0; padding: 0 0 0 14px; }
  .burger { display: flex; }
  .contact-cards { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .facts { grid-template-columns: 1fr; }
}

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

/* ---------- Focus ---------- */
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 2px;
}

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