/* Azhar Food Digital HQ — white day / NeuralOps night */
:root {
  --bg: #ffffff;
  --card: #ffffff;
  --ink: #111111;
  --muted: #5c5c66;
  --accent: #e20a0b;
  --accent-2: #9b2d20;
  --line: #ececec;
  --header: rgba(255, 255, 255, .92);
  --shadow: 0 14px 36px rgba(17, 17, 17, .06);
  --hero-fade: #ffffff;
  --ok: #1f8a55;
  --warn: #c88a3a;
  --cli-bg: #0b1220;
  --radius: 22px;
  --nav-h: 72px;
}
html[data-theme="dark"] {
  --bg: #05070c;
  --card: #0a1428;
  --ink: #d5e2ef;
  --muted: #8aa0b5;
  --accent: #4fd2e8;
  --accent-2: #3d8bff;
  --line: rgba(79, 210, 232, .18);
  --header: rgba(5, 7, 12, .9);
  --shadow: 0 16px 40px rgba(0, 0, 0, .45);
  --hero-fade: #05070c;
  --ok: #4fd2e8;
}
html { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: Inter, system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  overflow-x: clip;
  transition: background .25s ease, color .25s ease;
}
a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; display: block; }
.wrap { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: var(--header);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; gap: 16px;
  min-height: var(--nav-h); padding: 8px 0;
}
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.brand-logo { height: 42px; width: auto; display: block; }
.navlinks { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: .93rem; font-weight: 600; }
.navlinks a { position: relative; }
.navlinks a:hover { color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); cursor: pointer;
  display: grid; place-items: center;
}
.icon-btn:hover { border-color: var(--accent); }
.tt-sun { display: none; }
html[data-theme="light"] .tt-sun, html:not([data-theme]) .tt-sun { display: block; }
html[data-theme="light"] .tt-moon, html:not([data-theme]) .tt-moon { display: none; }
html[data-theme="dark"] .tt-sun { display: none; }
html[data-theme="dark"] .tt-moon { display: block; }
.cart-link { font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.cart-link b {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: 11px;
  display: inline-grid; place-items: center;
}
html[data-theme="dark"] .cart-link b { color: #05070c; }
.menu-toggle { display: none; }
.mobile-nav {
  display: none; border-top: 1px solid var(--line);
  padding: 8px 0 14px;
}
.mobile-nav.open { display: grid; }
.mobile-nav a { padding: 11px 0; border-bottom: 1px solid var(--line); font-weight: 650; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 18px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 700; font-size: .95rem; cursor: pointer; font-family: inherit;
}
.btn.primary { background: var(--accent); color: #fff; }
html[data-theme="dark"] .btn.primary { color: #05070c; }
.btn.ghost { border-color: var(--line); background: var(--card); color: var(--ink); }
.btn:hover { transform: translateY(-1px); }

/* Hero */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: clamp(560px, 78vh, 860px);
  display: flex; align-items: flex-end;
  background: #111;
}
.hero.hero-compact { min-height: clamp(220px, 32vh, 360px); }
.hero.hero-compact h1 { max-width: none; font-size: clamp(1.7rem, 3.4vw, 2.8rem); line-height: 1.08; }
.hero.hero-compact .hero-copy { padding: 48px 0 36px; }
.hero-video, .hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0; pointer-events: none;
  filter: saturate(.92) contrast(1.04) brightness(.78);
}
.hero-bg { background-size: cover; background-position: center; }
.hero-bg { transform: none; }
.hero-shade {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(0deg, var(--hero-fade) 0%, transparent 38%),
    linear-gradient(90deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.18) 70%);
}
.hero-copy { position: relative; z-index: 2; padding: 72px 0 52px; color: #fff; }
.hero .eyebrow { color: rgba(255,255,255,.88); }
.hero h1 { color: #fff; max-width: 14ch; text-shadow: 0 1px 22px rgba(0,0,0,.35); }
.hero .lead { color: rgba(255,255,255,.88); }
.hero .btn.ghost { background: transparent; border-color: rgba(255,255,255,.55); color: #fff; }

.eyebrow {
  text-transform: uppercase; letter-spacing: .18em;
  font-size: .72rem; color: var(--accent); font-weight: 800;
}
h1 { font-size: clamp(2.2rem, 5vw, 4.8rem); line-height: .96; margin: .4rem 0 1rem; letter-spacing: -.04em; }
h2 { font-size: clamp(1.45rem, 2.6vw, 2.2rem); margin: 0 0 12px; letter-spacing: -.03em; }
h3 { margin: 10px 0 6px; letter-spacing: -.02em; }
.lead { max-width: 44rem; font-size: clamp(1rem, 1.3vw, 1.15rem); color: var(--muted); }
.grid { display: grid; gap: 18px; }
.section { padding: 64px 0; }
.section-tint { background: #f6f6f8; }
html[data-theme="dark"] .section-tint { background: #08101c; }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.product-card { display: flex; flex-direction: column; color: inherit; transition: transform .35s cubic-bezier(.16,0,0,1), box-shadow .35s; }
.product-card:hover { transform: translateY(-6px); box-shadow: 0 22px 44px rgba(17,17,17,.12); }
.product-card .thumb { aspect-ratio: 4/3; background: #f2f2f4; overflow: hidden; }
html[data-theme="dark"] .product-card .thumb { background: #0e1a30; }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.product-card:hover .thumb img { transform: scale(1.05); }
.product-card .body { padding: 16px; }
.meta { color: var(--muted); font-size: .92rem; }
.price { font-size: 1.1rem; font-weight: 800; color: var(--accent); }
.pill {
  display: inline-flex; padding: 7px 10px; border-radius: 999px;
  background: #f6ece6; color: #9b2d20; font-size: .78rem; font-weight: 800;
}
html[data-theme="dark"] .pill { background: rgba(79,210,232,.12); color: var(--accent); }

label.field { display: grid; gap: 6px; font-size: .82rem; font-weight: 700; color: var(--muted); }
input, textarea, select {
  width: 100%; border: 1px solid var(--line); background: var(--card);
  border-radius: 14px; padding: 12px 14px; font: inherit; color: var(--ink);
}
textarea { min-height: 110px; resize: vertical; }
.flash {
  margin: 16px 0 0; padding: 12px 16px; border-radius: 14px;
  background: #e8f6ee; color: #14633c; font-weight: 650;
}
.flash.err { background: #fdecec; color: #9b2d20; }
html[data-theme="dark"] .flash { background: rgba(79,210,232,.12); color: var(--accent); }

footer.site-footer {
  padding: 36px 0; border-top: 1px solid var(--line); color: var(--muted);
}
.footer-grid { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.footer-logo { height: 32px; width: auto; }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.stat-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px; box-shadow: var(--shadow); }
.stat-card .num { font-size: 2rem; font-weight: 800; color: var(--accent); line-height: 1; font-variant-numeric: tabular-nums; }
.stat-card .lbl { color: var(--muted); font-size: .85rem; margin-top: 6px; }

/* CLI */
.cli {
  background: var(--cli-bg); color: #d7e6f2; border-radius: 18px; overflow: hidden;
  border: 1px solid rgba(79,210,232,.22); box-shadow: var(--shadow);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  min-height: 420px; display: flex; flex-direction: column;
}
.cli-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; background: #10192b; border-bottom: 1px solid rgba(79,210,232,.14);
  font-size: 12px; letter-spacing: .04em;
}
.cli-dots { display: flex; gap: 6px; }
.cli-dots i { width: 10px; height: 10px; border-radius: 50%; display: block; }
.cli-dots i:nth-child(1) { background: #ff5f57; }
.cli-dots i:nth-child(2) { background: #febc2e; }
.cli-dots i:nth-child(3) { background: #28c840; }
.cli-title { color: #9fb3c6; flex: 1; }
.cli-live { display: inline-flex; align-items: center; gap: 6px; color: #4fd2e8; font-weight: 700; font-size: 11px; }
.cli-live b {
  width: 8px; height: 8px; border-radius: 50%; background: #4fd2e8;
  box-shadow: 0 0 10px #4fd2e8; animation: pulseDot 1.6s ease-in-out infinite;
}
.cli-body {
  flex: 1; padding: 14px 16px 18px; overflow: auto; height: 420px;
  font-size: 12.5px; line-height: 1.7; white-space: pre-wrap; word-break: break-word;
}
.cli-line { opacity: .95; }
.cli-line .ts { color: #6a8399; }
.cli-line .ok { color: #7dffa6; }
.cli-line .scan { color: #4fd2e8; }
.cli-line .warn { color: #ffd27a; }
.cli-line .err { color: #ff8b8b; }
.cli-line .payload { color: #9fb3c6; }
.cli-cursor {
  display: inline-block; width: 8px; height: 1.05em; background: #4fd2e8;
  margin-left: 2px; vertical-align: text-bottom; animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }
@keyframes pulseDot { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.6); opacity: .5; } }

.feed-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px; box-shadow: var(--shadow); }
.feed-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.tag { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: .72rem; font-weight: 800; text-transform: uppercase; background: #eee; color: #666; }
html[data-theme="dark"] .tag { background: #132033; color: #9fb3c6; }

.pipeline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 18px; }
.pipeline span {
  border: 1px solid var(--line); background: var(--card); border-radius: 999px;
  padding: 8px 12px; font-size: 11px; font-weight: 800; letter-spacing: .08em;
}
.pipeline i { font-style: normal; color: var(--muted); }
html.motion-on .pipeline span { animation: pipePulse 3.6s ease-in-out infinite; }
html.motion-on .pipeline span:nth-child(3) { animation-delay: .4s; }
html.motion-on .pipeline span:nth-child(5) { animation-delay: .8s; }
html.motion-on .pipeline span:nth-child(7) { animation-delay: 1.2s; }
html.motion-on .pipeline span:nth-child(9) { animation-delay: 1.6s; }
html.motion-on .pipeline span:nth-child(11) { animation-delay: 2s; }
@keyframes pipePulse {
  0%, 70%, 100% { border-color: var(--line); }
  35% { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
}

/* Motion */
html.motion-on [data-reveal] { opacity: 0; transform: translate3d(0, 24px, 0); }
html.motion-on [data-reveal].in-view {
  opacity: 1; transform: none;
  transition: opacity .8s cubic-bezier(.16,0,0,1), transform .8s cubic-bezier(.16,0,0,1);
}
html.motion-on [data-stagger] > * { opacity: 0; transform: translate3d(0, 18px, 0); }
html.motion-on [data-stagger].in-view > * {
  opacity: 1; transform: none;
  transition: opacity .65s cubic-bezier(.16,0,0,1), transform .65s cubic-bezier(.16,0,0,1);
}
html.motion-on [data-stagger].in-view > *:nth-child(1) { transition-delay: 40ms; }
html.motion-on [data-stagger].in-view > *:nth-child(2) { transition-delay: 90ms; }
html.motion-on [data-stagger].in-view > *:nth-child(3) { transition-delay: 140ms; }
html.motion-on [data-stagger].in-view > *:nth-child(4) { transition-delay: 190ms; }
html.motion-on [data-stagger].in-view > *:nth-child(5) { transition-delay: 240ms; }
html.motion-on [data-stagger].in-view > *:nth-child(6) { transition-delay: 290ms; }
html.motion-on [data-stagger].in-view > *:nth-child(7) { transition-delay: 340ms; }
html.motion-on [data-stagger].in-view > *:nth-child(8) { transition-delay: 390ms; }

html.motion-on .hero-copy > * { opacity: 0; transform: translate3d(0, 18px, 0); }
.hero.ready .hero-copy > * {
  opacity: 1; transform: none;
  transition: opacity .85s cubic-bezier(.16,0,0,1), transform .85s cubic-bezier(.16,0,0,1);
}
.hero.ready .hero-copy > :nth-child(1) { transition-delay: .12s; }
.hero.ready .hero-copy > :nth-child(2) { transition-delay: .22s; }
.hero.ready .hero-copy > :nth-child(3) { transition-delay: .32s; }
.hero.ready .hero-copy > :nth-child(4) { transition-delay: .42s; }

.neural-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: .45; }

.intel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.intel-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.intel-thumb { aspect-ratio: 16/9; background: #f2f2f4; overflow: hidden; }
.intel-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.intel-body { padding: 18px 20px 22px; }
.intel-body h2 { font-size: 1.2rem; margin: 8px 0 8px; }
html[data-theme="dark"] .intel-thumb { background: #0e1a30; }

.rfq-row {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.rfq-thumb {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  overflow: hidden;
  background: #f2f2f4;
  flex: none;
}
.rfq-thumb img { width: 100%; height: 100%; object-fit: cover; }

.catalogue-filter {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(160px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 22px;
}
.catalogue-filter .btn { height: 48px; min-width: 110px; }

.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 28px;
}
.pager-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 650;
  background: var(--card);
  color: var(--ink);
}
.pager-btn.is-current { background: var(--accent); color: #fff; border-color: var(--accent); }
html[data-theme="dark"] .pager-btn.is-current { color: #05070c; }
.pager-btn.is-disabled { opacity: .45; pointer-events: none; }

html.motion-on .product-grid > * { opacity: 1 !important; transform: none !important; }

.split-2 { display: grid; grid-template-columns: 1.2fr .8fr; gap: 20px; align-items: start; }
.split-2eq { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }

@media (max-width: 960px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { min-height: clamp(420px, 68vh, 640px); }
  .hero.hero-compact { min-height: clamp(200px, 30vh, 300px); }
  h1 { max-width: none; }
  .split-2, .split-2eq { grid-template-columns: 1fr; }
  .catalogue-filter { grid-template-columns: 1fr; }
  .intel-grid { grid-template-columns: 1fr; }
  .navlinks { display: none; }
  .menu-toggle { display: grid; }
}
@media (max-width: 640px) {
  .product-grid { grid-template-columns: 1fr; }
  .section { padding: 42px 0; }
  .brand-logo { height: 34px; }
  .header-actions .btn { display: none; }
  .cli-body { height: 340px; }
}

@media (prefers-reduced-motion: reduce) {
  html.motion-on [data-reveal],
  html.motion-on [data-stagger] > *,
  .hero-copy > * {
    opacity: 1 !important; transform: none !important; transition: none !important;
  }
  .hero-video, .hero-bg, .cli-live b, .cli-cursor, .pipeline span { animation: none !important; }
}
