/* Coopérative landing — brand tokens */
:root {
  --ink: #14201c;
  --ink-soft: #3d4f47;
  --muted: #6b7c74;
  --brand: #008000;
  --brand-deep: #033603;
  --brand-dark: #008000;
  --brand-soft: #e6f2e6;
  --btn-text: #ffffff;
  --sand: #f3efe6;
  --sand-deep: #e8e1d4;
  --paper: #faf8f4;
  --line: rgba(20, 32, 28, 0.1);
  --white: #ffffff;
  --radius: 12px;
  --shadow: 0 18px 40px rgba(20, 32, 28, 0.08);
  --font: "Source Serif 4", "Times New Roman", serif;
  --font-display: "Cormorant Garamond", "Times New Roman", serif;
  --font-ar: "Amiri", "Traditional Arabic", serif;
  --max: 1120px;
  --header-h: 72px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  font-family: var(--font);
  font-optical-sizing: auto;
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, color-mix(in srgb, var(--brand) 12%, transparent), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(232, 225, 212, 0.9), transparent 50%),
    var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

.arabic {
  font-family: var(--font-ar);
  direction: rtl;
}

.container {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--brand-soft) 85%, rgba(250, 248, 244, 0.92));
  backdrop-filter: blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--brand) 20%, transparent);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 8px 24px rgba(20, 32, 28, 0.04);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.brand__logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--white);
  border: 1px solid var(--line);
}

.brand__ar {
  font-family: var(--font-ar);
  font-weight: 700;
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  line-height: 1.35;
  direction: rtl;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(48vw, 280px);
}

.icon {
  width: 1.1em;
  height: 1.1em;
  display: inline-block;
  vertical-align: -0.15em;
  flex-shrink: 0;
}

.btn .icon {
  width: 1.05em;
  height: 1.05em;
}

.nav {
  display: none;
  align-items: center;
  gap: 1.5rem;
}

.nav a {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink-soft);
  position: relative;
  padding: 0.25rem 0;
  letter-spacing: 0.02em;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav a:hover::after,
.nav a:focus-visible::after {
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  cursor: pointer;
  color: var(--ink);
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  position: relative;
}

.menu-toggle span::before,
.menu-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
}

.menu-toggle span::before {
  top: -6px;
}

.menu-toggle span::after {
  top: 6px;
}

.mobile-nav {
  display: none;
  position: absolute;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 1rem 1.25rem 1.25rem;
  flex-direction: column;
  gap: 0.75rem;
}

.mobile-nav.is-open {
  display: flex;
}

.mobile-nav a {
  padding: 0.65rem 0.25rem;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--primary {
  background: var(--brand);
  color: var(--btn-text, #ffffff);
}

.btn--primary:hover {
  background: var(--brand-deep);
}

.btn--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.45);
  color: var(--white);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn--outline {
  background: var(--white);
  border-color: var(--line);
  color: var(--ink);
}

.btn--outline:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.btn--whatsapp {
  background: #128c7e;
  color: var(--white);
}

.btn--whatsapp:hover {
  background: #0e7368;
}

.btn--sm {
  padding: 0.55rem 0.95rem;
  font-size: 0.85rem;
}

/* Hero */
.hero {
  position: relative;
  min-height: calc(100svh - var(--header-h));
  display: grid;
  align-items: end;
  overflow: hidden;
  color: var(--white);
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  animation: hero-pan 18s ease-in-out infinite alternate;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 30, 24, 0.35) 0%, rgba(10, 30, 24, 0.72) 55%, rgba(10, 30, 24, 0.88) 100%),
    linear-gradient(90deg, rgba(10, 30, 24, 0.55) 0%, transparent 60%);
}

.hero__content {
  position: relative;
  z-index: 1;
  padding: clamp(3rem, 8vw, 5.5rem) 0 clamp(3.5rem, 8vw, 5rem);
  max-width: 40rem;
}

.hero__brand {
  font-family: var(--font-ar);
  font-size: clamp(2.15rem, 5.8vw, 3.6rem);
  font-weight: 700;
  line-height: 1.3;
  direction: rtl;
  text-align: right;
  margin: 0 0 1rem;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.25);
  animation: rise 0.9s ease both;
}

.hero__tagline {
  margin: 0 0 1.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.4vw, 1.45rem);
  font-weight: 500;
  font-style: italic;
  color: rgba(255, 255, 255, 0.92);
  max-width: 32rem;
  line-height: 1.45;
  animation: rise 0.9s ease 0.12s both;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  animation: rise 0.9s ease 0.22s both;
}

@keyframes hero-pan {
  from {
    transform: scale(1.04) translate(0, 0);
  }
  to {
    transform: scale(1.1) translate(-1.5%, -1%);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Sections */
.section {
  padding: clamp(3.5rem, 8vw, 5.5rem) 0;
}

.section--alt {
  background: linear-gradient(180deg, var(--sand) 0%, var(--paper) 100%);
}

.section__head {
  max-width: 36rem;
  margin-bottom: clamp(2rem, 4vw, 2.75rem);
}

.section__eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-dark, var(--brand));
  margin-bottom: 0.65rem;
}

.section__title {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.section__subtitle {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.08rem;
}

/* About */
.about-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.about-copy [data-bind="about-history"] p {
  margin: 0 0 1.1rem;
  color: var(--ink-soft);
}

.about-copy [data-bind="about-history"] p:last-child {
  margin-bottom: 1.75rem;
}

.about-copy h3 {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
}

.activities {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.activities li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: var(--ink);
  font-weight: 500;
}

.activities li::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  margin-top: 0.45rem;
  flex-shrink: 0;
  border-radius: 2px;
  background: var(--brand);
}

.about-visual {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 320px;
  aspect-ratio: 4 / 5;
  box-shadow: var(--shadow);
}

.about-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-visual__meta {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  padding: 1rem 1.1rem;
  background: rgba(250, 248, 244, 0.94);
  border-radius: 10px;
  color: var(--ink);
}

.about-visual__meta strong {
  display: block;
  font-size: 0.95rem;
}

.about-visual__meta span {
  font-size: 0.82rem;
  color: var(--muted);
}

/* Products — interaction containers */
.products-grid {
  display: grid;
  gap: 1.5rem;
}

.product {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.product:hover {
  border-color: color-mix(in srgb, var(--brand) 35%, transparent);
  box-shadow: var(--shadow);
}

.product__media {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--sand-deep);
}

.product__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product:hover .product__media img {
  transform: scale(1.04);
}

.product__name {
  margin: 0;
  padding: 1rem 1.15rem 1.2rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  text-align: center;
}

.products-cta {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.gallery-group + .gallery-group {
  margin-top: 2.5rem;
}

.gallery-list {
  display: block;
}

.gallery-group__title {
  margin: 0 0 1rem;
  color: var(--brand-deep);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
}

/* Each gallery category is displayed as one row. */
.gallery-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 0.85rem;
}

.gallery-grid figure {
  margin: 0;
  overflow: hidden;
  border-radius: 10px;
  background: var(--sand-deep);
  min-height: 0;
}

.gallery-grid figure > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}

.gallery-grid figure:hover > img {
  transform: scale(1.04);
}

.gallery-grid figure {
  aspect-ratio: 1;
}

/* Certifications */
.certs {
  display: grid;
  gap: 1.15rem;
}

.cert {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.4rem 1.5rem;
  display: grid;
  gap: 0.7rem;
  justify-items: start;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
  position: relative;
  overflow: hidden;
}

.cert::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--brand), var(--brand-deep));
  opacity: 0.85;
}

.cert:hover {
  border-color: color-mix(in srgb, var(--brand) 35%, transparent);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.cert__icon {
  width: 3rem;
  height: 3rem;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand-deep);
}

.cert__icon .icon {
  width: 1.45rem;
  height: 1.45rem;
}

.cert__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.cert__detail {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Contact */
.contact-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  width: 100%;
}

.contact-card {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-card:hover {
  border-color: color-mix(in srgb, var(--brand) 30%, transparent);
  box-shadow: var(--shadow);
}

.contact-card__icon {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: var(--brand-soft);
  color: var(--brand-deep);
}

.contact-card__icon .icon {
  width: 1.15rem;
  height: 1.15rem;
}

.contact-card__body {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
  flex: 1;
}

.contact-card__label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-dark, var(--brand));
}

.contact-card__value {
  color: var(--ink);
  font-size: 0.98rem;
  word-break: break-word;
  line-height: 1.4;
}

a.contact-card__value:hover {
  color: var(--brand);
}

.social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.2rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  font-size: 0.82rem;
  font-weight: 500;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.social-link .icon {
  width: 0.95rem;
  height: 0.95rem;
}

.social-link:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Footer */
.site-footer {
  padding: 2.5rem 0 2rem;
  border-top: 1px solid var(--line);
  background: var(--brand-deep);
  color: rgba(255, 255, 255, 0.88);
}

.site-footer .container {
  display: grid;
  gap: 1.25rem;
}

.footer-top {
  display: grid;
  gap: 1.5rem;
  align-items: end;
}

.footer-top__left {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}

.footer-brand-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.footer-logo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--white);
  flex-shrink: 0;
}

.footer-brand {
  font-family: var(--font-ar);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--white);
  direction: rtl;
  text-align: right;
}

.footer-meta {
  margin: 0;
  font-size: 0.9rem;
}

.footer-form {
  width: 100%;
  min-width: 0;
}

.footer-form__row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.55);
  padding-bottom: 0.35rem;
}

.footer-form__row input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0.35rem 0;
  color: var(--white);
  font-size: 1rem;
  outline: none;
}

.footer-form__row input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.footer-form__row button {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  transition: color 0.2s ease, transform 0.2s ease;
}

.footer-form__row button svg {
  width: 1.25rem;
  height: 1.25rem;
}

.footer-form__row button:hover {
  color: var(--white);
  transform: translateX(3px);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  justify-content: space-between;
  align-items: flex-end;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.85rem;
}

.footer-end {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.65rem 1.15rem;
}

.footer-nav a {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.78);
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}

.footer-nav a:hover {
  color: var(--white);
}

.footer-socials {
  display: flex;
  gap: 0.85rem;
  align-items: center;
}

.footer-socials a {
  display: inline-flex;
  color: rgba(255, 255, 255, 0.78);
}

.footer-socials .icon {
  width: 1.25rem;
  height: 1.25rem;
}

.footer-socials a:hover {
  color: var(--white);
}

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

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Desktop */
@media (min-width: 768px) {
  .nav {
    display: flex;
  }

  .menu-toggle {
    display: none;
  }

  .about-grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3.5rem;
  }

  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .certs {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }

  .contact-stack {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-top {
    grid-template-columns: minmax(0, 1fr) minmax(14rem, 0.9fr);
    gap: 2rem;
    align-items: end;
  }
}

@media (min-width: 1024px) {
  .contact-stack {
    grid-template-columns: repeat(3, 1fr);
  }

  .header-cta {
    display: inline-flex;
  }
}

@media (max-width: 1023px) {
  .header-cta {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero__media img,
  .reveal,
  .hero__brand,
  .hero__tagline,
  .hero__actions {
    animation: none !important;
    transition: none !important;
    opacity: 1;
    transform: none;
  }
}
