:root {
  color-scheme: light;
  --ink: #151719;
  --subtle: #5d646b;
  --line: #d7dce1;
  --paper: #ffffff;
  --soft: #f3f5f7;
  --steel: #2c3034;
  --accent: #b3261e;
  --accent-dark: #841d17;
  --shadow: 0 18px 50px rgba(21, 23, 25, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: var(--paper);
  line-height: 1.55;
}

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

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 12px clamp(18px, 4vw, 56px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  padding: 3px;
  background: #eef1f4;
  border-radius: 6px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 0.98rem;
}

.brand small {
  color: var(--subtle);
  font-size: 0.76rem;
}

nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  color: var(--steel);
  font-size: 0.92rem;
  font-weight: 650;
}

nav a {
  text-decoration: none;
}

nav a:hover {
  color: var(--accent);
}

.hero {
  min-height: calc(100svh - 72px);
  background:
    linear-gradient(90deg, rgba(12, 13, 14, 0.82), rgba(12, 13, 14, 0.48)),
    url("assets/warehouse-hero.jpg") center / cover no-repeat;
  color: #fff;
  display: grid;
  align-items: center;
}

.hero-overlay {
  width: min(760px, calc(100% - 36px));
  margin-left: clamp(18px, 7vw, 96px);
  padding: 72px 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #ffcbc7;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 20px;
  font-size: clamp(2.5rem, 5.7vw, 4.9rem);
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.hero-copy {
  max-width: 660px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1rem, 1.5vw, 1.18rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 6px;
  font: inherit;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.button.primary {
  color: #fff;
  background: var(--accent);
}

.button.primary:hover {
  background: var(--accent-dark);
}

.button.secondary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.12);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.metrics div {
  min-height: 132px;
  padding: 28px clamp(18px, 3vw, 42px);
  border-right: 1px solid var(--line);
}

.metrics div:last-child {
  border-right: 0;
}

.metrics strong {
  display: block;
  margin-bottom: 8px;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1;
}

.metrics span {
  color: var(--subtle);
  font-size: 0.92rem;
}

.section {
  padding: clamp(64px, 9vw, 120px) clamp(18px, 5vw, 72px);
}

.section.split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  align-items: center;
  gap: clamp(30px, 5vw, 72px);
}

.section.split.reverse {
  grid-template-columns: minmax(340px, 0.95fr) minmax(0, 1.05fr);
}

.section p {
  color: var(--subtle);
  font-size: 1rem;
}

.muted {
  background: var(--soft);
}

.section-heading {
  max-width: 850px;
  margin-bottom: 34px;
}

.product-grid,
.market-grid,
.assurance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 30px;
}

.market-grid,
.assurance-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.product-card,
.market-grid article,
.assurance-grid article {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.product-card p,
.market-grid p,
.assurance-grid p {
  font-size: 0.95rem;
}

dl {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
}

dl div {
  display: grid;
  gap: 2px;
}

dt {
  color: var(--subtle);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

dd {
  margin: 0;
  font-weight: 700;
}

.image-panel {
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
  box-shadow: var(--shadow);
}

.image-panel img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
}

.image-panel figcaption {
  margin-top: 12px;
  color: var(--subtle);
  font-size: 0.88rem;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

table {
  width: 100%;
  min-width: 840px;
  border-collapse: collapse;
}

caption {
  padding: 16px 18px;
  color: var(--steel);
  font-weight: 800;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

th,
td {
  padding: 16px 18px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

th {
  color: var(--subtle);
  font-size: 0.78rem;
  text-transform: uppercase;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.table-wrap.compact table {
  min-width: 600px;
}

.process-section {
  display: grid;
  gap: clamp(28px, 4vw, 48px);
  padding-bottom: clamp(28px, 4vw, 56px);
}

.process-intro {
  display: grid;
  grid-template-columns: minmax(340px, 0.9fr) minmax(0, 1.1fr);
  align-items: start;
  gap: clamp(30px, 5vw, 72px);
}

.process-copy {
  align-self: start;
}

.process-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 26px;
}

.process-highlights div {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.process-highlights strong {
  font-size: 0.9rem;
}

.process-highlights span {
  color: var(--subtle);
  font-size: 0.84rem;
  line-height: 1.35;
}

.process-map-scroll {
  overflow-x: auto;
  padding: 4px 0 14px;
  overscroll-behavior-inline: contain;
  scrollbar-color: rgba(179, 38, 30, 0.45) rgba(215, 220, 225, 0.55);
  -webkit-overflow-scrolling: touch;
}

.process-map {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) 36px minmax(140px, 1fr) 36px minmax(140px, 1fr) 36px minmax(140px, 1fr);
  grid-template-rows: auto 30px auto 30px auto;
  gap: 10px;
  margin: 0;
  min-width: 700px;
}

.process-node {
  position: relative;
  display: grid;
  gap: 5px;
  min-height: 92px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 8px 24px rgba(21, 23, 25, 0.07);
  animation: processFloat 7s ease-in-out infinite;
}

.process-node span {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 850;
  border-radius: 999px;
  background: var(--accent);
}

.process-node strong {
  color: var(--ink);
  font-size: 0.94rem;
  line-height: 1.15;
}

.process-node small {
  color: var(--subtle);
  font-size: 0.75rem;
  line-height: 1.25;
}

.process-arrow {
  display: grid;
  place-items: center;
  color: var(--accent);
  font-size: 1.35rem;
  font-weight: 900;
  animation: arrowPulse 2.4s ease-in-out infinite;
}

.process-arrow.loop {
  color: var(--accent-dark);
  font-size: 1.5rem;
}

.p1 { grid-column: 1; grid-row: 1; }
.a1 { grid-column: 2; grid-row: 1; }
.p2 { grid-column: 3; grid-row: 1; }
.a2 { grid-column: 4; grid-row: 1; }
.p3 { grid-column: 5; grid-row: 1; }
.a3 { grid-column: 6; grid-row: 1; }
.p4 { grid-column: 7; grid-row: 1; }
.d1 { grid-column: 7; grid-row: 2; }
.p5 { grid-column: 7; grid-row: 3; }
.loop { grid-column: 7; grid-row: 4; }
.p6 { grid-column: 7; grid-row: 5; }
.a4 { grid-column: 6; grid-row: 3; }
.p7 { grid-column: 5; grid-row: 3; }
.a5 { grid-column: 4; grid-row: 3; }
.p8 { grid-column: 3; grid-row: 3; }
.a6 { grid-column: 2; grid-row: 3; }
.p9 { grid-column: 1; grid-row: 3; }

.p2 { animation-delay: 0.1s; }
.p3 { animation-delay: 0.2s; }
.p4 { animation-delay: 0.3s; }
.p5 { animation-delay: 0.4s; }
.p6 { animation-delay: 0.5s; }
.p7 { animation-delay: 0.6s; }
.p8 { animation-delay: 0.7s; }
.p9 { animation-delay: 0.8s; }
.a2 { animation-delay: 0.15s; }
.a3 { animation-delay: 0.3s; }
.d1 { animation-delay: 0.45s; }
.loop { animation-delay: 0.6s; }
.a4 { animation-delay: 0.75s; }
.a5 { animation-delay: 0.9s; }
.a6 { animation-delay: 1.05s; }

.assurance {
  padding-top: clamp(42px, 5vw, 72px);
}

@keyframes processFloat {
  0%,
  100% {
    transform: translateY(0);
    box-shadow: 0 8px 24px rgba(21, 23, 25, 0.07);
  }
  50% {
    transform: translateY(-5px);
    box-shadow: 0 15px 34px rgba(21, 23, 25, 0.12);
  }
}

@keyframes arrowPulse {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.16);
  }
}

@media (prefers-reduced-motion: reduce) {
  .process-node,
  .process-arrow {
    animation: none;
  }
}

.market-band {
  color: #fff;
  background:
    linear-gradient(rgba(18, 19, 20, 0.88), rgba(18, 19, 20, 0.88)),
    url("assets/production-equipment.jpg") center / cover no-repeat;
}

.market-band p {
  color: rgba(255, 255, 255, 0.78);
}

.market-grid article {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.reference-note {
  display: grid;
  gap: 4px;
  margin-top: 18px;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
}

.reference-note strong {
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.reference-note p {
  max-width: 820px;
  margin: 0;
}

.rfq-section {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(30px, 5vw, 72px);
  align-items: start;
}

.rfq-copy video {
  width: 100%;
  margin-top: 28px;
  border-radius: 8px;
  background: #000;
}

.rfq-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

label {
  display: grid;
  gap: 7px;
  color: var(--steel);
  font-size: 0.82rem;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 11px 12px;
  color: var(--ink);
  font: inherit;
  border: 1px solid #bfc6cd;
  border-radius: 6px;
  background: #fff;
}

textarea {
  resize: vertical;
}

.wide {
  grid-column: 1 / -1;
}

.rfq-output {
  display: none;
  padding: 16px;
  color: var(--steel);
  white-space: pre-wrap;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.rfq-output.active {
  display: block;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  padding: 34px clamp(18px, 5vw, 72px);
  color: #fff;
  background: var(--ink);
}

.site-footer p {
  max-width: 720px;
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.7);
}

address {
  display: grid;
  gap: 6px;
  font-style: normal;
}

address a {
  color: #fff;
  text-decoration: none;
}

address a:hover {
  color: #ffcbc7;
}

@media (max-width: 920px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .metrics,
  .section.split,
  .section.split.reverse,
  .process-intro,
  .rfq-section,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .metrics div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .metrics div:last-child {
    border-bottom: 0;
  }

  .product-grid,
  .market-grid,
  .assurance-grid,
  .process-highlights {
    grid-template-columns: 1fr;
  }

  /* Linearize the process map into a single vertical column on small screens. */
  .process-map-scroll {
    overflow: visible;
  }

  .process-map {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-width: 0;
    gap: 8px;
  }

  .process-node {
    width: 100%;
  }

  /* Force every sequential connector to read as a single downward step... */
  .process-arrow {
    font-size: 0;
    min-height: 26px;
  }

  .process-arrow::after {
    content: "↓";
    font-size: 1.35rem;
  }

  /* ...but keep the Baking <-> Pitch impregnation rebaking loop as a two-way relationship. */
  .process-arrow.loop {
    font-size: 0;
  }

  .process-arrow.loop::after {
    content: "⇅";
    font-size: 1.7rem;
  }

  .rfq-form {
    grid-template-columns: 1fr;
    padding: 18px;
  }
}

@media (max-width: 560px) {
  .hero {
    min-height: 720px;
  }

  .hero-overlay {
    margin-left: 18px;
  }

  h1 {
    font-size: 2.65rem;
  }

  .section {
    padding: 56px 18px;
  }
}

/* ===== Scroll-reveal animations ===== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* directional variants */
.reveal.from-left {
  transform: translateX(-36px);
}

.reveal.from-right {
  transform: translateX(36px);
}

.reveal.zoom {
  transform: scale(0.94);
}

.reveal.from-left.is-visible,
.reveal.from-right.is-visible,
.reveal.zoom.is-visible {
  transform: none;
}

/* hero intro animates on load */
.hero-overlay > * {
  opacity: 0;
  transform: translateY(22px);
  animation: hero-rise 0.8s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

.hero-overlay > *:nth-child(1) { animation-delay: 0.05s; }
.hero-overlay > *:nth-child(2) { animation-delay: 0.18s; }
.hero-overlay > *:nth-child(3) { animation-delay: 0.32s; }
.hero-overlay > *:nth-child(4) { animation-delay: 0.46s; }

@keyframes hero-rise {
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal.from-left,
  .reveal.from-right,
  .reveal.zoom {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .hero-overlay > * {
    opacity: 1;
    transform: none;
    animation: none;
  }
}
