/* =========================================================
   MEGA-AGRI GRUP — Company Profile
   Design tokens
   ========================================================= */
:root{
  --ink:        #17231A;
  --forest:     #1E4A2E;
  --forest-2:   #275C39;
  --forest-3:   #3D7A4A;
  --gold:       #C9962E;
  --gold-2:     #E0B24F;
  --soil:       #7A5230;
  --paper:      #FAF9F4;
  --paper-alt:  #F1EEE3;
  --line:       rgba(23,35,26,0.12);
  --line-light: rgba(255,255,255,0.18);
  --white:      #FFFFFF;

  --font-display: "Fraunces", serif;
  --font-body:    "Inter", sans-serif;
  --font-mono:    "IBM Plex Mono", monospace;

  --container: 1180px;
  --radius: 14px;
  --radius-sm: 8px;
  --ease: cubic-bezier(.22,.7,.28,1);
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *{ animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body{
  margin:0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
ul, ol{ margin:0; padding:0; list-style:none; }
button{ font-family:inherit; cursor:pointer; }

:focus-visible{
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.section-inner{
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* Subtle paper-grain overlay for warmth without being a texture cliché */
.noise-overlay{
  position: fixed; inset:0; pointer-events:none; z-index: 999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

/* =========================================================
   Typography
   ========================================================= */
.eyebrow{
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--forest-2);
  margin: 0 0 14px;
}
.eyebrow--light{ color: var(--gold-2); }

.h2{
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(28px, 4.2vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 20px;
  max-width: 18ch;
}
.h2--light{ color: var(--white); }

.body-lg{ font-size: 18px; line-height: 1.65; margin: 0 0 18px; color: var(--ink); opacity: 0.88; }
.body-md{ font-size: 16px; line-height: 1.7; margin: 0 0 16px; opacity: 0.8; }
.body-md--light{ color: var(--white); opacity: 0.82; }

/* =========================================================
   Buttons
   ========================================================= */
.btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
  white-space: nowrap;
}
.btn--gold{
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  color: var(--ink);
  box-shadow: 0 8px 20px rgba(201,150,46,0.28);
}
.btn--gold:hover{ transform: translateY(-2px); box-shadow: 0 12px 26px rgba(201,150,46,0.38); }
.btn--ghost{
  background: transparent;
  color: var(--white);
  border: 1.5px solid var(--line-light);
}
.btn--ghost:hover{ background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.4); }

/* =========================================================
   Spec tag — the signature motif, styled after a chemical/
   fertilizer product label (active-ingredient callouts)
   ========================================================= */
.spec-tag{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px 5px 5px;
  margin-bottom: 12px;
  background: var(--paper);
}
.spec-tag-k{
  background: var(--forest);
  color: var(--white);
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 10px;
}
.spec-tag-v{ color: var(--ink); opacity: 0.72; }
.spec-tag--float{
  position: absolute;
  left: -18px;
  bottom: 28px;
  background: var(--white);
  box-shadow: 0 10px 30px rgba(23,35,26,0.18);
}

/* =========================================================
   NAV
   ========================================================= */
.nav{
  position: fixed; top:0; left:0; right:0; z-index: 500;
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease), padding 0.3s var(--ease);
  padding: 18px 0;
}
.nav.is-scrolled{
  background: rgba(250,249,244,0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line);
  padding: 10px 0;
}
.nav-inner{
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand{
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-icon-wrap{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 2px 10px rgba(0,0,0,0.18);
  overflow: hidden;
  flex-shrink: 0;
  transition: width 0.3s var(--ease), height 0.3s var(--ease);
}
.nav.is-scrolled .brand-icon-wrap{ width: 36px; height: 36px; box-shadow: 0 1px 4px rgba(0,0,0,0.12); }
.brand-icon{ width: 100%; height: 100%; object-fit: cover; }
.brand-word{
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.01em;
  color: var(--white);
  text-shadow: 0 1px 3px rgba(0,0,0,0.25);
  transition: color 0.3s var(--ease), font-size 0.3s var(--ease);
}
.nav.is-scrolled .brand-word{ color: var(--ink); text-shadow: none; font-size: 17.5px; }
.nav-links{
  display: flex;
  align-items: center;
  gap: 30px;
}
.nav-links a{
  font-size: 14.5px;
  font-weight: 600;
  color: var(--white);
  opacity: 0.92;
  transition: opacity 0.2s;
  text-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
.nav.is-scrolled .nav-links a{ color: var(--ink); opacity: 0.82; text-shadow:none; }
.nav-links a:hover{ opacity: 1; }
.nav-cta{
  background: var(--gold);
  color: var(--ink) !important;
  padding: 9px 18px;
  border-radius: 999px;
  text-shadow: none !important;
}
.nav-toggle{
  display:none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: transparent;
  border: none;
}
.nav-toggle span{
  display:block; height: 2px; width: 22px;
  background: var(--white);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease), background 0.3s var(--ease);
}
.nav.is-scrolled .nav-toggle span{ background: var(--ink); }
.nav-toggle.is-open span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2){ opacity: 0; }
.nav-toggle.is-open span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px){
  .nav-toggle{ display: flex; }
  .nav-links{
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: min(78vw, 320px);
    background: var(--forest);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 26px;
    padding: 40px;
    transform: translateX(100%);
    transition: transform 0.35s var(--ease);
    box-shadow: -20px 0 60px rgba(0,0,0,0.25);
  }
  .nav-links.is-open{ transform: translateX(0); }
  .nav-links a{ color: var(--white) !important; opacity: 1; font-size: 19px; text-shadow:none; }
  .nav-cta{ margin-top: 10px; }
}

/* =========================================================
   HERO
   ========================================================= */
.hero{
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: var(--white);
}
.hero-media{ position: absolute; inset:0; z-index: -1; }
.hero-media img{ width:100%; height:100%; object-fit: cover; }
.hero-scrim{
  position: absolute; inset:0;
  background:
    linear-gradient(180deg, rgba(15,26,17,0.55) 0%, rgba(15,26,17,0.35) 38%, rgba(12,22,14,0.86) 100%);
}
.hero-content{
  position: relative;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px 100px;
  width: 100%;
}
.hero-title{
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(40px, 8vw, 84px);
  line-height: 0.98;
  letter-spacing: -0.015em;
  margin: 0 0 18px;
  max-width: 14ch;
}
.hero-tagline{
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 0.05em;
  color: var(--gold-2);
  margin: 0 0 22px;
  font-weight: 600;
}
.hero-tagline .dot{ opacity: 0.5; margin: 0 2px; }
.hero-desc{
  max-width: 46ch;
  font-size: 17px;
  opacity: 0.88;
  margin: 0 0 34px;
}
.hero-actions{ display: flex; gap: 14px; flex-wrap: wrap; }

.scroll-cue{
  position: absolute;
  right: 30px; bottom: 34px;
  width: 26px; height: 42px;
  border: 1.5px solid var(--line-light);
  border-radius: 20px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}
.scroll-cue span{
  width: 4px; height: 4px;
  background: var(--gold-2);
  border-radius: 50%;
  animation: scrollcue 1.8s infinite;
}
@keyframes scrollcue{
  0%{ transform: translateY(0); opacity:1; }
  70%{ transform: translateY(14px); opacity:0; }
  100%{ opacity:0; }
}
@media (max-width: 640px){ .scroll-cue{ display:none; } }

/* =========================================================
   ABOUT
   ========================================================= */
.about{ padding: 120px 0; background: var(--paper); }
.about-grid{
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 72px;
  align-items: center;
}
.about-media{ position: relative; }
.about-media img{
  border-radius: var(--radius);
  aspect-ratio: 4/5;
  object-fit: cover;
  box-shadow: 0 30px 60px -20px rgba(23,35,26,0.35);
}
.fact-row{
  display: flex;
  gap: 34px;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.fact{ display: flex; flex-direction: column; gap: 4px; }
.fact-num{
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  color: var(--forest);
}
.fact-label{ font-size: 13px; opacity: 0.65; max-width: 16ch; }

@media (max-width: 900px){
  .about{ padding: 80px 0; }
  .about-grid{ grid-template-columns: 1fr; gap: 48px; }
  .about-media{ order: -1; max-width: 420px; }
  .spec-tag--float{ left: 16px; bottom: -18px; }
}

/* =========================================================
   VISION & MISSION
   ========================================================= */
.vm{
  background: var(--forest);
  background-image: radial-gradient(circle at 18% 20%, rgba(255,255,255,0.06), transparent 55%);
  padding: 110px 0;
  color: var(--white);
}
.vm-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 8px;
}
.vm-card{
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  padding: 40px;
}
.vm-title{
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  margin: 0 0 18px;
  color: var(--gold-2);
}
.vm-body{ opacity: 0.88; font-size: 16.5px; line-height: 1.7; }
.vm-list{ display: flex; flex-direction: column; gap: 20px; }
.vm-list li{
  display: flex;
  gap: 16px;
  align-items: flex-start;
  opacity: 0.92;
  font-size: 16px;
  line-height: 1.6;
}
.vm-num{
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--gold-2);
  padding-top: 2px;
  flex-shrink: 0;
}

@media (max-width: 800px){
  .vm{ padding: 72px 0; }
  .vm-grid{ grid-template-columns: 1fr; }
}

/* =========================================================
   PRODUCTS
   ========================================================= */
.products{ padding: 120px 0; background: var(--paper-alt); }
.products-intro{ max-width: 62ch; }

.filter-row{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 36px 0 44px;
}
.filter-pill{
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  opacity: 0.75;
  font-size: 13.5px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 999px;
  transition: all 0.2s var(--ease);
}
.filter-pill:hover{ opacity: 1; border-color: var(--forest-3); }
.filter-pill.is-active{
  background: var(--forest);
  border-color: var(--forest);
  color: var(--white);
  opacity: 1;
}

.product-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.product-card{
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  display: flex;
  flex-direction: column;
}
.product-card:hover{
  transform: translateY(-5px);
  box-shadow: 0 22px 40px -18px rgba(23,35,26,0.3);
}
.product-media{ aspect-ratio: 4/3; overflow: hidden; background: #fff; display:flex; align-items:center; justify-content:center; }
.product-media img{ width:auto; height:auto; max-width:100%; max-height:100%; object-fit: contain; object-position: center; transition: none; }
.product-card:hover .product-media img{ transform: none; }
.product-body{ padding: 22px 22px 26px; display: flex; flex-direction: column; flex:1; }
.product-name{
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 4px;
}
.product-cat{
  font-size: 12px;
  font-weight: 600;
  color: var(--soil);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 10px;
}
.product-desc{ font-size: 14.5px; opacity: 0.75; line-height: 1.6; margin: 0; }

.filter-empty{ text-align: center; padding: 40px 0; opacity: 0.6; }

@media (max-width: 980px){
  .product-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px){
  .products{ padding: 72px 0; }
  .product-grid{ grid-template-columns: 1fr; }
  .filter-row{ flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; margin: 28px -24px 36px; padding-left: 24px; padding-right: 24px; }
  .filter-pill{ flex-shrink: 0; }
}

/* =========================================================
   LOGISTICS
   ========================================================= */
.logistics{ background: var(--ink); color: var(--white); padding: 110px 0; }
.logistics-intro{ max-width: 60ch; }
.gallery{
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 18px;
  margin-top: 44px;
  height: 520px;
}
.gallery-item{ border-radius: var(--radius); overflow: hidden; }
.gallery-item img{ width:100%; height:100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.gallery-item:hover img{ transform: scale(1.05); }
.gallery-item--tall{ grid-row: 1 / 3; }

@media (max-width: 800px){
  .logistics{ padding: 72px 0; }
  .gallery{ grid-template-columns: 1fr; grid-template-rows: auto; height: auto; }
  .gallery-item--tall{ grid-row: auto; }
  .gallery-item{ aspect-ratio: 4/3; }
}

/* =========================================================
   CTA BANNER
   ========================================================= */
.cta-banner{ position: relative; padding: 130px 0; overflow: hidden; }
.cta-bg{ position: absolute; inset:0; width:100%; height:100%; object-fit: cover; z-index:-2; }
.cta-scrim{ position: absolute; inset:0; background: linear-gradient(180deg, rgba(15,26,17,0.82), rgba(15,26,17,0.7)); z-index:-1; }
.cta-content{ text-align: center; max-width: 640px; }
.cta-content .h2{ margin-left:auto; margin-right:auto; max-width: 16ch; }
.cta-content .body-lg{ margin-left:auto; margin-right:auto; max-width: 46ch; }
.cta-content .btn{ margin-top: 10px; }

@media (max-width: 640px){ .cta-banner{ padding: 88px 0; } }

/* =========================================================
   CONTACT / FOOTER
   ========================================================= */
.contact{ background: var(--forest); color: var(--white); padding-top: 110px; }
.contact-grid{
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: 60px;
  align-items: center;
  padding-bottom: 90px;
}
.contact-list{ display:flex; flex-direction:column; gap:22px; margin: 30px 0 34px; }
.contact-list li{ display:flex; flex-direction:column; gap:6px; }
.contact-label{
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-2);
}
.contact-value{ font-size: 16px; opacity: 0.92; line-height: 1.6; }
.contact-value a:hover{ text-decoration: underline; }
.contact-media img{
  border-radius: var(--radius);
  aspect-ratio: 4/5;
  object-fit: cover;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.4);
}

.footer-bottom{ border-top: 1px solid var(--line-light); padding: 30px 0; }
.footer-bottom-inner{
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.footer-brand{ display: flex; align-items: center; gap: 10px; }
.brand-icon-wrap--footer{ width: 32px; height: 32px; box-shadow: none; }
.footer-word{
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  color: var(--white);
}
.footer-tagline{
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--gold-2);
  opacity: 0.9;
  margin: 0;
}
.footer-copy{ margin: 0 0 0 auto; font-size: 13px; opacity: 0.6; }

@media (max-width: 800px){
  .contact{ padding-top: 72px; }
  .contact-grid{ grid-template-columns: 1fr; gap: 40px; padding-bottom: 60px; }
  .contact-media{ order: -1; max-width: 380px; }
  .footer-copy{ margin-left: 0; width: 100%; order: 3; }
}

/*==================================================
  IMAGE VIEWER
==================================================*/

.product-media img,
.gallery img,
.about-media img,
.contact-media img{
    cursor:zoom-in;
    -webkit-user-select:none;
    user-select:none;
}

.image-viewer{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.95);

    display:flex;
    justify-content:center;
    align-items:center;

    opacity:0;
    visibility:hidden;

    transition:.25s;

    z-index:99999;

    overflow:hidden;

    touch-action:none;
}

.image-viewer.show{
    opacity:1;
    visibility:visible;
}

.viewer-image{

    max-width:95vw;
    max-height:92vh;

    object-fit:contain;

    transform-origin:center center;

    transition:transform .15s;

    will-change:transform;

    cursor:grab;
}

.viewer-image:active{
    cursor:grabbing;
}

.viewer-close{

    position:absolute;

    top:20px;
    right:22px;

    width:48px;
    height:48px;

    border:none;
    border-radius:50%;

    background:rgba(255,255,255,.15);

    color:white;

    font-size:34px;

    cursor:pointer;

    backdrop-filter:blur(8px);
}

@media(max-width:768px){

    .viewer-image{

        max-width:100vw;
        max-height:100vh;

    }

    .viewer-close{

        top:15px;
        right:15px;

    }

}
