/* ---------- Tokens ---------- */
:root {
  --ink:        #1A1A1A;
  --ink-soft:   #4A4A4A;
  --muted:      #6B6B6B;
  --accent:     #D31245;
  --accent-dk:  #A80E37;
  --safety:     #FFCC00;
  --bg:         #F7F6F3;
  --surface:    #FFFFFF;
  --panel:      #F2F1EE;
  --border:     #E2E0DC;
  --success:    #1A7F37;

  --radius:     14px;
  --radius-sm:  9px;
  --shadow-sm:  0 1px 2px rgba(26,26,26,.05), 0 1px 3px rgba(26,26,26,.06);
  --shadow-md:  0 4px 12px rgba(26,26,26,.07), 0 12px 28px rgba(26,26,26,.07);
  --maxw:       940px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

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

/* Hazard stripe — echoes the black/yellow safety tape product line */
.hazard-bar {
  height: 7px;
  background: repeating-linear-gradient(
    -45deg,
    var(--safety) 0 14px,
    var(--ink)    14px 28px
  );
}

/* ---------- Header ---------- */
.site-header {
  text-align: center;
  padding: 34px 20px 30px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.logo {
  width: 200px;
  height: auto;
  margin: 0 auto 22px;
}

.hero-title {
  font-size: clamp(1.5rem, 5vw, 2.1rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  font-weight: 700;
}

.hero-sub {
  margin: 0 auto;
  max-width: 30em;
  color: var(--muted);
  font-size: 1rem;
}

/* ---------- Layout ---------- */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px 18px 24px;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 18px;
}

.section-num {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 700;
}

/* ---------- Product cards ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}

.product-card:hover,
.product-card:focus-visible {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: #d3d0ca;
}

.product-card:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.product-media {
  background: var(--panel);
  padding: 22px;
  display: grid;
  place-items: center;
  min-height: 178px;
  border-bottom: 1px solid var(--border);
}

.product-media img {
  max-height: 140px;
  width: auto;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.product-card-body {
  padding: 17px 19px 19px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-card-body h3 {
  font-size: 1.05rem;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.product-card-body p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: .92rem;
  flex: 1;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-weight: 650;
  font-size: .93rem;
}

.ext-icon {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .18s ease;
}

.product-card:hover .ext-icon { transform: translate(2px, -2px); }

/* ---------- Sample form ---------- */
.sample-section { margin-top: 46px; }

.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 26px 24px 28px;
}

.form-sub {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: .95rem;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}

.field { margin-bottom: 17px; }

.field label,
#samplesLabel {
  display: block;
  font-weight: 650;
  font-size: .9rem;
  margin-bottom: 6px;
}

.req { color: var(--accent); }

.field-hint {
  font-weight: 400;
  font-size: .84rem;
  color: var(--muted);
  white-space: nowrap;
}

@media (max-width: 700px) {
  /* let it wrap to its own line rather than squeeze the label */
  .field-hint { white-space: normal; display: block; margin-top: 1px; }
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 11px 13px;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color .15s ease, box-shadow .15s ease;
}

textarea { resize: vertical; min-height: 82px; }

input::placeholder,
textarea::placeholder { color: #A5A29C; }

input:focus,
textarea:focus,
.sample-dropdown-toggle:focus-visible,
.submit-btn:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(211,18,69,.15);
}

.submit-btn:focus-visible { box-shadow: 0 0 0 3px rgba(211,18,69,.35); }

.field.invalid input,
.field.invalid textarea,
.field.invalid .sample-dropdown-toggle {
  border-color: var(--accent);
}

.field-error {
  display: none;
  margin-top: 5px;
  font-size: .83rem;
  font-weight: 600;
  color: var(--accent);
}

.field.invalid .field-error { display: block; }

/* ---------- Multi-select dropdown ---------- */
.sample-dropdown { position: relative; }

.sample-dropdown-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 13px;
  font: inherit;
  font-size: 1rem;
  text-align: left;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}

#sampleDropdownLabel {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#sampleDropdownLabel.placeholder { color: #A5A29C; }

.chevron {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .18s ease;
}

.sample-dropdown.open .chevron { transform: rotate(180deg); }

.sample-dropdown-panel {
  display: none;
  position: absolute;
  z-index: 20;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  max-height: 340px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  padding: 5px 0 7px;
}

.sample-dropdown.open .sample-dropdown-panel { display: block; }

.sample-group-label {
  margin: 9px 0 3px;
  padding: 0 14px;
  font-size: .71rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
}

.sample-group-label:first-child { margin-top: 4px; }

/* Scoped to the panel so it outranks `.field label { display: block }` above */
.sample-dropdown-panel .sample-option {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 14px;
  font-size: .93rem;
  font-weight: 400;
  line-height: 1.3;
  cursor: pointer;
  transition: background .12s ease;
}

.sample-option:hover { background: var(--panel); }

.sample-option input {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.sample-thumb {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  object-fit: contain;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px;
}

/* Selected rows read at a glance */
.sample-option:has(input:checked) { background: rgba(211,18,69,.08); }
.sample-option:has(input:checked) .sample-thumb { border-color: var(--accent); }
.sample-option:has(input:checked) span { font-weight: 600; }

/* ---------- Submit ---------- */
.submit-btn {
  position: relative;
  width: 100%;
  padding: 14px;
  margin-top: 6px;
  font: inherit;
  font-size: 1.03rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .15s ease;
}

.submit-btn:hover:not(:disabled) { background: var(--accent-dk); }

.submit-btn:disabled { opacity: .68; cursor: not-allowed; }

.spinner {
  display: none;
  position: absolute;
  top: 50%;
  right: 16px;
  width: 17px;
  height: 17px;
  margin-top: -8.5px;
  border: 2.5px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

.submit-btn.loading .spinner { display: block; }

@keyframes spin { to { transform: rotate(360deg); } }

.form-status {
  min-height: 1.3em;
  margin: 13px 0 0;
  font-size: .94rem;
  font-weight: 600;
  text-align: center;
}

.form-status.success { color: var(--success); }
.form-status.error   { color: var(--accent); }

/* Success confirmation replaces the form */
.form-success {
  text-align: center;
  padding: 20px 8px 12px;
}

.form-success .check {
  width: 52px;
  height: 52px;
  margin: 0 auto 15px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(26,127,55,.1);
  color: var(--success);
  font-size: 1.6rem;
  font-weight: 700;
}

.form-success h3 {
  margin: 0 0 7px;
  font-size: 1.22rem;
}

.form-success p {
  margin: 0;
  color: var(--muted);
  font-size: .95rem;
}

/* ---------- Footer ---------- */
.site-footer {
  text-align: center;
  padding: 30px 20px 38px;
  border-top: 1px solid var(--border);
  margin-top: 42px;
  background: var(--surface);
}

.footer-brand {
  margin: 0 0 5px;
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .01em;
}

.footer-note {
  margin: 0 0 13px;
  font-size: .9rem;
  color: var(--muted);
}

.footer-note a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  word-break: break-word;
}

.footer-note a:hover { text-decoration: underline; }

.footer-copy {
  margin: 0;
  font-size: .78rem;
  color: #9A9691;
}

/* ---------- Mobile ---------- */
@media (max-width: 700px) {
  .product-grid { grid-template-columns: 1fr; gap: 15px; }
  .field-row    { grid-template-columns: 1fr; gap: 0; }

  .site-header  { padding: 26px 18px 24px; }
  .logo         { width: 168px; margin-bottom: 18px; }
  main          { padding: 30px 15px 20px; }
  .form-card    { padding: 21px 17px 24px; }
  .product-media { min-height: 152px; padding: 18px; }
  .product-media img { max-height: 118px; }

  /* 16px min prevents iOS Safari zoom-on-focus */
  input[type="text"],
  input[type="email"],
  textarea,
  .sample-dropdown-toggle { font-size: 16px; }

  .sample-dropdown-panel { max-height: 300px; }
  .sample-option { padding: 9px 12px; gap: 10px; }
  .sample-thumb { width: 38px; height: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
