/* =========================================================
   GuwLab Design System — Components
   UI building blocks: header, buttons, hero, cards, CTA, footer.
   Requires: tokens.css
   ========================================================= */

/* ── Header ── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(78, 78, 80, 0.08);
}

.site-header__inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.brand {
  display: flex;
  align-items: center;
}

.brand img {
  height: 36px;
  width: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.nav a {
  color: var(--color-primary);
  font-weight: 500;
  transition: color 0.2s ease;
}

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

/* Mobile menu */
.menu-btn {
  display: none;
  background: none;
  border: none;
  padding: var(--space-2);
  color: var(--color-text-soft);
  cursor: pointer;
}

.menu-btn:hover {
  color: var(--color-accent);
}

.menu-btn svg {
  width: 24px;
  height: 24px;
}

.mobile-menu {
  display: none;
  border-top: 1px solid var(--color-border);
  padding: var(--space-4) 0;
}

.mobile-menu.is-open {
  display: block;
}

.mobile-menu a {
  display: block;
  padding: var(--space-2) 0;
  font-weight: 500;
  color: var(--color-text-soft);
  transition: color 0.2s ease;
}

.mobile-menu a:hover {
  color: var(--color-accent);
}

.mobile-menu a:last-child {
  color: var(--color-accent);
  font-weight: 700;
}

/* ── Buttons ── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.9rem 1.25rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

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

.btn-primary {
  background: var(--color-accent);
  color: var(--color-white);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--color-accent-dark);
}

.btn-secondary {
  background: transparent;
  color: var(--color-primary);
  border-color: rgba(78, 78, 80, 0.18);
}

.btn-secondary:hover {
  background: var(--color-primary-soft);
}

.btn-full {
  width: 100%;
}

/* ── Hero ── */

.hero {
  position: relative;
  overflow: hidden;
}

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

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero__overlay {
  position: relative;
  z-index: 1;
  padding: 5rem 0 4rem;
}

.hero__content {
  max-width: 520px;
}

.hero__content .eyebrow {
  color: var(--color-white);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.hero__content h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  max-width: 16ch;
  color: var(--color-white);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.hero__content .lead {
  margin-top: var(--space-4);
  color: var(--color-white);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.hero .btn-primary {
  background: var(--color-white);
  color: var(--color-accent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.hero .btn-primary:hover {
  background: #f0f4f6;
}

.hero .btn-secondary {
  background: transparent;
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.6);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.hero .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ── Hero Split (v06) ── */

.hero--split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 480px;
}

.hero--split__text {
  display: flex;
  align-items: center;
  padding: var(--space-9) var(--space-7);
  background: var(--color-bg-soft);
}

.hero--split__text .hero__content {
  max-width: 520px;
}

.hero--split__text .hero__content .eyebrow {
  color: var(--color-accent);
  text-shadow: none;
}

.hero--split__text .hero__content h1 {
  color: var(--color-heading);
  text-shadow: none;
}

.hero--split__text .hero__content .lead {
  color: var(--color-text-soft);
  text-shadow: none;
}

.hero--split__image {
  overflow: hidden;
}

.hero--split__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero--split .btn-secondary {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

.hero--split .btn-secondary:hover {
  background: var(--color-heading);
  border-color: var(--color-heading);
}

/* ── Feature Cards ── */

.features {
  margin-top: var(--space-6);
}

.feature-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.feature-card__image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.feature-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feature-card__body {
  padding: var(--space-5);
}

.feature-card__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-bottom: var(--space-4);
  border-radius: 999px;
  background: var(--color-accent-soft);
  color: var(--color-accent);
  font-size: var(--text-sm);
  font-weight: 700;
}

.feature-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: var(--space-4);
  border-radius: var(--radius-sm);
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.feature-card__icon svg {
  width: 20px;
  height: 20px;
}

.feature-card h3 {
  margin-bottom: var(--space-2);
  font-size: var(--text-base);
}

.feature-card p {
  margin-bottom: 0;
  color: var(--color-text-soft);
  font-size: var(--text-sm);
}

/* ── Line Cards ── */

.lines {
  margin-top: var(--space-6);
}

.line-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfc 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}

.line-card__tag {
  display: inline-block;
  margin-bottom: var(--space-3);
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: var(--color-accent-soft);
  color: var(--color-accent);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.line-card h3 {
  margin-bottom: var(--space-3);
}

.line-card p {
  margin-bottom: 0;
  color: var(--color-text-soft);
}

/* ── Product Sections ── */

.products-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-5);
  margin-bottom: var(--space-6);
}

.products-header a {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-accent);
  white-space: nowrap;
  transition: color 0.2s ease;
}

.products-header a:hover {
  color: var(--color-accent-dark);
}

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

/* ── Product Cards ── */

.product-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  min-height: 100%;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.product-card__image {
  aspect-ratio: 4 / 3;
  background: var(--color-bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-card__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: var(--space-5);
  mix-blend-mode: multiply;
}

.product-card__image--placeholder {
  color: var(--color-accent);
  opacity: 0.25;
  font-size: var(--text-2xl);
  font-weight: 900;
}

.product-card__body {
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  flex: 1;
}

.product-card__problem {
  display: inline-block;
  width: fit-content;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: var(--color-accent-soft);
  color: var(--color-accent-dark);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.product-card__name {
  margin: 0;
  color: var(--color-heading);
  font-size: var(--text-base);
  font-weight: 800;
}

.product-card__description {
  margin: 0;
  color: var(--color-text-soft);
  font-size: var(--text-sm);
  line-height: var(--line-normal);
}

.product-card__usage {
  margin-top: auto;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-accent);
}

.product-card__link {
  display: inline-block;
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-accent);
  transition: color 0.2s ease;
}

.product-card__link:hover {
  color: var(--color-accent-dark);
}

/* ── Subcategory Headers ── */

.subcategory {
  margin-bottom: var(--space-7);
}

.subcategory:last-child {
  margin-bottom: 0;
}

.subcategory__header {
  margin-bottom: var(--space-5);
}

.subcategory__header h3 {
  margin-bottom: var(--space-2);
  font-size: var(--text-lg);
}

.subcategory__header p {
  margin-bottom: 0;
  color: var(--color-text-soft);
  font-size: var(--text-sm);
}

/* ── CTA Final ── */

.cta-final {
  background: var(--color-primary);
  color: var(--color-white);
  border-radius: var(--radius-xl);
  padding: clamp(2rem, 4vw, 4rem);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.cta-final h2,
.cta-final p {
  color: var(--color-white);
}

.cta-final p {
  opacity: 0.88;
  max-width: 58ch;
  margin-inline: auto;
}

.cta-final__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-5);
  justify-content: center;
}

.cta-final .btn-primary {
  background: var(--color-white);
  color: var(--color-primary);
}

.cta-final .btn-primary:hover {
  background: #f0f4f6;
}

.cta-final .btn-secondary {
  border-color: rgba(255, 255, 255, 0.26);
  color: var(--color-white);
}

.cta-final .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
}

.cta-final__note {
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  opacity: 0.5;
}

/* ── Footer ── */

.site-footer {
  padding: var(--space-8) 0 var(--space-7);
}

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-5);
}

.site-footer__brand img {
  height: 28px;
  width: auto;
  opacity: 0.5;
}

.site-footer__meta {
  color: var(--color-text-soft);
  font-size: var(--text-sm);
}

.site-footer a {
  font-size: var(--text-xs);
  color: var(--color-text-soft);
  transition: color 0.2s ease;
}

.site-footer a:hover {
  color: var(--color-heading);
}

/* ── Footer Grid (v06) ── */

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: var(--space-7);
  padding-bottom: var(--space-5);
}

.site-footer__col h4 {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-heading);
  margin-bottom: var(--space-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.site-footer__col p {
  font-size: var(--text-sm);
  color: var(--color-text-soft);
  margin-bottom: var(--space-2);
}

.site-footer__col a {
  display: block;
  font-size: var(--text-sm);
  color: var(--color-text-soft);
  padding: var(--space-1) 0;
  transition: color 0.2s ease;
}

.site-footer__col a:hover {
  color: var(--color-accent);
}

.site-footer__tagline {
  font-size: var(--text-sm);
  color: var(--color-text-soft);
  margin-top: var(--space-2);
}

.site-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-4);
  font-size: var(--text-xs);
  color: var(--color-text-soft);
}

/* ── Line Banner (v06) ── */

.line-banner {
  padding: var(--space-4) 0;
  margin-bottom: var(--space-6);
  border-bottom: 3px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.line-banner__label {
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.line-banner--agro {
  border-color: var(--color-agro);
}

.line-banner--agro .line-banner__label {
  color: var(--color-agro);
}

.line-banner--pec {
  border-color: var(--color-accent);
}

.line-banner--pec .line-banner__label {
  color: var(--color-accent);
}

/* ── Trust Bar (v06) ── */

.trust-bar {
  background: var(--color-bg-soft);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-7) 0;
}

.trust-bar__grid {
  display: flex;
  justify-content: center;
  gap: var(--space-8);
}

.trust-bar__item {
  text-align: center;
}

.trust-bar__value {
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--color-heading);
  line-height: var(--line-tight);
  margin-bottom: var(--space-1);
}

.trust-bar__label {
  font-size: var(--text-xs);
  color: var(--color-text-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Responsive (Components) ── */

@media (max-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .hero__overlay {
    padding: 5.5rem 0 4rem;
  }

  .site-header__inner,
  .site-footer__inner,
  .products-header,
  .hero__actions,
  .cta-final__actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .cta-final__actions {
    align-items: stretch;
  }

  .nav {
    display: none;
  }

  .menu-btn {
    display: block;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .btn,
  .btn-full-mobile {
    width: 100%;
  }

  .site-footer__inner {
    align-items: center;
    text-align: center;
  }

  .hero--split {
    grid-template-columns: 1fr;
  }

  .hero--split__text {
    padding: var(--space-7) var(--space-5);
    order: 2;
  }

  .hero--split__image {
    order: 1;
    max-height: 280px;
  }

  .site-footer__grid {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }

  .site-footer__bottom {
    flex-direction: column;
    gap: var(--space-2);
    text-align: center;
  }

  .trust-bar__grid {
    flex-wrap: wrap;
    gap: var(--space-5);
  }

  .trust-bar__item {
    flex: 1 1 40%;
  }
}
