:root {
  --ink: #18212b;
  --muted: #5b6875;
  --line: #d9e0e7;
  --paper: #f7f8f5;
  --panel: #ffffff;
  --green: #2d6b4f;
  --blue: #275a8c;
  --gold: #b7791f;
  --red: #9b2c2c;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
}

a {
  color: inherit;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 5vw, 72px);
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 7px;
  background: var(--green);
  color: white;
  font-weight: 700;
}

.brand small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
}

nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

nav a {
  text-decoration: none;
  font-weight: 700;
  color: var(--muted);
}

.nav-dropdown {
  position: relative;
  color: var(--muted);
  font-weight: 700;
}

.nav-dropdown summary {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 14px;
  list-style: none;
  cursor: pointer;
  background: #fff;
}

.nav-dropdown summary::-webkit-details-marker {
  display: none;
}

.nav-dropdown summary::after {
  content: "v";
  display: inline-block;
  margin-left: 7px;
  font-size: 0.75rem;
}

.nav-dropdown[open] summary::after {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  min-width: 280px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 36px rgba(24, 33, 43, 0.14);
  z-index: 10;
}

.nav-dropdown-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 6px;
}

.nav-dropdown-menu a:hover {
  background: #eef2f5;
}

.nav-info-menu {
  min-width: 320px;
  max-width: 360px;
}

.nav-info-menu p {
  margin: 0;
  padding: 10px 12px;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.45;
}

.nav-info-menu .map-pin {
  display: inline-block;
  margin-right: 8px;
  vertical-align: -3px;
}

.nav-button,
.button {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 14px;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

.primary {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}

.secondary {
  color: var(--ink);
  background: #fff;
}

.home-version {
  position: absolute;
  top: 88px;
  left: clamp(20px, 5vw, 72px);
  z-index: 2;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.hero {
  display: flex;
  align-items: center;
  min-height: 620px;
  padding: clamp(44px, 8vw, 92px) clamp(20px, 5vw, 72px);
  background:
    linear-gradient(90deg, rgba(247, 248, 245, 0.92), rgba(247, 248, 245, 0.42) 48%, rgba(24, 33, 43, 0.08)),
    url("https://commons.wikimedia.org/wiki/Special:FilePath/Broiler_house.jpg") center/cover;
}

.hero-copy {
  width: 25%;
  min-width: 320px;
  max-width: 430px;
  padding: clamp(16px, 2vw, 24px);
  border-radius: 8px;
  background: rgba(247, 248, 245, 0.78);
  backdrop-filter: blur(1px);
}

.eyebrow,
.product-code {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0 0 18px;
  font-size: clamp(3.2rem, 8vw, 7rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero-copy h1 {
  font-size: clamp(2.4rem, 4vw, 4rem);
  line-height: 1;
}

.lead {
  margin: 0;
  max-width: 720px;
  color: #344251;
  font-size: 1.24rem;
  line-height: 1.55;
}

.hero-copy .lead {
  font-size: 1rem;
  line-height: 1.5;
}

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

.playful-broiler-blocks {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: minmax(180px, auto);
  gap: 14px;
  padding: clamp(24px, 5vw, 54px) clamp(20px, 5vw, 72px);
  background: #fff;
}

.story-block {
  min-height: 180px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.image-block {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 300px;
  color: #fff;
  background-position: center;
  background-size: cover;
}

.image-block::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(24, 33, 43, 0.08), rgba(24, 33, 43, 0.72));
}

.image-block div {
  position: relative;
  padding: 20px;
}

.image-block h2 {
  max-width: 520px;
  margin: 0 0 12px;
  line-height: 1.05;
}

.image-block span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
}

.broiler-house {
  grid-column: span 2;
  background-image: url("https://commons.wikimedia.org/wiki/Special:FilePath/Broiler_chicks.jpg");
}

.flock-floor {
  grid-column: span 2;
  background-image: url("https://commons.wikimedia.org/wiki/Special:FilePath/20130822-OC-RBN-2946_(9682285758).jpg");
}

.saying-block,
.fact-block {
  display: grid;
  align-content: center;
  padding: 22px;
  background: #f7f8f5;
}

.saying-block p {
  margin: 0;
  color: var(--ink);
  font-size: 1.65rem;
  line-height: 1.16;
  font-weight: 800;
}

.green-note {
  background: #e7f0e8;
}

.fact-block {
  gap: 10px;
}

.fact-block strong {
  font-size: 1.45rem;
}

.fact-block span {
  color: var(--muted);
  line-height: 1.45;
}

.gold-note {
  background: #f7efd9;
}

.red-note {
  background: #f7e8e4;
}

.hero-panel {
  display: grid;
  gap: 12px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.hero-panel div,
.product-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
}

.hero-panel span {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
}

.section,
.feature-band,
.portal-header,
.table-wrap,
.auth-shell {
  padding: clamp(36px, 6vw, 72px) clamp(20px, 5vw, 72px);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 24px;
}

.section-heading h2,
.portal-header h1,
.auth-form h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.05;
}

.map-pin {
  position: relative;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border: 8px solid var(--red);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
}

.map-pin::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: #fff;
}

.small-pin {
  width: 16px;
  height: 16px;
  border-width: 4px;
}

.small-pin::after {
  inset: 2px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.product-card h2,
.product-card h3,
.feature-band h2 {
  margin: 0 0 10px;
}

.product-card p,
.feature-band p {
  color: var(--muted);
  line-height: 1.5;
}

.product-card a:not(.button) {
  font-weight: 800;
  color: var(--blue);
}

.product-hero {
  min-height: 460px;
  display: flex;
  align-items: center;
  padding: clamp(44px, 7vw, 84px) clamp(20px, 5vw, 72px);
  background:
    linear-gradient(90deg, rgba(24, 33, 43, 0.72), rgba(24, 33, 43, 0.26)),
    url("/static/moleps-poultry-hero.jpg") center/cover;
  color: #fff;
}

.product-hero .lead {
  color: rgba(255, 255, 255, 0.9);
}

.feature-band {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  background: #fff;
}

.operations-overview {
  padding: clamp(36px, 6vw, 72px) clamp(20px, 5vw, 72px);
  background: #fff;
  border-top: 1px solid var(--line);
}

.flow-diagram {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 26px 0;
}

.flow-diagram div {
  position: relative;
  min-height: 74px;
  display: grid;
  place-items: center;
  padding: 14px;
  text-align: center;
  color: var(--ink);
  background: #eef4ed;
  border: 1px solid #c9d8ce;
  border-radius: 8px;
  font-weight: 800;
}

.function-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.function-grid article {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f8f5;
}

.function-grid h3 {
  margin: 0 0 10px;
}

.function-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.auth-shell {
  min-height: calc(100vh - 80px);
  display: grid;
  place-items: center;
}

.auth-form {
  width: min(100%, 440px);
  display: grid;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 700;
}

input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px;
  font: inherit;
}

.auth-copy,
.auth-hint {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.messages {
  padding: 14px clamp(20px, 5vw, 72px) 0;
}

.message {
  margin: 0 0 8px;
  padding: 12px 14px;
  border-radius: 7px;
  background: #fff;
  border: 1px solid var(--line);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.message-hiding {
  opacity: 0;
  transform: translateY(-4px);
}

.message.success {
  border-color: #88b79f;
}

.message.danger {
  border-color: #d38b8b;
  color: var(--red);
}

.message.warning,
.status-note {
  border-color: #d7b25e;
  color: #6d4f0e;
}

.portal-grid {
  padding: 0 clamp(20px, 5vw, 72px) clamp(36px, 6vw, 72px);
}

.muted {
  color: var(--muted);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
}

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

th {
  background: #eef2f5;
}

.actions form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.actions button {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 8px 10px;
  cursor: pointer;
}

@media (max-width: 760px) {
  .site-header,
  .hero {
    align-items: flex-start;
  }

  .site-header,
  nav,
  .hero-actions {
    flex-direction: column;
  }

  .nav-dropdown-menu {
    position: static;
    min-width: 100%;
    max-width: none;
    margin-top: 10px;
    box-shadow: none;
  }

  .hero {
    min-height: auto;
  }

  .hero-copy {
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  .playful-broiler-blocks {
    grid-template-columns: 1fr;
  }

  .broiler-house,
  .flock-floor {
    grid-column: auto;
  }

  table,
  thead,
  tbody,
  th,
  td,
  tr {
    display: block;
  }

  thead {
    display: none;
  }

  td {
    border-bottom: 0;
  }

  tr {
    border-bottom: 1px solid var(--line);
    padding: 8px 0;
  }
}
