/* ==========================================================================
   PROGEL BIOTECH INDUSTRIES — Core Stylesheet
   Design language: Industrial Elegance
   Signature: the "fiber thread" — a single collagen/leather-fiber line
   that runs through the site, tying gelatin extraction and leather
   processing back to the same raw material: protein fiber.
   ========================================================================== */

:root {
  --color-primary: #c87941;      /* copper */
  --color-secondary: #1a1a2e;    /* deep navy */
  --color-accent: #e8a060;       /* light copper */
  --color-bg: #f5f0eb;           /* warm white */
  --color-text: #2d2d2d;         /* dark gray */
  --color-success: #22c55e;
  --color-danger: #ef4444;

  --color-navy-soft: #24243d;
  --color-hairline: rgba(45, 45, 45, 0.12);
  --color-hairline-dark: rgba(245, 240, 235, 0.14);

  --font-heading: 'Syne', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --container: 1800px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

/* ==========================================================================
   RESET — normalize browser defaults before anything else is styled
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

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

img, picture, svg, video { display: block; max-width: 100%; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
table { border-collapse: collapse; width: 100%; }

::selection { background: var(--color-primary); color: #fff; }

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

/* Accessible focus ring — keyboard users only, not mouse clicks */
:focus { outline: none; }
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: 2px;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden; /* safety net against any accidental mobile horizontal scroll */
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.08;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  margin-bottom: 1em;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--color-primary);
  display: inline-block;
}

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

section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section-tight { padding: clamp(2.5rem, 5vw, 4rem) 0; }

.bg-navy {
  background: var(--color-secondary);
  color: var(--color-bg);
}
.bg-navy .eyebrow { color: var(--color-accent); }
.bg-navy h2, .bg-navy h3 { color: #fff; }
.bg-navy p { color: rgba(245,240,235,0.72); }

.bg-card { background: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85em 1.7em;
  border-radius: 3px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn-primary {
  background: var(--color-primary);
  color: #fff;
}
.btn-primary:hover { background: var(--color-accent); transform: translateY(-2px); }

.btn-ghost {
  background: transparent;
  border-color: var(--color-hairline-dark);
  color: inherit;
}
.btn-ghost:hover { border-color: var(--color-accent); color: var(--color-accent); transform: translateY(-2px); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(26, 26, 46, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-hairline-dark);
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.15rem;
  color: #fff;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 0.6em;
}
.logo .mark {
  width: 30px; height: 30px;
  flex-shrink: 0;
}
.logo .sub {
  display: block;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  color: var(--color-accent);
  margin-top: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.1rem;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  font-size: 0.88rem;
  font-weight: 500;
  color: rgba(245,240,235,0.78);
  position: relative;
  padding: 0.4em 0;
  transition: color 0.2s ease;
}
.nav-links a:hover, .nav-links a.active { color: #fff; }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 2px;
  background: var(--color-primary);
}
.nav-cta {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.nav-cta .btn-primary { padding: 0.6em 1.3em; font-size: 0.85rem; }
.portal-link {
  font-size: 0.82rem;
  font-family: var(--font-mono);
  color: rgba(245,240,235,0.6);
  border: 1px solid var(--color-hairline-dark);
  padding: 0.55em 1em;
  border-radius: 3px;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.portal-link:hover { border-color: var(--color-accent); color: var(--color-accent); }

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none; border: none; cursor: pointer; padding: 8px;
}
.menu-toggle span { width: 22px; height: 2px; background: #fff; display: block; }

@media (max-width: 880px) {
  .nav-links, .nav-cta .btn-primary { display: none; }
  .menu-toggle { display: flex; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--color-secondary);
    padding: 1.5rem var(--gutter) 2rem;
    gap: 1.2rem;
    border-bottom: 1px solid var(--color-hairline-dark);
  }
}

@media (max-width: 480px) {
  .nav-inner { height: 64px; }
  .portal-link { display: none; } /* keep the small-screen header to logo + menu only */
  .logo .sub { display: none; }   /* drop the tagline on very narrow screens */
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--color-secondary);
  color: #fff;
  overflow: hidden;
  padding: clamp(4rem, 10vw, 7rem) 0 clamp(3rem, 8vw, 5rem);
}
.hero-thread {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
  pointer-events: none;
}
.hero-thread path {
  fill: none;
  stroke: var(--color-primary);
  stroke-width: 1.1;
  stroke-dasharray: 6 2000;
  animation: thread-draw 5.5s ease-out forwards;
}
.hero-thread path.t2 { stroke: var(--color-accent); opacity: 0.6; animation-delay: 0.4s; }
.hero-thread path.t3 { stroke: #ffffff; opacity: 0.18; animation-delay: 0.8s; }

@media (max-width: 700px) {
  /* On narrow screens the text column takes the full width, so the
     decorative thread lines have no clear space and end up sitting
     directly behind the headline — hiding them keeps mobile clean. */
  .hero-thread { display: none; }
}
@keyframes thread-draw {
  from { stroke-dashoffset: 2000; }
  to { stroke-dashoffset: 0; }
}
.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 720px;
}
.hero-stats {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 2rem;
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding-top: 2.2rem;
  border-top: 1px solid var(--color-hairline-dark);
}
.stat .num {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  color: var(--color-accent);
  display: block;
}
.stat .label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: rgba(245,240,235,0.6);
  text-transform: uppercase;
}

.hero-cta { display: flex; gap: 1rem; margin-top: 2.2rem; flex-wrap: wrap; }

/* ---------- Fiber divider ---------- */
.fiber-divider {
  display: block;
  width: 100%;
  height: 28px;
}
.fiber-divider path { fill: none; stroke: var(--color-primary); stroke-width: 1; opacity: 0.4; }

/* ---------- Grids / Cards ---------- */
.grid {
  display: grid;
  gap: 1.75rem;
}
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
}

.card {
  background: #fff;
  border-radius: 4px;
  padding: 2rem 1.8rem;
  border-top: 3px solid var(--color-primary);
  box-shadow: 0 1px 3px rgba(26,26,46,0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(26,26,46,0.08); }
.card .icon { width: 40px; height: 40px; margin-bottom: 1.1rem; color: var(--color-primary); }
.card h3 { margin-bottom: 0.5em; }
.card p { color: rgba(45,45,45,0.68); font-size: 0.95rem; margin-bottom: 0; }

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table-wrap .spec-table { min-width: 320px; }
.spec-table th, .spec-table td {
  text-align: left;
  padding: 0.7em 0.9em;
  border-bottom: 1px solid var(--color-hairline);
}
.spec-table th {
  color: var(--color-primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.72rem;
}

.product-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
}
.product-panel:nth-child(even) .visual { order: 2; }
@media (max-width: 820px) {
  .product-panel { grid-template-columns: minmax(0, 1fr); }
  .product-panel:nth-child(even) .visual { order: 0; }
}
.visual {
  aspect-ratio: 4/3;
  border-radius: 6px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-secondary), var(--color-navy-soft));
}
.visual svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.tag-list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0 1.4rem; }
.tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.35em 0.8em;
  border: 1px solid var(--color-hairline);
  border-radius: 20px;
  color: var(--color-text);
}

/* ---------- Process band ---------- */
.process-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--color-hairline-dark);
  border-radius: 4px;
  overflow: hidden;
}
.process-step {
  padding: 2rem 1.6rem;
  border-right: 1px solid var(--color-hairline-dark);
  position: relative;
}
.process-step:last-child { border-right: none; }
.process-step .stage-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--color-accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.8em;
}
@media (max-width: 820px) {
  .process-band { grid-template-columns: 1fr; }
  .process-step { border-right: none; border-bottom: 1px solid var(--color-hairline-dark); }
  .process-step:last-child { border-bottom: none; }
}

/* ---------- Testimonial ---------- */
.testimonial {
  border-left: 3px solid var(--color-primary);
  padding-left: 1.6rem;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-secondary);
  max-width: 620px;
}
.testimonial cite {
  display: block;
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.78rem;
  color: var(--color-primary);
  margin-top: 1rem;
  letter-spacing: 0.04em;
}

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 1.3rem; }
.form-group label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-secondary);
  margin-bottom: 0.5em;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.85em 1em;
  border: 1px solid var(--color-hairline);
  border-radius: 3px;
  background: #fff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text);
  transition: border-color 0.2s ease;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}
.form-group textarea { resize: vertical; min-height: 130px; }
.form-msg { padding: 1em 1.2em; border-radius: 4px; margin-bottom: 1.5rem; font-size: 0.9rem; }
.form-msg.success { background: rgba(34,197,94,0.1); color: #15803d; border: 1px solid rgba(34,197,94,0.25); }
.form-msg.error { background: rgba(239,68,68,0.1); color: #b91c1c; border: 1px solid rgba(239,68,68,0.25); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-secondary);
  color: rgba(245,240,235,0.65);
  padding: 4rem 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 2.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--color-hairline-dark);
}
@media (max-width: 780px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.footer-grid h4 {
  color: #fff;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.2em;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 0.7em; font-size: 0.9rem; overflow-wrap: break-word; }
.footer-grid a:hover { color: var(--color-accent); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1.6rem;
  font-size: 0.82rem;
}
.footer-bottom .socials { display: flex; gap: 1rem; }
.footer-bottom .socials a {
  width: 34px; height: 34px;
  border: 1px solid var(--color-hairline-dark);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.footer-bottom .socials a:hover { border-color: var(--color-accent); color: var(--color-accent); }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  background: var(--color-secondary);
  color: #fff;
  padding: clamp(3.5rem, 8vw, 5.5rem) 0 clamp(2.5rem, 6vw, 3.5rem);
  position: relative;
  overflow: hidden;
}
.page-hero .container { position: relative; z-index: 2; }
.page-hero p.lead {
  max-width: 620px;
  font-size: 1.05rem;
  color: rgba(245,240,235,0.75);
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 3.5rem;
  align-items: start;
}
@media (max-width: 820px) { .two-col { grid-template-columns: 1fr; } }

.badge-row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.5rem; }
.badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.5em 1em;
  border: 1px solid var(--color-hairline);
  border-radius: 3px;
  display: flex;
  align-items: center;
  gap: 0.5em;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--color-success); }

.value-list { list-style: none; margin: 0; padding: 0; }
.value-list li {
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--color-hairline);
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 1.5rem;
}
.value-list li:first-child { padding-top: 0; }
.value-list .tag-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--color-primary);
  letter-spacing: 0.06em;
}

.team-card { text-align: left; }
.team-card .avatar {
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--color-secondary), var(--color-navy-soft));
  margin-bottom: 1.2rem;
  position: relative;
  overflow: hidden;
}
.team-card .avatar svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.team-card .role { font-family: var(--font-mono); font-size: 0.75rem; color: var(--color-primary); margin-bottom: 0.4em; }

.job-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--color-hairline);
  flex-wrap: wrap;
  gap: 1rem;
}
.job-row .meta { font-family: var(--font-mono); font-size: 0.78rem; color: rgba(45,45,45,0.55); }

.map-frame {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--color-hairline);
}
.map-frame iframe { width: 100%; height: 100%; border: 0; }

.contact-info-list { list-style: none; margin: 0; padding: 0; }
.contact-info-list li {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-hairline);
  font-size: 0.95rem;
  overflow-wrap: break-word;
  min-width: 0;
}
.contact-info-list .ic { color: var(--color-primary); flex-shrink: 0; }
.contact-info-list li > span:last-child { min-width: 0; }
