/*
 * Reusable components: buttons, text links, icon boxes, service cards, product chips,
 * trust list, process steps, status labels, sector rows/cards, timeline, group companies,
 * value strip, principles, form fields and form messages.
 *
 * Directional icons (arrows) mirror in RTL; the official logo never does.
 */

/* ---- Buttons ---- */

.button {
  display: inline-flex;
  min-block-size: 52px;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  transition:
    color var(--motion-micro) ease,
    background-color var(--motion-micro) ease,
    border-color var(--motion-micro) ease,
    transform var(--motion-micro) ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button:active {
  transform: translateY(0);
}

.button[disabled],
.button[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
}

.button--small {
  min-block-size: 44px;
  padding: 10px 17px;
  font-size: 0.9rem;
}

.button--wide {
  inline-size: 100%;
}

.button--primary {
  color: var(--white);
  background: var(--brand-600);
}

.button--primary:hover {
  background: var(--brand-700);
}

.button--light {
  color: var(--navy-900);
  background: var(--white);
}

.button--light:hover {
  background: var(--cyan-100);
}

.button--outline-light {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.04);
}

.button--outline-light:hover {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.1);
}

.button--outline {
  color: var(--navy-900);
  border-color: var(--line);
  background: transparent;
}

.button--outline:hover {
  color: var(--brand-700);
  border-color: var(--brand-600);
}

/* Arrow glyphs point in the reading direction, so they mirror in RTL. */
.button__arrow {
  inline-size: 17px;
  block-size: 17px;
  flex: 0 0 17px;
  transition: transform var(--motion-micro) ease;
}

[dir="rtl"] .button__arrow {
  transform: scaleX(-1);
}

.button:hover .button__arrow {
  transform: translateX(3px);
}

[dir="rtl"] .button:hover .button__arrow {
  transform: scaleX(-1) translateX(3px);
}

/* ---- Text link ---- */

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-block-size: 44px;
  color: var(--brand-700);
  font-weight: 700;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

.text-link svg {
  inline-size: 16px;
  block-size: 16px;
  flex: 0 0 16px;
  transition: transform var(--motion-micro) ease;
}

.text-link:hover svg {
  transform: translateX(4px);
}

[dir="rtl"] .text-link svg {
  transform: scaleX(-1);
}

[dir="rtl"] .text-link:hover svg {
  transform: scaleX(-1) translateX(4px);
}

.text-link--light {
  color: var(--cyan-400);
}

/* ---- Icon box (consistent 1.6px line icons) ---- */

.icon-box {
  display: grid;
  inline-size: 52px;
  block-size: 52px;
  flex: 0 0 52px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  color: var(--brand-600);
  background: var(--blue-wash);
  transition:
    color 220ms ease,
    border-color 220ms ease,
    background-color 220ms ease;
}

.icon-box svg {
  inline-size: 24px;
  block-size: 24px;
}

/* ---- Service cards (4-up grid, hairline-separated) ---- */

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--line);
}

.service-card {
  position: relative;
  display: flex;
  min-block-size: 340px;
  flex-direction: column;
  padding: 34px 30px;
  overflow: hidden;
  background: var(--white);
  transition:
    background-color 220ms ease,
    color 220ms ease;
}

.service-card::after {
  position: absolute;
  inline-size: 130px;
  block-size: 130px;
  inset-inline-end: -56px;
  inset-block-end: -66px;
  border: 28px solid var(--cyan-100);
  border-radius: 50%;
  transition:
    transform 300ms var(--ease),
    border-color 220ms ease;
  content: "";
}

.service-card:hover,
.service-card:focus-within {
  color: var(--white);
  background: var(--navy-900);
}

.service-card:hover::after,
.service-card:focus-within::after {
  border-color: rgba(105, 196, 208, 0.18);
  transform: scale(1.18);
}

.service-card:hover h3,
.service-card:focus-within h3 {
  color: var(--white);
}

.service-card:hover p,
.service-card:focus-within p {
  color: var(--muted-dark);
}

.service-card:hover .text-link,
.service-card:focus-within .text-link {
  color: var(--cyan-400);
}

.service-card:hover .icon-box,
.service-card:focus-within .icon-box {
  color: var(--cyan-400);
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
}

.service-card .icon-box {
  margin-block-end: 56px;
}

.service-card h3 {
  margin-block-end: var(--space-4);
}

.service-card p {
  margin-block-end: var(--space-6);
  color: var(--muted);
  font-size: 0.94rem;
  transition: color 220ms ease;
}

.service-card .text-link {
  margin-block-start: auto;
}

/* ---- Product chips (verified food categories — factual, unbranded) ---- */

.product-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: var(--space-8) 0 0;
  padding: 0;
  list-style: none;
}

.product-chip {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-pill);
  color: #d9e4eb;
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.83rem;
}

.product-chips--light .product-chip {
  color: var(--brand-700);
  border-color: var(--line-strong);
  background: var(--blue-wash);
}

/* ---- Trust list ---- */

.trust-layout {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: clamp(48px, 8vw, 110px);
}

.trust-layout__statement {
  padding-inline-start: 25px;
  border-inline-start: 3px solid var(--cyan-400);
  color: var(--muted);
  font-size: 1.05rem;
}

.trust-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 44px;
  margin: 0;
  padding: 0;
  border-block-start: 1px solid var(--line);
  list-style: none;
}

.trust-item {
  display: grid;
  min-block-size: 118px;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding-block: 25px;
  border-block-end: 1px solid var(--line);
}

.trust-item__number {
  display: grid;
  inline-size: 34px;
  block-size: 34px;
  place-items: center;
  border: 1px solid #b9d9e2;
  border-radius: 50%;
  color: var(--brand-700);
  background: var(--cyan-100);
  font-size: 0.72rem;
  font-weight: 700;
}

.trust-item h3 {
  margin-block-end: 7px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.35;
}

.trust-item p {
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---- Five-step business process ---- */

.process {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.process::before {
  position: absolute;
  inset-inline: 8%;
  inset-block-start: 39px;
  block-size: 1px;
  background: linear-gradient(90deg, transparent, var(--rule-navy) 8%, var(--rule-navy) 92%, transparent);
  content: "";
}

[dir="rtl"] .process::before {
  background: linear-gradient(270deg, transparent, var(--rule-navy) 8%, var(--rule-navy) 92%, transparent);
}

.process-step {
  position: relative;
  z-index: 1;
  padding-inline: var(--space-4);
  text-align: center;
}

.process-step__number {
  display: grid;
  inline-size: 78px;
  block-size: 78px;
  margin: 0 auto 28px;
  place-items: center;
  border: 1px solid var(--rule-navy-soft);
  border-radius: 50%;
  color: var(--cyan-400);
  background: var(--navy-900);
  font-family: var(--font-display);
  font-size: 1.25rem;
  /* Latin digits stay LTR even inside an Arabic RTL document. */
  direction: ltr;
  unicode-bidi: isolate;
}

.process-step h3 {
  margin-block-end: var(--space-3);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.4;
}

.process-step p {
  color: var(--muted-dark);
  font-size: 0.86rem;
}

/* ---- Status labels ---- */

.status-pill {
  display: inline-flex;
  inline-size: fit-content;
  align-items: center;
  gap: var(--space-2);
  padding: 8px 11px;
  border-radius: var(--radius-pill);
  color: var(--navy-900);
  background: var(--cyan-400);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.3;
}

.status-pill::before {
  inline-size: 6px;
  block-size: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.status-tag {
  display: inline-block;
  max-inline-size: 140px;
  padding: 7px 9px;
  border-radius: var(--radius-sm);
  color: var(--brand-700);
  background: var(--blue-wash);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: end;
}

/* ---- Sector rows (compact secondary list) ---- */

.sector-list {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
}

.sector-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: var(--space-5);
  align-items: center;
  padding: var(--space-6);
  border-block-end: 1px solid var(--line);
  text-decoration: none;
  transition: background-color var(--motion-micro) ease;
}

.sector-row:last-child {
  border-block-end: 0;
}

.sector-row:hover {
  background: var(--blue-wash);
}

.sector-row__icon {
  display: grid;
  inline-size: 44px;
  block-size: 44px;
  place-items: center;
  border-radius: var(--radius-md);
  color: var(--brand-700);
  background: var(--blue-wash);
}

.sector-row__icon svg {
  inline-size: 21px;
  block-size: 21px;
}

.sector-row h3 {
  margin-block-end: 5px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
}

.sector-row p {
  color: var(--muted);
  font-size: 0.8rem;
}

.sector-row__arrow {
  display: grid;
  inline-size: 34px;
  block-size: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--brand-700);
}

.sector-row__arrow svg {
  inline-size: 16px;
  block-size: 16px;
}

[dir="rtl"] .sector-row__arrow svg {
  transform: scaleX(-1);
}

/* ---- Sector cards ---- */

.sector-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sector-card {
  display: flex;
  min-block-size: 320px;
  flex-direction: column;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
}

.sector-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.sector-card .icon-box {
  margin-block-end: 54px;
}

.sector-card h3 {
  margin-block-end: var(--space-4);
}

.sector-card p {
  flex: 1;
  color: var(--muted);
  font-size: 0.91rem;
}

.sector-card .text-link {
  margin-block-start: var(--space-5);
}

/* ---- Company timeline ---- */

.timeline {
  position: relative;
  display: grid;
  gap: 34px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline::before {
  position: absolute;
  inset-block: 12px;
  inset-inline-start: 17px;
  inline-size: 1px;
  background: var(--line);
  content: "";
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: var(--space-5);
}

.timeline-item__dot {
  position: relative;
  z-index: 1;
  inline-size: 36px;
  block-size: 36px;
  border: 8px solid var(--white);
  border-radius: 50%;
  background: var(--brand-600);
  box-shadow: 0 0 0 1px var(--brand-500);
}

.timeline-item h3 {
  margin-block-end: var(--space-2);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
}

.timeline-item p {
  color: var(--muted);
  font-size: 0.92rem;
}

/* A milestone still awaiting client confirmation is labelled, never presented as fact. */
.timeline-item--pending .timeline-item__dot {
  background: var(--white);
  box-shadow: 0 0 0 1px var(--line);
}

.timeline-item--pending h3 {
  color: var(--warning);
}

/* ---- Vision / mission / values ---- */

.principles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.principle {
  min-block-size: 250px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
}

.principle--feature {
  grid-row: span 2;
  min-block-size: 518px;
  color: var(--white);
  border-color: transparent;
  background: var(--brand-700);
}

.principle__number {
  display: block;
  margin-block-end: 70px;
  color: var(--brand-500);
  font-family: var(--font-display);
  font-size: 1.1rem;
  direction: ltr;
  unicode-bidi: isolate;
}

.principle h3 {
  margin-block-end: 18px;
}

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

/*
 * Feature-card overrides come AFTER the base .principle rules on purpose: they carry the same
 * specificity, so declaring them earlier let ".principle p { color: var(--muted) }" win and the
 * card's body text rendered muted grey on Almored Blue at 1.6:1. Caught by an axe contrast run.
 */
.principle--feature h3,
.principle--feature p {
  color: var(--white);
}

/*
 * The approved Restrained Cyan reaches only 4.4:1 against Almored Blue — just under the 4.5:1
 * AA threshold for this size. Lightening it slightly, derived from the same approved token
 * rather than a new colour, keeps the cyan accent while clearing AA (~5.1:1).
 */
.principle--feature .principle__number {
  color: var(--cyan-400);
  color: color-mix(in srgb, var(--cyan-400) 78%, var(--white));
}

.value-strip {
  display: grid;
  margin: 18px 0 0;
  padding: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  list-style: none;
}

.value-item {
  padding: 28px;
  background: var(--white);
}

.value-item + .value-item {
  border-inline-start: 1px solid var(--line);
}

.value-item h3 {
  margin-block-end: 9px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
}

.value-item p {
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---- Group companies ---- */

.group-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  border-block-start: 1px solid var(--line);
  list-style: none;
}

.group-company {
  display: grid;
  min-block-size: 150px;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: var(--space-6);
  padding-block: 28px;
  padding-inline-end: var(--space-6);
  border-block-end: 1px solid var(--line);
}

.group-company:nth-child(even) {
  padding-inline-start: 28px;
  padding-inline-end: 0;
  border-inline-start: 1px solid var(--line);
}

.group-company__year {
  color: var(--brand-600);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  direction: ltr;
  unicode-bidi: isolate;
  text-align: start;
}

.group-company h3 {
  margin-block-end: var(--space-2);
  font-family: var(--font-body);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.35;
}

.group-company p {
  color: var(--muted);
  font-size: 0.87rem;
}

/* ---- Forms ---- */

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
}

.field {
  display: grid;
  gap: var(--space-2);
  align-content: start;
}

.field--full {
  grid-column: 1 / -1;
}

.field > label {
  color: var(--navy-900);
  font-size: 0.82rem;
  font-weight: 700;
}

.field__optional {
  color: var(--muted);
  font-weight: 400;
}

.field input,
.field select,
.field textarea {
  inline-size: 100%;
  min-block-size: 50px;
  padding: 13px 14px;
  border: 1px solid #8b9aa4;
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: var(--white);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.field textarea {
  min-block-size: 142px;
  resize: vertical;
}

/* Hover and disabled were both missing: the fields had only default, focus and invalid,
   so there was no pointer affordance and a disabled field would have looked editable. */
.field input:hover:not(:disabled),
.field select:hover:not(:disabled),
.field textarea:hover:not(:disabled) {
  border-color: var(--muted);
}

.field input:disabled,
.field select:disabled,
.field textarea:disabled {
  color: var(--muted);
  border-color: var(--line);
  background: var(--off-white);
  cursor: not-allowed;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #67757e;
  opacity: 1;
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  border-color: var(--brand-600);
  box-shadow: 0 0 0 4px rgba(18, 98, 150, 0.14);
  outline: 2px solid transparent; /* keeps a ring in forced-colors mode */
  outline-offset: 0;
}

.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea,
.field input[aria-invalid="true"],
.field select[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: var(--error);
  background: var(--error-soft);
}

.field-error {
  color: var(--error);
  font-size: var(--text-micro);
  font-weight: 600;
}

.field-error:empty {
  display: none;
}

.consent {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: var(--space-3);
  align-items: start;
  color: var(--muted);
  font-size: 0.82rem;
}

.consent input {
  inline-size: 20px;
  block-size: 20px;
  min-block-size: 0;
  margin: 3px 0 0;
  padding: 0;
  accent-color: var(--brand-600);
}

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

/* Honeypot: hidden from sighted users AND assistive tech. Class-based, never an inline
   style attribute — the CSP has no 'unsafe-inline' for styles. */
.field--honeypot {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-block-start: var(--space-6);
}

.form-note {
  max-inline-size: 340px;
  color: var(--muted);
  font-size: 0.75rem;
}

/* ---- Form messages (success / error / validation summary) ---- */

.form-message {
  margin-block-end: var(--space-6);
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

.form-message h2 {
  margin-block-end: var(--space-2);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
}

.form-message--success {
  color: var(--success);
  border: 1px solid var(--success-line);
  background: var(--success-soft);
}

.form-message--success h2 {
  color: var(--success);
}

.form-message--error {
  color: var(--error);
  border: 1px solid var(--error-line);
  background: var(--error-soft);
}

.form-message--error h2 {
  color: var(--error);
}

.form-message ul {
  margin: var(--space-2) 0 0;
  padding-inline-start: 1.2em;
}

.form-message--notice {
  color: var(--warning);
  border: 1px solid var(--warning-line);
  background: var(--warning-soft);
}
